diff --git a/Cargo.lock b/Cargo.lock index eb041f83ed..c58c56f890 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3692,8 +3692,10 @@ dependencies = [ name = "test-runtime" version = "0.28.0" dependencies = [ + "hex", "impl-serde", "jsonrpsee", + "parity-scale-codec", "serde", "substrate-runner", "subxt", diff --git a/artifacts/polkadot_metadata.scale b/artifacts/polkadot_metadata.scale index b0d3e7de87..d42d495410 100644 Binary files a/artifacts/polkadot_metadata.scale and b/artifacts/polkadot_metadata.scale differ diff --git a/cli/src/commands/compatibility.rs b/cli/src/commands/compatibility.rs index 3b0e2cdd44..51d50068c8 100644 --- a/cli/src/commands/compatibility.rs +++ b/cli/src/commands/compatibility.rs @@ -11,6 +11,7 @@ use frame_metadata::{ use jsonrpsee::client_transport::ws::Uri; use serde::{Deserialize, Serialize}; use std::collections::HashMap; +use subxt_codegen::utils::MetadataVersion; use subxt_metadata::{get_metadata_hash, get_pallet_hash, metadata_v14_to_latest}; /// Verify metadata compatibility between substrate nodes. @@ -25,16 +26,35 @@ pub struct Opts { /// The validation will omit the full metadata check and focus instead on the pallet. #[clap(long, value_parser)] pallet: Option, + /// Specify the metadata version. + /// + /// - unstable: + /// + /// Use the latest unstable metadata of the node. + /// + /// - number + /// + /// Use this specific metadata version. + /// + /// Defaults to latest. + #[clap(long = "version", default_value = "latest")] + version: MetadataVersion, } pub async fn run(opts: Opts) -> color_eyre::Result<()> { match opts.pallet { - Some(pallet) => handle_pallet_metadata(opts.nodes.as_slice(), pallet.as_str()).await, - None => handle_full_metadata(opts.nodes.as_slice()).await, + Some(pallet) => { + handle_pallet_metadata(opts.nodes.as_slice(), pallet.as_str(), opts.version).await + } + None => handle_full_metadata(opts.nodes.as_slice(), opts.version).await, } } -async fn handle_pallet_metadata(nodes: &[Uri], name: &str) -> color_eyre::Result<()> { +async fn handle_pallet_metadata( + nodes: &[Uri], + name: &str, + version: MetadataVersion, +) -> color_eyre::Result<()> { #[derive(Serialize, Deserialize, Default)] #[serde(rename_all = "camelCase")] struct CompatibilityPallet { @@ -44,7 +64,7 @@ async fn handle_pallet_metadata(nodes: &[Uri], name: &str) -> color_eyre::Result let mut compatibility: CompatibilityPallet = Default::default(); for node in nodes.iter() { - let metadata = fetch_runtime_metadata(node).await?; + let metadata = fetch_runtime_metadata(node, version).await?; match metadata.pallets.iter().find(|pallet| pallet.name == name) { Some(pallet_metadata) => { @@ -73,10 +93,10 @@ async fn handle_pallet_metadata(nodes: &[Uri], name: &str) -> color_eyre::Result Ok(()) } -async fn handle_full_metadata(nodes: &[Uri]) -> color_eyre::Result<()> { +async fn handle_full_metadata(nodes: &[Uri], version: MetadataVersion) -> color_eyre::Result<()> { let mut compatibility_map: HashMap> = HashMap::new(); for node in nodes.iter() { - let metadata = fetch_runtime_metadata(node).await?; + let metadata = fetch_runtime_metadata(node, version).await?; let hash = get_metadata_hash(&metadata); let hex_hash = hex::encode(hash); println!("Node {node:?} has metadata hash {hex_hash:?}",); @@ -96,8 +116,11 @@ async fn handle_full_metadata(nodes: &[Uri]) -> color_eyre::Result<()> { Ok(()) } -async fn fetch_runtime_metadata(url: &Uri) -> color_eyre::Result { - let bytes = subxt_codegen::utils::fetch_metadata_bytes(url).await?; +async fn fetch_runtime_metadata( + url: &Uri, + version: MetadataVersion, +) -> color_eyre::Result { + let bytes = subxt_codegen::utils::fetch_metadata_bytes(url, version).await?; let metadata = ::decode(&mut &bytes[..])?; if metadata.0 != META_RESERVED { diff --git a/cli/src/utils.rs b/cli/src/utils.rs index c5af8c9cd8..9a8b6edf82 100644 --- a/cli/src/utils.rs +++ b/cli/src/utils.rs @@ -5,7 +5,7 @@ use clap::Args; use color_eyre::eyre; use std::{fs, io::Read, path::PathBuf}; -use subxt_codegen::utils::Uri; +use subxt_codegen::utils::{MetadataVersion, Uri}; /// The source of the metadata. #[derive(Debug, Args)] @@ -16,29 +16,57 @@ pub struct FileOrUrl { /// The path to the encoded metadata file. #[clap(long, value_parser)] file: Option, + /// Specify the metadata version. + /// + /// - unstable: + /// + /// Use the latest unstable metadata of the node. + /// + /// - number + /// + /// Use this specific metadata version. + /// + /// Defaults to 14. + #[clap(long)] + version: Option, } impl FileOrUrl { /// Fetch the metadata bytes. pub async fn fetch(&self) -> color_eyre::Result> { - match (&self.file, &self.url) { + match (&self.file, &self.url, self.version) { // Can't provide both --file and --url - (Some(_), Some(_)) => { + (Some(_), Some(_), _) => { eyre::bail!("specify one of `--url` or `--file` but not both") } // Load from --file path - (Some(path), None) => { + (Some(path), None, None) => { let mut file = fs::File::open(path)?; let mut bytes = Vec::new(); file.read_to_end(&mut bytes)?; Ok(bytes) } + // Cannot load the metadata from the file and specify a version to fetch. + (Some(_), None, Some(_)) => { + // Note: we could provide the ability to convert between metadata versions + // but that would be involved because we'd need to convert + // from each metadata to the latest one and from the + // latest one to each metadata version. For now, disable the conversion. + eyre::bail!("`--file` is incompatible with `--version`") + } // Fetch from --url - (None, Some(uri)) => Ok(subxt_codegen::utils::fetch_metadata_bytes(uri).await?), + (None, Some(uri), version) => Ok(subxt_codegen::utils::fetch_metadata_bytes( + uri, + version.unwrap_or_default(), + ) + .await?), // Default if neither is provided; fetch from local url - (None, None) => { + (None, None, version) => { let uri = Uri::from_static("http://localhost:9933"); - Ok(subxt_codegen::utils::fetch_metadata_bytes(&uri).await?) + Ok( + subxt_codegen::utils::fetch_metadata_bytes(&uri, version.unwrap_or_default()) + .await?, + ) } } } diff --git a/codegen/src/api/calls.rs b/codegen/src/api/calls.rs index 37fe1e0e66..4df5ca637c 100644 --- a/codegen/src/api/calls.rs +++ b/codegen/src/api/calls.rs @@ -90,11 +90,11 @@ pub fn generate_calls( pub fn #fn_name( &self, #( #call_fn_args, )* - ) -> #crate_path::tx::Payload<#struct_name> { + ) -> #crate_path::tx::Payload { #crate_path::tx::Payload::new_static( #pallet_name, #call_name, - #struct_name { #( #call_args, )* }, + types::#struct_name { #( #call_args, )* }, [#(#call_hash,)*] ) } @@ -120,7 +120,11 @@ pub fn generate_calls( type DispatchError = #types_mod_ident::sp_runtime::DispatchError; - #( #call_structs )* + pub mod types { + use super::#types_mod_ident; + + #( #call_structs )* + } pub struct TransactionApi; diff --git a/codegen/src/api/mod.rs b/codegen/src/api/mod.rs index 85d6e6bf00..8f112b088f 100644 --- a/codegen/src/api/mod.rs +++ b/codegen/src/api/mod.rs @@ -8,6 +8,7 @@ mod calls; mod constants; mod errors; mod events; +mod runtime_apis; mod storage; use frame_metadata::v15::RuntimeMetadataV15; @@ -18,7 +19,7 @@ use crate::error::CodegenError; use crate::{ ir, types::{CompositeDef, CompositeDefFields, TypeGenerator, TypeSubstitutes}, - utils::{fetch_metadata_bytes_blocking, Uri}, + utils::{fetch_metadata_bytes_blocking, MetadataVersion, Uri}, CratePath, }; use codec::Decode; @@ -95,7 +96,11 @@ pub fn generate_runtime_api_from_url( should_gen_docs: bool, runtime_types_only: bool, ) -> Result { - let bytes = fetch_metadata_bytes_blocking(url)?; + // Fetch latest unstable version, if that fails fall back to the latest stable. + let bytes = match fetch_metadata_bytes_blocking(url, MetadataVersion::Unstable) { + Ok(bytes) => bytes, + Err(_) => fetch_metadata_bytes_blocking(url, MetadataVersion::Latest)?, + }; generate_runtime_api_from_bytes( item_mod, @@ -434,6 +439,14 @@ impl RuntimeGenerator { let rust_items = item_mod_ir.rust_items(); + let apis_mod = runtime_apis::generate_runtime_apis( + &self.metadata, + &type_gen, + types_mod_ident, + &crate_path, + should_gen_docs, + )?; + Ok(quote! { #( #item_mod_attrs )* #[allow(dead_code, unused_imports, non_camel_case_types)] @@ -487,6 +500,12 @@ impl RuntimeGenerator { TransactionApi } + pub fn apis() -> runtime_apis::RuntimeApi { + runtime_apis::RuntimeApi + } + + #apis_mod + pub struct ConstantsApi; impl ConstantsApi { #( diff --git a/codegen/src/api/runtime_apis.rs b/codegen/src/api/runtime_apis.rs new file mode 100644 index 0000000000..3b96ad4397 --- /dev/null +++ b/codegen/src/api/runtime_apis.rs @@ -0,0 +1,168 @@ +// Copyright 2019-2023 Parity Technologies (UK) Ltd. +// This file is dual-licensed as Apache-2.0 or GPL-3.0. +// see LICENSE for license details. + +use crate::{types::TypeGenerator, CodegenError, CratePath}; +use frame_metadata::v15::{RuntimeApiMetadata, RuntimeMetadataV15}; +use heck::ToSnakeCase as _; +use heck::ToUpperCamelCase as _; + +use proc_macro2::TokenStream as TokenStream2; +use quote::{format_ident, quote}; +use scale_info::form::PortableForm; + +/// Generates runtime functions for the given API metadata. +fn generate_runtime_api( + metadata: &RuntimeMetadataV15, + api: &RuntimeApiMetadata, + type_gen: &TypeGenerator, + types_mod_ident: &syn::Ident, + crate_path: &CratePath, + should_gen_docs: bool, +) -> Result<(TokenStream2, TokenStream2), CodegenError> { + // Trait name must remain as is (upper case) to identity the runtime call. + let trait_name = &api.name; + // The snake case for the trait name. + let trait_name_snake = format_ident!("{}", api.name.to_snake_case()); + let docs = &api.docs; + let docs: TokenStream2 = should_gen_docs + .then_some(quote! { #( #[doc = #docs ] )* }) + .unwrap_or_default(); + + let structs_and_methods: Vec<_> = api.methods.iter().map(|method| { + let method_name = format_ident!("{}", method.name); + + // Runtime function name is `TraitName_MethodName`. + let runtime_fn_name = format!("{}_{}", trait_name, method_name); + let docs = &method.docs; + let docs: TokenStream2 = should_gen_docs + .then_some(quote! { #( #[doc = #docs ] )* }) + .unwrap_or_default(); + + let inputs: Vec<_> = method.inputs.iter().map(|input| { + let name = format_ident!("{}", &input.name); + let ty = type_gen.resolve_type_path(input.ty.id); + + let param = quote!(#name: #ty); + (param, name) + }).collect(); + + let params = inputs.iter().map(|(param, _)| param); + let param_names = inputs.iter().map(|(_, name)| name); + + // From the method metadata generate a structure that holds + // all parameter types. This structure is used with metadata + // to encode parameters to the call via `encode_as_fields_to`. + let derives = type_gen.default_derives(); + let struct_name = format_ident!("{}", method.name.to_upper_camel_case()); + let struct_params = params.clone(); + let struct_input = quote!( + #derives + pub struct #struct_name { + #( pub #struct_params, )* + } + ); + + let output = type_gen.resolve_type_path(method.output.id); + + let Ok(call_hash) = + subxt_metadata::get_runtime_api_hash(metadata, trait_name, &method.name) else { + return Err(CodegenError::MissingRuntimeApiMetadata( + trait_name.into(), + method.name.clone(), + )) + }; + + let method = quote!( + #docs + pub fn #method_name(&self, #( #params, )* ) -> #crate_path::runtime_api::Payload { + #crate_path::runtime_api::Payload::new_static( + #runtime_fn_name, + types::#struct_name { #( #param_names, )* }, + [#(#call_hash,)*], + ) + } + ); + + Ok((struct_input, method)) + }).collect::>()?; + + let trait_name = format_ident!("{}", trait_name); + + let structs = structs_and_methods.iter().map(|(struct_, _)| struct_); + let methods = structs_and_methods.iter().map(|(_, method)| method); + + let runtime_api = quote!( + pub mod #trait_name_snake { + use super::root_mod; + use super::#types_mod_ident; + + #docs + pub struct #trait_name; + + impl #trait_name { + #( #methods )* + } + + pub mod types { + use super::#types_mod_ident; + + #( #structs )* + } + } + ); + + // A getter for the `RuntimeApi` to get the trait structure. + let trait_getter = quote!( + pub fn #trait_name_snake(&self) -> #trait_name_snake::#trait_name { + #trait_name_snake::#trait_name + } + ); + + Ok((runtime_api, trait_getter)) +} + +/// Generate the runtime APIs. +pub fn generate_runtime_apis( + metadata: &RuntimeMetadataV15, + type_gen: &TypeGenerator, + types_mod_ident: &syn::Ident, + crate_path: &CratePath, + should_gen_docs: bool, +) -> Result { + let apis = &metadata.apis; + + let runtime_fns: Vec<_> = apis + .iter() + .map(|api| { + generate_runtime_api( + metadata, + api, + type_gen, + types_mod_ident, + crate_path, + should_gen_docs, + ) + }) + .collect::>()?; + + let runtime_apis_def = runtime_fns.iter().map(|(apis, _)| apis); + let runtime_apis_getters = runtime_fns.iter().map(|(_, getters)| getters); + + Ok(quote! { + pub mod runtime_apis { + use super::root_mod; + use super::#types_mod_ident; + + use #crate_path::ext::codec::Encode; + + pub struct RuntimeApi; + + impl RuntimeApi { + #( #runtime_apis_getters )* + } + + #( #runtime_apis_def )* + } + }) +} diff --git a/codegen/src/error.rs b/codegen/src/error.rs index 411225e34a..43bb88c612 100644 --- a/codegen/src/error.rs +++ b/codegen/src/error.rs @@ -42,6 +42,9 @@ pub enum CodegenError { /// Metadata for call could not be found. #[error("Metadata for call entry {0}_{1} could not be found. Make sure you are providing a valid substrate-based metadata")] MissingCallMetadata(String, String), + /// Metadata for call could not be found. + #[error("Metadata for runtime API entry {0}_{1} could not be found. Make sure you are providing a valid substrate-based metadata")] + MissingRuntimeApiMetadata(String, String), /// Call variant must have all named fields. #[error("Call variant for type {0} must have all named fields. Make sure you are providing a valid substrate-based metadata")] InvalidCallVariant(u32), @@ -77,10 +80,14 @@ impl CodegenError { pub enum FetchMetadataError { #[error("Cannot decode hex value: {0}")] DecodeError(#[from] hex::FromHexError), + #[error("Cannot scale encode/decode value: {0}")] + CodecError(#[from] codec::Error), #[error("Request error: {0}")] RequestError(#[from] jsonrpsee::core::Error), #[error("'{0}' not supported, supported URI schemes are http, https, ws or wss.")] InvalidScheme(String), + #[error("Other error: {0}")] + Other(String), } /// Error attempting to do type substitution. diff --git a/codegen/src/utils/fetch_metadata.rs b/codegen/src/utils/fetch_metadata.rs index c7bc489827..9d49e35ac4 100644 --- a/codegen/src/utils/fetch_metadata.rs +++ b/codegen/src/utils/fetch_metadata.rs @@ -3,6 +3,7 @@ // see LICENSE for license details. use crate::error::FetchMetadataError; +use codec::{Decode, Encode}; use jsonrpsee::{ async_client::ClientBuilder, client_transport::ws::{Uri, WsTransportClientBuilder}, @@ -12,14 +13,51 @@ use jsonrpsee::{ }; use std::time::Duration; +/// The metadata version that is fetched from the node. +#[derive(Default, Debug, Clone, Copy)] +pub enum MetadataVersion { + /// Latest stable version of the metadata. + #[default] + Latest, + /// Fetch a specified version of the metadata. + Version(u32), + /// Latest unstable version of the metadata. + Unstable, +} + +// Note: Implementation needed for the CLI tool. +impl std::str::FromStr for MetadataVersion { + type Err = String; + + fn from_str(input: &str) -> Result { + match input { + "unstable" => Ok(MetadataVersion::Unstable), + "latest" => Ok(MetadataVersion::Latest), + version => { + let num: u32 = version + .parse() + .map_err(|_| format!("Invalid metadata version specified {:?}", version))?; + + Ok(MetadataVersion::Version(num)) + } + } + } +} + /// Returns the metadata bytes from the provided URL, blocking the current thread. -pub fn fetch_metadata_bytes_blocking(url: &Uri) -> Result, FetchMetadataError> { - tokio_block_on(fetch_metadata_bytes(url)) +pub fn fetch_metadata_bytes_blocking( + url: &Uri, + version: MetadataVersion, +) -> Result, FetchMetadataError> { + tokio_block_on(fetch_metadata_bytes(url, version)) } /// Returns the raw, 0x prefixed metadata hex from the provided URL, blocking the current thread. -pub fn fetch_metadata_hex_blocking(url: &Uri) -> Result { - tokio_block_on(fetch_metadata_hex(url)) +pub fn fetch_metadata_hex_blocking( + url: &Uri, + version: MetadataVersion, +) -> Result { + tokio_block_on(fetch_metadata_hex(url, version)) } // Block on some tokio runtime for sync contexts @@ -32,26 +70,36 @@ fn tokio_block_on>(fut: Fut) -> T { } /// Returns the metadata bytes from the provided URL. -pub async fn fetch_metadata_bytes(url: &Uri) -> Result, FetchMetadataError> { - let hex = fetch_metadata_hex(url).await?; - let bytes = hex::decode(hex.trim_start_matches("0x"))?; - Ok(bytes) -} - -/// Returns the raw, 0x prefixed metadata hex from the provided URL. -pub async fn fetch_metadata_hex(url: &Uri) -> Result { - let hex_data = match url.scheme_str() { - Some("http") | Some("https") => fetch_metadata_http(url).await, - Some("ws") | Some("wss") => fetch_metadata_ws(url).await, +pub async fn fetch_metadata_bytes( + url: &Uri, + version: MetadataVersion, +) -> Result, FetchMetadataError> { + let bytes = match url.scheme_str() { + Some("http") | Some("https") => fetch_metadata_http(url, version).await, + Some("ws") | Some("wss") => fetch_metadata_ws(url, version).await, invalid_scheme => { let scheme = invalid_scheme.unwrap_or("no scheme"); Err(FetchMetadataError::InvalidScheme(scheme.to_owned())) } }?; + + Ok(bytes) +} + +/// Returns the raw, 0x prefixed metadata hex from the provided URL. +pub async fn fetch_metadata_hex( + url: &Uri, + version: MetadataVersion, +) -> Result { + let bytes = fetch_metadata_bytes(url, version).await?; + let hex_data = format!("0x{}", hex::encode(bytes)); Ok(hex_data) } -async fn fetch_metadata_ws(url: &Uri) -> Result { +async fn fetch_metadata_ws( + url: &Uri, + version: MetadataVersion, +) -> Result, FetchMetadataError> { let (sender, receiver) = WsTransportClientBuilder::default() .build(url.to_string().parse::().unwrap()) .await @@ -62,13 +110,124 @@ async fn fetch_metadata_ws(url: &Uri) -> Result { .max_notifs_per_subscription(4096) .build_with_tokio(sender, receiver); - Ok(client.request("state_getMetadata", rpc_params![]).await?) + fetch_metadata(client, version).await } -async fn fetch_metadata_http(url: &Uri) -> Result { +async fn fetch_metadata_http( + url: &Uri, + version: MetadataVersion, +) -> Result, FetchMetadataError> { let client = HttpClientBuilder::default() .request_timeout(Duration::from_secs(180)) .build(url.to_string())?; - Ok(client.request("state_getMetadata", rpc_params![]).await?) + fetch_metadata(client, version).await +} + +/// The innermost call to fetch metadata: +async fn fetch_metadata( + client: impl ClientT, + version: MetadataVersion, +) -> Result, FetchMetadataError> { + const UNSTABLE_METADATA_VERSION: u32 = u32::MAX; + + // Fetch metadata using the "new" state_call interface + async fn fetch_inner( + client: &impl ClientT, + version: MetadataVersion, + ) -> Result, FetchMetadataError> { + // Look up supported versions: + let supported_versions: Vec = { + let res: String = client + .request( + "state_call", + rpc_params!["Metadata_metadata_versions", "0x"], + ) + .await?; + let raw_bytes = hex::decode(res.trim_start_matches("0x"))?; + Decode::decode(&mut &raw_bytes[..])? + }; + + // Return the version the user wants if it's supported: + let version = match version { + MetadataVersion::Latest => *supported_versions + .iter() + .filter(|&&v| v != UNSTABLE_METADATA_VERSION) + .max() + .ok_or_else(|| { + FetchMetadataError::Other("No valid metadata versions returned".to_string()) + })?, + MetadataVersion::Unstable => { + if supported_versions.contains(&UNSTABLE_METADATA_VERSION) { + UNSTABLE_METADATA_VERSION + } else { + return Err(FetchMetadataError::Other( + "The node does not have an unstable metadata version available".to_string(), + )); + } + } + MetadataVersion::Version(version) => { + if supported_versions.contains(&version) { + version + } else { + return Err(FetchMetadataError::Other(format!( + "The node does not have version {version} available" + ))); + } + } + }; + + let bytes = version.encode(); + let version: String = format!("0x{}", hex::encode(&bytes)); + + // Fetch the metadata at that version: + let metadata_string: String = client + .request( + "state_call", + rpc_params!["Metadata_metadata_at_version", &version], + ) + .await?; + // Decode the metadata. + let metadata_bytes = hex::decode(metadata_string.trim_start_matches("0x"))?; + let metadata: Option = + Decode::decode(&mut &metadata_bytes[..])?; + let Some(metadata) = metadata else { + return Err(FetchMetadataError::Other(format!( + "The node does not have version {version} available" + ))); + }; + Ok(metadata.0) + } + + // Fetch metadata using the "old" state_call interface + async fn fetch_inner_legacy( + client: &impl ClientT, + version: MetadataVersion, + ) -> Result, FetchMetadataError> { + if !matches!( + version, + MetadataVersion::Latest | MetadataVersion::Version(14) + ) { + return Err(FetchMetadataError::Other( + "The node can only return version 14 metadata but you've asked for something else" + .to_string(), + )); + } + + // Fetch the metadata at that version: + let metadata_string: String = client + .request("state_call", rpc_params!["Metadata_metadata", "0x"]) + .await?; + + // Decode the metadata. + let metadata_bytes = hex::decode(metadata_string.trim_start_matches("0x"))?; + let metadata: frame_metadata::OpaqueMetadata = Decode::decode(&mut &metadata_bytes[..])?; + Ok(metadata.0) + } + + // Fetch using the new interface, falling back to trying old one if there's an error. + match fetch_inner(&client, version).await { + Ok(s) => Ok(s), + Err(_) => fetch_inner_legacy(&client, version).await, + } } diff --git a/codegen/src/utils/mod.rs b/codegen/src/utils/mod.rs index 5c27200310..3f0e77f71e 100644 --- a/codegen/src/utils/mod.rs +++ b/codegen/src/utils/mod.rs @@ -11,5 +11,5 @@ pub use jsonrpsee::client_transport::ws::Uri; pub use fetch_metadata::{ fetch_metadata_bytes, fetch_metadata_bytes_blocking, fetch_metadata_hex, - fetch_metadata_hex_blocking, + fetch_metadata_hex_blocking, MetadataVersion, }; diff --git a/examples/examples/runtime_calls.rs b/examples/examples/runtime_calls.rs new file mode 100644 index 0000000000..f2d52766fd --- /dev/null +++ b/examples/examples/runtime_calls.rs @@ -0,0 +1,88 @@ +// Copyright 2019-2023 Parity Technologies (UK) Ltd. +// This file is dual-licensed as Apache-2.0 or GPL-3.0. +// see LICENSE for license details. + +//! To run this example, a local polkadot node should be running. Example verified against polkadot v0.9.28-9ffe6e9e3da. +//! +//! E.g. +//! ```bash +//! curl "https://github.com/paritytech/polkadot/releases/download/v0.9.28/polkadot" --output /usr/local/bin/polkadot --location +//! polkadot --dev --tmp +//! ``` + +use sp_keyring::AccountKeyring; +use subxt::dynamic::Value; +use subxt::{config::PolkadotConfig, OnlineClient}; + +#[subxt::subxt(runtime_metadata_path = "../artifacts/polkadot_metadata.scale")] +pub mod polkadot {} + +#[tokio::main] +async fn main() -> Result<(), Box> { + tracing_subscriber::fmt::init(); + + // Create a client to use: + let api = OnlineClient::::new().await?; + + // In the first part of the example calls are made using the static generated code + // and as a result the returned values are strongly typed. + + // Create a runtime API payload that calls into + // `Core_version` function. + let runtime_api_call = polkadot::apis().core().version(); + + // Submit the runtime API call. + let version = api + .runtime_api() + .at_latest() + .await? + .call(runtime_api_call) + .await; + println!("Core_version: {:?}", version); + + // Show the supported metadata versions of the node. + // Calls into `Metadata_metadata_versions` runtime function. + let runtime_api_call = polkadot::apis().metadata().metadata_versions(); + + // Submit the runtime API call. + let versions = api + .runtime_api() + .at_latest() + .await? + .call(runtime_api_call) + .await?; + println!("Metadata_metadata_versions: {:?}", versions); + + // Create a runtime API payload that calls into + // `AccountNonceApi_account_nonce` function. + let account = AccountKeyring::Alice.to_account_id().into(); + let runtime_api_call = polkadot::apis().account_nonce_api().account_nonce(account); + + // Submit the runtime API call. + let nonce = api + .runtime_api() + .at_latest() + .await? + .call(runtime_api_call) + .await; + println!("AccountNonceApi_account_nonce for Alice: {:?}", nonce); + + // Dynamic calls. + let runtime_api_call = subxt::dynamic::runtime_api_call( + "Metadata_metadata_versions", + Vec::>::new(), + None, + ); + let versions = api + .runtime_api() + .at_latest() + .await? + .call(runtime_api_call) + .await?; + println!( + " dynamic Metadata_metadata_versions: {:#?}", + versions.to_value() + ); + + Ok(()) +} diff --git a/metadata/src/lib.rs b/metadata/src/lib.rs index af042f8581..702da037ee 100644 --- a/metadata/src/lib.rs +++ b/metadata/src/lib.rs @@ -10,7 +10,7 @@ use frame_metadata::{v14::RuntimeMetadataV14, v15::RuntimeMetadataV15}; pub use retain::retain_metadata_pallets; pub use validation::{ get_call_hash, get_constant_hash, get_metadata_hash, get_metadata_per_pallet_hash, - get_pallet_hash, get_storage_hash, NotFound, + get_pallet_hash, get_runtime_api_hash, get_runtime_trait_hash, get_storage_hash, NotFound, }; /// Convert the metadata V14 to the latest metadata version. diff --git a/metadata/src/retain.rs b/metadata/src/retain.rs index e0550643c3..c17d71c140 100644 --- a/metadata/src/retain.rs +++ b/metadata/src/retain.rs @@ -5,7 +5,7 @@ //! Utility functions to generate a subset of the metadata. use frame_metadata::v15::{ - ExtrinsicMetadata, PalletMetadata, RuntimeMetadataV15, StorageEntryType, + ExtrinsicMetadata, PalletMetadata, RuntimeApiMetadata, RuntimeMetadataV15, StorageEntryType, }; use scale_info::{form::PortableForm, interner::UntrackedSymbol, TypeDef}; use std::{ @@ -105,6 +105,36 @@ fn update_extrinsic_types( } } +/// Collect all type IDs needed to represent the runtime APIs. +fn collect_runtime_api_types( + apis: &[RuntimeApiMetadata], + type_ids: &mut HashSet, +) { + for api in apis { + for method in &api.methods { + for input in &method.inputs { + type_ids.insert(input.ty.id); + } + type_ids.insert(method.output.id); + } + } +} + +/// Update all type IDs of the provided runtime APIs metadata using the new type IDs from the portable registry. +fn update_runtime_api_types( + apis: &mut [RuntimeApiMetadata], + map_ids: &BTreeMap, +) { + for api in apis { + for method in &mut api.methods { + for input in &mut method.inputs { + update_type(&mut input.ty, map_ids); + } + update_type(&mut method.output, map_ids); + } + } +} + /// Update the given type using the new type ID from the portable registry. /// /// # Panics @@ -191,6 +221,9 @@ where // Keep the "runtime" type ID, since it's referenced in our metadata. type_ids.insert(metadata.ty.id); + // Keep the runtime APIs types. + collect_runtime_api_types(&metadata.apis, &mut type_ids); + // Additionally, subxt depends on the `DispatchError` type existing; we use the same // logic here that is used when building our `Metadata`. let dispatch_error_ty = metadata @@ -211,6 +244,7 @@ where } update_extrinsic_types(&mut metadata.extrinsic, &map_ids); update_type(&mut metadata.ty, &map_ids); + update_runtime_api_types(&mut metadata.apis, &map_ids); } #[cfg(test)] diff --git a/metadata/src/validation.rs b/metadata/src/validation.rs index a325d69a4b..eb0f5c4a82 100644 --- a/metadata/src/validation.rs +++ b/metadata/src/validation.rs @@ -5,7 +5,8 @@ //! Utility functions for metadata validation. use frame_metadata::v15::{ - ExtrinsicMetadata, PalletMetadata, RuntimeMetadataV15, StorageEntryMetadata, StorageEntryType, + ExtrinsicMetadata, PalletMetadata, RuntimeApiMetadata, RuntimeApiMethodMetadata, + RuntimeMetadataV15, StorageEntryMetadata, StorageEntryType, }; use scale_info::{form::PortableForm, Field, PortableRegistry, TypeDef, Variant}; use std::collections::HashSet; @@ -253,7 +254,7 @@ pub fn get_storage_hash( .pallets .iter() .find(|p| p.name == pallet_name) - .ok_or(NotFound::Pallet)?; + .ok_or(NotFound::Root)?; let storage = pallet.storage.as_ref().ok_or(NotFound::Item)?; @@ -277,7 +278,7 @@ pub fn get_constant_hash( .pallets .iter() .find(|p| p.name == pallet_name) - .ok_or(NotFound::Pallet)?; + .ok_or(NotFound::Root)?; let constant = pallet .constants @@ -300,7 +301,7 @@ pub fn get_call_hash( .pallets .iter() .find(|p| p.name == pallet_name) - .ok_or(NotFound::Pallet)?; + .ok_or(NotFound::Root)?; let call_id = pallet.calls.as_ref().ok_or(NotFound::Item)?.ty.id; @@ -321,6 +322,96 @@ pub fn get_call_hash( Ok(hash) } +fn get_runtime_method_hash( + metadata: &RuntimeMetadataV15, + trait_metadata: &RuntimeApiMetadata, + method_metadata: &RuntimeApiMethodMetadata, + visited_ids: &mut HashSet, +) -> [u8; 32] { + // The trait name is part of the runtime API call that is being + // generated for this method. Therefore the trait name is strongly + // connected to the method in the same way as a parameter is + // to the method. + let mut bytes = hash(trait_metadata.name.as_bytes()); + bytes = xor(bytes, hash(method_metadata.name.as_bytes())); + + for input in &method_metadata.inputs { + bytes = xor(bytes, hash(input.name.as_bytes())); + bytes = xor( + bytes, + get_type_hash(&metadata.types, input.ty.id, visited_ids), + ); + } + + bytes = xor( + bytes, + get_type_hash(&metadata.types, method_metadata.output.id, visited_ids), + ); + + bytes +} + +/// Obtain the hash of a specific runtime trait. +pub fn get_runtime_trait_hash( + metadata: &RuntimeMetadataV15, + trait_metadata: &RuntimeApiMetadata, +) -> [u8; 32] { + // Start out with any hash, the trait name is already part of the + // runtime method hash. + let mut bytes = hash(trait_metadata.name.as_bytes()); + let mut visited_ids = HashSet::new(); + + let mut methods: Vec<_> = trait_metadata + .methods + .iter() + .map(|method_metadata| { + let bytes = get_runtime_method_hash( + metadata, + trait_metadata, + method_metadata, + &mut visited_ids, + ); + (&*method_metadata.name, bytes) + }) + .collect(); + + // Sort by method name to create a deterministic representation of the underlying metadata. + methods.sort_by_key(|&(name, _hash)| name); + + // Note: Hash already takes into account the method name. + for (_, hash) in methods { + bytes = xor(bytes, hash); + } + + bytes +} + +/// Obtain the hash of a specific runtime API function, or an error if it's not found. +pub fn get_runtime_api_hash( + metadata: &RuntimeMetadataV15, + trait_name: &str, + method_name: &str, +) -> Result<[u8; 32], NotFound> { + let trait_metadata = metadata + .apis + .iter() + .find(|m| m.name == trait_name) + .ok_or(NotFound::Root)?; + + let method_metadata = trait_metadata + .methods + .iter() + .find(|m| m.name == method_name) + .ok_or(NotFound::Item)?; + + Ok(get_runtime_method_hash( + metadata, + trait_metadata, + method_metadata, + &mut HashSet::new(), + )) +} + /// Obtain the hash representation of a `frame_metadata::v15::PalletMetadata`. pub fn get_pallet_hash( registry: &PortableRegistry, @@ -404,6 +495,19 @@ pub fn get_metadata_hash(metadata: &RuntimeMetadataV15) -> [u8; 32] { &mut visited_ids, )); + let mut apis: Vec<_> = metadata + .apis + .iter() + .map(|api| (&*api.name, get_runtime_trait_hash(metadata, api))) + .collect(); + + // Sort the runtime APIs by trait name to provide a deterministic output. + apis.sort_by_key(|&(name, _hash)| name); + + for (_, hash) in apis.iter() { + bytes.extend(hash) + } + hash(&bytes) } @@ -449,11 +553,24 @@ pub fn get_metadata_per_pallet_hash>( hash(&bytes) } -/// An error returned if we attempt to get the hash for a specific call, constant -/// or storage item that doesn't exist. +/// An error returned if we attempt to get the hash for a specific call, constant, +/// storage or runtime API function does not exist. +/// +/// The location of the specific item (call, constant, storage or runtime API function) +/// is stored with two indirections: +/// - Root +/// The root location of the item. For calls, constants, storage this represents the +/// pallet name. While for runtime API function this represents the trait name. +/// - Item +/// The actual item. For calls, constants, storage this represents the actual name. +/// While for runtime API functions this represents the method name. #[derive(Clone, Debug)] pub enum NotFound { - Pallet, + /// The root location of the item cannot be found. + /// - pallet name: for calls, constants, storage + /// - trait name: for runtime API functions + Root, + /// The actual item name cannot be found. Item, } diff --git a/subxt/Cargo.toml b/subxt/Cargo.toml index c9dc8061ed..1a0ebc7977 100644 --- a/subxt/Cargo.toml +++ b/subxt/Cargo.toml @@ -34,6 +34,12 @@ integration-tests = [] jsonrpsee-ws = ["jsonrpsee/async-client", "jsonrpsee/client-ws-transport"] jsonrpsee-web = ["jsonrpsee/async-wasm-client", "jsonrpsee/client-web-transport"] +# Activate this to fetch and utilize the latest unstabl metadata from a node. +# The unstable metadata is subject to breaking changes and the subxt might +# fail to decode the metadata properly. Use this to experiment with the +# latest features exposed by the metadata. +unstable-metadata = [] + [dependencies] codec = { package = "parity-scale-codec", workspace = true, features = ["derive"] } scale-info = { workspace = true } diff --git a/subxt/src/client/online_client.rs b/subxt/src/client/online_client.rs index 703777f26a..44f68635fc 100644 --- a/subxt/src/client/online_client.rs +++ b/subxt/src/client/online_client.rs @@ -17,9 +17,7 @@ use crate::{ tx::TxClient, Config, Metadata, }; -use codec::Compact; use derivative::Derivative; -use frame_metadata::RuntimeMetadataPrefixed; use futures::future; use parking_lot::RwLock; use std::sync::Arc; @@ -136,10 +134,19 @@ impl OnlineClient { /// Fetch the metadata from substrate using the runtime API. async fn fetch_metadata(rpc: &Rpc) -> Result { - let (_, meta) = rpc - .state_call::<(Compact, RuntimeMetadataPrefixed)>("Metadata_metadata", None, None) - .await?; - Ok(meta.try_into()?) + #[cfg(feature = "unstable-metadata")] + { + // Try to fetch the latest unstable metadata, if that fails fall back to + // fetching the latest stable metadata. + const V15_METADATA_VERSION: u32 = u32::MAX; + match rpc.metadata_at_version(V15_METADATA_VERSION).await { + Ok(bytes) => Ok(bytes), + Err(_) => rpc.metadata().await, + } + } + + #[cfg(not(feature = "unstable-metadata"))] + rpc.metadata().await } /// Create an object which can be used to keep the runtime up to date @@ -383,7 +390,7 @@ impl RuntimeUpdaterStream { Err(err) => return Some(Err(err)), }; - let metadata = match self.client.rpc().metadata(None).await { + let metadata = match self.client.rpc().metadata().await { Ok(metadata) => metadata, Err(err) => return Some(Err(err)), }; diff --git a/subxt/src/dynamic.rs b/subxt/src/dynamic.rs index a16611b6f4..df65cffb13 100644 --- a/subxt/src/dynamic.rs +++ b/subxt/src/dynamic.rs @@ -28,6 +28,9 @@ pub use crate::constants::dynamic as constant; // Lookup storage values dynamically. pub use crate::storage::{dynamic as storage, dynamic_root as storage_root}; +// Execute runtime API function call dynamically. +pub use crate::runtime_api::dynamic as runtime_api_call; + /// This is the result of making a dynamic request to a node. From this, /// we can return the raw SCALE bytes that we were handed back, or we can /// complete the decoding of the bytes into a [`DecodedValue`] type. diff --git a/subxt/src/events/events_type.rs b/subxt/src/events/events_type.rs index 4fcec55cb7..1de8b31917 100644 --- a/subxt/src/events/events_type.rs +++ b/subxt/src/events/events_type.rs @@ -76,7 +76,7 @@ impl Events { /// .await? /// .expect("didn't pass a block number; qed"); /// // Fetch the metadata of the given block. - /// let metadata = client.rpc().metadata(Some(block_hash)).await?; + /// let metadata = client.rpc().metadata_legacy(Some(block_hash)).await?; /// // Fetch the events from the client. /// let events = Events::new_from_client(metadata, block_hash, client); /// # Ok(()) diff --git a/subxt/src/metadata/hash_cache.rs b/subxt/src/metadata/hash_cache.rs index 428a934543..0ece71c788 100644 --- a/subxt/src/metadata/hash_cache.rs +++ b/subxt/src/metadata/hash_cache.rs @@ -5,23 +5,23 @@ use parking_lot::RwLock; use std::{borrow::Cow, collections::HashMap}; -/// A cache with the simple goal of storing 32 byte hashes against pallet+item keys +/// A cache with the simple goal of storing 32 byte hashes against root+item keys #[derive(Default, Debug)] pub struct HashCache { - inner: RwLock, [u8; 32]>>, + inner: RwLock, [u8; 32]>>, } impl HashCache { - /// get a hash out of the cache by its pallet and item key. If the item doesn't exist, + /// get a hash out of the cache by its root and item key. If the item doesn't exist, /// run the function provided to obtain a hash to insert (or bail with some error on failure). - pub fn get_or_insert(&self, pallet: &str, item: &str, f: F) -> Result<[u8; 32], E> + pub fn get_or_insert(&self, root: &str, item: &str, f: F) -> Result<[u8; 32], E> where F: FnOnce() -> Result<[u8; 32], E>, { let maybe_hash = self .inner .read() - .get(&PalletItemKey::new(pallet, item)) + .get(&RootItemKey::new(root, item)) .copied(); if let Some(hash) = maybe_hash { @@ -29,10 +29,9 @@ impl HashCache { } let hash = f()?; - self.inner.write().insert( - PalletItemKey::new(pallet.to_string(), item.to_string()), - hash, - ); + self.inner + .write() + .insert(RootItemKey::new(root.to_string(), item.to_string()), hash); Ok(hash) } @@ -41,14 +40,14 @@ impl HashCache { /// This exists so that we can look items up in the cache using &strs, without having to allocate /// Strings first (as you'd have to do to construct something like an `&(String,String)` key). #[derive(Debug, PartialEq, Eq, Hash)] -struct PalletItemKey<'a> { +struct RootItemKey<'a> { pallet: Cow<'a, str>, item: Cow<'a, str>, } -impl<'a> PalletItemKey<'a> { +impl<'a> RootItemKey<'a> { fn new(pallet: impl Into>, item: impl Into>) -> Self { - PalletItemKey { + RootItemKey { pallet: pallet.into(), item: item.into(), } @@ -75,7 +74,7 @@ mod tests { cache .inner .read() - .get(&PalletItemKey::new(pallet, item)) + .get(&RootItemKey::new(pallet, item)) .unwrap(), &value.unwrap() ); diff --git a/subxt/src/metadata/metadata_type.rs b/subxt/src/metadata/metadata_type.rs index 7a8966d3ea..cc400310b0 100644 --- a/subxt/src/metadata/metadata_type.rs +++ b/subxt/src/metadata/metadata_type.rs @@ -30,6 +30,9 @@ pub enum MetadataError { /// Event is not in metadata. #[error("Pallet {0}, Error {0} not found")] ErrorNotFound(u8, u8), + /// Runtime function is not in metadata. + #[error("Runtime function not found")] + RuntimeFnNotFound, /// Storage is not in metadata. #[error("Storage not found")] StorageNotFound, @@ -57,6 +60,9 @@ pub enum MetadataError { /// Runtime storage metadata is incompatible with the static one. #[error("Pallet {0} Storage {0} has incompatible metadata")] IncompatibleStorageMetadata(String, String), + /// Runtime API metadata is incompatible with the static one. + #[error("Runtime API Trait {0} Method {0} has incompatible metadata")] + IncompatibleRuntimeApiMetadata(String, String), /// Runtime metadata is not fully compatible with the static one. #[error("Node metadata is not fully compatible")] IncompatibleMetadata, @@ -79,6 +85,9 @@ struct MetadataInner { // an extrinsic fails. dispatch_error_ty: Option, + // Runtime API metadata + runtime_apis: HashMap, + // The hashes uniquely identify parts of the metadata; different // hashes mean some type difference exists between static and runtime // versions. We cache them here to avoid recalculating: @@ -86,6 +95,7 @@ struct MetadataInner { cached_call_hashes: HashCache, cached_constant_hashes: HashCache, cached_storage_hashes: HashCache, + cached_runtime_hashes: HashCache, } /// A representation of the runtime metadata received from a node. @@ -95,6 +105,14 @@ pub struct Metadata { } impl Metadata { + /// Returns a reference to [`RuntimeFnMetadata`]. + pub fn runtime_fn(&self, name: &str) -> Result<&RuntimeFnMetadata, MetadataError> { + self.inner + .runtime_apis + .get(name) + .ok_or(MetadataError::RuntimeFnNotFound) + } + /// Returns a reference to [`PalletMetadata`]. pub fn pallet(&self, name: &str) -> Result<&PalletMetadata, MetadataError> { self.inner @@ -158,7 +176,7 @@ impl Metadata { .get_or_insert(pallet, storage, || { subxt_metadata::get_storage_hash(&self.inner.metadata, pallet, storage).map_err( |e| match e { - subxt_metadata::NotFound::Pallet => MetadataError::PalletNotFound, + subxt_metadata::NotFound::Root => MetadataError::PalletNotFound, subxt_metadata::NotFound::Item => MetadataError::StorageNotFound, }, ) @@ -172,7 +190,7 @@ impl Metadata { .get_or_insert(pallet, constant, || { subxt_metadata::get_constant_hash(&self.inner.metadata, pallet, constant).map_err( |e| match e { - subxt_metadata::NotFound::Pallet => MetadataError::PalletNotFound, + subxt_metadata::NotFound::Root => MetadataError::PalletNotFound, subxt_metadata::NotFound::Item => MetadataError::ConstantNotFound, }, ) @@ -186,13 +204,27 @@ impl Metadata { .get_or_insert(pallet, function, || { subxt_metadata::get_call_hash(&self.inner.metadata, pallet, function).map_err(|e| { match e { - subxt_metadata::NotFound::Pallet => MetadataError::PalletNotFound, + subxt_metadata::NotFound::Root => MetadataError::PalletNotFound, subxt_metadata::NotFound::Item => MetadataError::CallNotFound, } }) }) } + /// Obtain the unique hash for a runtime API function. + pub fn runtime_api_hash( + &self, + trait_name: &str, + method_name: &str, + ) -> Result<[u8; 32], MetadataError> { + self.inner + .cached_runtime_hashes + .get_or_insert(trait_name, method_name, || { + subxt_metadata::get_runtime_api_hash(&self.inner.metadata, trait_name, method_name) + .map_err(|_| MetadataError::RuntimeFnNotFound) + }) + } + /// Obtain the unique hash for this metadata. pub fn metadata_hash>(&self, pallets: &[T]) -> [u8; 32] { if let Some(hash) = *self.inner.cached_metadata_hash.read() { @@ -206,6 +238,42 @@ impl Metadata { } } +/// Metadata for a specific runtime API function. +#[derive(Clone, Debug)] +pub struct RuntimeFnMetadata { + /// The trait name of the runtime function. + trait_name: String, + /// The method name of the runtime function. + method_name: String, + /// The parameter name and type IDs interpreted as `scale_info::Field` + /// for ease of decoding. + fields: Vec>, + /// The type ID of the return type. + return_id: u32, +} + +impl RuntimeFnMetadata { + /// Get the parameters as fields. + pub fn fields(&self) -> &[scale_info::Field] { + &self.fields + } + + /// Return the trait name of the runtime function. + pub fn trait_name(&self) -> &str { + &self.trait_name + } + + /// Return the method name of the runtime function. + pub fn method_name(&self) -> &str { + &self.method_name + } + + /// Get the type ID of the return type. + pub fn return_id(&self) -> u32 { + self.return_id + } +} + /// Metadata for a specific pallet. #[derive(Clone, Debug)] pub struct PalletMetadata { @@ -376,6 +444,49 @@ impl TryFrom for Metadata { _ => return Err(InvalidMetadataError::InvalidVersion), }; + let runtime_apis: HashMap = metadata + .apis + .iter() + .flat_map(|trait_metadata| { + let trait_name = &trait_metadata.name; + + trait_metadata + .methods + .iter() + .map(|method_metadata| { + // Function named used by substrate to identify the runtime call. + let fn_name = format!("{}_{}", trait_name, method_metadata.name); + + // Parameters mapped as `scale_info::Field` to allow dynamic decoding. + let fields: Vec<_> = method_metadata + .inputs + .iter() + .map(|input| { + let name = input.name.clone(); + let ty = input.ty.id; + scale_info::Field { + name: Some(name), + ty: ty.into(), + type_name: None, + docs: Default::default(), + } + }) + .collect(); + + let return_id = method_metadata.output.id; + let metadata = RuntimeFnMetadata { + fields, + return_id, + trait_name: trait_name.clone(), + method_name: method_metadata.name.clone(), + }; + + (fn_name, metadata) + }) + .collect::>() + }) + .collect(); + let get_type_def_variant = |type_id: u32| { let ty = metadata .types @@ -492,10 +603,12 @@ impl TryFrom for Metadata { events, errors, dispatch_error_ty, + runtime_apis, cached_metadata_hash: Default::default(), cached_call_hashes: Default::default(), cached_constant_hashes: Default::default(), cached_storage_hashes: Default::default(), + cached_runtime_hashes: Default::default(), }), }) } diff --git a/subxt/src/rpc/rpc.rs b/subxt/src/rpc/rpc.rs index b21b9d4311..f4914eea69 100644 --- a/subxt/src/rpc/rpc.rs +++ b/subxt/src/rpc/rpc.rs @@ -143,8 +143,8 @@ impl Rpc { genesis_hash.ok_or_else(|| "Genesis hash not found".into()) } - /// Fetch the metadata - pub async fn metadata(&self, at: Option) -> Result { + /// Fetch the metadata via the legacy `state_getMetadata` RPC method. + pub async fn metadata_legacy(&self, at: Option) -> Result { let bytes: types::Bytes = self .client .request("state_getMetadata", rpc_params![at]) @@ -347,13 +347,13 @@ impl Rpc { Ok(xt_hash) } - /// Execute a runtime API call. - pub async fn state_call( + /// Execute a runtime API call via `state_call` RPC method. + pub async fn state_call_raw( &self, function: &str, call_parameters: Option<&[u8]>, at: Option, - ) -> Result { + ) -> Result { let call_parameters = call_parameters.unwrap_or_default(); let bytes: types::Bytes = self .client @@ -362,11 +362,54 @@ impl Rpc { rpc_params![function, to_hex(call_parameters), at], ) .await?; + Ok(bytes) + } + + /// Execute a runtime API call and decode the result. + pub async fn state_call( + &self, + function: &str, + call_parameters: Option<&[u8]>, + at: Option, + ) -> Result { + let bytes = self.state_call_raw(function, call_parameters, at).await?; let cursor = &mut &bytes[..]; let res: Res = Decode::decode(cursor)?; Ok(res) } + /// Execute runtime API call and return the specified runtime metadata version. + pub async fn metadata_at_version(&self, version: u32) -> Result { + let param = version.encode(); + let opaque: Option = self + .state_call("Metadata_metadata_at_version", Some(¶m), None) + .await?; + + let bytes = opaque.ok_or(Error::Other("Metadata version not found".into()))?; + + let meta: RuntimeMetadataPrefixed = Decode::decode(&mut &bytes.0[..])?; + + let metadata: Metadata = meta.try_into()?; + Ok(metadata) + } + + /// Execute a runtime API call into `Metadata_metadata` method + /// to fetch the latest available metadata. + /// + /// # Note + /// + /// This returns the same output as [`Self::metadata`], but calls directly + /// into the runtime. + pub async fn metadata(&self) -> Result { + let bytes: frame_metadata::OpaqueMetadata = + self.state_call("Metadata_metadata", None, None).await?; + + let meta: RuntimeMetadataPrefixed = Decode::decode(&mut &bytes.0[..])?; + + let metadata: Metadata = meta.try_into()?; + Ok(metadata) + } + /// Create and submit an extrinsic and return a subscription to the events triggered. pub async fn watch_extrinsic( &self, diff --git a/subxt/src/runtime_api/mod.rs b/subxt/src/runtime_api/mod.rs index c499d1e3a2..49a17a4dd7 100644 --- a/subxt/src/runtime_api/mod.rs +++ b/subxt/src/runtime_api/mod.rs @@ -5,7 +5,9 @@ //! Types associated with executing runtime API calls. mod runtime_client; +mod runtime_payload; mod runtime_types; pub use runtime_client::RuntimeApiClient; +pub use runtime_payload::{dynamic, DynamicRuntimeApiPayload, Payload, RuntimeApiPayload}; pub use runtime_types::RuntimeApi; diff --git a/subxt/src/runtime_api/runtime_payload.rs b/subxt/src/runtime_api/runtime_payload.rs new file mode 100644 index 0000000000..7636ea6a02 --- /dev/null +++ b/subxt/src/runtime_api/runtime_payload.rs @@ -0,0 +1,162 @@ +// Copyright 2019-2023 Parity Technologies (UK) Ltd. +// This file is dual-licensed as Apache-2.0 or GPL-3.0. +// see LICENSE for license details. + +use core::marker::PhantomData; +use scale_encode::EncodeAsFields; +use scale_value::Composite; +use std::borrow::Cow; + +use crate::dynamic::DecodedValueThunk; +use crate::{metadata::DecodeWithMetadata, Error, Metadata}; + +/// This represents a runtime API payload that can call into the runtime of node. +/// +/// # Components +/// +/// - associated return type +/// +/// Resulting bytes of the call are interpreted into this type. +/// +/// - runtime function name +/// +/// The function name of the runtime API call. This is obtained by concatenating +/// the runtime trait name with the trait's method. +/// +/// For example, the substrate runtime trait [Metadata](https://github.com/paritytech/substrate/blob/cb954820a8d8d765ce75021e244223a3b4d5722d/primitives/api/src/lib.rs#L745) +/// contains the `metadata_at_version` function. The corresponding runtime function +/// is `Metadata_metadata_at_version`. +/// +/// - encoded arguments +/// +/// Each argument of the runtime function must be scale-encoded. +pub trait RuntimeApiPayload { + /// The return type of the function call. + // Note: `DecodeWithMetadata` is needed to decode the function call result + // with the `subxt::Metadata. + type ReturnType: DecodeWithMetadata; + + /// The runtime API function name. + fn fn_name(&self) -> &str; + + /// Scale encode the arguments data. + fn encode_args_to(&self, metadata: &Metadata, out: &mut Vec) -> Result<(), Error>; + + /// Encode arguments data and return the output. This is a convenience + /// wrapper around [`RuntimeApiPayload::encode_args_to`]. + fn encode_args(&self, metadata: &Metadata) -> Result, Error> { + let mut v = Vec::new(); + self.encode_args_to(metadata, &mut v)?; + Ok(v) + } + + /// Returns the statically generated validation hash. + fn validation_hash(&self) -> Option<[u8; 32]> { + None + } +} + +/// A runtime API payload containing the generic argument data +/// and interpreting the result of the call as `ReturnTy`. +/// +/// This can be created from static values (ie those generated +/// via the `subxt` macro) or dynamic values via [`dynamic`]. +#[derive(Clone, Debug)] +pub struct Payload { + fn_name: Cow<'static, str>, + args_data: ArgsData, + validation_hash: Option<[u8; 32]>, + _marker: PhantomData, +} + +impl RuntimeApiPayload + for Payload +{ + type ReturnType = ReturnTy; + + fn fn_name(&self) -> &str { + &self.fn_name + } + + fn encode_args_to(&self, metadata: &Metadata, out: &mut Vec) -> Result<(), Error> { + let fn_metadata = metadata.runtime_fn(&self.fn_name)?; + + self.args_data + .encode_as_fields_to(fn_metadata.fields(), metadata.types(), out)?; + + Ok(()) + } + + fn validation_hash(&self) -> Option<[u8; 32]> { + self.validation_hash + } +} + +/// A dynamic runtime API payload. +pub type DynamicRuntimeApiPayload = Payload, DecodedValueThunk>; + +impl Payload { + /// Create a new [`Payload`]. + pub fn new( + fn_name: impl Into, + args_data: ArgsData, + validation_hash: Option<[u8; 32]>, + ) -> Self { + Payload { + fn_name: Cow::Owned(fn_name.into()), + args_data, + validation_hash, + _marker: PhantomData, + } + } + + /// Create a new static [`Payload`] using static function name + /// and scale-encoded argument data. + /// + /// This is only expected to be used from codegen. + #[doc(hidden)] + pub fn new_static( + fn_name: &'static str, + args_data: ArgsData, + hash: [u8; 32], + ) -> Payload { + Payload { + fn_name: Cow::Borrowed(fn_name), + args_data, + validation_hash: Some(hash), + _marker: std::marker::PhantomData, + } + } + + /// Do not validate this call prior to submitting it. + pub fn unvalidated(self) -> Self { + Self { + validation_hash: None, + ..self + } + } + + /// Returns the function name. + pub fn fn_name(&self) -> &str { + &self.fn_name + } + + /// Returns the arguments data. + pub fn args_data(&self) -> &ArgsData { + &self.args_data + } +} + +/// Create a new [`DynamicRuntimeApiPayload`]. +pub fn dynamic( + fn_name: impl Into, + args_data: impl Into>, + hash: Option<[u8; 32]>, +) -> DynamicRuntimeApiPayload { + DynamicRuntimeApiPayload { + fn_name: Cow::Owned(fn_name.into()), + args_data: args_data.into(), + validation_hash: hash, + _marker: std::marker::PhantomData, + } +} diff --git a/subxt/src/runtime_api/runtime_types.rs b/subxt/src/runtime_api/runtime_types.rs index 7bcd3436b9..8f9fd5dd21 100644 --- a/subxt/src/runtime_api/runtime_types.rs +++ b/subxt/src/runtime_api/runtime_types.rs @@ -2,11 +2,13 @@ // This file is dual-licensed as Apache-2.0 or GPL-3.0. // see LICENSE for license details. -use crate::{client::OnlineClientT, error::Error, Config}; +use crate::{client::OnlineClientT, error::Error, metadata::DecodeWithMetadata, Config}; use codec::Decode; use derivative::Derivative; use std::{future::Future, marker::PhantomData}; +use super::RuntimeApiPayload; + /// Execute runtime API calls. #[derive(Derivative)] #[derivative(Clone(bound = "Client: Clone"))] @@ -50,4 +52,57 @@ where Ok(data) } } + + /// Execute a runtime API call. + pub fn call( + &self, + payload: Call, + ) -> impl Future> { + let client = self.client.clone(); + let block_hash = self.block_hash; + // Ensure that the returned future doesn't have a lifetime tied to api.runtime_api(), + // which is a temporary thing we'll be throwing away quickly: + async move { + let metadata = client.metadata(); + let function = payload.fn_name(); + + // Check if the function is present in the runtime metadata. + let fn_metadata = metadata.runtime_fn(function)?; + // Return type ID used for dynamic decoding. + let return_id = fn_metadata.return_id(); + + // Validate the runtime API payload hash against the compile hash from codegen. + if let Some(static_hash) = payload.validation_hash() { + let runtime_hash = metadata + .runtime_api_hash(fn_metadata.trait_name(), fn_metadata.method_name())?; + + if static_hash != runtime_hash { + return Err( + crate::metadata::MetadataError::IncompatibleRuntimeApiMetadata( + fn_metadata.trait_name().into(), + fn_metadata.method_name().into(), + ) + .into(), + ); + } + } + + // Encode the arguments of the runtime call. + // For static payloads (codegen) this is pass-through, bytes are not altered. + // For dynamic payloads this relies on `scale_value::encode_as_fields_to`. + let params = payload.encode_args(&metadata)?; + + let bytes = client + .rpc() + .state_call_raw(function, Some(params.as_slice()), Some(block_hash)) + .await?; + + let value = ::decode_with_metadata( + &mut &bytes[..], + return_id, + &metadata, + )?; + Ok(value) + } + } } diff --git a/testing/integration-tests/Cargo.toml b/testing/integration-tests/Cargo.toml index 980301a32f..81239856fb 100644 --- a/testing/integration-tests/Cargo.toml +++ b/testing/integration-tests/Cargo.toml @@ -27,7 +27,7 @@ sp-core = { workspace = true } sp-runtime = { workspace = true } sp-keyring = { workspace = true } syn = { workspace = true } -subxt = { workspace = true } +subxt = { workspace = true, features = ["unstable-metadata"] } subxt-codegen = { workspace = true } subxt-metadata = { workspace = true } test-runtime = { workspace = true } diff --git a/testing/integration-tests/src/blocks/mod.rs b/testing/integration-tests/src/blocks/mod.rs index 57d02972b4..ab14d2202a 100644 --- a/testing/integration-tests/src/blocks/mod.rs +++ b/testing/integration-tests/src/blocks/mod.rs @@ -113,7 +113,7 @@ async fn runtime_api_call() -> Result<(), subxt::Error> { }; // Compare the runtime API call against the `state_getMetadata`. - let metadata = api.rpc().metadata(None).await?; + let metadata = api.rpc().metadata_legacy(None).await?; let metadata = metadata.runtime_metadata(); assert_eq!(&metadata_call, metadata); Ok(()) diff --git a/testing/integration-tests/src/client/mod.rs b/testing/integration-tests/src/client/mod.rs index d95936f508..aeaa30ec43 100644 --- a/testing/integration-tests/src/client/mod.rs +++ b/testing/integration-tests/src/client/mod.rs @@ -438,7 +438,7 @@ async fn rpc_state_call() { _ => panic!("Metadata V14 or V15 unavailable"), }; // Compare the runtime API call against the `state_getMetadata`. - let metadata = api.rpc().metadata(None).await.unwrap(); + let metadata = api.rpc().metadata_legacy(None).await.unwrap(); let metadata = metadata.runtime_metadata(); assert_eq!(&metadata_call, metadata); } diff --git a/testing/integration-tests/src/codegen/codegen_documentation.rs b/testing/integration-tests/src/codegen/codegen_documentation.rs index be4a534f1c..e371b24a70 100644 --- a/testing/integration-tests/src/codegen/codegen_documentation.rs +++ b/testing/integration-tests/src/codegen/codegen_documentation.rs @@ -40,6 +40,14 @@ fn metadata_docs() -> Vec { // Note: Extrinsics do not have associated documentation, but is implied by // associated Type. + // Inspect the runtime API types and collect the documentation. + for api in metadata.apis { + docs.extend(api.docs); + for method in api.methods { + docs.extend(method.docs); + } + } + docs } diff --git a/testing/integration-tests/src/codegen/polkadot.rs b/testing/integration-tests/src/codegen/polkadot.rs index 4a8bb5020f..81b49af334 100644 --- a/testing/integration-tests/src/codegen/polkadot.rs +++ b/testing/integration-tests/src/codegen/polkadot.rs @@ -5,7 +5,7 @@ pub mod api { mod root_mod { pub use super::*; } - pub static PALLETS: [&str; 53usize] = [ + pub static PALLETS: [&str; 56usize] = [ "System", "Scheduler", "Preimage", @@ -28,6 +28,9 @@ pub mod api { "PhragmenElection", "TechnicalMembership", "Treasury", + "ConvictionVoting", + "Referenda", + "Whitelist", "Claims", "Vesting", "Utility", @@ -107,6 +110,12 @@ pub mod api { TechnicalMembership(technical_membership::Event), #[codec(index = 19)] Treasury(treasury::Event), + #[codec(index = 20)] + ConvictionVoting(conviction_voting::Event), + #[codec(index = 21)] + Referenda(referenda::Event), + #[codec(index = 23)] + Whitelist(whitelist::Event), #[codec(index = 24)] Claims(claims::Event), #[codec(index = 25)] @@ -289,6 +298,29 @@ pub mod api { metadata, )?)); } + if pallet_name == "ConvictionVoting" { + return Ok(Event::ConvictionVoting( + conviction_voting::Event::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?, + )); + } + if pallet_name == "Referenda" { + return Ok(Event::Referenda(referenda::Event::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?)); + } + if pallet_name == "Whitelist" { + return Ok(Event::Whitelist(whitelist::Event::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?)); + } if pallet_name == "Claims" { return Ok(Event::Claims(claims::Event::decode_with_metadata( &mut &*pallet_bytes, @@ -492,8 +524,6 @@ pub mod api { Indices(indices::Error), #[codec(index = 5)] Balances(balances::Error), - #[codec(index = 6)] - Authorship(authorship::Error), #[codec(index = 7)] Staking(staking::Error), #[codec(index = 9)] @@ -514,6 +544,12 @@ pub mod api { TechnicalMembership(technical_membership::Error), #[codec(index = 19)] Treasury(treasury::Error), + #[codec(index = 20)] + ConvictionVoting(conviction_voting::Error), + #[codec(index = 21)] + Referenda(referenda::Error), + #[codec(index = 23)] + Whitelist(whitelist::Error), #[codec(index = 24)] Claims(claims::Error), #[codec(index = 25)] @@ -574,198 +610,208 @@ pub mod api { use subxt::metadata::DecodeWithMetadata; let cursor = &mut &pallet_bytes[..]; if pallet_name == "System" { - let variant_error = system::Error::decode_with_metadata(cursor, 176u32, metadata)?; + let variant_error = system::Error::decode_with_metadata(cursor, 488u32, metadata)?; return Ok(Error::System(variant_error)); } if pallet_name == "Scheduler" { let variant_error = - scheduler::Error::decode_with_metadata(cursor, 450u32, metadata)?; + scheduler::Error::decode_with_metadata(cursor, 493u32, metadata)?; return Ok(Error::Scheduler(variant_error)); } if pallet_name == "Preimage" { let variant_error = - preimage::Error::decode_with_metadata(cursor, 455u32, metadata)?; + preimage::Error::decode_with_metadata(cursor, 498u32, metadata)?; return Ok(Error::Preimage(variant_error)); } if pallet_name == "Babe" { - let variant_error = babe::Error::decode_with_metadata(cursor, 467u32, metadata)?; + let variant_error = babe::Error::decode_with_metadata(cursor, 514u32, metadata)?; return Ok(Error::Babe(variant_error)); } if pallet_name == "Indices" { - let variant_error = indices::Error::decode_with_metadata(cursor, 469u32, metadata)?; + let variant_error = indices::Error::decode_with_metadata(cursor, 516u32, metadata)?; return Ok(Error::Indices(variant_error)); } if pallet_name == "Balances" { let variant_error = - balances::Error::decode_with_metadata(cursor, 478u32, metadata)?; + balances::Error::decode_with_metadata(cursor, 527u32, metadata)?; return Ok(Error::Balances(variant_error)); } - if pallet_name == "Authorship" { - let variant_error = - authorship::Error::decode_with_metadata(cursor, 484u32, metadata)?; - return Ok(Error::Authorship(variant_error)); - } if pallet_name == "Staking" { - let variant_error = staking::Error::decode_with_metadata(cursor, 508u32, metadata)?; + let variant_error = staking::Error::decode_with_metadata(cursor, 551u32, metadata)?; return Ok(Error::Staking(variant_error)); } if pallet_name == "Session" { - let variant_error = session::Error::decode_with_metadata(cursor, 515u32, metadata)?; + let variant_error = session::Error::decode_with_metadata(cursor, 558u32, metadata)?; return Ok(Error::Session(variant_error)); } if pallet_name == "Grandpa" { - let variant_error = grandpa::Error::decode_with_metadata(cursor, 519u32, metadata)?; + let variant_error = grandpa::Error::decode_with_metadata(cursor, 562u32, metadata)?; return Ok(Error::Grandpa(variant_error)); } if pallet_name == "ImOnline" { let variant_error = - im_online::Error::decode_with_metadata(cursor, 527u32, metadata)?; + im_online::Error::decode_with_metadata(cursor, 570u32, metadata)?; return Ok(Error::ImOnline(variant_error)); } if pallet_name == "Democracy" { let variant_error = - democracy::Error::decode_with_metadata(cursor, 544u32, metadata)?; + democracy::Error::decode_with_metadata(cursor, 587u32, metadata)?; return Ok(Error::Democracy(variant_error)); } if pallet_name == "Council" { - let variant_error = council::Error::decode_with_metadata(cursor, 547u32, metadata)?; + let variant_error = council::Error::decode_with_metadata(cursor, 590u32, metadata)?; return Ok(Error::Council(variant_error)); } if pallet_name == "TechnicalCommittee" { let variant_error = - technical_committee::Error::decode_with_metadata(cursor, 549u32, metadata)?; + technical_committee::Error::decode_with_metadata(cursor, 592u32, metadata)?; return Ok(Error::TechnicalCommittee(variant_error)); } if pallet_name == "PhragmenElection" { let variant_error = - phragmen_election::Error::decode_with_metadata(cursor, 553u32, metadata)?; + phragmen_election::Error::decode_with_metadata(cursor, 596u32, metadata)?; return Ok(Error::PhragmenElection(variant_error)); } if pallet_name == "TechnicalMembership" { let variant_error = - technical_membership::Error::decode_with_metadata(cursor, 555u32, metadata)?; + technical_membership::Error::decode_with_metadata(cursor, 598u32, metadata)?; return Ok(Error::TechnicalMembership(variant_error)); } if pallet_name == "Treasury" { let variant_error = - treasury::Error::decode_with_metadata(cursor, 561u32, metadata)?; + treasury::Error::decode_with_metadata(cursor, 604u32, metadata)?; return Ok(Error::Treasury(variant_error)); } + if pallet_name == "ConvictionVoting" { + let variant_error = + conviction_voting::Error::decode_with_metadata(cursor, 617u32, metadata)?; + return Ok(Error::ConvictionVoting(variant_error)); + } + if pallet_name == "Referenda" { + let variant_error = + referenda::Error::decode_with_metadata(cursor, 635u32, metadata)?; + return Ok(Error::Referenda(variant_error)); + } + if pallet_name == "Whitelist" { + let variant_error = + whitelist::Error::decode_with_metadata(cursor, 636u32, metadata)?; + return Ok(Error::Whitelist(variant_error)); + } if pallet_name == "Claims" { - let variant_error = claims::Error::decode_with_metadata(cursor, 562u32, metadata)?; + let variant_error = claims::Error::decode_with_metadata(cursor, 637u32, metadata)?; return Ok(Error::Claims(variant_error)); } if pallet_name == "Vesting" { - let variant_error = vesting::Error::decode_with_metadata(cursor, 566u32, metadata)?; + let variant_error = vesting::Error::decode_with_metadata(cursor, 641u32, metadata)?; return Ok(Error::Vesting(variant_error)); } if pallet_name == "Utility" { - let variant_error = utility::Error::decode_with_metadata(cursor, 567u32, metadata)?; + let variant_error = utility::Error::decode_with_metadata(cursor, 642u32, metadata)?; return Ok(Error::Utility(variant_error)); } if pallet_name == "Identity" { let variant_error = - identity::Error::decode_with_metadata(cursor, 578u32, metadata)?; + identity::Error::decode_with_metadata(cursor, 653u32, metadata)?; return Ok(Error::Identity(variant_error)); } if pallet_name == "Proxy" { - let variant_error = proxy::Error::decode_with_metadata(cursor, 587u32, metadata)?; + let variant_error = proxy::Error::decode_with_metadata(cursor, 662u32, metadata)?; return Ok(Error::Proxy(variant_error)); } if pallet_name == "Multisig" { let variant_error = - multisig::Error::decode_with_metadata(cursor, 591u32, metadata)?; + multisig::Error::decode_with_metadata(cursor, 666u32, metadata)?; return Ok(Error::Multisig(variant_error)); } if pallet_name == "Bounties" { let variant_error = - bounties::Error::decode_with_metadata(cursor, 595u32, metadata)?; + bounties::Error::decode_with_metadata(cursor, 670u32, metadata)?; return Ok(Error::Bounties(variant_error)); } if pallet_name == "ChildBounties" { let variant_error = - child_bounties::Error::decode_with_metadata(cursor, 598u32, metadata)?; + child_bounties::Error::decode_with_metadata(cursor, 673u32, metadata)?; return Ok(Error::ChildBounties(variant_error)); } if pallet_name == "Tips" { - let variant_error = tips::Error::decode_with_metadata(cursor, 600u32, metadata)?; + let variant_error = tips::Error::decode_with_metadata(cursor, 675u32, metadata)?; return Ok(Error::Tips(variant_error)); } if pallet_name == "ElectionProviderMultiPhase" { let variant_error = election_provider_multi_phase::Error::decode_with_metadata( - cursor, 612u32, metadata, + cursor, 685u32, metadata, )?; return Ok(Error::ElectionProviderMultiPhase(variant_error)); } if pallet_name == "VoterList" { let variant_error = - voter_list::Error::decode_with_metadata(cursor, 616u32, metadata)?; + voter_list::Error::decode_with_metadata(cursor, 689u32, metadata)?; return Ok(Error::VoterList(variant_error)); } if pallet_name == "NominationPools" { let variant_error = - nomination_pools::Error::decode_with_metadata(cursor, 633u32, metadata)?; + nomination_pools::Error::decode_with_metadata(cursor, 707u32, metadata)?; return Ok(Error::NominationPools(variant_error)); } if pallet_name == "FastUnstake" { let variant_error = - fast_unstake::Error::decode_with_metadata(cursor, 638u32, metadata)?; + fast_unstake::Error::decode_with_metadata(cursor, 712u32, metadata)?; return Ok(Error::FastUnstake(variant_error)); } if pallet_name == "Configuration" { let variant_error = - configuration::Error::decode_with_metadata(cursor, 642u32, metadata)?; + configuration::Error::decode_with_metadata(cursor, 716u32, metadata)?; return Ok(Error::Configuration(variant_error)); } if pallet_name == "ParaInclusion" { let variant_error = - para_inclusion::Error::decode_with_metadata(cursor, 647u32, metadata)?; + para_inclusion::Error::decode_with_metadata(cursor, 721u32, metadata)?; return Ok(Error::ParaInclusion(variant_error)); } if pallet_name == "ParaInherent" { let variant_error = - para_inherent::Error::decode_with_metadata(cursor, 653u32, metadata)?; + para_inherent::Error::decode_with_metadata(cursor, 727u32, metadata)?; return Ok(Error::ParaInherent(variant_error)); } if pallet_name == "Paras" { - let variant_error = paras::Error::decode_with_metadata(cursor, 680u32, metadata)?; + let variant_error = paras::Error::decode_with_metadata(cursor, 754u32, metadata)?; return Ok(Error::Paras(variant_error)); } if pallet_name == "Ump" { - let variant_error = ump::Error::decode_with_metadata(cursor, 686u32, metadata)?; + let variant_error = ump::Error::decode_with_metadata(cursor, 760u32, metadata)?; return Ok(Error::Ump(variant_error)); } if pallet_name == "Hrmp" { - let variant_error = hrmp::Error::decode_with_metadata(cursor, 695u32, metadata)?; + let variant_error = hrmp::Error::decode_with_metadata(cursor, 768u32, metadata)?; return Ok(Error::Hrmp(variant_error)); } if pallet_name == "ParasDisputes" { let variant_error = - paras_disputes::Error::decode_with_metadata(cursor, 703u32, metadata)?; + paras_disputes::Error::decode_with_metadata(cursor, 777u32, metadata)?; return Ok(Error::ParasDisputes(variant_error)); } if pallet_name == "Registrar" { let variant_error = - registrar::Error::decode_with_metadata(cursor, 705u32, metadata)?; + registrar::Error::decode_with_metadata(cursor, 779u32, metadata)?; return Ok(Error::Registrar(variant_error)); } if pallet_name == "Slots" { - let variant_error = slots::Error::decode_with_metadata(cursor, 707u32, metadata)?; + let variant_error = slots::Error::decode_with_metadata(cursor, 781u32, metadata)?; return Ok(Error::Slots(variant_error)); } if pallet_name == "Auctions" { let variant_error = - auctions::Error::decode_with_metadata(cursor, 712u32, metadata)?; + auctions::Error::decode_with_metadata(cursor, 786u32, metadata)?; return Ok(Error::Auctions(variant_error)); } if pallet_name == "Crowdloan" { let variant_error = - crowdloan::Error::decode_with_metadata(cursor, 715u32, metadata)?; + crowdloan::Error::decode_with_metadata(cursor, 789u32, metadata)?; return Ok(Error::Crowdloan(variant_error)); } if pallet_name == "XcmPallet" { let variant_error = - xcm_pallet::Error::decode_with_metadata(cursor, 727u32, metadata)?; + xcm_pallet::Error::decode_with_metadata(cursor, 808u32, metadata)?; return Ok(Error::XcmPallet(variant_error)); } Err(::subxt::ext::scale_decode::Error::custom(format!( @@ -784,6 +830,16 @@ pub mod api { pub fn tx() -> TransactionApi { TransactionApi } + pub fn apis() -> runtime_apis::RuntimeApi { + runtime_apis::RuntimeApi + } + pub mod runtime_apis { + use super::root_mod; + use super::runtime_types; + use subxt::ext::codec::Encode; + pub struct RuntimeApi; + impl RuntimeApi {} + } pub struct ConstantsApi; impl ConstantsApi { pub fn system(&self) -> system::constants::ConstantsApi { @@ -807,9 +863,6 @@ pub mod api { 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 } @@ -822,12 +875,24 @@ pub mod api { pub fn democracy(&self) -> democracy::constants::ConstantsApi { democracy::constants::ConstantsApi } + pub fn council(&self) -> council::constants::ConstantsApi { + council::constants::ConstantsApi + } + pub fn technical_committee(&self) -> technical_committee::constants::ConstantsApi { + technical_committee::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 conviction_voting(&self) -> conviction_voting::constants::ConstantsApi { + conviction_voting::constants::ConstantsApi + } + pub fn referenda(&self) -> referenda::constants::ConstantsApi { + referenda::constants::ConstantsApi + } pub fn claims(&self) -> claims::constants::ConstantsApi { claims::constants::ConstantsApi } @@ -866,6 +931,9 @@ pub mod api { pub fn nomination_pools(&self) -> nomination_pools::constants::ConstantsApi { nomination_pools::constants::ConstantsApi } + pub fn fast_unstake(&self) -> fast_unstake::constants::ConstantsApi { + fast_unstake::constants::ConstantsApi + } pub fn paras(&self) -> paras::constants::ConstantsApi { paras::constants::ConstantsApi } @@ -944,6 +1012,15 @@ pub mod api { pub fn treasury(&self) -> treasury::storage::StorageApi { treasury::storage::StorageApi } + pub fn conviction_voting(&self) -> conviction_voting::storage::StorageApi { + conviction_voting::storage::StorageApi + } + pub fn referenda(&self) -> referenda::storage::StorageApi { + referenda::storage::StorageApi + } + pub fn whitelist(&self) -> whitelist::storage::StorageApi { + whitelist::storage::StorageApi + } pub fn claims(&self) -> claims::storage::StorageApi { claims::storage::StorageApi } @@ -1057,9 +1134,6 @@ pub mod api { pub fn balances(&self) -> balances::calls::TransactionApi { balances::calls::TransactionApi } - pub fn authorship(&self) -> authorship::calls::TransactionApi { - authorship::calls::TransactionApi - } pub fn staking(&self) -> staking::calls::TransactionApi { staking::calls::TransactionApi } @@ -1090,6 +1164,15 @@ pub mod api { pub fn treasury(&self) -> treasury::calls::TransactionApi { treasury::calls::TransactionApi } + pub fn conviction_voting(&self) -> conviction_voting::calls::TransactionApi { + conviction_voting::calls::TransactionApi + } + pub fn referenda(&self) -> referenda::calls::TransactionApi { + referenda::calls::TransactionApi + } + pub fn whitelist(&self) -> whitelist::calls::TransactionApi { + whitelist::calls::TransactionApi + } pub fn claims(&self) -> claims::calls::TransactionApi { claims::calls::TransactionApi } @@ -1184,9 +1267,9 @@ pub mod api { let runtime_metadata_hash = client.metadata().metadata_hash(&PALLETS); if runtime_metadata_hash != [ - 252u8, 179u8, 170u8, 129u8, 159u8, 95u8, 180u8, 114u8, 218u8, 56u8, 91u8, 93u8, - 175u8, 45u8, 57u8, 223u8, 178u8, 209u8, 250u8, 247u8, 243u8, 73u8, 182u8, 137u8, - 176u8, 129u8, 37u8, 196u8, 133u8, 123u8, 93u8, 186u8, + 190u8, 141u8, 166u8, 186u8, 44u8, 119u8, 250u8, 170u8, 99u8, 5u8, 93u8, 253u8, + 141u8, 142u8, 175u8, 243u8, 206u8, 208u8, 98u8, 63u8, 166u8, 71u8, 159u8, 227u8, + 34u8, 235u8, 190u8, 96u8, 248u8, 13u8, 47u8, 146u8, ] { Err(::subxt::error::MetadataError::IncompatibleMetadata) @@ -1204,160 +1287,132 @@ pub mod api { use super::root_mod; use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct FillBlock { - pub ratio: runtime_types::sp_arithmetic::per_things::Perbill, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Remark { - pub remark: ::std::vec::Vec<::core::primitive::u8>, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetHeapPages { - pub pages: ::core::primitive::u64, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetCode { - pub code: ::std::vec::Vec<::core::primitive::u8>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetCodeWithoutChecks { - pub code: ::std::vec::Vec<::core::primitive::u8>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetStorage { - pub items: ::std::vec::Vec<( - ::std::vec::Vec<::core::primitive::u8>, - ::std::vec::Vec<::core::primitive::u8>, - )>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct KillStorage { - pub keys: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct KillPrefix { - pub prefix: ::std::vec::Vec<::core::primitive::u8>, - pub subkeys: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RemarkWithEvent { - pub remark: ::std::vec::Vec<::core::primitive::u8>, + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Remark { + pub remark: ::std::vec::Vec<::core::primitive::u8>, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetHeapPages { + pub pages: ::core::primitive::u64, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetCode { + pub code: ::std::vec::Vec<::core::primitive::u8>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetCodeWithoutChecks { + pub code: ::std::vec::Vec<::core::primitive::u8>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetStorage { + pub items: ::std::vec::Vec<( + ::std::vec::Vec<::core::primitive::u8>, + ::std::vec::Vec<::core::primitive::u8>, + )>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct KillStorage { + pub keys: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct KillPrefix { + pub prefix: ::std::vec::Vec<::core::primitive::u8>, + pub subkeys: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct RemarkWithEvent { + pub remark: ::std::vec::Vec<::core::primitive::u8>, + } } pub struct TransactionApi; impl TransactionApi { - #[doc = "A dispatch that will fill the block weight up to the given ratio."] - pub fn fill_block( - &self, - ratio: runtime_types::sp_arithmetic::per_things::Perbill, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "System", - "fill_block", - FillBlock { ratio }, - [ - 48u8, 18u8, 205u8, 90u8, 222u8, 4u8, 20u8, 251u8, 173u8, 76u8, 167u8, - 4u8, 83u8, 203u8, 160u8, 89u8, 132u8, 218u8, 191u8, 145u8, 130u8, - 245u8, 177u8, 201u8, 169u8, 129u8, 173u8, 105u8, 88u8, 45u8, 136u8, - 191u8, - ], - ) - } #[doc = "Make some on-chain remark."] #[doc = ""] - #[doc = "# "] + #[doc = "## Complexity"] #[doc = "- `O(1)`"] - #[doc = "# "] pub fn remark( &self, remark: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "System", "remark", - Remark { remark }, + types::Remark { remark }, [ 101u8, 80u8, 195u8, 226u8, 224u8, 247u8, 60u8, 128u8, 3u8, 101u8, 51u8, 147u8, 96u8, 126u8, 76u8, 230u8, 194u8, 227u8, 191u8, 73u8, 160u8, @@ -1370,11 +1425,11 @@ pub mod api { pub fn set_heap_pages( &self, pages: ::core::primitive::u64, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "System", "set_heap_pages", - SetHeapPages { pages }, + types::SetHeapPages { pages }, [ 43u8, 103u8, 128u8, 49u8, 156u8, 136u8, 11u8, 204u8, 80u8, 6u8, 244u8, 86u8, 171u8, 44u8, 140u8, 225u8, 142u8, 198u8, 43u8, 87u8, 26u8, 45u8, @@ -1384,24 +1439,16 @@ pub mod api { } #[doc = "Set the new runtime code."] #[doc = ""] - #[doc = "# "] + #[doc = "## Complexity"] #[doc = "- `O(C + S)` where `C` length of `code` and `S` complexity of `can_set_code`"] - #[doc = "- 1 call to `can_set_code`: `O(S)` (calls `sp_io::misc::runtime_version` which is"] - #[doc = " expensive)."] - #[doc = "- 1 storage write (codec `O(C)`)."] - #[doc = "- 1 digest item."] - #[doc = "- 1 event."] - #[doc = "The weight of this function is dependent on the runtime, but generally this is very"] - #[doc = "expensive. We will treat this as a full block."] - #[doc = "# "] pub fn set_code( &self, code: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "System", "set_code", - SetCode { code }, + types::SetCode { code }, [ 27u8, 104u8, 244u8, 205u8, 188u8, 254u8, 121u8, 13u8, 106u8, 120u8, 244u8, 108u8, 97u8, 84u8, 100u8, 68u8, 26u8, 69u8, 93u8, 128u8, 107u8, @@ -1411,21 +1458,16 @@ pub mod api { } #[doc = "Set the new runtime code without doing any checks of the given `code`."] #[doc = ""] - #[doc = "# "] + #[doc = "## Complexity"] #[doc = "- `O(C)` where `C` length of `code`"] - #[doc = "- 1 storage write (codec `O(C)`)."] - #[doc = "- 1 digest item."] - #[doc = "- 1 event."] - #[doc = "The weight of this function is dependent on the runtime. We will treat this as a full"] - #[doc = "block. # "] pub fn set_code_without_checks( &self, code: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "System", "set_code_without_checks", - SetCodeWithoutChecks { code }, + types::SetCodeWithoutChecks { code }, [ 102u8, 160u8, 125u8, 235u8, 30u8, 23u8, 45u8, 239u8, 112u8, 148u8, 159u8, 158u8, 42u8, 93u8, 206u8, 94u8, 80u8, 250u8, 66u8, 195u8, 60u8, @@ -1440,11 +1482,11 @@ pub mod api { ::std::vec::Vec<::core::primitive::u8>, ::std::vec::Vec<::core::primitive::u8>, )>, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "System", "set_storage", - SetStorage { items }, + types::SetStorage { items }, [ 74u8, 43u8, 106u8, 255u8, 50u8, 151u8, 192u8, 155u8, 14u8, 90u8, 19u8, 45u8, 165u8, 16u8, 235u8, 242u8, 21u8, 131u8, 33u8, 172u8, 119u8, 78u8, @@ -1456,11 +1498,11 @@ pub mod api { pub fn kill_storage( &self, keys: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "System", "kill_storage", - KillStorage { keys }, + types::KillStorage { keys }, [ 174u8, 174u8, 13u8, 174u8, 75u8, 138u8, 128u8, 235u8, 222u8, 216u8, 85u8, 18u8, 198u8, 1u8, 138u8, 70u8, 19u8, 108u8, 209u8, 41u8, 228u8, @@ -1477,11 +1519,11 @@ pub mod api { &self, prefix: ::std::vec::Vec<::core::primitive::u8>, subkeys: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "System", "kill_prefix", - KillPrefix { prefix, subkeys }, + types::KillPrefix { prefix, subkeys }, [ 203u8, 116u8, 217u8, 42u8, 154u8, 215u8, 77u8, 217u8, 13u8, 22u8, 193u8, 2u8, 128u8, 115u8, 179u8, 115u8, 187u8, 218u8, 129u8, 34u8, @@ -1494,11 +1536,11 @@ pub mod api { pub fn remark_with_event( &self, remark: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "System", "remark_with_event", - RemarkWithEvent { remark }, + types::RemarkWithEvent { remark }, [ 123u8, 225u8, 180u8, 179u8, 144u8, 74u8, 27u8, 85u8, 101u8, 75u8, 134u8, 44u8, 181u8, 25u8, 183u8, 158u8, 14u8, 213u8, 56u8, 225u8, @@ -1634,7 +1676,7 @@ pub mod api { ::subxt::storage::address::StaticStorageMapKey, runtime_types::frame_system::AccountInfo< ::core::primitive::u32, - runtime_types::pallet_balances::AccountData<::core::primitive::u128>, + runtime_types::pallet_balances::types::AccountData<::core::primitive::u128>, >, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, @@ -1647,9 +1689,10 @@ pub mod api { _0.borrow(), )], [ - 176u8, 187u8, 21u8, 220u8, 159u8, 204u8, 127u8, 14u8, 21u8, 69u8, 77u8, - 114u8, 230u8, 141u8, 107u8, 79u8, 23u8, 16u8, 174u8, 243u8, 252u8, - 42u8, 65u8, 120u8, 229u8, 38u8, 210u8, 255u8, 22u8, 40u8, 109u8, 223u8, + 248u8, 178u8, 160u8, 222u8, 45u8, 231u8, 115u8, 164u8, 98u8, 184u8, + 174u8, 206u8, 149u8, 190u8, 175u8, 34u8, 202u8, 230u8, 69u8, 218u8, + 83u8, 43u8, 170u8, 41u8, 106u8, 77u8, 233u8, 97u8, 114u8, 14u8, 155u8, + 131u8, ], ) } @@ -1660,7 +1703,7 @@ pub mod api { ::subxt::storage::address::StaticStorageMapKey, runtime_types::frame_system::AccountInfo< ::core::primitive::u32, - runtime_types::pallet_balances::AccountData<::core::primitive::u128>, + runtime_types::pallet_balances::types::AccountData<::core::primitive::u128>, >, (), ::subxt::storage::address::Yes, @@ -1671,9 +1714,10 @@ pub mod api { "Account", Vec::new(), [ - 176u8, 187u8, 21u8, 220u8, 159u8, 204u8, 127u8, 14u8, 21u8, 69u8, 77u8, - 114u8, 230u8, 141u8, 107u8, 79u8, 23u8, 16u8, 174u8, 243u8, 252u8, - 42u8, 65u8, 120u8, 229u8, 38u8, 210u8, 255u8, 22u8, 40u8, 109u8, 223u8, + 248u8, 178u8, 160u8, 222u8, 45u8, 231u8, 115u8, 164u8, 98u8, 184u8, + 174u8, 206u8, 149u8, 190u8, 175u8, 34u8, 202u8, 230u8, 69u8, 218u8, + 83u8, 43u8, 170u8, 41u8, 106u8, 77u8, 233u8, 97u8, 114u8, 14u8, 155u8, + 131u8, ], ) } @@ -1925,9 +1969,10 @@ pub mod api { "Events", vec![], [ - 230u8, 215u8, 9u8, 223u8, 139u8, 55u8, 22u8, 144u8, 226u8, 245u8, - 166u8, 235u8, 8u8, 182u8, 131u8, 51u8, 41u8, 148u8, 102u8, 40u8, 86u8, - 230u8, 82u8, 41u8, 226u8, 151u8, 247u8, 41u8, 186u8, 190u8, 85u8, 20u8, + 26u8, 210u8, 211u8, 123u8, 212u8, 15u8, 80u8, 216u8, 114u8, 185u8, + 65u8, 128u8, 244u8, 195u8, 118u8, 121u8, 178u8, 141u8, 187u8, 167u8, + 50u8, 176u8, 188u8, 16u8, 166u8, 230u8, 16u8, 138u8, 161u8, 106u8, + 166u8, 190u8, ], ) } @@ -2218,102 +2263,105 @@ pub mod api { use super::root_mod; use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - 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: ::std::boxed::Box, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Cancel { - pub when: ::core::primitive::u32, - pub index: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ScheduleNamed { - pub id: [::core::primitive::u8; 32usize], - pub when: ::core::primitive::u32, - pub maybe_periodic: - ::core::option::Option<(::core::primitive::u32, ::core::primitive::u32)>, - pub priority: ::core::primitive::u8, - pub call: ::std::boxed::Box, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CancelNamed { - pub id: [::core::primitive::u8; 32usize], - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ScheduleAfter { - pub after: ::core::primitive::u32, - pub maybe_periodic: - ::core::option::Option<(::core::primitive::u32, ::core::primitive::u32)>, - pub priority: ::core::primitive::u8, - pub call: ::std::boxed::Box, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ScheduleNamedAfter { - pub id: [::core::primitive::u8; 32usize], - pub after: ::core::primitive::u32, - pub maybe_periodic: - ::core::option::Option<(::core::primitive::u32, ::core::primitive::u32)>, - pub priority: ::core::primitive::u8, - pub call: ::std::boxed::Box, + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + 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: ::std::boxed::Box, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Cancel { + pub when: ::core::primitive::u32, + pub index: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ScheduleNamed { + pub id: [::core::primitive::u8; 32usize], + pub when: ::core::primitive::u32, + pub maybe_periodic: + ::core::option::Option<(::core::primitive::u32, ::core::primitive::u32)>, + pub priority: ::core::primitive::u8, + pub call: ::std::boxed::Box, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct CancelNamed { + pub id: [::core::primitive::u8; 32usize], + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ScheduleAfter { + pub after: ::core::primitive::u32, + pub maybe_periodic: + ::core::option::Option<(::core::primitive::u32, ::core::primitive::u32)>, + pub priority: ::core::primitive::u8, + pub call: ::std::boxed::Box, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ScheduleNamedAfter { + pub id: [::core::primitive::u8; 32usize], + pub after: ::core::primitive::u32, + pub maybe_periodic: + ::core::option::Option<(::core::primitive::u32, ::core::primitive::u32)>, + pub priority: ::core::primitive::u8, + pub call: ::std::boxed::Box, + } } pub struct TransactionApi; impl TransactionApi { @@ -2327,21 +2375,20 @@ pub mod api { )>, priority: ::core::primitive::u8, call: runtime_types::polkadot_runtime::RuntimeCall, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Scheduler", "schedule", - Schedule { + types::Schedule { when, maybe_periodic, priority, call: ::std::boxed::Box::new(call), }, [ - 110u8, 118u8, 202u8, 51u8, 211u8, 53u8, 194u8, 114u8, 80u8, 166u8, - 134u8, 18u8, 89u8, 144u8, 204u8, 155u8, 201u8, 237u8, 138u8, 170u8, - 86u8, 16u8, 7u8, 2u8, 12u8, 96u8, 17u8, 148u8, 147u8, 144u8, 196u8, - 4u8, + 164u8, 246u8, 61u8, 87u8, 188u8, 27u8, 147u8, 236u8, 52u8, 8u8, 236u8, + 129u8, 26u8, 72u8, 131u8, 237u8, 251u8, 235u8, 164u8, 113u8, 111u8, + 134u8, 93u8, 90u8, 90u8, 12u8, 212u8, 60u8, 188u8, 209u8, 11u8, 233u8, ], ) } @@ -2350,11 +2397,11 @@ pub mod api { &self, when: ::core::primitive::u32, index: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Scheduler", "cancel", - Cancel { when, index }, + types::Cancel { when, index }, [ 81u8, 251u8, 234u8, 17u8, 214u8, 75u8, 19u8, 59u8, 19u8, 30u8, 89u8, 74u8, 6u8, 216u8, 238u8, 165u8, 7u8, 19u8, 153u8, 253u8, 161u8, 103u8, @@ -2373,11 +2420,11 @@ pub mod api { )>, priority: ::core::primitive::u8, call: runtime_types::polkadot_runtime::RuntimeCall, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Scheduler", "schedule_named", - ScheduleNamed { + types::ScheduleNamed { id, when, maybe_periodic, @@ -2385,9 +2432,10 @@ pub mod api { call: ::std::boxed::Box::new(call), }, [ - 84u8, 106u8, 212u8, 23u8, 117u8, 33u8, 204u8, 44u8, 79u8, 178u8, 21u8, - 241u8, 151u8, 179u8, 201u8, 1u8, 48u8, 13u8, 125u8, 176u8, 166u8, 49u8, - 118u8, 174u8, 1u8, 187u8, 45u8, 75u8, 204u8, 219u8, 229u8, 24u8, + 156u8, 178u8, 81u8, 158u8, 54u8, 35u8, 247u8, 189u8, 201u8, 227u8, + 26u8, 122u8, 219u8, 223u8, 92u8, 151u8, 189u8, 42u8, 137u8, 149u8, + 254u8, 183u8, 77u8, 2u8, 204u8, 112u8, 53u8, 235u8, 150u8, 120u8, 10u8, + 115u8, ], ) } @@ -2395,11 +2443,11 @@ pub mod api { pub fn cancel_named( &self, id: [::core::primitive::u8; 32usize], - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Scheduler", "cancel_named", - CancelNamed { id }, + types::CancelNamed { id }, [ 51u8, 3u8, 140u8, 50u8, 214u8, 211u8, 50u8, 4u8, 19u8, 43u8, 230u8, 114u8, 18u8, 108u8, 138u8, 67u8, 99u8, 24u8, 255u8, 11u8, 246u8, 37u8, @@ -2408,10 +2456,6 @@ pub mod api { ) } #[doc = "Anonymously schedule a task after a delay."] - #[doc = ""] - #[doc = "# "] - #[doc = "Same as [`schedule`]."] - #[doc = "# "] pub fn schedule_after( &self, after: ::core::primitive::u32, @@ -2421,28 +2465,25 @@ pub mod api { )>, priority: ::core::primitive::u8, call: runtime_types::polkadot_runtime::RuntimeCall, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Scheduler", "schedule_after", - ScheduleAfter { + types::ScheduleAfter { after, maybe_periodic, priority, call: ::std::boxed::Box::new(call), }, [ - 176u8, 3u8, 143u8, 176u8, 250u8, 9u8, 0u8, 75u8, 62u8, 93u8, 220u8, - 19u8, 98u8, 136u8, 178u8, 98u8, 187u8, 57u8, 228u8, 147u8, 133u8, 88u8, - 146u8, 58u8, 113u8, 166u8, 41u8, 25u8, 163u8, 95u8, 6u8, 47u8, + 218u8, 137u8, 252u8, 13u8, 121u8, 128u8, 180u8, 62u8, 53u8, 213u8, + 72u8, 108u8, 241u8, 211u8, 254u8, 111u8, 240u8, 200u8, 251u8, 16u8, + 229u8, 105u8, 202u8, 252u8, 94u8, 76u8, 12u8, 163u8, 115u8, 109u8, + 167u8, 70u8, ], ) } #[doc = "Schedule a named task after a delay."] - #[doc = ""] - #[doc = "# "] - #[doc = "Same as [`schedule_named`](Self::schedule_named)."] - #[doc = "# "] pub fn schedule_named_after( &self, id: [::core::primitive::u8; 32usize], @@ -2453,11 +2494,11 @@ pub mod api { )>, priority: ::core::primitive::u8, call: runtime_types::polkadot_runtime::RuntimeCall, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Scheduler", "schedule_named_after", - ScheduleNamedAfter { + types::ScheduleNamedAfter { id, after, maybe_periodic, @@ -2465,10 +2506,10 @@ pub mod api { call: ::std::boxed::Box::new(call), }, [ - 195u8, 224u8, 47u8, 168u8, 137u8, 114u8, 75u8, 129u8, 115u8, 108u8, - 190u8, 194u8, 60u8, 179u8, 249u8, 51u8, 110u8, 4u8, 109u8, 50u8, 68u8, - 121u8, 101u8, 41u8, 203u8, 4u8, 18u8, 182u8, 245u8, 197u8, 244u8, - 195u8, + 165u8, 208u8, 120u8, 60u8, 9u8, 191u8, 94u8, 147u8, 17u8, 13u8, 38u8, + 196u8, 105u8, 123u8, 10u8, 222u8, 227u8, 230u8, 145u8, 91u8, 95u8, + 91u8, 93u8, 84u8, 216u8, 176u8, 53u8, 188u8, 251u8, 255u8, 113u8, + 204u8, ], ) } @@ -2625,7 +2666,7 @@ pub mod api { _0: impl ::std::borrow::Borrow<::core::primitive::u32>, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + runtime_types::bounded_collections::bounded_vec::BoundedVec< ::core::option::Option< runtime_types::pallet_scheduler::Scheduled< [::core::primitive::u8; 32usize], @@ -2649,9 +2690,10 @@ pub mod api { _0.borrow(), )], [ - 159u8, 237u8, 79u8, 176u8, 214u8, 27u8, 183u8, 165u8, 63u8, 185u8, - 233u8, 151u8, 81u8, 170u8, 97u8, 115u8, 47u8, 90u8, 254u8, 2u8, 66u8, - 209u8, 3u8, 247u8, 92u8, 11u8, 54u8, 144u8, 88u8, 172u8, 127u8, 143u8, + 130u8, 206u8, 243u8, 81u8, 169u8, 223u8, 74u8, 102u8, 75u8, 207u8, + 232u8, 175u8, 233u8, 167u8, 109u8, 190u8, 242u8, 24u8, 203u8, 144u8, + 31u8, 68u8, 147u8, 110u8, 77u8, 175u8, 2u8, 129u8, 127u8, 198u8, 49u8, + 151u8, ], ) } @@ -2660,7 +2702,7 @@ pub mod api { &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + runtime_types::bounded_collections::bounded_vec::BoundedVec< ::core::option::Option< runtime_types::pallet_scheduler::Scheduled< [::core::primitive::u8; 32usize], @@ -2682,9 +2724,10 @@ pub mod api { "Agenda", Vec::new(), [ - 159u8, 237u8, 79u8, 176u8, 214u8, 27u8, 183u8, 165u8, 63u8, 185u8, - 233u8, 151u8, 81u8, 170u8, 97u8, 115u8, 47u8, 90u8, 254u8, 2u8, 66u8, - 209u8, 3u8, 247u8, 92u8, 11u8, 54u8, 144u8, 88u8, 172u8, 127u8, 143u8, + 130u8, 206u8, 243u8, 81u8, 169u8, 223u8, 74u8, 102u8, 75u8, 207u8, + 232u8, 175u8, 233u8, 167u8, 109u8, 190u8, 242u8, 24u8, 203u8, 144u8, + 31u8, 68u8, 147u8, 110u8, 77u8, 175u8, 2u8, 129u8, 127u8, 198u8, 49u8, + 151u8, ], ) } @@ -2764,6 +2807,10 @@ pub mod api { ) } #[doc = " The maximum number of scheduled calls in the queue for a single block."] + #[doc = ""] + #[doc = " NOTE:"] + #[doc = " + Dependent pallets' benchmarks might require a higher limit for the setting. Set a"] + #[doc = " higher limit under `runtime-benchmarks` feature."] pub fn max_scheduled_per_block( &self, ) -> ::subxt::constants::Address<::core::primitive::u32> { @@ -2791,57 +2838,60 @@ pub mod api { use super::root_mod; use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct NotePreimage { - pub bytes: ::std::vec::Vec<::core::primitive::u8>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct UnnotePreimage { - pub hash: ::subxt::utils::H256, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RequestPreimage { - pub hash: ::subxt::utils::H256, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct UnrequestPreimage { - pub hash: ::subxt::utils::H256, + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct NotePreimage { + pub bytes: ::std::vec::Vec<::core::primitive::u8>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct UnnotePreimage { + pub hash: ::subxt::utils::H256, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct RequestPreimage { + pub hash: ::subxt::utils::H256, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct UnrequestPreimage { + pub hash: ::subxt::utils::H256, + } } pub struct TransactionApi; impl TransactionApi { @@ -2852,11 +2902,11 @@ pub mod api { pub fn note_preimage( &self, bytes: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Preimage", "note_preimage", - NotePreimage { bytes }, + types::NotePreimage { bytes }, [ 77u8, 48u8, 104u8, 3u8, 254u8, 65u8, 106u8, 95u8, 204u8, 89u8, 149u8, 29u8, 144u8, 188u8, 99u8, 23u8, 146u8, 142u8, 35u8, 17u8, 125u8, 130u8, @@ -2873,11 +2923,11 @@ pub mod api { pub fn unnote_preimage( &self, hash: ::subxt::utils::H256, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Preimage", "unnote_preimage", - UnnotePreimage { hash }, + types::UnnotePreimage { hash }, [ 211u8, 204u8, 205u8, 58u8, 33u8, 179u8, 68u8, 74u8, 149u8, 138u8, 213u8, 45u8, 140u8, 27u8, 106u8, 81u8, 68u8, 212u8, 147u8, 116u8, 27u8, @@ -2892,11 +2942,11 @@ pub mod api { pub fn request_preimage( &self, hash: ::subxt::utils::H256, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Preimage", "request_preimage", - RequestPreimage { hash }, + types::RequestPreimage { hash }, [ 195u8, 26u8, 146u8, 255u8, 79u8, 43u8, 73u8, 60u8, 115u8, 78u8, 99u8, 197u8, 137u8, 95u8, 139u8, 141u8, 79u8, 213u8, 170u8, 169u8, 127u8, @@ -2910,11 +2960,11 @@ pub mod api { pub fn unrequest_preimage( &self, hash: ::subxt::utils::H256, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Preimage", "unrequest_preimage", - UnrequestPreimage { hash }, + types::UnrequestPreimage { hash }, [ 143u8, 225u8, 239u8, 44u8, 237u8, 83u8, 18u8, 105u8, 101u8, 68u8, 111u8, 116u8, 66u8, 212u8, 63u8, 190u8, 38u8, 32u8, 105u8, 152u8, 69u8, @@ -3044,7 +3094,9 @@ pub mod api { _1: impl ::std::borrow::Borrow<::core::primitive::u32>, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::sp_core::bounded::bounded_vec::BoundedVec<::core::primitive::u8>, + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, ::subxt::storage::address::Yes, (), ::subxt::storage::address::Yes, @@ -3067,7 +3119,9 @@ pub mod api { &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::sp_core::bounded::bounded_vec::BoundedVec<::core::primitive::u8>, + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, (), (), ::subxt::storage::address::Yes, @@ -3096,62 +3150,65 @@ pub mod api { use super::root_mod; use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ReportEquivocation { - 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, + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ReportEquivocation { + 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, >, - runtime_types::sp_consensus_babe::app::Public, >, - >, - pub key_owner_proof: runtime_types::sp_session::MembershipProof, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ReportEquivocationUnsigned { - 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, + pub key_owner_proof: runtime_types::sp_session::MembershipProof, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ReportEquivocationUnsigned { + 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, >, - runtime_types::sp_consensus_babe::app::Public, >, - >, - pub key_owner_proof: runtime_types::sp_session::MembershipProof, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct PlanConfigChange { - pub config: runtime_types::sp_consensus_babe::digests::NextConfigDescriptor, + pub key_owner_proof: runtime_types::sp_session::MembershipProof, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct PlanConfigChange { + pub config: runtime_types::sp_consensus_babe::digests::NextConfigDescriptor, + } } pub struct TransactionApi; impl TransactionApi { @@ -3169,11 +3226,11 @@ pub mod api { runtime_types::sp_consensus_babe::app::Public, >, key_owner_proof: runtime_types::sp_session::MembershipProof, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Babe", "report_equivocation", - ReportEquivocation { + types::ReportEquivocation { equivocation_proof: ::std::boxed::Box::new(equivocation_proof), key_owner_proof, }, @@ -3203,11 +3260,11 @@ pub mod api { runtime_types::sp_consensus_babe::app::Public, >, key_owner_proof: runtime_types::sp_session::MembershipProof, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Babe", "report_equivocation_unsigned", - ReportEquivocationUnsigned { + types::ReportEquivocationUnsigned { equivocation_proof: ::std::boxed::Box::new(equivocation_proof), key_owner_proof, }, @@ -3226,11 +3283,11 @@ pub mod api { pub fn plan_config_change( &self, config: runtime_types::sp_consensus_babe::digests::NextConfigDescriptor, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Babe", "plan_config_change", - PlanConfigChange { config }, + types::PlanConfigChange { config }, [ 229u8, 157u8, 41u8, 58u8, 56u8, 4u8, 52u8, 107u8, 104u8, 20u8, 42u8, 110u8, 1u8, 17u8, 45u8, 196u8, 30u8, 135u8, 63u8, 46u8, 40u8, 137u8, @@ -3270,7 +3327,7 @@ pub mod api { &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec<( + runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec<( runtime_types::sp_consensus_babe::app::Public, ::core::primitive::u64, )>, @@ -3413,7 +3470,7 @@ pub mod api { &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec<( + runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec<( runtime_types::sp_consensus_babe::app::Public, ::core::primitive::u64, )>, @@ -3467,7 +3524,7 @@ pub mod api { _0: impl ::std::borrow::Borrow<::core::primitive::u32>, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + runtime_types::bounded_collections::bounded_vec::BoundedVec< [::core::primitive::u8; 32usize], >, ::subxt::storage::address::Yes, @@ -3492,7 +3549,7 @@ pub mod api { &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + runtime_types::bounded_collections::bounded_vec::BoundedVec< [::core::primitive::u8; 32usize], >, (), @@ -3526,10 +3583,9 @@ pub mod api { "Initialized", vec![], [ - 142u8, 101u8, 250u8, 113u8, 93u8, 201u8, 157u8, 18u8, 166u8, 153u8, - 59u8, 197u8, 107u8, 247u8, 124u8, 110u8, 202u8, 67u8, 62u8, 57u8, - 186u8, 134u8, 49u8, 182u8, 149u8, 44u8, 255u8, 85u8, 87u8, 177u8, - 149u8, 121u8, + 40u8, 135u8, 28u8, 144u8, 247u8, 208u8, 48u8, 220u8, 46u8, 60u8, 131u8, + 190u8, 196u8, 235u8, 126u8, 66u8, 34u8, 14u8, 32u8, 131u8, 71u8, 46u8, + 62u8, 207u8, 177u8, 213u8, 167u8, 34u8, 199u8, 29u8, 16u8, 236u8, ], ) } @@ -3656,6 +3712,37 @@ pub mod api { ], ) } + #[doc = " A list of the last 100 skipped epochs and the corresponding session index"] + #[doc = " when the epoch was skipped."] + #[doc = ""] + #[doc = " This is only used for validating equivocation proofs. An equivocation proof"] + #[doc = " must contains a key-ownership proof for a given session, therefore we need a"] + #[doc = " way to tie together sessions and epoch indices, i.e. we need to validate that"] + #[doc = " a validator was the owner of a given key on a given session, and what the"] + #[doc = " active epoch index was during that session."] + pub fn skipped_epochs( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::bounded_collections::bounded_vec::BoundedVec<( + ::core::primitive::u64, + ::core::primitive::u32, + )>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "Babe", + "SkippedEpochs", + vec![], + [ + 187u8, 66u8, 178u8, 110u8, 247u8, 41u8, 128u8, 194u8, 173u8, 197u8, + 28u8, 219u8, 112u8, 75u8, 9u8, 184u8, 51u8, 12u8, 121u8, 117u8, 176u8, + 213u8, 139u8, 144u8, 122u8, 72u8, 243u8, 105u8, 248u8, 63u8, 6u8, 87u8, + ], + ) + } } } pub mod constants { @@ -3724,19 +3811,22 @@ pub mod api { use super::root_mod; use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Set { - #[codec(compact)] - pub now: ::core::primitive::u64, + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Set { + #[codec(compact)] + pub now: ::core::primitive::u64, + } } pub struct TransactionApi; impl TransactionApi { @@ -3750,17 +3840,16 @@ pub mod api { #[doc = ""] #[doc = "The dispatch origin for this call must be `Inherent`."] #[doc = ""] - #[doc = "# "] + #[doc = "## Complexity"] #[doc = "- `O(1)` (Note that implementations of `OnTimestampSet` must also be `O(1)`)"] #[doc = "- 1 storage read and 1 storage mutation (codec `O(1)`). (because of `DidUpdate::take` in"] #[doc = " `on_finalize`)"] #[doc = "- 1 event handler `on_timestamp_set`. Must be `O(1)`."] - #[doc = "# "] - pub fn set(&self, now: ::core::primitive::u64) -> ::subxt::tx::Payload { + pub fn set(&self, now: ::core::primitive::u64) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Timestamp", "set", - Set { now }, + types::Set { now }, [ 6u8, 97u8, 172u8, 236u8, 118u8, 238u8, 228u8, 114u8, 15u8, 115u8, 102u8, 85u8, 66u8, 151u8, 16u8, 33u8, 187u8, 17u8, 166u8, 88u8, 127u8, @@ -3853,76 +3942,79 @@ pub mod api { use super::root_mod; use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Claim { - pub index: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Transfer { - pub new: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - pub index: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Free { - pub index: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceTransfer { - pub new: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - pub index: ::core::primitive::u32, - pub freeze: ::core::primitive::bool, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Freeze { - pub index: ::core::primitive::u32, + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Claim { + pub index: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Transfer { + pub new: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub index: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Free { + pub index: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ForceTransfer { + pub new: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub index: ::core::primitive::u32, + pub freeze: ::core::primitive::bool, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Freeze { + pub index: ::core::primitive::u32, + } } pub struct TransactionApi; impl TransactionApi { @@ -3936,19 +4028,16 @@ pub mod api { #[doc = ""] #[doc = "Emits `IndexAssigned` if successful."] #[doc = ""] - #[doc = "# "] + #[doc = "## Complexity"] #[doc = "- `O(1)`."] - #[doc = "- One storage mutation (codec `O(1)`)."] - #[doc = "- One reserve operation."] - #[doc = "- One event."] - #[doc = "-------------------"] - #[doc = "- DB Weight: 1 Read/Write (Accounts)"] - #[doc = "# "] - pub fn claim(&self, index: ::core::primitive::u32) -> ::subxt::tx::Payload { + pub fn claim( + &self, + index: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Indices", "claim", - Claim { index }, + types::Claim { index }, [ 5u8, 24u8, 11u8, 173u8, 226u8, 170u8, 0u8, 30u8, 193u8, 102u8, 214u8, 59u8, 252u8, 32u8, 221u8, 88u8, 196u8, 189u8, 244u8, 18u8, 233u8, 37u8, @@ -3966,25 +4055,17 @@ pub mod api { #[doc = ""] #[doc = "Emits `IndexAssigned` if successful."] #[doc = ""] - #[doc = "# "] + #[doc = "## Complexity"] #[doc = "- `O(1)`."] - #[doc = "- One storage mutation (codec `O(1)`)."] - #[doc = "- One transfer operation."] - #[doc = "- One event."] - #[doc = "-------------------"] - #[doc = "- DB Weight:"] - #[doc = " - Reads: Indices Accounts, System Account (recipient)"] - #[doc = " - Writes: Indices Accounts, System Account (recipient)"] - #[doc = "# "] pub fn transfer( &self, new: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, index: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Indices", "transfer", - Transfer { new, index }, + types::Transfer { new, index }, [ 154u8, 191u8, 183u8, 50u8, 185u8, 69u8, 126u8, 132u8, 12u8, 77u8, 146u8, 189u8, 254u8, 7u8, 72u8, 191u8, 118u8, 102u8, 180u8, 2u8, 161u8, @@ -4002,19 +4083,16 @@ pub mod api { #[doc = ""] #[doc = "Emits `IndexFreed` if successful."] #[doc = ""] - #[doc = "# "] + #[doc = "## Complexity"] #[doc = "- `O(1)`."] - #[doc = "- One storage mutation (codec `O(1)`)."] - #[doc = "- One reserve operation."] - #[doc = "- One event."] - #[doc = "-------------------"] - #[doc = "- DB Weight: 1 Read/Write (Accounts)"] - #[doc = "# "] - pub fn free(&self, index: ::core::primitive::u32) -> ::subxt::tx::Payload { + pub fn free( + &self, + index: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Indices", "free", - Free { index }, + types::Free { index }, [ 133u8, 202u8, 225u8, 127u8, 69u8, 145u8, 43u8, 13u8, 160u8, 248u8, 215u8, 243u8, 232u8, 166u8, 74u8, 203u8, 235u8, 138u8, 255u8, 27u8, @@ -4034,26 +4112,18 @@ pub mod api { #[doc = ""] #[doc = "Emits `IndexAssigned` if successful."] #[doc = ""] - #[doc = "# "] + #[doc = "## Complexity"] #[doc = "- `O(1)`."] - #[doc = "- One storage mutation (codec `O(1)`)."] - #[doc = "- Up to one reserve operation."] - #[doc = "- One event."] - #[doc = "-------------------"] - #[doc = "- DB Weight:"] - #[doc = " - Reads: Indices Accounts, System Account (original owner)"] - #[doc = " - Writes: Indices Accounts, System Account (original owner)"] - #[doc = "# "] pub fn force_transfer( &self, new: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, index: ::core::primitive::u32, freeze: ::core::primitive::bool, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Indices", "force_transfer", - ForceTransfer { new, index, freeze }, + types::ForceTransfer { new, index, freeze }, [ 37u8, 220u8, 91u8, 118u8, 222u8, 81u8, 225u8, 131u8, 101u8, 203u8, 60u8, 149u8, 102u8, 92u8, 58u8, 91u8, 227u8, 64u8, 229u8, 62u8, 201u8, @@ -4072,22 +4142,16 @@ pub mod api { #[doc = ""] #[doc = "Emits `IndexFrozen` if successful."] #[doc = ""] - #[doc = "# "] + #[doc = "## Complexity"] #[doc = "- `O(1)`."] - #[doc = "- One storage mutation (codec `O(1)`)."] - #[doc = "- Up to one slash operation."] - #[doc = "- One event."] - #[doc = "-------------------"] - #[doc = "- DB Weight: 1 Read/Write (Accounts)"] - #[doc = "# "] pub fn freeze( &self, index: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Indices", "freeze", - Freeze { index }, + types::Freeze { index }, [ 121u8, 45u8, 118u8, 2u8, 72u8, 48u8, 38u8, 7u8, 234u8, 204u8, 68u8, 20u8, 76u8, 251u8, 205u8, 246u8, 149u8, 31u8, 168u8, 186u8, 208u8, @@ -4249,187 +4313,208 @@ pub mod api { use super::root_mod; use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Transfer { - pub dest: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - #[codec(compact)] - pub value: ::core::primitive::u128, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetBalance { - pub who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - #[codec(compact)] - pub new_free: ::core::primitive::u128, - #[codec(compact)] - pub new_reserved: ::core::primitive::u128, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceTransfer { - pub source: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - pub dest: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - #[codec(compact)] - pub value: ::core::primitive::u128, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct TransferKeepAlive { - pub dest: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - #[codec(compact)] - pub value: ::core::primitive::u128, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct TransferAll { - pub dest: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - pub keep_alive: ::core::primitive::bool, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceUnreserve { - pub who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - pub amount: ::core::primitive::u128, + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct TransferAllowDeath { + pub dest: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + #[codec(compact)] + pub value: ::core::primitive::u128, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetBalanceDeprecated { + pub who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + #[codec(compact)] + pub new_free: ::core::primitive::u128, + #[codec(compact)] + pub old_reserved: ::core::primitive::u128, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ForceTransfer { + pub source: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub dest: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + #[codec(compact)] + pub value: ::core::primitive::u128, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct TransferKeepAlive { + pub dest: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + #[codec(compact)] + pub value: ::core::primitive::u128, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct TransferAll { + pub dest: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub keep_alive: ::core::primitive::bool, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ForceUnreserve { + pub who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub amount: ::core::primitive::u128, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct UpgradeAccounts { + pub who: ::std::vec::Vec<::subxt::utils::AccountId32>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Transfer { + pub dest: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + #[codec(compact)] + pub value: ::core::primitive::u128, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ForceSetBalance { + pub who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + #[codec(compact)] + pub new_free: ::core::primitive::u128, + } } pub struct TransactionApi; impl TransactionApi { #[doc = "Transfer some liquid free balance to another account."] #[doc = ""] - #[doc = "`transfer` will set the `FreeBalance` of the sender and receiver."] + #[doc = "`transfer_allow_death` will set the `FreeBalance` of the sender and receiver."] #[doc = "If the sender's account is below the existential deposit as a result"] #[doc = "of the transfer, the account will be reaped."] #[doc = ""] #[doc = "The dispatch origin for this call must be `Signed` by the transactor."] - #[doc = ""] - #[doc = "# "] - #[doc = "- Dependent on arguments but not critical, given proper implementations for input config"] - #[doc = " types. See related functions below."] - #[doc = "- It contains a limited number of reads and writes internally and no complex"] - #[doc = " computation."] - #[doc = ""] - #[doc = "Related functions:"] - #[doc = ""] - #[doc = " - `ensure_can_withdraw` is always called internally but has a bounded complexity."] - #[doc = " - Transferring balances to accounts that did not exist before will cause"] - #[doc = " `T::OnNewAccount::on_new_account` to be called."] - #[doc = " - Removing enough funds from an account will trigger `T::DustRemoval::on_unbalanced`."] - #[doc = " - `transfer_keep_alive` works the same way as `transfer`, but has an additional check"] - #[doc = " that the transfer will not kill the origin account."] - #[doc = "---------------------------------"] - #[doc = "- Origin account is already in memory, so no DB operations for them."] - #[doc = "# "] - pub fn transfer( + pub fn transfer_allow_death( &self, dest: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, value: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Balances", - "transfer", - Transfer { dest, value }, + "transfer_allow_death", + types::TransferAllowDeath { dest, value }, [ - 111u8, 222u8, 32u8, 56u8, 171u8, 77u8, 252u8, 29u8, 194u8, 155u8, - 200u8, 192u8, 198u8, 81u8, 23u8, 115u8, 236u8, 91u8, 218u8, 114u8, - 107u8, 141u8, 138u8, 100u8, 237u8, 21u8, 58u8, 172u8, 3u8, 20u8, 216u8, - 38u8, + 234u8, 130u8, 149u8, 36u8, 235u8, 112u8, 159u8, 189u8, 104u8, 148u8, + 108u8, 230u8, 25u8, 198u8, 71u8, 158u8, 112u8, 3u8, 162u8, 25u8, 145u8, + 252u8, 44u8, 63u8, 47u8, 34u8, 47u8, 158u8, 61u8, 14u8, 120u8, 255u8, ], ) } - #[doc = "Set the balances of a given account."] - #[doc = ""] - #[doc = "This will alter `FreeBalance` and `ReservedBalance` in storage. it will"] - #[doc = "also alter the total issuance of the system (`TotalIssuance`) appropriately."] - #[doc = "If the new free or reserved balance is below the existential deposit,"] - #[doc = "it will reset the account nonce (`frame_system::AccountNonce`)."] + #[doc = "Set the regular balance of a given account; it also takes a reserved balance but this"] + #[doc = "must be the same as the account's current reserved balance."] #[doc = ""] #[doc = "The dispatch origin for this call is `root`."] - pub fn set_balance( + #[doc = ""] + #[doc = "WARNING: This call is DEPRECATED! Use `force_set_balance` instead."] + pub fn set_balance_deprecated( &self, who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, new_free: ::core::primitive::u128, - new_reserved: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { + old_reserved: ::core::primitive::u128, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Balances", - "set_balance", - SetBalance { + "set_balance_deprecated", + types::SetBalanceDeprecated { who, new_free, - new_reserved, + old_reserved, }, [ - 234u8, 215u8, 97u8, 98u8, 243u8, 199u8, 57u8, 76u8, 59u8, 161u8, 118u8, - 207u8, 34u8, 197u8, 198u8, 61u8, 231u8, 210u8, 169u8, 235u8, 150u8, - 137u8, 173u8, 49u8, 28u8, 77u8, 84u8, 149u8, 143u8, 210u8, 139u8, - 193u8, + 240u8, 107u8, 184u8, 206u8, 78u8, 106u8, 115u8, 152u8, 130u8, 56u8, + 156u8, 176u8, 105u8, 27u8, 176u8, 187u8, 49u8, 171u8, 229u8, 79u8, + 254u8, 248u8, 8u8, 162u8, 134u8, 12u8, 89u8, 100u8, 137u8, 102u8, + 132u8, 158u8, ], ) } - #[doc = "Exactly as `transfer`, except the origin must be root and the source account may be"] - #[doc = "specified."] - #[doc = "# "] - #[doc = "- Same as transfer, but additional read and write because the source account is not"] - #[doc = " assumed to be in the overlay."] - #[doc = "# "] + #[doc = "Exactly as `transfer_allow_death`, except the origin must be root and the source account"] + #[doc = "may be specified."] pub fn force_transfer( &self, source: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, dest: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, value: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Balances", "force_transfer", - ForceTransfer { + types::ForceTransfer { source, dest, value, @@ -4442,21 +4527,21 @@ pub mod api { ], ) } - #[doc = "Same as the [`transfer`] call, but with a check that the transfer will not kill the"] - #[doc = "origin account."] + #[doc = "Same as the [`transfer_allow_death`] call, but with a check that the transfer will not"] + #[doc = "kill the origin account."] #[doc = ""] - #[doc = "99% of the time you want [`transfer`] instead."] + #[doc = "99% of the time you want [`transfer_allow_death`] instead."] #[doc = ""] - #[doc = "[`transfer`]: struct.Pallet.html#method.transfer"] + #[doc = "[`transfer_allow_death`]: struct.Pallet.html#method.transfer"] pub fn transfer_keep_alive( &self, dest: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, value: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Balances", "transfer_keep_alive", - TransferKeepAlive { dest, value }, + types::TransferKeepAlive { dest, value }, [ 112u8, 179u8, 75u8, 168u8, 193u8, 221u8, 9u8, 82u8, 190u8, 113u8, 253u8, 13u8, 130u8, 134u8, 170u8, 216u8, 136u8, 111u8, 242u8, 220u8, @@ -4479,18 +4564,16 @@ pub mod api { #[doc = "- `keep_alive`: A boolean to determine if the `transfer_all` operation should send all"] #[doc = " of the funds the account has, causing the sender account to be killed (false), or"] #[doc = " transfer everything except at least the existential deposit, which will guarantee to"] - #[doc = " keep the sender account alive (true). # "] - #[doc = "- O(1). Just like transfer, but reading the user's transferable balance first."] - #[doc = " #"] + #[doc = " keep the sender account alive (true)."] pub fn transfer_all( &self, dest: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, keep_alive: ::core::primitive::bool, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Balances", "transfer_all", - TransferAll { dest, keep_alive }, + types::TransferAll { dest, keep_alive }, [ 46u8, 129u8, 29u8, 177u8, 221u8, 107u8, 245u8, 69u8, 238u8, 126u8, 145u8, 26u8, 219u8, 208u8, 14u8, 80u8, 149u8, 1u8, 214u8, 63u8, 67u8, @@ -4506,11 +4589,11 @@ pub mod api { &self, who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, amount: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Balances", "force_unreserve", - ForceUnreserve { who, amount }, + types::ForceUnreserve { who, amount }, [ 160u8, 146u8, 137u8, 76u8, 157u8, 187u8, 66u8, 148u8, 207u8, 76u8, 32u8, 254u8, 82u8, 215u8, 35u8, 161u8, 213u8, 52u8, 32u8, 98u8, 102u8, @@ -4519,6 +4602,68 @@ pub mod api { ], ) } + #[doc = "Upgrade a specified account."] + #[doc = ""] + #[doc = "- `origin`: Must be `Signed`."] + #[doc = "- `who`: The account to be upgraded."] + #[doc = ""] + #[doc = "This will waive the transaction fee if at least all but 10% of the accounts needed to"] + #[doc = "be upgraded. (We let some not have to be upgraded just in order to allow for the"] + #[doc = "possibililty of churn)."] + pub fn upgrade_accounts( + &self, + who: ::std::vec::Vec<::subxt::utils::AccountId32>, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Balances", + "upgrade_accounts", + types::UpgradeAccounts { who }, + [ + 164u8, 61u8, 119u8, 24u8, 165u8, 46u8, 197u8, 59u8, 39u8, 198u8, 228u8, + 96u8, 228u8, 45u8, 85u8, 51u8, 37u8, 5u8, 75u8, 40u8, 241u8, 163u8, + 86u8, 228u8, 151u8, 217u8, 47u8, 105u8, 203u8, 103u8, 207u8, 4u8, + ], + ) + } + #[doc = "Alias for `transfer_allow_death`, provided only for name-wise compatibility."] + #[doc = ""] + #[doc = "WARNING: DEPRECATED! Will be released in approximately 3 months."] + pub fn transfer( + &self, + dest: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + value: ::core::primitive::u128, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Balances", + "transfer", + types::Transfer { dest, value }, + [ + 111u8, 222u8, 32u8, 56u8, 171u8, 77u8, 252u8, 29u8, 194u8, 155u8, + 200u8, 192u8, 198u8, 81u8, 23u8, 115u8, 236u8, 91u8, 218u8, 114u8, + 107u8, 141u8, 138u8, 100u8, 237u8, 21u8, 58u8, 172u8, 3u8, 20u8, 216u8, + 38u8, + ], + ) + } + #[doc = "Set the regular balance of a given account."] + #[doc = ""] + #[doc = "The dispatch origin for this call is `root`."] + pub fn force_set_balance( + &self, + who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + new_free: ::core::primitive::u128, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Balances", + "force_set_balance", + types::ForceSetBalance { who, new_free }, + [ + 237u8, 4u8, 41u8, 58u8, 62u8, 179u8, 160u8, 4u8, 50u8, 71u8, 178u8, + 36u8, 130u8, 130u8, 92u8, 229u8, 16u8, 245u8, 169u8, 109u8, 165u8, + 72u8, 94u8, 70u8, 196u8, 136u8, 37u8, 94u8, 140u8, 215u8, 125u8, 125u8, + ], + ) + } } } #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] @@ -4598,7 +4743,6 @@ pub mod api { pub struct BalanceSet { pub who: ::subxt::utils::AccountId32, pub free: ::core::primitive::u128, - pub reserved: ::core::primitive::u128, } impl ::subxt::events::StaticEvent for BalanceSet { const PALLET: &'static str = "Balances"; @@ -4722,6 +4866,176 @@ pub mod api { const PALLET: &'static str = "Balances"; const EVENT: &'static str = "Slashed"; } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Some amount was minted into an account."] + pub struct Minted { + pub who: ::subxt::utils::AccountId32, + pub amount: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for Minted { + const PALLET: &'static str = "Balances"; + const EVENT: &'static str = "Minted"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Some amount was burned from an account."] + pub struct Burned { + pub who: ::subxt::utils::AccountId32, + pub amount: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for Burned { + const PALLET: &'static str = "Balances"; + const EVENT: &'static str = "Burned"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Some amount was suspended from an account (it can be restored later)."] + pub struct Suspended { + pub who: ::subxt::utils::AccountId32, + pub amount: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for Suspended { + const PALLET: &'static str = "Balances"; + const EVENT: &'static str = "Suspended"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Some amount was restored into an account."] + pub struct Restored { + pub who: ::subxt::utils::AccountId32, + pub amount: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for Restored { + const PALLET: &'static str = "Balances"; + const EVENT: &'static str = "Restored"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "An account was upgraded."] + pub struct Upgraded { + pub who: ::subxt::utils::AccountId32, + } + impl ::subxt::events::StaticEvent for Upgraded { + const PALLET: &'static str = "Balances"; + const EVENT: &'static str = "Upgraded"; + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Total issuance was increased by `amount`, creating a credit to be balanced."] + pub struct Issued { + pub amount: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for Issued { + const PALLET: &'static str = "Balances"; + const EVENT: &'static str = "Issued"; + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Total issuance was decreased by `amount`, creating a debt to be balanced."] + pub struct Rescinded { + pub amount: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for Rescinded { + const PALLET: &'static str = "Balances"; + const EVENT: &'static str = "Rescinded"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Some balance was locked."] + pub struct Locked { + pub who: ::subxt::utils::AccountId32, + pub amount: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for Locked { + const PALLET: &'static str = "Balances"; + const EVENT: &'static str = "Locked"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Some balance was unlocked."] + pub struct Unlocked { + pub who: ::subxt::utils::AccountId32, + pub amount: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for Unlocked { + const PALLET: &'static str = "Balances"; + const EVENT: &'static str = "Unlocked"; + } } pub mod storage { use super::runtime_types; @@ -4748,6 +5062,28 @@ pub mod api { ], ) } + #[doc = " The total units of outstanding deactivated balance in the system."] + pub fn inactive_issuance( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u128, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "Balances", + "InactiveIssuance", + vec![], + [ + 74u8, 203u8, 111u8, 142u8, 225u8, 104u8, 173u8, 51u8, 226u8, 12u8, + 85u8, 135u8, 41u8, 206u8, 177u8, 238u8, 94u8, 246u8, 184u8, 250u8, + 140u8, 213u8, 91u8, 118u8, 163u8, 111u8, 211u8, 46u8, 204u8, 160u8, + 154u8, 21u8, + ], + ) + } #[doc = " The Balances pallet example of storing the balance of an account."] #[doc = ""] #[doc = " # Example"] @@ -4777,7 +5113,7 @@ pub mod api { _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_balances::AccountData<::core::primitive::u128>, + runtime_types::pallet_balances::types::AccountData<::core::primitive::u128>, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, @@ -4789,9 +5125,10 @@ pub mod api { _0.borrow(), )], [ - 246u8, 154u8, 253u8, 71u8, 192u8, 192u8, 192u8, 236u8, 128u8, 80u8, - 40u8, 252u8, 201u8, 43u8, 3u8, 131u8, 19u8, 49u8, 141u8, 240u8, 172u8, - 217u8, 215u8, 109u8, 87u8, 135u8, 248u8, 57u8, 98u8, 185u8, 22u8, 4u8, + 109u8, 250u8, 18u8, 96u8, 139u8, 232u8, 4u8, 139u8, 133u8, 239u8, 30u8, + 237u8, 73u8, 209u8, 143u8, 160u8, 94u8, 248u8, 124u8, 43u8, 224u8, + 165u8, 11u8, 6u8, 176u8, 144u8, 189u8, 161u8, 174u8, 210u8, 56u8, + 225u8, ], ) } @@ -4823,7 +5160,7 @@ pub mod api { &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_balances::AccountData<::core::primitive::u128>, + runtime_types::pallet_balances::types::AccountData<::core::primitive::u128>, (), ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, @@ -4833,9 +5170,10 @@ pub mod api { "Account", Vec::new(), [ - 246u8, 154u8, 253u8, 71u8, 192u8, 192u8, 192u8, 236u8, 128u8, 80u8, - 40u8, 252u8, 201u8, 43u8, 3u8, 131u8, 19u8, 49u8, 141u8, 240u8, 172u8, - 217u8, 215u8, 109u8, 87u8, 135u8, 248u8, 57u8, 98u8, 185u8, 22u8, 4u8, + 109u8, 250u8, 18u8, 96u8, 139u8, 232u8, 4u8, 139u8, 133u8, 239u8, 30u8, + 237u8, 73u8, 209u8, 143u8, 160u8, 94u8, 248u8, 124u8, 43u8, 224u8, + 165u8, 11u8, 6u8, 176u8, 144u8, 189u8, 161u8, 174u8, 210u8, 56u8, + 225u8, ], ) } @@ -4846,8 +5184,8 @@ pub mod api { _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec< - runtime_types::pallet_balances::BalanceLock<::core::primitive::u128>, + runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec< + runtime_types::pallet_balances::types::BalanceLock<::core::primitive::u128>, >, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, @@ -4872,8 +5210,8 @@ pub mod api { &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec< - runtime_types::pallet_balances::BalanceLock<::core::primitive::u128>, + runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec< + runtime_types::pallet_balances::types::BalanceLock<::core::primitive::u128>, >, (), ::subxt::storage::address::Yes, @@ -4896,8 +5234,8 @@ pub mod api { _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - runtime_types::pallet_balances::ReserveData< + runtime_types::bounded_collections::bounded_vec::BoundedVec< + runtime_types::pallet_balances::types::ReserveData< [::core::primitive::u8; 8usize], ::core::primitive::u128, >, @@ -4924,8 +5262,8 @@ pub mod api { &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - runtime_types::pallet_balances::ReserveData< + runtime_types::bounded_collections::bounded_vec::BoundedVec< + runtime_types::pallet_balances::types::ReserveData< [::core::primitive::u8; 8usize], ::core::primitive::u128, >, @@ -4945,27 +5283,113 @@ pub mod api { ], ) } - #[doc = " Storage version of the pallet."] - #[doc = ""] - #[doc = " This is set to v2.0.0 for new networks."] - pub fn storage_version( + #[doc = " Holds on account balances."] + pub fn holds( &self, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_balances::Releases, + runtime_types::bounded_collections::bounded_vec::BoundedVec< + runtime_types::pallet_balances::types::IdAmount< + (), + ::core::primitive::u128, + >, + >, + ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Balances", + "Holds", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], + [ + 247u8, 81u8, 4u8, 220u8, 77u8, 205u8, 28u8, 131u8, 215u8, 74u8, 197u8, + 137u8, 113u8, 214u8, 249u8, 91u8, 81u8, 216u8, 8u8, 5u8, 233u8, 39u8, + 104u8, 250u8, 3u8, 228u8, 148u8, 78u8, 4u8, 34u8, 45u8, 143u8, + ], + ) + } + #[doc = " Holds on account balances."] + pub fn holds_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::bounded_collections::bounded_vec::BoundedVec< + runtime_types::pallet_balances::types::IdAmount< + (), + ::core::primitive::u128, + >, + >, (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( "Balances", - "StorageVersion", - vec![], + "Holds", + Vec::new(), + [ + 247u8, 81u8, 4u8, 220u8, 77u8, 205u8, 28u8, 131u8, 215u8, 74u8, 197u8, + 137u8, 113u8, 214u8, 249u8, 91u8, 81u8, 216u8, 8u8, 5u8, 233u8, 39u8, + 104u8, 250u8, 3u8, 228u8, 148u8, 78u8, 4u8, 34u8, 45u8, 143u8, + ], + ) + } + #[doc = " Freeze locks on account balances."] + pub fn freezes( + &self, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::bounded_collections::bounded_vec::BoundedVec< + runtime_types::pallet_balances::types::IdAmount< + (), + ::core::primitive::u128, + >, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Balances", + "Freezes", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], + [ + 211u8, 24u8, 237u8, 217u8, 47u8, 230u8, 147u8, 39u8, 112u8, 209u8, + 193u8, 47u8, 242u8, 13u8, 241u8, 0u8, 100u8, 45u8, 116u8, 130u8, 246u8, + 196u8, 50u8, 134u8, 135u8, 112u8, 206u8, 1u8, 12u8, 53u8, 106u8, 131u8, + ], + ) + } + #[doc = " Freeze locks on account balances."] + pub fn freezes_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::bounded_collections::bounded_vec::BoundedVec< + runtime_types::pallet_balances::types::IdAmount< + (), + ::core::primitive::u128, + >, + >, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Balances", + "Freezes", + Vec::new(), [ - 135u8, 96u8, 28u8, 234u8, 124u8, 212u8, 56u8, 140u8, 40u8, 101u8, - 235u8, 128u8, 136u8, 221u8, 182u8, 81u8, 17u8, 9u8, 184u8, 228u8, - 174u8, 165u8, 200u8, 162u8, 214u8, 178u8, 227u8, 72u8, 34u8, 5u8, - 173u8, 96u8, + 211u8, 24u8, 237u8, 217u8, 47u8, 230u8, 147u8, 39u8, 112u8, 209u8, + 193u8, 47u8, 242u8, 13u8, 241u8, 0u8, 100u8, 45u8, 116u8, 130u8, 246u8, + 196u8, 50u8, 134u8, 135u8, 112u8, 206u8, 1u8, 12u8, 53u8, 106u8, 131u8, ], ) } @@ -4975,7 +5399,14 @@ pub mod api { use super::runtime_types; pub struct ConstantsApi; impl ConstantsApi { - #[doc = " The minimum amount required to keep an account open."] + #[doc = " The minimum amount required to keep an account open. MUST BE GREATER THAN ZERO!"] + #[doc = ""] + #[doc = " If you *really* need it to be zero, you can enable the feature `insecure_zero_ed` for"] + #[doc = " this pallet. However, you do so at your own risk: this will open up a major DoS vector."] + #[doc = " In case you have multiple sources of provider references, you may also get unexpected"] + #[doc = " behaviour if you set this to zero."] + #[doc = ""] + #[doc = " Bottom line: Do yourself a favour and make it at least one!"] pub fn existential_deposit( &self, ) -> ::subxt::constants::Address<::core::primitive::u128> { @@ -5016,6 +5447,32 @@ pub mod api { ], ) } + #[doc = " The maximum number of holds that can exist on an account at any time."] + pub fn max_holds(&self) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "Balances", + "MaxHolds", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " The maximum number of individual freeze locks that can exist on an account at any time."] + pub fn max_freezes(&self) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "Balances", + "MaxFreezes", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } } } } @@ -5140,89 +5597,10 @@ pub mod api { pub mod authorship { use super::root_mod; use super::runtime_types; - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub type Error = runtime_types::pallet_authorship::pallet::Error; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetUncles { - pub new_uncles: ::std::vec::Vec< - runtime_types::sp_runtime::generic::header::Header< - ::core::primitive::u32, - runtime_types::sp_runtime::traits::BlakeTwo256, - >, - >, - } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Provide a set of uncles."] - pub fn set_uncles( - &self, - new_uncles: ::std::vec::Vec< - runtime_types::sp_runtime::generic::header::Header< - ::core::primitive::u32, - runtime_types::sp_runtime::traits::BlakeTwo256, - >, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Authorship", - "set_uncles", - SetUncles { new_uncles }, - [ - 181u8, 70u8, 222u8, 83u8, 154u8, 215u8, 200u8, 64u8, 154u8, 228u8, - 115u8, 247u8, 117u8, 89u8, 229u8, 102u8, 128u8, 189u8, 90u8, 60u8, - 223u8, 19u8, 111u8, 172u8, 5u8, 223u8, 132u8, 37u8, 235u8, 119u8, 42u8, - 64u8, - ], - ) - } - } - } pub mod storage { use super::runtime_types; pub struct StorageApi; impl StorageApi { - #[doc = " Uncles"] - pub fn uncles( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - runtime_types::pallet_authorship::UncleEntryItem< - ::core::primitive::u32, - ::subxt::utils::H256, - ::subxt::utils::AccountId32, - >, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Authorship", - "Uncles", - vec![], - [ - 193u8, 226u8, 196u8, 151u8, 233u8, 82u8, 60u8, 164u8, 27u8, 156u8, - 231u8, 51u8, 79u8, 134u8, 170u8, 166u8, 71u8, 120u8, 250u8, 255u8, - 52u8, 168u8, 74u8, 199u8, 122u8, 253u8, 248u8, 178u8, 39u8, 233u8, - 132u8, 67u8, - ], - ) - } #[doc = " Author of current block."] pub fn author( &self, @@ -5245,50 +5623,6 @@ pub mod api { ], ) } - #[doc = " Whether uncles were already set in this block."] - pub fn did_set_uncles( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::bool, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Authorship", - "DidSetUncles", - vec![], - [ - 64u8, 3u8, 208u8, 187u8, 50u8, 45u8, 37u8, 88u8, 163u8, 226u8, 37u8, - 126u8, 232u8, 107u8, 156u8, 187u8, 29u8, 15u8, 53u8, 46u8, 28u8, 73u8, - 83u8, 123u8, 14u8, 244u8, 243u8, 43u8, 245u8, 143u8, 15u8, 115u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " The number of blocks back we should accept uncles."] - #[doc = " This means that we will deal with uncle-parents that are"] - #[doc = " `UncleGenerations + 1` before `now`."] - pub fn uncle_generations( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "Authorship", - "UncleGenerations", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, - ], - ) - } } } } @@ -5302,386 +5636,408 @@ pub mod api { use super::root_mod; use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Bond { - pub controller: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - #[codec(compact)] - pub value: ::core::primitive::u128, - pub payee: - runtime_types::pallet_staking::RewardDestination<::subxt::utils::AccountId32>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct BondExtra { - #[codec(compact)] - pub max_additional: ::core::primitive::u128, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Unbond { - #[codec(compact)] - pub value: ::core::primitive::u128, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct WithdrawUnbonded { - pub num_slashing_spans: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Validate { - pub prefs: runtime_types::pallet_staking::ValidatorPrefs, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Nominate { - pub targets: - ::std::vec::Vec<::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Chill; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetPayee { - pub payee: - runtime_types::pallet_staking::RewardDestination<::subxt::utils::AccountId32>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetController { - pub controller: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetValidatorCount { - #[codec(compact)] - pub new: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct IncreaseValidatorCount { - #[codec(compact)] - pub additional: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ScaleValidatorCount { - pub factor: runtime_types::sp_arithmetic::per_things::Percent, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceNoEras; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceNewEra; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetInvulnerables { - pub invulnerables: ::std::vec::Vec<::subxt::utils::AccountId32>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceUnstake { - pub stash: ::subxt::utils::AccountId32, - pub num_slashing_spans: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceNewEraAlways; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CancelDeferredSlash { - pub era: ::core::primitive::u32, - pub slash_indices: ::std::vec::Vec<::core::primitive::u32>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct PayoutStakers { - pub validator_stash: ::subxt::utils::AccountId32, - pub era: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Rebond { - #[codec(compact)] - pub value: ::core::primitive::u128, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ReapStash { - pub stash: ::subxt::utils::AccountId32, - pub num_slashing_spans: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Kick { - pub who: - ::std::vec::Vec<::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetStakingConfigs { - pub min_nominator_bond: runtime_types::pallet_staking::pallet::pallet::ConfigOp< - ::core::primitive::u128, - >, - pub min_validator_bond: runtime_types::pallet_staking::pallet::pallet::ConfigOp< - ::core::primitive::u128, - >, - pub max_nominator_count: - runtime_types::pallet_staking::pallet::pallet::ConfigOp<::core::primitive::u32>, - pub max_validator_count: - runtime_types::pallet_staking::pallet::pallet::ConfigOp<::core::primitive::u32>, - pub chill_threshold: runtime_types::pallet_staking::pallet::pallet::ConfigOp< - runtime_types::sp_arithmetic::per_things::Percent, - >, - pub min_commission: runtime_types::pallet_staking::pallet::pallet::ConfigOp< - runtime_types::sp_arithmetic::per_things::Perbill, - >, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ChillOther { - pub controller: ::subxt::utils::AccountId32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceApplyMinCommission { - pub validator_stash: ::subxt::utils::AccountId32, - } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Take the origin account as a stash and lock up `value` of its balance. `controller` will"] - #[doc = "be the account that controls it."] - #[doc = ""] - #[doc = "`value` must be more than the `minimum_balance` specified by `T::Currency`."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ by the stash account."] - #[doc = ""] - #[doc = "Emits `Bonded`."] - #[doc = "# "] - #[doc = "- Independent of the arguments. Moderate complexity."] - #[doc = "- O(1)."] - #[doc = "- Three extra DB entries."] - #[doc = ""] - #[doc = "NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned"] - #[doc = "unless the `origin` falls below _existential deposit_ and gets removed as dust."] - #[doc = "------------------"] - #[doc = "# "] - pub fn bond( - &self, - controller: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - value: ::core::primitive::u128, - payee: runtime_types::pallet_staking::RewardDestination< + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Bond { + pub controller: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + #[codec(compact)] + pub value: ::core::primitive::u128, + pub payee: runtime_types::pallet_staking::RewardDestination< ::subxt::utils::AccountId32, >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Staking", - "bond", - Bond { + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct BondExtra { + #[codec(compact)] + pub max_additional: ::core::primitive::u128, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Unbond { + #[codec(compact)] + pub value: ::core::primitive::u128, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct WithdrawUnbonded { + pub num_slashing_spans: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Validate { + pub prefs: runtime_types::pallet_staking::ValidatorPrefs, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Nominate { + pub targets: ::std::vec::Vec< + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + >, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Chill; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetPayee { + pub payee: runtime_types::pallet_staking::RewardDestination< + ::subxt::utils::AccountId32, + >, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetController { + pub controller: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetValidatorCount { + #[codec(compact)] + pub new: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct IncreaseValidatorCount { + #[codec(compact)] + pub additional: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ScaleValidatorCount { + pub factor: runtime_types::sp_arithmetic::per_things::Percent, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ForceNoEras; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ForceNewEra; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetInvulnerables { + pub invulnerables: ::std::vec::Vec<::subxt::utils::AccountId32>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ForceUnstake { + pub stash: ::subxt::utils::AccountId32, + pub num_slashing_spans: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ForceNewEraAlways; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct CancelDeferredSlash { + pub era: ::core::primitive::u32, + pub slash_indices: ::std::vec::Vec<::core::primitive::u32>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct PayoutStakers { + pub validator_stash: ::subxt::utils::AccountId32, + pub era: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Rebond { + #[codec(compact)] + pub value: ::core::primitive::u128, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ReapStash { + pub stash: ::subxt::utils::AccountId32, + pub num_slashing_spans: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Kick { + pub who: ::std::vec::Vec< + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + >, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetStakingConfigs { + pub min_nominator_bond: runtime_types::pallet_staking::pallet::pallet::ConfigOp< + ::core::primitive::u128, + >, + pub min_validator_bond: runtime_types::pallet_staking::pallet::pallet::ConfigOp< + ::core::primitive::u128, + >, + pub max_nominator_count: + runtime_types::pallet_staking::pallet::pallet::ConfigOp< + ::core::primitive::u32, + >, + pub max_validator_count: + runtime_types::pallet_staking::pallet::pallet::ConfigOp< + ::core::primitive::u32, + >, + pub chill_threshold: runtime_types::pallet_staking::pallet::pallet::ConfigOp< + runtime_types::sp_arithmetic::per_things::Percent, + >, + pub min_commission: runtime_types::pallet_staking::pallet::pallet::ConfigOp< + runtime_types::sp_arithmetic::per_things::Perbill, + >, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ChillOther { + pub controller: ::subxt::utils::AccountId32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ForceApplyMinCommission { + pub validator_stash: ::subxt::utils::AccountId32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetMinCommission { + pub new: runtime_types::sp_arithmetic::per_things::Perbill, + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Take the origin account as a stash and lock up `value` of its balance. `controller` will"] + #[doc = "be the account that controls it."] + #[doc = ""] + #[doc = "`value` must be more than the `minimum_balance` specified by `T::Currency`."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ by the stash account."] + #[doc = ""] + #[doc = "Emits `Bonded`."] + #[doc = "## Complexity"] + #[doc = "- Independent of the arguments. Moderate complexity."] + #[doc = "- O(1)."] + #[doc = "- Three extra DB entries."] + #[doc = ""] + #[doc = "NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned"] + #[doc = "unless the `origin` falls below _existential deposit_ and gets removed as dust."] + pub fn bond( + &self, + controller: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + value: ::core::primitive::u128, + payee: runtime_types::pallet_staking::RewardDestination< + ::subxt::utils::AccountId32, + >, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Staking", + "bond", + types::Bond { controller, value, payee, @@ -5705,18 +6061,17 @@ pub mod api { #[doc = ""] #[doc = "Emits `Bonded`."] #[doc = ""] - #[doc = "# "] + #[doc = "## Complexity"] #[doc = "- Independent of the arguments. Insignificant complexity."] #[doc = "- O(1)."] - #[doc = "# "] pub fn bond_extra( &self, max_additional: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Staking", "bond_extra", - BondExtra { max_additional }, + types::BondExtra { max_additional }, [ 60u8, 45u8, 82u8, 223u8, 113u8, 95u8, 0u8, 71u8, 59u8, 108u8, 228u8, 9u8, 95u8, 210u8, 113u8, 106u8, 252u8, 15u8, 19u8, 128u8, 11u8, 187u8, @@ -5734,8 +6089,8 @@ pub mod api { #[doc = "the funds out of management ready for transfer."] #[doc = ""] #[doc = "No more than a limited number of unlocking chunks (see `MaxUnlockingChunks`)"] - #[doc = "can co-exists at the same time. In that case, [`Call::withdraw_unbonded`] need"] - #[doc = "to be called first to remove some of the chunks (if possible)."] + #[doc = "can co-exists at the same time. If there are no unlocking chunks slots available"] + #[doc = "[`Call::withdraw_unbonded`] is called to remove some of the chunks (if possible)."] #[doc = ""] #[doc = "If a user encounters the `InsufficientBond` error when calling this extrinsic,"] #[doc = "they should call `chill` first in order to free up their bonded funds."] @@ -5746,11 +6101,11 @@ pub mod api { pub fn unbond( &self, value: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Staking", "unbond", - Unbond { value }, + types::Unbond { value }, [ 85u8, 62u8, 34u8, 127u8, 60u8, 241u8, 134u8, 60u8, 125u8, 91u8, 31u8, 193u8, 50u8, 230u8, 237u8, 42u8, 114u8, 230u8, 240u8, 146u8, 14u8, @@ -5770,18 +6125,17 @@ pub mod api { #[doc = ""] #[doc = "See also [`Call::unbond`]."] #[doc = ""] - #[doc = "# "] - #[doc = "Complexity O(S) where S is the number of slashing spans to remove"] + #[doc = "## Complexity"] + #[doc = "O(S) where S is the number of slashing spans to remove"] #[doc = "NOTE: Weight annotation is the kill scenario, we refund otherwise."] - #[doc = "# "] pub fn withdraw_unbonded( &self, num_slashing_spans: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Staking", "withdraw_unbonded", - WithdrawUnbonded { num_slashing_spans }, + types::WithdrawUnbonded { num_slashing_spans }, [ 95u8, 223u8, 122u8, 217u8, 76u8, 208u8, 86u8, 129u8, 31u8, 104u8, 70u8, 154u8, 23u8, 250u8, 165u8, 192u8, 149u8, 249u8, 158u8, 159u8, 194u8, @@ -5798,11 +6152,11 @@ pub mod api { pub fn validate( &self, prefs: runtime_types::pallet_staking::ValidatorPrefs, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Staking", "validate", - Validate { prefs }, + types::Validate { prefs }, [ 191u8, 116u8, 139u8, 35u8, 250u8, 211u8, 86u8, 240u8, 35u8, 9u8, 19u8, 44u8, 148u8, 35u8, 91u8, 106u8, 200u8, 172u8, 108u8, 145u8, 194u8, @@ -5817,21 +6171,20 @@ pub mod api { #[doc = ""] #[doc = "The dispatch origin for this call must be _Signed_ by the controller, not the stash."] #[doc = ""] - #[doc = "# "] + #[doc = "## Complexity"] #[doc = "- The transaction's complexity is proportional to the size of `targets` (N)"] #[doc = "which is capped at CompactAssignments::LIMIT (T::MaxNominations)."] #[doc = "- Both the reads and writes follow a similar pattern."] - #[doc = "# "] pub fn nominate( &self, targets: ::std::vec::Vec< ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, >, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Staking", "nominate", - Nominate { targets }, + types::Nominate { targets }, [ 112u8, 162u8, 70u8, 26u8, 74u8, 7u8, 188u8, 193u8, 210u8, 247u8, 27u8, 189u8, 133u8, 137u8, 33u8, 155u8, 255u8, 171u8, 122u8, 68u8, 175u8, @@ -5846,16 +6199,15 @@ pub mod api { #[doc = ""] #[doc = "The dispatch origin for this call must be _Signed_ by the controller, not the stash."] #[doc = ""] - #[doc = "# "] + #[doc = "## Complexity"] #[doc = "- Independent of the arguments. Insignificant complexity."] #[doc = "- Contains one read."] #[doc = "- Writes are limited to the `origin` account key."] - #[doc = "# "] - pub fn chill(&self) -> ::subxt::tx::Payload { + pub fn chill(&self) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Staking", "chill", - Chill {}, + types::Chill {}, [ 94u8, 20u8, 196u8, 31u8, 220u8, 125u8, 115u8, 167u8, 140u8, 3u8, 20u8, 132u8, 81u8, 120u8, 215u8, 166u8, 230u8, 56u8, 16u8, 222u8, 31u8, @@ -5870,26 +6222,22 @@ pub mod api { #[doc = ""] #[doc = "The dispatch origin for this call must be _Signed_ by the controller, not the stash."] #[doc = ""] - #[doc = "# "] + #[doc = "## Complexity"] + #[doc = "- O(1)"] #[doc = "- Independent of the arguments. Insignificant complexity."] #[doc = "- Contains a limited number of reads."] #[doc = "- Writes are limited to the `origin` account key."] #[doc = "---------"] - #[doc = "- Weight: O(1)"] - #[doc = "- DB Weight:"] - #[doc = " - Read: Ledger"] - #[doc = " - Write: Payee"] - #[doc = "# "] pub fn set_payee( &self, payee: runtime_types::pallet_staking::RewardDestination< ::subxt::utils::AccountId32, >, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Staking", "set_payee", - SetPayee { payee }, + types::SetPayee { payee }, [ 96u8, 8u8, 254u8, 164u8, 87u8, 46u8, 120u8, 11u8, 197u8, 63u8, 20u8, 178u8, 167u8, 236u8, 149u8, 245u8, 14u8, 171u8, 108u8, 195u8, 250u8, @@ -5903,24 +6251,19 @@ pub mod api { #[doc = ""] #[doc = "The dispatch origin for this call must be _Signed_ by the stash, not the controller."] #[doc = ""] - #[doc = "# "] + #[doc = "## Complexity"] + #[doc = "O(1)"] #[doc = "- Independent of the arguments. Insignificant complexity."] #[doc = "- Contains a limited number of reads."] #[doc = "- Writes are limited to the `origin` account key."] - #[doc = "----------"] - #[doc = "Weight: O(1)"] - #[doc = "DB Weight:"] - #[doc = "- Read: Bonded, Ledger New Controller, Ledger Old Controller"] - #[doc = "- Write: Bonded, Ledger New Controller, Ledger Old Controller"] - #[doc = "# "] pub fn set_controller( &self, controller: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Staking", "set_controller", - SetController { controller }, + types::SetController { controller }, [ 165u8, 250u8, 213u8, 32u8, 179u8, 163u8, 15u8, 35u8, 14u8, 152u8, 56u8, 171u8, 43u8, 101u8, 7u8, 167u8, 178u8, 60u8, 89u8, 186u8, 59u8, 28u8, @@ -5932,18 +6275,16 @@ pub mod api { #[doc = ""] #[doc = "The dispatch origin must be Root."] #[doc = ""] - #[doc = "# "] - #[doc = "Weight: O(1)"] - #[doc = "Write: Validator Count"] - #[doc = "# "] + #[doc = "## Complexity"] + #[doc = "O(1)"] pub fn set_validator_count( &self, new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Staking", "set_validator_count", - SetValidatorCount { new }, + types::SetValidatorCount { new }, [ 55u8, 232u8, 95u8, 66u8, 228u8, 217u8, 11u8, 27u8, 3u8, 202u8, 199u8, 242u8, 70u8, 160u8, 250u8, 187u8, 194u8, 91u8, 15u8, 36u8, 215u8, 36u8, @@ -5956,17 +6297,16 @@ pub mod api { #[doc = ""] #[doc = "The dispatch origin must be Root."] #[doc = ""] - #[doc = "# "] + #[doc = "## Complexity"] #[doc = "Same as [`Self::set_validator_count`]."] - #[doc = "# "] pub fn increase_validator_count( &self, additional: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Staking", "increase_validator_count", - IncreaseValidatorCount { additional }, + types::IncreaseValidatorCount { additional }, [ 239u8, 184u8, 155u8, 213u8, 25u8, 22u8, 193u8, 13u8, 102u8, 192u8, 82u8, 153u8, 249u8, 192u8, 60u8, 158u8, 8u8, 78u8, 175u8, 219u8, 46u8, @@ -5979,17 +6319,16 @@ pub mod api { #[doc = ""] #[doc = "The dispatch origin must be Root."] #[doc = ""] - #[doc = "# "] + #[doc = "## Complexity"] #[doc = "Same as [`Self::set_validator_count`]."] - #[doc = "# "] pub fn scale_validator_count( &self, factor: runtime_types::sp_arithmetic::per_things::Percent, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Staking", "scale_validator_count", - ScaleValidatorCount { factor }, + types::ScaleValidatorCount { factor }, [ 198u8, 68u8, 227u8, 94u8, 110u8, 157u8, 209u8, 217u8, 112u8, 37u8, 78u8, 142u8, 12u8, 193u8, 219u8, 167u8, 149u8, 112u8, 49u8, 139u8, @@ -6008,16 +6347,14 @@ pub mod api { #[doc = "Thus the election process may be ongoing when this is called. In this case the"] #[doc = "election will continue until the next era is triggered."] #[doc = ""] - #[doc = "# "] + #[doc = "## Complexity"] #[doc = "- No arguments."] #[doc = "- Weight: O(1)"] - #[doc = "- Write: ForceEra"] - #[doc = "# "] - pub fn force_no_eras(&self) -> ::subxt::tx::Payload { + pub fn force_no_eras(&self) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Staking", "force_no_eras", - ForceNoEras {}, + types::ForceNoEras {}, [ 16u8, 81u8, 207u8, 168u8, 23u8, 236u8, 11u8, 75u8, 141u8, 107u8, 92u8, 2u8, 53u8, 111u8, 252u8, 116u8, 91u8, 120u8, 75u8, 24u8, 125u8, 53u8, @@ -6036,16 +6373,14 @@ pub mod api { #[doc = "If this is called just before a new era is triggered, the election process may not"] #[doc = "have enough blocks to get a result."] #[doc = ""] - #[doc = "# "] + #[doc = "## Complexity"] #[doc = "- No arguments."] #[doc = "- Weight: O(1)"] - #[doc = "- Write ForceEra"] - #[doc = "# "] - pub fn force_new_era(&self) -> ::subxt::tx::Payload { + pub fn force_new_era(&self) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Staking", "force_new_era", - ForceNewEra {}, + types::ForceNewEra {}, [ 230u8, 242u8, 169u8, 196u8, 78u8, 145u8, 24u8, 191u8, 113u8, 68u8, 5u8, 138u8, 48u8, 51u8, 109u8, 126u8, 73u8, 136u8, 162u8, 158u8, 174u8, @@ -6059,11 +6394,11 @@ pub mod api { pub fn set_invulnerables( &self, invulnerables: ::std::vec::Vec<::subxt::utils::AccountId32>, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Staking", "set_invulnerables", - SetInvulnerables { invulnerables }, + types::SetInvulnerables { invulnerables }, [ 2u8, 148u8, 221u8, 111u8, 153u8, 48u8, 222u8, 36u8, 228u8, 84u8, 18u8, 35u8, 168u8, 239u8, 53u8, 245u8, 27u8, 76u8, 18u8, 203u8, 206u8, 9u8, @@ -6078,11 +6413,11 @@ pub mod api { &self, stash: ::subxt::utils::AccountId32, num_slashing_spans: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Staking", "force_unstake", - ForceUnstake { + types::ForceUnstake { stash, num_slashing_spans, }, @@ -6103,11 +6438,13 @@ pub mod api { #[doc = "The election process starts multiple blocks before the end of the era."] #[doc = "If this is called just before a new era is triggered, the election process may not"] #[doc = "have enough blocks to get a result."] - pub fn force_new_era_always(&self) -> ::subxt::tx::Payload { + pub fn force_new_era_always( + &self, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Staking", "force_new_era_always", - ForceNewEraAlways {}, + types::ForceNewEraAlways {}, [ 179u8, 118u8, 189u8, 54u8, 248u8, 141u8, 207u8, 142u8, 80u8, 37u8, 241u8, 185u8, 138u8, 254u8, 117u8, 147u8, 225u8, 118u8, 34u8, 177u8, @@ -6118,18 +6455,18 @@ pub mod api { } #[doc = "Cancel enactment of a deferred slash."] #[doc = ""] - #[doc = "Can be called by the `T::SlashCancelOrigin`."] + #[doc = "Can be called by the `T::AdminOrigin`."] #[doc = ""] #[doc = "Parameters: era and indices of the slashes for that era to kill."] pub fn cancel_deferred_slash( &self, era: ::core::primitive::u32, slash_indices: ::std::vec::Vec<::core::primitive::u32>, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Staking", "cancel_deferred_slash", - CancelDeferredSlash { era, slash_indices }, + types::CancelDeferredSlash { era, slash_indices }, [ 120u8, 57u8, 162u8, 105u8, 91u8, 250u8, 129u8, 240u8, 110u8, 234u8, 170u8, 98u8, 164u8, 65u8, 106u8, 101u8, 19u8, 88u8, 146u8, 210u8, @@ -6147,27 +6484,17 @@ pub mod api { #[doc = "The origin of this call must be _Signed_. Any account can call this function, even if"] #[doc = "it is not one of the stakers."] #[doc = ""] - #[doc = "# "] - #[doc = "- Time complexity: at most O(MaxNominatorRewardedPerValidator)."] - #[doc = "- Contains a limited number of reads and writes."] - #[doc = "-----------"] - #[doc = "N is the Number of payouts for the validator (including the validator)"] - #[doc = "Weight:"] - #[doc = "- Reward Destination Staked: O(N)"] - #[doc = "- Reward Destination Controller (Creating): O(N)"] - #[doc = ""] - #[doc = " NOTE: weights are assuming that payouts are made to alive stash account (Staked)."] - #[doc = " Paying even a dead controller is cheaper weight-wise. We don't do any refunds here."] - #[doc = "# "] + #[doc = "## Complexity"] + #[doc = "- At most O(MaxNominatorRewardedPerValidator)."] pub fn payout_stakers( &self, validator_stash: ::subxt::utils::AccountId32, era: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Staking", "payout_stakers", - PayoutStakers { + types::PayoutStakers { validator_stash, era, }, @@ -6182,19 +6509,17 @@ pub mod api { #[doc = ""] #[doc = "The dispatch origin must be signed by the controller."] #[doc = ""] - #[doc = "# "] + #[doc = "## Complexity"] #[doc = "- Time complexity: O(L), where L is unlocking chunks"] #[doc = "- Bounded by `MaxUnlockingChunks`."] - #[doc = "- Storage changes: Can't increase storage, only decrease it."] - #[doc = "# "] pub fn rebond( &self, value: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Staking", "rebond", - Rebond { value }, + types::Rebond { value }, [ 25u8, 22u8, 191u8, 172u8, 133u8, 101u8, 139u8, 102u8, 134u8, 16u8, 136u8, 56u8, 137u8, 162u8, 4u8, 253u8, 196u8, 30u8, 234u8, 49u8, 102u8, @@ -6219,11 +6544,11 @@ pub mod api { &self, stash: ::subxt::utils::AccountId32, num_slashing_spans: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Staking", "reap_stash", - ReapStash { + types::ReapStash { stash, num_slashing_spans, }, @@ -6251,11 +6576,11 @@ pub mod api { who: ::std::vec::Vec< ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, >, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Staking", "kick", - Kick { who }, + types::Kick { who }, [ 32u8, 26u8, 202u8, 6u8, 186u8, 180u8, 58u8, 121u8, 185u8, 208u8, 123u8, 10u8, 53u8, 179u8, 167u8, 203u8, 96u8, 229u8, 7u8, 144u8, 231u8, 172u8, @@ -6300,11 +6625,11 @@ pub mod api { min_commission: runtime_types::pallet_staking::pallet::pallet::ConfigOp< runtime_types::sp_arithmetic::per_things::Perbill, >, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Staking", "set_staking_configs", - SetStakingConfigs { + types::SetStakingConfigs { min_nominator_bond, min_validator_bond, max_nominator_count, @@ -6348,11 +6673,11 @@ pub mod api { pub fn chill_other( &self, controller: ::subxt::utils::AccountId32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Staking", "chill_other", - ChillOther { controller }, + types::ChillOther { controller }, [ 140u8, 98u8, 4u8, 203u8, 91u8, 131u8, 123u8, 119u8, 169u8, 47u8, 188u8, 23u8, 205u8, 170u8, 82u8, 220u8, 166u8, 170u8, 135u8, 176u8, 68u8, @@ -6366,11 +6691,11 @@ pub mod api { pub fn force_apply_min_commission( &self, validator_stash: ::subxt::utils::AccountId32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Staking", "force_apply_min_commission", - ForceApplyMinCommission { validator_stash }, + types::ForceApplyMinCommission { validator_stash }, [ 136u8, 163u8, 85u8, 134u8, 240u8, 247u8, 183u8, 227u8, 226u8, 202u8, 102u8, 186u8, 138u8, 119u8, 78u8, 123u8, 229u8, 135u8, 129u8, 241u8, @@ -6379,6 +6704,26 @@ pub mod api { ], ) } + #[doc = "Sets the minimum amount of commission that each validators must maintain."] + #[doc = ""] + #[doc = "This call has lower privilege requirements than `set_staking_config` and can be called"] + #[doc = "by the `T::AdminOrigin`. Root can always call this."] + pub fn set_min_commission( + &self, + new: runtime_types::sp_arithmetic::per_things::Perbill, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Staking", + "set_min_commission", + types::SetMinCommission { new }, + [ + 62u8, 139u8, 175u8, 245u8, 212u8, 113u8, 117u8, 130u8, 191u8, 173u8, + 78u8, 97u8, 19u8, 104u8, 185u8, 207u8, 201u8, 14u8, 200u8, 208u8, + 184u8, 195u8, 242u8, 175u8, 158u8, 156u8, 51u8, 58u8, 118u8, 154u8, + 68u8, 221u8, + ], + ) + } } } #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] @@ -6435,7 +6780,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "One staker (and potentially its nominators) has been slashed by the given amount."] + #[doc = "A staker (validator or nominator) has been slashed by the given amount."] pub struct Slashed { pub staker: ::subxt::utils::AccountId32, pub amount: ::core::primitive::u128, @@ -6444,6 +6789,27 @@ pub mod api { const PALLET: &'static str = "Staking"; const EVENT: &'static str = "Slashed"; } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A slash for the given validator, for the given percentage of their stake, at the given"] + #[doc = "era as been reported."] + pub struct SlashReported { + pub validator: ::subxt::utils::AccountId32, + pub fraction: runtime_types::sp_arithmetic::per_things::Perbill, + pub slash_era: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for SlashReported { + const PALLET: &'static str = "Staking"; + const EVENT: &'static str = "SlashReported"; + } #[derive( :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, @@ -6632,6 +6998,24 @@ pub mod api { const PALLET: &'static str = "Staking"; const EVENT: &'static str = "ValidatorPrefsSet"; } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A new force era mode was set."] + pub struct ForceEra { + pub mode: runtime_types::pallet_staking::Forcing, + } + impl ::subxt::events::StaticEvent for ForceEra { + const PALLET: &'static str = "Staking"; + const EVENT: &'static str = "ForceEra"; + } } pub mod storage { use super::runtime_types; @@ -6703,6 +7087,8 @@ pub mod api { ) } #[doc = " Map from all locked \"stash\" accounts to the controller account."] + #[doc = ""] + #[doc = " TWOX-NOTE: SAFE since `AccountId` is a secure hash."] pub fn bonded( &self, _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, @@ -6727,6 +7113,8 @@ pub mod api { ) } #[doc = " Map from all locked \"stash\" accounts to the controller account."] + #[doc = ""] + #[doc = " TWOX-NOTE: SAFE since `AccountId` is a secure hash."] pub fn bonded_root( &self, ) -> ::subxt::storage::address::Address< @@ -6789,6 +7177,27 @@ pub mod api { ], ) } + #[doc = " The minimum active nominator stake of the last successful election."] + pub fn minimum_active_stake( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u128, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "Staking", + "MinimumActiveStake", + vec![], + [ + 172u8, 190u8, 228u8, 47u8, 47u8, 192u8, 182u8, 59u8, 9u8, 18u8, 103u8, + 46u8, 175u8, 54u8, 17u8, 79u8, 89u8, 107u8, 255u8, 200u8, 182u8, 107u8, + 89u8, 157u8, 55u8, 16u8, 77u8, 46u8, 154u8, 169u8, 103u8, 151u8, + ], + ) + } #[doc = " The minimum amount of commission that validators can set."] #[doc = ""] #[doc = " If set to `0`, no limit exists."] @@ -6860,6 +7269,8 @@ pub mod api { ) } #[doc = " Where the reward payment should be made. Keyed by stash."] + #[doc = ""] + #[doc = " TWOX-NOTE: SAFE since `AccountId` is a secure hash."] pub fn payee( &self, _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, @@ -6885,6 +7296,8 @@ pub mod api { ) } #[doc = " Where the reward payment should be made. Keyed by stash."] + #[doc = ""] + #[doc = " TWOX-NOTE: SAFE since `AccountId` is a secure hash."] pub fn payee_root( &self, ) -> ::subxt::storage::address::Address< @@ -6907,6 +7320,8 @@ pub mod api { ) } #[doc = " The map from (wannabe) validator stash key to the preferences of that validator."] + #[doc = ""] + #[doc = " TWOX-NOTE: SAFE since `AccountId` is a secure hash."] pub fn validators( &self, _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, @@ -6932,6 +7347,8 @@ pub mod api { ) } #[doc = " The map from (wannabe) validator stash key to the preferences of that validator."] + #[doc = ""] + #[doc = " TWOX-NOTE: SAFE since `AccountId` is a secure hash."] pub fn validators_root( &self, ) -> ::subxt::storage::address::Address< @@ -7013,6 +7430,8 @@ pub mod api { #[doc = ""] #[doc = " Lastly, if any of the nominators become non-decodable, they can be chilled immediately via"] #[doc = " [`Call::chill_other`] dispatchable by anyone."] + #[doc = ""] + #[doc = " TWOX-NOTE: SAFE since `AccountId` is a secure hash."] pub fn nominators( &self, _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, @@ -7053,6 +7472,8 @@ pub mod api { #[doc = ""] #[doc = " Lastly, if any of the nominators become non-decodable, they can be chilled immediately via"] #[doc = " [`Call::chill_other`] dispatchable by anyone."] + #[doc = ""] + #[doc = " TWOX-NOTE: SAFE since `AccountId` is a secure hash."] pub fn nominators_root( &self, ) -> ::subxt::storage::address::Address< @@ -7957,30 +8378,6 @@ pub mod api { ], ) } - #[doc = " True if network has been upgraded to this version."] - #[doc = " Storage version of the pallet."] - #[doc = ""] - #[doc = " This is set to v7.0.0 for new networks."] - pub fn storage_version( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_staking::Releases, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Staking", - "StorageVersion", - vec![], - [ - 70u8, 24u8, 179u8, 189u8, 168u8, 164u8, 175u8, 150u8, 215u8, 43u8, - 18u8, 110u8, 180u8, 137u8, 237u8, 187u8, 185u8, 50u8, 31u8, 57u8, 16u8, - 110u8, 6u8, 170u8, 19u8, 7u8, 160u8, 134u8, 232u8, 227u8, 151u8, 116u8, - ], - ) - } #[doc = " The threshold for when users can start calling `chill_other` for other validators /"] #[doc = " nominators. The threshold is compared to the actual number of validators / nominators"] #[doc = " (`CountFor*`) in the system compared to the configured max (`Max*Count`)."] @@ -8367,31 +8764,34 @@ pub mod api { use super::root_mod; use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetKeys { - pub keys: runtime_types::polkadot_runtime::SessionKeys, - pub proof: ::std::vec::Vec<::core::primitive::u8>, + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetKeys { + pub keys: runtime_types::polkadot_runtime::SessionKeys, + pub proof: ::std::vec::Vec<::core::primitive::u8>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct PurgeKeys; } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct PurgeKeys; pub struct TransactionApi; impl TransactionApi { #[doc = "Sets the session key(s) of the function caller to `keys`."] @@ -8400,23 +8800,18 @@ pub mod api { #[doc = ""] #[doc = "The dispatch origin of this function must be signed."] #[doc = ""] - #[doc = "# "] - #[doc = "- Complexity: `O(1)`. Actual cost depends on the number of length of"] - #[doc = " `T::Keys::key_ids()` which is fixed."] - #[doc = "- DbReads: `origin account`, `T::ValidatorIdOf`, `NextKeys`"] - #[doc = "- DbWrites: `origin account`, `NextKeys`"] - #[doc = "- DbReads per key id: `KeyOwner`"] - #[doc = "- DbWrites per key id: `KeyOwner`"] - #[doc = "# "] + #[doc = "## Complexity"] + #[doc = "- `O(1)`. Actual cost depends on the number of length of `T::Keys::key_ids()` which is"] + #[doc = " fixed."] pub fn set_keys( &self, keys: runtime_types::polkadot_runtime::SessionKeys, proof: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Session", "set_keys", - SetKeys { keys, proof }, + types::SetKeys { keys, proof }, [ 17u8, 127u8, 23u8, 71u8, 118u8, 133u8, 89u8, 105u8, 93u8, 52u8, 46u8, 201u8, 151u8, 19u8, 124u8, 195u8, 228u8, 229u8, 22u8, 216u8, 32u8, @@ -8433,18 +8828,14 @@ pub mod api { #[doc = "means being a controller account) or directly convertible into a validator ID (which"] #[doc = "usually means being a stash account)."] #[doc = ""] - #[doc = "# "] - #[doc = "- Complexity: `O(1)` in number of key types. Actual cost depends on the number of length"] - #[doc = " of `T::Keys::key_ids()` which is fixed."] - #[doc = "- DbReads: `T::ValidatorIdOf`, `NextKeys`, `origin account`"] - #[doc = "- DbWrites: `NextKeys`, `origin account`"] - #[doc = "- DbWrites per key id: `KeyOwner`"] - #[doc = "# "] - pub fn purge_keys(&self) -> ::subxt::tx::Payload { + #[doc = "## Complexity"] + #[doc = "- `O(1)` in number of key types. Actual cost depends on the number of length of"] + #[doc = " `T::Keys::key_ids()` which is fixed."] + pub fn purge_keys(&self) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Session", "purge_keys", - PurgeKeys {}, + types::PurgeKeys {}, [ 200u8, 255u8, 4u8, 213u8, 188u8, 92u8, 99u8, 116u8, 163u8, 152u8, 29u8, 35u8, 133u8, 119u8, 246u8, 44u8, 91u8, 31u8, 145u8, 23u8, 213u8, 64u8, @@ -8708,57 +9099,60 @@ pub mod api { use super::root_mod; use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ReportEquivocation { - pub equivocation_proof: ::std::boxed::Box< - runtime_types::sp_finality_grandpa::EquivocationProof< - ::subxt::utils::H256, - ::core::primitive::u32, + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ReportEquivocation { + pub equivocation_proof: ::std::boxed::Box< + runtime_types::sp_consensus_grandpa::EquivocationProof< + ::subxt::utils::H256, + ::core::primitive::u32, + >, >, - >, - pub key_owner_proof: runtime_types::sp_session::MembershipProof, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ReportEquivocationUnsigned { - pub equivocation_proof: ::std::boxed::Box< - runtime_types::sp_finality_grandpa::EquivocationProof< - ::subxt::utils::H256, - ::core::primitive::u32, + pub key_owner_proof: runtime_types::sp_session::MembershipProof, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ReportEquivocationUnsigned { + pub equivocation_proof: ::std::boxed::Box< + runtime_types::sp_consensus_grandpa::EquivocationProof< + ::subxt::utils::H256, + ::core::primitive::u32, + >, >, - >, - pub key_owner_proof: runtime_types::sp_session::MembershipProof, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct NoteStalled { - pub delay: ::core::primitive::u32, - pub best_finalized_block_number: ::core::primitive::u32, + pub key_owner_proof: runtime_types::sp_session::MembershipProof, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct NoteStalled { + pub delay: ::core::primitive::u32, + pub best_finalized_block_number: ::core::primitive::u32, + } } pub struct TransactionApi; impl TransactionApi { @@ -8768,16 +9162,16 @@ pub mod api { #[doc = "will be reported."] pub fn report_equivocation( &self, - equivocation_proof: runtime_types::sp_finality_grandpa::EquivocationProof< + equivocation_proof: runtime_types::sp_consensus_grandpa::EquivocationProof< ::subxt::utils::H256, ::core::primitive::u32, >, key_owner_proof: runtime_types::sp_session::MembershipProof, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Grandpa", "report_equivocation", - ReportEquivocation { + types::ReportEquivocation { equivocation_proof: ::std::boxed::Box::new(equivocation_proof), key_owner_proof, }, @@ -8799,16 +9193,16 @@ pub mod api { #[doc = "reporter."] pub fn report_equivocation_unsigned( &self, - equivocation_proof: runtime_types::sp_finality_grandpa::EquivocationProof< + equivocation_proof: runtime_types::sp_consensus_grandpa::EquivocationProof< ::subxt::utils::H256, ::core::primitive::u32, >, key_owner_proof: runtime_types::sp_session::MembershipProof, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Grandpa", "report_equivocation_unsigned", - ReportEquivocationUnsigned { + types::ReportEquivocationUnsigned { equivocation_proof: ::std::boxed::Box::new(equivocation_proof), key_owner_proof, }, @@ -8836,11 +9230,11 @@ pub mod api { &self, delay: ::core::primitive::u32, best_finalized_block_number: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Grandpa", "note_stalled", - NoteStalled { + types::NoteStalled { delay, best_finalized_block_number, }, @@ -8871,7 +9265,7 @@ pub mod api { #[doc = "New authority set has been applied."] pub struct NewAuthorities { pub authority_set: ::std::vec::Vec<( - runtime_types::sp_finality_grandpa::app::Public, + runtime_types::sp_consensus_grandpa::app::Public, ::core::primitive::u64, )>, } @@ -9028,6 +9422,12 @@ pub mod api { #[doc = " A mapping from grandpa set ID to the index of the *most recent* session for which its"] #[doc = " members were responsible."] #[doc = ""] + #[doc = " This is only used for validating equivocation proofs. An equivocation proof must"] + #[doc = " contains a key-ownership proof for a given session, therefore we need a way to tie"] + #[doc = " together sessions and GRANDPA set ids, i.e. we need to validate that a validator"] + #[doc = " was the owner of a given key on a given session, and what the active set ID was"] + #[doc = " during that session."] + #[doc = ""] #[doc = " TWOX-NOTE: `SetId` is not under user control."] pub fn set_id_session( &self, @@ -9056,6 +9456,12 @@ pub mod api { #[doc = " A mapping from grandpa set ID to the index of the *most recent* session for which its"] #[doc = " members were responsible."] #[doc = ""] + #[doc = " This is only used for validating equivocation proofs. An equivocation proof must"] + #[doc = " contains a key-ownership proof for a given session, therefore we need a way to tie"] + #[doc = " together sessions and GRANDPA set ids, i.e. we need to validate that a validator"] + #[doc = " was the owner of a given key on a given session, and what the active set ID was"] + #[doc = " during that session."] + #[doc = ""] #[doc = " TWOX-NOTE: `SetId` is not under user control."] pub fn set_id_session_root( &self, @@ -9099,6 +9505,26 @@ pub mod api { ], ) } + #[doc = " The maximum number of entries to keep in the set id to session index mapping."] + #[doc = ""] + #[doc = " Since the `SetIdSession` map is only used for validating equivocations this"] + #[doc = " value should relate to the bonding duration of whatever staking system is"] + #[doc = " being used (if any). If equivocation handling is not enabled then this value"] + #[doc = " can be zero."] + pub fn max_set_id_session_entries( + &self, + ) -> ::subxt::constants::Address<::core::primitive::u64> { + ::subxt::constants::Address::new_static( + "Grandpa", + "MaxSetIdSessionEntries", + [ + 128u8, 214u8, 205u8, 242u8, 181u8, 142u8, 124u8, 231u8, 190u8, 146u8, + 59u8, 226u8, 157u8, 101u8, 103u8, 117u8, 249u8, 65u8, 18u8, 191u8, + 103u8, 119u8, 53u8, 85u8, 81u8, 96u8, 220u8, 42u8, 184u8, 239u8, 42u8, + 246u8, + ], + ) + } } } } @@ -9112,40 +9538,40 @@ pub mod api { use super::root_mod; use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - 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, + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + 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, + } } pub struct TransactionApi; impl TransactionApi { - #[doc = "# "] - #[doc = "- Complexity: `O(K + E)` where K is length of `Keys` (heartbeat.validators_len) and E is"] - #[doc = " length of `heartbeat.network_state.external_address`"] + #[doc = "## Complexity:"] + #[doc = "- `O(K + E)` where K is length of `Keys` (heartbeat.validators_len) and E is length of"] + #[doc = " `heartbeat.network_state.external_address`"] #[doc = " - `O(K)`: decoding of length `K`"] #[doc = " - `O(E)`: decoding/encoding of length `E`"] - #[doc = "- DbReads: pallet_session `Validators`, pallet_session `CurrentIndex`, `Keys`,"] - #[doc = " `ReceivedHeartbeats`"] - #[doc = "- DbWrites: `ReceivedHeartbeats`"] - #[doc = "# "] pub fn heartbeat( &self, heartbeat: runtime_types::pallet_im_online::Heartbeat<::core::primitive::u32>, signature: runtime_types::pallet_im_online::sr25519::app_sr25519::Signature, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "ImOnline", "heartbeat", - Heartbeat { + types::Heartbeat { heartbeat, signature, }, @@ -9263,7 +9689,7 @@ pub mod api { &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec< + runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec< runtime_types::pallet_im_online::sr25519::app_sr25519::Public, >, ::subxt::storage::address::Yes, @@ -9429,309 +9855,326 @@ pub mod api { use super::root_mod; use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Propose { - pub proposal: runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::polkadot_runtime::RuntimeCall, - >, - #[codec(compact)] - pub value: ::core::primitive::u128, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Second { - #[codec(compact)] - pub proposal: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Vote { - #[codec(compact)] - pub ref_index: ::core::primitive::u32, - pub vote: - runtime_types::pallet_democracy::vote::AccountVote<::core::primitive::u128>, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct EmergencyCancel { - pub ref_index: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ExternalPropose { - pub proposal: runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::polkadot_runtime::RuntimeCall, - >, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ExternalProposeMajority { - pub proposal: runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::polkadot_runtime::RuntimeCall, - >, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ExternalProposeDefault { - pub proposal: runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::polkadot_runtime::RuntimeCall, - >, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct FastTrack { - pub proposal_hash: ::subxt::utils::H256, - pub voting_period: ::core::primitive::u32, - pub delay: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct VetoExternal { - pub proposal_hash: ::subxt::utils::H256, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CancelReferendum { - #[codec(compact)] - pub ref_index: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Delegate { - pub to: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - pub conviction: runtime_types::pallet_democracy::conviction::Conviction, - pub balance: ::core::primitive::u128, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Undelegate; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ClearPublicProposals; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Unlock { - pub target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RemoveVote { - pub index: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RemoveOtherVote { - pub target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - pub index: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Blacklist { - pub proposal_hash: ::subxt::utils::H256, - pub maybe_ref_index: ::core::option::Option<::core::primitive::u32>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CancelProposal { - #[codec(compact)] - pub prop_index: ::core::primitive::u32, - } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Propose a sensitive action to be taken."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be _Signed_ and the sender must"] - #[doc = "have funds to cover the deposit."] - #[doc = ""] - #[doc = "- `proposal_hash`: The hash of the proposal preimage."] - #[doc = "- `value`: The amount of deposit (must be at least `MinimumDeposit`)."] - #[doc = ""] - #[doc = "Emits `Proposed`."] - pub fn propose( - &self, - proposal: runtime_types::frame_support::traits::preimages::Bounded< + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Propose { + pub proposal: runtime_types::frame_support::traits::preimages::Bounded< runtime_types::polkadot_runtime::RuntimeCall, >, - value: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Democracy", - "propose", - Propose { proposal, value }, - [ - 123u8, 3u8, 204u8, 140u8, 194u8, 195u8, 214u8, 39u8, 167u8, 126u8, - 45u8, 4u8, 219u8, 17u8, 143u8, 185u8, 29u8, 224u8, 230u8, 68u8, 253u8, - 15u8, 170u8, 90u8, 232u8, 123u8, 46u8, 255u8, 168u8, 39u8, 204u8, 63u8, - ], - ) + #[codec(compact)] + pub value: ::core::primitive::u128, } - #[doc = "Signals agreement with a particular proposal."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be _Signed_ and the sender"] - #[doc = "must have funds to cover the deposit, equal to the original deposit."] - #[doc = ""] - #[doc = "- `proposal`: The index of the proposal to second."] - pub fn second( - &self, - proposal: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Democracy", - "second", - Second { proposal }, - [ - 59u8, 240u8, 183u8, 218u8, 61u8, 93u8, 184u8, 67u8, 10u8, 4u8, 138u8, - 196u8, 168u8, 49u8, 42u8, 69u8, 154u8, 42u8, 90u8, 112u8, 179u8, 69u8, - 51u8, 148u8, 159u8, 212u8, 221u8, 226u8, 132u8, 228u8, 51u8, 83u8, - ], - ) + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Second { + #[codec(compact)] + pub proposal: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Vote { + #[codec(compact)] + pub ref_index: ::core::primitive::u32, + pub vote: + runtime_types::pallet_democracy::vote::AccountVote<::core::primitive::u128>, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct EmergencyCancel { + pub ref_index: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ExternalPropose { + pub proposal: runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::polkadot_runtime::RuntimeCall, + >, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ExternalProposeMajority { + pub proposal: runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::polkadot_runtime::RuntimeCall, + >, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ExternalProposeDefault { + pub proposal: runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::polkadot_runtime::RuntimeCall, + >, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct FastTrack { + pub proposal_hash: ::subxt::utils::H256, + pub voting_period: ::core::primitive::u32, + pub delay: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct VetoExternal { + pub proposal_hash: ::subxt::utils::H256, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct CancelReferendum { + #[codec(compact)] + pub ref_index: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Delegate { + pub to: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub conviction: runtime_types::pallet_democracy::conviction::Conviction, + pub balance: ::core::primitive::u128, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Undelegate; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ClearPublicProposals; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Unlock { + pub target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct RemoveVote { + pub index: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct RemoveOtherVote { + pub target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub index: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Blacklist { + pub proposal_hash: ::subxt::utils::H256, + pub maybe_ref_index: ::core::option::Option<::core::primitive::u32>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct CancelProposal { + #[codec(compact)] + pub prop_index: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetMetadata { + pub owner: runtime_types::pallet_democracy::types::MetadataOwner, + pub maybe_hash: ::core::option::Option<::subxt::utils::H256>, + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Propose a sensitive action to be taken."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be _Signed_ and the sender must"] + #[doc = "have funds to cover the deposit."] + #[doc = ""] + #[doc = "- `proposal_hash`: The hash of the proposal preimage."] + #[doc = "- `value`: The amount of deposit (must be at least `MinimumDeposit`)."] + #[doc = ""] + #[doc = "Emits `Proposed`."] + pub fn propose( + &self, + proposal: runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::polkadot_runtime::RuntimeCall, + >, + value: ::core::primitive::u128, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Democracy", + "propose", + types::Propose { proposal, value }, + [ + 123u8, 3u8, 204u8, 140u8, 194u8, 195u8, 214u8, 39u8, 167u8, 126u8, + 45u8, 4u8, 219u8, 17u8, 143u8, 185u8, 29u8, 224u8, 230u8, 68u8, 253u8, + 15u8, 170u8, 90u8, 232u8, 123u8, 46u8, 255u8, 168u8, 39u8, 204u8, 63u8, + ], + ) + } + #[doc = "Signals agreement with a particular proposal."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be _Signed_ and the sender"] + #[doc = "must have funds to cover the deposit, equal to the original deposit."] + #[doc = ""] + #[doc = "- `proposal`: The index of the proposal to second."] + pub fn second( + &self, + proposal: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Democracy", + "second", + types::Second { proposal }, + [ + 59u8, 240u8, 183u8, 218u8, 61u8, 93u8, 184u8, 67u8, 10u8, 4u8, 138u8, + 196u8, 168u8, 49u8, 42u8, 69u8, 154u8, 42u8, 90u8, 112u8, 179u8, 69u8, + 51u8, 148u8, 159u8, 212u8, 221u8, 226u8, 132u8, 228u8, 51u8, 83u8, + ], + ) } #[doc = "Vote in a referendum. If `vote.is_aye()`, the vote is to enact the proposal;"] #[doc = "otherwise it is a vote to keep the status quo."] @@ -9746,11 +10189,11 @@ pub mod api { vote: runtime_types::pallet_democracy::vote::AccountVote< ::core::primitive::u128, >, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Democracy", "vote", - Vote { ref_index, vote }, + types::Vote { ref_index, vote }, [ 138u8, 213u8, 229u8, 111u8, 1u8, 191u8, 73u8, 3u8, 145u8, 28u8, 44u8, 88u8, 163u8, 188u8, 129u8, 188u8, 64u8, 15u8, 64u8, 103u8, 250u8, 97u8, @@ -9769,11 +10212,11 @@ pub mod api { pub fn emergency_cancel( &self, ref_index: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Democracy", "emergency_cancel", - EmergencyCancel { ref_index }, + types::EmergencyCancel { ref_index }, [ 139u8, 213u8, 133u8, 75u8, 34u8, 206u8, 124u8, 245u8, 35u8, 237u8, 132u8, 92u8, 49u8, 167u8, 117u8, 80u8, 188u8, 93u8, 198u8, 237u8, @@ -9793,11 +10236,11 @@ pub mod api { proposal: runtime_types::frame_support::traits::preimages::Bounded< runtime_types::polkadot_runtime::RuntimeCall, >, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Democracy", "external_propose", - ExternalPropose { proposal }, + types::ExternalPropose { proposal }, [ 164u8, 193u8, 14u8, 122u8, 105u8, 232u8, 20u8, 194u8, 99u8, 227u8, 36u8, 105u8, 218u8, 146u8, 16u8, 208u8, 56u8, 62u8, 100u8, 65u8, 35u8, @@ -9821,11 +10264,11 @@ pub mod api { proposal: runtime_types::frame_support::traits::preimages::Bounded< runtime_types::polkadot_runtime::RuntimeCall, >, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Democracy", "external_propose_majority", - ExternalProposeMajority { proposal }, + types::ExternalProposeMajority { proposal }, [ 129u8, 124u8, 147u8, 253u8, 69u8, 115u8, 230u8, 186u8, 155u8, 4u8, 220u8, 103u8, 28u8, 132u8, 115u8, 153u8, 196u8, 88u8, 9u8, 130u8, @@ -9850,11 +10293,11 @@ pub mod api { proposal: runtime_types::frame_support::traits::preimages::Bounded< runtime_types::polkadot_runtime::RuntimeCall, >, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Democracy", "external_propose_default", - ExternalProposeDefault { proposal }, + types::ExternalProposeDefault { proposal }, [ 96u8, 15u8, 108u8, 208u8, 141u8, 247u8, 4u8, 73u8, 2u8, 30u8, 231u8, 40u8, 184u8, 250u8, 42u8, 161u8, 248u8, 45u8, 217u8, 50u8, 53u8, 13u8, @@ -9883,11 +10326,11 @@ pub mod api { proposal_hash: ::subxt::utils::H256, voting_period: ::core::primitive::u32, delay: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Democracy", "fast_track", - FastTrack { + types::FastTrack { proposal_hash, voting_period, delay, @@ -9911,11 +10354,11 @@ pub mod api { pub fn veto_external( &self, proposal_hash: ::subxt::utils::H256, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Democracy", "veto_external", - VetoExternal { proposal_hash }, + types::VetoExternal { proposal_hash }, [ 209u8, 18u8, 18u8, 103u8, 186u8, 160u8, 214u8, 124u8, 150u8, 207u8, 112u8, 90u8, 84u8, 197u8, 95u8, 157u8, 165u8, 65u8, 109u8, 101u8, 75u8, @@ -9934,11 +10377,11 @@ pub mod api { pub fn cancel_referendum( &self, ref_index: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Democracy", "cancel_referendum", - CancelReferendum { ref_index }, + types::CancelReferendum { ref_index }, [ 51u8, 25u8, 25u8, 251u8, 236u8, 115u8, 130u8, 230u8, 72u8, 186u8, 119u8, 71u8, 165u8, 137u8, 55u8, 167u8, 187u8, 128u8, 55u8, 8u8, 212u8, @@ -9972,11 +10415,11 @@ pub mod api { to: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, conviction: runtime_types::pallet_democracy::conviction::Conviction, balance: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Democracy", "delegate", - Delegate { + types::Delegate { to, conviction, balance, @@ -10001,11 +10444,11 @@ pub mod api { #[doc = ""] #[doc = "Weight: `O(R)` where R is the number of referendums the voter delegating to has"] #[doc = " voted on. Weight is charged as if maximum votes."] - pub fn undelegate(&self) -> ::subxt::tx::Payload { + pub fn undelegate(&self) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Democracy", "undelegate", - Undelegate {}, + types::Undelegate {}, [ 165u8, 40u8, 183u8, 209u8, 57u8, 153u8, 111u8, 29u8, 114u8, 109u8, 107u8, 235u8, 97u8, 61u8, 53u8, 155u8, 44u8, 245u8, 28u8, 220u8, 56u8, @@ -10019,11 +10462,13 @@ pub mod api { #[doc = "The dispatch origin of this call must be _Root_."] #[doc = ""] #[doc = "Weight: `O(1)`."] - pub fn clear_public_proposals(&self) -> ::subxt::tx::Payload { + pub fn clear_public_proposals( + &self, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Democracy", "clear_public_proposals", - ClearPublicProposals {}, + types::ClearPublicProposals {}, [ 59u8, 126u8, 254u8, 223u8, 252u8, 225u8, 75u8, 185u8, 188u8, 181u8, 42u8, 179u8, 211u8, 73u8, 12u8, 141u8, 243u8, 197u8, 46u8, 130u8, @@ -10042,11 +10487,11 @@ pub mod api { pub fn unlock( &self, target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Democracy", "unlock", - Unlock { target }, + types::Unlock { target }, [ 126u8, 151u8, 230u8, 89u8, 49u8, 247u8, 242u8, 139u8, 190u8, 15u8, 47u8, 2u8, 132u8, 165u8, 48u8, 205u8, 196u8, 66u8, 230u8, 222u8, 164u8, @@ -10084,11 +10529,11 @@ pub mod api { pub fn remove_vote( &self, index: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Democracy", "remove_vote", - RemoveVote { index }, + types::RemoveVote { index }, [ 148u8, 120u8, 14u8, 172u8, 81u8, 152u8, 159u8, 178u8, 106u8, 244u8, 36u8, 98u8, 120u8, 189u8, 213u8, 93u8, 119u8, 156u8, 112u8, 34u8, @@ -10116,11 +10561,11 @@ pub mod api { &self, target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, index: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Democracy", "remove_other_vote", - RemoveOtherVote { target, index }, + types::RemoveOtherVote { target, index }, [ 151u8, 190u8, 115u8, 124u8, 185u8, 43u8, 70u8, 147u8, 98u8, 167u8, 120u8, 25u8, 231u8, 143u8, 214u8, 25u8, 240u8, 74u8, 35u8, 58u8, 206u8, @@ -10147,11 +10592,11 @@ pub mod api { &self, proposal_hash: ::subxt::utils::H256, maybe_ref_index: ::core::option::Option<::core::primitive::u32>, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Democracy", "blacklist", - Blacklist { + types::Blacklist { proposal_hash, maybe_ref_index, }, @@ -10173,11 +10618,11 @@ pub mod api { pub fn cancel_proposal( &self, prop_index: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Democracy", "cancel_proposal", - CancelProposal { prop_index }, + types::CancelProposal { prop_index }, [ 179u8, 3u8, 198u8, 244u8, 241u8, 124u8, 205u8, 58u8, 100u8, 80u8, 177u8, 254u8, 98u8, 220u8, 189u8, 63u8, 229u8, 60u8, 157u8, 83u8, @@ -10186,6 +10631,37 @@ pub mod api { ], ) } + #[doc = "Set or clear a metadata of a proposal or a referendum."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `origin`: Must correspond to the `MetadataOwner`."] + #[doc = " - `ExternalOrigin` for an external proposal with the `SuperMajorityApprove`"] + #[doc = " threshold."] + #[doc = " - `ExternalDefaultOrigin` for an external proposal with the `SuperMajorityAgainst`"] + #[doc = " threshold."] + #[doc = " - `ExternalMajorityOrigin` for an external proposal with the `SimpleMajority`"] + #[doc = " threshold."] + #[doc = " - `Signed` by a creator for a public proposal."] + #[doc = " - `Signed` to clear a metadata for a finished referendum."] + #[doc = " - `Root` to set a metadata for an ongoing referendum."] + #[doc = "- `owner`: an identifier of a metadata owner."] + #[doc = "- `maybe_hash`: The hash of an on-chain stored preimage. `None` to clear a metadata."] + pub fn set_metadata( + &self, + owner: runtime_types::pallet_democracy::types::MetadataOwner, + maybe_hash: ::core::option::Option<::subxt::utils::H256>, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Democracy", + "set_metadata", + types::SetMetadata { owner, maybe_hash }, + [ + 182u8, 2u8, 168u8, 244u8, 247u8, 35u8, 65u8, 9u8, 39u8, 164u8, 30u8, + 141u8, 69u8, 137u8, 75u8, 156u8, 158u8, 107u8, 67u8, 28u8, 145u8, 65u8, + 175u8, 30u8, 254u8, 231u8, 4u8, 77u8, 207u8, 166u8, 157u8, 73u8, + ], + ) + } } } #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] @@ -10456,6 +10932,64 @@ pub mod api { const PALLET: &'static str = "Democracy"; const EVENT: &'static str = "ProposalCanceled"; } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Metadata for a proposal or a referendum has been set."] + pub struct MetadataSet { + pub owner: runtime_types::pallet_democracy::types::MetadataOwner, + pub hash: ::subxt::utils::H256, + } + impl ::subxt::events::StaticEvent for MetadataSet { + const PALLET: &'static str = "Democracy"; + const EVENT: &'static str = "MetadataSet"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Metadata for a proposal or a referendum has been cleared."] + pub struct MetadataCleared { + pub owner: runtime_types::pallet_democracy::types::MetadataOwner, + pub hash: ::subxt::utils::H256, + } + impl ::subxt::events::StaticEvent for MetadataCleared { + const PALLET: &'static str = "Democracy"; + const EVENT: &'static str = "MetadataCleared"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Metadata has been transferred to new owner."] + pub struct MetadataTransferred { + pub prev_owner: runtime_types::pallet_democracy::types::MetadataOwner, + pub owner: runtime_types::pallet_democracy::types::MetadataOwner, + pub hash: ::subxt::utils::H256, + } + impl ::subxt::events::StaticEvent for MetadataTransferred { + const PALLET: &'static str = "Democracy"; + const EVENT: &'static str = "MetadataTransferred"; + } } pub mod storage { use super::runtime_types; @@ -10488,7 +11022,7 @@ pub mod api { &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::sp_core::bounded::bounded_vec::BoundedVec<( + runtime_types::bounded_collections::bounded_vec::BoundedVec<( ::core::primitive::u32, runtime_types::frame_support::traits::preimages::Bounded< runtime_types::polkadot_runtime::RuntimeCall, @@ -10520,7 +11054,7 @@ pub mod api { ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, ( - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + runtime_types::bounded_collections::bounded_vec::BoundedVec< ::subxt::utils::AccountId32, >, ::core::primitive::u128, @@ -10550,7 +11084,7 @@ pub mod api { ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, ( - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + runtime_types::bounded_collections::bounded_vec::BoundedVec< ::subxt::utils::AccountId32, >, ::core::primitive::u128, @@ -10797,7 +11331,7 @@ pub mod api { ::subxt::storage::address::StaticStorageMapKey, ( ::core::primitive::u32, - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + runtime_types::bounded_collections::bounded_vec::BoundedVec< ::subxt::utils::AccountId32, >, ), @@ -10827,7 +11361,7 @@ pub mod api { ::subxt::storage::address::StaticStorageMapKey, ( ::core::primitive::u32, - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + runtime_types::bounded_collections::bounded_vec::BoundedVec< ::subxt::utils::AccountId32, >, ), @@ -10894,6 +11428,65 @@ pub mod api { ], ) } + #[doc = " General information concerning any proposal or referendum."] + #[doc = " The `PreimageHash` refers to the preimage of the `Preimages` provider which can be a JSON"] + #[doc = " dump or IPFS hash of a JSON file."] + #[doc = ""] + #[doc = " Consider a garbage collection for a metadata of finished referendums to `unrequest` (remove)"] + #[doc = " large preimages."] + pub fn metadata_of( + &self, + _0: impl ::std::borrow::Borrow< + runtime_types::pallet_democracy::types::MetadataOwner, + >, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::subxt::utils::H256, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Democracy", + "MetadataOf", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], + [ + 157u8, 252u8, 120u8, 151u8, 76u8, 82u8, 189u8, 77u8, 196u8, 65u8, + 113u8, 138u8, 138u8, 57u8, 199u8, 136u8, 22u8, 35u8, 114u8, 144u8, + 172u8, 42u8, 130u8, 19u8, 19u8, 245u8, 76u8, 177u8, 145u8, 146u8, + 107u8, 23u8, + ], + ) + } + #[doc = " General information concerning any proposal or referendum."] + #[doc = " The `PreimageHash` refers to the preimage of the `Preimages` provider which can be a JSON"] + #[doc = " dump or IPFS hash of a JSON file."] + #[doc = ""] + #[doc = " Consider a garbage collection for a metadata of finished referendums to `unrequest` (remove)"] + #[doc = " large preimages."] + pub fn metadata_of_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::subxt::utils::H256, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Democracy", + "MetadataOf", + Vec::new(), + [ + 157u8, 252u8, 120u8, 151u8, 76u8, 82u8, 189u8, 77u8, 196u8, 65u8, + 113u8, 138u8, 138u8, 57u8, 199u8, 136u8, 22u8, 35u8, 114u8, 144u8, + 172u8, 42u8, 130u8, 19u8, 19u8, 245u8, 76u8, 177u8, 145u8, 146u8, + 107u8, 23u8, + ], + ) + } } } pub mod constants { @@ -11093,118 +11686,102 @@ pub mod api { use super::root_mod; use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetMembers { - pub new_members: ::std::vec::Vec<::subxt::utils::AccountId32>, - pub prime: ::core::option::Option<::subxt::utils::AccountId32>, - pub old_count: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Execute { - pub proposal: ::std::boxed::Box, - #[codec(compact)] - pub length_bound: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Propose { - #[codec(compact)] - pub threshold: ::core::primitive::u32, - pub proposal: ::std::boxed::Box, - #[codec(compact)] - pub length_bound: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Vote { - pub proposal: ::subxt::utils::H256, - #[codec(compact)] - pub index: ::core::primitive::u32, - pub approve: ::core::primitive::bool, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CloseOldWeight { - pub proposal_hash: ::subxt::utils::H256, - #[codec(compact)] - pub index: ::core::primitive::u32, - #[codec(compact)] - pub proposal_weight_bound: runtime_types::sp_weights::OldWeight, - #[codec(compact)] - pub length_bound: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct DisapproveProposal { - pub proposal_hash: ::subxt::utils::H256, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Close { - pub proposal_hash: ::subxt::utils::H256, - #[codec(compact)] - pub index: ::core::primitive::u32, - pub proposal_weight_bound: runtime_types::sp_weights::weight_v2::Weight, - #[codec(compact)] - pub length_bound: ::core::primitive::u32, + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetMembers { + pub new_members: ::std::vec::Vec<::subxt::utils::AccountId32>, + pub prime: ::core::option::Option<::subxt::utils::AccountId32>, + pub old_count: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Execute { + pub proposal: ::std::boxed::Box, + #[codec(compact)] + pub length_bound: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Propose { + #[codec(compact)] + pub threshold: ::core::primitive::u32, + pub proposal: ::std::boxed::Box, + #[codec(compact)] + pub length_bound: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Vote { + pub proposal: ::subxt::utils::H256, + #[codec(compact)] + pub index: ::core::primitive::u32, + pub approve: ::core::primitive::bool, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct DisapproveProposal { + pub proposal_hash: ::subxt::utils::H256, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Close { + pub proposal_hash: ::subxt::utils::H256, + #[codec(compact)] + pub index: ::core::primitive::u32, + pub proposal_weight_bound: runtime_types::sp_weights::weight_v2::Weight, + #[codec(compact)] + pub length_bound: ::core::primitive::u32, + } } pub struct TransactionApi; impl TransactionApi { @@ -11215,7 +11792,7 @@ pub mod api { #[doc = "- `old_count`: The upper bound for the previous number of members in storage. Used for"] #[doc = " weight estimation."] #[doc = ""] - #[doc = "Requires root origin."] + #[doc = "The dispatch of this call must be `SetMembersOrigin`."] #[doc = ""] #[doc = "NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but"] #[doc = " the weight estimations rely on it to estimate dispatchable weight."] @@ -11227,29 +11804,21 @@ pub mod api { #[doc = "Any call to `set_members` must be careful that the member set doesn't get out of sync"] #[doc = "with other logic managing the member set."] #[doc = ""] - #[doc = "# "] - #[doc = "## Weight"] + #[doc = "## Complexity:"] #[doc = "- `O(MP + N)` where:"] #[doc = " - `M` old-members-count (code- and governance-bounded)"] #[doc = " - `N` new-members-count (code- and governance-bounded)"] #[doc = " - `P` proposals-count (code-bounded)"] - #[doc = "- DB:"] - #[doc = " - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the"] - #[doc = " members"] - #[doc = " - 1 storage read (codec `O(P)`) for reading the proposals"] - #[doc = " - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal"] - #[doc = " - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one"] - #[doc = "# "] pub fn set_members( &self, new_members: ::std::vec::Vec<::subxt::utils::AccountId32>, prime: ::core::option::Option<::subxt::utils::AccountId32>, old_count: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Council", "set_members", - SetMembers { + types::SetMembers { new_members, prime, old_count, @@ -11266,30 +11835,28 @@ pub mod api { #[doc = ""] #[doc = "Origin must be a member of the collective."] #[doc = ""] - #[doc = "# "] - #[doc = "## Weight"] - #[doc = "- `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching"] - #[doc = " `proposal`"] - #[doc = "- DB: 1 read (codec `O(M)`) + DB access of `proposal`"] - #[doc = "- 1 event"] - #[doc = "# "] + #[doc = "## Complexity:"] + #[doc = "- `O(B + M + P)` where:"] + #[doc = "- `B` is `proposal` size in bytes (length-fee-bounded)"] + #[doc = "- `M` members-count (code-bounded)"] + #[doc = "- `P` complexity of dispatching `proposal`"] pub fn execute( &self, proposal: runtime_types::polkadot_runtime::RuntimeCall, length_bound: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Council", "execute", - Execute { + types::Execute { proposal: ::std::boxed::Box::new(proposal), length_bound, }, [ - 207u8, 108u8, 143u8, 240u8, 75u8, 66u8, 184u8, 27u8, 120u8, 174u8, - 60u8, 30u8, 179u8, 210u8, 21u8, 55u8, 253u8, 128u8, 255u8, 184u8, 36u8, - 121u8, 162u8, 148u8, 200u8, 98u8, 165u8, 193u8, 132u8, 20u8, 244u8, - 40u8, + 207u8, 27u8, 175u8, 137u8, 87u8, 176u8, 52u8, 110u8, 175u8, 212u8, + 118u8, 136u8, 200u8, 108u8, 251u8, 232u8, 201u8, 155u8, 93u8, 62u8, + 38u8, 186u8, 198u8, 52u8, 26u8, 45u8, 214u8, 101u8, 202u8, 106u8, 99u8, + 219u8, ], ) } @@ -11300,45 +11867,31 @@ pub mod api { #[doc = "`threshold` determines whether `proposal` is executed directly (`threshold < 2`)"] #[doc = "or put up for voting."] #[doc = ""] - #[doc = "# "] - #[doc = "## Weight"] + #[doc = "## Complexity"] #[doc = "- `O(B + M + P1)` or `O(B + M + P2)` where:"] #[doc = " - `B` is `proposal` size in bytes (length-fee-bounded)"] #[doc = " - `M` is members-count (code- and governance-bounded)"] #[doc = " - branching is influenced by `threshold` where:"] #[doc = " - `P1` is proposal execution complexity (`threshold < 2`)"] #[doc = " - `P2` is proposals-count (code-bounded) (`threshold >= 2`)"] - #[doc = "- DB:"] - #[doc = " - 1 storage read `is_member` (codec `O(M)`)"] - #[doc = " - 1 storage read `ProposalOf::contains_key` (codec `O(1)`)"] - #[doc = " - DB accesses influenced by `threshold`:"] - #[doc = " - EITHER storage accesses done by `proposal` (`threshold < 2`)"] - #[doc = " - OR proposal insertion (`threshold <= 2`)"] - #[doc = " - 1 storage mutation `Proposals` (codec `O(P2)`)"] - #[doc = " - 1 storage mutation `ProposalCount` (codec `O(1)`)"] - #[doc = " - 1 storage write `ProposalOf` (codec `O(B)`)"] - #[doc = " - 1 storage write `Voting` (codec `O(M)`)"] - #[doc = " - 1 event"] - #[doc = "# "] pub fn propose( &self, threshold: ::core::primitive::u32, proposal: runtime_types::polkadot_runtime::RuntimeCall, length_bound: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Council", "propose", - Propose { + types::Propose { threshold, proposal: ::std::boxed::Box::new(proposal), length_bound, }, [ - 185u8, 29u8, 21u8, 240u8, 194u8, 157u8, 44u8, 223u8, 201u8, 106u8, - 168u8, 104u8, 111u8, 7u8, 168u8, 17u8, 73u8, 188u8, 70u8, 235u8, 43u8, - 82u8, 236u8, 70u8, 236u8, 94u8, 68u8, 201u8, 201u8, 114u8, 236u8, - 197u8, + 254u8, 227u8, 169u8, 126u8, 6u8, 164u8, 171u8, 55u8, 56u8, 151u8, 88u8, + 86u8, 190u8, 117u8, 162u8, 67u8, 200u8, 76u8, 182u8, 147u8, 104u8, + 250u8, 42u8, 76u8, 60u8, 234u8, 210u8, 0u8, 74u8, 178u8, 164u8, 129u8, ], ) } @@ -11349,24 +11902,18 @@ pub mod api { #[doc = "Transaction fees will be waived if the member is voting on any particular proposal"] #[doc = "for the first time and the call is successful. Subsequent vote changes will charge a"] #[doc = "fee."] - #[doc = "# "] - #[doc = "## Weight"] + #[doc = "## Complexity"] #[doc = "- `O(M)` where `M` is members-count (code- and governance-bounded)"] - #[doc = "- DB:"] - #[doc = " - 1 storage read `Members` (codec `O(M)`)"] - #[doc = " - 1 storage mutation `Voting` (codec `O(M)`)"] - #[doc = "- 1 event"] - #[doc = "# "] pub fn vote( &self, proposal: ::subxt::utils::H256, index: ::core::primitive::u32, approve: ::core::primitive::bool, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Council", "vote", - Vote { + types::Vote { proposal, index, approve, @@ -11378,61 +11925,6 @@ pub mod api { ], ) } - #[doc = "Close a vote that is either approved, disapproved or whose voting period has ended."] - #[doc = ""] - #[doc = "May be called by any signed account in order to finish voting and close the proposal."] - #[doc = ""] - #[doc = "If called before the end of the voting period it will only close the vote if it is"] - #[doc = "has enough votes to be approved or disapproved."] - #[doc = ""] - #[doc = "If called after the end of the voting period abstentions are counted as rejections"] - #[doc = "unless there is a prime member set and the prime member cast an approval."] - #[doc = ""] - #[doc = "If the close operation completes successfully with disapproval, the transaction fee will"] - #[doc = "be waived. Otherwise execution of the approved operation will be charged to the caller."] - #[doc = ""] - #[doc = "+ `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed"] - #[doc = "proposal."] - #[doc = "+ `length_bound`: The upper bound for the length of the proposal in storage. Checked via"] - #[doc = "`storage::read` so it is `size_of::() == 4` larger than the pure length."] - #[doc = ""] - #[doc = "# "] - #[doc = "## Weight"] - #[doc = "- `O(B + M + P1 + P2)` where:"] - #[doc = " - `B` is `proposal` size in bytes (length-fee-bounded)"] - #[doc = " - `M` is members-count (code- and governance-bounded)"] - #[doc = " - `P1` is the complexity of `proposal` preimage."] - #[doc = " - `P2` is proposal-count (code-bounded)"] - #[doc = "- DB:"] - #[doc = " - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`)"] - #[doc = " - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec"] - #[doc = " `O(P2)`)"] - #[doc = " - any mutations done while executing `proposal` (`P1`)"] - #[doc = "- up to 3 events"] - #[doc = "# "] - pub fn close_old_weight( - &self, - proposal_hash: ::subxt::utils::H256, - index: ::core::primitive::u32, - proposal_weight_bound: runtime_types::sp_weights::OldWeight, - length_bound: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Council", - "close_old_weight", - CloseOldWeight { - proposal_hash, - index, - proposal_weight_bound, - length_bound, - }, - [ - 133u8, 219u8, 90u8, 40u8, 102u8, 95u8, 4u8, 199u8, 45u8, 234u8, 109u8, - 17u8, 162u8, 63u8, 102u8, 186u8, 95u8, 182u8, 13u8, 123u8, 227u8, 20u8, - 186u8, 207u8, 12u8, 47u8, 87u8, 252u8, 244u8, 172u8, 60u8, 206u8, - ], - ) - } #[doc = "Disapprove a proposal, close, and remove it from the system, regardless of its current"] #[doc = "state."] #[doc = ""] @@ -11441,20 +11933,16 @@ pub mod api { #[doc = "Parameters:"] #[doc = "* `proposal_hash`: The hash of the proposal that should be disapproved."] #[doc = ""] - #[doc = "# "] - #[doc = "Complexity: O(P) where P is the number of max proposals"] - #[doc = "DB Weight:"] - #[doc = "* Reads: Proposals"] - #[doc = "* Writes: Voting, Proposals, ProposalOf"] - #[doc = "# "] + #[doc = "## Complexity"] + #[doc = "O(P) where P is the number of max proposals"] pub fn disapprove_proposal( &self, proposal_hash: ::subxt::utils::H256, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Council", "disapprove_proposal", - DisapproveProposal { proposal_hash }, + types::DisapproveProposal { proposal_hash }, [ 25u8, 123u8, 1u8, 8u8, 74u8, 37u8, 3u8, 40u8, 97u8, 37u8, 175u8, 224u8, 72u8, 155u8, 123u8, 109u8, 104u8, 43u8, 91u8, 125u8, 199u8, 51u8, 17u8, @@ -11480,31 +11968,23 @@ pub mod api { #[doc = "+ `length_bound`: The upper bound for the length of the proposal in storage. Checked via"] #[doc = "`storage::read` so it is `size_of::() == 4` larger than the pure length."] #[doc = ""] - #[doc = "# "] - #[doc = "## Weight"] + #[doc = "## Complexity"] #[doc = "- `O(B + M + P1 + P2)` where:"] #[doc = " - `B` is `proposal` size in bytes (length-fee-bounded)"] #[doc = " - `M` is members-count (code- and governance-bounded)"] #[doc = " - `P1` is the complexity of `proposal` preimage."] #[doc = " - `P2` is proposal-count (code-bounded)"] - #[doc = "- DB:"] - #[doc = " - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`)"] - #[doc = " - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec"] - #[doc = " `O(P2)`)"] - #[doc = " - any mutations done while executing `proposal` (`P1`)"] - #[doc = "- up to 3 events"] - #[doc = "# "] pub fn close( &self, proposal_hash: ::subxt::utils::H256, index: ::core::primitive::u32, proposal_weight_bound: runtime_types::sp_weights::weight_v2::Weight, length_bound: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Council", "close", - Close { + types::Close { proposal_hash, index, proposal_weight_bound, @@ -11672,7 +12152,9 @@ pub mod api { &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::sp_core::bounded::bounded_vec::BoundedVec<::subxt::utils::H256>, + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::subxt::utils::H256, + >, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), @@ -11707,10 +12189,9 @@ pub mod api { _0.borrow(), )], [ - 99u8, 114u8, 104u8, 38u8, 106u8, 3u8, 76u8, 17u8, 152u8, 13u8, 170u8, - 109u8, 232u8, 209u8, 208u8, 60u8, 216u8, 48u8, 170u8, 235u8, 241u8, - 25u8, 78u8, 92u8, 141u8, 251u8, 247u8, 253u8, 110u8, 183u8, 61u8, - 225u8, + 112u8, 100u8, 134u8, 22u8, 5u8, 252u8, 154u8, 197u8, 212u8, 0u8, 30u8, + 67u8, 152u8, 38u8, 106u8, 78u8, 241u8, 69u8, 252u8, 61u8, 156u8, 34u8, + 151u8, 254u8, 20u8, 47u8, 22u8, 70u8, 136u8, 146u8, 55u8, 120u8, ], ) } @@ -11729,10 +12210,9 @@ pub mod api { "ProposalOf", Vec::new(), [ - 99u8, 114u8, 104u8, 38u8, 106u8, 3u8, 76u8, 17u8, 152u8, 13u8, 170u8, - 109u8, 232u8, 209u8, 208u8, 60u8, 216u8, 48u8, 170u8, 235u8, 241u8, - 25u8, 78u8, 92u8, 141u8, 251u8, 247u8, 253u8, 110u8, 183u8, 61u8, - 225u8, + 112u8, 100u8, 134u8, 22u8, 5u8, 252u8, 154u8, 197u8, 212u8, 0u8, 30u8, + 67u8, 152u8, 38u8, 106u8, 78u8, 241u8, 69u8, 252u8, 61u8, 156u8, 34u8, + 151u8, 254u8, 20u8, 47u8, 22u8, 70u8, 136u8, 146u8, 55u8, 120u8, ], ) } @@ -11857,6 +12337,28 @@ pub mod api { } } } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The maximum weight of a dispatch call that can be proposed and executed."] + pub fn max_proposal_weight( + &self, + ) -> ::subxt::constants::Address + { + ::subxt::constants::Address::new_static( + "Council", + "MaxProposalWeight", + [ + 206u8, 61u8, 253u8, 247u8, 163u8, 40u8, 161u8, 52u8, 134u8, 140u8, + 206u8, 83u8, 44u8, 166u8, 226u8, 115u8, 181u8, 14u8, 227u8, 130u8, + 210u8, 32u8, 85u8, 29u8, 230u8, 97u8, 130u8, 165u8, 147u8, 134u8, + 106u8, 76u8, + ], + ) + } + } + } } pub mod technical_committee { use super::root_mod; @@ -11868,118 +12370,102 @@ pub mod api { use super::root_mod; use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetMembers { - pub new_members: ::std::vec::Vec<::subxt::utils::AccountId32>, - pub prime: ::core::option::Option<::subxt::utils::AccountId32>, - pub old_count: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Execute { - pub proposal: ::std::boxed::Box, - #[codec(compact)] - pub length_bound: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Propose { - #[codec(compact)] - pub threshold: ::core::primitive::u32, - pub proposal: ::std::boxed::Box, - #[codec(compact)] - pub length_bound: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Vote { - pub proposal: ::subxt::utils::H256, - #[codec(compact)] - pub index: ::core::primitive::u32, - pub approve: ::core::primitive::bool, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CloseOldWeight { - pub proposal_hash: ::subxt::utils::H256, - #[codec(compact)] - pub index: ::core::primitive::u32, - #[codec(compact)] - pub proposal_weight_bound: runtime_types::sp_weights::OldWeight, - #[codec(compact)] - pub length_bound: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct DisapproveProposal { - pub proposal_hash: ::subxt::utils::H256, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Close { - pub proposal_hash: ::subxt::utils::H256, - #[codec(compact)] - pub index: ::core::primitive::u32, - pub proposal_weight_bound: runtime_types::sp_weights::weight_v2::Weight, - #[codec(compact)] - pub length_bound: ::core::primitive::u32, + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetMembers { + pub new_members: ::std::vec::Vec<::subxt::utils::AccountId32>, + pub prime: ::core::option::Option<::subxt::utils::AccountId32>, + pub old_count: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Execute { + pub proposal: ::std::boxed::Box, + #[codec(compact)] + pub length_bound: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Propose { + #[codec(compact)] + pub threshold: ::core::primitive::u32, + pub proposal: ::std::boxed::Box, + #[codec(compact)] + pub length_bound: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Vote { + pub proposal: ::subxt::utils::H256, + #[codec(compact)] + pub index: ::core::primitive::u32, + pub approve: ::core::primitive::bool, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct DisapproveProposal { + pub proposal_hash: ::subxt::utils::H256, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Close { + pub proposal_hash: ::subxt::utils::H256, + #[codec(compact)] + pub index: ::core::primitive::u32, + pub proposal_weight_bound: runtime_types::sp_weights::weight_v2::Weight, + #[codec(compact)] + pub length_bound: ::core::primitive::u32, + } } pub struct TransactionApi; impl TransactionApi { @@ -11990,7 +12476,7 @@ pub mod api { #[doc = "- `old_count`: The upper bound for the previous number of members in storage. Used for"] #[doc = " weight estimation."] #[doc = ""] - #[doc = "Requires root origin."] + #[doc = "The dispatch of this call must be `SetMembersOrigin`."] #[doc = ""] #[doc = "NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but"] #[doc = " the weight estimations rely on it to estimate dispatchable weight."] @@ -12002,29 +12488,21 @@ pub mod api { #[doc = "Any call to `set_members` must be careful that the member set doesn't get out of sync"] #[doc = "with other logic managing the member set."] #[doc = ""] - #[doc = "# "] - #[doc = "## Weight"] + #[doc = "## Complexity:"] #[doc = "- `O(MP + N)` where:"] #[doc = " - `M` old-members-count (code- and governance-bounded)"] #[doc = " - `N` new-members-count (code- and governance-bounded)"] #[doc = " - `P` proposals-count (code-bounded)"] - #[doc = "- DB:"] - #[doc = " - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the"] - #[doc = " members"] - #[doc = " - 1 storage read (codec `O(P)`) for reading the proposals"] - #[doc = " - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal"] - #[doc = " - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one"] - #[doc = "# "] pub fn set_members( &self, new_members: ::std::vec::Vec<::subxt::utils::AccountId32>, prime: ::core::option::Option<::subxt::utils::AccountId32>, old_count: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "TechnicalCommittee", "set_members", - SetMembers { + types::SetMembers { new_members, prime, old_count, @@ -12041,30 +12519,28 @@ pub mod api { #[doc = ""] #[doc = "Origin must be a member of the collective."] #[doc = ""] - #[doc = "# "] - #[doc = "## Weight"] - #[doc = "- `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching"] - #[doc = " `proposal`"] - #[doc = "- DB: 1 read (codec `O(M)`) + DB access of `proposal`"] - #[doc = "- 1 event"] - #[doc = "# "] + #[doc = "## Complexity:"] + #[doc = "- `O(B + M + P)` where:"] + #[doc = "- `B` is `proposal` size in bytes (length-fee-bounded)"] + #[doc = "- `M` members-count (code-bounded)"] + #[doc = "- `P` complexity of dispatching `proposal`"] pub fn execute( &self, proposal: runtime_types::polkadot_runtime::RuntimeCall, length_bound: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "TechnicalCommittee", "execute", - Execute { + types::Execute { proposal: ::std::boxed::Box::new(proposal), length_bound, }, [ - 207u8, 108u8, 143u8, 240u8, 75u8, 66u8, 184u8, 27u8, 120u8, 174u8, - 60u8, 30u8, 179u8, 210u8, 21u8, 55u8, 253u8, 128u8, 255u8, 184u8, 36u8, - 121u8, 162u8, 148u8, 200u8, 98u8, 165u8, 193u8, 132u8, 20u8, 244u8, - 40u8, + 207u8, 27u8, 175u8, 137u8, 87u8, 176u8, 52u8, 110u8, 175u8, 212u8, + 118u8, 136u8, 200u8, 108u8, 251u8, 232u8, 201u8, 155u8, 93u8, 62u8, + 38u8, 186u8, 198u8, 52u8, 26u8, 45u8, 214u8, 101u8, 202u8, 106u8, 99u8, + 219u8, ], ) } @@ -12075,45 +12551,31 @@ pub mod api { #[doc = "`threshold` determines whether `proposal` is executed directly (`threshold < 2`)"] #[doc = "or put up for voting."] #[doc = ""] - #[doc = "# "] - #[doc = "## Weight"] + #[doc = "## Complexity"] #[doc = "- `O(B + M + P1)` or `O(B + M + P2)` where:"] #[doc = " - `B` is `proposal` size in bytes (length-fee-bounded)"] #[doc = " - `M` is members-count (code- and governance-bounded)"] #[doc = " - branching is influenced by `threshold` where:"] #[doc = " - `P1` is proposal execution complexity (`threshold < 2`)"] #[doc = " - `P2` is proposals-count (code-bounded) (`threshold >= 2`)"] - #[doc = "- DB:"] - #[doc = " - 1 storage read `is_member` (codec `O(M)`)"] - #[doc = " - 1 storage read `ProposalOf::contains_key` (codec `O(1)`)"] - #[doc = " - DB accesses influenced by `threshold`:"] - #[doc = " - EITHER storage accesses done by `proposal` (`threshold < 2`)"] - #[doc = " - OR proposal insertion (`threshold <= 2`)"] - #[doc = " - 1 storage mutation `Proposals` (codec `O(P2)`)"] - #[doc = " - 1 storage mutation `ProposalCount` (codec `O(1)`)"] - #[doc = " - 1 storage write `ProposalOf` (codec `O(B)`)"] - #[doc = " - 1 storage write `Voting` (codec `O(M)`)"] - #[doc = " - 1 event"] - #[doc = "# "] pub fn propose( &self, threshold: ::core::primitive::u32, proposal: runtime_types::polkadot_runtime::RuntimeCall, length_bound: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "TechnicalCommittee", "propose", - Propose { + types::Propose { threshold, proposal: ::std::boxed::Box::new(proposal), length_bound, }, [ - 185u8, 29u8, 21u8, 240u8, 194u8, 157u8, 44u8, 223u8, 201u8, 106u8, - 168u8, 104u8, 111u8, 7u8, 168u8, 17u8, 73u8, 188u8, 70u8, 235u8, 43u8, - 82u8, 236u8, 70u8, 236u8, 94u8, 68u8, 201u8, 201u8, 114u8, 236u8, - 197u8, + 254u8, 227u8, 169u8, 126u8, 6u8, 164u8, 171u8, 55u8, 56u8, 151u8, 88u8, + 86u8, 190u8, 117u8, 162u8, 67u8, 200u8, 76u8, 182u8, 147u8, 104u8, + 250u8, 42u8, 76u8, 60u8, 234u8, 210u8, 0u8, 74u8, 178u8, 164u8, 129u8, ], ) } @@ -12124,24 +12586,18 @@ pub mod api { #[doc = "Transaction fees will be waived if the member is voting on any particular proposal"] #[doc = "for the first time and the call is successful. Subsequent vote changes will charge a"] #[doc = "fee."] - #[doc = "# "] - #[doc = "## Weight"] + #[doc = "## Complexity"] #[doc = "- `O(M)` where `M` is members-count (code- and governance-bounded)"] - #[doc = "- DB:"] - #[doc = " - 1 storage read `Members` (codec `O(M)`)"] - #[doc = " - 1 storage mutation `Voting` (codec `O(M)`)"] - #[doc = "- 1 event"] - #[doc = "# "] pub fn vote( &self, proposal: ::subxt::utils::H256, index: ::core::primitive::u32, approve: ::core::primitive::bool, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "TechnicalCommittee", "vote", - Vote { + types::Vote { proposal, index, approve, @@ -12153,61 +12609,6 @@ pub mod api { ], ) } - #[doc = "Close a vote that is either approved, disapproved or whose voting period has ended."] - #[doc = ""] - #[doc = "May be called by any signed account in order to finish voting and close the proposal."] - #[doc = ""] - #[doc = "If called before the end of the voting period it will only close the vote if it is"] - #[doc = "has enough votes to be approved or disapproved."] - #[doc = ""] - #[doc = "If called after the end of the voting period abstentions are counted as rejections"] - #[doc = "unless there is a prime member set and the prime member cast an approval."] - #[doc = ""] - #[doc = "If the close operation completes successfully with disapproval, the transaction fee will"] - #[doc = "be waived. Otherwise execution of the approved operation will be charged to the caller."] - #[doc = ""] - #[doc = "+ `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed"] - #[doc = "proposal."] - #[doc = "+ `length_bound`: The upper bound for the length of the proposal in storage. Checked via"] - #[doc = "`storage::read` so it is `size_of::() == 4` larger than the pure length."] - #[doc = ""] - #[doc = "# "] - #[doc = "## Weight"] - #[doc = "- `O(B + M + P1 + P2)` where:"] - #[doc = " - `B` is `proposal` size in bytes (length-fee-bounded)"] - #[doc = " - `M` is members-count (code- and governance-bounded)"] - #[doc = " - `P1` is the complexity of `proposal` preimage."] - #[doc = " - `P2` is proposal-count (code-bounded)"] - #[doc = "- DB:"] - #[doc = " - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`)"] - #[doc = " - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec"] - #[doc = " `O(P2)`)"] - #[doc = " - any mutations done while executing `proposal` (`P1`)"] - #[doc = "- up to 3 events"] - #[doc = "# "] - pub fn close_old_weight( - &self, - proposal_hash: ::subxt::utils::H256, - index: ::core::primitive::u32, - proposal_weight_bound: runtime_types::sp_weights::OldWeight, - length_bound: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "TechnicalCommittee", - "close_old_weight", - CloseOldWeight { - proposal_hash, - index, - proposal_weight_bound, - length_bound, - }, - [ - 133u8, 219u8, 90u8, 40u8, 102u8, 95u8, 4u8, 199u8, 45u8, 234u8, 109u8, - 17u8, 162u8, 63u8, 102u8, 186u8, 95u8, 182u8, 13u8, 123u8, 227u8, 20u8, - 186u8, 207u8, 12u8, 47u8, 87u8, 252u8, 244u8, 172u8, 60u8, 206u8, - ], - ) - } #[doc = "Disapprove a proposal, close, and remove it from the system, regardless of its current"] #[doc = "state."] #[doc = ""] @@ -12216,20 +12617,16 @@ pub mod api { #[doc = "Parameters:"] #[doc = "* `proposal_hash`: The hash of the proposal that should be disapproved."] #[doc = ""] - #[doc = "# "] - #[doc = "Complexity: O(P) where P is the number of max proposals"] - #[doc = "DB Weight:"] - #[doc = "* Reads: Proposals"] - #[doc = "* Writes: Voting, Proposals, ProposalOf"] - #[doc = "# "] + #[doc = "## Complexity"] + #[doc = "O(P) where P is the number of max proposals"] pub fn disapprove_proposal( &self, proposal_hash: ::subxt::utils::H256, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "TechnicalCommittee", "disapprove_proposal", - DisapproveProposal { proposal_hash }, + types::DisapproveProposal { proposal_hash }, [ 25u8, 123u8, 1u8, 8u8, 74u8, 37u8, 3u8, 40u8, 97u8, 37u8, 175u8, 224u8, 72u8, 155u8, 123u8, 109u8, 104u8, 43u8, 91u8, 125u8, 199u8, 51u8, 17u8, @@ -12255,31 +12652,23 @@ pub mod api { #[doc = "+ `length_bound`: The upper bound for the length of the proposal in storage. Checked via"] #[doc = "`storage::read` so it is `size_of::() == 4` larger than the pure length."] #[doc = ""] - #[doc = "# "] - #[doc = "## Weight"] + #[doc = "## Complexity"] #[doc = "- `O(B + M + P1 + P2)` where:"] #[doc = " - `B` is `proposal` size in bytes (length-fee-bounded)"] #[doc = " - `M` is members-count (code- and governance-bounded)"] #[doc = " - `P1` is the complexity of `proposal` preimage."] #[doc = " - `P2` is proposal-count (code-bounded)"] - #[doc = "- DB:"] - #[doc = " - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`)"] - #[doc = " - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec"] - #[doc = " `O(P2)`)"] - #[doc = " - any mutations done while executing `proposal` (`P1`)"] - #[doc = "- up to 3 events"] - #[doc = "# "] pub fn close( &self, proposal_hash: ::subxt::utils::H256, index: ::core::primitive::u32, proposal_weight_bound: runtime_types::sp_weights::weight_v2::Weight, length_bound: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "TechnicalCommittee", "close", - Close { + types::Close { proposal_hash, index, proposal_weight_bound, @@ -12447,7 +12836,9 @@ pub mod api { &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::sp_core::bounded::bounded_vec::BoundedVec<::subxt::utils::H256>, + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::subxt::utils::H256, + >, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), @@ -12482,10 +12873,9 @@ pub mod api { _0.borrow(), )], [ - 99u8, 114u8, 104u8, 38u8, 106u8, 3u8, 76u8, 17u8, 152u8, 13u8, 170u8, - 109u8, 232u8, 209u8, 208u8, 60u8, 216u8, 48u8, 170u8, 235u8, 241u8, - 25u8, 78u8, 92u8, 141u8, 251u8, 247u8, 253u8, 110u8, 183u8, 61u8, - 225u8, + 112u8, 100u8, 134u8, 22u8, 5u8, 252u8, 154u8, 197u8, 212u8, 0u8, 30u8, + 67u8, 152u8, 38u8, 106u8, 78u8, 241u8, 69u8, 252u8, 61u8, 156u8, 34u8, + 151u8, 254u8, 20u8, 47u8, 22u8, 70u8, 136u8, 146u8, 55u8, 120u8, ], ) } @@ -12504,10 +12894,9 @@ pub mod api { "ProposalOf", Vec::new(), [ - 99u8, 114u8, 104u8, 38u8, 106u8, 3u8, 76u8, 17u8, 152u8, 13u8, 170u8, - 109u8, 232u8, 209u8, 208u8, 60u8, 216u8, 48u8, 170u8, 235u8, 241u8, - 25u8, 78u8, 92u8, 141u8, 251u8, 247u8, 253u8, 110u8, 183u8, 61u8, - 225u8, + 112u8, 100u8, 134u8, 22u8, 5u8, 252u8, 154u8, 197u8, 212u8, 0u8, 30u8, + 67u8, 152u8, 38u8, 106u8, 78u8, 241u8, 69u8, 252u8, 61u8, 156u8, 34u8, + 151u8, 254u8, 20u8, 47u8, 22u8, 70u8, 136u8, 146u8, 55u8, 120u8, ], ) } @@ -12632,6 +13021,28 @@ pub mod api { } } } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The maximum weight of a dispatch call that can be proposed and executed."] + pub fn max_proposal_weight( + &self, + ) -> ::subxt::constants::Address + { + ::subxt::constants::Address::new_static( + "TechnicalCommittee", + "MaxProposalWeight", + [ + 206u8, 61u8, 253u8, 247u8, 163u8, 40u8, 161u8, 52u8, 134u8, 140u8, + 206u8, 83u8, 44u8, 166u8, 226u8, 115u8, 181u8, 14u8, 227u8, 130u8, + 210u8, 32u8, 85u8, 29u8, 230u8, 97u8, 130u8, 165u8, 147u8, 134u8, + 106u8, 76u8, + ], + ) + } + } + } } pub mod phragmen_election { use super::root_mod; @@ -12643,87 +13054,90 @@ pub mod api { use super::root_mod; use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Vote { - pub votes: ::std::vec::Vec<::subxt::utils::AccountId32>, - #[codec(compact)] - pub value: ::core::primitive::u128, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RemoveVoter; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SubmitCandidacy { - #[codec(compact)] - pub candidate_count: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RenounceCandidacy { - pub renouncing: runtime_types::pallet_elections_phragmen::Renouncing, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RemoveMember { - pub who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - pub slash_bond: ::core::primitive::bool, - pub rerun_election: ::core::primitive::bool, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CleanDefunctVoters { - pub num_voters: ::core::primitive::u32, - pub num_defunct: ::core::primitive::u32, + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Vote { + pub votes: ::std::vec::Vec<::subxt::utils::AccountId32>, + #[codec(compact)] + pub value: ::core::primitive::u128, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct RemoveVoter; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SubmitCandidacy { + #[codec(compact)] + pub candidate_count: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct RenounceCandidacy { + pub renouncing: runtime_types::pallet_elections_phragmen::Renouncing, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct RemoveMember { + pub who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub slash_bond: ::core::primitive::bool, + pub rerun_election: ::core::primitive::bool, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct CleanDefunctVoters { + pub num_voters: ::core::primitive::u32, + pub num_defunct: ::core::primitive::u32, + } } pub struct TransactionApi; impl TransactionApi { @@ -12746,19 +13160,15 @@ pub mod api { #[doc = ""] #[doc = "It is the responsibility of the caller to **NOT** place all of their balance into the"] #[doc = "lock and keep some for further operations."] - #[doc = ""] - #[doc = "# "] - #[doc = "We assume the maximum weight among all 3 cases: vote_equal, vote_more and vote_less."] - #[doc = "# "] pub fn vote( &self, votes: ::std::vec::Vec<::subxt::utils::AccountId32>, value: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "PhragmenElection", "vote", - Vote { votes, value }, + types::Vote { votes, value }, [ 71u8, 90u8, 175u8, 225u8, 51u8, 202u8, 197u8, 252u8, 183u8, 92u8, 239u8, 83u8, 112u8, 144u8, 128u8, 211u8, 109u8, 33u8, 252u8, 6u8, @@ -12772,11 +13182,11 @@ pub mod api { #[doc = "This removes the lock and returns the deposit."] #[doc = ""] #[doc = "The dispatch origin of this call must be signed and be a voter."] - pub fn remove_voter(&self) -> ::subxt::tx::Payload { + pub fn remove_voter(&self) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "PhragmenElection", "remove_voter", - RemoveVoter {}, + types::RemoveVoter {}, [ 254u8, 46u8, 140u8, 4u8, 218u8, 45u8, 150u8, 72u8, 67u8, 131u8, 108u8, 201u8, 46u8, 157u8, 104u8, 161u8, 53u8, 155u8, 130u8, 50u8, 88u8, @@ -12796,17 +13206,17 @@ pub mod api { #[doc = "Even if a candidate ends up being a member, they must call [`Call::renounce_candidacy`]"] #[doc = "to get their deposit back. Losing the spot in an election will always lead to a slash."] #[doc = ""] - #[doc = "# "] #[doc = "The number of current candidates must be provided as witness data."] - #[doc = "# "] + #[doc = "## Complexity"] + #[doc = "O(C + log(C)) where C is candidate_count."] pub fn submit_candidacy( &self, candidate_count: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "PhragmenElection", "submit_candidacy", - SubmitCandidacy { candidate_count }, + types::SubmitCandidacy { candidate_count }, [ 228u8, 63u8, 217u8, 99u8, 128u8, 104u8, 175u8, 10u8, 30u8, 35u8, 47u8, 14u8, 254u8, 122u8, 146u8, 239u8, 61u8, 145u8, 82u8, 7u8, 181u8, 98u8, @@ -12828,18 +13238,20 @@ pub mod api { #[doc = " next round."] #[doc = ""] #[doc = "The dispatch origin of this call must be signed, and have one of the above roles."] - #[doc = ""] - #[doc = "# "] #[doc = "The type of renouncing must be provided as witness data."] - #[doc = "# "] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = " - Renouncing::Candidate(count): O(count + log(count))"] + #[doc = " - Renouncing::Member: O(1)"] + #[doc = " - Renouncing::RunnerUp: O(1)"] pub fn renounce_candidacy( &self, renouncing: runtime_types::pallet_elections_phragmen::Renouncing, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "PhragmenElection", "renounce_candidacy", - RenounceCandidacy { renouncing }, + types::RenounceCandidacy { renouncing }, [ 70u8, 72u8, 208u8, 36u8, 80u8, 245u8, 224u8, 75u8, 60u8, 142u8, 19u8, 49u8, 142u8, 90u8, 14u8, 69u8, 15u8, 61u8, 170u8, 235u8, 16u8, 252u8, @@ -12861,20 +13273,18 @@ pub mod api { #[doc = ""] #[doc = "Note that this does not affect the designated block number of the next election."] #[doc = ""] - #[doc = "# "] - #[doc = "If we have a replacement, we use a small weight. Else, since this is a root call and"] - #[doc = "will go into phragmen, we assume full block for now."] - #[doc = "# "] + #[doc = "## Complexity"] + #[doc = "- Check details of remove_and_replace_member() and do_phragmen()."] pub fn remove_member( &self, who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, slash_bond: ::core::primitive::bool, rerun_election: ::core::primitive::bool, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "PhragmenElection", "remove_member", - RemoveMember { + types::RemoveMember { who, slash_bond, rerun_election, @@ -12893,18 +13303,17 @@ pub mod api { #[doc = ""] #[doc = "The dispatch origin of this call must be root."] #[doc = ""] - #[doc = "# "] - #[doc = "The total number of voters and those that are defunct must be provided as witness data."] - #[doc = "# "] + #[doc = "## Complexity"] + #[doc = "- Check is_defunct_voter() details."] pub fn clean_defunct_voters( &self, num_voters: ::core::primitive::u32, num_defunct: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "PhragmenElection", "clean_defunct_voters", - CleanDefunctVoters { + types::CleanDefunctVoters { num_voters, num_defunct, }, @@ -13337,9 +13746,10 @@ pub mod api { } #[doc = " The maximum number of candidates in a phragmen election."] #[doc = ""] - #[doc = " Warning: The election happens onchain, and this value will determine"] - #[doc = " the size of the election. When this limit is reached no more"] - #[doc = " candidates are accepted in the election."] + #[doc = " Warning: This impacts the size of the election which is run onchain. Chose wisely, and"] + #[doc = " consider how it will impact `T::WeightInfo::election_phragmen`."] + #[doc = ""] + #[doc = " When this limit is reached no more candidates are accepted in the election."] pub fn max_candidates( &self, ) -> ::subxt::constants::Address<::core::primitive::u32> { @@ -13356,7 +13766,9 @@ pub mod api { } #[doc = " The maximum number of voters to allow in a phragmen election."] #[doc = ""] - #[doc = " Warning: This impacts the size of the election which is run onchain."] + #[doc = " Warning: This impacts the size of the election which is run onchain. Chose wisely, and"] + #[doc = " consider how it will impact `T::WeightInfo::election_phragmen`."] + #[doc = ""] #[doc = " When the limit is reached the new voters are ignored."] pub fn max_voters(&self) -> ::subxt::constants::Address<::core::primitive::u32> { ::subxt::constants::Address::new_static( @@ -13370,6 +13782,24 @@ pub mod api { ], ) } + #[doc = " Maximum numbers of votes per voter."] + #[doc = ""] + #[doc = " Warning: This impacts the size of the election which is run onchain. Chose wisely, and"] + #[doc = " consider how it will impact `T::WeightInfo::election_phragmen`."] + pub fn max_votes_per_voter( + &self, + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "PhragmenElection", + "MaxVotesPerVoter", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } } } } @@ -13383,96 +13813,99 @@ pub mod api { use super::root_mod; use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AddMember { - pub who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RemoveMember { - pub who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SwapMember { - pub remove: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - pub add: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ResetMembers { - pub members: ::std::vec::Vec<::subxt::utils::AccountId32>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ChangeKey { - pub new: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetPrime { - pub who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct AddMember { + pub who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct RemoveMember { + pub who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SwapMember { + pub remove: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub add: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ResetMembers { + pub members: ::std::vec::Vec<::subxt::utils::AccountId32>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ChangeKey { + pub new: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetPrime { + pub who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ClearPrime; } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ClearPrime; pub struct TransactionApi; impl TransactionApi { #[doc = "Add a member `who` to the set."] @@ -13481,11 +13914,11 @@ pub mod api { pub fn add_member( &self, who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "TechnicalMembership", "add_member", - AddMember { who }, + types::AddMember { who }, [ 165u8, 116u8, 123u8, 50u8, 236u8, 196u8, 108u8, 211u8, 112u8, 214u8, 121u8, 105u8, 7u8, 88u8, 125u8, 99u8, 24u8, 0u8, 168u8, 65u8, 158u8, @@ -13500,11 +13933,11 @@ pub mod api { pub fn remove_member( &self, who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "TechnicalMembership", "remove_member", - RemoveMember { who }, + types::RemoveMember { who }, [ 177u8, 18u8, 217u8, 235u8, 254u8, 40u8, 137u8, 79u8, 146u8, 5u8, 55u8, 187u8, 129u8, 28u8, 54u8, 132u8, 115u8, 220u8, 132u8, 139u8, 91u8, @@ -13521,11 +13954,11 @@ pub mod api { &self, remove: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, add: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "TechnicalMembership", "swap_member", - SwapMember { remove, add }, + types::SwapMember { remove, add }, [ 96u8, 248u8, 50u8, 206u8, 192u8, 242u8, 162u8, 62u8, 28u8, 91u8, 11u8, 208u8, 15u8, 84u8, 188u8, 234u8, 219u8, 233u8, 200u8, 215u8, 157u8, @@ -13541,11 +13974,11 @@ pub mod api { pub fn reset_members( &self, members: ::std::vec::Vec<::subxt::utils::AccountId32>, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "TechnicalMembership", "reset_members", - ResetMembers { members }, + types::ResetMembers { members }, [ 9u8, 35u8, 28u8, 59u8, 158u8, 232u8, 89u8, 78u8, 101u8, 53u8, 240u8, 98u8, 13u8, 104u8, 235u8, 161u8, 201u8, 150u8, 117u8, 32u8, 75u8, @@ -13561,11 +13994,11 @@ pub mod api { pub fn change_key( &self, new: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "TechnicalMembership", "change_key", - ChangeKey { new }, + types::ChangeKey { new }, [ 27u8, 236u8, 241u8, 168u8, 98u8, 39u8, 176u8, 220u8, 145u8, 48u8, 173u8, 25u8, 179u8, 103u8, 170u8, 13u8, 166u8, 181u8, 131u8, 160u8, @@ -13580,11 +14013,11 @@ pub mod api { pub fn set_prime( &self, who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "TechnicalMembership", "set_prime", - SetPrime { who }, + types::SetPrime { who }, [ 0u8, 42u8, 111u8, 52u8, 151u8, 19u8, 239u8, 149u8, 183u8, 252u8, 87u8, 194u8, 145u8, 21u8, 245u8, 112u8, 221u8, 181u8, 87u8, 28u8, 48u8, 39u8, @@ -13595,11 +14028,11 @@ pub mod api { #[doc = "Remove the prime member if it exists."] #[doc = ""] #[doc = "May only be called from `T::PrimeOrigin`."] - pub fn clear_prime(&self) -> ::subxt::tx::Payload { + pub fn clear_prime(&self) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "TechnicalMembership", "clear_prime", - ClearPrime {}, + types::ClearPrime {}, [ 186u8, 182u8, 225u8, 90u8, 71u8, 124u8, 69u8, 100u8, 234u8, 25u8, 53u8, 23u8, 182u8, 32u8, 176u8, 81u8, 54u8, 140u8, 235u8, 126u8, 247u8, 7u8, @@ -13719,7 +14152,7 @@ pub mod api { &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + runtime_types::bounded_collections::bounded_vec::BoundedVec< ::subxt::utils::AccountId32, >, ::subxt::storage::address::Yes, @@ -13772,77 +14205,80 @@ pub mod api { use super::root_mod; use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ProposeSpend { - #[codec(compact)] - pub value: ::core::primitive::u128, - pub beneficiary: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RejectProposal { - #[codec(compact)] - pub proposal_id: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ApproveProposal { - #[codec(compact)] - pub proposal_id: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Spend { - #[codec(compact)] - pub amount: ::core::primitive::u128, - pub beneficiary: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RemoveApproval { - #[codec(compact)] - pub proposal_id: ::core::primitive::u32, + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ProposeSpend { + #[codec(compact)] + pub value: ::core::primitive::u128, + pub beneficiary: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct RejectProposal { + #[codec(compact)] + pub proposal_id: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ApproveProposal { + #[codec(compact)] + pub proposal_id: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Spend { + #[codec(compact)] + pub amount: ::core::primitive::u128, + pub beneficiary: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct RemoveApproval { + #[codec(compact)] + pub proposal_id: ::core::primitive::u32, + } } pub struct TransactionApi; impl TransactionApi { @@ -13850,20 +14286,17 @@ pub mod api { #[doc = "is reserved and slashed if the proposal is rejected. It is returned once the"] #[doc = "proposal is awarded."] #[doc = ""] - #[doc = "# "] - #[doc = "- Complexity: O(1)"] - #[doc = "- DbReads: `ProposalCount`, `origin account`"] - #[doc = "- DbWrites: `ProposalCount`, `Proposals`, `origin account`"] - #[doc = "# "] + #[doc = "## Complexity"] + #[doc = "- O(1)"] pub fn propose_spend( &self, value: ::core::primitive::u128, beneficiary: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Treasury", "propose_spend", - ProposeSpend { value, beneficiary }, + types::ProposeSpend { value, beneficiary }, [ 109u8, 46u8, 8u8, 159u8, 127u8, 79u8, 27u8, 100u8, 92u8, 244u8, 78u8, 46u8, 105u8, 246u8, 169u8, 210u8, 149u8, 7u8, 108u8, 153u8, 203u8, @@ -13875,19 +14308,16 @@ pub mod api { #[doc = ""] #[doc = "May only be called from `T::RejectOrigin`."] #[doc = ""] - #[doc = "# "] - #[doc = "- Complexity: O(1)"] - #[doc = "- DbReads: `Proposals`, `rejected proposer account`"] - #[doc = "- DbWrites: `Proposals`, `rejected proposer account`"] - #[doc = "# "] + #[doc = "## Complexity"] + #[doc = "- O(1)"] pub fn reject_proposal( &self, proposal_id: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Treasury", "reject_proposal", - RejectProposal { proposal_id }, + types::RejectProposal { proposal_id }, [ 106u8, 223u8, 97u8, 22u8, 111u8, 208u8, 128u8, 26u8, 198u8, 140u8, 118u8, 126u8, 187u8, 51u8, 193u8, 50u8, 193u8, 68u8, 143u8, 144u8, @@ -13901,19 +14331,16 @@ pub mod api { #[doc = ""] #[doc = "May only be called from `T::ApproveOrigin`."] #[doc = ""] - #[doc = "# "] - #[doc = "- Complexity: O(1)."] - #[doc = "- DbReads: `Proposals`, `Approvals`"] - #[doc = "- DbWrite: `Approvals`"] - #[doc = "# "] + #[doc = "## Complexity"] + #[doc = " - O(1)."] pub fn approve_proposal( &self, proposal_id: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Treasury", "approve_proposal", - ApproveProposal { proposal_id }, + types::ApproveProposal { proposal_id }, [ 164u8, 229u8, 172u8, 98u8, 129u8, 62u8, 84u8, 128u8, 47u8, 108u8, 33u8, 120u8, 89u8, 79u8, 57u8, 121u8, 4u8, 197u8, 170u8, 153u8, 156u8, 17u8, @@ -13933,11 +14360,11 @@ pub mod api { &self, amount: ::core::primitive::u128, beneficiary: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Treasury", "spend", - Spend { + types::Spend { amount, beneficiary, }, @@ -13954,10 +14381,8 @@ pub mod api { #[doc = "May only be called from `T::RejectOrigin`."] #[doc = "- `proposal_id`: The index of a proposal"] #[doc = ""] - #[doc = "# "] - #[doc = "- Complexity: O(A) where `A` is the number of approvals"] - #[doc = "- Db reads and writes: `Approvals`"] - #[doc = "# "] + #[doc = "## Complexity"] + #[doc = "- O(A) where `A` is the number of approvals"] #[doc = ""] #[doc = "Errors:"] #[doc = "- `ProposalNotApproved`: The `proposal_id` supplied was not found in the approval queue,"] @@ -13966,11 +14391,11 @@ pub mod api { pub fn remove_approval( &self, proposal_id: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Treasury", "remove_approval", - RemoveApproval { proposal_id }, + types::RemoveApproval { proposal_id }, [ 133u8, 126u8, 181u8, 47u8, 196u8, 243u8, 7u8, 46u8, 25u8, 251u8, 154u8, 125u8, 217u8, 77u8, 54u8, 245u8, 240u8, 180u8, 97u8, 34u8, 186u8, 53u8, @@ -14138,6 +14563,25 @@ pub mod api { const PALLET: &'static str = "Treasury"; const EVENT: &'static str = "SpendApproved"; } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "The inactive funds of the pallet have been updated."] + pub struct UpdatedInactive { + pub reactivated: ::core::primitive::u128, + pub deactivated: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for UpdatedInactive { + const PALLET: &'static str = "Treasury"; + const EVENT: &'static str = "UpdatedInactive"; + } } pub mod storage { use super::runtime_types; @@ -14216,12 +14660,33 @@ pub mod api { ], ) } + #[doc = " The amount which has been reported as inactive to Currency."] + pub fn deactivated( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u128, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "Treasury", + "Deactivated", + vec![], + [ + 159u8, 57u8, 5u8, 85u8, 136u8, 128u8, 70u8, 43u8, 67u8, 76u8, 123u8, + 206u8, 48u8, 253u8, 51u8, 40u8, 14u8, 35u8, 162u8, 173u8, 127u8, 79u8, + 38u8, 235u8, 9u8, 141u8, 201u8, 37u8, 211u8, 176u8, 119u8, 106u8, + ], + ) + } #[doc = " Proposal indices that have been approved but not yet awarded."] pub fn approvals( &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + runtime_types::bounded_collections::bounded_vec::BoundedVec< ::core::primitive::u32, >, ::subxt::storage::address::Yes, @@ -14353,292 +14818,325 @@ pub mod api { } } } - pub mod claims { + pub mod conviction_voting { use super::root_mod; use super::runtime_types; #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub type Error = runtime_types::polkadot_runtime_common::claims::pallet::Error; + pub type Error = runtime_types::pallet_conviction_voting::pallet::Error; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub mod calls { use super::root_mod; use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Claim { - pub dest: ::subxt::utils::AccountId32, - pub ethereum_signature: - runtime_types::polkadot_runtime_common::claims::EcdsaSignature, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct MintClaim { - pub who: runtime_types::polkadot_runtime_common::claims::EthereumAddress, - pub value: ::core::primitive::u128, - pub vesting_schedule: ::core::option::Option<( - ::core::primitive::u128, - ::core::primitive::u128, - ::core::primitive::u32, - )>, - pub statement: ::core::option::Option< - runtime_types::polkadot_runtime_common::claims::StatementKind, - >, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ClaimAttest { - pub dest: ::subxt::utils::AccountId32, - pub ethereum_signature: - runtime_types::polkadot_runtime_common::claims::EcdsaSignature, - pub statement: ::std::vec::Vec<::core::primitive::u8>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Attest { - pub statement: ::std::vec::Vec<::core::primitive::u8>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct MoveClaim { - pub old: runtime_types::polkadot_runtime_common::claims::EthereumAddress, - pub new: runtime_types::polkadot_runtime_common::claims::EthereumAddress, - pub maybe_preclaim: ::core::option::Option<::subxt::utils::AccountId32>, + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Vote { + #[codec(compact)] + pub poll_index: ::core::primitive::u32, + pub vote: runtime_types::pallet_conviction_voting::vote::AccountVote< + ::core::primitive::u128, + >, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Delegate { + pub class: ::core::primitive::u16, + pub to: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub conviction: runtime_types::pallet_conviction_voting::conviction::Conviction, + pub balance: ::core::primitive::u128, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Undelegate { + pub class: ::core::primitive::u16, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Unlock { + pub class: ::core::primitive::u16, + pub target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct RemoveVote { + pub class: ::core::option::Option<::core::primitive::u16>, + pub index: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct RemoveOtherVote { + pub target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub class: ::core::primitive::u16, + pub index: ::core::primitive::u32, + } } pub struct TransactionApi; impl TransactionApi { - #[doc = "Make a claim to collect your DOTs."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _None_."] - #[doc = ""] - #[doc = "Unsigned Validation:"] - #[doc = "A call to claim is deemed valid if the signature provided matches"] - #[doc = "the expected signed message of:"] - #[doc = ""] - #[doc = "> Ethereum Signed Message:"] - #[doc = "> (configured prefix string)(address)"] - #[doc = ""] - #[doc = "and `address` matches the `dest` account."] + #[doc = "Vote in a poll. If `vote.is_aye()`, the vote is to enact the proposal;"] + #[doc = "otherwise it is a vote to keep the status quo."] #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `dest`: The destination account to payout the claim."] - #[doc = "- `ethereum_signature`: The signature of an ethereum signed message"] - #[doc = " matching the format described above."] + #[doc = "The dispatch origin of this call must be _Signed_."] #[doc = ""] - #[doc = ""] - #[doc = "The weight of this call is invariant over the input parameters."] - #[doc = "Weight includes logic to validate unsigned `claim` call."] + #[doc = "- `poll_index`: The index of the poll to vote for."] + #[doc = "- `vote`: The vote configuration."] #[doc = ""] - #[doc = "Total Complexity: O(1)"] - #[doc = ""] - pub fn claim( + #[doc = "Weight: `O(R)` where R is the number of polls the voter has voted on."] + pub fn vote( &self, - dest: ::subxt::utils::AccountId32, - ethereum_signature : runtime_types :: polkadot_runtime_common :: claims :: EcdsaSignature, - ) -> ::subxt::tx::Payload { + poll_index: ::core::primitive::u32, + vote: runtime_types::pallet_conviction_voting::vote::AccountVote< + ::core::primitive::u128, + >, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Claims", - "claim", - Claim { - dest, - ethereum_signature, - }, + "ConvictionVoting", + "vote", + types::Vote { poll_index, vote }, [ - 33u8, 63u8, 71u8, 104u8, 200u8, 179u8, 248u8, 38u8, 193u8, 198u8, - 250u8, 49u8, 106u8, 26u8, 109u8, 183u8, 33u8, 50u8, 217u8, 28u8, 50u8, - 107u8, 249u8, 80u8, 199u8, 10u8, 192u8, 1u8, 54u8, 41u8, 146u8, 11u8, + 255u8, 8u8, 191u8, 166u8, 7u8, 48u8, 227u8, 0u8, 34u8, 109u8, 3u8, + 172u8, 168u8, 37u8, 220u8, 229u8, 88u8, 61u8, 117u8, 212u8, 131u8, + 124u8, 74u8, 60u8, 83u8, 62u8, 193u8, 66u8, 162u8, 121u8, 76u8, 180u8, ], ) } - #[doc = "Mint a new claim to collect DOTs."] + #[doc = "Delegate the voting power (with some given conviction) of the sending account for a"] + #[doc = "particular class of polls."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Root_."] + #[doc = "The balance delegated is locked for as long as it's delegated, and thereafter for the"] + #[doc = "time appropriate for the conviction's lock period."] #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `who`: The Ethereum address allowed to collect this claim."] - #[doc = "- `value`: The number of DOTs that will be claimed."] - #[doc = "- `vesting_schedule`: An optional vesting schedule for these DOTs."] + #[doc = "The dispatch origin of this call must be _Signed_, and the signing account must either:"] + #[doc = " - be delegating already; or"] + #[doc = " - have no voting activity (if there is, then it will need to be removed/consolidated"] + #[doc = " through `reap_vote` or `unvote`)."] #[doc = ""] - #[doc = ""] - #[doc = "The weight of this call is invariant over the input parameters."] - #[doc = "We assume worst case that both vesting and statement is being inserted."] + #[doc = "- `to`: The account whose voting the `target` account's voting power will follow."] + #[doc = "- `class`: The class of polls to delegate. To delegate multiple classes, multiple calls"] + #[doc = " to this function are required."] + #[doc = "- `conviction`: The conviction that will be attached to the delegated votes. When the"] + #[doc = " account is undelegated, the funds will be locked for the corresponding period."] + #[doc = "- `balance`: The amount of the account's balance to be used in delegating. This must not"] + #[doc = " be more than the account's current balance."] #[doc = ""] - #[doc = "Total Complexity: O(1)"] - #[doc = ""] - pub fn mint_claim( + #[doc = "Emits `Delegated`."] + #[doc = ""] + #[doc = "Weight: `O(R)` where R is the number of polls the voter delegating to has"] + #[doc = " voted on. Weight is initially charged as if maximum votes, but is refunded later."] + pub fn delegate( &self, - who: runtime_types::polkadot_runtime_common::claims::EthereumAddress, - value: ::core::primitive::u128, - vesting_schedule: ::core::option::Option<( - ::core::primitive::u128, - ::core::primitive::u128, - ::core::primitive::u32, - )>, - statement: ::core::option::Option< - runtime_types::polkadot_runtime_common::claims::StatementKind, - >, - ) -> ::subxt::tx::Payload { + class: ::core::primitive::u16, + to: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + conviction: runtime_types::pallet_conviction_voting::conviction::Conviction, + balance: ::core::primitive::u128, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Claims", - "mint_claim", - MintClaim { - who, - value, - vesting_schedule, - statement, + "ConvictionVoting", + "delegate", + types::Delegate { + class, + to, + conviction, + balance, }, [ - 213u8, 79u8, 204u8, 40u8, 104u8, 84u8, 82u8, 62u8, 193u8, 93u8, 246u8, - 21u8, 37u8, 244u8, 166u8, 132u8, 208u8, 18u8, 86u8, 195u8, 156u8, 9u8, - 220u8, 120u8, 40u8, 183u8, 28u8, 103u8, 84u8, 163u8, 153u8, 110u8, + 241u8, 83u8, 114u8, 135u8, 173u8, 98u8, 8u8, 2u8, 197u8, 164u8, 105u8, + 93u8, 87u8, 243u8, 54u8, 149u8, 10u8, 168u8, 199u8, 211u8, 102u8, + 176u8, 217u8, 244u8, 78u8, 211u8, 124u8, 133u8, 32u8, 28u8, 235u8, + 222u8, ], ) } - #[doc = "Make a claim to collect your DOTs by signing a statement."] + #[doc = "Undelegate the voting power of the sending account for a particular class of polls."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _None_."] + #[doc = "Tokens may be unlocked following once an amount of time consistent with the lock period"] + #[doc = "of the conviction with which the delegation was issued has passed."] #[doc = ""] - #[doc = "Unsigned Validation:"] - #[doc = "A call to `claim_attest` is deemed valid if the signature provided matches"] - #[doc = "the expected signed message of:"] + #[doc = "The dispatch origin of this call must be _Signed_ and the signing account must be"] + #[doc = "currently delegating."] #[doc = ""] - #[doc = "> Ethereum Signed Message:"] - #[doc = "> (configured prefix string)(address)(statement)"] + #[doc = "- `class`: The class of polls to remove the delegation from."] #[doc = ""] - #[doc = "and `address` matches the `dest` account; the `statement` must match that which is"] - #[doc = "expected according to your purchase arrangement."] + #[doc = "Emits `Undelegated`."] #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `dest`: The destination account to payout the claim."] - #[doc = "- `ethereum_signature`: The signature of an ethereum signed message"] - #[doc = " matching the format described above."] - #[doc = "- `statement`: The identity of the statement which is being attested to in the signature."] + #[doc = "Weight: `O(R)` where R is the number of polls the voter delegating to has"] + #[doc = " voted on. Weight is initially charged as if maximum votes, but is refunded later."] + pub fn undelegate( + &self, + class: ::core::primitive::u16, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "ConvictionVoting", + "undelegate", + types::Undelegate { class }, + [ + 0u8, 244u8, 151u8, 108u8, 96u8, 240u8, 126u8, 247u8, 29u8, 33u8, 25u8, + 34u8, 253u8, 207u8, 107u8, 227u8, 139u8, 64u8, 184u8, 112u8, 246u8, + 81u8, 201u8, 41u8, 32u8, 201u8, 194u8, 201u8, 4u8, 170u8, 40u8, 83u8, + ], + ) + } + #[doc = "Remove the lock caused by prior voting/delegating which has expired within a particular"] + #[doc = "class."] #[doc = ""] - #[doc = ""] - #[doc = "The weight of this call is invariant over the input parameters."] - #[doc = "Weight includes logic to validate unsigned `claim_attest` call."] + #[doc = "The dispatch origin of this call must be _Signed_."] #[doc = ""] - #[doc = "Total Complexity: O(1)"] - #[doc = ""] - pub fn claim_attest( + #[doc = "- `class`: The class of polls to unlock."] + #[doc = "- `target`: The account to remove the lock on."] + #[doc = ""] + #[doc = "Weight: `O(R)` with R number of vote of target."] + pub fn unlock( &self, - dest: ::subxt::utils::AccountId32, - ethereum_signature : runtime_types :: polkadot_runtime_common :: claims :: EcdsaSignature, - statement: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::Payload { + class: ::core::primitive::u16, + target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Claims", - "claim_attest", - ClaimAttest { - dest, - ethereum_signature, - statement, - }, + "ConvictionVoting", + "unlock", + types::Unlock { class, target }, [ - 255u8, 10u8, 87u8, 106u8, 101u8, 195u8, 249u8, 25u8, 109u8, 82u8, - 213u8, 95u8, 203u8, 145u8, 224u8, 113u8, 92u8, 141u8, 31u8, 54u8, - 218u8, 47u8, 218u8, 239u8, 211u8, 206u8, 77u8, 176u8, 19u8, 176u8, - 175u8, 135u8, + 130u8, 244u8, 207u8, 112u8, 194u8, 4u8, 121u8, 4u8, 59u8, 75u8, 168u8, + 246u8, 210u8, 249u8, 247u8, 242u8, 252u8, 28u8, 190u8, 93u8, 11u8, 8u8, + 234u8, 222u8, 22u8, 110u8, 182u8, 252u8, 82u8, 64u8, 74u8, 169u8, ], ) } - #[doc = "Attest to a statement, needed to finalize the claims process."] + #[doc = "Remove a vote for a poll."] #[doc = ""] - #[doc = "WARNING: Insecure unless your chain includes `PrevalidateAttests` as a `SignedExtension`."] + #[doc = "If:"] + #[doc = "- the poll was cancelled, or"] + #[doc = "- the poll is ongoing, or"] + #[doc = "- the poll has ended such that"] + #[doc = " - the vote of the account was in opposition to the result; or"] + #[doc = " - there was no conviction to the account's vote; or"] + #[doc = " - the account made a split vote"] + #[doc = "...then the vote is removed cleanly and a following call to `unlock` may result in more"] + #[doc = "funds being available."] #[doc = ""] - #[doc = "Unsigned Validation:"] - #[doc = "A call to attest is deemed valid if the sender has a `Preclaim` registered"] - #[doc = "and provides a `statement` which is expected for the account."] + #[doc = "If, however, the poll has ended and:"] + #[doc = "- it finished corresponding to the vote of the account, and"] + #[doc = "- the account made a standard vote with conviction, and"] + #[doc = "- the lock period of the conviction is not over"] + #[doc = "...then the lock will be aggregated into the overall account's lock, which may involve"] + #[doc = "*overlocking* (where the two locks are combined into a single lock that is the maximum"] + #[doc = "of both the amount locked and the time is it locked for)."] #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `statement`: The identity of the statement which is being attested to in the signature."] + #[doc = "The dispatch origin of this call must be _Signed_, and the signer must have a vote"] + #[doc = "registered for poll `index`."] #[doc = ""] - #[doc = ""] - #[doc = "The weight of this call is invariant over the input parameters."] - #[doc = "Weight includes logic to do pre-validation on `attest` call."] + #[doc = "- `index`: The index of poll of the vote to be removed."] + #[doc = "- `class`: Optional parameter, if given it indicates the class of the poll. For polls"] + #[doc = " which have finished or are cancelled, this must be `Some`."] #[doc = ""] - #[doc = "Total Complexity: O(1)"] - #[doc = ""] - pub fn attest( + #[doc = "Weight: `O(R + log R)` where R is the number of polls that `target` has voted on."] + #[doc = " Weight is calculated for the maximum number of vote."] + pub fn remove_vote( &self, - statement: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::Payload { + class: ::core::option::Option<::core::primitive::u16>, + index: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Claims", - "attest", - Attest { statement }, + "ConvictionVoting", + "remove_vote", + types::RemoveVote { class, index }, [ - 8u8, 218u8, 97u8, 237u8, 185u8, 61u8, 55u8, 4u8, 134u8, 18u8, 244u8, - 226u8, 40u8, 97u8, 222u8, 246u8, 221u8, 74u8, 253u8, 22u8, 52u8, 223u8, - 224u8, 83u8, 21u8, 218u8, 248u8, 100u8, 107u8, 58u8, 247u8, 10u8, + 151u8, 255u8, 135u8, 195u8, 137u8, 27u8, 116u8, 193u8, 245u8, 78u8, + 38u8, 130u8, 233u8, 28u8, 235u8, 50u8, 144u8, 191u8, 39u8, 68u8, 17u8, + 214u8, 25u8, 2u8, 120u8, 14u8, 219u8, 205u8, 59u8, 192u8, 125u8, 142u8, ], ) } - pub fn move_claim( + #[doc = "Remove a vote for a poll."] + #[doc = ""] + #[doc = "If the `target` is equal to the signer, then this function is exactly equivalent to"] + #[doc = "`remove_vote`. If not equal to the signer, then the vote must have expired,"] + #[doc = "either because the poll was cancelled, because the voter lost the poll or"] + #[doc = "because the conviction period is over."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be _Signed_."] + #[doc = ""] + #[doc = "- `target`: The account of the vote to be removed; this account must have voted for poll"] + #[doc = " `index`."] + #[doc = "- `index`: The index of poll of the vote to be removed."] + #[doc = "- `class`: The class of the poll."] + #[doc = ""] + #[doc = "Weight: `O(R + log R)` where R is the number of polls that `target` has voted on."] + #[doc = " Weight is calculated for the maximum number of vote."] + pub fn remove_other_vote( &self, - old: runtime_types::polkadot_runtime_common::claims::EthereumAddress, - new: runtime_types::polkadot_runtime_common::claims::EthereumAddress, - maybe_preclaim: ::core::option::Option<::subxt::utils::AccountId32>, - ) -> ::subxt::tx::Payload { + target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + class: ::core::primitive::u16, + index: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Claims", - "move_claim", - MoveClaim { - old, - new, - maybe_preclaim, + "ConvictionVoting", + "remove_other_vote", + types::RemoveOtherVote { + target, + class, + index, }, [ - 63u8, 48u8, 217u8, 16u8, 161u8, 102u8, 165u8, 241u8, 57u8, 185u8, - 230u8, 161u8, 202u8, 11u8, 223u8, 15u8, 57u8, 181u8, 34u8, 131u8, - 235u8, 168u8, 227u8, 152u8, 157u8, 4u8, 192u8, 243u8, 194u8, 120u8, - 130u8, 202u8, + 0u8, 148u8, 112u8, 202u8, 220u8, 85u8, 1u8, 77u8, 199u8, 156u8, 47u8, + 38u8, 105u8, 128u8, 71u8, 108u8, 185u8, 231u8, 252u8, 132u8, 37u8, + 114u8, 211u8, 110u8, 142u8, 64u8, 80u8, 90u8, 138u8, 108u8, 59u8, 87u8, ], ) } } } #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::polkadot_runtime_common::claims::pallet::Event; + pub type Event = runtime_types::pallet_conviction_voting::pallet::Event; pub mod events { use super::runtime_types; #[derive( @@ -14651,277 +15149,562 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Someone claimed some DOTs."] - pub struct Claimed { - pub who: ::subxt::utils::AccountId32, - pub ethereum_address: - runtime_types::polkadot_runtime_common::claims::EthereumAddress, - pub amount: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for Claimed { - const PALLET: &'static str = "Claims"; - const EVENT: &'static str = "Claimed"; + #[doc = "An account has delegated their vote to another account. \\[who, target\\]"] + pub struct Delegated( + pub ::subxt::utils::AccountId32, + pub ::subxt::utils::AccountId32, + ); + impl ::subxt::events::StaticEvent for Delegated { + const PALLET: &'static str = "ConvictionVoting"; + const EVENT: &'static str = "Delegated"; } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - pub fn claims( + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "An \\[account\\] has cancelled a previous delegation operation."] + pub struct Undelegated(pub ::subxt::utils::AccountId32); + impl ::subxt::events::StaticEvent for Undelegated { + const PALLET: &'static str = "ConvictionVoting"; + const EVENT: &'static str = "Undelegated"; + } + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " All voting for a particular voter in a particular voting class. We store the balance for the"] + #[doc = " number of votes that we have recorded."] + pub fn voting_for( &self, - _0: impl ::std::borrow::Borrow< - runtime_types::polkadot_runtime_common::claims::EthereumAddress, - >, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + _1: impl ::std::borrow::Borrow<::core::primitive::u16>, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u128, + runtime_types::pallet_conviction_voting::vote::Voting< + ::core::primitive::u128, + ::subxt::utils::AccountId32, + ::core::primitive::u32, + ::core::primitive::u32, + >, ::subxt::storage::address::Yes, - (), ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Claims", - "Claims", - vec![::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - )], - [ - 36u8, 247u8, 169u8, 171u8, 103u8, 176u8, 70u8, 213u8, 255u8, 175u8, - 97u8, 142u8, 231u8, 70u8, 90u8, 213u8, 128u8, 67u8, 50u8, 37u8, 51u8, - 184u8, 72u8, 27u8, 193u8, 254u8, 12u8, 253u8, 91u8, 60u8, 88u8, 182u8, - ], - ) - } - pub fn claims_root( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u128, - (), - (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( - "Claims", - "Claims", - Vec::new(), + "ConvictionVoting", + "VotingFor", + vec![ + ::subxt::storage::address::make_static_storage_map_key(_0.borrow()), + ::subxt::storage::address::make_static_storage_map_key(_1.borrow()), + ], [ - 36u8, 247u8, 169u8, 171u8, 103u8, 176u8, 70u8, 213u8, 255u8, 175u8, - 97u8, 142u8, 231u8, 70u8, 90u8, 213u8, 128u8, 67u8, 50u8, 37u8, 51u8, - 184u8, 72u8, 27u8, 193u8, 254u8, 12u8, 253u8, 91u8, 60u8, 88u8, 182u8, + 45u8, 18u8, 71u8, 145u8, 31u8, 220u8, 221u8, 51u8, 69u8, 73u8, 153u8, + 139u8, 46u8, 231u8, 122u8, 15u8, 98u8, 186u8, 57u8, 121u8, 24u8, 241u8, + 161u8, 150u8, 252u8, 133u8, 65u8, 232u8, 21u8, 28u8, 25u8, 75u8, ], ) } - pub fn total( + #[doc = " All voting for a particular voter in a particular voting class. We store the balance for the"] + #[doc = " number of votes that we have recorded."] + pub fn voting_for_root( &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u128, + runtime_types::pallet_conviction_voting::vote::Voting< + ::core::primitive::u128, + ::subxt::utils::AccountId32, + ::core::primitive::u32, + ::core::primitive::u32, + >, + (), ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, - (), > { ::subxt::storage::address::Address::new_static( - "Claims", - "Total", - vec![], + "ConvictionVoting", + "VotingFor", + Vec::new(), [ - 162u8, 59u8, 237u8, 63u8, 23u8, 44u8, 74u8, 169u8, 131u8, 166u8, 174u8, - 61u8, 127u8, 165u8, 32u8, 115u8, 73u8, 171u8, 36u8, 10u8, 6u8, 23u8, - 19u8, 202u8, 3u8, 189u8, 29u8, 169u8, 144u8, 187u8, 235u8, 77u8, + 45u8, 18u8, 71u8, 145u8, 31u8, 220u8, 221u8, 51u8, 69u8, 73u8, 153u8, + 139u8, 46u8, 231u8, 122u8, 15u8, 98u8, 186u8, 57u8, 121u8, 24u8, 241u8, + 161u8, 150u8, 252u8, 133u8, 65u8, 232u8, 21u8, 28u8, 25u8, 75u8, ], ) } - #[doc = " Vesting schedule for a claim."] - #[doc = " First balance is the total amount that should be held for vesting."] - #[doc = " Second balance is how much should be unlocked per block."] - #[doc = " The block number is when the vesting should start."] - pub fn vesting( + #[doc = " The voting classes which have a non-zero lock requirement and the lock amounts which they"] + #[doc = " require. The actual amount locked on behalf of this pallet should always be the maximum of"] + #[doc = " this list."] + pub fn class_locks_for( &self, - _0: impl ::std::borrow::Borrow< - runtime_types::polkadot_runtime_common::claims::EthereumAddress, - >, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - ( + runtime_types::bounded_collections::bounded_vec::BoundedVec<( + ::core::primitive::u16, ::core::primitive::u128, - ::core::primitive::u128, - ::core::primitive::u32, - ), + )>, + ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, - (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( - "Claims", - "Vesting", + "ConvictionVoting", + "ClassLocksFor", vec![::subxt::storage::address::make_static_storage_map_key( _0.borrow(), )], [ - 112u8, 174u8, 151u8, 185u8, 225u8, 170u8, 63u8, 147u8, 100u8, 23u8, - 102u8, 148u8, 244u8, 47u8, 87u8, 99u8, 28u8, 59u8, 48u8, 205u8, 43u8, - 41u8, 87u8, 225u8, 191u8, 164u8, 31u8, 208u8, 80u8, 53u8, 25u8, 205u8, + 65u8, 181u8, 225u8, 49u8, 35u8, 141u8, 185u8, 155u8, 124u8, 178u8, + 118u8, 51u8, 220u8, 232u8, 95u8, 24u8, 181u8, 135u8, 42u8, 207u8, + 103u8, 166u8, 244u8, 249u8, 106u8, 96u8, 177u8, 56u8, 243u8, 117u8, + 228u8, 145u8, ], ) } - #[doc = " Vesting schedule for a claim."] - #[doc = " First balance is the total amount that should be held for vesting."] - #[doc = " Second balance is how much should be unlocked per block."] - #[doc = " The block number is when the vesting should start."] - pub fn vesting_root( + #[doc = " The voting classes which have a non-zero lock requirement and the lock amounts which they"] + #[doc = " require. The actual amount locked on behalf of this pallet should always be the maximum of"] + #[doc = " this list."] + pub fn class_locks_for_root( &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - ( - ::core::primitive::u128, + runtime_types::bounded_collections::bounded_vec::BoundedVec<( + ::core::primitive::u16, ::core::primitive::u128, - ::core::primitive::u32, - ), - (), + )>, (), ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( - "Claims", - "Vesting", + "ConvictionVoting", + "ClassLocksFor", Vec::new(), [ - 112u8, 174u8, 151u8, 185u8, 225u8, 170u8, 63u8, 147u8, 100u8, 23u8, - 102u8, 148u8, 244u8, 47u8, 87u8, 99u8, 28u8, 59u8, 48u8, 205u8, 43u8, - 41u8, 87u8, 225u8, 191u8, 164u8, 31u8, 208u8, 80u8, 53u8, 25u8, 205u8, + 65u8, 181u8, 225u8, 49u8, 35u8, 141u8, 185u8, 155u8, 124u8, 178u8, + 118u8, 51u8, 220u8, 232u8, 95u8, 24u8, 181u8, 135u8, 42u8, 207u8, + 103u8, 166u8, 244u8, 249u8, 106u8, 96u8, 177u8, 56u8, 243u8, 117u8, + 228u8, 145u8, ], ) } - #[doc = " The statement kind that must be signed, if any."] - pub fn signing( + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The maximum number of concurrent votes an account may have."] + #[doc = ""] + #[doc = " Also used to compute weight, an overly large value can lead to extrinsics with large"] + #[doc = " weight estimation: see `delegate` for instance."] + pub fn max_votes(&self) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "ConvictionVoting", + "MaxVotes", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " The minimum period of vote locking."] + #[doc = ""] + #[doc = " It should be no shorter than enactment period to ensure that in the case of an approval,"] + #[doc = " those successful voters are locked into the consequences that their votes entail."] + pub fn vote_locking_period( &self, - _0: impl ::std::borrow::Borrow< - runtime_types::polkadot_runtime_common::claims::EthereumAddress, + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "ConvictionVoting", + "VoteLockingPeriod", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + } + } + } + pub mod referenda { + use super::root_mod; + use super::runtime_types; + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub type Error = runtime_types::pallet_referenda::pallet::Error; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Submit { + pub proposal_origin: + ::std::boxed::Box, + pub proposal: runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::polkadot_runtime::RuntimeCall, >, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_runtime_common::claims::StatementKind, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Claims", - "Signing", - vec![::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - )], + pub enactment_moment: + runtime_types::frame_support::traits::schedule::DispatchTime< + ::core::primitive::u32, + >, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct PlaceDecisionDeposit { + pub index: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct RefundDecisionDeposit { + pub index: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Cancel { + pub index: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Kill { + pub index: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct NudgeReferendum { + pub index: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct OneFewerDeciding { + pub track: ::core::primitive::u16, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct RefundSubmissionDeposit { + pub index: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetMetadata { + pub index: ::core::primitive::u32, + pub maybe_hash: ::core::option::Option<::subxt::utils::H256>, + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Propose a referendum on a privileged action."] + #[doc = ""] + #[doc = "- `origin`: must be `SubmitOrigin` and the account must have `SubmissionDeposit` funds"] + #[doc = " available."] + #[doc = "- `proposal_origin`: The origin from which the proposal should be executed."] + #[doc = "- `proposal`: The proposal."] + #[doc = "- `enactment_moment`: The moment that the proposal should be enacted."] + #[doc = ""] + #[doc = "Emits `Submitted`."] + pub fn submit( + &self, + proposal_origin: runtime_types::polkadot_runtime::OriginCaller, + proposal: runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::polkadot_runtime::RuntimeCall, + >, + enactment_moment: runtime_types::frame_support::traits::schedule::DispatchTime< + ::core::primitive::u32, + >, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Referenda", + "submit", + types::Submit { + proposal_origin: ::std::boxed::Box::new(proposal_origin), + proposal, + enactment_moment, + }, [ - 51u8, 184u8, 211u8, 207u8, 13u8, 194u8, 181u8, 153u8, 25u8, 212u8, - 106u8, 189u8, 149u8, 14u8, 19u8, 61u8, 210u8, 109u8, 23u8, 168u8, - 191u8, 74u8, 112u8, 190u8, 242u8, 112u8, 183u8, 17u8, 30u8, 125u8, - 85u8, 107u8, + 213u8, 114u8, 86u8, 47u8, 165u8, 41u8, 216u8, 45u8, 93u8, 56u8, 92u8, + 228u8, 10u8, 88u8, 70u8, 82u8, 134u8, 252u8, 214u8, 45u8, 154u8, 150u8, + 221u8, 52u8, 235u8, 186u8, 47u8, 120u8, 221u8, 170u8, 29u8, 239u8, ], ) } - #[doc = " The statement kind that must be signed, if any."] - pub fn signing_root( + #[doc = "Post the Decision Deposit for a referendum."] + #[doc = ""] + #[doc = "- `origin`: must be `Signed` and the account must have funds available for the"] + #[doc = " referendum's track's Decision Deposit."] + #[doc = "- `index`: The index of the submitted referendum whose Decision Deposit is yet to be"] + #[doc = " posted."] + #[doc = ""] + #[doc = "Emits `DecisionDepositPlaced`."] + pub fn place_decision_deposit( &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_runtime_common::claims::StatementKind, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Claims", - "Signing", - Vec::new(), + index: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Referenda", + "place_decision_deposit", + types::PlaceDecisionDeposit { index }, [ - 51u8, 184u8, 211u8, 207u8, 13u8, 194u8, 181u8, 153u8, 25u8, 212u8, - 106u8, 189u8, 149u8, 14u8, 19u8, 61u8, 210u8, 109u8, 23u8, 168u8, - 191u8, 74u8, 112u8, 190u8, 242u8, 112u8, 183u8, 17u8, 30u8, 125u8, - 85u8, 107u8, + 118u8, 227u8, 8u8, 55u8, 41u8, 171u8, 244u8, 40u8, 164u8, 232u8, 119u8, + 129u8, 139u8, 123u8, 77u8, 70u8, 219u8, 236u8, 145u8, 159u8, 84u8, + 111u8, 36u8, 4u8, 206u8, 5u8, 139u8, 231u8, 11u8, 231u8, 6u8, 30u8, ], ) } - #[doc = " Pre-claimed Ethereum accounts, by the Account ID that they are claimed to."] - pub fn preclaims( + #[doc = "Refund the Decision Deposit for a closed referendum back to the depositor."] + #[doc = ""] + #[doc = "- `origin`: must be `Signed` or `Root`."] + #[doc = "- `index`: The index of a closed referendum whose Decision Deposit has not yet been"] + #[doc = " refunded."] + #[doc = ""] + #[doc = "Emits `DecisionDepositRefunded`."] + pub fn refund_decision_deposit( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_runtime_common::claims::EthereumAddress, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Claims", - "Preclaims", - vec![::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - )], + index: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Referenda", + "refund_decision_deposit", + types::RefundDecisionDeposit { index }, [ - 149u8, 61u8, 170u8, 170u8, 60u8, 212u8, 29u8, 214u8, 141u8, 136u8, - 207u8, 248u8, 51u8, 135u8, 242u8, 105u8, 121u8, 91u8, 186u8, 30u8, 0u8, - 173u8, 154u8, 133u8, 20u8, 244u8, 58u8, 184u8, 133u8, 214u8, 67u8, - 95u8, + 120u8, 116u8, 89u8, 51u8, 255u8, 76u8, 150u8, 74u8, 54u8, 93u8, 19u8, + 64u8, 13u8, 177u8, 144u8, 93u8, 132u8, 150u8, 244u8, 48u8, 202u8, + 223u8, 201u8, 130u8, 112u8, 167u8, 29u8, 207u8, 112u8, 181u8, 43u8, + 93u8, ], ) } - #[doc = " Pre-claimed Ethereum accounts, by the Account ID that they are claimed to."] - pub fn preclaims_root( + #[doc = "Cancel an ongoing referendum."] + #[doc = ""] + #[doc = "- `origin`: must be the `CancelOrigin`."] + #[doc = "- `index`: The index of the referendum to be cancelled."] + #[doc = ""] + #[doc = "Emits `Cancelled`."] + pub fn cancel( &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_runtime_common::claims::EthereumAddress, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Claims", - "Preclaims", - Vec::new(), + index: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Referenda", + "cancel", + types::Cancel { index }, [ - 149u8, 61u8, 170u8, 170u8, 60u8, 212u8, 29u8, 214u8, 141u8, 136u8, - 207u8, 248u8, 51u8, 135u8, 242u8, 105u8, 121u8, 91u8, 186u8, 30u8, 0u8, - 173u8, 154u8, 133u8, 20u8, 244u8, 58u8, 184u8, 133u8, 214u8, 67u8, - 95u8, + 247u8, 55u8, 146u8, 211u8, 168u8, 140u8, 248u8, 217u8, 218u8, 235u8, + 25u8, 39u8, 47u8, 132u8, 134u8, 18u8, 239u8, 70u8, 223u8, 50u8, 245u8, + 101u8, 97u8, 39u8, 226u8, 4u8, 196u8, 16u8, 66u8, 177u8, 178u8, 252u8, ], ) } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - pub fn prefix( + #[doc = "Cancel an ongoing referendum and slash the deposits."] + #[doc = ""] + #[doc = "- `origin`: must be the `KillOrigin`."] + #[doc = "- `index`: The index of the referendum to be cancelled."] + #[doc = ""] + #[doc = "Emits `Killed` and `DepositSlashed`."] + pub fn kill( &self, - ) -> ::subxt::constants::Address<::std::vec::Vec<::core::primitive::u8>> - { - ::subxt::constants::Address::new_static( - "Claims", - "Prefix", + index: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Referenda", + "kill", + types::Kill { index }, [ - 106u8, 50u8, 57u8, 116u8, 43u8, 202u8, 37u8, 248u8, 102u8, 22u8, 62u8, - 22u8, 242u8, 54u8, 152u8, 168u8, 107u8, 64u8, 72u8, 172u8, 124u8, 40u8, - 42u8, 110u8, 104u8, 145u8, 31u8, 144u8, 242u8, 189u8, 145u8, 208u8, + 98u8, 109u8, 143u8, 42u8, 24u8, 80u8, 39u8, 243u8, 249u8, 141u8, 104u8, + 195u8, 29u8, 93u8, 149u8, 37u8, 27u8, 130u8, 84u8, 178u8, 246u8, 26u8, + 113u8, 224u8, 157u8, 94u8, 16u8, 14u8, 158u8, 80u8, 148u8, 198u8, + ], + ) + } + #[doc = "Advance a referendum onto its next logical state. Only used internally."] + #[doc = ""] + #[doc = "- `origin`: must be `Root`."] + #[doc = "- `index`: the referendum to be advanced."] + pub fn nudge_referendum( + &self, + index: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Referenda", + "nudge_referendum", + types::NudgeReferendum { index }, + [ + 60u8, 221u8, 153u8, 136u8, 107u8, 209u8, 59u8, 178u8, 208u8, 170u8, + 10u8, 225u8, 213u8, 170u8, 228u8, 64u8, 204u8, 166u8, 7u8, 230u8, + 243u8, 15u8, 206u8, 114u8, 8u8, 128u8, 46u8, 150u8, 114u8, 241u8, + 112u8, 97u8, + ], + ) + } + #[doc = "Advance a track onto its next logical state. Only used internally."] + #[doc = ""] + #[doc = "- `origin`: must be `Root`."] + #[doc = "- `track`: the track to be advanced."] + #[doc = ""] + #[doc = "Action item for when there is now one fewer referendum in the deciding phase and the"] + #[doc = "`DecidingCount` is not yet updated. This means that we should either:"] + #[doc = "- begin deciding another referendum (and leave `DecidingCount` alone); or"] + #[doc = "- decrement `DecidingCount`."] + pub fn one_fewer_deciding( + &self, + track: ::core::primitive::u16, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Referenda", + "one_fewer_deciding", + types::OneFewerDeciding { track }, + [ + 239u8, 43u8, 70u8, 73u8, 77u8, 28u8, 75u8, 62u8, 29u8, 67u8, 110u8, + 120u8, 234u8, 236u8, 126u8, 99u8, 46u8, 183u8, 169u8, 16u8, 143u8, + 233u8, 137u8, 247u8, 138u8, 96u8, 32u8, 223u8, 149u8, 52u8, 214u8, + 195u8, + ], + ) + } + #[doc = "Refund the Submission Deposit for a closed referendum back to the depositor."] + #[doc = ""] + #[doc = "- `origin`: must be `Signed` or `Root`."] + #[doc = "- `index`: The index of a closed referendum whose Submission Deposit has not yet been"] + #[doc = " refunded."] + #[doc = ""] + #[doc = "Emits `SubmissionDepositRefunded`."] + pub fn refund_submission_deposit( + &self, + index: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Referenda", + "refund_submission_deposit", + types::RefundSubmissionDeposit { index }, + [ + 101u8, 147u8, 237u8, 27u8, 220u8, 116u8, 73u8, 131u8, 191u8, 92u8, + 134u8, 31u8, 175u8, 172u8, 129u8, 225u8, 91u8, 33u8, 23u8, 132u8, 89u8, + 19u8, 81u8, 238u8, 133u8, 243u8, 56u8, 70u8, 143u8, 43u8, 176u8, 83u8, + ], + ) + } + #[doc = "Set or clear metadata of a referendum."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `origin`: Must be `Signed` by a creator of a referendum or by anyone to clear a"] + #[doc = " metadata of a finished referendum."] + #[doc = "- `index`: The index of a referendum to set or clear metadata for."] + #[doc = "- `maybe_hash`: The hash of an on-chain stored preimage. `None` to clear a metadata."] + pub fn set_metadata( + &self, + index: ::core::primitive::u32, + maybe_hash: ::core::option::Option<::subxt::utils::H256>, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Referenda", + "set_metadata", + types::SetMetadata { index, maybe_hash }, + [ + 235u8, 215u8, 66u8, 214u8, 157u8, 177u8, 233u8, 214u8, 103u8, 92u8, + 216u8, 228u8, 7u8, 123u8, 167u8, 225u8, 128u8, 16u8, 161u8, 102u8, + 217u8, 36u8, 80u8, 207u8, 137u8, 24u8, 219u8, 239u8, 42u8, 234u8, + 144u8, 133u8, ], ) } } } - } - pub mod vesting { - use super::root_mod; - use super::runtime_types; - #[doc = "Error for the vesting pallet."] - pub type Error = runtime_types::pallet_vesting::pallet::Error; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::root_mod; + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub type Event = runtime_types::pallet_referenda::pallet::Event; + pub mod events { use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -14932,7 +15715,38 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Vest; + #[doc = "A referendum has been submitted."] + pub struct Submitted { + pub index: ::core::primitive::u32, + pub track: ::core::primitive::u16, + pub proposal: runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::polkadot_runtime::RuntimeCall, + >, + } + impl ::subxt::events::StaticEvent for Submitted { + const PALLET: &'static str = "Referenda"; + const EVENT: &'static str = "Submitted"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "The decision deposit has been placed."] + pub struct DecisionDepositPlaced { + pub index: ::core::primitive::u32, + pub who: ::subxt::utils::AccountId32, + pub amount: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for DecisionDepositPlaced { + const PALLET: &'static str = "Referenda"; + const EVENT: &'static str = "DecisionDepositPlaced"; + } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -14943,8 +15757,15 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct VestOther { - pub target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + #[doc = "The decision deposit has been refunded."] + pub struct DecisionDepositRefunded { + pub index: ::core::primitive::u32, + pub who: ::subxt::utils::AccountId32, + pub amount: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for DecisionDepositRefunded { + const PALLET: &'static str = "Referenda"; + const EVENT: &'static str = "DecisionDepositRefunded"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -14956,12 +15777,14 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct VestedTransfer { - pub target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - pub schedule: runtime_types::pallet_vesting::vesting_info::VestingInfo< - ::core::primitive::u128, - ::core::primitive::u32, - >, + #[doc = "A deposit has been slashaed."] + pub struct DepositSlashed { + pub who: ::subxt::utils::AccountId32, + pub amount: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for DepositSlashed { + const PALLET: &'static str = "Referenda"; + const EVENT: &'static str = "DepositSlashed"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -14973,15 +15796,22 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceVestedTransfer { - pub source: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - pub target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - pub schedule: runtime_types::pallet_vesting::vesting_info::VestingInfo< - ::core::primitive::u128, - ::core::primitive::u32, + #[doc = "A referendum has moved into the deciding phase."] + pub struct DecisionStarted { + pub index: ::core::primitive::u32, + pub track: ::core::primitive::u16, + pub proposal: runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::polkadot_runtime::RuntimeCall, >, + pub tally: + runtime_types::pallet_conviction_voting::types::Tally<::core::primitive::u128>, + } + impl ::subxt::events::StaticEvent for DecisionStarted { + const PALLET: &'static str = "Referenda"; + const EVENT: &'static str = "DecisionStarted"; } #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -14991,194 +15821,15 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct MergeSchedules { - pub schedule1_index: ::core::primitive::u32, - pub schedule2_index: ::core::primitive::u32, + pub struct ConfirmStarted { + pub index: ::core::primitive::u32, } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Unlock any vested funds of the sender account."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have funds still"] - #[doc = "locked under this pallet."] - #[doc = ""] - #[doc = "Emits either `VestingCompleted` or `VestingUpdated`."] - #[doc = ""] - #[doc = "# "] - #[doc = "- `O(1)`."] - #[doc = "- DbWeight: 2 Reads, 2 Writes"] - #[doc = " - Reads: Vesting Storage, Balances Locks, [Sender Account]"] - #[doc = " - Writes: Vesting Storage, Balances Locks, [Sender Account]"] - #[doc = "# "] - pub fn vest(&self) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Vesting", - "vest", - Vest {}, - [ - 123u8, 54u8, 10u8, 208u8, 154u8, 24u8, 39u8, 166u8, 64u8, 27u8, 74u8, - 29u8, 243u8, 97u8, 155u8, 5u8, 130u8, 155u8, 65u8, 181u8, 196u8, 125u8, - 45u8, 133u8, 25u8, 33u8, 3u8, 34u8, 21u8, 167u8, 172u8, 54u8, - ], - ) - } - #[doc = "Unlock any vested funds of a `target` account."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - #[doc = ""] - #[doc = "- `target`: The account whose vested funds should be unlocked. Must have funds still"] - #[doc = "locked under this pallet."] - #[doc = ""] - #[doc = "Emits either `VestingCompleted` or `VestingUpdated`."] - #[doc = ""] - #[doc = "# "] - #[doc = "- `O(1)`."] - #[doc = "- DbWeight: 3 Reads, 3 Writes"] - #[doc = " - Reads: Vesting Storage, Balances Locks, Target Account"] - #[doc = " - Writes: Vesting Storage, Balances Locks, Target Account"] - #[doc = "# "] - pub fn vest_other( - &self, - target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Vesting", - "vest_other", - VestOther { target }, - [ - 164u8, 19u8, 93u8, 81u8, 235u8, 101u8, 18u8, 52u8, 187u8, 81u8, 243u8, - 216u8, 116u8, 84u8, 188u8, 135u8, 1u8, 241u8, 128u8, 90u8, 117u8, - 164u8, 111u8, 0u8, 251u8, 148u8, 250u8, 248u8, 102u8, 79u8, 165u8, - 175u8, - ], - ) - } - #[doc = "Create a vested transfer."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - #[doc = ""] - #[doc = "- `target`: The account receiving the vested funds."] - #[doc = "- `schedule`: The vesting schedule attached to the transfer."] - #[doc = ""] - #[doc = "Emits `VestingCreated`."] - #[doc = ""] - #[doc = "NOTE: This will unlock all schedules through the current block."] - #[doc = ""] - #[doc = "# "] - #[doc = "- `O(1)`."] - #[doc = "- DbWeight: 3 Reads, 3 Writes"] - #[doc = " - Reads: Vesting Storage, Balances Locks, Target Account, [Sender Account]"] - #[doc = " - Writes: Vesting Storage, Balances Locks, Target Account, [Sender Account]"] - #[doc = "# "] - pub fn vested_transfer( - &self, - target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - schedule: runtime_types::pallet_vesting::vesting_info::VestingInfo< - ::core::primitive::u128, - ::core::primitive::u32, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Vesting", - "vested_transfer", - VestedTransfer { target, schedule }, - [ - 135u8, 172u8, 56u8, 97u8, 45u8, 141u8, 93u8, 173u8, 111u8, 252u8, 75u8, - 246u8, 92u8, 181u8, 138u8, 87u8, 145u8, 174u8, 71u8, 108u8, 126u8, - 118u8, 49u8, 122u8, 249u8, 132u8, 19u8, 2u8, 132u8, 160u8, 247u8, - 195u8, - ], - ) - } - #[doc = "Force a vested transfer."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Root_."] - #[doc = ""] - #[doc = "- `source`: The account whose funds should be transferred."] - #[doc = "- `target`: The account that should be transferred the vested funds."] - #[doc = "- `schedule`: The vesting schedule attached to the transfer."] - #[doc = ""] - #[doc = "Emits `VestingCreated`."] - #[doc = ""] - #[doc = "NOTE: This will unlock all schedules through the current block."] - #[doc = ""] - #[doc = "# "] - #[doc = "- `O(1)`."] - #[doc = "- DbWeight: 4 Reads, 4 Writes"] - #[doc = " - Reads: Vesting Storage, Balances Locks, Target Account, Source Account"] - #[doc = " - Writes: Vesting Storage, Balances Locks, Target Account, Source Account"] - #[doc = "# "] - pub fn force_vested_transfer( - &self, - source: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - schedule: runtime_types::pallet_vesting::vesting_info::VestingInfo< - ::core::primitive::u128, - ::core::primitive::u32, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Vesting", - "force_vested_transfer", - ForceVestedTransfer { - source, - target, - schedule, - }, - [ - 110u8, 142u8, 63u8, 148u8, 90u8, 229u8, 237u8, 183u8, 240u8, 237u8, - 242u8, 32u8, 88u8, 48u8, 220u8, 101u8, 210u8, 212u8, 27u8, 7u8, 186u8, - 98u8, 28u8, 197u8, 148u8, 140u8, 77u8, 59u8, 202u8, 166u8, 63u8, 97u8, - ], - ) - } - #[doc = "Merge two vesting schedules together, creating a new vesting schedule that unlocks over"] - #[doc = "the highest possible start and end blocks. If both schedules have already started the"] - #[doc = "current block will be used as the schedule start; with the caveat that if one schedule"] - #[doc = "is finished by the current block, the other will be treated as the new merged schedule,"] - #[doc = "unmodified."] - #[doc = ""] - #[doc = "NOTE: If `schedule1_index == schedule2_index` this is a no-op."] - #[doc = "NOTE: This will unlock all schedules through the current block prior to merging."] - #[doc = "NOTE: If both schedules have ended by the current block, no new schedule will be created"] - #[doc = "and both will be removed."] - #[doc = ""] - #[doc = "Merged schedule attributes:"] - #[doc = "- `starting_block`: `MAX(schedule1.starting_block, scheduled2.starting_block,"] - #[doc = " current_block)`."] - #[doc = "- `ending_block`: `MAX(schedule1.ending_block, schedule2.ending_block)`."] - #[doc = "- `locked`: `schedule1.locked_at(current_block) + schedule2.locked_at(current_block)`."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - #[doc = ""] - #[doc = "- `schedule1_index`: index of the first schedule to merge."] - #[doc = "- `schedule2_index`: index of the second schedule to merge."] - pub fn merge_schedules( - &self, - schedule1_index: ::core::primitive::u32, - schedule2_index: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Vesting", - "merge_schedules", - MergeSchedules { - schedule1_index, - schedule2_index, - }, - [ - 95u8, 255u8, 147u8, 12u8, 49u8, 25u8, 70u8, 112u8, 55u8, 154u8, 183u8, - 97u8, 56u8, 244u8, 148u8, 61u8, 107u8, 163u8, 220u8, 31u8, 153u8, 25u8, - 193u8, 251u8, 131u8, 26u8, 166u8, 157u8, 75u8, 4u8, 110u8, 125u8, - ], - ) - } + impl ::subxt::events::StaticEvent for ConfirmStarted { + const PALLET: &'static str = "Referenda"; + const EVENT: &'static str = "ConfirmStarted"; } - } - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::pallet_vesting::pallet::Event; - pub mod events { - use super::runtime_types; #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -15188,15 +15839,12 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The amount vested has been updated. This could indicate a change in funds available."] - #[doc = "The balance given is the amount which is left unvested (and thus locked)."] - pub struct VestingUpdated { - pub account: ::subxt::utils::AccountId32, - pub unvested: ::core::primitive::u128, + pub struct ConfirmAborted { + pub index: ::core::primitive::u32, } - impl ::subxt::events::StaticEvent for VestingUpdated { - const PALLET: &'static str = "Vesting"; - const EVENT: &'static str = "VestingUpdated"; + impl ::subxt::events::StaticEvent for ConfirmAborted { + const PALLET: &'static str = "Referenda"; + const EVENT: &'static str = "ConfirmAborted"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -15208,145 +15856,18 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "An \\[account\\] has become fully vested."] - pub struct VestingCompleted { - pub account: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for VestingCompleted { - const PALLET: &'static str = "Vesting"; - const EVENT: &'static str = "VestingCompleted"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " Information regarding the vesting of a given account."] - pub fn vesting( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - runtime_types::pallet_vesting::vesting_info::VestingInfo< - ::core::primitive::u128, - ::core::primitive::u32, - >, - >, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Vesting", - "Vesting", - vec![::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - )], - [ - 23u8, 209u8, 233u8, 126u8, 89u8, 156u8, 193u8, 204u8, 100u8, 90u8, - 14u8, 120u8, 36u8, 167u8, 148u8, 239u8, 179u8, 74u8, 207u8, 83u8, 54u8, - 77u8, 27u8, 135u8, 74u8, 31u8, 33u8, 11u8, 168u8, 239u8, 212u8, 36u8, - ], - ) - } - #[doc = " Information regarding the vesting of a given account."] - pub fn vesting_root( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - runtime_types::pallet_vesting::vesting_info::VestingInfo< - ::core::primitive::u128, - ::core::primitive::u32, - >, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Vesting", - "Vesting", - Vec::new(), - [ - 23u8, 209u8, 233u8, 126u8, 89u8, 156u8, 193u8, 204u8, 100u8, 90u8, - 14u8, 120u8, 36u8, 167u8, 148u8, 239u8, 179u8, 74u8, 207u8, 83u8, 54u8, - 77u8, 27u8, 135u8, 74u8, 31u8, 33u8, 11u8, 168u8, 239u8, 212u8, 36u8, - ], - ) - } - #[doc = " Storage version of the pallet."] - #[doc = ""] - #[doc = " New networks start with latest version, as determined by the genesis build."] - pub fn storage_version( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_vesting::Releases, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Vesting", - "StorageVersion", - vec![], - [ - 50u8, 143u8, 26u8, 88u8, 129u8, 31u8, 61u8, 118u8, 19u8, 202u8, 119u8, - 160u8, 34u8, 219u8, 60u8, 57u8, 189u8, 66u8, 93u8, 239u8, 121u8, 114u8, - 241u8, 116u8, 0u8, 122u8, 232u8, 94u8, 189u8, 23u8, 45u8, 191u8, - ], - ) - } + #[doc = "A referendum has ended its confirmation phase and is ready for approval."] + pub struct Confirmed { + pub index: ::core::primitive::u32, + pub tally: + runtime_types::pallet_conviction_voting::types::Tally<::core::primitive::u128>, } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " The minimum amount transferred to call `vested_transfer`."] - pub fn min_vested_transfer( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::Address::new_static( - "Vesting", - "MinVestedTransfer", - [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, - 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, - 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, - ], - ) - } - pub fn max_vesting_schedules( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "Vesting", - "MaxVestingSchedules", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, - ], - ) - } + impl ::subxt::events::StaticEvent for Confirmed { + const PALLET: &'static str = "Referenda"; + const EVENT: &'static str = "Confirmed"; } - } - } - pub mod utility { - use super::root_mod; - use super::runtime_types; - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub type Error = runtime_types::pallet_utility::pallet::Error; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -15356,22 +15877,13 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Batch { - pub calls: ::std::vec::Vec, + #[doc = "A referendum has been approved and its proposal has been scheduled."] + pub struct Approved { + pub index: ::core::primitive::u32, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AsDerivative { - pub index: ::core::primitive::u16, - pub call: ::std::boxed::Box, + impl ::subxt::events::StaticEvent for Approved { + const PALLET: &'static str = "Referenda"; + const EVENT: &'static str = "Approved"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -15383,22 +15895,15 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct BatchAll { - pub calls: ::std::vec::Vec, + #[doc = "A proposal has been rejected by referendum."] + pub struct Rejected { + pub index: ::core::primitive::u32, + pub tally: + runtime_types::pallet_conviction_voting::types::Tally<::core::primitive::u128>, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct DispatchAs { - pub as_origin: ::std::boxed::Box, - pub call: ::std::boxed::Box, + impl ::subxt::events::StaticEvent for Rejected { + const PALLET: &'static str = "Referenda"; + const EVENT: &'static str = "Rejected"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -15410,175 +15915,16 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceBatch { - pub calls: ::std::vec::Vec, + #[doc = "A referendum has been timed out without being decided."] + pub struct TimedOut { + pub index: ::core::primitive::u32, + pub tally: + runtime_types::pallet_conviction_voting::types::Tally<::core::primitive::u128>, } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Send a batch of dispatch calls."] - #[doc = ""] - #[doc = "May be called from any origin except `None`."] - #[doc = ""] - #[doc = "- `calls`: The calls to be dispatched from the same origin. The number of call must not"] - #[doc = " exceed the constant: `batched_calls_limit` (available in constant metadata)."] - #[doc = ""] - #[doc = "If origin is root then the calls are dispatched without checking origin filter. (This"] - #[doc = "includes bypassing `frame_system::Config::BaseCallFilter`)."] - #[doc = ""] - #[doc = "# "] - #[doc = "- Complexity: O(C) where C is the number of calls to be batched."] - #[doc = "# "] - #[doc = ""] - #[doc = "This will return `Ok` in all circumstances. To determine the success of the batch, an"] - #[doc = "event is deposited. If a call failed and the batch was interrupted, then the"] - #[doc = "`BatchInterrupted` event is deposited, along with the number of successful calls made"] - #[doc = "and the error of the failed call. If all were successful, then the `BatchCompleted`"] - #[doc = "event is deposited."] - pub fn batch( - &self, - calls: ::std::vec::Vec, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Utility", - "batch", - Batch { calls }, - [ - 243u8, 245u8, 145u8, 160u8, 31u8, 99u8, 157u8, 224u8, 164u8, 104u8, - 116u8, 163u8, 209u8, 121u8, 149u8, 251u8, 122u8, 66u8, 50u8, 7u8, - 190u8, 93u8, 155u8, 159u8, 70u8, 132u8, 23u8, 55u8, 47u8, 202u8, 146u8, - 168u8, - ], - ) - } - #[doc = "Send a call through an indexed pseudonym of the sender."] - #[doc = ""] - #[doc = "Filter from origin are passed along. The call will be dispatched with an origin which"] - #[doc = "use the same filter as the origin of this call."] - #[doc = ""] - #[doc = "NOTE: If you need to ensure that any account-based filtering is not honored (i.e."] - #[doc = "because you expect `proxy` to have been used prior in the call stack and you do not want"] - #[doc = "the call restrictions to apply to any sub-accounts), then use `as_multi_threshold_1`"] - #[doc = "in the Multisig pallet instead."] - #[doc = ""] - #[doc = "NOTE: Prior to version *12, this was called `as_limited_sub`."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - pub fn as_derivative( - &self, - index: ::core::primitive::u16, - call: runtime_types::polkadot_runtime::RuntimeCall, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Utility", - "as_derivative", - AsDerivative { - index, - call: ::std::boxed::Box::new(call), - }, - [ - 93u8, 108u8, 41u8, 206u8, 109u8, 149u8, 77u8, 161u8, 27u8, 247u8, - 177u8, 201u8, 245u8, 248u8, 46u8, 53u8, 207u8, 62u8, 10u8, 174u8, - 240u8, 59u8, 186u8, 0u8, 197u8, 135u8, 181u8, 94u8, 1u8, 132u8, 60u8, - 233u8, - ], - ) - } - #[doc = "Send a batch of dispatch calls and atomically execute them."] - #[doc = "The whole transaction will rollback and fail if any of the calls failed."] - #[doc = ""] - #[doc = "May be called from any origin except `None`."] - #[doc = ""] - #[doc = "- `calls`: The calls to be dispatched from the same origin. The number of call must not"] - #[doc = " exceed the constant: `batched_calls_limit` (available in constant metadata)."] - #[doc = ""] - #[doc = "If origin is root then the calls are dispatched without checking origin filter. (This"] - #[doc = "includes bypassing `frame_system::Config::BaseCallFilter`)."] - #[doc = ""] - #[doc = "# "] - #[doc = "- Complexity: O(C) where C is the number of calls to be batched."] - #[doc = "# "] - pub fn batch_all( - &self, - calls: ::std::vec::Vec, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Utility", - "batch_all", - BatchAll { calls }, - [ - 234u8, 106u8, 151u8, 10u8, 11u8, 227u8, 168u8, 197u8, 187u8, 69u8, - 202u8, 14u8, 120u8, 94u8, 156u8, 128u8, 103u8, 185u8, 26u8, 181u8, - 146u8, 249u8, 108u8, 67u8, 142u8, 209u8, 140u8, 208u8, 2u8, 185u8, - 175u8, 223u8, - ], - ) - } - #[doc = "Dispatches a function call with a provided origin."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Root_."] - #[doc = ""] - #[doc = "# "] - #[doc = "- O(1)."] - #[doc = "- Limited storage reads."] - #[doc = "- One DB write (event)."] - #[doc = "- Weight of derivative `call` execution + T::WeightInfo::dispatch_as()."] - #[doc = "# "] - pub fn dispatch_as( - &self, - as_origin: runtime_types::polkadot_runtime::OriginCaller, - call: runtime_types::polkadot_runtime::RuntimeCall, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Utility", - "dispatch_as", - DispatchAs { - as_origin: ::std::boxed::Box::new(as_origin), - call: ::std::boxed::Box::new(call), - }, - [ - 148u8, 0u8, 144u8, 26u8, 218u8, 140u8, 68u8, 101u8, 15u8, 56u8, 160u8, - 237u8, 202u8, 222u8, 125u8, 100u8, 209u8, 101u8, 159u8, 117u8, 218u8, - 192u8, 55u8, 235u8, 171u8, 54u8, 86u8, 206u8, 126u8, 188u8, 143u8, - 253u8, - ], - ) - } - #[doc = "Send a batch of dispatch calls."] - #[doc = "Unlike `batch`, it allows errors and won't interrupt."] - #[doc = ""] - #[doc = "May be called from any origin except `None`."] - #[doc = ""] - #[doc = "- `calls`: The calls to be dispatched from the same origin. The number of call must not"] - #[doc = " exceed the constant: `batched_calls_limit` (available in constant metadata)."] - #[doc = ""] - #[doc = "If origin is root then the calls are dispatch without checking origin filter. (This"] - #[doc = "includes bypassing `frame_system::Config::BaseCallFilter`)."] - #[doc = ""] - #[doc = "# "] - #[doc = "- Complexity: O(C) where C is the number of calls to be batched."] - #[doc = "# "] - pub fn force_batch( - &self, - calls: ::std::vec::Vec, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Utility", - "force_batch", - ForceBatch { calls }, - [ - 221u8, 22u8, 196u8, 62u8, 193u8, 137u8, 221u8, 234u8, 195u8, 7u8, - 133u8, 191u8, 243u8, 204u8, 109u8, 46u8, 94u8, 254u8, 31u8, 16u8, - 188u8, 65u8, 160u8, 80u8, 58u8, 202u8, 215u8, 11u8, 99u8, 31u8, 12u8, - 66u8, - ], - ) - } + impl ::subxt::events::StaticEvent for TimedOut { + const PALLET: &'static str = "Referenda"; + const EVENT: &'static str = "TimedOut"; } - } - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::pallet_utility::pallet::Event; - pub mod events { - use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -15589,15 +15935,15 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Batch of dispatches did not complete fully. Index of first failing dispatch given, as"] - #[doc = "well as the error."] - pub struct BatchInterrupted { + #[doc = "A referendum has been cancelled."] + pub struct Cancelled { pub index: ::core::primitive::u32, - pub error: runtime_types::sp_runtime::DispatchError, + pub tally: + runtime_types::pallet_conviction_voting::types::Tally<::core::primitive::u128>, } - impl ::subxt::events::StaticEvent for BatchInterrupted { - const PALLET: &'static str = "Utility"; - const EVENT: &'static str = "BatchInterrupted"; + impl ::subxt::events::StaticEvent for Cancelled { + const PALLET: &'static str = "Referenda"; + const EVENT: &'static str = "Cancelled"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -15609,27 +15955,15 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Batch of dispatches completed fully with no error."] - pub struct BatchCompleted; - impl ::subxt::events::StaticEvent for BatchCompleted { - const PALLET: &'static str = "Utility"; - const EVENT: &'static str = "BatchCompleted"; + #[doc = "A referendum has been killed."] + pub struct Killed { + pub index: ::core::primitive::u32, + pub tally: + runtime_types::pallet_conviction_voting::types::Tally<::core::primitive::u128>, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Batch of dispatches completed but has errors."] - pub struct BatchCompletedWithErrors; - impl ::subxt::events::StaticEvent for BatchCompletedWithErrors { - const PALLET: &'static str = "Utility"; - const EVENT: &'static str = "BatchCompletedWithErrors"; + impl ::subxt::events::StaticEvent for Killed { + const PALLET: &'static str = "Referenda"; + const EVENT: &'static str = "Killed"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -15641,11 +15975,15 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A single item within a Batch of dispatches has completed with no error."] - pub struct ItemCompleted; - impl ::subxt::events::StaticEvent for ItemCompleted { - const PALLET: &'static str = "Utility"; - const EVENT: &'static str = "ItemCompleted"; + #[doc = "The submission deposit has been refunded."] + pub struct SubmissionDepositRefunded { + pub index: ::core::primitive::u32, + pub who: ::subxt::utils::AccountId32, + pub amount: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for SubmissionDepositRefunded { + const PALLET: &'static str = "Referenda"; + const EVENT: &'static str = "SubmissionDepositRefunded"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -15657,13 +15995,14 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A single item within a Batch of dispatches has completed with error."] - pub struct ItemFailed { - pub error: runtime_types::sp_runtime::DispatchError, + #[doc = "Metadata for a referendum has been set."] + pub struct MetadataSet { + pub index: ::core::primitive::u32, + pub hash: ::subxt::utils::H256, } - impl ::subxt::events::StaticEvent for ItemFailed { - const PALLET: &'static str = "Utility"; - const EVENT: &'static str = "ItemFailed"; + impl ::subxt::events::StaticEvent for MetadataSet { + const PALLET: &'static str = "Referenda"; + const EVENT: &'static str = "MetadataSet"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -15675,89 +16014,513 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A call was dispatched."] - pub struct DispatchedAs { - pub result: ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + #[doc = "Metadata for a referendum has been cleared."] + pub struct MetadataCleared { + pub index: ::core::primitive::u32, + pub hash: ::subxt::utils::H256, } - impl ::subxt::events::StaticEvent for DispatchedAs { - const PALLET: &'static str = "Utility"; - const EVENT: &'static str = "DispatchedAs"; + impl ::subxt::events::StaticEvent for MetadataCleared { + const PALLET: &'static str = "Referenda"; + const EVENT: &'static str = "MetadataCleared"; } } - pub mod constants { + pub mod storage { use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " The limit on the number of batched calls."] - pub fn batched_calls_limit( + pub struct StorageApi; + impl StorageApi { + #[doc = " The next free referendum index, aka the number of referenda started so far."] + pub fn referendum_count( &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "Utility", - "batched_calls_limit", + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "Referenda", + "ReferendumCount", + vec![], [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, + 153u8, 210u8, 106u8, 244u8, 156u8, 70u8, 124u8, 251u8, 123u8, 75u8, + 7u8, 189u8, 199u8, 145u8, 95u8, 119u8, 137u8, 11u8, 240u8, 160u8, + 151u8, 248u8, 229u8, 231u8, 89u8, 222u8, 18u8, 237u8, 144u8, 78u8, + 99u8, 58u8, + ], + ) + } + #[doc = " Information concerning any given referendum."] + pub fn referendum_info_for( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_referenda::types::ReferendumInfo< + ::core::primitive::u16, + runtime_types::polkadot_runtime::OriginCaller, + ::core::primitive::u32, + runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::polkadot_runtime::RuntimeCall, + >, + ::core::primitive::u128, + runtime_types::pallet_conviction_voting::types::Tally< + ::core::primitive::u128, + >, + ::subxt::utils::AccountId32, + (::core::primitive::u32, ::core::primitive::u32), + >, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Referenda", + "ReferendumInfoFor", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], + [ + 180u8, 213u8, 110u8, 2u8, 75u8, 24u8, 34u8, 143u8, 56u8, 197u8, 106u8, + 105u8, 182u8, 118u8, 114u8, 242u8, 48u8, 85u8, 147u8, 22u8, 29u8, + 211u8, 246u8, 127u8, 217u8, 251u8, 208u8, 20u8, 9u8, 84u8, 53u8, 249u8, + ], + ) + } + #[doc = " Information concerning any given referendum."] + pub fn referendum_info_for_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_referenda::types::ReferendumInfo< + ::core::primitive::u16, + runtime_types::polkadot_runtime::OriginCaller, + ::core::primitive::u32, + runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::polkadot_runtime::RuntimeCall, + >, + ::core::primitive::u128, + runtime_types::pallet_conviction_voting::types::Tally< + ::core::primitive::u128, + >, + ::subxt::utils::AccountId32, + (::core::primitive::u32, ::core::primitive::u32), + >, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Referenda", + "ReferendumInfoFor", + Vec::new(), + [ + 180u8, 213u8, 110u8, 2u8, 75u8, 24u8, 34u8, 143u8, 56u8, 197u8, 106u8, + 105u8, 182u8, 118u8, 114u8, 242u8, 48u8, 85u8, 147u8, 22u8, 29u8, + 211u8, 246u8, 127u8, 217u8, 251u8, 208u8, 20u8, 9u8, 84u8, 53u8, 249u8, + ], + ) + } + #[doc = " The sorted list of referenda ready to be decided but not yet being decided, ordered by"] + #[doc = " conviction-weighted approvals."] + #[doc = ""] + #[doc = " This should be empty if `DecidingCount` is less than `TrackInfo::max_deciding`."] + pub fn track_queue( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u16>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::bounded_collections::bounded_vec::BoundedVec<( + ::core::primitive::u32, + ::core::primitive::u128, + )>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Referenda", + "TrackQueue", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], + [ + 254u8, 82u8, 183u8, 246u8, 168u8, 87u8, 175u8, 224u8, 192u8, 117u8, + 129u8, 244u8, 18u8, 18u8, 249u8, 30u8, 51u8, 133u8, 244u8, 117u8, + 194u8, 174u8, 99u8, 51u8, 155u8, 76u8, 206u8, 202u8, 109u8, 39u8, + 253u8, 240u8, + ], + ) + } + #[doc = " The sorted list of referenda ready to be decided but not yet being decided, ordered by"] + #[doc = " conviction-weighted approvals."] + #[doc = ""] + #[doc = " This should be empty if `DecidingCount` is less than `TrackInfo::max_deciding`."] + pub fn track_queue_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::bounded_collections::bounded_vec::BoundedVec<( + ::core::primitive::u32, + ::core::primitive::u128, + )>, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Referenda", + "TrackQueue", + Vec::new(), + [ + 254u8, 82u8, 183u8, 246u8, 168u8, 87u8, 175u8, 224u8, 192u8, 117u8, + 129u8, 244u8, 18u8, 18u8, 249u8, 30u8, 51u8, 133u8, 244u8, 117u8, + 194u8, 174u8, 99u8, 51u8, 155u8, 76u8, 206u8, 202u8, 109u8, 39u8, + 253u8, 240u8, + ], + ) + } + #[doc = " The number of referenda being decided currently."] + pub fn deciding_count( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u16>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Referenda", + "DecidingCount", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], + [ + 101u8, 153u8, 200u8, 225u8, 229u8, 227u8, 232u8, 26u8, 98u8, 60u8, + 60u8, 94u8, 204u8, 195u8, 193u8, 69u8, 50u8, 72u8, 31u8, 250u8, 224u8, + 179u8, 139u8, 207u8, 19u8, 156u8, 67u8, 234u8, 177u8, 223u8, 63u8, + 150u8, + ], + ) + } + #[doc = " The number of referenda being decided currently."] + pub fn deciding_count_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Referenda", + "DecidingCount", + Vec::new(), + [ + 101u8, 153u8, 200u8, 225u8, 229u8, 227u8, 232u8, 26u8, 98u8, 60u8, + 60u8, 94u8, 204u8, 195u8, 193u8, 69u8, 50u8, 72u8, 31u8, 250u8, 224u8, + 179u8, 139u8, 207u8, 19u8, 156u8, 67u8, 234u8, 177u8, 223u8, 63u8, + 150u8, + ], + ) + } + #[doc = " The metadata is a general information concerning the referendum."] + #[doc = " The `PreimageHash` refers to the preimage of the `Preimages` provider which can be a JSON"] + #[doc = " dump or IPFS hash of a JSON file."] + #[doc = ""] + #[doc = " Consider a garbage collection for a metadata of finished referendums to `unrequest` (remove)"] + #[doc = " large preimages."] + pub fn metadata_of( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::subxt::utils::H256, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Referenda", + "MetadataOf", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], + [ + 104u8, 255u8, 134u8, 120u8, 111u8, 124u8, 108u8, 232u8, 61u8, 47u8, + 251u8, 228u8, 50u8, 49u8, 125u8, 229u8, 254u8, 88u8, 215u8, 90u8, + 116u8, 145u8, 111u8, 72u8, 132u8, 91u8, 106u8, 207u8, 13u8, 104u8, + 164u8, 100u8, + ], + ) + } + #[doc = " The metadata is a general information concerning the referendum."] + #[doc = " The `PreimageHash` refers to the preimage of the `Preimages` provider which can be a JSON"] + #[doc = " dump or IPFS hash of a JSON file."] + #[doc = ""] + #[doc = " Consider a garbage collection for a metadata of finished referendums to `unrequest` (remove)"] + #[doc = " large preimages."] + pub fn metadata_of_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::subxt::utils::H256, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Referenda", + "MetadataOf", + Vec::new(), + [ + 104u8, 255u8, 134u8, 120u8, 111u8, 124u8, 108u8, 232u8, 61u8, 47u8, + 251u8, 228u8, 50u8, 49u8, 125u8, 229u8, 254u8, 88u8, 215u8, 90u8, + 116u8, 145u8, 111u8, 72u8, 132u8, 91u8, 106u8, 207u8, 13u8, 104u8, + 164u8, 100u8, + ], + ) + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The minimum amount to be used as a deposit for a public referendum proposal."] + pub fn submission_deposit( + &self, + ) -> ::subxt::constants::Address<::core::primitive::u128> { + ::subxt::constants::Address::new_static( + "Referenda", + "SubmissionDeposit", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, + 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) + } + #[doc = " Maximum size of the referendum queue for a single track."] + pub fn max_queued(&self) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "Referenda", + "MaxQueued", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " The number of blocks after submission that a referendum must begin being decided by."] + #[doc = " Once this passes, then anyone may cancel the referendum."] + pub fn undeciding_timeout( + &self, + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "Referenda", + "UndecidingTimeout", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " Quantization level for the referendum wakeup scheduler. A higher number will result in"] + #[doc = " fewer storage reads/writes needed for smaller voters, but also result in delays to the"] + #[doc = " automatic referendum status changes. Explicit servicing instructions are unaffected."] + pub fn alarm_interval( + &self, + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "Referenda", + "AlarmInterval", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " Information concerning the different referendum tracks."] + pub fn tracks( + &self, + ) -> ::subxt::constants::Address< + ::std::vec::Vec<( + ::core::primitive::u16, + runtime_types::pallet_referenda::types::TrackInfo< + ::core::primitive::u128, + ::core::primitive::u32, + >, + )>, + > { + ::subxt::constants::Address::new_static( + "Referenda", + "Tracks", + [ + 71u8, 253u8, 246u8, 54u8, 168u8, 190u8, 182u8, 15u8, 207u8, 26u8, 50u8, + 138u8, 212u8, 124u8, 13u8, 203u8, 27u8, 35u8, 224u8, 1u8, 176u8, 192u8, + 197u8, 220u8, 147u8, 94u8, 196u8, 150u8, 125u8, 23u8, 48u8, 255u8, ], ) } } } } - pub mod identity { + pub mod whitelist { use super::root_mod; use super::runtime_types; #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub type Error = runtime_types::pallet_identity::pallet::Error; - #[doc = "Identity pallet declaration."] + pub type Error = runtime_types::pallet_whitelist::pallet::Error; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub mod calls { use super::root_mod; use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AddRegistrar { - pub account: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetIdentity { - pub info: ::std::boxed::Box, + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct WhitelistCall { + pub call_hash: ::subxt::utils::H256, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct RemoveWhitelistedCall { + pub call_hash: ::subxt::utils::H256, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct DispatchWhitelistedCall { + pub call_hash: ::subxt::utils::H256, + pub call_encoded_len: ::core::primitive::u32, + pub call_weight_witness: runtime_types::sp_weights::weight_v2::Weight, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct DispatchWhitelistedCallWithPreimage { + pub call: ::std::boxed::Box, + } } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetSubs { - pub subs: ::std::vec::Vec<( - ::subxt::utils::AccountId32, - runtime_types::pallet_identity::types::Data, - )>, + pub struct TransactionApi; + impl TransactionApi { + pub fn whitelist_call( + &self, + call_hash: ::subxt::utils::H256, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Whitelist", + "whitelist_call", + types::WhitelistCall { call_hash }, + [ + 21u8, 246u8, 244u8, 176u8, 163u8, 80u8, 45u8, 191u8, 3u8, 180u8, 150u8, + 66u8, 168u8, 3u8, 196u8, 129u8, 177u8, 104u8, 48u8, 5u8, 201u8, 208u8, + 226u8, 76u8, 148u8, 116u8, 206u8, 119u8, 145u8, 78u8, 86u8, 41u8, + ], + ) + } + pub fn remove_whitelisted_call( + &self, + call_hash: ::subxt::utils::H256, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Whitelist", + "remove_whitelisted_call", + types::RemoveWhitelistedCall { call_hash }, + [ + 142u8, 227u8, 198u8, 110u8, 90u8, 127u8, 218u8, 117u8, 181u8, 209u8, + 210u8, 86u8, 133u8, 95u8, 244u8, 64u8, 50u8, 240u8, 220u8, 50u8, 212u8, + 106u8, 4u8, 189u8, 2u8, 72u8, 96u8, 52u8, 187u8, 140u8, 144u8, 76u8, + ], + ) + } + pub fn dispatch_whitelisted_call( + &self, + call_hash: ::subxt::utils::H256, + call_encoded_len: ::core::primitive::u32, + call_weight_witness: runtime_types::sp_weights::weight_v2::Weight, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Whitelist", + "dispatch_whitelisted_call", + types::DispatchWhitelistedCall { + call_hash, + call_encoded_len, + call_weight_witness, + }, + [ + 243u8, 130u8, 216u8, 251u8, 131u8, 220u8, 75u8, 210u8, 203u8, 137u8, + 174u8, 95u8, 134u8, 252u8, 76u8, 33u8, 230u8, 185u8, 125u8, 15u8, + 200u8, 85u8, 46u8, 43u8, 34u8, 205u8, 245u8, 85u8, 46u8, 78u8, 245u8, + 135u8, + ], + ) + } + pub fn dispatch_whitelisted_call_with_preimage( + &self, + call: runtime_types::polkadot_runtime::RuntimeCall, + ) -> ::subxt::tx::Payload + { + ::subxt::tx::Payload::new_static( + "Whitelist", + "dispatch_whitelisted_call_with_preimage", + types::DispatchWhitelistedCallWithPreimage { + call: ::std::boxed::Box::new(call), + }, + [ + 123u8, 26u8, 93u8, 35u8, 214u8, 158u8, 129u8, 60u8, 147u8, 163u8, 50u8, + 19u8, 70u8, 25u8, 39u8, 205u8, 251u8, 178u8, 129u8, 202u8, 201u8, + 186u8, 27u8, 115u8, 129u8, 216u8, 139u8, 255u8, 104u8, 38u8, 41u8, + 66u8, + ], + ) + } } + } + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub type Event = runtime_types::pallet_whitelist::pallet::Event; + pub mod events { + use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -15768,36 +16531,12 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ClearIdentity; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RequestJudgement { - #[codec(compact)] - pub reg_index: ::core::primitive::u32, - #[codec(compact)] - pub max_fee: ::core::primitive::u128, + pub struct CallWhitelisted { + pub call_hash: ::subxt::utils::H256, } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CancelRequest { - pub reg_index: ::core::primitive::u32, + impl ::subxt::events::StaticEvent for CallWhitelisted { + const PALLET: &'static str = "Whitelist"; + const EVENT: &'static str = "CallWhitelisted"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -15809,26 +16548,12 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetFee { - #[codec(compact)] - pub index: ::core::primitive::u32, - #[codec(compact)] - pub fee: ::core::primitive::u128, + pub struct WhitelistedCallRemoved { + pub call_hash: ::subxt::utils::H256, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetAccountId { - #[codec(compact)] - pub index: ::core::primitive::u32, - pub new: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + impl ::subxt::events::StaticEvent for WhitelistedCallRemoved { + const PALLET: &'static str = "Whitelist"; + const EVENT: &'static str = "WhitelistedCallRemoved"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -15840,567 +16565,359 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetFields { - #[codec(compact)] - pub index: ::core::primitive::u32, - pub fields: runtime_types::pallet_identity::types::BitFlags< - runtime_types::pallet_identity::types::IdentityField, + pub struct WhitelistedCallDispatched { + pub call_hash: ::subxt::utils::H256, + pub result: ::core::result::Result< + runtime_types::frame_support::dispatch::PostDispatchInfo, + runtime_types::sp_runtime::DispatchErrorWithPostInfo< + runtime_types::frame_support::dispatch::PostDispatchInfo, + >, >, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ProvideJudgement { - #[codec(compact)] - pub reg_index: ::core::primitive::u32, - pub target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - pub judgement: - runtime_types::pallet_identity::types::Judgement<::core::primitive::u128>, - pub identity: ::subxt::utils::H256, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct KillIdentity { - pub target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AddSub { - pub sub: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - pub data: runtime_types::pallet_identity::types::Data, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RenameSub { - pub sub: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - pub data: runtime_types::pallet_identity::types::Data, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RemoveSub { - pub sub: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + impl ::subxt::events::StaticEvent for WhitelistedCallDispatched { + const PALLET: &'static str = "Whitelist"; + const EVENT: &'static str = "WhitelistedCallDispatched"; } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct QuitSub; - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Add a registrar to the system."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be `T::RegistrarOrigin`."] - #[doc = ""] - #[doc = "- `account`: the account of the registrar."] - #[doc = ""] - #[doc = "Emits `RegistrarAdded` if successful."] - #[doc = ""] - #[doc = "# "] - #[doc = "- `O(R)` where `R` registrar-count (governance-bounded and code-bounded)."] - #[doc = "- One storage mutation (codec `O(R)`)."] - #[doc = "- One event."] - #[doc = "# "] - pub fn add_registrar( + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + pub fn whitelisted_call( &self, - account: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Identity", - "add_registrar", - AddRegistrar { account }, + _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + (), + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Whitelist", + "WhitelistedCall", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], [ - 157u8, 232u8, 252u8, 190u8, 203u8, 233u8, 127u8, 63u8, 111u8, 16u8, - 118u8, 200u8, 31u8, 234u8, 144u8, 111u8, 161u8, 224u8, 217u8, 86u8, - 179u8, 254u8, 162u8, 212u8, 248u8, 8u8, 125u8, 89u8, 23u8, 195u8, 4u8, - 231u8, + 251u8, 179u8, 58u8, 232u8, 231u8, 121u8, 89u8, 218u8, 90u8, 70u8, 96u8, + 132u8, 54u8, 41u8, 18u8, 129u8, 197u8, 122u8, 221u8, 206u8, 41u8, + 100u8, 200u8, 141u8, 71u8, 98u8, 3u8, 3u8, 112u8, 167u8, 196u8, 77u8, ], ) } - #[doc = "Set an account's identity information and reserve the appropriate deposit."] - #[doc = ""] - #[doc = "If the account already has identity information, the deposit is taken as part payment"] - #[doc = "for the new deposit."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - #[doc = ""] - #[doc = "- `info`: The identity information."] - #[doc = ""] - #[doc = "Emits `IdentitySet` if successful."] - #[doc = ""] - #[doc = "# "] - #[doc = "- `O(X + X' + R)`"] - #[doc = " - where `X` additional-field-count (deposit-bounded and code-bounded)"] - #[doc = " - where `R` judgements-count (registrar-count-bounded)"] - #[doc = "- One balance reserve operation."] - #[doc = "- One storage mutation (codec-read `O(X' + R)`, codec-write `O(X + R)`)."] - #[doc = "- One event."] - #[doc = "# "] - pub fn set_identity( + pub fn whitelisted_call_root( &self, - info: runtime_types::pallet_identity::types::IdentityInfo, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Identity", - "set_identity", - SetIdentity { - info: ::std::boxed::Box::new(info), - }, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + (), + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Whitelist", + "WhitelistedCall", + Vec::new(), [ - 130u8, 89u8, 118u8, 6u8, 134u8, 166u8, 35u8, 192u8, 73u8, 6u8, 171u8, - 20u8, 225u8, 255u8, 152u8, 142u8, 111u8, 8u8, 206u8, 200u8, 64u8, 52u8, - 110u8, 123u8, 42u8, 101u8, 191u8, 242u8, 133u8, 139u8, 154u8, 205u8, + 251u8, 179u8, 58u8, 232u8, 231u8, 121u8, 89u8, 218u8, 90u8, 70u8, 96u8, + 132u8, 54u8, 41u8, 18u8, 129u8, 197u8, 122u8, 221u8, 206u8, 41u8, + 100u8, 200u8, 141u8, 71u8, 98u8, 3u8, 3u8, 112u8, 167u8, 196u8, 77u8, ], ) } - #[doc = "Set the sub-accounts of the sender."] - #[doc = ""] - #[doc = "Payment: Any aggregate balance reserved by previous `set_subs` calls will be returned"] - #[doc = "and an amount `SubAccountDeposit` will be reserved for each item in `subs`."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a registered"] - #[doc = "identity."] - #[doc = ""] - #[doc = "- `subs`: The identity's (new) sub-accounts."] - #[doc = ""] - #[doc = "# "] - #[doc = "- `O(P + S)`"] - #[doc = " - where `P` old-subs-count (hard- and deposit-bounded)."] - #[doc = " - where `S` subs-count (hard- and deposit-bounded)."] - #[doc = "- At most one balance operations."] - #[doc = "- DB:"] - #[doc = " - `P + S` storage mutations (codec complexity `O(1)`)"] - #[doc = " - One storage read (codec complexity `O(P)`)."] - #[doc = " - One storage write (codec complexity `O(S)`)."] - #[doc = " - One storage-exists (`IdentityOf::contains_key`)."] - #[doc = "# "] - pub fn set_subs( - &self, - subs: ::std::vec::Vec<( - ::subxt::utils::AccountId32, - runtime_types::pallet_identity::types::Data, + } + } + } + pub mod claims { + use super::root_mod; + use super::runtime_types; + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub type Error = runtime_types::polkadot_runtime_common::claims::pallet::Error; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Claim { + pub dest: ::subxt::utils::AccountId32, + pub ethereum_signature: + runtime_types::polkadot_runtime_common::claims::EcdsaSignature, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct MintClaim { + pub who: runtime_types::polkadot_runtime_common::claims::EthereumAddress, + pub value: ::core::primitive::u128, + pub vesting_schedule: ::core::option::Option<( + ::core::primitive::u128, + ::core::primitive::u128, + ::core::primitive::u32, )>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Identity", - "set_subs", - SetSubs { subs }, - [ - 177u8, 219u8, 84u8, 183u8, 5u8, 32u8, 192u8, 82u8, 174u8, 68u8, 198u8, - 224u8, 56u8, 85u8, 134u8, 171u8, 30u8, 132u8, 140u8, 236u8, 117u8, - 24u8, 150u8, 218u8, 146u8, 194u8, 144u8, 92u8, 103u8, 206u8, 46u8, - 90u8, - ], - ) + pub statement: ::core::option::Option< + runtime_types::polkadot_runtime_common::claims::StatementKind, + >, } - #[doc = "Clear an account's identity info and all sub-accounts and return all deposits."] - #[doc = ""] - #[doc = "Payment: All reserved balances on the account are returned."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a registered"] - #[doc = "identity."] - #[doc = ""] - #[doc = "Emits `IdentityCleared` if successful."] - #[doc = ""] - #[doc = "# "] - #[doc = "- `O(R + S + X)`"] - #[doc = " - where `R` registrar-count (governance-bounded)."] - #[doc = " - where `S` subs-count (hard- and deposit-bounded)."] - #[doc = " - where `X` additional-field-count (deposit-bounded and code-bounded)."] - #[doc = "- One balance-unreserve operation."] - #[doc = "- `2` storage reads and `S + 2` storage deletions."] - #[doc = "- One event."] - #[doc = "# "] - pub fn clear_identity(&self) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Identity", - "clear_identity", - ClearIdentity {}, - [ - 75u8, 44u8, 74u8, 122u8, 149u8, 202u8, 114u8, 230u8, 0u8, 255u8, 140u8, - 122u8, 14u8, 196u8, 205u8, 249u8, 220u8, 94u8, 216u8, 34u8, 63u8, 14u8, - 8u8, 205u8, 74u8, 23u8, 181u8, 129u8, 252u8, 110u8, 231u8, 114u8, - ], - ) + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ClaimAttest { + pub dest: ::subxt::utils::AccountId32, + pub ethereum_signature: + runtime_types::polkadot_runtime_common::claims::EcdsaSignature, + pub statement: ::std::vec::Vec<::core::primitive::u8>, } - #[doc = "Request a judgement from a registrar."] - #[doc = ""] - #[doc = "Payment: At most `max_fee` will be reserved for payment to the registrar if judgement"] - #[doc = "given."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a"] - #[doc = "registered identity."] - #[doc = ""] - #[doc = "- `reg_index`: The index of the registrar whose judgement is requested."] - #[doc = "- `max_fee`: The maximum fee that may be paid. This should just be auto-populated as:"] - #[doc = ""] - #[doc = "```nocompile"] - #[doc = "Self::registrars().get(reg_index).unwrap().fee"] - #[doc = "```"] - #[doc = ""] - #[doc = "Emits `JudgementRequested` if successful."] - #[doc = ""] - #[doc = "# "] - #[doc = "- `O(R + X)`."] - #[doc = "- One balance-reserve operation."] - #[doc = "- Storage: 1 read `O(R)`, 1 mutate `O(X + R)`."] - #[doc = "- One event."] - #[doc = "# "] - pub fn request_judgement( - &self, - reg_index: ::core::primitive::u32, - max_fee: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Identity", - "request_judgement", - RequestJudgement { reg_index, max_fee }, - [ - 186u8, 149u8, 61u8, 54u8, 159u8, 194u8, 77u8, 161u8, 220u8, 157u8, 3u8, - 216u8, 23u8, 105u8, 119u8, 76u8, 144u8, 198u8, 157u8, 45u8, 235u8, - 139u8, 87u8, 82u8, 81u8, 12u8, 25u8, 134u8, 225u8, 92u8, 182u8, 101u8, - ], - ) + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Attest { + pub statement: ::std::vec::Vec<::core::primitive::u8>, } - #[doc = "Cancel a previous request."] - #[doc = ""] - #[doc = "Payment: A previously reserved deposit is returned on success."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a"] - #[doc = "registered identity."] - #[doc = ""] - #[doc = "- `reg_index`: The index of the registrar whose judgement is no longer requested."] - #[doc = ""] - #[doc = "Emits `JudgementUnrequested` if successful."] - #[doc = ""] - #[doc = "# "] - #[doc = "- `O(R + X)`."] - #[doc = "- One balance-reserve operation."] - #[doc = "- One storage mutation `O(R + X)`."] - #[doc = "- One event"] - #[doc = "# "] - pub fn cancel_request( - &self, - reg_index: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Identity", - "cancel_request", - CancelRequest { reg_index }, - [ - 83u8, 180u8, 239u8, 126u8, 32u8, 51u8, 17u8, 20u8, 180u8, 3u8, 59u8, - 96u8, 24u8, 32u8, 136u8, 92u8, 58u8, 254u8, 68u8, 70u8, 50u8, 11u8, - 51u8, 91u8, 180u8, 79u8, 81u8, 84u8, 216u8, 138u8, 6u8, 215u8, - ], - ) + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct MoveClaim { + pub old: runtime_types::polkadot_runtime_common::claims::EthereumAddress, + pub new: runtime_types::polkadot_runtime_common::claims::EthereumAddress, + pub maybe_preclaim: ::core::option::Option<::subxt::utils::AccountId32>, } - #[doc = "Set the fee required for a judgement to be requested from a registrar."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and the sender must be the account"] - #[doc = "of the registrar whose index is `index`."] - #[doc = ""] - #[doc = "- `index`: the index of the registrar whose fee is to be set."] - #[doc = "- `fee`: the new fee."] + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Make a claim to collect your DOTs."] #[doc = ""] - #[doc = "# "] - #[doc = "- `O(R)`."] - #[doc = "- One storage mutation `O(R)`."] - #[doc = "- Benchmark: 7.315 + R * 0.329 µs (min squares analysis)"] - #[doc = "# "] - pub fn set_fee( - &self, - index: ::core::primitive::u32, - fee: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Identity", - "set_fee", - SetFee { index, fee }, - [ - 21u8, 157u8, 123u8, 182u8, 160u8, 190u8, 117u8, 37u8, 136u8, 133u8, - 104u8, 234u8, 31u8, 145u8, 115u8, 154u8, 125u8, 40u8, 2u8, 87u8, 118u8, - 56u8, 247u8, 73u8, 89u8, 0u8, 251u8, 3u8, 58u8, 105u8, 239u8, 211u8, - ], - ) - } - #[doc = "Change the account associated with a registrar."] + #[doc = "The dispatch origin for this call must be _None_."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and the sender must be the account"] - #[doc = "of the registrar whose index is `index`."] + #[doc = "Unsigned Validation:"] + #[doc = "A call to claim is deemed valid if the signature provided matches"] + #[doc = "the expected signed message of:"] #[doc = ""] - #[doc = "- `index`: the index of the registrar whose fee is to be set."] - #[doc = "- `new`: the new account ID."] + #[doc = "> Ethereum Signed Message:"] + #[doc = "> (configured prefix string)(address)"] #[doc = ""] - #[doc = "# "] - #[doc = "- `O(R)`."] - #[doc = "- One storage mutation `O(R)`."] - #[doc = "- Benchmark: 8.823 + R * 0.32 µs (min squares analysis)"] - #[doc = "# "] - pub fn set_account_id( - &self, - index: ::core::primitive::u32, - new: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Identity", - "set_account_id", - SetAccountId { index, new }, - [ - 13u8, 91u8, 36u8, 7u8, 88u8, 64u8, 151u8, 104u8, 94u8, 174u8, 195u8, - 99u8, 97u8, 181u8, 236u8, 251u8, 26u8, 236u8, 234u8, 40u8, 183u8, 38u8, - 220u8, 216u8, 48u8, 115u8, 7u8, 230u8, 216u8, 28u8, 123u8, 11u8, - ], - ) - } - #[doc = "Set the field information for a registrar."] + #[doc = "and `address` matches the `dest` account."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and the sender must be the account"] - #[doc = "of the registrar whose index is `index`."] + #[doc = "Parameters:"] + #[doc = "- `dest`: The destination account to payout the claim."] + #[doc = "- `ethereum_signature`: The signature of an ethereum signed message"] + #[doc = " matching the format described above."] #[doc = ""] - #[doc = "- `index`: the index of the registrar whose fee is to be set."] - #[doc = "- `fields`: the fields that the registrar concerns themselves with."] + #[doc = ""] + #[doc = "The weight of this call is invariant over the input parameters."] + #[doc = "Weight includes logic to validate unsigned `claim` call."] #[doc = ""] - #[doc = "# "] - #[doc = "- `O(R)`."] - #[doc = "- One storage mutation `O(R)`."] - #[doc = "- Benchmark: 7.464 + R * 0.325 µs (min squares analysis)"] - #[doc = "# "] - pub fn set_fields( + #[doc = "Total Complexity: O(1)"] + #[doc = ""] + pub fn claim( &self, - index: ::core::primitive::u32, - fields: runtime_types::pallet_identity::types::BitFlags< - runtime_types::pallet_identity::types::IdentityField, - >, - ) -> ::subxt::tx::Payload { + dest: ::subxt::utils::AccountId32, + ethereum_signature : runtime_types :: polkadot_runtime_common :: claims :: EcdsaSignature, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Identity", - "set_fields", - SetFields { index, fields }, + "Claims", + "claim", + types::Claim { + dest, + ethereum_signature, + }, [ - 50u8, 196u8, 179u8, 71u8, 66u8, 65u8, 235u8, 7u8, 51u8, 14u8, 81u8, - 173u8, 201u8, 58u8, 6u8, 151u8, 174u8, 245u8, 102u8, 184u8, 28u8, 84u8, - 125u8, 93u8, 126u8, 134u8, 92u8, 203u8, 200u8, 129u8, 240u8, 252u8, + 33u8, 63u8, 71u8, 104u8, 200u8, 179u8, 248u8, 38u8, 193u8, 198u8, + 250u8, 49u8, 106u8, 26u8, 109u8, 183u8, 33u8, 50u8, 217u8, 28u8, 50u8, + 107u8, 249u8, 80u8, 199u8, 10u8, 192u8, 1u8, 54u8, 41u8, 146u8, 11u8, ], ) } - #[doc = "Provide a judgement for an account's identity."] + #[doc = "Mint a new claim to collect DOTs."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and the sender must be the account"] - #[doc = "of the registrar whose index is `reg_index`."] + #[doc = "The dispatch origin for this call must be _Root_."] #[doc = ""] - #[doc = "- `reg_index`: the index of the registrar whose judgement is being made."] - #[doc = "- `target`: the account whose identity the judgement is upon. This must be an account"] - #[doc = " with a registered identity."] - #[doc = "- `judgement`: the judgement of the registrar of index `reg_index` about `target`."] - #[doc = "- `identity`: The hash of the [`IdentityInfo`] for that the judgement is provided."] + #[doc = "Parameters:"] + #[doc = "- `who`: The Ethereum address allowed to collect this claim."] + #[doc = "- `value`: The number of DOTs that will be claimed."] + #[doc = "- `vesting_schedule`: An optional vesting schedule for these DOTs."] #[doc = ""] - #[doc = "Emits `JudgementGiven` if successful."] + #[doc = ""] + #[doc = "The weight of this call is invariant over the input parameters."] + #[doc = "We assume worst case that both vesting and statement is being inserted."] #[doc = ""] - #[doc = "# "] - #[doc = "- `O(R + X)`."] - #[doc = "- One balance-transfer operation."] - #[doc = "- Up to one account-lookup operation."] - #[doc = "- Storage: 1 read `O(R)`, 1 mutate `O(R + X)`."] - #[doc = "- One event."] - #[doc = "# "] - pub fn provide_judgement( + #[doc = "Total Complexity: O(1)"] + #[doc = ""] + pub fn mint_claim( &self, - reg_index: ::core::primitive::u32, - target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - judgement: runtime_types::pallet_identity::types::Judgement< + who: runtime_types::polkadot_runtime_common::claims::EthereumAddress, + value: ::core::primitive::u128, + vesting_schedule: ::core::option::Option<( ::core::primitive::u128, + ::core::primitive::u128, + ::core::primitive::u32, + )>, + statement: ::core::option::Option< + runtime_types::polkadot_runtime_common::claims::StatementKind, >, - identity: ::subxt::utils::H256, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Identity", - "provide_judgement", - ProvideJudgement { - reg_index, - target, - judgement, - identity, + "Claims", + "mint_claim", + types::MintClaim { + who, + value, + vesting_schedule, + statement, }, [ - 147u8, 66u8, 29u8, 90u8, 149u8, 65u8, 161u8, 115u8, 12u8, 254u8, 188u8, - 248u8, 165u8, 115u8, 191u8, 2u8, 167u8, 223u8, 199u8, 169u8, 203u8, - 64u8, 101u8, 217u8, 73u8, 185u8, 93u8, 109u8, 22u8, 184u8, 146u8, 73u8, + 213u8, 79u8, 204u8, 40u8, 104u8, 84u8, 82u8, 62u8, 193u8, 93u8, 246u8, + 21u8, 37u8, 244u8, 166u8, 132u8, 208u8, 18u8, 86u8, 195u8, 156u8, 9u8, + 220u8, 120u8, 40u8, 183u8, 28u8, 103u8, 84u8, 163u8, 153u8, 110u8, ], ) } - #[doc = "Remove an account's identity and sub-account information and slash the deposits."] + #[doc = "Make a claim to collect your DOTs by signing a statement."] #[doc = ""] - #[doc = "Payment: Reserved balances from `set_subs` and `set_identity` are slashed and handled by"] - #[doc = "`Slash`. Verification request deposits are not returned; they should be cancelled"] - #[doc = "manually using `cancel_request`."] + #[doc = "The dispatch origin for this call must be _None_."] #[doc = ""] - #[doc = "The dispatch origin for this call must match `T::ForceOrigin`."] + #[doc = "Unsigned Validation:"] + #[doc = "A call to `claim_attest` is deemed valid if the signature provided matches"] + #[doc = "the expected signed message of:"] #[doc = ""] - #[doc = "- `target`: the account whose identity the judgement is upon. This must be an account"] - #[doc = " with a registered identity."] + #[doc = "> Ethereum Signed Message:"] + #[doc = "> (configured prefix string)(address)(statement)"] #[doc = ""] - #[doc = "Emits `IdentityKilled` if successful."] + #[doc = "and `address` matches the `dest` account; the `statement` must match that which is"] + #[doc = "expected according to your purchase arrangement."] #[doc = ""] - #[doc = "# "] - #[doc = "- `O(R + S + X)`."] - #[doc = "- One balance-reserve operation."] - #[doc = "- `S + 2` storage mutations."] - #[doc = "- One event."] - #[doc = "# "] - pub fn kill_identity( - &self, - target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Identity", - "kill_identity", - KillIdentity { target }, - [ - 76u8, 13u8, 158u8, 219u8, 221u8, 0u8, 151u8, 241u8, 137u8, 136u8, - 179u8, 194u8, 188u8, 230u8, 56u8, 16u8, 254u8, 28u8, 127u8, 216u8, - 205u8, 117u8, 224u8, 121u8, 240u8, 231u8, 126u8, 181u8, 230u8, 68u8, - 13u8, 174u8, - ], - ) - } - #[doc = "Add the given account to the sender's subs."] + #[doc = "Parameters:"] + #[doc = "- `dest`: The destination account to payout the claim."] + #[doc = "- `ethereum_signature`: The signature of an ethereum signed message"] + #[doc = " matching the format described above."] + #[doc = "- `statement`: The identity of the statement which is being attested to in the signature."] #[doc = ""] - #[doc = "Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated"] - #[doc = "to the sender."] + #[doc = ""] + #[doc = "The weight of this call is invariant over the input parameters."] + #[doc = "Weight includes logic to validate unsigned `claim_attest` call."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a registered"] - #[doc = "sub identity of `sub`."] - pub fn add_sub( + #[doc = "Total Complexity: O(1)"] + #[doc = ""] + pub fn claim_attest( &self, - sub: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - data: runtime_types::pallet_identity::types::Data, - ) -> ::subxt::tx::Payload { + dest: ::subxt::utils::AccountId32, + ethereum_signature : runtime_types :: polkadot_runtime_common :: claims :: EcdsaSignature, + statement: ::std::vec::Vec<::core::primitive::u8>, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Identity", - "add_sub", - AddSub { sub, data }, + "Claims", + "claim_attest", + types::ClaimAttest { + dest, + ethereum_signature, + statement, + }, [ - 122u8, 218u8, 25u8, 93u8, 33u8, 176u8, 191u8, 254u8, 223u8, 147u8, - 100u8, 135u8, 86u8, 71u8, 47u8, 163u8, 105u8, 222u8, 162u8, 173u8, - 207u8, 182u8, 130u8, 128u8, 214u8, 242u8, 101u8, 250u8, 242u8, 24u8, - 17u8, 84u8, + 255u8, 10u8, 87u8, 106u8, 101u8, 195u8, 249u8, 25u8, 109u8, 82u8, + 213u8, 95u8, 203u8, 145u8, 224u8, 113u8, 92u8, 141u8, 31u8, 54u8, + 218u8, 47u8, 218u8, 239u8, 211u8, 206u8, 77u8, 176u8, 19u8, 176u8, + 175u8, 135u8, ], ) } - #[doc = "Alter the associated name of the given sub-account."] + #[doc = "Attest to a statement, needed to finalize the claims process."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a registered"] - #[doc = "sub identity of `sub`."] - pub fn rename_sub( - &self, - sub: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - data: runtime_types::pallet_identity::types::Data, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Identity", - "rename_sub", - RenameSub { sub, data }, - [ - 166u8, 167u8, 49u8, 114u8, 199u8, 168u8, 187u8, 221u8, 100u8, 85u8, - 147u8, 211u8, 157u8, 31u8, 109u8, 135u8, 194u8, 135u8, 15u8, 89u8, - 59u8, 57u8, 252u8, 163u8, 9u8, 138u8, 216u8, 189u8, 177u8, 42u8, 96u8, - 34u8, - ], - ) - } - #[doc = "Remove the given account from the sender's subs."] + #[doc = "WARNING: Insecure unless your chain includes `PrevalidateAttests` as a `SignedExtension`."] #[doc = ""] - #[doc = "Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated"] - #[doc = "to the sender."] + #[doc = "Unsigned Validation:"] + #[doc = "A call to attest is deemed valid if the sender has a `Preclaim` registered"] + #[doc = "and provides a `statement` which is expected for the account."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a registered"] - #[doc = "sub identity of `sub`."] - pub fn remove_sub( + #[doc = "Parameters:"] + #[doc = "- `statement`: The identity of the statement which is being attested to in the signature."] + #[doc = ""] + #[doc = ""] + #[doc = "The weight of this call is invariant over the input parameters."] + #[doc = "Weight includes logic to do pre-validation on `attest` call."] + #[doc = ""] + #[doc = "Total Complexity: O(1)"] + #[doc = ""] + pub fn attest( &self, - sub: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - ) -> ::subxt::tx::Payload { + statement: ::std::vec::Vec<::core::primitive::u8>, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Identity", - "remove_sub", - RemoveSub { sub }, + "Claims", + "attest", + types::Attest { statement }, [ - 106u8, 223u8, 210u8, 67u8, 54u8, 11u8, 144u8, 222u8, 42u8, 46u8, 157u8, - 33u8, 13u8, 245u8, 166u8, 195u8, 227u8, 81u8, 224u8, 149u8, 154u8, - 158u8, 187u8, 203u8, 215u8, 91u8, 43u8, 105u8, 69u8, 213u8, 141u8, - 124u8, + 8u8, 218u8, 97u8, 237u8, 185u8, 61u8, 55u8, 4u8, 134u8, 18u8, 244u8, + 226u8, 40u8, 97u8, 222u8, 246u8, 221u8, 74u8, 253u8, 22u8, 52u8, 223u8, + 224u8, 83u8, 21u8, 218u8, 248u8, 100u8, 107u8, 58u8, 247u8, 10u8, ], ) } - #[doc = "Remove the sender as a sub-account."] - #[doc = ""] - #[doc = "Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated"] - #[doc = "to the sender (*not* the original depositor)."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a registered"] - #[doc = "super-identity."] - #[doc = ""] - #[doc = "NOTE: This should not normally be used, but is provided in the case that the non-"] - #[doc = "controller of an account is maliciously registered as a sub-account."] - pub fn quit_sub(&self) -> ::subxt::tx::Payload { + pub fn move_claim( + &self, + old: runtime_types::polkadot_runtime_common::claims::EthereumAddress, + new: runtime_types::polkadot_runtime_common::claims::EthereumAddress, + maybe_preclaim: ::core::option::Option<::subxt::utils::AccountId32>, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Identity", - "quit_sub", - QuitSub {}, + "Claims", + "move_claim", + types::MoveClaim { + old, + new, + maybe_preclaim, + }, [ - 62u8, 57u8, 73u8, 72u8, 119u8, 216u8, 250u8, 155u8, 57u8, 169u8, 157u8, - 44u8, 87u8, 51u8, 63u8, 231u8, 77u8, 7u8, 0u8, 119u8, 244u8, 42u8, - 179u8, 51u8, 254u8, 240u8, 55u8, 25u8, 142u8, 38u8, 87u8, 44u8, + 63u8, 48u8, 217u8, 16u8, 161u8, 102u8, 165u8, 241u8, 57u8, 185u8, + 230u8, 161u8, 202u8, 11u8, 223u8, 15u8, 57u8, 181u8, 34u8, 131u8, + 235u8, 168u8, 227u8, 152u8, 157u8, 4u8, 192u8, 243u8, 194u8, 120u8, + 130u8, 202u8, ], ) } } } #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::pallet_identity::pallet::Event; + pub type Event = runtime_types::polkadot_runtime_common::claims::pallet::Event; pub mod events { use super::runtime_types; #[derive( @@ -16413,391 +16930,241 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A name was set or reset (which will remove all judgements)."] - pub struct IdentitySet { - pub who: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for IdentitySet { - const PALLET: &'static str = "Identity"; - const EVENT: &'static str = "IdentitySet"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A name was cleared, and the given balance returned."] - pub struct IdentityCleared { + #[doc = "Someone claimed some DOTs."] + pub struct Claimed { pub who: ::subxt::utils::AccountId32, - pub deposit: ::core::primitive::u128, + pub ethereum_address: + runtime_types::polkadot_runtime_common::claims::EthereumAddress, + pub amount: ::core::primitive::u128, } - impl ::subxt::events::StaticEvent for IdentityCleared { - const PALLET: &'static str = "Identity"; - const EVENT: &'static str = "IdentityCleared"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A name was removed and the given balance slashed."] - pub struct IdentityKilled { - pub who: ::subxt::utils::AccountId32, - pub deposit: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for IdentityKilled { - const PALLET: &'static str = "Identity"; - const EVENT: &'static str = "IdentityKilled"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A judgement was asked from a registrar."] - pub struct JudgementRequested { - pub who: ::subxt::utils::AccountId32, - pub registrar_index: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for JudgementRequested { - const PALLET: &'static str = "Identity"; - const EVENT: &'static str = "JudgementRequested"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A judgement request was retracted."] - pub struct JudgementUnrequested { - pub who: ::subxt::utils::AccountId32, - pub registrar_index: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for JudgementUnrequested { - const PALLET: &'static str = "Identity"; - const EVENT: &'static str = "JudgementUnrequested"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A judgement was given by a registrar."] - pub struct JudgementGiven { - pub target: ::subxt::utils::AccountId32, - pub registrar_index: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for JudgementGiven { - const PALLET: &'static str = "Identity"; - const EVENT: &'static str = "JudgementGiven"; - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A registrar was added."] - pub struct RegistrarAdded { - pub registrar_index: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for RegistrarAdded { - const PALLET: &'static str = "Identity"; - const EVENT: &'static str = "RegistrarAdded"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A sub-identity was added to an identity and the deposit paid."] - pub struct SubIdentityAdded { - pub sub: ::subxt::utils::AccountId32, - pub main: ::subxt::utils::AccountId32, - pub deposit: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for SubIdentityAdded { - const PALLET: &'static str = "Identity"; - const EVENT: &'static str = "SubIdentityAdded"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A sub-identity was removed from an identity and the deposit freed."] - pub struct SubIdentityRemoved { - pub sub: ::subxt::utils::AccountId32, - pub main: ::subxt::utils::AccountId32, - pub deposit: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for SubIdentityRemoved { - const PALLET: &'static str = "Identity"; - const EVENT: &'static str = "SubIdentityRemoved"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A sub-identity was cleared, and the given deposit repatriated from the"] - #[doc = "main identity account to the sub-identity account."] - pub struct SubIdentityRevoked { - pub sub: ::subxt::utils::AccountId32, - pub main: ::subxt::utils::AccountId32, - pub deposit: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for SubIdentityRevoked { - const PALLET: &'static str = "Identity"; - const EVENT: &'static str = "SubIdentityRevoked"; + impl ::subxt::events::StaticEvent for Claimed { + const PALLET: &'static str = "Claims"; + const EVENT: &'static str = "Claimed"; } } pub mod storage { use super::runtime_types; pub struct StorageApi; impl StorageApi { - #[doc = " Information that is pertinent to identify the entity behind an account."] - #[doc = ""] - #[doc = " TWOX-NOTE: OK ― `AccountId` is a secure hash."] - pub fn identity_of( + pub fn claims( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_runtime_common::claims::EthereumAddress, + >, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_identity::types::Registration<::core::primitive::u128>, + ::core::primitive::u128, ::subxt::storage::address::Yes, (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( - "Identity", - "IdentityOf", + "Claims", + "Claims", vec![::subxt::storage::address::make_static_storage_map_key( _0.borrow(), )], [ - 193u8, 195u8, 180u8, 188u8, 129u8, 250u8, 180u8, 219u8, 22u8, 95u8, - 175u8, 170u8, 143u8, 188u8, 80u8, 124u8, 234u8, 228u8, 245u8, 39u8, - 72u8, 153u8, 107u8, 199u8, 23u8, 75u8, 47u8, 247u8, 104u8, 208u8, - 171u8, 82u8, + 36u8, 247u8, 169u8, 171u8, 103u8, 176u8, 70u8, 213u8, 255u8, 175u8, + 97u8, 142u8, 231u8, 70u8, 90u8, 213u8, 128u8, 67u8, 50u8, 37u8, 51u8, + 184u8, 72u8, 27u8, 193u8, 254u8, 12u8, 253u8, 91u8, 60u8, 88u8, 182u8, ], ) } - #[doc = " Information that is pertinent to identify the entity behind an account."] - #[doc = ""] - #[doc = " TWOX-NOTE: OK ― `AccountId` is a secure hash."] - pub fn identity_of_root( + pub fn claims_root( &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_identity::types::Registration<::core::primitive::u128>, + ::core::primitive::u128, (), (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( - "Identity", - "IdentityOf", + "Claims", + "Claims", Vec::new(), [ - 193u8, 195u8, 180u8, 188u8, 129u8, 250u8, 180u8, 219u8, 22u8, 95u8, - 175u8, 170u8, 143u8, 188u8, 80u8, 124u8, 234u8, 228u8, 245u8, 39u8, - 72u8, 153u8, 107u8, 199u8, 23u8, 75u8, 47u8, 247u8, 104u8, 208u8, - 171u8, 82u8, + 36u8, 247u8, 169u8, 171u8, 103u8, 176u8, 70u8, 213u8, 255u8, 175u8, + 97u8, 142u8, 231u8, 70u8, 90u8, 213u8, 128u8, 67u8, 50u8, 37u8, 51u8, + 184u8, 72u8, 27u8, 193u8, 254u8, 12u8, 253u8, 91u8, 60u8, 88u8, 182u8, ], ) } - #[doc = " The super-identity of an alternative \"sub\" identity together with its name, within that"] - #[doc = " context. If the account is not some other account's sub-identity, then just `None`."] - pub fn super_of( + pub fn total( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u128, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "Claims", + "Total", + vec![], + [ + 162u8, 59u8, 237u8, 63u8, 23u8, 44u8, 74u8, 169u8, 131u8, 166u8, 174u8, + 61u8, 127u8, 165u8, 32u8, 115u8, 73u8, 171u8, 36u8, 10u8, 6u8, 23u8, + 19u8, 202u8, 3u8, 189u8, 29u8, 169u8, 144u8, 187u8, 235u8, 77u8, + ], + ) + } + #[doc = " Vesting schedule for a claim."] + #[doc = " First balance is the total amount that should be held for vesting."] + #[doc = " Second balance is how much should be unlocked per block."] + #[doc = " The block number is when the vesting should start."] + pub fn vesting( + &self, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_runtime_common::claims::EthereumAddress, + >, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, ( - ::subxt::utils::AccountId32, - runtime_types::pallet_identity::types::Data, + ::core::primitive::u128, + ::core::primitive::u128, + ::core::primitive::u32, ), ::subxt::storage::address::Yes, (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( - "Identity", - "SuperOf", + "Claims", + "Vesting", vec![::subxt::storage::address::make_static_storage_map_key( _0.borrow(), )], [ - 170u8, 249u8, 112u8, 249u8, 75u8, 176u8, 21u8, 29u8, 152u8, 149u8, - 69u8, 113u8, 20u8, 92u8, 113u8, 130u8, 135u8, 62u8, 18u8, 204u8, 166u8, - 193u8, 133u8, 167u8, 248u8, 117u8, 80u8, 137u8, 158u8, 111u8, 100u8, - 137u8, + 112u8, 174u8, 151u8, 185u8, 225u8, 170u8, 63u8, 147u8, 100u8, 23u8, + 102u8, 148u8, 244u8, 47u8, 87u8, 99u8, 28u8, 59u8, 48u8, 205u8, 43u8, + 41u8, 87u8, 225u8, 191u8, 164u8, 31u8, 208u8, 80u8, 53u8, 25u8, 205u8, ], ) } - #[doc = " The super-identity of an alternative \"sub\" identity together with its name, within that"] - #[doc = " context. If the account is not some other account's sub-identity, then just `None`."] - pub fn super_of_root( + #[doc = " Vesting schedule for a claim."] + #[doc = " First balance is the total amount that should be held for vesting."] + #[doc = " Second balance is how much should be unlocked per block."] + #[doc = " The block number is when the vesting should start."] + pub fn vesting_root( &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, ( - ::subxt::utils::AccountId32, - runtime_types::pallet_identity::types::Data, + ::core::primitive::u128, + ::core::primitive::u128, + ::core::primitive::u32, ), (), (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( - "Identity", - "SuperOf", + "Claims", + "Vesting", Vec::new(), [ - 170u8, 249u8, 112u8, 249u8, 75u8, 176u8, 21u8, 29u8, 152u8, 149u8, - 69u8, 113u8, 20u8, 92u8, 113u8, 130u8, 135u8, 62u8, 18u8, 204u8, 166u8, - 193u8, 133u8, 167u8, 248u8, 117u8, 80u8, 137u8, 158u8, 111u8, 100u8, - 137u8, + 112u8, 174u8, 151u8, 185u8, 225u8, 170u8, 63u8, 147u8, 100u8, 23u8, + 102u8, 148u8, 244u8, 47u8, 87u8, 99u8, 28u8, 59u8, 48u8, 205u8, 43u8, + 41u8, 87u8, 225u8, 191u8, 164u8, 31u8, 208u8, 80u8, 53u8, 25u8, 205u8, ], ) } - #[doc = " Alternative \"sub\" identities of this account."] - #[doc = ""] - #[doc = " The first item is the deposit, the second is a vector of the accounts."] - #[doc = ""] - #[doc = " TWOX-NOTE: OK ― `AccountId` is a secure hash."] - pub fn subs_of( + #[doc = " The statement kind that must be signed, if any."] + pub fn signing( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_runtime_common::claims::EthereumAddress, + >, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - ( - ::core::primitive::u128, - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::subxt::utils::AccountId32, - >, - ), - ::subxt::storage::address::Yes, + runtime_types::polkadot_runtime_common::claims::StatementKind, ::subxt::storage::address::Yes, + (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( - "Identity", - "SubsOf", + "Claims", + "Signing", vec![::subxt::storage::address::make_static_storage_map_key( _0.borrow(), )], [ - 128u8, 15u8, 175u8, 155u8, 216u8, 225u8, 200u8, 169u8, 215u8, 206u8, - 110u8, 22u8, 204u8, 89u8, 212u8, 210u8, 159u8, 169u8, 53u8, 7u8, 44u8, - 164u8, 91u8, 151u8, 7u8, 227u8, 38u8, 230u8, 175u8, 84u8, 6u8, 4u8, + 51u8, 184u8, 211u8, 207u8, 13u8, 194u8, 181u8, 153u8, 25u8, 212u8, + 106u8, 189u8, 149u8, 14u8, 19u8, 61u8, 210u8, 109u8, 23u8, 168u8, + 191u8, 74u8, 112u8, 190u8, 242u8, 112u8, 183u8, 17u8, 30u8, 125u8, + 85u8, 107u8, ], ) } - #[doc = " Alternative \"sub\" identities of this account."] - #[doc = ""] - #[doc = " The first item is the deposit, the second is a vector of the accounts."] - #[doc = ""] - #[doc = " TWOX-NOTE: OK ― `AccountId` is a secure hash."] - pub fn subs_of_root( + #[doc = " The statement kind that must be signed, if any."] + pub fn signing_root( &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - ( - ::core::primitive::u128, - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::subxt::utils::AccountId32, - >, - ), + runtime_types::polkadot_runtime_common::claims::StatementKind, + (), (), - ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( - "Identity", - "SubsOf", + "Claims", + "Signing", Vec::new(), [ - 128u8, 15u8, 175u8, 155u8, 216u8, 225u8, 200u8, 169u8, 215u8, 206u8, - 110u8, 22u8, 204u8, 89u8, 212u8, 210u8, 159u8, 169u8, 53u8, 7u8, 44u8, - 164u8, 91u8, 151u8, 7u8, 227u8, 38u8, 230u8, 175u8, 84u8, 6u8, 4u8, + 51u8, 184u8, 211u8, 207u8, 13u8, 194u8, 181u8, 153u8, 25u8, 212u8, + 106u8, 189u8, 149u8, 14u8, 19u8, 61u8, 210u8, 109u8, 23u8, 168u8, + 191u8, 74u8, 112u8, 190u8, 242u8, 112u8, 183u8, 17u8, 30u8, 125u8, + 85u8, 107u8, ], ) } - #[doc = " The set of registrars. Not expected to get very big as can only be added through a"] - #[doc = " special origin (likely a council motion)."] - #[doc = ""] - #[doc = " The index into this can be cast to `RegistrarIndex` to get a valid value."] - pub fn registrars( + #[doc = " Pre-claimed Ethereum accounts, by the Account ID that they are claimed to."] + pub fn preclaims( &self, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::option::Option< - runtime_types::pallet_identity::types::RegistrarInfo< - ::core::primitive::u128, - ::subxt::utils::AccountId32, - >, - >, - >, + runtime_types::polkadot_runtime_common::claims::EthereumAddress, ::subxt::storage::address::Yes, + (), ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Claims", + "Preclaims", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], + [ + 149u8, 61u8, 170u8, 170u8, 60u8, 212u8, 29u8, 214u8, 141u8, 136u8, + 207u8, 248u8, 51u8, 135u8, 242u8, 105u8, 121u8, 91u8, 186u8, 30u8, 0u8, + 173u8, 154u8, 133u8, 20u8, 244u8, 58u8, 184u8, 133u8, 214u8, 67u8, + 95u8, + ], + ) + } + #[doc = " Pre-claimed Ethereum accounts, by the Account ID that they are claimed to."] + pub fn preclaims_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_runtime_common::claims::EthereumAddress, (), + (), + ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( - "Identity", - "Registrars", - vec![], + "Claims", + "Preclaims", + Vec::new(), [ - 157u8, 87u8, 39u8, 240u8, 154u8, 54u8, 241u8, 229u8, 76u8, 9u8, 62u8, - 252u8, 40u8, 143u8, 186u8, 182u8, 233u8, 187u8, 251u8, 61u8, 236u8, - 229u8, 19u8, 55u8, 42u8, 36u8, 82u8, 173u8, 215u8, 155u8, 229u8, 111u8, + 149u8, 61u8, 170u8, 170u8, 60u8, 212u8, 29u8, 214u8, 141u8, 136u8, + 207u8, 248u8, 51u8, 135u8, 242u8, 105u8, 121u8, 91u8, 186u8, 30u8, 0u8, + 173u8, 154u8, 133u8, 20u8, 244u8, 58u8, 184u8, 133u8, 214u8, 67u8, + 95u8, ], ) } @@ -16807,585 +17174,274 @@ pub mod api { use super::runtime_types; pub struct ConstantsApi; impl ConstantsApi { - #[doc = " The amount held on deposit for a registered identity"] - pub fn basic_deposit( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::Address::new_static( - "Identity", - "BasicDeposit", - [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, - 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, - 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, - ], - ) - } - #[doc = " The amount held on deposit per additional field for a registered identity."] - pub fn field_deposit( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::Address::new_static( - "Identity", - "FieldDeposit", - [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, - 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, - 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, - ], - ) - } - #[doc = " The amount held on deposit for a registered subaccount. This should account for the fact"] - #[doc = " that one storage item's value will increase by the size of an account ID, and there will"] - #[doc = " be another trie item whose value is the size of an account ID plus 32 bytes."] - pub fn sub_account_deposit( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::Address::new_static( - "Identity", - "SubAccountDeposit", - [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, - 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, - 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, - ], - ) - } - #[doc = " The maximum number of sub-accounts allowed per identified account."] - pub fn max_sub_accounts( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "Identity", - "MaxSubAccounts", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, - ], - ) - } - #[doc = " Maximum number of additional fields that may be stored in an ID. Needed to bound the I/O"] - #[doc = " required to access an identity, but can be pretty high."] - pub fn max_additional_fields( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "Identity", - "MaxAdditionalFields", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, - ], - ) - } - #[doc = " Maxmimum number of registrars allowed in the system. Needed to bound the complexity"] - #[doc = " of, e.g., updating judgements."] - pub fn max_registrars( + pub fn prefix( &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { + ) -> ::subxt::constants::Address<::std::vec::Vec<::core::primitive::u8>> + { ::subxt::constants::Address::new_static( - "Identity", - "MaxRegistrars", + "Claims", + "Prefix", [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, + 106u8, 50u8, 57u8, 116u8, 43u8, 202u8, 37u8, 248u8, 102u8, 22u8, 62u8, + 22u8, 242u8, 54u8, 152u8, 168u8, 107u8, 64u8, 72u8, 172u8, 124u8, 40u8, + 42u8, 110u8, 104u8, 145u8, 31u8, 144u8, 242u8, 189u8, 145u8, 208u8, ], ) } } } } - pub mod proxy { + pub mod vesting { use super::root_mod; use super::runtime_types; - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub type Error = runtime_types::pallet_proxy::pallet::Error; + #[doc = "Error for the vesting pallet."] + pub type Error = runtime_types::pallet_vesting::pallet::Error; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub mod calls { use super::root_mod; use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Proxy { - pub real: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - pub force_proxy_type: - ::core::option::Option, - pub call: ::std::boxed::Box, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AddProxy { - pub delegate: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - pub proxy_type: runtime_types::polkadot_runtime::ProxyType, - pub delay: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RemoveProxy { - pub delegate: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - pub proxy_type: runtime_types::polkadot_runtime::ProxyType, - pub delay: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RemoveProxies; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CreatePure { - pub proxy_type: runtime_types::polkadot_runtime::ProxyType, - pub delay: ::core::primitive::u32, - pub index: ::core::primitive::u16, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct KillPure { - pub spawner: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - pub proxy_type: runtime_types::polkadot_runtime::ProxyType, - pub index: ::core::primitive::u16, - #[codec(compact)] - pub height: ::core::primitive::u32, - #[codec(compact)] - pub ext_index: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Announce { - pub real: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - pub call_hash: ::subxt::utils::H256, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RemoveAnnouncement { - pub real: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - pub call_hash: ::subxt::utils::H256, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RejectAnnouncement { - pub delegate: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - pub call_hash: ::subxt::utils::H256, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ProxyAnnounced { - pub delegate: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - pub real: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - pub force_proxy_type: - ::core::option::Option, - pub call: ::std::boxed::Box, + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Vest; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct VestOther { + pub target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct VestedTransfer { + pub target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub schedule: runtime_types::pallet_vesting::vesting_info::VestingInfo< + ::core::primitive::u128, + ::core::primitive::u32, + >, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ForceVestedTransfer { + pub source: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub schedule: runtime_types::pallet_vesting::vesting_info::VestingInfo< + ::core::primitive::u128, + ::core::primitive::u32, + >, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct MergeSchedules { + pub schedule1_index: ::core::primitive::u32, + pub schedule2_index: ::core::primitive::u32, + } } pub struct TransactionApi; impl TransactionApi { - #[doc = "Dispatch the given `call` from an account that the sender is authorised for through"] - #[doc = "`add_proxy`."] + #[doc = "Unlock any vested funds of the sender account."] #[doc = ""] - #[doc = "Removes any corresponding announcement(s)."] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have funds still"] + #[doc = "locked under this pallet."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = "Emits either `VestingCompleted` or `VestingUpdated`."] #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `real`: The account that the proxy will make a call on behalf of."] - #[doc = "- `force_proxy_type`: Specify the exact proxy type to be used and checked for this call."] - #[doc = "- `call`: The call to be made by the `real` account."] - pub fn proxy( - &self, - real: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - force_proxy_type: ::core::option::Option< - runtime_types::polkadot_runtime::ProxyType, - >, - call: runtime_types::polkadot_runtime::RuntimeCall, - ) -> ::subxt::tx::Payload { + #[doc = "## Complexity"] + #[doc = "- `O(1)`."] + pub fn vest(&self) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Proxy", - "proxy", - Proxy { - real, - force_proxy_type, - call: ::std::boxed::Box::new(call), - }, + "Vesting", + "vest", + types::Vest {}, [ - 2u8, 110u8, 54u8, 249u8, 204u8, 49u8, 0u8, 174u8, 55u8, 97u8, 168u8, - 240u8, 133u8, 33u8, 119u8, 57u8, 207u8, 107u8, 9u8, 58u8, 91u8, 16u8, - 97u8, 49u8, 136u8, 119u8, 180u8, 187u8, 105u8, 150u8, 228u8, 140u8, + 123u8, 54u8, 10u8, 208u8, 154u8, 24u8, 39u8, 166u8, 64u8, 27u8, 74u8, + 29u8, 243u8, 97u8, 155u8, 5u8, 130u8, 155u8, 65u8, 181u8, 196u8, 125u8, + 45u8, 133u8, 25u8, 33u8, 3u8, 34u8, 21u8, 167u8, 172u8, 54u8, ], ) } - #[doc = "Register a proxy account for the sender that is able to make calls on its behalf."] + #[doc = "Unlock any vested funds of a `target` account."] #[doc = ""] #[doc = "The dispatch origin for this call must be _Signed_."] #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `proxy`: The account that the `caller` would like to make a proxy."] - #[doc = "- `proxy_type`: The permissions allowed for this proxy account."] - #[doc = "- `delay`: The announcement period required of the initial proxy. Will generally be"] - #[doc = "zero."] - pub fn add_proxy( - &self, - delegate: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - proxy_type: runtime_types::polkadot_runtime::ProxyType, - delay: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Proxy", - "add_proxy", - AddProxy { - delegate, - proxy_type, - delay, - }, - [ - 4u8, 227u8, 81u8, 178u8, 130u8, 182u8, 247u8, 112u8, 127u8, 90u8, - 105u8, 143u8, 65u8, 137u8, 181u8, 63u8, 204u8, 92u8, 140u8, 38u8, - 153u8, 233u8, 186u8, 226u8, 8u8, 76u8, 228u8, 206u8, 174u8, 54u8, 23u8, - 238u8, - ], - ) - } - #[doc = "Unregister a proxy account for the sender."] + #[doc = "- `target`: The account whose vested funds should be unlocked. Must have funds still"] + #[doc = "locked under this pallet."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = "Emits either `VestingCompleted` or `VestingUpdated`."] #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `proxy`: The account that the `caller` would like to remove as a proxy."] - #[doc = "- `proxy_type`: The permissions currently enabled for the removed proxy account."] - pub fn remove_proxy( + #[doc = "## Complexity"] + #[doc = "- `O(1)`."] + pub fn vest_other( &self, - delegate: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - proxy_type: runtime_types::polkadot_runtime::ProxyType, - delay: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Proxy", - "remove_proxy", - RemoveProxy { - delegate, - proxy_type, - delay, - }, + "Vesting", + "vest_other", + types::VestOther { target }, [ - 227u8, 7u8, 240u8, 130u8, 4u8, 168u8, 145u8, 107u8, 6u8, 146u8, 138u8, - 235u8, 245u8, 178u8, 168u8, 85u8, 104u8, 133u8, 28u8, 93u8, 232u8, - 99u8, 163u8, 75u8, 100u8, 113u8, 40u8, 16u8, 238u8, 123u8, 169u8, - 218u8, + 164u8, 19u8, 93u8, 81u8, 235u8, 101u8, 18u8, 52u8, 187u8, 81u8, 243u8, + 216u8, 116u8, 84u8, 188u8, 135u8, 1u8, 241u8, 128u8, 90u8, 117u8, + 164u8, 111u8, 0u8, 251u8, 148u8, 250u8, 248u8, 102u8, 79u8, 165u8, + 175u8, ], ) } - #[doc = "Unregister all proxy accounts for the sender."] + #[doc = "Create a vested transfer."] #[doc = ""] #[doc = "The dispatch origin for this call must be _Signed_."] #[doc = ""] - #[doc = "WARNING: This may be called on accounts created by `pure`, however if done, then"] - #[doc = "the unreserved fees will be inaccessible. **All access to this account will be lost.**"] - pub fn remove_proxies(&self) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Proxy", - "remove_proxies", - RemoveProxies {}, - [ - 15u8, 237u8, 27u8, 166u8, 254u8, 218u8, 92u8, 5u8, 213u8, 239u8, 99u8, - 59u8, 1u8, 26u8, 73u8, 252u8, 81u8, 94u8, 214u8, 227u8, 169u8, 58u8, - 40u8, 253u8, 187u8, 225u8, 192u8, 26u8, 19u8, 23u8, 121u8, 129u8, - ], - ) - } - #[doc = "Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and"] - #[doc = "initialize it with a proxy of `proxy_type` for `origin` sender."] - #[doc = ""] - #[doc = "Requires a `Signed` origin."] - #[doc = ""] - #[doc = "- `proxy_type`: The type of the proxy that the sender will be registered as over the"] - #[doc = "new account. This will almost always be the most permissive `ProxyType` possible to"] - #[doc = "allow for maximum flexibility."] - #[doc = "- `index`: A disambiguation index, in case this is called multiple times in the same"] - #[doc = "transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just"] - #[doc = "want to use `0`."] - #[doc = "- `delay`: The announcement period required of the initial proxy. Will generally be"] - #[doc = "zero."] - #[doc = ""] - #[doc = "Fails with `Duplicate` if this has already been called in this transaction, from the"] - #[doc = "same sender, with the same parameters."] - #[doc = ""] - #[doc = "Fails if there are insufficient funds to pay for deposit."] - pub fn create_pure( - &self, - proxy_type: runtime_types::polkadot_runtime::ProxyType, - delay: ::core::primitive::u32, - index: ::core::primitive::u16, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Proxy", - "create_pure", - CreatePure { - proxy_type, - delay, - index, - }, - [ - 65u8, 120u8, 166u8, 57u8, 89u8, 119u8, 161u8, 93u8, 184u8, 203u8, - 190u8, 29u8, 64u8, 238u8, 70u8, 17u8, 151u8, 227u8, 170u8, 84u8, 21u8, - 161u8, 171u8, 180u8, 193u8, 175u8, 211u8, 228u8, 246u8, 216u8, 152u8, - 91u8, - ], - ) - } - #[doc = "Removes a previously spawned pure proxy."] - #[doc = ""] - #[doc = "WARNING: **All access to this account will be lost.** Any funds held in it will be"] - #[doc = "inaccessible."] - #[doc = ""] - #[doc = "Requires a `Signed` origin, and the sender account must have been created by a call to"] - #[doc = "`pure` with corresponding parameters."] - #[doc = ""] - #[doc = "- `spawner`: The account that originally called `pure` to create this account."] - #[doc = "- `index`: The disambiguation index originally passed to `pure`. Probably `0`."] - #[doc = "- `proxy_type`: The proxy type originally passed to `pure`."] - #[doc = "- `height`: The height of the chain when the call to `pure` was processed."] - #[doc = "- `ext_index`: The extrinsic index in which the call to `pure` was processed."] - #[doc = ""] - #[doc = "Fails with `NoPermission` in case the caller is not a previously created pure"] - #[doc = "account whose `pure` call has corresponding parameters."] - pub fn kill_pure( - &self, - spawner: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - proxy_type: runtime_types::polkadot_runtime::ProxyType, - index: ::core::primitive::u16, - height: ::core::primitive::u32, - ext_index: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Proxy", - "kill_pure", - KillPure { - spawner, - proxy_type, - index, - height, - ext_index, - }, - [ - 67u8, 233u8, 31u8, 138u8, 222u8, 70u8, 182u8, 77u8, 103u8, 39u8, 195u8, - 35u8, 39u8, 89u8, 50u8, 248u8, 187u8, 101u8, 170u8, 188u8, 87u8, 143u8, - 6u8, 180u8, 178u8, 181u8, 158u8, 111u8, 19u8, 139u8, 222u8, 208u8, - ], - ) - } - #[doc = "Publish the hash of a proxy-call that will be made in the future."] - #[doc = ""] - #[doc = "This must be called some number of blocks before the corresponding `proxy` is attempted"] - #[doc = "if the delay associated with the proxy relationship is greater than zero."] - #[doc = ""] - #[doc = "No more than `MaxPending` announcements may be made at any one time."] + #[doc = "- `target`: The account receiving the vested funds."] + #[doc = "- `schedule`: The vesting schedule attached to the transfer."] #[doc = ""] - #[doc = "This will take a deposit of `AnnouncementDepositFactor` as well as"] - #[doc = "`AnnouncementDepositBase` if there are no other pending announcements."] + #[doc = "Emits `VestingCreated`."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and a proxy of `real`."] + #[doc = "NOTE: This will unlock all schedules through the current block."] #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `real`: The account that the proxy will make a call on behalf of."] - #[doc = "- `call_hash`: The hash of the call to be made by the `real` account."] - pub fn announce( + #[doc = "## Complexity"] + #[doc = "- `O(1)`."] + pub fn vested_transfer( &self, - real: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - call_hash: ::subxt::utils::H256, - ) -> ::subxt::tx::Payload { + target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + schedule: runtime_types::pallet_vesting::vesting_info::VestingInfo< + ::core::primitive::u128, + ::core::primitive::u32, + >, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Proxy", - "announce", - Announce { real, call_hash }, + "Vesting", + "vested_transfer", + types::VestedTransfer { target, schedule }, [ - 235u8, 116u8, 208u8, 53u8, 128u8, 91u8, 100u8, 68u8, 255u8, 254u8, - 119u8, 253u8, 108u8, 130u8, 88u8, 56u8, 113u8, 99u8, 105u8, 179u8, - 16u8, 143u8, 131u8, 203u8, 234u8, 76u8, 199u8, 191u8, 35u8, 158u8, - 130u8, 209u8, + 135u8, 172u8, 56u8, 97u8, 45u8, 141u8, 93u8, 173u8, 111u8, 252u8, 75u8, + 246u8, 92u8, 181u8, 138u8, 87u8, 145u8, 174u8, 71u8, 108u8, 126u8, + 118u8, 49u8, 122u8, 249u8, 132u8, 19u8, 2u8, 132u8, 160u8, 247u8, + 195u8, ], ) } - #[doc = "Remove a given announcement."] - #[doc = ""] - #[doc = "May be called by a proxy account to remove a call they previously announced and return"] - #[doc = "the deposit."] + #[doc = "Force a vested transfer."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = "The dispatch origin for this call must be _Root_."] #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `real`: The account that the proxy will make a call on behalf of."] - #[doc = "- `call_hash`: The hash of the call to be made by the `real` account."] - pub fn remove_announcement( - &self, - real: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - call_hash: ::subxt::utils::H256, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Proxy", - "remove_announcement", - RemoveAnnouncement { real, call_hash }, - [ - 140u8, 186u8, 140u8, 129u8, 40u8, 124u8, 57u8, 61u8, 84u8, 247u8, - 123u8, 241u8, 148u8, 15u8, 94u8, 146u8, 121u8, 78u8, 190u8, 68u8, - 185u8, 125u8, 62u8, 49u8, 108u8, 131u8, 229u8, 82u8, 68u8, 37u8, 184u8, - 223u8, - ], - ) - } - #[doc = "Remove the given announcement of a delegate."] + #[doc = "- `source`: The account whose funds should be transferred."] + #[doc = "- `target`: The account that should be transferred the vested funds."] + #[doc = "- `schedule`: The vesting schedule attached to the transfer."] #[doc = ""] - #[doc = "May be called by a target (proxied) account to remove a call that one of their delegates"] - #[doc = "(`delegate`) has announced they want to execute. The deposit is returned."] + #[doc = "Emits `VestingCreated`."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = "NOTE: This will unlock all schedules through the current block."] #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `delegate`: The account that previously announced the call."] - #[doc = "- `call_hash`: The hash of the call to be made."] - pub fn reject_announcement( + #[doc = "## Complexity"] + #[doc = "- `O(1)`."] + pub fn force_vested_transfer( &self, - delegate: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - call_hash: ::subxt::utils::H256, - ) -> ::subxt::tx::Payload { + source: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + schedule: runtime_types::pallet_vesting::vesting_info::VestingInfo< + ::core::primitive::u128, + ::core::primitive::u32, + >, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Proxy", - "reject_announcement", - RejectAnnouncement { - delegate, - call_hash, + "Vesting", + "force_vested_transfer", + types::ForceVestedTransfer { + source, + target, + schedule, }, [ - 225u8, 198u8, 31u8, 173u8, 157u8, 141u8, 121u8, 51u8, 226u8, 170u8, - 219u8, 86u8, 14u8, 131u8, 122u8, 157u8, 161u8, 200u8, 157u8, 37u8, - 43u8, 97u8, 143u8, 97u8, 46u8, 206u8, 204u8, 42u8, 78u8, 33u8, 85u8, - 127u8, + 110u8, 142u8, 63u8, 148u8, 90u8, 229u8, 237u8, 183u8, 240u8, 237u8, + 242u8, 32u8, 88u8, 48u8, 220u8, 101u8, 210u8, 212u8, 27u8, 7u8, 186u8, + 98u8, 28u8, 197u8, 148u8, 140u8, 77u8, 59u8, 202u8, 166u8, 63u8, 97u8, ], ) } - #[doc = "Dispatch the given `call` from an account that the sender is authorized for through"] - #[doc = "`add_proxy`."] + #[doc = "Merge two vesting schedules together, creating a new vesting schedule that unlocks over"] + #[doc = "the highest possible start and end blocks. If both schedules have already started the"] + #[doc = "current block will be used as the schedule start; with the caveat that if one schedule"] + #[doc = "is finished by the current block, the other will be treated as the new merged schedule,"] + #[doc = "unmodified."] #[doc = ""] - #[doc = "Removes any corresponding announcement(s)."] + #[doc = "NOTE: If `schedule1_index == schedule2_index` this is a no-op."] + #[doc = "NOTE: This will unlock all schedules through the current block prior to merging."] + #[doc = "NOTE: If both schedules have ended by the current block, no new schedule will be created"] + #[doc = "and both will be removed."] + #[doc = ""] + #[doc = "Merged schedule attributes:"] + #[doc = "- `starting_block`: `MAX(schedule1.starting_block, scheduled2.starting_block,"] + #[doc = " current_block)`."] + #[doc = "- `ending_block`: `MAX(schedule1.ending_block, schedule2.ending_block)`."] + #[doc = "- `locked`: `schedule1.locked_at(current_block) + schedule2.locked_at(current_block)`."] #[doc = ""] #[doc = "The dispatch origin for this call must be _Signed_."] #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `real`: The account that the proxy will make a call on behalf of."] - #[doc = "- `force_proxy_type`: Specify the exact proxy type to be used and checked for this call."] - #[doc = "- `call`: The call to be made by the `real` account."] - pub fn proxy_announced( + #[doc = "- `schedule1_index`: index of the first schedule to merge."] + #[doc = "- `schedule2_index`: index of the second schedule to merge."] + pub fn merge_schedules( &self, - delegate: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - real: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - force_proxy_type: ::core::option::Option< - runtime_types::polkadot_runtime::ProxyType, - >, - call: runtime_types::polkadot_runtime::RuntimeCall, - ) -> ::subxt::tx::Payload { + schedule1_index: ::core::primitive::u32, + schedule2_index: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Proxy", - "proxy_announced", - ProxyAnnounced { - delegate, - real, - force_proxy_type, - call: ::std::boxed::Box::new(call), + "Vesting", + "merge_schedules", + types::MergeSchedules { + schedule1_index, + schedule2_index, }, [ - 201u8, 208u8, 101u8, 152u8, 52u8, 146u8, 71u8, 255u8, 2u8, 250u8, - 225u8, 24u8, 117u8, 32u8, 113u8, 251u8, 230u8, 233u8, 30u8, 187u8, - 194u8, 116u8, 65u8, 51u8, 142u8, 106u8, 91u8, 178u8, 193u8, 170u8, - 150u8, 118u8, + 95u8, 255u8, 147u8, 12u8, 49u8, 25u8, 70u8, 112u8, 55u8, 154u8, 183u8, + 97u8, 56u8, 244u8, 148u8, 61u8, 107u8, 163u8, 220u8, 31u8, 153u8, 25u8, + 193u8, 251u8, 131u8, 26u8, 166u8, 157u8, 75u8, 4u8, 110u8, 125u8, ], ) } } } #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::pallet_proxy::pallet::Event; + pub type Event = runtime_types::pallet_vesting::pallet::Event; pub mod events { use super::runtime_types; #[derive( @@ -17398,35 +17454,15 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A proxy was executed correctly, with the given."] - pub struct ProxyExecuted { - pub result: ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - } - impl ::subxt::events::StaticEvent for ProxyExecuted { - const PALLET: &'static str = "Proxy"; - const EVENT: &'static str = "ProxyExecuted"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A pure account has been created by new proxy with given"] - #[doc = "disambiguation index and proxy type."] - pub struct PureCreated { - pub pure: ::subxt::utils::AccountId32, - pub who: ::subxt::utils::AccountId32, - pub proxy_type: runtime_types::polkadot_runtime::ProxyType, - pub disambiguation_index: ::core::primitive::u16, + #[doc = "The amount vested has been updated. This could indicate a change in funds available."] + #[doc = "The balance given is the amount which is left unvested (and thus locked)."] + pub struct VestingUpdated { + pub account: ::subxt::utils::AccountId32, + pub unvested: ::core::primitive::u128, } - impl ::subxt::events::StaticEvent for PureCreated { - const PALLET: &'static str = "Proxy"; - const EVENT: &'static str = "PureCreated"; + impl ::subxt::events::StaticEvent for VestingUpdated { + const PALLET: &'static str = "Vesting"; + const EVENT: &'static str = "VestingUpdated"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -17438,190 +17474,94 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "An announcement was placed to make a call in the future."] - pub struct Announced { - pub real: ::subxt::utils::AccountId32, - pub proxy: ::subxt::utils::AccountId32, - pub call_hash: ::subxt::utils::H256, + #[doc = "An \\[account\\] has become fully vested."] + pub struct VestingCompleted { + pub account: ::subxt::utils::AccountId32, } - impl ::subxt::events::StaticEvent for Announced { - const PALLET: &'static str = "Proxy"; - const EVENT: &'static str = "Announced"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A proxy was added."] - pub struct ProxyAdded { - pub delegator: ::subxt::utils::AccountId32, - pub delegatee: ::subxt::utils::AccountId32, - pub proxy_type: runtime_types::polkadot_runtime::ProxyType, - pub delay: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for ProxyAdded { - const PALLET: &'static str = "Proxy"; - const EVENT: &'static str = "ProxyAdded"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A proxy was removed."] - pub struct ProxyRemoved { - pub delegator: ::subxt::utils::AccountId32, - pub delegatee: ::subxt::utils::AccountId32, - pub proxy_type: runtime_types::polkadot_runtime::ProxyType, - pub delay: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for ProxyRemoved { - const PALLET: &'static str = "Proxy"; - const EVENT: &'static str = "ProxyRemoved"; + impl ::subxt::events::StaticEvent for VestingCompleted { + const PALLET: &'static str = "Vesting"; + const EVENT: &'static str = "VestingCompleted"; } } pub mod storage { use super::runtime_types; pub struct StorageApi; impl StorageApi { - #[doc = " The set of account proxies. Maps the account which has delegated to the accounts"] - #[doc = " which are being delegated to, together with the amount held on deposit."] - pub fn proxies( + #[doc = " Information regarding the vesting of a given account."] + pub fn vesting( &self, _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - ( - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - runtime_types::pallet_proxy::ProxyDefinition< - ::subxt::utils::AccountId32, - runtime_types::polkadot_runtime::ProxyType, - ::core::primitive::u32, - >, + runtime_types::bounded_collections::bounded_vec::BoundedVec< + runtime_types::pallet_vesting::vesting_info::VestingInfo< + ::core::primitive::u128, + ::core::primitive::u32, >, - ::core::primitive::u128, - ), - ::subxt::storage::address::Yes, + >, ::subxt::storage::address::Yes, + (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( - "Proxy", - "Proxies", + "Vesting", + "Vesting", vec![::subxt::storage::address::make_static_storage_map_key( _0.borrow(), )], [ - 106u8, 101u8, 77u8, 184u8, 193u8, 162u8, 132u8, 209u8, 130u8, 70u8, - 249u8, 183u8, 78u8, 52u8, 153u8, 120u8, 84u8, 224u8, 233u8, 37u8, - 171u8, 192u8, 99u8, 31u8, 49u8, 43u8, 126u8, 67u8, 161u8, 103u8, 248u8, - 14u8, + 23u8, 209u8, 233u8, 126u8, 89u8, 156u8, 193u8, 204u8, 100u8, 90u8, + 14u8, 120u8, 36u8, 167u8, 148u8, 239u8, 179u8, 74u8, 207u8, 83u8, 54u8, + 77u8, 27u8, 135u8, 74u8, 31u8, 33u8, 11u8, 168u8, 239u8, 212u8, 36u8, ], ) } - #[doc = " The set of account proxies. Maps the account which has delegated to the accounts"] - #[doc = " which are being delegated to, together with the amount held on deposit."] - pub fn proxies_root( + #[doc = " Information regarding the vesting of a given account."] + pub fn vesting_root( &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - ( - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - runtime_types::pallet_proxy::ProxyDefinition< - ::subxt::utils::AccountId32, - runtime_types::polkadot_runtime::ProxyType, - ::core::primitive::u32, - >, + runtime_types::bounded_collections::bounded_vec::BoundedVec< + runtime_types::pallet_vesting::vesting_info::VestingInfo< + ::core::primitive::u128, + ::core::primitive::u32, >, - ::core::primitive::u128, - ), + >, + (), (), - ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( - "Proxy", - "Proxies", + "Vesting", + "Vesting", Vec::new(), [ - 106u8, 101u8, 77u8, 184u8, 193u8, 162u8, 132u8, 209u8, 130u8, 70u8, - 249u8, 183u8, 78u8, 52u8, 153u8, 120u8, 84u8, 224u8, 233u8, 37u8, - 171u8, 192u8, 99u8, 31u8, 49u8, 43u8, 126u8, 67u8, 161u8, 103u8, 248u8, - 14u8, + 23u8, 209u8, 233u8, 126u8, 89u8, 156u8, 193u8, 204u8, 100u8, 90u8, + 14u8, 120u8, 36u8, 167u8, 148u8, 239u8, 179u8, 74u8, 207u8, 83u8, 54u8, + 77u8, 27u8, 135u8, 74u8, 31u8, 33u8, 11u8, 168u8, 239u8, 212u8, 36u8, ], ) } - #[doc = " The announcements made by the proxy (key)."] - pub fn announcements( + #[doc = " Storage version of the pallet."] + #[doc = ""] + #[doc = " New networks start with latest version, as determined by the genesis build."] + pub fn storage_version( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - ( - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - runtime_types::pallet_proxy::Announcement< - ::subxt::utils::AccountId32, - ::subxt::utils::H256, - ::core::primitive::u32, - >, - >, - ::core::primitive::u128, - ), - ::subxt::storage::address::Yes, + runtime_types::pallet_vesting::Releases, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Proxy", - "Announcements", - vec![::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - )], - [ - 233u8, 38u8, 249u8, 89u8, 103u8, 87u8, 64u8, 52u8, 140u8, 228u8, 110u8, - 37u8, 8u8, 92u8, 48u8, 7u8, 46u8, 99u8, 179u8, 83u8, 232u8, 171u8, - 160u8, 45u8, 37u8, 23u8, 151u8, 198u8, 237u8, 103u8, 217u8, 53u8, - ], - ) - } - #[doc = " The announcements made by the proxy (key)."] - pub fn announcements_root( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ( - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - runtime_types::pallet_proxy::Announcement< - ::subxt::utils::AccountId32, - ::subxt::utils::H256, - ::core::primitive::u32, - >, - >, - ::core::primitive::u128, - ), (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( - "Proxy", - "Announcements", - Vec::new(), + "Vesting", + "StorageVersion", + vec![], [ - 233u8, 38u8, 249u8, 89u8, 103u8, 87u8, 64u8, 52u8, 140u8, 228u8, 110u8, - 37u8, 8u8, 92u8, 48u8, 7u8, 46u8, 99u8, 179u8, 83u8, 232u8, 171u8, - 160u8, 45u8, 37u8, 23u8, 151u8, 198u8, 237u8, 103u8, 217u8, 53u8, + 50u8, 143u8, 26u8, 88u8, 129u8, 31u8, 61u8, 118u8, 19u8, 202u8, 119u8, + 160u8, 34u8, 219u8, 60u8, 57u8, 189u8, 66u8, 93u8, 239u8, 121u8, 114u8, + 241u8, 116u8, 0u8, 122u8, 232u8, 94u8, 189u8, 23u8, 45u8, 191u8, ], ) } @@ -17631,16 +17571,13 @@ pub mod api { use super::runtime_types; pub struct ConstantsApi; impl ConstantsApi { - #[doc = " The base amount of currency needed to reserve for creating a proxy."] - #[doc = ""] - #[doc = " This is held for an additional storage item whose value size is"] - #[doc = " `sizeof(Balance)` bytes and whose key size is `sizeof(AccountId)` bytes."] - pub fn proxy_deposit_base( + #[doc = " The minimum amount transferred to call `vested_transfer`."] + pub fn min_vested_transfer( &self, ) -> ::subxt::constants::Address<::core::primitive::u128> { ::subxt::constants::Address::new_static( - "Proxy", - "ProxyDepositBase", + "Vesting", + "MinVestedTransfer", [ 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, @@ -17648,29 +17585,12 @@ pub mod api { ], ) } - #[doc = " The amount of currency needed per proxy added."] - #[doc = ""] - #[doc = " This is held for adding 32 bytes plus an instance of `ProxyType` more into a"] - #[doc = " pre-existing storage value. Thus, when configuring `ProxyDepositFactor` one should take"] - #[doc = " into account `32 + proxy_type.encode().len()` bytes of data."] - pub fn proxy_deposit_factor( + pub fn max_vesting_schedules( &self, - ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::Address::new_static( - "Proxy", - "ProxyDepositFactor", - [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, - 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, - 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, - ], - ) - } - #[doc = " The maximum amount of proxies allowed for a single account."] - pub fn max_proxies(&self) -> ::subxt::constants::Address<::core::primitive::u32> { + ) -> ::subxt::constants::Address<::core::primitive::u32> { ::subxt::constants::Address::new_static( - "Proxy", - "MaxProxies", + "Vesting", + "MaxVestingSchedules", [ 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, @@ -17679,66 +17599,282 @@ pub mod api { ], ) } - #[doc = " The maximum amount of time-delayed announcements that are allowed to be pending."] - pub fn max_pending(&self) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "Proxy", - "MaxPending", + } + } + } + pub mod utility { + use super::root_mod; + use super::runtime_types; + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub type Error = runtime_types::pallet_utility::pallet::Error; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Batch { + pub calls: ::std::vec::Vec, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct AsDerivative { + pub index: ::core::primitive::u16, + pub call: ::std::boxed::Box, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct BatchAll { + pub calls: ::std::vec::Vec, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct DispatchAs { + pub as_origin: ::std::boxed::Box, + pub call: ::std::boxed::Box, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ForceBatch { + pub calls: ::std::vec::Vec, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct WithWeight { + pub call: ::std::boxed::Box, + pub weight: runtime_types::sp_weights::weight_v2::Weight, + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Send a batch of dispatch calls."] + #[doc = ""] + #[doc = "May be called from any origin except `None`."] + #[doc = ""] + #[doc = "- `calls`: The calls to be dispatched from the same origin. The number of call must not"] + #[doc = " exceed the constant: `batched_calls_limit` (available in constant metadata)."] + #[doc = ""] + #[doc = "If origin is root then the calls are dispatched without checking origin filter. (This"] + #[doc = "includes bypassing `frame_system::Config::BaseCallFilter`)."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- O(C) where C is the number of calls to be batched."] + #[doc = ""] + #[doc = "This will return `Ok` in all circumstances. To determine the success of the batch, an"] + #[doc = "event is deposited. If a call failed and the batch was interrupted, then the"] + #[doc = "`BatchInterrupted` event is deposited, along with the number of successful calls made"] + #[doc = "and the error of the failed call. If all were successful, then the `BatchCompleted`"] + #[doc = "event is deposited."] + pub fn batch( + &self, + calls: ::std::vec::Vec, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Utility", + "batch", + types::Batch { calls }, [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, + 12u8, 135u8, 86u8, 65u8, 103u8, 75u8, 121u8, 211u8, 245u8, 38u8, 169u8, + 197u8, 234u8, 144u8, 84u8, 134u8, 129u8, 181u8, 119u8, 60u8, 213u8, + 152u8, 51u8, 172u8, 5u8, 146u8, 191u8, 24u8, 95u8, 241u8, 231u8, 209u8, ], ) } - #[doc = " The base amount of currency needed to reserve for creating an announcement."] + #[doc = "Send a call through an indexed pseudonym of the sender."] #[doc = ""] - #[doc = " This is held when a new storage item holding a `Balance` is created (typically 16"] - #[doc = " bytes)."] - pub fn announcement_deposit_base( + #[doc = "Filter from origin are passed along. The call will be dispatched with an origin which"] + #[doc = "use the same filter as the origin of this call."] + #[doc = ""] + #[doc = "NOTE: If you need to ensure that any account-based filtering is not honored (i.e."] + #[doc = "because you expect `proxy` to have been used prior in the call stack and you do not want"] + #[doc = "the call restrictions to apply to any sub-accounts), then use `as_multi_threshold_1`"] + #[doc = "in the Multisig pallet instead."] + #[doc = ""] + #[doc = "NOTE: Prior to version *12, this was called `as_limited_sub`."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + pub fn as_derivative( &self, - ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::Address::new_static( - "Proxy", - "AnnouncementDepositBase", + index: ::core::primitive::u16, + call: runtime_types::polkadot_runtime::RuntimeCall, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Utility", + "as_derivative", + types::AsDerivative { + index, + call: ::std::boxed::Box::new(call), + }, [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, - 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, - 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, + 89u8, 62u8, 73u8, 74u8, 166u8, 135u8, 73u8, 171u8, 138u8, 219u8, 165u8, + 15u8, 77u8, 52u8, 179u8, 117u8, 96u8, 118u8, 50u8, 56u8, 187u8, 159u8, + 9u8, 185u8, 58u8, 183u8, 31u8, 128u8, 108u8, 62u8, 102u8, 197u8, ], ) } - #[doc = " The amount of currency needed per announcement made."] + #[doc = "Send a batch of dispatch calls and atomically execute them."] + #[doc = "The whole transaction will rollback and fail if any of the calls failed."] #[doc = ""] - #[doc = " This is held for adding an `AccountId`, `Hash` and `BlockNumber` (typically 68 bytes)"] - #[doc = " into a pre-existing storage value."] - pub fn announcement_deposit_factor( + #[doc = "May be called from any origin except `None`."] + #[doc = ""] + #[doc = "- `calls`: The calls to be dispatched from the same origin. The number of call must not"] + #[doc = " exceed the constant: `batched_calls_limit` (available in constant metadata)."] + #[doc = ""] + #[doc = "If origin is root then the calls are dispatched without checking origin filter. (This"] + #[doc = "includes bypassing `frame_system::Config::BaseCallFilter`)."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- O(C) where C is the number of calls to be batched."] + pub fn batch_all( &self, - ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::Address::new_static( - "Proxy", - "AnnouncementDepositFactor", + calls: ::std::vec::Vec, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Utility", + "batch_all", + types::BatchAll { calls }, [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, - 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, - 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, + 126u8, 64u8, 7u8, 172u8, 174u8, 142u8, 40u8, 181u8, 203u8, 6u8, 157u8, + 178u8, 112u8, 250u8, 152u8, 101u8, 16u8, 93u8, 4u8, 39u8, 14u8, 180u8, + 217u8, 51u8, 19u8, 100u8, 77u8, 65u8, 50u8, 98u8, 183u8, 79u8, + ], + ) + } + #[doc = "Dispatches a function call with a provided origin."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Root_."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- O(1)."] + pub fn dispatch_as( + &self, + as_origin: runtime_types::polkadot_runtime::OriginCaller, + call: runtime_types::polkadot_runtime::RuntimeCall, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Utility", + "dispatch_as", + types::DispatchAs { + as_origin: ::std::boxed::Box::new(as_origin), + call: ::std::boxed::Box::new(call), + }, + [ + 70u8, 103u8, 7u8, 7u8, 211u8, 56u8, 21u8, 249u8, 171u8, 126u8, 62u8, + 205u8, 184u8, 235u8, 35u8, 45u8, 101u8, 204u8, 176u8, 223u8, 38u8, + 15u8, 93u8, 189u8, 254u8, 195u8, 12u8, 157u8, 234u8, 96u8, 15u8, 50u8, + ], + ) + } + #[doc = "Send a batch of dispatch calls."] + #[doc = "Unlike `batch`, it allows errors and won't interrupt."] + #[doc = ""] + #[doc = "May be called from any origin except `None`."] + #[doc = ""] + #[doc = "- `calls`: The calls to be dispatched from the same origin. The number of call must not"] + #[doc = " exceed the constant: `batched_calls_limit` (available in constant metadata)."] + #[doc = ""] + #[doc = "If origin is root then the calls are dispatch without checking origin filter. (This"] + #[doc = "includes bypassing `frame_system::Config::BaseCallFilter`)."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- O(C) where C is the number of calls to be batched."] + pub fn force_batch( + &self, + calls: ::std::vec::Vec, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Utility", + "force_batch", + types::ForceBatch { calls }, + [ + 46u8, 245u8, 217u8, 95u8, 0u8, 142u8, 186u8, 62u8, 104u8, 197u8, 181u8, + 213u8, 218u8, 35u8, 75u8, 227u8, 67u8, 210u8, 215u8, 187u8, 5u8, 41u8, + 210u8, 165u8, 155u8, 35u8, 184u8, 71u8, 114u8, 184u8, 151u8, 82u8, + ], + ) + } + #[doc = "Dispatch a function call with a specified weight."] + #[doc = ""] + #[doc = "This function does not check the weight of the call, and instead allows the"] + #[doc = "Root origin to specify the weight of the call."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Root_."] + pub fn with_weight( + &self, + call: runtime_types::polkadot_runtime::RuntimeCall, + weight: runtime_types::sp_weights::weight_v2::Weight, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Utility", + "with_weight", + types::WithWeight { + call: ::std::boxed::Box::new(call), + weight, + }, + [ + 127u8, 67u8, 196u8, 63u8, 164u8, 121u8, 43u8, 61u8, 37u8, 147u8, 131u8, + 88u8, 217u8, 192u8, 202u8, 66u8, 93u8, 42u8, 210u8, 128u8, 227u8, 8u8, + 6u8, 93u8, 232u8, 26u8, 240u8, 67u8, 30u8, 152u8, 94u8, 153u8, ], ) } } } - } - pub mod multisig { - use super::root_mod; - use super::runtime_types; - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub type Error = runtime_types::pallet_multisig::pallet::Error; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::root_mod; + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub type Event = runtime_types::pallet_utility::pallet::Event; + pub mod events { use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -17749,9 +17885,15 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AsMultiThreshold1 { - pub other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, - pub call: ::std::boxed::Box, + #[doc = "Batch of dispatches did not complete fully. Index of first failing dispatch given, as"] + #[doc = "well as the error."] + pub struct BatchInterrupted { + pub index: ::core::primitive::u32, + pub error: runtime_types::sp_runtime::DispatchError, + } + impl ::subxt::events::StaticEvent for BatchInterrupted { + const PALLET: &'static str = "Utility"; + const EVENT: &'static str = "BatchInterrupted"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -17763,14 +17905,11 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AsMulti { - pub threshold: ::core::primitive::u16, - pub other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, - pub maybe_timepoint: ::core::option::Option< - runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, - >, - pub call: ::std::boxed::Box, - pub max_weight: runtime_types::sp_weights::weight_v2::Weight, + #[doc = "Batch of dispatches completed fully with no error."] + pub struct BatchCompleted; + impl ::subxt::events::StaticEvent for BatchCompleted { + const PALLET: &'static str = "Utility"; + const EVENT: &'static str = "BatchCompleted"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -17782,14 +17921,11 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ApproveAsMulti { - pub threshold: ::core::primitive::u16, - pub other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, - pub maybe_timepoint: ::core::option::Option< - runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, - >, - pub call_hash: [::core::primitive::u8; 32usize], - pub max_weight: runtime_types::sp_weights::weight_v2::Weight, + #[doc = "Batch of dispatches completed but has errors."] + pub struct BatchCompletedWithErrors; + impl ::subxt::events::StaticEvent for BatchCompletedWithErrors { + const PALLET: &'static str = "Utility"; + const EVENT: &'static str = "BatchCompletedWithErrors"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -17801,259 +17937,11 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CancelAsMulti { - pub threshold: ::core::primitive::u16, - pub other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, - pub timepoint: runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, - pub call_hash: [::core::primitive::u8; 32usize], - } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Immediately dispatch a multi-signature call using a single approval from the caller."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - #[doc = ""] - #[doc = "- `other_signatories`: The accounts (other than the sender) who are part of the"] - #[doc = "multi-signature, but do not participate in the approval process."] - #[doc = "- `call`: The call to be executed."] - #[doc = ""] - #[doc = "Result is equivalent to the dispatched result."] - #[doc = ""] - #[doc = "# "] - #[doc = "O(Z + C) where Z is the length of the call and C its execution weight."] - #[doc = "-------------------------------"] - #[doc = "- DB Weight: None"] - #[doc = "- Plus Call Weight"] - #[doc = "# "] - pub fn as_multi_threshold_1( - &self, - other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, - call: runtime_types::polkadot_runtime::RuntimeCall, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Multisig", - "as_multi_threshold_1", - AsMultiThreshold1 { - other_signatories, - call: ::std::boxed::Box::new(call), - }, - [ - 147u8, 128u8, 190u8, 162u8, 129u8, 151u8, 240u8, 184u8, 12u8, 100u8, - 188u8, 81u8, 25u8, 140u8, 46u8, 215u8, 52u8, 135u8, 134u8, 207u8, 40u8, - 221u8, 114u8, 48u8, 102u8, 107u8, 173u8, 90u8, 74u8, 56u8, 147u8, - 238u8, - ], - ) - } - #[doc = "Register approval for a dispatch to be made from a deterministic composite account if"] - #[doc = "approved by a total of `threshold - 1` of `other_signatories`."] - #[doc = ""] - #[doc = "If there are enough, then dispatch the call."] - #[doc = ""] - #[doc = "Payment: `DepositBase` will be reserved if this is the first approval, plus"] - #[doc = "`threshold` times `DepositFactor`. It is returned once this dispatch happens or"] - #[doc = "is cancelled."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - #[doc = ""] - #[doc = "- `threshold`: The total number of approvals for this dispatch before it is executed."] - #[doc = "- `other_signatories`: The accounts (other than the sender) who can approve this"] - #[doc = "dispatch. May not be empty."] - #[doc = "- `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is"] - #[doc = "not the first approval, then it must be `Some`, with the timepoint (block number and"] - #[doc = "transaction index) of the first approval transaction."] - #[doc = "- `call`: The call to be executed."] - #[doc = ""] - #[doc = "NOTE: Unless this is the final approval, you will generally want to use"] - #[doc = "`approve_as_multi` instead, since it only requires a hash of the call."] - #[doc = ""] - #[doc = "Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise"] - #[doc = "on success, result is `Ok` and the result from the interior call, if it was executed,"] - #[doc = "may be found in the deposited `MultisigExecuted` event."] - #[doc = ""] - #[doc = "# "] - #[doc = "- `O(S + Z + Call)`."] - #[doc = "- Up to one balance-reserve or unreserve operation."] - #[doc = "- One passthrough operation, one insert, both `O(S)` where `S` is the number of"] - #[doc = " signatories. `S` is capped by `MaxSignatories`, with weight being proportional."] - #[doc = "- One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len."] - #[doc = "- One encode & hash, both of complexity `O(S)`."] - #[doc = "- Up to one binary search and insert (`O(logS + S)`)."] - #[doc = "- I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove."] - #[doc = "- One event."] - #[doc = "- The weight of the `call`."] - #[doc = "- Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit"] - #[doc = " taken for its lifetime of `DepositBase + threshold * DepositFactor`."] - #[doc = "-------------------------------"] - #[doc = "- DB Weight:"] - #[doc = " - Reads: Multisig Storage, [Caller Account]"] - #[doc = " - Writes: Multisig Storage, [Caller Account]"] - #[doc = "- Plus Call Weight"] - #[doc = "# "] - pub fn as_multi( - &self, - threshold: ::core::primitive::u16, - other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, - maybe_timepoint: ::core::option::Option< - runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, - >, - call: runtime_types::polkadot_runtime::RuntimeCall, - max_weight: runtime_types::sp_weights::weight_v2::Weight, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Multisig", - "as_multi", - AsMulti { - threshold, - other_signatories, - maybe_timepoint, - call: ::std::boxed::Box::new(call), - max_weight, - }, - [ - 223u8, 45u8, 132u8, 89u8, 48u8, 61u8, 93u8, 46u8, 76u8, 28u8, 217u8, - 194u8, 89u8, 170u8, 245u8, 6u8, 76u8, 50u8, 12u8, 133u8, 230u8, 10u8, - 56u8, 231u8, 29u8, 202u8, 60u8, 50u8, 181u8, 144u8, 238u8, 151u8, - ], - ) - } - #[doc = "Register approval for a dispatch to be made from a deterministic composite account if"] - #[doc = "approved by a total of `threshold - 1` of `other_signatories`."] - #[doc = ""] - #[doc = "Payment: `DepositBase` will be reserved if this is the first approval, plus"] - #[doc = "`threshold` times `DepositFactor`. It is returned once this dispatch happens or"] - #[doc = "is cancelled."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - #[doc = ""] - #[doc = "- `threshold`: The total number of approvals for this dispatch before it is executed."] - #[doc = "- `other_signatories`: The accounts (other than the sender) who can approve this"] - #[doc = "dispatch. May not be empty."] - #[doc = "- `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is"] - #[doc = "not the first approval, then it must be `Some`, with the timepoint (block number and"] - #[doc = "transaction index) of the first approval transaction."] - #[doc = "- `call_hash`: The hash of the call to be executed."] - #[doc = ""] - #[doc = "NOTE: If this is the final approval, you will want to use `as_multi` instead."] - #[doc = ""] - #[doc = "# "] - #[doc = "- `O(S)`."] - #[doc = "- Up to one balance-reserve or unreserve operation."] - #[doc = "- One passthrough operation, one insert, both `O(S)` where `S` is the number of"] - #[doc = " signatories. `S` is capped by `MaxSignatories`, with weight being proportional."] - #[doc = "- One encode & hash, both of complexity `O(S)`."] - #[doc = "- Up to one binary search and insert (`O(logS + S)`)."] - #[doc = "- I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove."] - #[doc = "- One event."] - #[doc = "- Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit"] - #[doc = " taken for its lifetime of `DepositBase + threshold * DepositFactor`."] - #[doc = "----------------------------------"] - #[doc = "- DB Weight:"] - #[doc = " - Read: Multisig Storage, [Caller Account]"] - #[doc = " - Write: Multisig Storage, [Caller Account]"] - #[doc = "# "] - pub fn approve_as_multi( - &self, - threshold: ::core::primitive::u16, - other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, - maybe_timepoint: ::core::option::Option< - runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, - >, - call_hash: [::core::primitive::u8; 32usize], - max_weight: runtime_types::sp_weights::weight_v2::Weight, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Multisig", - "approve_as_multi", - ApproveAsMulti { - threshold, - other_signatories, - maybe_timepoint, - call_hash, - max_weight, - }, - [ - 133u8, 113u8, 121u8, 66u8, 218u8, 219u8, 48u8, 64u8, 211u8, 114u8, - 163u8, 193u8, 164u8, 21u8, 140u8, 218u8, 253u8, 237u8, 240u8, 126u8, - 200u8, 213u8, 184u8, 50u8, 187u8, 182u8, 30u8, 52u8, 142u8, 72u8, - 210u8, 101u8, - ], - ) - } - #[doc = "Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously"] - #[doc = "for this operation will be unreserved on success."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - #[doc = ""] - #[doc = "- `threshold`: The total number of approvals for this dispatch before it is executed."] - #[doc = "- `other_signatories`: The accounts (other than the sender) who can approve this"] - #[doc = "dispatch. May not be empty."] - #[doc = "- `timepoint`: The timepoint (block number and transaction index) of the first approval"] - #[doc = "transaction for this dispatch."] - #[doc = "- `call_hash`: The hash of the call to be executed."] - #[doc = ""] - #[doc = "# "] - #[doc = "- `O(S)`."] - #[doc = "- Up to one balance-reserve or unreserve operation."] - #[doc = "- One passthrough operation, one insert, both `O(S)` where `S` is the number of"] - #[doc = " signatories. `S` is capped by `MaxSignatories`, with weight being proportional."] - #[doc = "- One encode & hash, both of complexity `O(S)`."] - #[doc = "- One event."] - #[doc = "- I/O: 1 read `O(S)`, one remove."] - #[doc = "- Storage: removes one item."] - #[doc = "----------------------------------"] - #[doc = "- DB Weight:"] - #[doc = " - Read: Multisig Storage, [Caller Account], Refund Account"] - #[doc = " - Write: Multisig Storage, [Caller Account], Refund Account"] - #[doc = "# "] - pub fn cancel_as_multi( - &self, - threshold: ::core::primitive::u16, - other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, - timepoint: runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, - call_hash: [::core::primitive::u8; 32usize], - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Multisig", - "cancel_as_multi", - CancelAsMulti { - threshold, - other_signatories, - timepoint, - call_hash, - }, - [ - 30u8, 25u8, 186u8, 142u8, 168u8, 81u8, 235u8, 164u8, 82u8, 209u8, 66u8, - 129u8, 209u8, 78u8, 172u8, 9u8, 163u8, 222u8, 125u8, 57u8, 2u8, 43u8, - 169u8, 174u8, 159u8, 167u8, 25u8, 226u8, 254u8, 110u8, 80u8, 216u8, - ], - ) - } - } - } - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::pallet_multisig::pallet::Event; - pub mod events { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A new multisig operation has begun."] - pub struct NewMultisig { - pub approving: ::subxt::utils::AccountId32, - pub multisig: ::subxt::utils::AccountId32, - pub call_hash: [::core::primitive::u8; 32usize], - } - impl ::subxt::events::StaticEvent for NewMultisig { - const PALLET: &'static str = "Multisig"; - const EVENT: &'static str = "NewMultisig"; + #[doc = "A single item within a Batch of dispatches has completed with no error."] + pub struct ItemCompleted; + impl ::subxt::events::StaticEvent for ItemCompleted { + const PALLET: &'static str = "Utility"; + const EVENT: &'static str = "ItemCompleted"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -18065,16 +17953,13 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A multisig operation has been approved by someone."] - pub struct MultisigApproval { - pub approving: ::subxt::utils::AccountId32, - pub timepoint: runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, - pub multisig: ::subxt::utils::AccountId32, - pub call_hash: [::core::primitive::u8; 32usize], + #[doc = "A single item within a Batch of dispatches has completed with error."] + pub struct ItemFailed { + pub error: runtime_types::sp_runtime::DispatchError, } - impl ::subxt::events::StaticEvent for MultisigApproval { - const PALLET: &'static str = "Multisig"; - const EVENT: &'static str = "MultisigApproval"; + impl ::subxt::events::StaticEvent for ItemFailed { + const PALLET: &'static str = "Utility"; + const EVENT: &'static str = "ItemFailed"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -18086,145 +17971,26 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A multisig operation has been executed."] - pub struct MultisigExecuted { - pub approving: ::subxt::utils::AccountId32, - pub timepoint: runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, - pub multisig: ::subxt::utils::AccountId32, - pub call_hash: [::core::primitive::u8; 32usize], + #[doc = "A call was dispatched."] + pub struct DispatchedAs { pub result: ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, } - impl ::subxt::events::StaticEvent for MultisigExecuted { - const PALLET: &'static str = "Multisig"; - const EVENT: &'static str = "MultisigExecuted"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A multisig operation has been cancelled."] - pub struct MultisigCancelled { - pub cancelling: ::subxt::utils::AccountId32, - pub timepoint: runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, - pub multisig: ::subxt::utils::AccountId32, - pub call_hash: [::core::primitive::u8; 32usize], - } - impl ::subxt::events::StaticEvent for MultisigCancelled { - const PALLET: &'static str = "Multisig"; - const EVENT: &'static str = "MultisigCancelled"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " The set of open multisig operations."] - pub fn multisigs( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - _1: impl ::std::borrow::Borrow<[::core::primitive::u8; 32usize]>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_multisig::Multisig< - ::core::primitive::u32, - ::core::primitive::u128, - ::subxt::utils::AccountId32, - >, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Multisig", - "Multisigs", - vec![ - ::subxt::storage::address::make_static_storage_map_key(_0.borrow()), - ::subxt::storage::address::make_static_storage_map_key(_1.borrow()), - ], - [ - 69u8, 153u8, 186u8, 204u8, 117u8, 95u8, 119u8, 182u8, 220u8, 87u8, 8u8, - 15u8, 123u8, 83u8, 5u8, 188u8, 115u8, 121u8, 163u8, 96u8, 218u8, 3u8, - 106u8, 44u8, 44u8, 187u8, 46u8, 238u8, 80u8, 203u8, 175u8, 155u8, - ], - ) - } - #[doc = " The set of open multisig operations."] - pub fn multisigs_root( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_multisig::Multisig< - ::core::primitive::u32, - ::core::primitive::u128, - ::subxt::utils::AccountId32, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Multisig", - "Multisigs", - Vec::new(), - [ - 69u8, 153u8, 186u8, 204u8, 117u8, 95u8, 119u8, 182u8, 220u8, 87u8, 8u8, - 15u8, 123u8, 83u8, 5u8, 188u8, 115u8, 121u8, 163u8, 96u8, 218u8, 3u8, - 106u8, 44u8, 44u8, 187u8, 46u8, 238u8, 80u8, 203u8, 175u8, 155u8, - ], - ) - } + impl ::subxt::events::StaticEvent for DispatchedAs { + const PALLET: &'static str = "Utility"; + const EVENT: &'static str = "DispatchedAs"; } } pub mod constants { use super::runtime_types; pub struct ConstantsApi; impl ConstantsApi { - #[doc = " The base amount of currency needed to reserve for creating a multisig execution or to"] - #[doc = " store a dispatch call for later."] - #[doc = ""] - #[doc = " This is held for an additional storage item whose value size is"] - #[doc = " `4 + sizeof((BlockNumber, Balance, AccountId))` bytes and whose key size is"] - #[doc = " `32 + sizeof(AccountId)` bytes."] - pub fn deposit_base(&self) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::Address::new_static( - "Multisig", - "DepositBase", - [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, - 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, - 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, - ], - ) - } - #[doc = " The amount of currency needed per unit threshold when creating a multisig execution."] - #[doc = ""] - #[doc = " This is held for adding 32 bytes more into a pre-existing storage value."] - pub fn deposit_factor( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::Address::new_static( - "Multisig", - "DepositFactor", - [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, - 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, - 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, - ], - ) - } - #[doc = " The maximum amount of signatories allowed in the multisig."] - pub fn max_signatories( + #[doc = " The limit on the number of batched calls."] + pub fn batched_calls_limit( &self, ) -> ::subxt::constants::Address<::core::primitive::u32> { ::subxt::constants::Address::new_static( - "Multisig", - "MaxSignatories", + "Utility", + "batched_calls_limit", [ 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, @@ -18236,842 +18002,675 @@ pub mod api { } } } - pub mod bounties { + pub mod identity { use super::root_mod; use super::runtime_types; #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub type Error = runtime_types::pallet_bounties::pallet::Error; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub type Error = runtime_types::pallet_identity::pallet::Error; + #[doc = "Identity pallet declaration."] pub mod calls { use super::root_mod; use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ProposeBounty { - #[codec(compact)] - pub value: ::core::primitive::u128, - pub description: ::std::vec::Vec<::core::primitive::u8>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ApproveBounty { - #[codec(compact)] - pub bounty_id: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ProposeCurator { - #[codec(compact)] - pub bounty_id: ::core::primitive::u32, - pub curator: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - #[codec(compact)] - pub fee: ::core::primitive::u128, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct UnassignCurator { - #[codec(compact)] - pub bounty_id: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AcceptCurator { - #[codec(compact)] - pub bounty_id: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AwardBounty { - #[codec(compact)] - pub bounty_id: ::core::primitive::u32, - pub beneficiary: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ClaimBounty { - #[codec(compact)] - pub bounty_id: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CloseBounty { - #[codec(compact)] - pub bounty_id: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ExtendBountyExpiry { - #[codec(compact)] - pub bounty_id: ::core::primitive::u32, - pub remark: ::std::vec::Vec<::core::primitive::u8>, - } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Propose a new bounty."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - #[doc = ""] - #[doc = "Payment: `TipReportDepositBase` will be reserved from the origin account, as well as"] - #[doc = "`DataDepositPerByte` for each byte in `reason`. It will be unreserved upon approval,"] - #[doc = "or slashed when rejected."] - #[doc = ""] - #[doc = "- `curator`: The curator account whom will manage this bounty."] - #[doc = "- `fee`: The curator fee."] - #[doc = "- `value`: The total payment amount of this bounty, curator fee included."] - #[doc = "- `description`: The description of this bounty."] - pub fn propose_bounty( - &self, - value: ::core::primitive::u128, - description: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Bounties", - "propose_bounty", - ProposeBounty { value, description }, - [ - 99u8, 160u8, 94u8, 74u8, 105u8, 161u8, 123u8, 239u8, 241u8, 117u8, - 97u8, 99u8, 84u8, 101u8, 87u8, 3u8, 88u8, 175u8, 75u8, 59u8, 114u8, - 87u8, 18u8, 113u8, 126u8, 26u8, 42u8, 104u8, 201u8, 128u8, 102u8, - 219u8, - ], - ) + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct AddRegistrar { + pub account: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, } - #[doc = "Approve a bounty proposal. At a later time, the bounty will be funded and become active"] - #[doc = "and the original deposit will be returned."] - #[doc = ""] - #[doc = "May only be called from `T::ApproveOrigin`."] - #[doc = ""] - #[doc = "# "] - #[doc = "- O(1)."] - #[doc = "# "] - pub fn approve_bounty( - &self, - bounty_id: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Bounties", - "approve_bounty", - ApproveBounty { bounty_id }, - [ - 82u8, 228u8, 232u8, 103u8, 198u8, 173u8, 190u8, 148u8, 159u8, 86u8, - 48u8, 4u8, 32u8, 169u8, 1u8, 129u8, 96u8, 145u8, 235u8, 68u8, 48u8, - 34u8, 5u8, 1u8, 76u8, 26u8, 100u8, 228u8, 92u8, 198u8, 183u8, 173u8, - ], - ) + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetIdentity { + pub info: + ::std::boxed::Box, } - #[doc = "Assign a curator to a funded bounty."] - #[doc = ""] - #[doc = "May only be called from `T::ApproveOrigin`."] - #[doc = ""] - #[doc = "# "] - #[doc = "- O(1)."] - #[doc = "# "] - pub fn propose_curator( - &self, - bounty_id: ::core::primitive::u32, - curator: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - fee: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Bounties", - "propose_curator", - ProposeCurator { - bounty_id, - curator, - fee, - }, - [ - 123u8, 148u8, 21u8, 204u8, 216u8, 6u8, 47u8, 83u8, 182u8, 30u8, 171u8, - 48u8, 193u8, 200u8, 197u8, 147u8, 111u8, 88u8, 14u8, 242u8, 66u8, - 175u8, 241u8, 208u8, 95u8, 151u8, 41u8, 46u8, 213u8, 188u8, 65u8, - 196u8, + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetSubs { + pub subs: ::std::vec::Vec<( + ::subxt::utils::AccountId32, + runtime_types::pallet_identity::types::Data, + )>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ClearIdentity; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct RequestJudgement { + #[codec(compact)] + pub reg_index: ::core::primitive::u32, + #[codec(compact)] + pub max_fee: ::core::primitive::u128, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct CancelRequest { + pub reg_index: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetFee { + #[codec(compact)] + pub index: ::core::primitive::u32, + #[codec(compact)] + pub fee: ::core::primitive::u128, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetAccountId { + #[codec(compact)] + pub index: ::core::primitive::u32, + pub new: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetFields { + #[codec(compact)] + pub index: ::core::primitive::u32, + pub fields: runtime_types::pallet_identity::types::BitFlags< + runtime_types::pallet_identity::types::IdentityField, + >, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ProvideJudgement { + #[codec(compact)] + pub reg_index: ::core::primitive::u32, + pub target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub judgement: + runtime_types::pallet_identity::types::Judgement<::core::primitive::u128>, + pub identity: ::subxt::utils::H256, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct KillIdentity { + pub target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct AddSub { + pub sub: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub data: runtime_types::pallet_identity::types::Data, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct RenameSub { + pub sub: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub data: runtime_types::pallet_identity::types::Data, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct RemoveSub { + pub sub: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct QuitSub; + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Add a registrar to the system."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be `T::RegistrarOrigin`."] + #[doc = ""] + #[doc = "- `account`: the account of the registrar."] + #[doc = ""] + #[doc = "Emits `RegistrarAdded` if successful."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(R)` where `R` registrar-count (governance-bounded and code-bounded)."] + pub fn add_registrar( + &self, + account: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Identity", + "add_registrar", + types::AddRegistrar { account }, + [ + 157u8, 232u8, 252u8, 190u8, 203u8, 233u8, 127u8, 63u8, 111u8, 16u8, + 118u8, 200u8, 31u8, 234u8, 144u8, 111u8, 161u8, 224u8, 217u8, 86u8, + 179u8, 254u8, 162u8, 212u8, 248u8, 8u8, 125u8, 89u8, 23u8, 195u8, 4u8, + 231u8, ], ) } - #[doc = "Unassign curator from a bounty."] + #[doc = "Set an account's identity information and reserve the appropriate deposit."] #[doc = ""] - #[doc = "This function can only be called by the `RejectOrigin` a signed origin."] + #[doc = "If the account already has identity information, the deposit is taken as part payment"] + #[doc = "for the new deposit."] #[doc = ""] - #[doc = "If this function is called by the `RejectOrigin`, we assume that the curator is"] - #[doc = "malicious or inactive. As a result, we will slash the curator when possible."] + #[doc = "The dispatch origin for this call must be _Signed_."] #[doc = ""] - #[doc = "If the origin is the curator, we take this as a sign they are unable to do their job and"] - #[doc = "they willingly give up. We could slash them, but for now we allow them to recover their"] - #[doc = "deposit and exit without issue. (We may want to change this if it is abused.)"] + #[doc = "- `info`: The identity information."] #[doc = ""] - #[doc = "Finally, the origin can be anyone if and only if the curator is \"inactive\". This allows"] - #[doc = "anyone in the community to call out that a curator is not doing their due diligence, and"] - #[doc = "we should pick a new curator. In this case the curator should also be slashed."] + #[doc = "Emits `IdentitySet` if successful."] #[doc = ""] - #[doc = "# "] - #[doc = "- O(1)."] - #[doc = "# "] - pub fn unassign_curator( + #[doc = "## Complexity"] + #[doc = "- `O(X + X' + R)`"] + #[doc = " - where `X` additional-field-count (deposit-bounded and code-bounded)"] + #[doc = " - where `R` judgements-count (registrar-count-bounded)"] + pub fn set_identity( &self, - bounty_id: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + info: runtime_types::pallet_identity::types::IdentityInfo, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Bounties", - "unassign_curator", - UnassignCurator { bounty_id }, + "Identity", + "set_identity", + types::SetIdentity { + info: ::std::boxed::Box::new(info), + }, [ - 218u8, 241u8, 247u8, 89u8, 95u8, 120u8, 93u8, 18u8, 85u8, 114u8, 158u8, - 254u8, 68u8, 77u8, 230u8, 186u8, 230u8, 201u8, 63u8, 223u8, 28u8, - 173u8, 244u8, 82u8, 113u8, 177u8, 99u8, 27u8, 207u8, 247u8, 207u8, - 213u8, + 130u8, 89u8, 118u8, 6u8, 134u8, 166u8, 35u8, 192u8, 73u8, 6u8, 171u8, + 20u8, 225u8, 255u8, 152u8, 142u8, 111u8, 8u8, 206u8, 200u8, 64u8, 52u8, + 110u8, 123u8, 42u8, 101u8, 191u8, 242u8, 133u8, 139u8, 154u8, 205u8, ], ) } - #[doc = "Accept the curator role for a bounty."] - #[doc = "A deposit will be reserved from curator and refund upon successful payout."] + #[doc = "Set the sub-accounts of the sender."] #[doc = ""] - #[doc = "May only be called from the curator."] + #[doc = "Payment: Any aggregate balance reserved by previous `set_subs` calls will be returned"] + #[doc = "and an amount `SubAccountDeposit` will be reserved for each item in `subs`."] #[doc = ""] - #[doc = "# "] - #[doc = "- O(1)."] - #[doc = "# "] - pub fn accept_curator( + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a registered"] + #[doc = "identity."] + #[doc = ""] + #[doc = "- `subs`: The identity's (new) sub-accounts."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(P + S)`"] + #[doc = " - where `P` old-subs-count (hard- and deposit-bounded)."] + #[doc = " - where `S` subs-count (hard- and deposit-bounded)."] + pub fn set_subs( &self, - bounty_id: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + subs: ::std::vec::Vec<( + ::subxt::utils::AccountId32, + runtime_types::pallet_identity::types::Data, + )>, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Bounties", - "accept_curator", - AcceptCurator { bounty_id }, + "Identity", + "set_subs", + types::SetSubs { subs }, [ - 106u8, 96u8, 22u8, 67u8, 52u8, 109u8, 180u8, 225u8, 122u8, 253u8, - 209u8, 214u8, 132u8, 131u8, 247u8, 131u8, 162u8, 51u8, 144u8, 30u8, - 12u8, 126u8, 50u8, 152u8, 229u8, 119u8, 54u8, 116u8, 112u8, 235u8, - 34u8, 166u8, + 177u8, 219u8, 84u8, 183u8, 5u8, 32u8, 192u8, 82u8, 174u8, 68u8, 198u8, + 224u8, 56u8, 85u8, 134u8, 171u8, 30u8, 132u8, 140u8, 236u8, 117u8, + 24u8, 150u8, 218u8, 146u8, 194u8, 144u8, 92u8, 103u8, 206u8, 46u8, + 90u8, ], ) } - #[doc = "Award bounty to a beneficiary account. The beneficiary will be able to claim the funds"] - #[doc = "after a delay."] + #[doc = "Clear an account's identity info and all sub-accounts and return all deposits."] #[doc = ""] - #[doc = "The dispatch origin for this call must be the curator of this bounty."] + #[doc = "Payment: All reserved balances on the account are returned."] #[doc = ""] - #[doc = "- `bounty_id`: Bounty ID to award."] - #[doc = "- `beneficiary`: The beneficiary account whom will receive the payout."] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a registered"] + #[doc = "identity."] #[doc = ""] - #[doc = "# "] - #[doc = "- O(1)."] - #[doc = "# "] - pub fn award_bounty( + #[doc = "Emits `IdentityCleared` if successful."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(R + S + X)`"] + #[doc = " - where `R` registrar-count (governance-bounded)."] + #[doc = " - where `S` subs-count (hard- and deposit-bounded)."] + #[doc = " - where `X` additional-field-count (deposit-bounded and code-bounded)."] + pub fn clear_identity(&self) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Identity", + "clear_identity", + types::ClearIdentity {}, + [ + 75u8, 44u8, 74u8, 122u8, 149u8, 202u8, 114u8, 230u8, 0u8, 255u8, 140u8, + 122u8, 14u8, 196u8, 205u8, 249u8, 220u8, 94u8, 216u8, 34u8, 63u8, 14u8, + 8u8, 205u8, 74u8, 23u8, 181u8, 129u8, 252u8, 110u8, 231u8, 114u8, + ], + ) + } + #[doc = "Request a judgement from a registrar."] + #[doc = ""] + #[doc = "Payment: At most `max_fee` will be reserved for payment to the registrar if judgement"] + #[doc = "given."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a"] + #[doc = "registered identity."] + #[doc = ""] + #[doc = "- `reg_index`: The index of the registrar whose judgement is requested."] + #[doc = "- `max_fee`: The maximum fee that may be paid. This should just be auto-populated as:"] + #[doc = ""] + #[doc = "```nocompile"] + #[doc = "Self::registrars().get(reg_index).unwrap().fee"] + #[doc = "```"] + #[doc = ""] + #[doc = "Emits `JudgementRequested` if successful."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(R + X)`."] + #[doc = " - where `R` registrar-count (governance-bounded)."] + #[doc = " - where `X` additional-field-count (deposit-bounded and code-bounded)."] + pub fn request_judgement( &self, - bounty_id: ::core::primitive::u32, - beneficiary: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - ) -> ::subxt::tx::Payload { + reg_index: ::core::primitive::u32, + max_fee: ::core::primitive::u128, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Bounties", - "award_bounty", - AwardBounty { - bounty_id, - beneficiary, - }, + "Identity", + "request_judgement", + types::RequestJudgement { reg_index, max_fee }, [ - 203u8, 164u8, 214u8, 242u8, 1u8, 11u8, 217u8, 32u8, 189u8, 136u8, 29u8, - 230u8, 88u8, 17u8, 134u8, 189u8, 15u8, 204u8, 223u8, 20u8, 168u8, - 182u8, 129u8, 48u8, 83u8, 25u8, 125u8, 25u8, 209u8, 155u8, 170u8, 68u8, + 186u8, 149u8, 61u8, 54u8, 159u8, 194u8, 77u8, 161u8, 220u8, 157u8, 3u8, + 216u8, 23u8, 105u8, 119u8, 76u8, 144u8, 198u8, 157u8, 45u8, 235u8, + 139u8, 87u8, 82u8, 81u8, 12u8, 25u8, 134u8, 225u8, 92u8, 182u8, 101u8, ], ) } - #[doc = "Claim the payout from an awarded bounty after payout delay."] + #[doc = "Cancel a previous request."] #[doc = ""] - #[doc = "The dispatch origin for this call must be the beneficiary of this bounty."] + #[doc = "Payment: A previously reserved deposit is returned on success."] #[doc = ""] - #[doc = "- `bounty_id`: Bounty ID to claim."] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a"] + #[doc = "registered identity."] #[doc = ""] - #[doc = "# "] - #[doc = "- O(1)."] - #[doc = "# "] - pub fn claim_bounty( + #[doc = "- `reg_index`: The index of the registrar whose judgement is no longer requested."] + #[doc = ""] + #[doc = "Emits `JudgementUnrequested` if successful."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(R + X)`."] + #[doc = " - where `R` registrar-count (governance-bounded)."] + #[doc = " - where `X` additional-field-count (deposit-bounded and code-bounded)."] + pub fn cancel_request( &self, - bounty_id: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + reg_index: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Bounties", - "claim_bounty", - ClaimBounty { bounty_id }, + "Identity", + "cancel_request", + types::CancelRequest { reg_index }, [ - 102u8, 95u8, 8u8, 89u8, 4u8, 126u8, 189u8, 28u8, 241u8, 16u8, 125u8, - 218u8, 42u8, 92u8, 177u8, 91u8, 8u8, 235u8, 33u8, 48u8, 64u8, 115u8, - 177u8, 95u8, 242u8, 97u8, 181u8, 50u8, 68u8, 37u8, 59u8, 85u8, + 83u8, 180u8, 239u8, 126u8, 32u8, 51u8, 17u8, 20u8, 180u8, 3u8, 59u8, + 96u8, 24u8, 32u8, 136u8, 92u8, 58u8, 254u8, 68u8, 70u8, 50u8, 11u8, + 51u8, 91u8, 180u8, 79u8, 81u8, 84u8, 216u8, 138u8, 6u8, 215u8, ], ) } - #[doc = "Cancel a proposed or active bounty. All the funds will be sent to treasury and"] - #[doc = "the curator deposit will be unreserved if possible."] + #[doc = "Set the fee required for a judgement to be requested from a registrar."] #[doc = ""] - #[doc = "Only `T::RejectOrigin` is able to cancel a bounty."] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must be the account"] + #[doc = "of the registrar whose index is `index`."] #[doc = ""] - #[doc = "- `bounty_id`: Bounty ID to cancel."] + #[doc = "- `index`: the index of the registrar whose fee is to be set."] + #[doc = "- `fee`: the new fee."] #[doc = ""] - #[doc = "# "] - #[doc = "- O(1)."] - #[doc = "# "] - pub fn close_bounty( + #[doc = "## Complexity"] + #[doc = "- `O(R)`."] + #[doc = " - where `R` registrar-count (governance-bounded)."] + pub fn set_fee( &self, - bounty_id: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + index: ::core::primitive::u32, + fee: ::core::primitive::u128, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Bounties", - "close_bounty", - CloseBounty { bounty_id }, + "Identity", + "set_fee", + types::SetFee { index, fee }, [ - 64u8, 113u8, 151u8, 228u8, 90u8, 55u8, 251u8, 63u8, 27u8, 211u8, 119u8, - 229u8, 137u8, 137u8, 183u8, 240u8, 241u8, 146u8, 69u8, 169u8, 124u8, - 220u8, 236u8, 111u8, 98u8, 188u8, 100u8, 52u8, 127u8, 245u8, 244u8, - 92u8, + 21u8, 157u8, 123u8, 182u8, 160u8, 190u8, 117u8, 37u8, 136u8, 133u8, + 104u8, 234u8, 31u8, 145u8, 115u8, 154u8, 125u8, 40u8, 2u8, 87u8, 118u8, + 56u8, 247u8, 73u8, 89u8, 0u8, 251u8, 3u8, 58u8, 105u8, 239u8, 211u8, ], ) } - #[doc = "Extend the expiry time of an active bounty."] + #[doc = "Change the account associated with a registrar."] #[doc = ""] - #[doc = "The dispatch origin for this call must be the curator of this bounty."] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must be the account"] + #[doc = "of the registrar whose index is `index`."] #[doc = ""] - #[doc = "- `bounty_id`: Bounty ID to extend."] - #[doc = "- `remark`: additional information."] + #[doc = "- `index`: the index of the registrar whose fee is to be set."] + #[doc = "- `new`: the new account ID."] #[doc = ""] - #[doc = "# "] - #[doc = "- O(1)."] - #[doc = "# "] - pub fn extend_bounty_expiry( + #[doc = "## Complexity"] + #[doc = "- `O(R)`."] + #[doc = " - where `R` registrar-count (governance-bounded)."] + pub fn set_account_id( &self, - bounty_id: ::core::primitive::u32, - remark: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::Payload { + index: ::core::primitive::u32, + new: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Bounties", - "extend_bounty_expiry", - ExtendBountyExpiry { bounty_id, remark }, + "Identity", + "set_account_id", + types::SetAccountId { index, new }, [ - 97u8, 69u8, 157u8, 39u8, 59u8, 72u8, 79u8, 88u8, 104u8, 119u8, 91u8, - 26u8, 73u8, 216u8, 174u8, 95u8, 254u8, 214u8, 63u8, 138u8, 100u8, - 112u8, 185u8, 81u8, 159u8, 247u8, 221u8, 60u8, 87u8, 40u8, 80u8, 202u8, + 13u8, 91u8, 36u8, 7u8, 88u8, 64u8, 151u8, 104u8, 94u8, 174u8, 195u8, + 99u8, 97u8, 181u8, 236u8, 251u8, 26u8, 236u8, 234u8, 40u8, 183u8, 38u8, + 220u8, 216u8, 48u8, 115u8, 7u8, 230u8, 216u8, 28u8, 123u8, 11u8, ], ) } - } - } - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::pallet_bounties::pallet::Event; - pub mod events { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "New bounty proposal."] - pub struct BountyProposed { - pub index: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for BountyProposed { - const PALLET: &'static str = "Bounties"; - const EVENT: &'static str = "BountyProposed"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A bounty proposal was rejected; funds were slashed."] - pub struct BountyRejected { - pub index: ::core::primitive::u32, - pub bond: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for BountyRejected { - const PALLET: &'static str = "Bounties"; - const EVENT: &'static str = "BountyRejected"; - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A bounty proposal is funded and became active."] - pub struct BountyBecameActive { - pub index: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for BountyBecameActive { - const PALLET: &'static str = "Bounties"; - const EVENT: &'static str = "BountyBecameActive"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A bounty is awarded to a beneficiary."] - pub struct BountyAwarded { - pub index: ::core::primitive::u32, - pub beneficiary: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for BountyAwarded { - const PALLET: &'static str = "Bounties"; - const EVENT: &'static str = "BountyAwarded"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A bounty is claimed by beneficiary."] - pub struct BountyClaimed { - pub index: ::core::primitive::u32, - pub payout: ::core::primitive::u128, - pub beneficiary: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for BountyClaimed { - const PALLET: &'static str = "Bounties"; - const EVENT: &'static str = "BountyClaimed"; - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A bounty is cancelled."] - pub struct BountyCanceled { - pub index: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for BountyCanceled { - const PALLET: &'static str = "Bounties"; - const EVENT: &'static str = "BountyCanceled"; - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A bounty expiry is extended."] - pub struct BountyExtended { - pub index: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for BountyExtended { - const PALLET: &'static str = "Bounties"; - const EVENT: &'static str = "BountyExtended"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " Number of bounty proposals that have been made."] - pub fn bounty_count( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Bounties", - "BountyCount", - vec![], - [ - 5u8, 188u8, 134u8, 220u8, 64u8, 49u8, 188u8, 98u8, 185u8, 186u8, 230u8, - 65u8, 247u8, 199u8, 28u8, 178u8, 202u8, 193u8, 41u8, 83u8, 115u8, - 253u8, 182u8, 123u8, 92u8, 138u8, 12u8, 31u8, 31u8, 213u8, 23u8, 118u8, - ], - ) - } - #[doc = " Bounties that have been made."] - pub fn bounties( + #[doc = "Set the field information for a registrar."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must be the account"] + #[doc = "of the registrar whose index is `index`."] + #[doc = ""] + #[doc = "- `index`: the index of the registrar whose fee is to be set."] + #[doc = "- `fields`: the fields that the registrar concerns themselves with."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(R)`."] + #[doc = " - where `R` registrar-count (governance-bounded)."] + pub fn set_fields( &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_bounties::Bounty< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - ::core::primitive::u32, + index: ::core::primitive::u32, + fields: runtime_types::pallet_identity::types::BitFlags< + runtime_types::pallet_identity::types::IdentityField, >, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Bounties", - "Bounties", - vec![::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - )], + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Identity", + "set_fields", + types::SetFields { index, fields }, [ - 111u8, 149u8, 33u8, 54u8, 172u8, 143u8, 41u8, 231u8, 184u8, 255u8, - 238u8, 206u8, 87u8, 142u8, 84u8, 10u8, 236u8, 141u8, 190u8, 193u8, - 72u8, 170u8, 19u8, 110u8, 135u8, 136u8, 220u8, 11u8, 99u8, 126u8, - 225u8, 208u8, + 50u8, 196u8, 179u8, 71u8, 66u8, 65u8, 235u8, 7u8, 51u8, 14u8, 81u8, + 173u8, 201u8, 58u8, 6u8, 151u8, 174u8, 245u8, 102u8, 184u8, 28u8, 84u8, + 125u8, 93u8, 126u8, 134u8, 92u8, 203u8, 200u8, 129u8, 240u8, 252u8, ], ) } - #[doc = " Bounties that have been made."] - pub fn bounties_root( + #[doc = "Provide a judgement for an account's identity."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must be the account"] + #[doc = "of the registrar whose index is `reg_index`."] + #[doc = ""] + #[doc = "- `reg_index`: the index of the registrar whose judgement is being made."] + #[doc = "- `target`: the account whose identity the judgement is upon. This must be an account"] + #[doc = " with a registered identity."] + #[doc = "- `judgement`: the judgement of the registrar of index `reg_index` about `target`."] + #[doc = "- `identity`: The hash of the [`IdentityInfo`] for that the judgement is provided."] + #[doc = ""] + #[doc = "Emits `JudgementGiven` if successful."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(R + X)`."] + #[doc = " - where `R` registrar-count (governance-bounded)."] + #[doc = " - where `X` additional-field-count (deposit-bounded and code-bounded)."] + pub fn provide_judgement( &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_bounties::Bounty< - ::subxt::utils::AccountId32, + reg_index: ::core::primitive::u32, + target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + judgement: runtime_types::pallet_identity::types::Judgement< ::core::primitive::u128, - ::core::primitive::u32, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Bounties", - "Bounties", - Vec::new(), - [ - 111u8, 149u8, 33u8, 54u8, 172u8, 143u8, 41u8, 231u8, 184u8, 255u8, - 238u8, 206u8, 87u8, 142u8, 84u8, 10u8, 236u8, 141u8, 190u8, 193u8, - 72u8, 170u8, 19u8, 110u8, 135u8, 136u8, 220u8, 11u8, 99u8, 126u8, - 225u8, 208u8, - ], - ) - } - #[doc = " The description of each bounty."] - pub fn bounty_descriptions( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::sp_core::bounded::bounded_vec::BoundedVec<::core::primitive::u8>, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Bounties", - "BountyDescriptions", - vec![::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - )], - [ - 252u8, 0u8, 9u8, 225u8, 13u8, 135u8, 7u8, 121u8, 154u8, 155u8, 116u8, - 83u8, 160u8, 37u8, 72u8, 11u8, 72u8, 0u8, 248u8, 73u8, 158u8, 84u8, - 125u8, 221u8, 176u8, 231u8, 100u8, 239u8, 111u8, 22u8, 29u8, 13u8, - ], - ) - } - #[doc = " The description of each bounty."] - pub fn bounty_descriptions_root( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::sp_core::bounded::bounded_vec::BoundedVec<::core::primitive::u8>, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Bounties", - "BountyDescriptions", - Vec::new(), - [ - 252u8, 0u8, 9u8, 225u8, 13u8, 135u8, 7u8, 121u8, 154u8, 155u8, 116u8, - 83u8, 160u8, 37u8, 72u8, 11u8, 72u8, 0u8, 248u8, 73u8, 158u8, 84u8, - 125u8, 221u8, 176u8, 231u8, 100u8, 239u8, 111u8, 22u8, 29u8, 13u8, - ], - ) - } - #[doc = " Bounty indices that have been approved but not yet funded."] - pub fn bounty_approvals( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u32, >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Bounties", - "BountyApprovals", - vec![], - [ - 64u8, 93u8, 54u8, 94u8, 122u8, 9u8, 246u8, 86u8, 234u8, 30u8, 125u8, - 132u8, 49u8, 128u8, 1u8, 219u8, 241u8, 13u8, 217u8, 186u8, 48u8, 21u8, - 5u8, 227u8, 71u8, 157u8, 128u8, 226u8, 214u8, 49u8, 249u8, 183u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " The amount held on deposit for placing a bounty proposal."] - pub fn bounty_deposit_base( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::Address::new_static( - "Bounties", - "BountyDepositBase", - [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, - 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, - 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, - ], - ) - } - #[doc = " The delay period for which a bounty beneficiary need to wait before claim the payout."] - pub fn bounty_deposit_payout_delay( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "Bounties", - "BountyDepositPayoutDelay", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, - ], - ) - } - #[doc = " Bounty duration in blocks."] - pub fn bounty_update_period( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "Bounties", - "BountyUpdatePeriod", + identity: ::subxt::utils::H256, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Identity", + "provide_judgement", + types::ProvideJudgement { + reg_index, + target, + judgement, + identity, + }, [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, + 147u8, 66u8, 29u8, 90u8, 149u8, 65u8, 161u8, 115u8, 12u8, 254u8, 188u8, + 248u8, 165u8, 115u8, 191u8, 2u8, 167u8, 223u8, 199u8, 169u8, 203u8, + 64u8, 101u8, 217u8, 73u8, 185u8, 93u8, 109u8, 22u8, 184u8, 146u8, 73u8, ], ) } - #[doc = " The curator deposit is calculated as a percentage of the curator fee."] + #[doc = "Remove an account's identity and sub-account information and slash the deposits."] #[doc = ""] - #[doc = " This deposit has optional upper and lower bounds with `CuratorDepositMax` and"] - #[doc = " `CuratorDepositMin`."] - pub fn curator_deposit_multiplier( - &self, - ) -> ::subxt::constants::Address - { - ::subxt::constants::Address::new_static( - "Bounties", - "CuratorDepositMultiplier", - [ - 225u8, 236u8, 95u8, 157u8, 90u8, 94u8, 106u8, 192u8, 254u8, 19u8, 87u8, - 80u8, 16u8, 62u8, 42u8, 204u8, 136u8, 106u8, 225u8, 53u8, 212u8, 52u8, - 177u8, 79u8, 4u8, 116u8, 201u8, 104u8, 222u8, 75u8, 86u8, 227u8, - ], - ) - } - #[doc = " Maximum amount of funds that should be placed in a deposit for making a proposal."] - pub fn curator_deposit_max( + #[doc = "Payment: Reserved balances from `set_subs` and `set_identity` are slashed and handled by"] + #[doc = "`Slash`. Verification request deposits are not returned; they should be cancelled"] + #[doc = "manually using `cancel_request`."] + #[doc = ""] + #[doc = "The dispatch origin for this call must match `T::ForceOrigin`."] + #[doc = ""] + #[doc = "- `target`: the account whose identity the judgement is upon. This must be an account"] + #[doc = " with a registered identity."] + #[doc = ""] + #[doc = "Emits `IdentityKilled` if successful."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(R + S + X)`"] + #[doc = " - where `R` registrar-count (governance-bounded)."] + #[doc = " - where `S` subs-count (hard- and deposit-bounded)."] + #[doc = " - where `X` additional-field-count (deposit-bounded and code-bounded)."] + pub fn kill_identity( &self, - ) -> ::subxt::constants::Address<::core::option::Option<::core::primitive::u128>> - { - ::subxt::constants::Address::new_static( - "Bounties", - "CuratorDepositMax", + target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Identity", + "kill_identity", + types::KillIdentity { target }, [ - 84u8, 154u8, 218u8, 83u8, 84u8, 189u8, 32u8, 20u8, 120u8, 194u8, 88u8, - 205u8, 109u8, 216u8, 114u8, 193u8, 120u8, 198u8, 154u8, 237u8, 134u8, - 204u8, 102u8, 247u8, 52u8, 103u8, 231u8, 43u8, 243u8, 122u8, 60u8, - 216u8, + 76u8, 13u8, 158u8, 219u8, 221u8, 0u8, 151u8, 241u8, 137u8, 136u8, + 179u8, 194u8, 188u8, 230u8, 56u8, 16u8, 254u8, 28u8, 127u8, 216u8, + 205u8, 117u8, 224u8, 121u8, 240u8, 231u8, 126u8, 181u8, 230u8, 68u8, + 13u8, 174u8, ], ) } - #[doc = " Minimum amount of funds that should be placed in a deposit for making a proposal."] - pub fn curator_deposit_min( + #[doc = "Add the given account to the sender's subs."] + #[doc = ""] + #[doc = "Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated"] + #[doc = "to the sender."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a registered"] + #[doc = "sub identity of `sub`."] + pub fn add_sub( &self, - ) -> ::subxt::constants::Address<::core::option::Option<::core::primitive::u128>> - { - ::subxt::constants::Address::new_static( - "Bounties", - "CuratorDepositMin", + sub: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + data: runtime_types::pallet_identity::types::Data, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Identity", + "add_sub", + types::AddSub { sub, data }, [ - 84u8, 154u8, 218u8, 83u8, 84u8, 189u8, 32u8, 20u8, 120u8, 194u8, 88u8, - 205u8, 109u8, 216u8, 114u8, 193u8, 120u8, 198u8, 154u8, 237u8, 134u8, - 204u8, 102u8, 247u8, 52u8, 103u8, 231u8, 43u8, 243u8, 122u8, 60u8, - 216u8, + 122u8, 218u8, 25u8, 93u8, 33u8, 176u8, 191u8, 254u8, 223u8, 147u8, + 100u8, 135u8, 86u8, 71u8, 47u8, 163u8, 105u8, 222u8, 162u8, 173u8, + 207u8, 182u8, 130u8, 128u8, 214u8, 242u8, 101u8, 250u8, 242u8, 24u8, + 17u8, 84u8, ], ) } - #[doc = " Minimum value for a bounty."] - pub fn bounty_value_minimum( + #[doc = "Alter the associated name of the given sub-account."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a registered"] + #[doc = "sub identity of `sub`."] + pub fn rename_sub( &self, - ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::Address::new_static( - "Bounties", - "BountyValueMinimum", + sub: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + data: runtime_types::pallet_identity::types::Data, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Identity", + "rename_sub", + types::RenameSub { sub, data }, [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, - 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, - 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, + 166u8, 167u8, 49u8, 114u8, 199u8, 168u8, 187u8, 221u8, 100u8, 85u8, + 147u8, 211u8, 157u8, 31u8, 109u8, 135u8, 194u8, 135u8, 15u8, 89u8, + 59u8, 57u8, 252u8, 163u8, 9u8, 138u8, 216u8, 189u8, 177u8, 42u8, 96u8, + 34u8, ], ) } - #[doc = " The amount held on deposit per byte within the tip report reason or bounty description."] - pub fn data_deposit_per_byte( + #[doc = "Remove the given account from the sender's subs."] + #[doc = ""] + #[doc = "Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated"] + #[doc = "to the sender."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a registered"] + #[doc = "sub identity of `sub`."] + pub fn remove_sub( &self, - ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::Address::new_static( - "Bounties", - "DataDepositPerByte", + sub: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Identity", + "remove_sub", + types::RemoveSub { sub }, [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, - 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, - 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, + 106u8, 223u8, 210u8, 67u8, 54u8, 11u8, 144u8, 222u8, 42u8, 46u8, 157u8, + 33u8, 13u8, 245u8, 166u8, 195u8, 227u8, 81u8, 224u8, 149u8, 154u8, + 158u8, 187u8, 203u8, 215u8, 91u8, 43u8, 105u8, 69u8, 213u8, 141u8, + 124u8, ], ) } - #[doc = " Maximum acceptable reason length."] + #[doc = "Remove the sender as a sub-account."] #[doc = ""] - #[doc = " Benchmarks depend on this value, be sure to update weights file when changing this value"] - pub fn maximum_reason_length( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "Bounties", - "MaximumReasonLength", + #[doc = "Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated"] + #[doc = "to the sender (*not* the original depositor)."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a registered"] + #[doc = "super-identity."] + #[doc = ""] + #[doc = "NOTE: This should not normally be used, but is provided in the case that the non-"] + #[doc = "controller of an account is maliciously registered as a sub-account."] + pub fn quit_sub(&self) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Identity", + "quit_sub", + types::QuitSub {}, [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, + 62u8, 57u8, 73u8, 72u8, 119u8, 216u8, 250u8, 155u8, 57u8, 169u8, 157u8, + 44u8, 87u8, 51u8, 63u8, 231u8, 77u8, 7u8, 0u8, 119u8, 244u8, 42u8, + 179u8, 51u8, 254u8, 240u8, 55u8, 25u8, 142u8, 38u8, 87u8, 44u8, ], ) } } } - } - pub mod child_bounties { - use super::root_mod; - use super::runtime_types; - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub type Error = runtime_types::pallet_child_bounties::pallet::Error; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::root_mod; + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub type Event = runtime_types::pallet_identity::pallet::Event; + pub mod events { use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -19082,12 +18681,13 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AddChildBounty { - #[codec(compact)] - pub parent_bounty_id: ::core::primitive::u32, - #[codec(compact)] - pub value: ::core::primitive::u128, - pub description: ::std::vec::Vec<::core::primitive::u8>, + #[doc = "A name was set or reset (which will remove all judgements)."] + pub struct IdentitySet { + pub who: ::subxt::utils::AccountId32, + } + impl ::subxt::events::StaticEvent for IdentitySet { + const PALLET: &'static str = "Identity"; + const EVENT: &'static str = "IdentitySet"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -19099,14 +18699,14 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ProposeCurator { - #[codec(compact)] - pub parent_bounty_id: ::core::primitive::u32, - #[codec(compact)] - pub child_bounty_id: ::core::primitive::u32, - pub curator: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - #[codec(compact)] - pub fee: ::core::primitive::u128, + #[doc = "A name was cleared, and the given balance returned."] + pub struct IdentityCleared { + pub who: ::subxt::utils::AccountId32, + pub deposit: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for IdentityCleared { + const PALLET: &'static str = "Identity"; + const EVENT: &'static str = "IdentityCleared"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -19118,11 +18718,14 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AcceptCurator { - #[codec(compact)] - pub parent_bounty_id: ::core::primitive::u32, - #[codec(compact)] - pub child_bounty_id: ::core::primitive::u32, + #[doc = "A name was removed and the given balance slashed."] + pub struct IdentityKilled { + pub who: ::subxt::utils::AccountId32, + pub deposit: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for IdentityKilled { + const PALLET: &'static str = "Identity"; + const EVENT: &'static str = "IdentityKilled"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -19134,11 +18737,14 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct UnassignCurator { - #[codec(compact)] - pub parent_bounty_id: ::core::primitive::u32, - #[codec(compact)] - pub child_bounty_id: ::core::primitive::u32, + #[doc = "A judgement was asked from a registrar."] + pub struct JudgementRequested { + pub who: ::subxt::utils::AccountId32, + pub registrar_index: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for JudgementRequested { + const PALLET: &'static str = "Identity"; + const EVENT: &'static str = "JudgementRequested"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -19150,12 +18756,14 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AwardChildBounty { - #[codec(compact)] - pub parent_bounty_id: ::core::primitive::u32, - #[codec(compact)] - pub child_bounty_id: ::core::primitive::u32, - pub beneficiary: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + #[doc = "A judgement request was retracted."] + pub struct JudgementUnrequested { + pub who: ::subxt::utils::AccountId32, + pub registrar_index: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for JudgementUnrequested { + const PALLET: &'static str = "Identity"; + const EVENT: &'static str = "JudgementUnrequested"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -19167,13 +18775,17 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ClaimChildBounty { - #[codec(compact)] - pub parent_bounty_id: ::core::primitive::u32, - #[codec(compact)] - pub child_bounty_id: ::core::primitive::u32, + #[doc = "A judgement was given by a registrar."] + pub struct JudgementGiven { + pub target: ::subxt::utils::AccountId32, + pub registrar_index: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for JudgementGiven { + const PALLET: &'static str = "Identity"; + const EVENT: &'static str = "JudgementGiven"; } #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -19183,325 +18795,13 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CloseChildBounty { - #[codec(compact)] - pub parent_bounty_id: ::core::primitive::u32, - #[codec(compact)] - pub child_bounty_id: ::core::primitive::u32, + #[doc = "A registrar was added."] + pub struct RegistrarAdded { + pub registrar_index: ::core::primitive::u32, } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Add a new child-bounty."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be the curator of parent"] - #[doc = "bounty and the parent bounty must be in \"active\" state."] - #[doc = ""] - #[doc = "Child-bounty gets added successfully & fund gets transferred from"] - #[doc = "parent bounty to child-bounty account, if parent bounty has enough"] - #[doc = "funds, else the call fails."] - #[doc = ""] - #[doc = "Upper bound to maximum number of active child bounties that can be"] - #[doc = "added are managed via runtime trait config"] - #[doc = "[`Config::MaxActiveChildBountyCount`]."] - #[doc = ""] - #[doc = "If the call is success, the status of child-bounty is updated to"] - #[doc = "\"Added\"."] - #[doc = ""] - #[doc = "- `parent_bounty_id`: Index of parent bounty for which child-bounty is being added."] - #[doc = "- `value`: Value for executing the proposal."] - #[doc = "- `description`: Text description for the child-bounty."] - pub fn add_child_bounty( - &self, - parent_bounty_id: ::core::primitive::u32, - value: ::core::primitive::u128, - description: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "ChildBounties", - "add_child_bounty", - AddChildBounty { - parent_bounty_id, - value, - description, - }, - [ - 210u8, 156u8, 242u8, 121u8, 28u8, 214u8, 212u8, 203u8, 46u8, 45u8, - 110u8, 25u8, 33u8, 138u8, 136u8, 71u8, 23u8, 102u8, 203u8, 122u8, 77u8, - 162u8, 112u8, 133u8, 43u8, 73u8, 201u8, 176u8, 102u8, 68u8, 188u8, 8u8, - ], - ) - } - #[doc = "Propose curator for funded child-bounty."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be curator of parent bounty."] - #[doc = ""] - #[doc = "Parent bounty must be in active state, for this child-bounty call to"] - #[doc = "work."] - #[doc = ""] - #[doc = "Child-bounty must be in \"Added\" state, for processing the call. And"] - #[doc = "state of child-bounty is moved to \"CuratorProposed\" on successful"] - #[doc = "call completion."] - #[doc = ""] - #[doc = "- `parent_bounty_id`: Index of parent bounty."] - #[doc = "- `child_bounty_id`: Index of child bounty."] - #[doc = "- `curator`: Address of child-bounty curator."] - #[doc = "- `fee`: payment fee to child-bounty curator for execution."] - pub fn propose_curator( - &self, - parent_bounty_id: ::core::primitive::u32, - child_bounty_id: ::core::primitive::u32, - curator: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - fee: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "ChildBounties", - "propose_curator", - ProposeCurator { - parent_bounty_id, - child_bounty_id, - curator, - fee, - }, - [ - 37u8, 101u8, 96u8, 75u8, 254u8, 212u8, 42u8, 140u8, 72u8, 107u8, 157u8, - 110u8, 147u8, 236u8, 17u8, 138u8, 161u8, 153u8, 119u8, 177u8, 225u8, - 22u8, 83u8, 5u8, 123u8, 38u8, 30u8, 240u8, 134u8, 208u8, 183u8, 247u8, - ], - ) - } - #[doc = "Accept the curator role for the child-bounty."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be the curator of this"] - #[doc = "child-bounty."] - #[doc = ""] - #[doc = "A deposit will be reserved from the curator and refund upon"] - #[doc = "successful payout or cancellation."] - #[doc = ""] - #[doc = "Fee for curator is deducted from curator fee of parent bounty."] - #[doc = ""] - #[doc = "Parent bounty must be in active state, for this child-bounty call to"] - #[doc = "work."] - #[doc = ""] - #[doc = "Child-bounty must be in \"CuratorProposed\" state, for processing the"] - #[doc = "call. And state of child-bounty is moved to \"Active\" on successful"] - #[doc = "call completion."] - #[doc = ""] - #[doc = "- `parent_bounty_id`: Index of parent bounty."] - #[doc = "- `child_bounty_id`: Index of child bounty."] - pub fn accept_curator( - &self, - parent_bounty_id: ::core::primitive::u32, - child_bounty_id: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "ChildBounties", - "accept_curator", - AcceptCurator { - parent_bounty_id, - child_bounty_id, - }, - [ - 112u8, 175u8, 238u8, 54u8, 132u8, 20u8, 206u8, 59u8, 220u8, 228u8, - 207u8, 222u8, 132u8, 240u8, 188u8, 0u8, 210u8, 225u8, 234u8, 142u8, - 232u8, 53u8, 64u8, 89u8, 220u8, 29u8, 28u8, 123u8, 125u8, 207u8, 10u8, - 52u8, - ], - ) - } - #[doc = "Unassign curator from a child-bounty."] - #[doc = ""] - #[doc = "The dispatch origin for this call can be either `RejectOrigin`, or"] - #[doc = "the curator of the parent bounty, or any signed origin."] - #[doc = ""] - #[doc = "For the origin other than T::RejectOrigin and the child-bounty"] - #[doc = "curator, parent bounty must be in active state, for this call to"] - #[doc = "work. We allow child-bounty curator and T::RejectOrigin to execute"] - #[doc = "this call irrespective of the parent bounty state."] - #[doc = ""] - #[doc = "If this function is called by the `RejectOrigin` or the"] - #[doc = "parent bounty curator, we assume that the child-bounty curator is"] - #[doc = "malicious or inactive. As a result, child-bounty curator deposit is"] - #[doc = "slashed."] - #[doc = ""] - #[doc = "If the origin is the child-bounty curator, we take this as a sign"] - #[doc = "that they are unable to do their job, and are willingly giving up."] - #[doc = "We could slash the deposit, but for now we allow them to unreserve"] - #[doc = "their deposit and exit without issue. (We may want to change this if"] - #[doc = "it is abused.)"] - #[doc = ""] - #[doc = "Finally, the origin can be anyone iff the child-bounty curator is"] - #[doc = "\"inactive\". Expiry update due of parent bounty is used to estimate"] - #[doc = "inactive state of child-bounty curator."] - #[doc = ""] - #[doc = "This allows anyone in the community to call out that a child-bounty"] - #[doc = "curator is not doing their due diligence, and we should pick a new"] - #[doc = "one. In this case the child-bounty curator deposit is slashed."] - #[doc = ""] - #[doc = "State of child-bounty is moved to Added state on successful call"] - #[doc = "completion."] - #[doc = ""] - #[doc = "- `parent_bounty_id`: Index of parent bounty."] - #[doc = "- `child_bounty_id`: Index of child bounty."] - pub fn unassign_curator( - &self, - parent_bounty_id: ::core::primitive::u32, - child_bounty_id: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "ChildBounties", - "unassign_curator", - UnassignCurator { - parent_bounty_id, - child_bounty_id, - }, - [ - 228u8, 189u8, 46u8, 75u8, 121u8, 161u8, 150u8, 87u8, 207u8, 86u8, - 192u8, 50u8, 52u8, 61u8, 49u8, 88u8, 178u8, 182u8, 89u8, 72u8, 203u8, - 45u8, 41u8, 26u8, 149u8, 114u8, 154u8, 169u8, 118u8, 128u8, 13u8, - 211u8, - ], - ) - } - #[doc = "Award child-bounty to a beneficiary."] - #[doc = ""] - #[doc = "The beneficiary will be able to claim the funds after a delay."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be the parent curator or"] - #[doc = "curator of this child-bounty."] - #[doc = ""] - #[doc = "Parent bounty must be in active state, for this child-bounty call to"] - #[doc = "work."] - #[doc = ""] - #[doc = "Child-bounty must be in active state, for processing the call. And"] - #[doc = "state of child-bounty is moved to \"PendingPayout\" on successful call"] - #[doc = "completion."] - #[doc = ""] - #[doc = "- `parent_bounty_id`: Index of parent bounty."] - #[doc = "- `child_bounty_id`: Index of child bounty."] - #[doc = "- `beneficiary`: Beneficiary account."] - pub fn award_child_bounty( - &self, - parent_bounty_id: ::core::primitive::u32, - child_bounty_id: ::core::primitive::u32, - beneficiary: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "ChildBounties", - "award_child_bounty", - AwardChildBounty { - parent_bounty_id, - child_bounty_id, - beneficiary, - }, - [ - 231u8, 185u8, 73u8, 232u8, 92u8, 116u8, 204u8, 165u8, 216u8, 194u8, - 151u8, 21u8, 127u8, 239u8, 78u8, 45u8, 27u8, 252u8, 119u8, 23u8, 71u8, - 140u8, 137u8, 209u8, 189u8, 128u8, 126u8, 247u8, 13u8, 42u8, 68u8, - 134u8, - ], - ) - } - #[doc = "Claim the payout from an awarded child-bounty after payout delay."] - #[doc = ""] - #[doc = "The dispatch origin for this call may be any signed origin."] - #[doc = ""] - #[doc = "Call works independent of parent bounty state, No need for parent"] - #[doc = "bounty to be in active state."] - #[doc = ""] - #[doc = "The Beneficiary is paid out with agreed bounty value. Curator fee is"] - #[doc = "paid & curator deposit is unreserved."] - #[doc = ""] - #[doc = "Child-bounty must be in \"PendingPayout\" state, for processing the"] - #[doc = "call. And instance of child-bounty is removed from the state on"] - #[doc = "successful call completion."] - #[doc = ""] - #[doc = "- `parent_bounty_id`: Index of parent bounty."] - #[doc = "- `child_bounty_id`: Index of child bounty."] - pub fn claim_child_bounty( - &self, - parent_bounty_id: ::core::primitive::u32, - child_bounty_id: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "ChildBounties", - "claim_child_bounty", - ClaimChildBounty { - parent_bounty_id, - child_bounty_id, - }, - [ - 134u8, 243u8, 151u8, 228u8, 38u8, 174u8, 96u8, 140u8, 104u8, 124u8, - 166u8, 206u8, 126u8, 211u8, 17u8, 100u8, 172u8, 5u8, 234u8, 171u8, - 125u8, 2u8, 191u8, 163u8, 72u8, 29u8, 163u8, 107u8, 65u8, 92u8, 41u8, - 45u8, - ], - ) - } - #[doc = "Cancel a proposed or active child-bounty. Child-bounty account funds"] - #[doc = "are transferred to parent bounty account. The child-bounty curator"] - #[doc = "deposit may be unreserved if possible."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be either parent curator or"] - #[doc = "`T::RejectOrigin`."] - #[doc = ""] - #[doc = "If the state of child-bounty is `Active`, curator deposit is"] - #[doc = "unreserved."] - #[doc = ""] - #[doc = "If the state of child-bounty is `PendingPayout`, call fails &"] - #[doc = "returns `PendingPayout` error."] - #[doc = ""] - #[doc = "For the origin other than T::RejectOrigin, parent bounty must be in"] - #[doc = "active state, for this child-bounty call to work. For origin"] - #[doc = "T::RejectOrigin execution is forced."] - #[doc = ""] - #[doc = "Instance of child-bounty is removed from the state on successful"] - #[doc = "call completion."] - #[doc = ""] - #[doc = "- `parent_bounty_id`: Index of parent bounty."] - #[doc = "- `child_bounty_id`: Index of child bounty."] - pub fn close_child_bounty( - &self, - parent_bounty_id: ::core::primitive::u32, - child_bounty_id: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "ChildBounties", - "close_child_bounty", - CloseChildBounty { - parent_bounty_id, - child_bounty_id, - }, - [ - 40u8, 0u8, 235u8, 75u8, 36u8, 196u8, 29u8, 26u8, 30u8, 172u8, 240u8, - 44u8, 129u8, 243u8, 55u8, 211u8, 96u8, 159u8, 72u8, 96u8, 142u8, 68u8, - 41u8, 238u8, 157u8, 167u8, 90u8, 141u8, 213u8, 249u8, 222u8, 22u8, - ], - ) - } - } - } - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::pallet_child_bounties::pallet::Event; - pub mod events { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A child-bounty is added."] - pub struct Added { - pub index: ::core::primitive::u32, - pub child_index: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for Added { - const PALLET: &'static str = "ChildBounties"; - const EVENT: &'static str = "Added"; + impl ::subxt::events::StaticEvent for RegistrarAdded { + const PALLET: &'static str = "Identity"; + const EVENT: &'static str = "RegistrarAdded"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -19513,15 +18813,15 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A child-bounty is awarded to a beneficiary."] - pub struct Awarded { - pub index: ::core::primitive::u32, - pub child_index: ::core::primitive::u32, - pub beneficiary: ::subxt::utils::AccountId32, + #[doc = "A sub-identity was added to an identity and the deposit paid."] + pub struct SubIdentityAdded { + pub sub: ::subxt::utils::AccountId32, + pub main: ::subxt::utils::AccountId32, + pub deposit: ::core::primitive::u128, } - impl ::subxt::events::StaticEvent for Awarded { - const PALLET: &'static str = "ChildBounties"; - const EVENT: &'static str = "Awarded"; + impl ::subxt::events::StaticEvent for SubIdentityAdded { + const PALLET: &'static str = "Identity"; + const EVENT: &'static str = "SubIdentityAdded"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -19533,16 +18833,15 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A child-bounty is claimed by beneficiary."] - pub struct Claimed { - pub index: ::core::primitive::u32, - pub child_index: ::core::primitive::u32, - pub payout: ::core::primitive::u128, - pub beneficiary: ::subxt::utils::AccountId32, + #[doc = "A sub-identity was removed from an identity and the deposit freed."] + pub struct SubIdentityRemoved { + pub sub: ::subxt::utils::AccountId32, + pub main: ::subxt::utils::AccountId32, + pub deposit: ::core::primitive::u128, } - impl ::subxt::events::StaticEvent for Claimed { - const PALLET: &'static str = "ChildBounties"; - const EVENT: &'static str = "Claimed"; + impl ::subxt::events::StaticEvent for SubIdentityRemoved { + const PALLET: &'static str = "Identity"; + const EVENT: &'static str = "SubIdentityRemoved"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -19554,236 +18853,219 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A child-bounty is cancelled."] - pub struct Canceled { - pub index: ::core::primitive::u32, - pub child_index: ::core::primitive::u32, + #[doc = "A sub-identity was cleared, and the given deposit repatriated from the"] + #[doc = "main identity account to the sub-identity account."] + pub struct SubIdentityRevoked { + pub sub: ::subxt::utils::AccountId32, + pub main: ::subxt::utils::AccountId32, + pub deposit: ::core::primitive::u128, } - impl ::subxt::events::StaticEvent for Canceled { - const PALLET: &'static str = "ChildBounties"; - const EVENT: &'static str = "Canceled"; + impl ::subxt::events::StaticEvent for SubIdentityRevoked { + const PALLET: &'static str = "Identity"; + const EVENT: &'static str = "SubIdentityRevoked"; } } pub mod storage { use super::runtime_types; pub struct StorageApi; impl StorageApi { - #[doc = " Number of total child bounties."] - pub fn child_bounty_count( + #[doc = " Information that is pertinent to identify the entity behind an account."] + #[doc = ""] + #[doc = " TWOX-NOTE: OK ― `AccountId` is a secure hash."] + pub fn identity_of( &self, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - ::subxt::storage::address::Yes, + runtime_types::pallet_identity::types::Registration<::core::primitive::u128>, ::subxt::storage::address::Yes, (), - > { - ::subxt::storage::address::Address::new_static( - "ChildBounties", - "ChildBountyCount", - vec![], - [ - 46u8, 10u8, 183u8, 160u8, 98u8, 215u8, 39u8, 253u8, 81u8, 94u8, 114u8, - 147u8, 115u8, 162u8, 33u8, 117u8, 160u8, 214u8, 167u8, 7u8, 109u8, - 143u8, 158u8, 1u8, 200u8, 205u8, 17u8, 93u8, 89u8, 26u8, 30u8, 95u8, - ], - ) - } - #[doc = " Number of child bounties per parent bounty."] - #[doc = " Map of parent bounty index to number of child bounties."] - pub fn parent_child_bounties( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( - "ChildBounties", - "ParentChildBounties", + "Identity", + "IdentityOf", vec![::subxt::storage::address::make_static_storage_map_key( _0.borrow(), )], [ - 127u8, 161u8, 181u8, 79u8, 235u8, 196u8, 252u8, 162u8, 39u8, 15u8, - 251u8, 49u8, 125u8, 80u8, 101u8, 24u8, 234u8, 88u8, 212u8, 126u8, 63u8, - 63u8, 19u8, 75u8, 137u8, 125u8, 38u8, 250u8, 77u8, 49u8, 76u8, 188u8, + 193u8, 195u8, 180u8, 188u8, 129u8, 250u8, 180u8, 219u8, 22u8, 95u8, + 175u8, 170u8, 143u8, 188u8, 80u8, 124u8, 234u8, 228u8, 245u8, 39u8, + 72u8, 153u8, 107u8, 199u8, 23u8, 75u8, 47u8, 247u8, 104u8, 208u8, + 171u8, 82u8, ], ) } - #[doc = " Number of child bounties per parent bounty."] - #[doc = " Map of parent bounty index to number of child bounties."] - pub fn parent_child_bounties_root( + #[doc = " Information that is pertinent to identify the entity behind an account."] + #[doc = ""] + #[doc = " TWOX-NOTE: OK ― `AccountId` is a secure hash."] + pub fn identity_of_root( &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, + runtime_types::pallet_identity::types::Registration<::core::primitive::u128>, + (), (), - ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( - "ChildBounties", - "ParentChildBounties", + "Identity", + "IdentityOf", Vec::new(), [ - 127u8, 161u8, 181u8, 79u8, 235u8, 196u8, 252u8, 162u8, 39u8, 15u8, - 251u8, 49u8, 125u8, 80u8, 101u8, 24u8, 234u8, 88u8, 212u8, 126u8, 63u8, - 63u8, 19u8, 75u8, 137u8, 125u8, 38u8, 250u8, 77u8, 49u8, 76u8, 188u8, + 193u8, 195u8, 180u8, 188u8, 129u8, 250u8, 180u8, 219u8, 22u8, 95u8, + 175u8, 170u8, 143u8, 188u8, 80u8, 124u8, 234u8, 228u8, 245u8, 39u8, + 72u8, 153u8, 107u8, 199u8, 23u8, 75u8, 47u8, 247u8, 104u8, 208u8, + 171u8, 82u8, ], ) } - #[doc = " Child bounties that have been added."] - pub fn child_bounties( + #[doc = " The super-identity of an alternative \"sub\" identity together with its name, within that"] + #[doc = " context. If the account is not some other account's sub-identity, then just `None`."] + pub fn super_of( &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - _1: impl ::std::borrow::Borrow<::core::primitive::u32>, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_child_bounties::ChildBounty< + ( ::subxt::utils::AccountId32, - ::core::primitive::u128, - ::core::primitive::u32, - >, + runtime_types::pallet_identity::types::Data, + ), ::subxt::storage::address::Yes, (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( - "ChildBounties", - "ChildBounties", - vec![ - ::subxt::storage::address::make_static_storage_map_key(_0.borrow()), - ::subxt::storage::address::make_static_storage_map_key(_1.borrow()), - ], + "Identity", + "SuperOf", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], [ - 66u8, 132u8, 251u8, 223u8, 216u8, 52u8, 162u8, 150u8, 229u8, 239u8, - 219u8, 182u8, 211u8, 228u8, 181u8, 46u8, 243u8, 151u8, 111u8, 235u8, - 105u8, 40u8, 39u8, 10u8, 245u8, 113u8, 78u8, 116u8, 219u8, 186u8, - 165u8, 91u8, + 170u8, 249u8, 112u8, 249u8, 75u8, 176u8, 21u8, 29u8, 152u8, 149u8, + 69u8, 113u8, 20u8, 92u8, 113u8, 130u8, 135u8, 62u8, 18u8, 204u8, 166u8, + 193u8, 133u8, 167u8, 248u8, 117u8, 80u8, 137u8, 158u8, 111u8, 100u8, + 137u8, ], ) } - #[doc = " Child bounties that have been added."] - pub fn child_bounties_root( + #[doc = " The super-identity of an alternative \"sub\" identity together with its name, within that"] + #[doc = " context. If the account is not some other account's sub-identity, then just `None`."] + pub fn super_of_root( &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_child_bounties::ChildBounty< + ( ::subxt::utils::AccountId32, - ::core::primitive::u128, - ::core::primitive::u32, - >, + runtime_types::pallet_identity::types::Data, + ), (), (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( - "ChildBounties", - "ChildBounties", + "Identity", + "SuperOf", Vec::new(), [ - 66u8, 132u8, 251u8, 223u8, 216u8, 52u8, 162u8, 150u8, 229u8, 239u8, - 219u8, 182u8, 211u8, 228u8, 181u8, 46u8, 243u8, 151u8, 111u8, 235u8, - 105u8, 40u8, 39u8, 10u8, 245u8, 113u8, 78u8, 116u8, 219u8, 186u8, - 165u8, 91u8, + 170u8, 249u8, 112u8, 249u8, 75u8, 176u8, 21u8, 29u8, 152u8, 149u8, + 69u8, 113u8, 20u8, 92u8, 113u8, 130u8, 135u8, 62u8, 18u8, 204u8, 166u8, + 193u8, 133u8, 167u8, 248u8, 117u8, 80u8, 137u8, 158u8, 111u8, 100u8, + 137u8, ], ) } - #[doc = " The description of each child-bounty."] - pub fn child_bounty_descriptions( + #[doc = " Alternative \"sub\" identities of this account."] + #[doc = ""] + #[doc = " The first item is the deposit, the second is a vector of the accounts."] + #[doc = ""] + #[doc = " TWOX-NOTE: OK ― `AccountId` is a secure hash."] + pub fn subs_of( &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::sp_core::bounded::bounded_vec::BoundedVec<::core::primitive::u8>, + ( + ::core::primitive::u128, + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::subxt::utils::AccountId32, + >, + ), + ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, - (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( - "ChildBounties", - "ChildBountyDescriptions", + "Identity", + "SubsOf", vec![::subxt::storage::address::make_static_storage_map_key( _0.borrow(), )], [ - 193u8, 200u8, 40u8, 30u8, 14u8, 71u8, 90u8, 42u8, 58u8, 253u8, 225u8, - 158u8, 172u8, 10u8, 45u8, 238u8, 36u8, 144u8, 184u8, 153u8, 11u8, - 157u8, 125u8, 220u8, 175u8, 31u8, 28u8, 93u8, 207u8, 212u8, 141u8, - 74u8, + 128u8, 15u8, 175u8, 155u8, 216u8, 225u8, 200u8, 169u8, 215u8, 206u8, + 110u8, 22u8, 204u8, 89u8, 212u8, 210u8, 159u8, 169u8, 53u8, 7u8, 44u8, + 164u8, 91u8, 151u8, 7u8, 227u8, 38u8, 230u8, 175u8, 84u8, 6u8, 4u8, ], ) } - #[doc = " The description of each child-bounty."] - pub fn child_bounty_descriptions_root( + #[doc = " Alternative \"sub\" identities of this account."] + #[doc = ""] + #[doc = " The first item is the deposit, the second is a vector of the accounts."] + #[doc = ""] + #[doc = " TWOX-NOTE: OK ― `AccountId` is a secure hash."] + pub fn subs_of_root( &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::sp_core::bounded::bounded_vec::BoundedVec<::core::primitive::u8>, - (), + ( + ::core::primitive::u128, + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::subxt::utils::AccountId32, + >, + ), (), ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( - "ChildBounties", - "ChildBountyDescriptions", + "Identity", + "SubsOf", Vec::new(), [ - 193u8, 200u8, 40u8, 30u8, 14u8, 71u8, 90u8, 42u8, 58u8, 253u8, 225u8, - 158u8, 172u8, 10u8, 45u8, 238u8, 36u8, 144u8, 184u8, 153u8, 11u8, - 157u8, 125u8, 220u8, 175u8, 31u8, 28u8, 93u8, 207u8, 212u8, 141u8, - 74u8, + 128u8, 15u8, 175u8, 155u8, 216u8, 225u8, 200u8, 169u8, 215u8, 206u8, + 110u8, 22u8, 204u8, 89u8, 212u8, 210u8, 159u8, 169u8, 53u8, 7u8, 44u8, + 164u8, 91u8, 151u8, 7u8, 227u8, 38u8, 230u8, 175u8, 84u8, 6u8, 4u8, ], ) } - #[doc = " The cumulative child-bounty curator fee for each parent bounty."] - pub fn children_curator_fees( + #[doc = " The set of registrars. Not expected to get very big as can only be added through a"] + #[doc = " special origin (likely a council motion)."] + #[doc = ""] + #[doc = " The index into this can be cast to `RegistrarIndex` to get a valid value."] + pub fn registrars( &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u128, - ::subxt::storage::address::Yes, + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::option::Option< + runtime_types::pallet_identity::types::RegistrarInfo< + ::core::primitive::u128, + ::subxt::utils::AccountId32, + >, + >, + >, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "ChildBounties", - "ChildrenCuratorFees", - vec![::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - )], - [ - 174u8, 128u8, 86u8, 179u8, 133u8, 76u8, 98u8, 169u8, 234u8, 166u8, - 249u8, 214u8, 172u8, 171u8, 8u8, 161u8, 105u8, 69u8, 148u8, 151u8, - 35u8, 174u8, 118u8, 139u8, 101u8, 56u8, 85u8, 211u8, 121u8, 168u8, 0u8, - 216u8, - ], - ) - } - #[doc = " The cumulative child-bounty curator fee for each parent bounty."] - pub fn children_curator_fees_root( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u128, (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( - "ChildBounties", - "ChildrenCuratorFees", - Vec::new(), + "Identity", + "Registrars", + vec![], [ - 174u8, 128u8, 86u8, 179u8, 133u8, 76u8, 98u8, 169u8, 234u8, 166u8, - 249u8, 214u8, 172u8, 171u8, 8u8, 161u8, 105u8, 69u8, 148u8, 151u8, - 35u8, 174u8, 118u8, 139u8, 101u8, 56u8, 85u8, 211u8, 121u8, 168u8, 0u8, - 216u8, + 157u8, 87u8, 39u8, 240u8, 154u8, 54u8, 241u8, 229u8, 76u8, 9u8, 62u8, + 252u8, 40u8, 143u8, 186u8, 182u8, 233u8, 187u8, 251u8, 61u8, 236u8, + 229u8, 19u8, 55u8, 42u8, 36u8, 82u8, 173u8, 215u8, 155u8, 229u8, 111u8, ], ) } @@ -19793,13 +19075,57 @@ pub mod api { use super::runtime_types; pub struct ConstantsApi; impl ConstantsApi { - #[doc = " Maximum number of child bounties that can be added to a parent bounty."] - pub fn max_active_child_bounty_count( + #[doc = " The amount held on deposit for a registered identity"] + pub fn basic_deposit( + &self, + ) -> ::subxt::constants::Address<::core::primitive::u128> { + ::subxt::constants::Address::new_static( + "Identity", + "BasicDeposit", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, + 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) + } + #[doc = " The amount held on deposit per additional field for a registered identity."] + pub fn field_deposit( + &self, + ) -> ::subxt::constants::Address<::core::primitive::u128> { + ::subxt::constants::Address::new_static( + "Identity", + "FieldDeposit", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, + 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) + } + #[doc = " The amount held on deposit for a registered subaccount. This should account for the fact"] + #[doc = " that one storage item's value will increase by the size of an account ID, and there will"] + #[doc = " be another trie item whose value is the size of an account ID plus 32 bytes."] + pub fn sub_account_deposit( + &self, + ) -> ::subxt::constants::Address<::core::primitive::u128> { + ::subxt::constants::Address::new_static( + "Identity", + "SubAccountDeposit", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, + 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) + } + #[doc = " The maximum number of sub-accounts allowed per identified account."] + pub fn max_sub_accounts( &self, ) -> ::subxt::constants::Address<::core::primitive::u32> { ::subxt::constants::Address::new_static( - "ChildBounties", - "MaxActiveChildBountyCount", + "Identity", + "MaxSubAccounts", [ 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, @@ -19808,335 +19134,525 @@ pub mod api { ], ) } - #[doc = " Minimum value for a child-bounty."] - pub fn child_bounty_value_minimum( + #[doc = " Maximum number of additional fields that may be stored in an ID. Needed to bound the I/O"] + #[doc = " required to access an identity, but can be pretty high."] + pub fn max_additional_fields( &self, - ) -> ::subxt::constants::Address<::core::primitive::u128> { + ) -> ::subxt::constants::Address<::core::primitive::u32> { ::subxt::constants::Address::new_static( - "ChildBounties", - "ChildBountyValueMinimum", + "Identity", + "MaxAdditionalFields", [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, - 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, - 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " Maxmimum number of registrars allowed in the system. Needed to bound the complexity"] + #[doc = " of, e.g., updating judgements."] + pub fn max_registrars( + &self, + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "Identity", + "MaxRegistrars", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, ], ) } } } } - pub mod tips { + pub mod proxy { use super::root_mod; use super::runtime_types; #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub type Error = runtime_types::pallet_tips::pallet::Error; + pub type Error = runtime_types::pallet_proxy::pallet::Error; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub mod calls { use super::root_mod; use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ReportAwesome { - pub reason: ::std::vec::Vec<::core::primitive::u8>, - pub who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RetractTip { - pub hash: ::subxt::utils::H256, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct TipNew { - pub reason: ::std::vec::Vec<::core::primitive::u8>, - pub who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - #[codec(compact)] - pub tip_value: ::core::primitive::u128, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Tip { - pub hash: ::subxt::utils::H256, - #[codec(compact)] - pub tip_value: ::core::primitive::u128, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CloseTip { - pub hash: ::subxt::utils::H256, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SlashTip { - pub hash: ::subxt::utils::H256, + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Proxy { + pub real: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub force_proxy_type: + ::core::option::Option, + pub call: ::std::boxed::Box, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct AddProxy { + pub delegate: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub proxy_type: runtime_types::polkadot_runtime::ProxyType, + pub delay: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct RemoveProxy { + pub delegate: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub proxy_type: runtime_types::polkadot_runtime::ProxyType, + pub delay: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct RemoveProxies; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct CreatePure { + pub proxy_type: runtime_types::polkadot_runtime::ProxyType, + pub delay: ::core::primitive::u32, + pub index: ::core::primitive::u16, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct KillPure { + pub spawner: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub proxy_type: runtime_types::polkadot_runtime::ProxyType, + pub index: ::core::primitive::u16, + #[codec(compact)] + pub height: ::core::primitive::u32, + #[codec(compact)] + pub ext_index: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Announce { + pub real: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub call_hash: ::subxt::utils::H256, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct RemoveAnnouncement { + pub real: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub call_hash: ::subxt::utils::H256, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct RejectAnnouncement { + pub delegate: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub call_hash: ::subxt::utils::H256, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ProxyAnnounced { + pub delegate: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub real: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub force_proxy_type: + ::core::option::Option, + pub call: ::std::boxed::Box, + } } pub struct TransactionApi; impl TransactionApi { - #[doc = "Report something `reason` that deserves a tip and claim any eventual the finder's fee."] + #[doc = "Dispatch the given `call` from an account that the sender is authorised for through"] + #[doc = "`add_proxy`."] #[doc = ""] #[doc = "The dispatch origin for this call must be _Signed_."] #[doc = ""] - #[doc = "Payment: `TipReportDepositBase` will be reserved from the origin account, as well as"] - #[doc = "`DataDepositPerByte` for each byte in `reason`."] - #[doc = ""] - #[doc = "- `reason`: The reason for, or the thing that deserves, the tip; generally this will be"] - #[doc = " a UTF-8-encoded URL."] - #[doc = "- `who`: The account which should be credited for the tip."] - #[doc = ""] - #[doc = "Emits `NewTip` if successful."] - #[doc = ""] - #[doc = "# "] - #[doc = "- Complexity: `O(R)` where `R` length of `reason`."] - #[doc = " - encoding and hashing of 'reason'"] - #[doc = "- DbReads: `Reasons`, `Tips`"] - #[doc = "- DbWrites: `Reasons`, `Tips`"] - #[doc = "# "] - pub fn report_awesome( + #[doc = "Parameters:"] + #[doc = "- `real`: The account that the proxy will make a call on behalf of."] + #[doc = "- `force_proxy_type`: Specify the exact proxy type to be used and checked for this call."] + #[doc = "- `call`: The call to be made by the `real` account."] + pub fn proxy( &self, - reason: ::std::vec::Vec<::core::primitive::u8>, - who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - ) -> ::subxt::tx::Payload { + real: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + force_proxy_type: ::core::option::Option< + runtime_types::polkadot_runtime::ProxyType, + >, + call: runtime_types::polkadot_runtime::RuntimeCall, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Tips", - "report_awesome", - ReportAwesome { reason, who }, + "Proxy", + "proxy", + types::Proxy { + real, + force_proxy_type, + call: ::std::boxed::Box::new(call), + }, [ - 126u8, 68u8, 2u8, 54u8, 195u8, 15u8, 43u8, 27u8, 183u8, 254u8, 157u8, - 163u8, 252u8, 14u8, 207u8, 251u8, 215u8, 111u8, 98u8, 209u8, 150u8, - 11u8, 240u8, 177u8, 106u8, 93u8, 191u8, 31u8, 62u8, 11u8, 223u8, 79u8, + 14u8, 42u8, 86u8, 28u8, 32u8, 98u8, 119u8, 113u8, 168u8, 61u8, 112u8, + 87u8, 153u8, 37u8, 135u8, 82u8, 131u8, 185u8, 116u8, 230u8, 182u8, + 38u8, 134u8, 76u8, 161u8, 103u8, 131u8, 167u8, 138u8, 123u8, 34u8, + 104u8, ], ) } - #[doc = "Retract a prior tip-report from `report_awesome`, and cancel the process of tipping."] - #[doc = ""] - #[doc = "If successful, the original deposit will be unreserved."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and the tip identified by `hash`"] - #[doc = "must have been reported by the signing account through `report_awesome` (and not"] - #[doc = "through `tip_new`)."] - #[doc = ""] - #[doc = "- `hash`: The identity of the open tip for which a tip value is declared. This is formed"] - #[doc = " as the hash of the tuple of the original tip `reason` and the beneficiary account ID."] + #[doc = "Register a proxy account for the sender that is able to make calls on its behalf."] #[doc = ""] - #[doc = "Emits `TipRetracted` if successful."] + #[doc = "The dispatch origin for this call must be _Signed_."] #[doc = ""] - #[doc = "# "] - #[doc = "- Complexity: `O(1)`"] - #[doc = " - Depends on the length of `T::Hash` which is fixed."] - #[doc = "- DbReads: `Tips`, `origin account`"] - #[doc = "- DbWrites: `Reasons`, `Tips`, `origin account`"] - #[doc = "# "] - pub fn retract_tip( + #[doc = "Parameters:"] + #[doc = "- `proxy`: The account that the `caller` would like to make a proxy."] + #[doc = "- `proxy_type`: The permissions allowed for this proxy account."] + #[doc = "- `delay`: The announcement period required of the initial proxy. Will generally be"] + #[doc = "zero."] + pub fn add_proxy( &self, - hash: ::subxt::utils::H256, - ) -> ::subxt::tx::Payload { + delegate: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + proxy_type: runtime_types::polkadot_runtime::ProxyType, + delay: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Tips", - "retract_tip", - RetractTip { hash }, + "Proxy", + "add_proxy", + types::AddProxy { + delegate, + proxy_type, + delay, + }, [ - 137u8, 42u8, 229u8, 188u8, 157u8, 195u8, 184u8, 176u8, 64u8, 142u8, - 67u8, 175u8, 185u8, 207u8, 214u8, 71u8, 165u8, 29u8, 137u8, 227u8, - 132u8, 195u8, 255u8, 66u8, 186u8, 57u8, 34u8, 184u8, 187u8, 65u8, - 129u8, 131u8, + 76u8, 227u8, 139u8, 167u8, 131u8, 37u8, 104u8, 137u8, 224u8, 66u8, + 37u8, 1u8, 89u8, 113u8, 232u8, 199u8, 79u8, 187u8, 176u8, 106u8, 168u8, + 144u8, 68u8, 32u8, 0u8, 227u8, 188u8, 28u8, 218u8, 84u8, 82u8, 96u8, ], ) } - #[doc = "Give a tip for something new; no finder's fee will be taken."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and the signing account must be a"] - #[doc = "member of the `Tippers` set."] - #[doc = ""] - #[doc = "- `reason`: The reason for, or the thing that deserves, the tip; generally this will be"] - #[doc = " a UTF-8-encoded URL."] - #[doc = "- `who`: The account which should be credited for the tip."] - #[doc = "- `tip_value`: The amount of tip that the sender would like to give. The median tip"] - #[doc = " value of active tippers will be given to the `who`."] + #[doc = "Unregister a proxy account for the sender."] #[doc = ""] - #[doc = "Emits `NewTip` if successful."] + #[doc = "The dispatch origin for this call must be _Signed_."] #[doc = ""] - #[doc = "# "] - #[doc = "- Complexity: `O(R + T)` where `R` length of `reason`, `T` is the number of tippers."] - #[doc = " - `O(T)`: decoding `Tipper` vec of length `T`. `T` is charged as upper bound given by"] - #[doc = " `ContainsLengthBound`. The actual cost depends on the implementation of"] - #[doc = " `T::Tippers`."] - #[doc = " - `O(R)`: hashing and encoding of reason of length `R`"] - #[doc = "- DbReads: `Tippers`, `Reasons`"] - #[doc = "- DbWrites: `Reasons`, `Tips`"] - #[doc = "# "] - pub fn tip_new( + #[doc = "Parameters:"] + #[doc = "- `proxy`: The account that the `caller` would like to remove as a proxy."] + #[doc = "- `proxy_type`: The permissions currently enabled for the removed proxy account."] + pub fn remove_proxy( &self, - reason: ::std::vec::Vec<::core::primitive::u8>, - who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - tip_value: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { + delegate: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + proxy_type: runtime_types::polkadot_runtime::ProxyType, + delay: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Tips", - "tip_new", - TipNew { - reason, - who, - tip_value, + "Proxy", + "remove_proxy", + types::RemoveProxy { + delegate, + proxy_type, + delay, }, [ - 217u8, 15u8, 70u8, 80u8, 193u8, 110u8, 212u8, 110u8, 212u8, 45u8, - 197u8, 150u8, 43u8, 116u8, 115u8, 231u8, 148u8, 102u8, 202u8, 28u8, - 55u8, 88u8, 166u8, 238u8, 11u8, 238u8, 229u8, 189u8, 89u8, 115u8, - 196u8, 95u8, + 46u8, 235u8, 142u8, 33u8, 21u8, 200u8, 243u8, 213u8, 62u8, 162u8, 70u8, + 132u8, 204u8, 76u8, 156u8, 66u8, 83u8, 95u8, 13u8, 208u8, 241u8, 242u8, + 219u8, 39u8, 229u8, 238u8, 221u8, 135u8, 66u8, 159u8, 38u8, 50u8, ], ) } - #[doc = "Declare a tip value for an already-open tip."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and the signing account must be a"] - #[doc = "member of the `Tippers` set."] - #[doc = ""] - #[doc = "- `hash`: The identity of the open tip for which a tip value is declared. This is formed"] - #[doc = " as the hash of the tuple of the hash of the original tip `reason` and the beneficiary"] - #[doc = " account ID."] - #[doc = "- `tip_value`: The amount of tip that the sender would like to give. The median tip"] - #[doc = " value of active tippers will be given to the `who`."] - #[doc = ""] - #[doc = "Emits `TipClosing` if the threshold of tippers has been reached and the countdown period"] - #[doc = "has started."] + #[doc = "Unregister all proxy accounts for the sender."] #[doc = ""] - #[doc = "# "] - #[doc = "- Complexity: `O(T)` where `T` is the number of tippers. decoding `Tipper` vec of length"] - #[doc = " `T`, insert tip and check closing, `T` is charged as upper bound given by"] - #[doc = " `ContainsLengthBound`. The actual cost depends on the implementation of `T::Tippers`."] + #[doc = "The dispatch origin for this call must be _Signed_."] #[doc = ""] - #[doc = " Actually weight could be lower as it depends on how many tips are in `OpenTip` but it"] - #[doc = " is weighted as if almost full i.e of length `T-1`."] - #[doc = "- DbReads: `Tippers`, `Tips`"] - #[doc = "- DbWrites: `Tips`"] - #[doc = "# "] - pub fn tip( - &self, - hash: ::subxt::utils::H256, - tip_value: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { + #[doc = "WARNING: This may be called on accounts created by `pure`, however if done, then"] + #[doc = "the unreserved fees will be inaccessible. **All access to this account will be lost.**"] + pub fn remove_proxies(&self) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Tips", - "tip", - Tip { hash, tip_value }, + "Proxy", + "remove_proxies", + types::RemoveProxies {}, [ - 133u8, 52u8, 131u8, 14u8, 71u8, 232u8, 254u8, 31u8, 33u8, 206u8, 50u8, - 76u8, 56u8, 167u8, 228u8, 202u8, 195u8, 0u8, 164u8, 107u8, 170u8, 98u8, - 192u8, 37u8, 209u8, 199u8, 130u8, 15u8, 168u8, 63u8, 181u8, 134u8, + 15u8, 237u8, 27u8, 166u8, 254u8, 218u8, 92u8, 5u8, 213u8, 239u8, 99u8, + 59u8, 1u8, 26u8, 73u8, 252u8, 81u8, 94u8, 214u8, 227u8, 169u8, 58u8, + 40u8, 253u8, 187u8, 225u8, 192u8, 26u8, 19u8, 23u8, 121u8, 129u8, ], ) } - #[doc = "Close and payout a tip."] + #[doc = "Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and"] + #[doc = "initialize it with a proxy of `proxy_type` for `origin` sender."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = "Requires a `Signed` origin."] #[doc = ""] - #[doc = "The tip identified by `hash` must have finished its countdown period."] + #[doc = "- `proxy_type`: The type of the proxy that the sender will be registered as over the"] + #[doc = "new account. This will almost always be the most permissive `ProxyType` possible to"] + #[doc = "allow for maximum flexibility."] + #[doc = "- `index`: A disambiguation index, in case this is called multiple times in the same"] + #[doc = "transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just"] + #[doc = "want to use `0`."] + #[doc = "- `delay`: The announcement period required of the initial proxy. Will generally be"] + #[doc = "zero."] #[doc = ""] - #[doc = "- `hash`: The identity of the open tip for which a tip value is declared. This is formed"] - #[doc = " as the hash of the tuple of the original tip `reason` and the beneficiary account ID."] + #[doc = "Fails with `Duplicate` if this has already been called in this transaction, from the"] + #[doc = "same sender, with the same parameters."] #[doc = ""] - #[doc = "# "] - #[doc = "- Complexity: `O(T)` where `T` is the number of tippers. decoding `Tipper` vec of length"] - #[doc = " `T`. `T` is charged as upper bound given by `ContainsLengthBound`. The actual cost"] - #[doc = " depends on the implementation of `T::Tippers`."] - #[doc = "- DbReads: `Tips`, `Tippers`, `tip finder`"] - #[doc = "- DbWrites: `Reasons`, `Tips`, `Tippers`, `tip finder`"] - #[doc = "# "] - pub fn close_tip( + #[doc = "Fails if there are insufficient funds to pay for deposit."] + pub fn create_pure( &self, - hash: ::subxt::utils::H256, - ) -> ::subxt::tx::Payload { + proxy_type: runtime_types::polkadot_runtime::ProxyType, + delay: ::core::primitive::u32, + index: ::core::primitive::u16, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Tips", - "close_tip", - CloseTip { hash }, + "Proxy", + "create_pure", + types::CreatePure { + proxy_type, + delay, + index, + }, [ - 32u8, 53u8, 0u8, 222u8, 45u8, 157u8, 107u8, 174u8, 203u8, 50u8, 81u8, - 230u8, 6u8, 111u8, 79u8, 55u8, 49u8, 151u8, 107u8, 114u8, 81u8, 200u8, - 144u8, 175u8, 29u8, 142u8, 115u8, 184u8, 102u8, 116u8, 156u8, 173u8, + 184u8, 127u8, 177u8, 255u8, 195u8, 192u8, 136u8, 114u8, 249u8, 70u8, + 222u8, 77u8, 10u8, 213u8, 209u8, 6u8, 238u8, 173u8, 47u8, 182u8, 129u8, + 69u8, 74u8, 249u8, 25u8, 170u8, 119u8, 106u8, 54u8, 165u8, 0u8, 100u8, ], ) } - #[doc = "Remove and slash an already-open tip."] + #[doc = "Removes a previously spawned pure proxy."] #[doc = ""] - #[doc = "May only be called from `T::RejectOrigin`."] + #[doc = "WARNING: **All access to this account will be lost.** Any funds held in it will be"] + #[doc = "inaccessible."] #[doc = ""] - #[doc = "As a result, the finder is slashed and the deposits are lost."] + #[doc = "Requires a `Signed` origin, and the sender account must have been created by a call to"] + #[doc = "`pure` with corresponding parameters."] #[doc = ""] - #[doc = "Emits `TipSlashed` if successful."] + #[doc = "- `spawner`: The account that originally called `pure` to create this account."] + #[doc = "- `index`: The disambiguation index originally passed to `pure`. Probably `0`."] + #[doc = "- `proxy_type`: The proxy type originally passed to `pure`."] + #[doc = "- `height`: The height of the chain when the call to `pure` was processed."] + #[doc = "- `ext_index`: The extrinsic index in which the call to `pure` was processed."] #[doc = ""] - #[doc = "# "] - #[doc = " `T` is charged as upper bound given by `ContainsLengthBound`."] - #[doc = " The actual cost depends on the implementation of `T::Tippers`."] - #[doc = "# "] - pub fn slash_tip( + #[doc = "Fails with `NoPermission` in case the caller is not a previously created pure"] + #[doc = "account whose `pure` call has corresponding parameters."] + pub fn kill_pure( &self, - hash: ::subxt::utils::H256, - ) -> ::subxt::tx::Payload { + spawner: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + proxy_type: runtime_types::polkadot_runtime::ProxyType, + index: ::core::primitive::u16, + height: ::core::primitive::u32, + ext_index: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Tips", - "slash_tip", - SlashTip { hash }, + "Proxy", + "kill_pure", + types::KillPure { + spawner, + proxy_type, + index, + height, + ext_index, + }, [ - 222u8, 209u8, 22u8, 47u8, 114u8, 230u8, 81u8, 200u8, 131u8, 0u8, 209u8, - 54u8, 17u8, 200u8, 175u8, 125u8, 100u8, 254u8, 41u8, 178u8, 20u8, 27u8, - 9u8, 184u8, 79u8, 93u8, 208u8, 148u8, 27u8, 190u8, 176u8, 169u8, + 134u8, 133u8, 203u8, 194u8, 12u8, 188u8, 59u8, 222u8, 83u8, 30u8, + 217u8, 181u8, 224u8, 194u8, 81u8, 206u8, 30u8, 116u8, 94u8, 36u8, 87u8, + 227u8, 157u8, 129u8, 198u8, 115u8, 208u8, 105u8, 143u8, 175u8, 145u8, + 18u8, + ], + ) + } + #[doc = "Publish the hash of a proxy-call that will be made in the future."] + #[doc = ""] + #[doc = "This must be called some number of blocks before the corresponding `proxy` is attempted"] + #[doc = "if the delay associated with the proxy relationship is greater than zero."] + #[doc = ""] + #[doc = "No more than `MaxPending` announcements may be made at any one time."] + #[doc = ""] + #[doc = "This will take a deposit of `AnnouncementDepositFactor` as well as"] + #[doc = "`AnnouncementDepositBase` if there are no other pending announcements."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and a proxy of `real`."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `real`: The account that the proxy will make a call on behalf of."] + #[doc = "- `call_hash`: The hash of the call to be made by the `real` account."] + pub fn announce( + &self, + real: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + call_hash: ::subxt::utils::H256, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Proxy", + "announce", + types::Announce { real, call_hash }, + [ + 235u8, 116u8, 208u8, 53u8, 128u8, 91u8, 100u8, 68u8, 255u8, 254u8, + 119u8, 253u8, 108u8, 130u8, 88u8, 56u8, 113u8, 99u8, 105u8, 179u8, + 16u8, 143u8, 131u8, 203u8, 234u8, 76u8, 199u8, 191u8, 35u8, 158u8, + 130u8, 209u8, + ], + ) + } + #[doc = "Remove a given announcement."] + #[doc = ""] + #[doc = "May be called by a proxy account to remove a call they previously announced and return"] + #[doc = "the deposit."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `real`: The account that the proxy will make a call on behalf of."] + #[doc = "- `call_hash`: The hash of the call to be made by the `real` account."] + pub fn remove_announcement( + &self, + real: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + call_hash: ::subxt::utils::H256, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Proxy", + "remove_announcement", + types::RemoveAnnouncement { real, call_hash }, + [ + 140u8, 186u8, 140u8, 129u8, 40u8, 124u8, 57u8, 61u8, 84u8, 247u8, + 123u8, 241u8, 148u8, 15u8, 94u8, 146u8, 121u8, 78u8, 190u8, 68u8, + 185u8, 125u8, 62u8, 49u8, 108u8, 131u8, 229u8, 82u8, 68u8, 37u8, 184u8, + 223u8, + ], + ) + } + #[doc = "Remove the given announcement of a delegate."] + #[doc = ""] + #[doc = "May be called by a target (proxied) account to remove a call that one of their delegates"] + #[doc = "(`delegate`) has announced they want to execute. The deposit is returned."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `delegate`: The account that previously announced the call."] + #[doc = "- `call_hash`: The hash of the call to be made."] + pub fn reject_announcement( + &self, + delegate: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + call_hash: ::subxt::utils::H256, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Proxy", + "reject_announcement", + types::RejectAnnouncement { + delegate, + call_hash, + }, + [ + 225u8, 198u8, 31u8, 173u8, 157u8, 141u8, 121u8, 51u8, 226u8, 170u8, + 219u8, 86u8, 14u8, 131u8, 122u8, 157u8, 161u8, 200u8, 157u8, 37u8, + 43u8, 97u8, 143u8, 97u8, 46u8, 206u8, 204u8, 42u8, 78u8, 33u8, 85u8, + 127u8, + ], + ) + } + #[doc = "Dispatch the given `call` from an account that the sender is authorized for through"] + #[doc = "`add_proxy`."] + #[doc = ""] + #[doc = "Removes any corresponding announcement(s)."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `real`: The account that the proxy will make a call on behalf of."] + #[doc = "- `force_proxy_type`: Specify the exact proxy type to be used and checked for this call."] + #[doc = "- `call`: The call to be made by the `real` account."] + pub fn proxy_announced( + &self, + delegate: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + real: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + force_proxy_type: ::core::option::Option< + runtime_types::polkadot_runtime::ProxyType, + >, + call: runtime_types::polkadot_runtime::RuntimeCall, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Proxy", + "proxy_announced", + types::ProxyAnnounced { + delegate, + real, + force_proxy_type, + call: ::std::boxed::Box::new(call), + }, + [ + 8u8, 182u8, 157u8, 71u8, 2u8, 217u8, 103u8, 34u8, 52u8, 133u8, 231u8, + 248u8, 189u8, 158u8, 103u8, 53u8, 149u8, 166u8, 108u8, 226u8, 32u8, + 92u8, 174u8, 134u8, 220u8, 98u8, 17u8, 32u8, 140u8, 38u8, 200u8, 184u8, ], ) } } } #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::pallet_tips::pallet::Event; + pub type Event = runtime_types::pallet_proxy::pallet::Event; pub mod events { use super::runtime_types; #[derive( @@ -20149,13 +19665,13 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A new tip suggestion has been opened."] - pub struct NewTip { - pub tip_hash: ::subxt::utils::H256, + #[doc = "A proxy was executed correctly, with the given."] + pub struct ProxyExecuted { + pub result: ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, } - impl ::subxt::events::StaticEvent for NewTip { - const PALLET: &'static str = "Tips"; - const EVENT: &'static str = "NewTip"; + impl ::subxt::events::StaticEvent for ProxyExecuted { + const PALLET: &'static str = "Proxy"; + const EVENT: &'static str = "ProxyExecuted"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -20167,13 +19683,17 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A tip suggestion has reached threshold and is closing."] - pub struct TipClosing { - pub tip_hash: ::subxt::utils::H256, + #[doc = "A pure account has been created by new proxy with given"] + #[doc = "disambiguation index and proxy type."] + pub struct PureCreated { + pub pure: ::subxt::utils::AccountId32, + pub who: ::subxt::utils::AccountId32, + pub proxy_type: runtime_types::polkadot_runtime::ProxyType, + pub disambiguation_index: ::core::primitive::u16, } - impl ::subxt::events::StaticEvent for TipClosing { - const PALLET: &'static str = "Tips"; - const EVENT: &'static str = "TipClosing"; + impl ::subxt::events::StaticEvent for PureCreated { + const PALLET: &'static str = "Proxy"; + const EVENT: &'static str = "PureCreated"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -20185,15 +19705,15 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A tip suggestion has been closed."] - pub struct TipClosed { - pub tip_hash: ::subxt::utils::H256, - pub who: ::subxt::utils::AccountId32, - pub payout: ::core::primitive::u128, + #[doc = "An announcement was placed to make a call in the future."] + pub struct Announced { + pub real: ::subxt::utils::AccountId32, + pub proxy: ::subxt::utils::AccountId32, + pub call_hash: ::subxt::utils::H256, } - impl ::subxt::events::StaticEvent for TipClosed { - const PALLET: &'static str = "Tips"; - const EVENT: &'static str = "TipClosed"; + impl ::subxt::events::StaticEvent for Announced { + const PALLET: &'static str = "Proxy"; + const EVENT: &'static str = "Announced"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -20205,13 +19725,16 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A tip suggestion has been retracted."] - pub struct TipRetracted { - pub tip_hash: ::subxt::utils::H256, + #[doc = "A proxy was added."] + pub struct ProxyAdded { + pub delegator: ::subxt::utils::AccountId32, + pub delegatee: ::subxt::utils::AccountId32, + pub proxy_type: runtime_types::polkadot_runtime::ProxyType, + pub delay: ::core::primitive::u32, } - impl ::subxt::events::StaticEvent for TipRetracted { - const PALLET: &'static str = "Tips"; - const EVENT: &'static str = "TipRetracted"; + impl ::subxt::events::StaticEvent for ProxyAdded { + const PALLET: &'static str = "Proxy"; + const EVENT: &'static str = "ProxyAdded"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -20223,124 +19746,149 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A tip suggestion has been slashed."] - pub struct TipSlashed { - pub tip_hash: ::subxt::utils::H256, - pub finder: ::subxt::utils::AccountId32, - pub deposit: ::core::primitive::u128, + #[doc = "A proxy was removed."] + pub struct ProxyRemoved { + pub delegator: ::subxt::utils::AccountId32, + pub delegatee: ::subxt::utils::AccountId32, + pub proxy_type: runtime_types::polkadot_runtime::ProxyType, + pub delay: ::core::primitive::u32, } - impl ::subxt::events::StaticEvent for TipSlashed { - const PALLET: &'static str = "Tips"; - const EVENT: &'static str = "TipSlashed"; + impl ::subxt::events::StaticEvent for ProxyRemoved { + const PALLET: &'static str = "Proxy"; + const EVENT: &'static str = "ProxyRemoved"; } } pub mod storage { use super::runtime_types; pub struct StorageApi; impl StorageApi { - #[doc = " TipsMap that are not yet completed. Keyed by the hash of `(reason, who)` from the value."] - #[doc = " This has the insecure enumerable hash function since the key itself is already"] - #[doc = " guaranteed to be a secure hash."] - pub fn tips( + #[doc = " The set of account proxies. Maps the account which has delegated to the accounts"] + #[doc = " which are being delegated to, together with the amount held on deposit."] + pub fn proxies( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_tips::OpenTip< - ::subxt::utils::AccountId32, + ( + runtime_types::bounded_collections::bounded_vec::BoundedVec< + runtime_types::pallet_proxy::ProxyDefinition< + ::subxt::utils::AccountId32, + runtime_types::polkadot_runtime::ProxyType, + ::core::primitive::u32, + >, + >, ::core::primitive::u128, - ::core::primitive::u32, - ::subxt::utils::H256, - >, + ), + ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, - (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( - "Tips", - "Tips", + "Proxy", + "Proxies", vec![::subxt::storage::address::make_static_storage_map_key( _0.borrow(), )], [ - 241u8, 196u8, 105u8, 248u8, 29u8, 66u8, 86u8, 98u8, 6u8, 159u8, 191u8, - 0u8, 227u8, 232u8, 147u8, 248u8, 173u8, 20u8, 225u8, 12u8, 232u8, 5u8, - 93u8, 78u8, 18u8, 154u8, 130u8, 38u8, 142u8, 36u8, 66u8, 0u8, + 80u8, 71u8, 244u8, 42u8, 237u8, 5u8, 46u8, 156u8, 84u8, 213u8, 84u8, + 212u8, 157u8, 221u8, 174u8, 97u8, 157u8, 218u8, 166u8, 127u8, 162u8, + 139u8, 110u8, 98u8, 229u8, 166u8, 49u8, 172u8, 48u8, 237u8, 240u8, + 42u8, ], ) } - #[doc = " TipsMap that are not yet completed. Keyed by the hash of `(reason, who)` from the value."] - #[doc = " This has the insecure enumerable hash function since the key itself is already"] - #[doc = " guaranteed to be a secure hash."] - pub fn tips_root( + #[doc = " The set of account proxies. Maps the account which has delegated to the accounts"] + #[doc = " which are being delegated to, together with the amount held on deposit."] + pub fn proxies_root( &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_tips::OpenTip< - ::subxt::utils::AccountId32, + ( + runtime_types::bounded_collections::bounded_vec::BoundedVec< + runtime_types::pallet_proxy::ProxyDefinition< + ::subxt::utils::AccountId32, + runtime_types::polkadot_runtime::ProxyType, + ::core::primitive::u32, + >, + >, ::core::primitive::u128, - ::core::primitive::u32, - ::subxt::utils::H256, - >, - (), + ), (), ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( - "Tips", - "Tips", + "Proxy", + "Proxies", Vec::new(), [ - 241u8, 196u8, 105u8, 248u8, 29u8, 66u8, 86u8, 98u8, 6u8, 159u8, 191u8, - 0u8, 227u8, 232u8, 147u8, 248u8, 173u8, 20u8, 225u8, 12u8, 232u8, 5u8, - 93u8, 78u8, 18u8, 154u8, 130u8, 38u8, 142u8, 36u8, 66u8, 0u8, + 80u8, 71u8, 244u8, 42u8, 237u8, 5u8, 46u8, 156u8, 84u8, 213u8, 84u8, + 212u8, 157u8, 221u8, 174u8, 97u8, 157u8, 218u8, 166u8, 127u8, 162u8, + 139u8, 110u8, 98u8, 229u8, 166u8, 49u8, 172u8, 48u8, 237u8, 240u8, + 42u8, ], ) } - #[doc = " Simple preimage lookup from the reason's hash to the original data. Again, has an"] - #[doc = " insecure enumerable hash since the key is guaranteed to be the result of a secure hash."] - pub fn reasons( + #[doc = " The announcements made by the proxy (key)."] + pub fn announcements( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec<::core::primitive::u8>, + ( + runtime_types::bounded_collections::bounded_vec::BoundedVec< + runtime_types::pallet_proxy::Announcement< + ::subxt::utils::AccountId32, + ::subxt::utils::H256, + ::core::primitive::u32, + >, + >, + ::core::primitive::u128, + ), + ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, - (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( - "Tips", - "Reasons", + "Proxy", + "Announcements", vec![::subxt::storage::address::make_static_storage_map_key( _0.borrow(), )], [ - 202u8, 191u8, 36u8, 162u8, 156u8, 102u8, 115u8, 10u8, 203u8, 35u8, - 201u8, 70u8, 195u8, 151u8, 89u8, 82u8, 202u8, 35u8, 210u8, 176u8, 82u8, - 1u8, 77u8, 94u8, 31u8, 70u8, 252u8, 194u8, 166u8, 91u8, 189u8, 134u8, + 233u8, 38u8, 249u8, 89u8, 103u8, 87u8, 64u8, 52u8, 140u8, 228u8, 110u8, + 37u8, 8u8, 92u8, 48u8, 7u8, 46u8, 99u8, 179u8, 83u8, 232u8, 171u8, + 160u8, 45u8, 37u8, 23u8, 151u8, 198u8, 237u8, 103u8, 217u8, 53u8, ], ) } - #[doc = " Simple preimage lookup from the reason's hash to the original data. Again, has an"] - #[doc = " insecure enumerable hash since the key is guaranteed to be the result of a secure hash."] - pub fn reasons_root( + #[doc = " The announcements made by the proxy (key)."] + pub fn announcements_root( &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec<::core::primitive::u8>, - (), + ( + runtime_types::bounded_collections::bounded_vec::BoundedVec< + runtime_types::pallet_proxy::Announcement< + ::subxt::utils::AccountId32, + ::subxt::utils::H256, + ::core::primitive::u32, + >, + >, + ::core::primitive::u128, + ), (), ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( - "Tips", - "Reasons", + "Proxy", + "Announcements", Vec::new(), [ - 202u8, 191u8, 36u8, 162u8, 156u8, 102u8, 115u8, 10u8, 203u8, 35u8, - 201u8, 70u8, 195u8, 151u8, 89u8, 82u8, 202u8, 35u8, 210u8, 176u8, 82u8, - 1u8, 77u8, 94u8, 31u8, 70u8, 252u8, 194u8, 166u8, 91u8, 189u8, 134u8, + 233u8, 38u8, 249u8, 89u8, 103u8, 87u8, 64u8, 52u8, 140u8, 228u8, 110u8, + 37u8, 8u8, 92u8, 48u8, 7u8, 46u8, 99u8, 179u8, 83u8, 232u8, 171u8, + 160u8, 45u8, 37u8, 23u8, 151u8, 198u8, 237u8, 103u8, 217u8, 53u8, ], ) } @@ -20350,30 +19898,34 @@ pub mod api { use super::runtime_types; pub struct ConstantsApi; impl ConstantsApi { - #[doc = " Maximum acceptable reason length."] + #[doc = " The base amount of currency needed to reserve for creating a proxy."] #[doc = ""] - #[doc = " Benchmarks depend on this value, be sure to update weights file when changing this value"] - pub fn maximum_reason_length( + #[doc = " This is held for an additional storage item whose value size is"] + #[doc = " `sizeof(Balance)` bytes and whose key size is `sizeof(AccountId)` bytes."] + pub fn proxy_deposit_base( &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { + ) -> ::subxt::constants::Address<::core::primitive::u128> { ::subxt::constants::Address::new_static( - "Tips", - "MaximumReasonLength", + "Proxy", + "ProxyDepositBase", [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, + 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, ], ) } - #[doc = " The amount held on deposit per byte within the tip report reason or bounty description."] - pub fn data_deposit_per_byte( + #[doc = " The amount of currency needed per proxy added."] + #[doc = ""] + #[doc = " This is held for adding 32 bytes plus an instance of `ProxyType` more into a"] + #[doc = " pre-existing storage value. Thus, when configuring `ProxyDepositFactor` one should take"] + #[doc = " into account `32 + proxy_type.encode().len()` bytes of data."] + pub fn proxy_deposit_factor( &self, ) -> ::subxt::constants::Address<::core::primitive::u128> { ::subxt::constants::Address::new_static( - "Tips", - "DataDepositPerByte", + "Proxy", + "ProxyDepositFactor", [ 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, @@ -20381,11 +19933,11 @@ pub mod api { ], ) } - #[doc = " The period for which a tip remains open after is has achieved threshold tippers."] - pub fn tip_countdown(&self) -> ::subxt::constants::Address<::core::primitive::u32> { + #[doc = " The maximum amount of proxies allowed for a single account."] + pub fn max_proxies(&self) -> ::subxt::constants::Address<::core::primitive::u32> { ::subxt::constants::Address::new_static( - "Tips", - "TipCountdown", + "Proxy", + "MaxProxies", [ 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, @@ -20394,29 +19946,46 @@ pub mod api { ], ) } - #[doc = " The percent of the final tip which goes to the original reporter of the tip."] - pub fn tip_finders_fee( + #[doc = " The maximum amount of time-delayed announcements that are allowed to be pending."] + pub fn max_pending(&self) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "Proxy", + "MaxPending", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " The base amount of currency needed to reserve for creating an announcement."] + #[doc = ""] + #[doc = " This is held when a new storage item holding a `Balance` is created (typically 16"] + #[doc = " bytes)."] + pub fn announcement_deposit_base( &self, - ) -> ::subxt::constants::Address - { + ) -> ::subxt::constants::Address<::core::primitive::u128> { ::subxt::constants::Address::new_static( - "Tips", - "TipFindersFee", + "Proxy", + "AnnouncementDepositBase", [ - 99u8, 121u8, 176u8, 172u8, 235u8, 159u8, 116u8, 114u8, 179u8, 91u8, - 129u8, 117u8, 204u8, 135u8, 53u8, 7u8, 151u8, 26u8, 124u8, 151u8, - 202u8, 171u8, 171u8, 207u8, 183u8, 177u8, 24u8, 53u8, 109u8, 185u8, - 71u8, 183u8, + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, + 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, ], ) } - #[doc = " The amount held on deposit for placing a tip report."] - pub fn tip_report_deposit_base( + #[doc = " The amount of currency needed per announcement made."] + #[doc = ""] + #[doc = " This is held for adding an `AccountId`, `Hash` and `BlockNumber` (typically 68 bytes)"] + #[doc = " into a pre-existing storage value."] + pub fn announcement_deposit_factor( &self, ) -> ::subxt::constants::Address<::core::primitive::u128> { ::subxt::constants::Address::new_static( - "Tips", - "TipReportDepositBase", + "Proxy", + "AnnouncementDepositFactor", [ 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, @@ -20427,237 +19996,294 @@ pub mod api { } } } - pub mod election_provider_multi_phase { + pub mod multisig { use super::root_mod; use super::runtime_types; - #[doc = "Error of the pallet that can be returned in response to dispatches."] - pub type Error = runtime_types::pallet_election_provider_multi_phase::pallet::Error; + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub type Error = runtime_types::pallet_multisig::pallet::Error; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub mod calls { use super::root_mod; use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SubmitUnsigned { - pub raw_solution: ::std::boxed::Box< - runtime_types::pallet_election_provider_multi_phase::RawSolution< - runtime_types::polkadot_runtime::NposCompactSolution16, + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct AsMultiThreshold1 { + pub other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, + pub call: ::std::boxed::Box, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct AsMulti { + pub threshold: ::core::primitive::u16, + pub other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, + pub maybe_timepoint: ::core::option::Option< + runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, >, - >, - pub witness: - runtime_types::pallet_election_provider_multi_phase::SolutionOrSnapshotSize, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetMinimumUntrustedScore { - pub maybe_next_score: - ::core::option::Option, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetEmergencyElectionResult { - pub supports: ::std::vec::Vec<( - ::subxt::utils::AccountId32, - runtime_types::sp_npos_elections::Support<::subxt::utils::AccountId32>, - )>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Submit { - pub raw_solution: ::std::boxed::Box< - runtime_types::pallet_election_provider_multi_phase::RawSolution< - runtime_types::polkadot_runtime::NposCompactSolution16, - >, - >, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct GovernanceFallback { - pub maybe_max_voters: ::core::option::Option<::core::primitive::u32>, - pub maybe_max_targets: ::core::option::Option<::core::primitive::u32>, + pub call: ::std::boxed::Box, + pub max_weight: runtime_types::sp_weights::weight_v2::Weight, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ApproveAsMulti { + pub threshold: ::core::primitive::u16, + pub other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, + pub maybe_timepoint: ::core::option::Option< + runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, + >, + pub call_hash: [::core::primitive::u8; 32usize], + pub max_weight: runtime_types::sp_weights::weight_v2::Weight, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct CancelAsMulti { + pub threshold: ::core::primitive::u16, + pub other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, + pub timepoint: + runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, + pub call_hash: [::core::primitive::u8; 32usize], + } } pub struct TransactionApi; impl TransactionApi { - #[doc = "Submit a solution for the unsigned phase."] + #[doc = "Immediately dispatch a multi-signature call using a single approval from the caller."] #[doc = ""] - #[doc = "The dispatch origin fo this call must be __none__."] + #[doc = "The dispatch origin for this call must be _Signed_."] #[doc = ""] - #[doc = "This submission is checked on the fly. Moreover, this unsigned solution is only"] - #[doc = "validated when submitted to the pool from the **local** node. Effectively, this means"] - #[doc = "that only active validators can submit this transaction when authoring a block (similar"] - #[doc = "to an inherent)."] + #[doc = "- `other_signatories`: The accounts (other than the sender) who are part of the"] + #[doc = "multi-signature, but do not participate in the approval process."] + #[doc = "- `call`: The call to be executed."] #[doc = ""] - #[doc = "To prevent any incorrect solution (and thus wasted time/weight), this transaction will"] - #[doc = "panic if the solution submitted by the validator is invalid in any way, effectively"] - #[doc = "putting their authoring reward at risk."] + #[doc = "Result is equivalent to the dispatched result."] #[doc = ""] - #[doc = "No deposit or reward is associated with this submission."] - pub fn submit_unsigned( + #[doc = "## Complexity"] + #[doc = "O(Z + C) where Z is the length of the call and C its execution weight."] + pub fn as_multi_threshold_1( &self, - raw_solution: runtime_types::pallet_election_provider_multi_phase::RawSolution< - runtime_types::polkadot_runtime::NposCompactSolution16, - >, - witness : runtime_types :: pallet_election_provider_multi_phase :: SolutionOrSnapshotSize, - ) -> ::subxt::tx::Payload { + other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, + call: runtime_types::polkadot_runtime::RuntimeCall, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "ElectionProviderMultiPhase", - "submit_unsigned", - SubmitUnsigned { - raw_solution: ::std::boxed::Box::new(raw_solution), - witness, + "Multisig", + "as_multi_threshold_1", + types::AsMultiThreshold1 { + other_signatories, + call: ::std::boxed::Box::new(call), }, [ - 100u8, 240u8, 31u8, 34u8, 93u8, 98u8, 93u8, 57u8, 41u8, 197u8, 97u8, - 58u8, 242u8, 10u8, 69u8, 250u8, 185u8, 169u8, 21u8, 8u8, 202u8, 61u8, - 36u8, 25u8, 4u8, 148u8, 82u8, 56u8, 242u8, 18u8, 27u8, 219u8, + 0u8, 101u8, 233u8, 4u8, 27u8, 61u8, 6u8, 243u8, 253u8, 208u8, 93u8, + 58u8, 221u8, 46u8, 248u8, 243u8, 6u8, 162u8, 59u8, 209u8, 185u8, 2u8, + 76u8, 95u8, 189u8, 8u8, 84u8, 89u8, 119u8, 25u8, 25u8, 116u8, ], ) } - #[doc = "Set a new value for `MinimumUntrustedScore`."] + #[doc = "Register approval for a dispatch to be made from a deterministic composite account if"] + #[doc = "approved by a total of `threshold - 1` of `other_signatories`."] #[doc = ""] - #[doc = "Dispatch origin must be aligned with `T::ForceOrigin`."] + #[doc = "If there are enough, then dispatch the call."] #[doc = ""] - #[doc = "This check can be turned off by setting the value to `None`."] - pub fn set_minimum_untrusted_score( + #[doc = "Payment: `DepositBase` will be reserved if this is the first approval, plus"] + #[doc = "`threshold` times `DepositFactor`. It is returned once this dispatch happens or"] + #[doc = "is cancelled."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "- `threshold`: The total number of approvals for this dispatch before it is executed."] + #[doc = "- `other_signatories`: The accounts (other than the sender) who can approve this"] + #[doc = "dispatch. May not be empty."] + #[doc = "- `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is"] + #[doc = "not the first approval, then it must be `Some`, with the timepoint (block number and"] + #[doc = "transaction index) of the first approval transaction."] + #[doc = "- `call`: The call to be executed."] + #[doc = ""] + #[doc = "NOTE: Unless this is the final approval, you will generally want to use"] + #[doc = "`approve_as_multi` instead, since it only requires a hash of the call."] + #[doc = ""] + #[doc = "Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise"] + #[doc = "on success, result is `Ok` and the result from the interior call, if it was executed,"] + #[doc = "may be found in the deposited `MultisigExecuted` event."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(S + Z + Call)`."] + #[doc = "- Up to one balance-reserve or unreserve operation."] + #[doc = "- One passthrough operation, one insert, both `O(S)` where `S` is the number of"] + #[doc = " signatories. `S` is capped by `MaxSignatories`, with weight being proportional."] + #[doc = "- One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len."] + #[doc = "- One encode & hash, both of complexity `O(S)`."] + #[doc = "- Up to one binary search and insert (`O(logS + S)`)."] + #[doc = "- I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove."] + #[doc = "- One event."] + #[doc = "- The weight of the `call`."] + #[doc = "- Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit"] + #[doc = " taken for its lifetime of `DepositBase + threshold * DepositFactor`."] + pub fn as_multi( &self, - maybe_next_score: ::core::option::Option< - runtime_types::sp_npos_elections::ElectionScore, + threshold: ::core::primitive::u16, + other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, + maybe_timepoint: ::core::option::Option< + runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, >, - ) -> ::subxt::tx::Payload { + call: runtime_types::polkadot_runtime::RuntimeCall, + max_weight: runtime_types::sp_weights::weight_v2::Weight, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "ElectionProviderMultiPhase", - "set_minimum_untrusted_score", - SetMinimumUntrustedScore { maybe_next_score }, + "Multisig", + "as_multi", + types::AsMulti { + threshold, + other_signatories, + maybe_timepoint, + call: ::std::boxed::Box::new(call), + max_weight, + }, [ - 63u8, 101u8, 105u8, 146u8, 133u8, 162u8, 149u8, 112u8, 150u8, 219u8, - 183u8, 213u8, 234u8, 211u8, 144u8, 74u8, 106u8, 15u8, 62u8, 196u8, - 247u8, 49u8, 20u8, 48u8, 3u8, 105u8, 85u8, 46u8, 76u8, 4u8, 67u8, 81u8, + 172u8, 94u8, 125u8, 12u8, 125u8, 129u8, 89u8, 29u8, 172u8, 187u8, + 194u8, 188u8, 111u8, 34u8, 41u8, 94u8, 237u8, 82u8, 167u8, 33u8, 30u8, + 145u8, 155u8, 185u8, 169u8, 83u8, 60u8, 212u8, 138u8, 184u8, 152u8, + 58u8, ], ) } - #[doc = "Set a solution in the queue, to be handed out to the client of this pallet in the next"] - #[doc = "call to `ElectionProvider::elect`."] + #[doc = "Register approval for a dispatch to be made from a deterministic composite account if"] + #[doc = "approved by a total of `threshold - 1` of `other_signatories`."] #[doc = ""] - #[doc = "This can only be set by `T::ForceOrigin`, and only when the phase is `Emergency`."] + #[doc = "Payment: `DepositBase` will be reserved if this is the first approval, plus"] + #[doc = "`threshold` times `DepositFactor`. It is returned once this dispatch happens or"] + #[doc = "is cancelled."] #[doc = ""] - #[doc = "The solution is not checked for any feasibility and is assumed to be trustworthy, as any"] - #[doc = "feasibility check itself can in principle cause the election process to fail (due to"] - #[doc = "memory/weight constrains)."] - pub fn set_emergency_election_result( - &self, - supports: ::std::vec::Vec<( - ::subxt::utils::AccountId32, - runtime_types::sp_npos_elections::Support<::subxt::utils::AccountId32>, - )>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "ElectionProviderMultiPhase", - "set_emergency_election_result", - SetEmergencyElectionResult { supports }, - [ - 115u8, 255u8, 205u8, 58u8, 153u8, 1u8, 246u8, 8u8, 225u8, 36u8, 66u8, - 144u8, 250u8, 145u8, 70u8, 76u8, 54u8, 63u8, 251u8, 51u8, 214u8, 204u8, - 55u8, 112u8, 46u8, 228u8, 255u8, 250u8, 151u8, 5u8, 44u8, 133u8, - ], - ) - } - #[doc = "Submit a solution for the signed phase."] + #[doc = "The dispatch origin for this call must be _Signed_."] #[doc = ""] - #[doc = "The dispatch origin fo this call must be __signed__."] + #[doc = "- `threshold`: The total number of approvals for this dispatch before it is executed."] + #[doc = "- `other_signatories`: The accounts (other than the sender) who can approve this"] + #[doc = "dispatch. May not be empty."] + #[doc = "- `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is"] + #[doc = "not the first approval, then it must be `Some`, with the timepoint (block number and"] + #[doc = "transaction index) of the first approval transaction."] + #[doc = "- `call_hash`: The hash of the call to be executed."] #[doc = ""] - #[doc = "The solution is potentially queued, based on the claimed score and processed at the end"] - #[doc = "of the signed phase."] + #[doc = "NOTE: If this is the final approval, you will want to use `as_multi` instead."] #[doc = ""] - #[doc = "A deposit is reserved and recorded for the solution. Based on the outcome, the solution"] - #[doc = "might be rewarded, slashed, or get all or a part of the deposit back."] - pub fn submit( + #[doc = "## Complexity"] + #[doc = "- `O(S)`."] + #[doc = "- Up to one balance-reserve or unreserve operation."] + #[doc = "- One passthrough operation, one insert, both `O(S)` where `S` is the number of"] + #[doc = " signatories. `S` is capped by `MaxSignatories`, with weight being proportional."] + #[doc = "- One encode & hash, both of complexity `O(S)`."] + #[doc = "- Up to one binary search and insert (`O(logS + S)`)."] + #[doc = "- I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove."] + #[doc = "- One event."] + #[doc = "- Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit"] + #[doc = " taken for its lifetime of `DepositBase + threshold * DepositFactor`."] + pub fn approve_as_multi( &self, - raw_solution: runtime_types::pallet_election_provider_multi_phase::RawSolution< - runtime_types::polkadot_runtime::NposCompactSolution16, + threshold: ::core::primitive::u16, + other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, + maybe_timepoint: ::core::option::Option< + runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, >, - ) -> ::subxt::tx::Payload { + call_hash: [::core::primitive::u8; 32usize], + max_weight: runtime_types::sp_weights::weight_v2::Weight, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "ElectionProviderMultiPhase", - "submit", - Submit { - raw_solution: ::std::boxed::Box::new(raw_solution), + "Multisig", + "approve_as_multi", + types::ApproveAsMulti { + threshold, + other_signatories, + maybe_timepoint, + call_hash, + max_weight, }, [ - 220u8, 167u8, 40u8, 47u8, 253u8, 244u8, 72u8, 124u8, 30u8, 123u8, - 127u8, 227u8, 2u8, 66u8, 119u8, 64u8, 211u8, 200u8, 210u8, 98u8, 248u8, - 132u8, 68u8, 25u8, 34u8, 182u8, 230u8, 225u8, 241u8, 58u8, 193u8, - 134u8, + 133u8, 113u8, 121u8, 66u8, 218u8, 219u8, 48u8, 64u8, 211u8, 114u8, + 163u8, 193u8, 164u8, 21u8, 140u8, 218u8, 253u8, 237u8, 240u8, 126u8, + 200u8, 213u8, 184u8, 50u8, 187u8, 182u8, 30u8, 52u8, 142u8, 72u8, + 210u8, 101u8, ], ) } - #[doc = "Trigger the governance fallback."] + #[doc = "Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously"] + #[doc = "for this operation will be unreserved on success."] #[doc = ""] - #[doc = "This can only be called when [`Phase::Emergency`] is enabled, as an alternative to"] - #[doc = "calling [`Call::set_emergency_election_result`]."] - pub fn governance_fallback( + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "- `threshold`: The total number of approvals for this dispatch before it is executed."] + #[doc = "- `other_signatories`: The accounts (other than the sender) who can approve this"] + #[doc = "dispatch. May not be empty."] + #[doc = "- `timepoint`: The timepoint (block number and transaction index) of the first approval"] + #[doc = "transaction for this dispatch."] + #[doc = "- `call_hash`: The hash of the call to be executed."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(S)`."] + #[doc = "- Up to one balance-reserve or unreserve operation."] + #[doc = "- One passthrough operation, one insert, both `O(S)` where `S` is the number of"] + #[doc = " signatories. `S` is capped by `MaxSignatories`, with weight being proportional."] + #[doc = "- One encode & hash, both of complexity `O(S)`."] + #[doc = "- One event."] + #[doc = "- I/O: 1 read `O(S)`, one remove."] + #[doc = "- Storage: removes one item."] + pub fn cancel_as_multi( &self, - maybe_max_voters: ::core::option::Option<::core::primitive::u32>, - maybe_max_targets: ::core::option::Option<::core::primitive::u32>, - ) -> ::subxt::tx::Payload { + threshold: ::core::primitive::u16, + other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, + timepoint: runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, + call_hash: [::core::primitive::u8; 32usize], + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "ElectionProviderMultiPhase", - "governance_fallback", - GovernanceFallback { - maybe_max_voters, - maybe_max_targets, + "Multisig", + "cancel_as_multi", + types::CancelAsMulti { + threshold, + other_signatories, + timepoint, + call_hash, }, [ - 206u8, 247u8, 76u8, 85u8, 7u8, 24u8, 231u8, 226u8, 192u8, 143u8, 43u8, - 67u8, 91u8, 202u8, 88u8, 176u8, 130u8, 1u8, 83u8, 229u8, 227u8, 200u8, - 179u8, 4u8, 113u8, 60u8, 99u8, 190u8, 53u8, 226u8, 142u8, 182u8, + 30u8, 25u8, 186u8, 142u8, 168u8, 81u8, 235u8, 164u8, 82u8, 209u8, 66u8, + 129u8, 209u8, 78u8, 172u8, 9u8, 163u8, 222u8, 125u8, 57u8, 2u8, 43u8, + 169u8, 174u8, 159u8, 167u8, 25u8, 226u8, 254u8, 110u8, 80u8, 216u8, ], ) } } } #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::pallet_election_provider_multi_phase::pallet::Event; + pub type Event = runtime_types::pallet_multisig::pallet::Event; pub mod events { use super::runtime_types; #[derive( @@ -20670,75 +20296,15 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A solution was stored with the given compute."] - #[doc = ""] - #[doc = "If the solution is signed, this means that it hasn't yet been processed. If the"] - #[doc = "solution is unsigned, this means that it has also been processed."] - #[doc = ""] - #[doc = "The `bool` is `true` when a previous solution was ejected to make room for this one."] - pub struct SolutionStored { - pub compute: runtime_types::pallet_election_provider_multi_phase::ElectionCompute, - pub prev_ejected: ::core::primitive::bool, - } - impl ::subxt::events::StaticEvent for SolutionStored { - const PALLET: &'static str = "ElectionProviderMultiPhase"; - const EVENT: &'static str = "SolutionStored"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The election has been finalized, with the given computation and score."] - pub struct ElectionFinalized { - pub compute: runtime_types::pallet_election_provider_multi_phase::ElectionCompute, - pub score: runtime_types::sp_npos_elections::ElectionScore, - } - impl ::subxt::events::StaticEvent for ElectionFinalized { - const PALLET: &'static str = "ElectionProviderMultiPhase"; - const EVENT: &'static str = "ElectionFinalized"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "An election failed."] - #[doc = ""] - #[doc = "Not much can be said about which computes failed in the process."] - pub struct ElectionFailed; - impl ::subxt::events::StaticEvent for ElectionFailed { - const PALLET: &'static str = "ElectionProviderMultiPhase"; - const EVENT: &'static str = "ElectionFailed"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "An account has been rewarded for their signed submission being finalized."] - pub struct Rewarded { - pub account: ::subxt::utils::AccountId32, - pub value: ::core::primitive::u128, + #[doc = "A new multisig operation has begun."] + pub struct NewMultisig { + pub approving: ::subxt::utils::AccountId32, + pub multisig: ::subxt::utils::AccountId32, + pub call_hash: [::core::primitive::u8; 32usize], } - impl ::subxt::events::StaticEvent for Rewarded { - const PALLET: &'static str = "ElectionProviderMultiPhase"; - const EVENT: &'static str = "Rewarded"; + impl ::subxt::events::StaticEvent for NewMultisig { + const PALLET: &'static str = "Multisig"; + const EVENT: &'static str = "NewMultisig"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -20750,17 +20316,18 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "An account has been slashed for submitting an invalid signed submission."] - pub struct Slashed { - pub account: ::subxt::utils::AccountId32, - pub value: ::core::primitive::u128, + #[doc = "A multisig operation has been approved by someone."] + pub struct MultisigApproval { + pub approving: ::subxt::utils::AccountId32, + pub timepoint: runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, + pub multisig: ::subxt::utils::AccountId32, + pub call_hash: [::core::primitive::u8; 32usize], } - impl ::subxt::events::StaticEvent for Slashed { - const PALLET: &'static str = "ElectionProviderMultiPhase"; - const EVENT: &'static str = "Slashed"; + impl ::subxt::events::StaticEvent for MultisigApproval { + const PALLET: &'static str = "Multisig"; + const EVENT: &'static str = "MultisigApproval"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -20770,16 +20337,19 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The signed phase of the given round has started."] - pub struct SignedPhaseStarted { - pub round: ::core::primitive::u32, + #[doc = "A multisig operation has been executed."] + pub struct MultisigExecuted { + pub approving: ::subxt::utils::AccountId32, + pub timepoint: runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, + pub multisig: ::subxt::utils::AccountId32, + pub call_hash: [::core::primitive::u8; 32usize], + pub result: ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, } - impl ::subxt::events::StaticEvent for SignedPhaseStarted { - const PALLET: &'static str = "ElectionProviderMultiPhase"; - const EVENT: &'static str = "SignedPhaseStarted"; + impl ::subxt::events::StaticEvent for MultisigExecuted { + const PALLET: &'static str = "Multisig"; + const EVENT: &'static str = "MultisigExecuted"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -20789,626 +20359,526 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The unsigned phase of the given round has started."] - pub struct UnsignedPhaseStarted { - pub round: ::core::primitive::u32, + #[doc = "A multisig operation has been cancelled."] + pub struct MultisigCancelled { + pub cancelling: ::subxt::utils::AccountId32, + pub timepoint: runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, + pub multisig: ::subxt::utils::AccountId32, + pub call_hash: [::core::primitive::u8; 32usize], } - impl ::subxt::events::StaticEvent for UnsignedPhaseStarted { - const PALLET: &'static str = "ElectionProviderMultiPhase"; - const EVENT: &'static str = "UnsignedPhaseStarted"; + impl ::subxt::events::StaticEvent for MultisigCancelled { + const PALLET: &'static str = "Multisig"; + const EVENT: &'static str = "MultisigCancelled"; } } pub mod storage { use super::runtime_types; pub struct StorageApi; impl StorageApi { - #[doc = " Internal counter for the number of rounds."] - #[doc = ""] - #[doc = " This is useful for de-duplication of transactions submitted to the pool, and general"] - #[doc = " diagnostics of the pallet."] - #[doc = ""] - #[doc = " This is merely incremented once per every time that an upstream `elect` is called."] - pub fn round( + #[doc = " The set of open multisig operations."] + pub fn multisigs( &self, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + _1: impl ::std::borrow::Borrow<[::core::primitive::u8; 32usize]>, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - ::subxt::storage::address::Yes, + runtime_types::pallet_multisig::Multisig< + ::core::primitive::u32, + ::core::primitive::u128, + ::subxt::utils::AccountId32, + >, ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( - "ElectionProviderMultiPhase", - "Round", - vec![], + "Multisig", + "Multisigs", + vec![ + ::subxt::storage::address::make_static_storage_map_key(_0.borrow()), + ::subxt::storage::address::make_static_storage_map_key(_1.borrow()), + ], [ - 16u8, 49u8, 176u8, 52u8, 202u8, 111u8, 120u8, 8u8, 217u8, 96u8, 35u8, - 14u8, 233u8, 130u8, 47u8, 98u8, 34u8, 44u8, 166u8, 188u8, 199u8, 210u8, - 21u8, 19u8, 70u8, 96u8, 139u8, 8u8, 53u8, 82u8, 165u8, 239u8, + 69u8, 153u8, 186u8, 204u8, 117u8, 95u8, 119u8, 182u8, 220u8, 87u8, 8u8, + 15u8, 123u8, 83u8, 5u8, 188u8, 115u8, 121u8, 163u8, 96u8, 218u8, 3u8, + 106u8, 44u8, 44u8, 187u8, 46u8, 238u8, 80u8, 203u8, 175u8, 155u8, ], ) } - #[doc = " Current phase."] - pub fn current_phase( + #[doc = " The set of open multisig operations."] + pub fn multisigs_root( &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_election_provider_multi_phase::Phase< + runtime_types::pallet_multisig::Multisig< ::core::primitive::u32, + ::core::primitive::u128, + ::subxt::utils::AccountId32, >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, (), + (), + ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( - "ElectionProviderMultiPhase", - "CurrentPhase", - vec![], + "Multisig", + "Multisigs", + Vec::new(), [ - 236u8, 101u8, 8u8, 52u8, 68u8, 240u8, 74u8, 159u8, 181u8, 53u8, 153u8, - 101u8, 228u8, 81u8, 96u8, 161u8, 34u8, 67u8, 35u8, 28u8, 121u8, 44u8, - 229u8, 45u8, 196u8, 87u8, 73u8, 125u8, 216u8, 245u8, 255u8, 15u8, + 69u8, 153u8, 186u8, 204u8, 117u8, 95u8, 119u8, 182u8, 220u8, 87u8, 8u8, + 15u8, 123u8, 83u8, 5u8, 188u8, 115u8, 121u8, 163u8, 96u8, 218u8, 3u8, + 106u8, 44u8, 44u8, 187u8, 46u8, 238u8, 80u8, 203u8, 175u8, 155u8, ], ) } - #[doc = " Current best solution, signed or unsigned, queued to be returned upon `elect`."] - pub fn queued_solution( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_election_provider_multi_phase::ReadySolution, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "ElectionProviderMultiPhase", - "QueuedSolution", - vec![], + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The base amount of currency needed to reserve for creating a multisig execution or to"] + #[doc = " store a dispatch call for later."] + #[doc = ""] + #[doc = " This is held for an additional storage item whose value size is"] + #[doc = " `4 + sizeof((BlockNumber, Balance, AccountId))` bytes and whose key size is"] + #[doc = " `32 + sizeof(AccountId)` bytes."] + pub fn deposit_base(&self) -> ::subxt::constants::Address<::core::primitive::u128> { + ::subxt::constants::Address::new_static( + "Multisig", + "DepositBase", [ - 11u8, 152u8, 13u8, 167u8, 204u8, 209u8, 171u8, 249u8, 59u8, 250u8, - 58u8, 152u8, 164u8, 121u8, 146u8, 112u8, 241u8, 16u8, 159u8, 251u8, - 209u8, 251u8, 114u8, 29u8, 188u8, 30u8, 84u8, 71u8, 136u8, 173u8, - 145u8, 236u8, + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, + 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, ], ) } - #[doc = " Snapshot data of the round."] + #[doc = " The amount of currency needed per unit threshold when creating a multisig execution."] #[doc = ""] - #[doc = " This is created at the beginning of the signed phase and cleared upon calling `elect`."] - pub fn snapshot( + #[doc = " This is held for adding 32 bytes more into a pre-existing storage value."] + pub fn deposit_factor( &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_election_provider_multi_phase::RoundSnapshot, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "ElectionProviderMultiPhase", - "Snapshot", - vec![], + ) -> ::subxt::constants::Address<::core::primitive::u128> { + ::subxt::constants::Address::new_static( + "Multisig", + "DepositFactor", [ - 239u8, 56u8, 191u8, 77u8, 150u8, 224u8, 248u8, 88u8, 132u8, 224u8, - 164u8, 83u8, 253u8, 36u8, 46u8, 156u8, 72u8, 152u8, 36u8, 206u8, 72u8, - 27u8, 226u8, 87u8, 146u8, 220u8, 93u8, 178u8, 26u8, 115u8, 232u8, 71u8, + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, + 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, ], ) } - #[doc = " Desired number of targets to elect for this round."] - #[doc = ""] - #[doc = " Only exists when [`Snapshot`] is present."] - pub fn desired_targets( + #[doc = " The maximum amount of signatories allowed in the multisig."] + pub fn max_signatories( &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "ElectionProviderMultiPhase", - "DesiredTargets", - vec![], + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "Multisig", + "MaxSignatories", [ - 16u8, 247u8, 4u8, 181u8, 93u8, 79u8, 12u8, 212u8, 146u8, 167u8, 80u8, - 58u8, 118u8, 52u8, 68u8, 87u8, 90u8, 140u8, 31u8, 210u8, 2u8, 116u8, - 220u8, 231u8, 115u8, 112u8, 118u8, 118u8, 68u8, 34u8, 151u8, 165u8, + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, ], ) } - #[doc = " The metadata of the [`RoundSnapshot`]"] - #[doc = ""] - #[doc = " Only exists when [`Snapshot`] is present."] - pub fn snapshot_metadata( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_election_provider_multi_phase::SolutionOrSnapshotSize, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "ElectionProviderMultiPhase", - "SnapshotMetadata", - vec![], - [ - 135u8, 122u8, 60u8, 75u8, 194u8, 240u8, 187u8, 96u8, 240u8, 203u8, - 192u8, 22u8, 117u8, 148u8, 118u8, 24u8, 240u8, 213u8, 94u8, 22u8, - 194u8, 47u8, 181u8, 245u8, 77u8, 149u8, 11u8, 251u8, 117u8, 220u8, - 205u8, 78u8, - ], - ) + } + } + } + pub mod bounties { + use super::root_mod; + use super::runtime_types; + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub type Error = runtime_types::pallet_bounties::pallet::Error; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ProposeBounty { + #[codec(compact)] + pub value: ::core::primitive::u128, + pub description: ::std::vec::Vec<::core::primitive::u8>, } - #[doc = " The next index to be assigned to an incoming signed submission."] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ApproveBounty { + #[codec(compact)] + pub bounty_id: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ProposeCurator { + #[codec(compact)] + pub bounty_id: ::core::primitive::u32, + pub curator: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + #[codec(compact)] + pub fee: ::core::primitive::u128, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct UnassignCurator { + #[codec(compact)] + pub bounty_id: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct AcceptCurator { + #[codec(compact)] + pub bounty_id: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct AwardBounty { + #[codec(compact)] + pub bounty_id: ::core::primitive::u32, + pub beneficiary: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ClaimBounty { + #[codec(compact)] + pub bounty_id: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct CloseBounty { + #[codec(compact)] + pub bounty_id: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ExtendBountyExpiry { + #[codec(compact)] + pub bounty_id: ::core::primitive::u32, + pub remark: ::std::vec::Vec<::core::primitive::u8>, + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Propose a new bounty."] #[doc = ""] - #[doc = " Every accepted submission is assigned a unique index; that index is bound to that particular"] - #[doc = " submission for the duration of the election. On election finalization, the next index is"] - #[doc = " reset to 0."] + #[doc = "The dispatch origin for this call must be _Signed_."] #[doc = ""] - #[doc = " We can't just use `SignedSubmissionIndices.len()`, because that's a bounded set; past its"] - #[doc = " capacity, it will simply saturate. We can't just iterate over `SignedSubmissionsMap`,"] - #[doc = " because iteration is slow. Instead, we store the value here."] - pub fn signed_submission_next_index( + #[doc = "Payment: `TipReportDepositBase` will be reserved from the origin account, as well as"] + #[doc = "`DataDepositPerByte` for each byte in `reason`. It will be unreserved upon approval,"] + #[doc = "or slashed when rejected."] + #[doc = ""] + #[doc = "- `curator`: The curator account whom will manage this bounty."] + #[doc = "- `fee`: The curator fee."] + #[doc = "- `value`: The total payment amount of this bounty, curator fee included."] + #[doc = "- `description`: The description of this bounty."] + pub fn propose_bounty( &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "ElectionProviderMultiPhase", - "SignedSubmissionNextIndex", - vec![], + value: ::core::primitive::u128, + description: ::std::vec::Vec<::core::primitive::u8>, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Bounties", + "propose_bounty", + types::ProposeBounty { value, description }, [ - 242u8, 11u8, 157u8, 105u8, 96u8, 7u8, 31u8, 20u8, 51u8, 141u8, 182u8, - 180u8, 13u8, 172u8, 155u8, 59u8, 42u8, 238u8, 115u8, 8u8, 6u8, 137u8, - 45u8, 2u8, 123u8, 187u8, 53u8, 215u8, 19u8, 129u8, 54u8, 22u8, + 99u8, 160u8, 94u8, 74u8, 105u8, 161u8, 123u8, 239u8, 241u8, 117u8, + 97u8, 99u8, 84u8, 101u8, 87u8, 3u8, 88u8, 175u8, 75u8, 59u8, 114u8, + 87u8, 18u8, 113u8, 126u8, 26u8, 42u8, 104u8, 201u8, 128u8, 102u8, + 219u8, ], ) } - #[doc = " A sorted, bounded vector of `(score, block_number, index)`, where each `index` points to a"] - #[doc = " value in `SignedSubmissions`."] + #[doc = "Approve a bounty proposal. At a later time, the bounty will be funded and become active"] + #[doc = "and the original deposit will be returned."] #[doc = ""] - #[doc = " We never need to process more than a single signed submission at a time. Signed submissions"] - #[doc = " can be quite large, so we're willing to pay the cost of multiple database accesses to access"] - #[doc = " them one at a time instead of reading and decoding all of them at once."] - pub fn signed_submission_indices( + #[doc = "May only be called from `T::SpendOrigin`."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- O(1)."] + pub fn approve_bounty( &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::sp_core::bounded::bounded_vec::BoundedVec<( - runtime_types::sp_npos_elections::ElectionScore, - ::core::primitive::u32, - ::core::primitive::u32, - )>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "ElectionProviderMultiPhase", - "SignedSubmissionIndices", - vec![], + bounty_id: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Bounties", + "approve_bounty", + types::ApproveBounty { bounty_id }, [ - 228u8, 166u8, 94u8, 248u8, 71u8, 26u8, 125u8, 81u8, 32u8, 22u8, 46u8, - 185u8, 209u8, 123u8, 46u8, 17u8, 152u8, 149u8, 222u8, 125u8, 112u8, - 230u8, 29u8, 177u8, 162u8, 214u8, 66u8, 38u8, 170u8, 121u8, 129u8, - 100u8, + 82u8, 228u8, 232u8, 103u8, 198u8, 173u8, 190u8, 148u8, 159u8, 86u8, + 48u8, 4u8, 32u8, 169u8, 1u8, 129u8, 96u8, 145u8, 235u8, 68u8, 48u8, + 34u8, 5u8, 1u8, 76u8, 26u8, 100u8, 228u8, 92u8, 198u8, 183u8, 173u8, ], ) } - #[doc = " Unchecked, signed solutions."] + #[doc = "Assign a curator to a funded bounty."] #[doc = ""] - #[doc = " Together with `SubmissionIndices`, this stores a bounded set of `SignedSubmissions` while"] - #[doc = " allowing us to keep only a single one in memory at a time."] + #[doc = "May only be called from `T::SpendOrigin`."] #[doc = ""] - #[doc = " Twox note: the key of the map is an auto-incrementing index which users cannot inspect or"] - #[doc = " affect; we shouldn't need a cryptographically secure hasher."] - pub fn signed_submissions_map( + #[doc = "## Complexity"] + #[doc = "- O(1)."] + pub fn propose_curator( &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_election_provider_multi_phase::signed::SignedSubmission< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - runtime_types::polkadot_runtime::NposCompactSolution16, - >, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "ElectionProviderMultiPhase", - "SignedSubmissionsMap", - vec![::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - )], + bounty_id: ::core::primitive::u32, + curator: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + fee: ::core::primitive::u128, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Bounties", + "propose_curator", + types::ProposeCurator { + bounty_id, + curator, + fee, + }, [ - 84u8, 65u8, 205u8, 191u8, 143u8, 246u8, 239u8, 27u8, 243u8, 54u8, - 250u8, 8u8, 125u8, 32u8, 241u8, 141u8, 210u8, 225u8, 56u8, 101u8, - 241u8, 52u8, 157u8, 29u8, 13u8, 155u8, 73u8, 132u8, 118u8, 53u8, 2u8, - 135u8, + 123u8, 148u8, 21u8, 204u8, 216u8, 6u8, 47u8, 83u8, 182u8, 30u8, 171u8, + 48u8, 193u8, 200u8, 197u8, 147u8, 111u8, 88u8, 14u8, 242u8, 66u8, + 175u8, 241u8, 208u8, 95u8, 151u8, 41u8, 46u8, 213u8, 188u8, 65u8, + 196u8, ], ) } - #[doc = " Unchecked, signed solutions."] + #[doc = "Unassign curator from a bounty."] #[doc = ""] - #[doc = " Together with `SubmissionIndices`, this stores a bounded set of `SignedSubmissions` while"] - #[doc = " allowing us to keep only a single one in memory at a time."] + #[doc = "This function can only be called by the `RejectOrigin` a signed origin."] #[doc = ""] - #[doc = " Twox note: the key of the map is an auto-incrementing index which users cannot inspect or"] - #[doc = " affect; we shouldn't need a cryptographically secure hasher."] - pub fn signed_submissions_map_root( + #[doc = "If this function is called by the `RejectOrigin`, we assume that the curator is"] + #[doc = "malicious or inactive. As a result, we will slash the curator when possible."] + #[doc = ""] + #[doc = "If the origin is the curator, we take this as a sign they are unable to do their job and"] + #[doc = "they willingly give up. We could slash them, but for now we allow them to recover their"] + #[doc = "deposit and exit without issue. (We may want to change this if it is abused.)"] + #[doc = ""] + #[doc = "Finally, the origin can be anyone if and only if the curator is \"inactive\". This allows"] + #[doc = "anyone in the community to call out that a curator is not doing their due diligence, and"] + #[doc = "we should pick a new curator. In this case the curator should also be slashed."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- O(1)."] + pub fn unassign_curator( &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_election_provider_multi_phase::signed::SignedSubmission< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - runtime_types::polkadot_runtime::NposCompactSolution16, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "ElectionProviderMultiPhase", - "SignedSubmissionsMap", - Vec::new(), + bounty_id: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Bounties", + "unassign_curator", + types::UnassignCurator { bounty_id }, [ - 84u8, 65u8, 205u8, 191u8, 143u8, 246u8, 239u8, 27u8, 243u8, 54u8, - 250u8, 8u8, 125u8, 32u8, 241u8, 141u8, 210u8, 225u8, 56u8, 101u8, - 241u8, 52u8, 157u8, 29u8, 13u8, 155u8, 73u8, 132u8, 118u8, 53u8, 2u8, - 135u8, + 218u8, 241u8, 247u8, 89u8, 95u8, 120u8, 93u8, 18u8, 85u8, 114u8, 158u8, + 254u8, 68u8, 77u8, 230u8, 186u8, 230u8, 201u8, 63u8, 223u8, 28u8, + 173u8, 244u8, 82u8, 113u8, 177u8, 99u8, 27u8, 207u8, 247u8, 207u8, + 213u8, ], ) } - #[doc = " The minimum score that each 'untrusted' solution must attain in order to be considered"] - #[doc = " feasible."] + #[doc = "Accept the curator role for a bounty."] + #[doc = "A deposit will be reserved from curator and refund upon successful payout."] #[doc = ""] - #[doc = " Can be set via `set_minimum_untrusted_score`."] - pub fn minimum_untrusted_score( + #[doc = "May only be called from the curator."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- O(1)."] + pub fn accept_curator( &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::sp_npos_elections::ElectionScore, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "ElectionProviderMultiPhase", - "MinimumUntrustedScore", - vec![], + bounty_id: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Bounties", + "accept_curator", + types::AcceptCurator { bounty_id }, [ - 77u8, 235u8, 181u8, 45u8, 230u8, 12u8, 0u8, 179u8, 152u8, 38u8, 74u8, - 199u8, 47u8, 84u8, 85u8, 55u8, 171u8, 226u8, 217u8, 125u8, 17u8, 194u8, - 95u8, 157u8, 73u8, 245u8, 75u8, 130u8, 248u8, 7u8, 53u8, 226u8, + 106u8, 96u8, 22u8, 67u8, 52u8, 109u8, 180u8, 225u8, 122u8, 253u8, + 209u8, 214u8, 132u8, 131u8, 247u8, 131u8, 162u8, 51u8, 144u8, 30u8, + 12u8, 126u8, 50u8, 152u8, 229u8, 119u8, 54u8, 116u8, 112u8, 235u8, + 34u8, 166u8, ], ) } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " Duration of the unsigned phase."] - pub fn unsigned_phase( + #[doc = "Award bounty to a beneficiary account. The beneficiary will be able to claim the funds"] + #[doc = "after a delay."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be the curator of this bounty."] + #[doc = ""] + #[doc = "- `bounty_id`: Bounty ID to award."] + #[doc = "- `beneficiary`: The beneficiary account whom will receive the payout."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- O(1)."] + pub fn award_bounty( &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "ElectionProviderMultiPhase", - "UnsignedPhase", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, - ], - ) - } - #[doc = " Duration of the signed phase."] - pub fn signed_phase(&self) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "ElectionProviderMultiPhase", - "SignedPhase", + bounty_id: ::core::primitive::u32, + beneficiary: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Bounties", + "award_bounty", + types::AwardBounty { + bounty_id, + beneficiary, + }, [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, + 203u8, 164u8, 214u8, 242u8, 1u8, 11u8, 217u8, 32u8, 189u8, 136u8, 29u8, + 230u8, 88u8, 17u8, 134u8, 189u8, 15u8, 204u8, 223u8, 20u8, 168u8, + 182u8, 129u8, 48u8, 83u8, 25u8, 125u8, 25u8, 209u8, 155u8, 170u8, 68u8, ], ) } - #[doc = " The minimum amount of improvement to the solution score that defines a solution as"] - #[doc = " \"better\" in the Signed phase."] - pub fn better_signed_threshold( + #[doc = "Claim the payout from an awarded bounty after payout delay."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be the beneficiary of this bounty."] + #[doc = ""] + #[doc = "- `bounty_id`: Bounty ID to claim."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- O(1)."] + pub fn claim_bounty( &self, - ) -> ::subxt::constants::Address - { - ::subxt::constants::Address::new_static( - "ElectionProviderMultiPhase", - "BetterSignedThreshold", + bounty_id: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Bounties", + "claim_bounty", + types::ClaimBounty { bounty_id }, [ - 225u8, 236u8, 95u8, 157u8, 90u8, 94u8, 106u8, 192u8, 254u8, 19u8, 87u8, - 80u8, 16u8, 62u8, 42u8, 204u8, 136u8, 106u8, 225u8, 53u8, 212u8, 52u8, - 177u8, 79u8, 4u8, 116u8, 201u8, 104u8, 222u8, 75u8, 86u8, 227u8, + 102u8, 95u8, 8u8, 89u8, 4u8, 126u8, 189u8, 28u8, 241u8, 16u8, 125u8, + 218u8, 42u8, 92u8, 177u8, 91u8, 8u8, 235u8, 33u8, 48u8, 64u8, 115u8, + 177u8, 95u8, 242u8, 97u8, 181u8, 50u8, 68u8, 37u8, 59u8, 85u8, ], ) } - #[doc = " The minimum amount of improvement to the solution score that defines a solution as"] - #[doc = " \"better\" in the Unsigned phase."] - pub fn better_unsigned_threshold( + #[doc = "Cancel a proposed or active bounty. All the funds will be sent to treasury and"] + #[doc = "the curator deposit will be unreserved if possible."] + #[doc = ""] + #[doc = "Only `T::RejectOrigin` is able to cancel a bounty."] + #[doc = ""] + #[doc = "- `bounty_id`: Bounty ID to cancel."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- O(1)."] + pub fn close_bounty( &self, - ) -> ::subxt::constants::Address - { - ::subxt::constants::Address::new_static( - "ElectionProviderMultiPhase", - "BetterUnsignedThreshold", + bounty_id: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Bounties", + "close_bounty", + types::CloseBounty { bounty_id }, [ - 225u8, 236u8, 95u8, 157u8, 90u8, 94u8, 106u8, 192u8, 254u8, 19u8, 87u8, - 80u8, 16u8, 62u8, 42u8, 204u8, 136u8, 106u8, 225u8, 53u8, 212u8, 52u8, - 177u8, 79u8, 4u8, 116u8, 201u8, 104u8, 222u8, 75u8, 86u8, 227u8, + 64u8, 113u8, 151u8, 228u8, 90u8, 55u8, 251u8, 63u8, 27u8, 211u8, 119u8, + 229u8, 137u8, 137u8, 183u8, 240u8, 241u8, 146u8, 69u8, 169u8, 124u8, + 220u8, 236u8, 111u8, 98u8, 188u8, 100u8, 52u8, 127u8, 245u8, 244u8, + 92u8, ], ) } - #[doc = " The repeat threshold of the offchain worker."] + #[doc = "Extend the expiry time of an active bounty."] #[doc = ""] - #[doc = " For example, if it is 5, that means that at least 5 blocks will elapse between attempts"] - #[doc = " to submit the worker's solution."] - pub fn offchain_repeat( + #[doc = "The dispatch origin for this call must be the curator of this bounty."] + #[doc = ""] + #[doc = "- `bounty_id`: Bounty ID to extend."] + #[doc = "- `remark`: additional information."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- O(1)."] + pub fn extend_bounty_expiry( &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "ElectionProviderMultiPhase", - "OffchainRepeat", + bounty_id: ::core::primitive::u32, + remark: ::std::vec::Vec<::core::primitive::u8>, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Bounties", + "extend_bounty_expiry", + types::ExtendBountyExpiry { bounty_id, remark }, [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, - ], - ) - } - #[doc = " The priority of the unsigned transaction submitted in the unsigned-phase"] - pub fn miner_tx_priority( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u64> { - ::subxt::constants::Address::new_static( - "ElectionProviderMultiPhase", - "MinerTxPriority", - [ - 128u8, 214u8, 205u8, 242u8, 181u8, 142u8, 124u8, 231u8, 190u8, 146u8, - 59u8, 226u8, 157u8, 101u8, 103u8, 117u8, 249u8, 65u8, 18u8, 191u8, - 103u8, 119u8, 53u8, 85u8, 81u8, 96u8, 220u8, 42u8, 184u8, 239u8, 42u8, - 246u8, - ], - ) - } - #[doc = " Maximum number of signed submissions that can be queued."] - #[doc = ""] - #[doc = " It is best to avoid adjusting this during an election, as it impacts downstream data"] - #[doc = " structures. In particular, `SignedSubmissionIndices` is bounded on this value. If you"] - #[doc = " update this value during an election, you _must_ ensure that"] - #[doc = " `SignedSubmissionIndices.len()` is less than or equal to the new value. Otherwise,"] - #[doc = " attempts to submit new solutions may cause a runtime panic."] - pub fn signed_max_submissions( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "ElectionProviderMultiPhase", - "SignedMaxSubmissions", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, - ], - ) - } - #[doc = " Maximum weight of a signed solution."] - #[doc = ""] - #[doc = " If [`Config::MinerConfig`] is being implemented to submit signed solutions (outside of"] - #[doc = " this pallet), then [`MinerConfig::solution_weight`] is used to compare against"] - #[doc = " this value."] - pub fn signed_max_weight( - &self, - ) -> ::subxt::constants::Address - { - ::subxt::constants::Address::new_static( - "ElectionProviderMultiPhase", - "SignedMaxWeight", - [ - 206u8, 61u8, 253u8, 247u8, 163u8, 40u8, 161u8, 52u8, 134u8, 140u8, - 206u8, 83u8, 44u8, 166u8, 226u8, 115u8, 181u8, 14u8, 227u8, 130u8, - 210u8, 32u8, 85u8, 29u8, 230u8, 97u8, 130u8, 165u8, 147u8, 134u8, - 106u8, 76u8, - ], - ) - } - #[doc = " The maximum amount of unchecked solutions to refund the call fee for."] - pub fn signed_max_refunds( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "ElectionProviderMultiPhase", - "SignedMaxRefunds", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, - ], - ) - } - #[doc = " Base reward for a signed solution"] - pub fn signed_reward_base( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::Address::new_static( - "ElectionProviderMultiPhase", - "SignedRewardBase", - [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, - 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, - 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, - ], - ) - } - #[doc = " Base deposit for a signed solution."] - pub fn signed_deposit_base( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::Address::new_static( - "ElectionProviderMultiPhase", - "SignedDepositBase", - [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, - 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, - 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, - ], - ) - } - #[doc = " Per-byte deposit for a signed solution."] - pub fn signed_deposit_byte( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::Address::new_static( - "ElectionProviderMultiPhase", - "SignedDepositByte", - [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, - 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, - 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, - ], - ) - } - #[doc = " Per-weight deposit for a signed solution."] - pub fn signed_deposit_weight( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::Address::new_static( - "ElectionProviderMultiPhase", - "SignedDepositWeight", - [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, - 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, - 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, - ], - ) - } - #[doc = " The maximum number of electing voters to put in the snapshot. At the moment, snapshots"] - #[doc = " are only over a single block, but once multi-block elections are introduced they will"] - #[doc = " take place over multiple blocks."] - pub fn max_electing_voters( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "ElectionProviderMultiPhase", - "MaxElectingVoters", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, - ], - ) - } - #[doc = " The maximum number of electable targets to put in the snapshot."] - pub fn max_electable_targets( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u16> { - ::subxt::constants::Address::new_static( - "ElectionProviderMultiPhase", - "MaxElectableTargets", - [ - 116u8, 33u8, 2u8, 170u8, 181u8, 147u8, 171u8, 169u8, 167u8, 227u8, - 41u8, 144u8, 11u8, 236u8, 82u8, 100u8, 74u8, 60u8, 184u8, 72u8, 169u8, - 90u8, 208u8, 135u8, 15u8, 117u8, 10u8, 123u8, 128u8, 193u8, 29u8, 70u8, - ], - ) - } - #[doc = " The maximum number of winners that can be elected by this `ElectionProvider`"] - #[doc = " implementation."] - #[doc = ""] - #[doc = " Note: This must always be greater or equal to `T::DataProvider::desired_targets()`."] - pub fn max_winners(&self) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "ElectionProviderMultiPhase", - "MaxWinners", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, - ], - ) - } - pub fn miner_max_length( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "ElectionProviderMultiPhase", - "MinerMaxLength", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, - ], - ) - } - pub fn miner_max_weight( - &self, - ) -> ::subxt::constants::Address - { - ::subxt::constants::Address::new_static( - "ElectionProviderMultiPhase", - "MinerMaxWeight", - [ - 206u8, 61u8, 253u8, 247u8, 163u8, 40u8, 161u8, 52u8, 134u8, 140u8, - 206u8, 83u8, 44u8, 166u8, 226u8, 115u8, 181u8, 14u8, 227u8, 130u8, - 210u8, 32u8, 85u8, 29u8, 230u8, 97u8, 130u8, 165u8, 147u8, 134u8, - 106u8, 76u8, - ], - ) - } - pub fn miner_max_votes_per_voter( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "ElectionProviderMultiPhase", - "MinerMaxVotesPerVoter", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, + 97u8, 69u8, 157u8, 39u8, 59u8, 72u8, 79u8, 88u8, 104u8, 119u8, 91u8, + 26u8, 73u8, 216u8, 174u8, 95u8, 254u8, 214u8, 63u8, 138u8, 100u8, + 112u8, 185u8, 81u8, 159u8, 247u8, 221u8, 60u8, 87u8, 40u8, 80u8, 202u8, ], ) } } } - } - pub mod voter_list { - use super::root_mod; - use super::runtime_types; - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub type Error = runtime_types::pallet_bags_list::pallet::Error; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::root_mod; + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub type Event = runtime_types::pallet_bounties::pallet::Event; + pub mod events { use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -21418,8 +20888,13 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Rebag { - pub dislocated: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + #[doc = "New bounty proposal."] + pub struct BountyProposed { + pub index: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for BountyProposed { + const PALLET: &'static str = "Bounties"; + const EVENT: &'static str = "BountyProposed"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -21431,68 +20906,17 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct PutInFrontOf { - pub lighter: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + #[doc = "A bounty proposal was rejected; funds were slashed."] + pub struct BountyRejected { + pub index: ::core::primitive::u32, + pub bond: ::core::primitive::u128, } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Declare that some `dislocated` account has, through rewards or penalties, sufficiently"] - #[doc = "changed its score that it should properly fall into a different bag than its current"] - #[doc = "one."] - #[doc = ""] - #[doc = "Anyone can call this function about any potentially dislocated account."] - #[doc = ""] - #[doc = "Will always update the stored score of `dislocated` to the correct score, based on"] - #[doc = "`ScoreProvider`."] - #[doc = ""] - #[doc = "If `dislocated` does not exists, it returns an error."] - pub fn rebag( - &self, - dislocated: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "VoterList", - "rebag", - Rebag { dislocated }, - [ - 35u8, 182u8, 31u8, 22u8, 190u8, 187u8, 31u8, 138u8, 60u8, 48u8, 236u8, - 16u8, 191u8, 143u8, 52u8, 110u8, 228u8, 43u8, 116u8, 13u8, 171u8, - 108u8, 112u8, 123u8, 252u8, 231u8, 132u8, 97u8, 195u8, 148u8, 252u8, - 241u8, - ], - ) - } - #[doc = "Move the caller's Id directly in front of `lighter`."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and can only be called by the Id of"] - #[doc = "the account going in front of `lighter`."] - #[doc = ""] - #[doc = "Only works if"] - #[doc = "- both nodes are within the same bag,"] - #[doc = "- and `origin` has a greater `Score` than `lighter`."] - pub fn put_in_front_of( - &self, - lighter: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "VoterList", - "put_in_front_of", - PutInFrontOf { lighter }, - [ - 184u8, 194u8, 39u8, 91u8, 28u8, 220u8, 76u8, 199u8, 64u8, 252u8, 233u8, - 241u8, 74u8, 19u8, 246u8, 190u8, 108u8, 227u8, 77u8, 162u8, 225u8, - 230u8, 101u8, 72u8, 159u8, 217u8, 133u8, 107u8, 84u8, 83u8, 81u8, - 227u8, - ], - ) - } + impl ::subxt::events::StaticEvent for BountyRejected { + const PALLET: &'static str = "Bounties"; + const EVENT: &'static str = "BountyRejected"; } - } - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::pallet_bags_list::pallet::Event; - pub mod events { - use super::runtime_types; #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -21502,15 +20926,13 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Moved an account from one bag to another."] - pub struct Rebagged { - pub who: ::subxt::utils::AccountId32, - pub from: ::core::primitive::u64, - pub to: ::core::primitive::u64, + #[doc = "A bounty proposal is funded and became active."] + pub struct BountyBecameActive { + pub index: ::core::primitive::u32, } - impl ::subxt::events::StaticEvent for Rebagged { - const PALLET: &'static str = "VoterList"; - const EVENT: &'static str = "Rebagged"; + impl ::subxt::events::StaticEvent for BountyBecameActive { + const PALLET: &'static str = "Bounties"; + const EVENT: &'static str = "BountyBecameActive"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -21522,864 +20944,797 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Updated the score of some account to the given amount."] - pub struct ScoreUpdated { - pub who: ::subxt::utils::AccountId32, - pub new_score: ::core::primitive::u64, + #[doc = "A bounty is awarded to a beneficiary."] + pub struct BountyAwarded { + pub index: ::core::primitive::u32, + pub beneficiary: ::subxt::utils::AccountId32, } - impl ::subxt::events::StaticEvent for ScoreUpdated { - const PALLET: &'static str = "VoterList"; - const EVENT: &'static str = "ScoreUpdated"; + impl ::subxt::events::StaticEvent for BountyAwarded { + const PALLET: &'static str = "Bounties"; + const EVENT: &'static str = "BountyAwarded"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A bounty is claimed by beneficiary."] + pub struct BountyClaimed { + pub index: ::core::primitive::u32, + pub payout: ::core::primitive::u128, + pub beneficiary: ::subxt::utils::AccountId32, + } + impl ::subxt::events::StaticEvent for BountyClaimed { + const PALLET: &'static str = "Bounties"; + const EVENT: &'static str = "BountyClaimed"; + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A bounty is cancelled."] + pub struct BountyCanceled { + pub index: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for BountyCanceled { + const PALLET: &'static str = "Bounties"; + const EVENT: &'static str = "BountyCanceled"; + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A bounty expiry is extended."] + pub struct BountyExtended { + pub index: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for BountyExtended { + const PALLET: &'static str = "Bounties"; + const EVENT: &'static str = "BountyExtended"; } } pub mod storage { use super::runtime_types; pub struct StorageApi; impl StorageApi { - #[doc = " A single node, within some bag."] - #[doc = ""] - #[doc = " Nodes store links forward and back within their respective bags."] - pub fn list_nodes( + #[doc = " Number of bounty proposals that have been made."] + pub fn bounty_count( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_bags_list::list::Node, + ::core::primitive::u32, ::subxt::storage::address::Yes, - (), ::subxt::storage::address::Yes, + (), > { ::subxt::storage::address::Address::new_static( - "VoterList", - "ListNodes", - vec![::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - )], + "Bounties", + "BountyCount", + vec![], [ - 176u8, 186u8, 93u8, 51u8, 100u8, 184u8, 240u8, 29u8, 70u8, 3u8, 117u8, - 47u8, 23u8, 66u8, 231u8, 234u8, 53u8, 8u8, 234u8, 175u8, 181u8, 8u8, - 161u8, 154u8, 48u8, 178u8, 147u8, 227u8, 122u8, 115u8, 57u8, 97u8, + 5u8, 188u8, 134u8, 220u8, 64u8, 49u8, 188u8, 98u8, 185u8, 186u8, 230u8, + 65u8, 247u8, 199u8, 28u8, 178u8, 202u8, 193u8, 41u8, 83u8, 115u8, + 253u8, 182u8, 123u8, 92u8, 138u8, 12u8, 31u8, 31u8, 213u8, 23u8, 118u8, ], ) } - #[doc = " A single node, within some bag."] - #[doc = ""] - #[doc = " Nodes store links forward and back within their respective bags."] - pub fn list_nodes_root( + #[doc = " Bounties that have been made."] + pub fn bounties( &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_bags_list::list::Node, - (), + runtime_types::pallet_bounties::Bounty< + ::subxt::utils::AccountId32, + ::core::primitive::u128, + ::core::primitive::u32, + >, + ::subxt::storage::address::Yes, (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( - "VoterList", - "ListNodes", - Vec::new(), + "Bounties", + "Bounties", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], [ - 176u8, 186u8, 93u8, 51u8, 100u8, 184u8, 240u8, 29u8, 70u8, 3u8, 117u8, - 47u8, 23u8, 66u8, 231u8, 234u8, 53u8, 8u8, 234u8, 175u8, 181u8, 8u8, - 161u8, 154u8, 48u8, 178u8, 147u8, 227u8, 122u8, 115u8, 57u8, 97u8, + 111u8, 149u8, 33u8, 54u8, 172u8, 143u8, 41u8, 231u8, 184u8, 255u8, + 238u8, 206u8, 87u8, 142u8, 84u8, 10u8, 236u8, 141u8, 190u8, 193u8, + 72u8, 170u8, 19u8, 110u8, 135u8, 136u8, 220u8, 11u8, 99u8, 126u8, + 225u8, 208u8, ], ) } - #[doc = "Counter for the related counted storage map"] - pub fn counter_for_list_nodes( + #[doc = " Bounties that have been made."] + pub fn bounties_root( &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, + runtime_types::pallet_bounties::Bounty< + ::subxt::utils::AccountId32, + ::core::primitive::u128, + ::core::primitive::u32, + >, + (), (), + ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( - "VoterList", - "CounterForListNodes", - vec![], + "Bounties", + "Bounties", + Vec::new(), [ - 156u8, 168u8, 97u8, 33u8, 84u8, 117u8, 220u8, 89u8, 62u8, 182u8, 24u8, - 88u8, 231u8, 244u8, 41u8, 19u8, 210u8, 131u8, 87u8, 0u8, 241u8, 230u8, - 160u8, 142u8, 128u8, 153u8, 83u8, 36u8, 88u8, 247u8, 70u8, 130u8, + 111u8, 149u8, 33u8, 54u8, 172u8, 143u8, 41u8, 231u8, 184u8, 255u8, + 238u8, 206u8, 87u8, 142u8, 84u8, 10u8, 236u8, 141u8, 190u8, 193u8, + 72u8, 170u8, 19u8, 110u8, 135u8, 136u8, 220u8, 11u8, 99u8, 126u8, + 225u8, 208u8, ], ) } - #[doc = " A bag stored in storage."] - #[doc = ""] - #[doc = " Stores a `Bag` struct, which stores head and tail pointers to itself."] - pub fn list_bags( + #[doc = " The description of each bounty."] + pub fn bounty_descriptions( &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u64>, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_bags_list::list::Bag, + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, ::subxt::storage::address::Yes, (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( - "VoterList", - "ListBags", + "Bounties", + "BountyDescriptions", vec![::subxt::storage::address::make_static_storage_map_key( _0.borrow(), )], [ - 38u8, 86u8, 63u8, 92u8, 85u8, 59u8, 225u8, 244u8, 14u8, 155u8, 76u8, - 249u8, 153u8, 140u8, 179u8, 7u8, 96u8, 170u8, 236u8, 179u8, 4u8, 18u8, - 232u8, 146u8, 216u8, 51u8, 135u8, 116u8, 196u8, 117u8, 143u8, 153u8, + 252u8, 0u8, 9u8, 225u8, 13u8, 135u8, 7u8, 121u8, 154u8, 155u8, 116u8, + 83u8, 160u8, 37u8, 72u8, 11u8, 72u8, 0u8, 248u8, 73u8, 158u8, 84u8, + 125u8, 221u8, 176u8, 231u8, 100u8, 239u8, 111u8, 22u8, 29u8, 13u8, ], ) } - #[doc = " A bag stored in storage."] - #[doc = ""] - #[doc = " Stores a `Bag` struct, which stores head and tail pointers to itself."] - pub fn list_bags_root( + #[doc = " The description of each bounty."] + pub fn bounty_descriptions_root( &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_bags_list::list::Bag, + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, (), (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( - "VoterList", - "ListBags", + "Bounties", + "BountyDescriptions", Vec::new(), [ - 38u8, 86u8, 63u8, 92u8, 85u8, 59u8, 225u8, 244u8, 14u8, 155u8, 76u8, - 249u8, 153u8, 140u8, 179u8, 7u8, 96u8, 170u8, 236u8, 179u8, 4u8, 18u8, - 232u8, 146u8, 216u8, 51u8, 135u8, 116u8, 196u8, 117u8, 143u8, 153u8, + 252u8, 0u8, 9u8, 225u8, 13u8, 135u8, 7u8, 121u8, 154u8, 155u8, 116u8, + 83u8, 160u8, 37u8, 72u8, 11u8, 72u8, 0u8, 248u8, 73u8, 158u8, 84u8, + 125u8, 221u8, 176u8, 231u8, 100u8, 239u8, 111u8, 22u8, 29u8, 13u8, ], ) } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " The list of thresholds separating the various bags."] - #[doc = ""] - #[doc = " Ids are separated into unsorted bags according to their score. This specifies the"] - #[doc = " thresholds separating the bags. An id's bag is the largest bag for which the id's score"] - #[doc = " is less than or equal to its upper threshold."] - #[doc = ""] - #[doc = " When ids are iterated, higher bags are iterated completely before lower bags. This means"] - #[doc = " that iteration is _semi-sorted_: ids of higher score tend to come before ids of lower"] - #[doc = " score, but peer ids within a particular bag are sorted in insertion order."] - #[doc = ""] - #[doc = " # Expressing the constant"] - #[doc = ""] - #[doc = " This constant must be sorted in strictly increasing order. Duplicate items are not"] - #[doc = " permitted."] - #[doc = ""] - #[doc = " There is an implied upper limit of `Score::MAX`; that value does not need to be"] - #[doc = " specified within the bag. For any two threshold lists, if one ends with"] - #[doc = " `Score::MAX`, the other one does not, and they are otherwise equal, the two"] - #[doc = " lists will behave identically."] - #[doc = ""] - #[doc = " # Calculation"] - #[doc = ""] - #[doc = " It is recommended to generate the set of thresholds in a geometric series, such that"] - #[doc = " there exists some constant ratio such that `threshold[k + 1] == (threshold[k] *"] - #[doc = " constant_ratio).max(threshold[k] + 1)` for all `k`."] - #[doc = ""] - #[doc = " The helpers in the `/utils/frame/generate-bags` module can simplify this calculation."] - #[doc = ""] - #[doc = " # Examples"] - #[doc = ""] - #[doc = " - If `BagThresholds::get().is_empty()`, then all ids are put into the same bag, and"] - #[doc = " iteration is strictly in insertion order."] - #[doc = " - If `BagThresholds::get().len() == 64`, and the thresholds are determined according to"] - #[doc = " the procedure given above, then the constant ratio is equal to 2."] - #[doc = " - If `BagThresholds::get().len() == 200`, and the thresholds are determined according to"] - #[doc = " the procedure given above, then the constant ratio is approximately equal to 1.248."] - #[doc = " - If the threshold list begins `[1, 2, 3, ...]`, then an id with score 0 or 1 will fall"] - #[doc = " into bag 0, an id with score 2 will fall into bag 1, etc."] - #[doc = ""] - #[doc = " # Migration"] - #[doc = ""] - #[doc = " In the event that this list ever changes, a copy of the old bags list must be retained."] - #[doc = " With that `List::migrate` can be called, which will perform the appropriate migration."] - pub fn bag_thresholds( + #[doc = " Bounty indices that have been approved but not yet funded."] + pub fn bounty_approvals( &self, - ) -> ::subxt::constants::Address<::std::vec::Vec<::core::primitive::u64>> - { - ::subxt::constants::Address::new_static( - "VoterList", - "BagThresholds", + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u32, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "Bounties", + "BountyApprovals", + vec![], [ - 103u8, 102u8, 255u8, 165u8, 124u8, 54u8, 5u8, 172u8, 112u8, 234u8, - 25u8, 175u8, 178u8, 19u8, 251u8, 73u8, 91u8, 192u8, 227u8, 81u8, 249u8, - 45u8, 126u8, 116u8, 7u8, 37u8, 9u8, 200u8, 167u8, 182u8, 12u8, 131u8, + 64u8, 93u8, 54u8, 94u8, 122u8, 9u8, 246u8, 86u8, 234u8, 30u8, 125u8, + 132u8, 49u8, 128u8, 1u8, 219u8, 241u8, 13u8, 217u8, 186u8, 48u8, 21u8, + 5u8, 227u8, 71u8, 157u8, 128u8, 226u8, 214u8, 49u8, 249u8, 183u8, ], ) } } } - } - pub mod nomination_pools { - use super::root_mod; - use super::runtime_types; - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub type Error = runtime_types::pallet_nomination_pools::pallet::Error; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::root_mod; + pub mod constants { use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Join { - #[codec(compact)] - pub amount: ::core::primitive::u128, - pub pool_id: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct BondExtra { - pub extra: - runtime_types::pallet_nomination_pools::BondExtra<::core::primitive::u128>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ClaimPayout; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Unbond { - pub member_account: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - #[codec(compact)] - pub unbonding_points: ::core::primitive::u128, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct PoolWithdrawUnbonded { - pub pool_id: ::core::primitive::u32, - pub num_slashing_spans: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct WithdrawUnbonded { - pub member_account: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - pub num_slashing_spans: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Create { - #[codec(compact)] - pub amount: ::core::primitive::u128, - pub root: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - pub nominator: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - pub state_toggler: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CreateWithPoolId { - #[codec(compact)] - pub amount: ::core::primitive::u128, - pub root: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - pub nominator: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - pub state_toggler: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - pub pool_id: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Nominate { - pub pool_id: ::core::primitive::u32, - pub validators: ::std::vec::Vec<::subxt::utils::AccountId32>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetState { - pub pool_id: ::core::primitive::u32, - pub state: runtime_types::pallet_nomination_pools::PoolState, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetMetadata { - pub pool_id: ::core::primitive::u32, - pub metadata: ::std::vec::Vec<::core::primitive::u8>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetConfigs { - pub min_join_bond: - runtime_types::pallet_nomination_pools::ConfigOp<::core::primitive::u128>, - pub min_create_bond: - runtime_types::pallet_nomination_pools::ConfigOp<::core::primitive::u128>, - pub max_pools: - runtime_types::pallet_nomination_pools::ConfigOp<::core::primitive::u32>, - pub max_members: - runtime_types::pallet_nomination_pools::ConfigOp<::core::primitive::u32>, - pub max_members_per_pool: - runtime_types::pallet_nomination_pools::ConfigOp<::core::primitive::u32>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct UpdateRoles { - pub pool_id: ::core::primitive::u32, - pub new_root: - runtime_types::pallet_nomination_pools::ConfigOp<::subxt::utils::AccountId32>, - pub new_nominator: - runtime_types::pallet_nomination_pools::ConfigOp<::subxt::utils::AccountId32>, - pub new_state_toggler: - runtime_types::pallet_nomination_pools::ConfigOp<::subxt::utils::AccountId32>, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Chill { - pub pool_id: ::core::primitive::u32, - } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Stake funds with a pool. The amount to bond is transferred from the member to the"] - #[doc = "pools account and immediately increases the pools bond."] - #[doc = ""] - #[doc = "# Note"] - #[doc = ""] - #[doc = "* An account can only be a member of a single pool."] - #[doc = "* An account cannot join the same pool multiple times."] - #[doc = "* This call will *not* dust the member account, so the member must have at least"] - #[doc = " `existential deposit + amount` in their account."] - #[doc = "* Only a pool with [`PoolState::Open`] can be joined"] - pub fn join( + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The amount held on deposit for placing a bounty proposal."] + pub fn bounty_deposit_base( &self, - amount: ::core::primitive::u128, - pool_id: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "NominationPools", - "join", - Join { amount, pool_id }, + ) -> ::subxt::constants::Address<::core::primitive::u128> { + ::subxt::constants::Address::new_static( + "Bounties", + "BountyDepositBase", [ - 205u8, 66u8, 42u8, 72u8, 146u8, 148u8, 119u8, 162u8, 101u8, 183u8, - 46u8, 176u8, 221u8, 204u8, 197u8, 20u8, 75u8, 226u8, 29u8, 118u8, - 208u8, 60u8, 192u8, 247u8, 222u8, 100u8, 69u8, 80u8, 172u8, 13u8, 69u8, - 250u8, + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, + 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, ], ) } - #[doc = "Bond `extra` more funds from `origin` into the pool to which they already belong."] - #[doc = ""] - #[doc = "Additional funds can come from either the free balance of the account, of from the"] - #[doc = "accumulated rewards, see [`BondExtra`]."] - #[doc = ""] - #[doc = "Bonding extra funds implies an automatic payout of all pending rewards as well."] - pub fn bond_extra( + #[doc = " The delay period for which a bounty beneficiary need to wait before claim the payout."] + pub fn bounty_deposit_payout_delay( &self, - extra: runtime_types::pallet_nomination_pools::BondExtra< - ::core::primitive::u128, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "NominationPools", - "bond_extra", - BondExtra { extra }, + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "Bounties", + "BountyDepositPayoutDelay", [ - 50u8, 72u8, 181u8, 216u8, 249u8, 27u8, 250u8, 177u8, 253u8, 22u8, - 240u8, 100u8, 184u8, 202u8, 197u8, 34u8, 21u8, 188u8, 248u8, 191u8, - 11u8, 10u8, 236u8, 161u8, 168u8, 37u8, 38u8, 238u8, 61u8, 183u8, 86u8, - 55u8, + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, ], ) } - #[doc = "A bonded member can use this to claim their payout based on the rewards that the pool"] - #[doc = "has accumulated since their last claimed payout (OR since joining if this is there first"] - #[doc = "time claiming rewards). The payout will be transferred to the member's account."] - #[doc = ""] - #[doc = "The member will earn rewards pro rata based on the members stake vs the sum of the"] - #[doc = "members in the pools stake. Rewards do not \"expire\"."] - pub fn claim_payout(&self) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "NominationPools", - "claim_payout", - ClaimPayout {}, + #[doc = " Bounty duration in blocks."] + pub fn bounty_update_period( + &self, + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "Bounties", + "BountyUpdatePeriod", [ - 128u8, 58u8, 138u8, 55u8, 64u8, 16u8, 129u8, 25u8, 211u8, 229u8, 193u8, - 115u8, 47u8, 45u8, 155u8, 221u8, 218u8, 1u8, 222u8, 5u8, 236u8, 32u8, - 88u8, 0u8, 198u8, 72u8, 196u8, 181u8, 104u8, 16u8, 212u8, 29u8, + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, ], ) } - #[doc = "Unbond up to `unbonding_points` of the `member_account`'s funds from the pool. It"] - #[doc = "implicitly collects the rewards one last time, since not doing so would mean some"] - #[doc = "rewards would be forfeited."] - #[doc = ""] - #[doc = "Under certain conditions, this call can be dispatched permissionlessly (i.e. by any"] - #[doc = "account)."] - #[doc = ""] - #[doc = "# Conditions for a permissionless dispatch."] - #[doc = ""] - #[doc = "* The pool is blocked and the caller is either the root or state-toggler. This is"] - #[doc = " refereed to as a kick."] - #[doc = "* The pool is destroying and the member is not the depositor."] - #[doc = "* The pool is destroying, the member is the depositor and no other members are in the"] - #[doc = " pool."] - #[doc = ""] - #[doc = "## Conditions for permissioned dispatch (i.e. the caller is also the"] - #[doc = "`member_account`):"] - #[doc = ""] - #[doc = "* The caller is not the depositor."] - #[doc = "* The caller is the depositor, the pool is destroying and no other members are in the"] - #[doc = " pool."] - #[doc = ""] - #[doc = "# Note"] + #[doc = " The curator deposit is calculated as a percentage of the curator fee."] #[doc = ""] - #[doc = "If there are too many unlocking chunks to unbond with the pool account,"] - #[doc = "[`Call::pool_withdraw_unbonded`] can be called to try and minimize unlocking chunks. If"] - #[doc = "there are too many unlocking chunks, the result of this call will likely be the"] - #[doc = "`NoMoreChunks` error from the staking system."] - pub fn unbond( + #[doc = " This deposit has optional upper and lower bounds with `CuratorDepositMax` and"] + #[doc = " `CuratorDepositMin`."] + pub fn curator_deposit_multiplier( &self, - member_account: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - unbonding_points: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "NominationPools", - "unbond", - Unbond { - member_account, - unbonding_points, - }, + ) -> ::subxt::constants::Address + { + ::subxt::constants::Address::new_static( + "Bounties", + "CuratorDepositMultiplier", [ - 78u8, 15u8, 37u8, 18u8, 129u8, 63u8, 31u8, 3u8, 68u8, 10u8, 12u8, 12u8, - 166u8, 179u8, 38u8, 232u8, 97u8, 1u8, 83u8, 53u8, 26u8, 59u8, 42u8, - 219u8, 176u8, 246u8, 169u8, 28u8, 35u8, 67u8, 139u8, 81u8, + 225u8, 236u8, 95u8, 157u8, 90u8, 94u8, 106u8, 192u8, 254u8, 19u8, 87u8, + 80u8, 16u8, 62u8, 42u8, 204u8, 136u8, 106u8, 225u8, 53u8, 212u8, 52u8, + 177u8, 79u8, 4u8, 116u8, 201u8, 104u8, 222u8, 75u8, 86u8, 227u8, ], ) } - #[doc = "Call `withdraw_unbonded` for the pools account. This call can be made by any account."] - #[doc = ""] - #[doc = "This is useful if their are too many unlocking chunks to call `unbond`, and some"] - #[doc = "can be cleared by withdrawing. In the case there are too many unlocking chunks, the user"] - #[doc = "would probably see an error like `NoMoreChunks` emitted from the staking system when"] - #[doc = "they attempt to unbond."] - pub fn pool_withdraw_unbonded( + #[doc = " Maximum amount of funds that should be placed in a deposit for making a proposal."] + pub fn curator_deposit_max( &self, - pool_id: ::core::primitive::u32, - num_slashing_spans: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "NominationPools", - "pool_withdraw_unbonded", - PoolWithdrawUnbonded { - pool_id, - num_slashing_spans, - }, + ) -> ::subxt::constants::Address<::core::option::Option<::core::primitive::u128>> + { + ::subxt::constants::Address::new_static( + "Bounties", + "CuratorDepositMax", [ - 152u8, 245u8, 131u8, 247u8, 106u8, 214u8, 154u8, 8u8, 7u8, 210u8, - 149u8, 218u8, 118u8, 46u8, 242u8, 182u8, 191u8, 119u8, 28u8, 199u8, - 36u8, 49u8, 219u8, 123u8, 58u8, 203u8, 211u8, 226u8, 217u8, 36u8, 56u8, - 0u8, + 84u8, 154u8, 218u8, 83u8, 84u8, 189u8, 32u8, 20u8, 120u8, 194u8, 88u8, + 205u8, 109u8, 216u8, 114u8, 193u8, 120u8, 198u8, 154u8, 237u8, 134u8, + 204u8, 102u8, 247u8, 52u8, 103u8, 231u8, 43u8, 243u8, 122u8, 60u8, + 216u8, ], ) } - #[doc = "Withdraw unbonded funds from `member_account`. If no bonded funds can be unbonded, an"] - #[doc = "error is returned."] - #[doc = ""] - #[doc = "Under certain conditions, this call can be dispatched permissionlessly (i.e. by any"] - #[doc = "account)."] - #[doc = ""] - #[doc = "# Conditions for a permissionless dispatch"] - #[doc = ""] - #[doc = "* The pool is in destroy mode and the target is not the depositor."] - #[doc = "* The target is the depositor and they are the only member in the sub pools."] - #[doc = "* The pool is blocked and the caller is either the root or state-toggler."] - #[doc = ""] - #[doc = "# Conditions for permissioned dispatch"] - #[doc = ""] - #[doc = "* The caller is the target and they are not the depositor."] - #[doc = ""] - #[doc = "# Note"] - #[doc = ""] - #[doc = "If the target is the depositor, the pool will be destroyed."] - pub fn withdraw_unbonded( + #[doc = " Minimum amount of funds that should be placed in a deposit for making a proposal."] + pub fn curator_deposit_min( &self, - member_account: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - num_slashing_spans: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "NominationPools", - "withdraw_unbonded", - WithdrawUnbonded { - member_account, - num_slashing_spans, - }, + ) -> ::subxt::constants::Address<::core::option::Option<::core::primitive::u128>> + { + ::subxt::constants::Address::new_static( + "Bounties", + "CuratorDepositMin", [ - 61u8, 216u8, 214u8, 166u8, 59u8, 42u8, 186u8, 141u8, 47u8, 50u8, 135u8, - 236u8, 166u8, 88u8, 90u8, 244u8, 57u8, 106u8, 193u8, 211u8, 215u8, - 131u8, 203u8, 33u8, 195u8, 120u8, 213u8, 94u8, 213u8, 66u8, 79u8, - 140u8, + 84u8, 154u8, 218u8, 83u8, 84u8, 189u8, 32u8, 20u8, 120u8, 194u8, 88u8, + 205u8, 109u8, 216u8, 114u8, 193u8, 120u8, 198u8, 154u8, 237u8, 134u8, + 204u8, 102u8, 247u8, 52u8, 103u8, 231u8, 43u8, 243u8, 122u8, 60u8, + 216u8, ], ) } - #[doc = "Create a new delegation pool."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `amount` - The amount of funds to delegate to the pool. This also acts of a sort of"] - #[doc = " deposit since the pools creator cannot fully unbond funds until the pool is being"] - #[doc = " destroyed."] - #[doc = "* `index` - A disambiguation index for creating the account. Likely only useful when"] - #[doc = " creating multiple pools in the same extrinsic."] - #[doc = "* `root` - The account to set as [`PoolRoles::root`]."] - #[doc = "* `nominator` - The account to set as the [`PoolRoles::nominator`]."] - #[doc = "* `state_toggler` - The account to set as the [`PoolRoles::state_toggler`]."] - #[doc = ""] - #[doc = "# Note"] - #[doc = ""] - #[doc = "In addition to `amount`, the caller will transfer the existential deposit; so the caller"] - #[doc = "needs at have at least `amount + existential_deposit` transferrable."] - pub fn create( + #[doc = " Minimum value for a bounty."] + pub fn bounty_value_minimum( &self, - amount: ::core::primitive::u128, - root: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - nominator: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - state_toggler: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "NominationPools", - "create", - Create { - amount, - root, - nominator, - state_toggler, - }, + ) -> ::subxt::constants::Address<::core::primitive::u128> { + ::subxt::constants::Address::new_static( + "Bounties", + "BountyValueMinimum", [ - 176u8, 210u8, 154u8, 87u8, 218u8, 250u8, 117u8, 90u8, 80u8, 191u8, - 252u8, 146u8, 29u8, 228u8, 36u8, 15u8, 125u8, 102u8, 87u8, 50u8, 146u8, - 108u8, 96u8, 145u8, 135u8, 189u8, 18u8, 159u8, 21u8, 74u8, 165u8, 33u8, + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, + 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, ], ) } - #[doc = "Create a new delegation pool with a previously used pool id"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "same as `create` with the inclusion of"] - #[doc = "* `pool_id` - `A valid PoolId."] - pub fn create_with_pool_id( + #[doc = " The amount held on deposit per byte within the tip report reason or bounty description."] + pub fn data_deposit_per_byte( &self, - amount: ::core::primitive::u128, - root: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - nominator: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - state_toggler: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - pool_id: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "NominationPools", - "create_with_pool_id", - CreateWithPoolId { - amount, - root, - nominator, - state_toggler, - pool_id, - }, + ) -> ::subxt::constants::Address<::core::primitive::u128> { + ::subxt::constants::Address::new_static( + "Bounties", + "DataDepositPerByte", [ - 234u8, 228u8, 116u8, 171u8, 77u8, 41u8, 166u8, 254u8, 20u8, 78u8, 38u8, - 28u8, 144u8, 58u8, 2u8, 64u8, 11u8, 27u8, 124u8, 215u8, 8u8, 10u8, - 172u8, 189u8, 118u8, 131u8, 102u8, 191u8, 251u8, 208u8, 167u8, 103u8, + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, + 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, ], ) } - #[doc = "Nominate on behalf of the pool."] + #[doc = " Maximum acceptable reason length."] #[doc = ""] - #[doc = "The dispatch origin of this call must be signed by the pool nominator or the pool"] - #[doc = "root role."] + #[doc = " Benchmarks depend on this value, be sure to update weights file when changing this value"] + pub fn maximum_reason_length( + &self, + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "Bounties", + "MaximumReasonLength", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + } + } + } + pub mod child_bounties { + use super::root_mod; + use super::runtime_types; + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub type Error = runtime_types::pallet_child_bounties::pallet::Error; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct AddChildBounty { + #[codec(compact)] + pub parent_bounty_id: ::core::primitive::u32, + #[codec(compact)] + pub value: ::core::primitive::u128, + pub description: ::std::vec::Vec<::core::primitive::u8>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ProposeCurator { + #[codec(compact)] + pub parent_bounty_id: ::core::primitive::u32, + #[codec(compact)] + pub child_bounty_id: ::core::primitive::u32, + pub curator: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + #[codec(compact)] + pub fee: ::core::primitive::u128, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct AcceptCurator { + #[codec(compact)] + pub parent_bounty_id: ::core::primitive::u32, + #[codec(compact)] + pub child_bounty_id: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct UnassignCurator { + #[codec(compact)] + pub parent_bounty_id: ::core::primitive::u32, + #[codec(compact)] + pub child_bounty_id: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct AwardChildBounty { + #[codec(compact)] + pub parent_bounty_id: ::core::primitive::u32, + #[codec(compact)] + pub child_bounty_id: ::core::primitive::u32, + pub beneficiary: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ClaimChildBounty { + #[codec(compact)] + pub parent_bounty_id: ::core::primitive::u32, + #[codec(compact)] + pub child_bounty_id: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct CloseChildBounty { + #[codec(compact)] + pub parent_bounty_id: ::core::primitive::u32, + #[codec(compact)] + pub child_bounty_id: ::core::primitive::u32, + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Add a new child-bounty."] #[doc = ""] - #[doc = "This directly forward the call to the staking pallet, on behalf of the pool bonded"] - #[doc = "account."] - pub fn nominate( + #[doc = "The dispatch origin for this call must be the curator of parent"] + #[doc = "bounty and the parent bounty must be in \"active\" state."] + #[doc = ""] + #[doc = "Child-bounty gets added successfully & fund gets transferred from"] + #[doc = "parent bounty to child-bounty account, if parent bounty has enough"] + #[doc = "funds, else the call fails."] + #[doc = ""] + #[doc = "Upper bound to maximum number of active child bounties that can be"] + #[doc = "added are managed via runtime trait config"] + #[doc = "[`Config::MaxActiveChildBountyCount`]."] + #[doc = ""] + #[doc = "If the call is success, the status of child-bounty is updated to"] + #[doc = "\"Added\"."] + #[doc = ""] + #[doc = "- `parent_bounty_id`: Index of parent bounty for which child-bounty is being added."] + #[doc = "- `value`: Value for executing the proposal."] + #[doc = "- `description`: Text description for the child-bounty."] + pub fn add_child_bounty( &self, - pool_id: ::core::primitive::u32, - validators: ::std::vec::Vec<::subxt::utils::AccountId32>, - ) -> ::subxt::tx::Payload { + parent_bounty_id: ::core::primitive::u32, + value: ::core::primitive::u128, + description: ::std::vec::Vec<::core::primitive::u8>, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "NominationPools", - "nominate", - Nominate { - pool_id, - validators, + "ChildBounties", + "add_child_bounty", + types::AddChildBounty { + parent_bounty_id, + value, + description, }, [ - 10u8, 235u8, 64u8, 157u8, 36u8, 249u8, 186u8, 27u8, 79u8, 172u8, 25u8, - 3u8, 203u8, 19u8, 192u8, 182u8, 36u8, 103u8, 13u8, 20u8, 89u8, 140u8, - 159u8, 4u8, 132u8, 242u8, 192u8, 146u8, 55u8, 251u8, 216u8, 255u8, + 210u8, 156u8, 242u8, 121u8, 28u8, 214u8, 212u8, 203u8, 46u8, 45u8, + 110u8, 25u8, 33u8, 138u8, 136u8, 71u8, 23u8, 102u8, 203u8, 122u8, 77u8, + 162u8, 112u8, 133u8, 43u8, 73u8, 201u8, 176u8, 102u8, 68u8, 188u8, 8u8, ], ) } - #[doc = "Set a new state for the pool."] + #[doc = "Propose curator for funded child-bounty."] #[doc = ""] - #[doc = "If a pool is already in the `Destroying` state, then under no condition can its state"] - #[doc = "change again."] + #[doc = "The dispatch origin for this call must be curator of parent bounty."] #[doc = ""] - #[doc = "The dispatch origin of this call must be either:"] + #[doc = "Parent bounty must be in active state, for this child-bounty call to"] + #[doc = "work."] #[doc = ""] - #[doc = "1. signed by the state toggler, or the root role of the pool,"] - #[doc = "2. if the pool conditions to be open are NOT met (as described by `ok_to_be_open`), and"] - #[doc = " then the state of the pool can be permissionlessly changed to `Destroying`."] - pub fn set_state( + #[doc = "Child-bounty must be in \"Added\" state, for processing the call. And"] + #[doc = "state of child-bounty is moved to \"CuratorProposed\" on successful"] + #[doc = "call completion."] + #[doc = ""] + #[doc = "- `parent_bounty_id`: Index of parent bounty."] + #[doc = "- `child_bounty_id`: Index of child bounty."] + #[doc = "- `curator`: Address of child-bounty curator."] + #[doc = "- `fee`: payment fee to child-bounty curator for execution."] + pub fn propose_curator( &self, - pool_id: ::core::primitive::u32, - state: runtime_types::pallet_nomination_pools::PoolState, - ) -> ::subxt::tx::Payload { + parent_bounty_id: ::core::primitive::u32, + child_bounty_id: ::core::primitive::u32, + curator: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + fee: ::core::primitive::u128, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "NominationPools", - "set_state", - SetState { pool_id, state }, + "ChildBounties", + "propose_curator", + types::ProposeCurator { + parent_bounty_id, + child_bounty_id, + curator, + fee, + }, [ - 104u8, 40u8, 213u8, 88u8, 159u8, 115u8, 35u8, 249u8, 78u8, 180u8, 99u8, - 1u8, 225u8, 218u8, 192u8, 151u8, 25u8, 194u8, 192u8, 187u8, 39u8, - 170u8, 212u8, 125u8, 75u8, 250u8, 248u8, 175u8, 159u8, 161u8, 151u8, - 162u8, + 37u8, 101u8, 96u8, 75u8, 254u8, 212u8, 42u8, 140u8, 72u8, 107u8, 157u8, + 110u8, 147u8, 236u8, 17u8, 138u8, 161u8, 153u8, 119u8, 177u8, 225u8, + 22u8, 83u8, 5u8, 123u8, 38u8, 30u8, 240u8, 134u8, 208u8, 183u8, 247u8, ], ) } - #[doc = "Set a new metadata for the pool."] + #[doc = "Accept the curator role for the child-bounty."] #[doc = ""] - #[doc = "The dispatch origin of this call must be signed by the state toggler, or the root role"] - #[doc = "of the pool."] - pub fn set_metadata( + #[doc = "The dispatch origin for this call must be the curator of this"] + #[doc = "child-bounty."] + #[doc = ""] + #[doc = "A deposit will be reserved from the curator and refund upon"] + #[doc = "successful payout or cancellation."] + #[doc = ""] + #[doc = "Fee for curator is deducted from curator fee of parent bounty."] + #[doc = ""] + #[doc = "Parent bounty must be in active state, for this child-bounty call to"] + #[doc = "work."] + #[doc = ""] + #[doc = "Child-bounty must be in \"CuratorProposed\" state, for processing the"] + #[doc = "call. And state of child-bounty is moved to \"Active\" on successful"] + #[doc = "call completion."] + #[doc = ""] + #[doc = "- `parent_bounty_id`: Index of parent bounty."] + #[doc = "- `child_bounty_id`: Index of child bounty."] + pub fn accept_curator( &self, - pool_id: ::core::primitive::u32, - metadata: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::Payload { + parent_bounty_id: ::core::primitive::u32, + child_bounty_id: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "NominationPools", - "set_metadata", - SetMetadata { pool_id, metadata }, + "ChildBounties", + "accept_curator", + types::AcceptCurator { + parent_bounty_id, + child_bounty_id, + }, [ - 156u8, 81u8, 170u8, 161u8, 34u8, 100u8, 183u8, 174u8, 5u8, 81u8, 31u8, - 76u8, 12u8, 42u8, 77u8, 1u8, 6u8, 26u8, 168u8, 7u8, 8u8, 115u8, 158u8, - 151u8, 30u8, 211u8, 52u8, 177u8, 234u8, 87u8, 125u8, 127u8, + 112u8, 175u8, 238u8, 54u8, 132u8, 20u8, 206u8, 59u8, 220u8, 228u8, + 207u8, 222u8, 132u8, 240u8, 188u8, 0u8, 210u8, 225u8, 234u8, 142u8, + 232u8, 53u8, 64u8, 89u8, 220u8, 29u8, 28u8, 123u8, 125u8, 207u8, 10u8, + 52u8, ], ) } - #[doc = "Update configurations for the nomination pools. The origin for this call must be"] - #[doc = "Root."] + #[doc = "Unassign curator from a child-bounty."] #[doc = ""] - #[doc = "# Arguments"] + #[doc = "The dispatch origin for this call can be either `RejectOrigin`, or"] + #[doc = "the curator of the parent bounty, or any signed origin."] #[doc = ""] - #[doc = "* `min_join_bond` - Set [`MinJoinBond`]."] - #[doc = "* `min_create_bond` - Set [`MinCreateBond`]."] - #[doc = "* `max_pools` - Set [`MaxPools`]."] - #[doc = "* `max_members` - Set [`MaxPoolMembers`]."] - #[doc = "* `max_members_per_pool` - Set [`MaxPoolMembersPerPool`]."] - pub fn set_configs( + #[doc = "For the origin other than T::RejectOrigin and the child-bounty"] + #[doc = "curator, parent bounty must be in active state, for this call to"] + #[doc = "work. We allow child-bounty curator and T::RejectOrigin to execute"] + #[doc = "this call irrespective of the parent bounty state."] + #[doc = ""] + #[doc = "If this function is called by the `RejectOrigin` or the"] + #[doc = "parent bounty curator, we assume that the child-bounty curator is"] + #[doc = "malicious or inactive. As a result, child-bounty curator deposit is"] + #[doc = "slashed."] + #[doc = ""] + #[doc = "If the origin is the child-bounty curator, we take this as a sign"] + #[doc = "that they are unable to do their job, and are willingly giving up."] + #[doc = "We could slash the deposit, but for now we allow them to unreserve"] + #[doc = "their deposit and exit without issue. (We may want to change this if"] + #[doc = "it is abused.)"] + #[doc = ""] + #[doc = "Finally, the origin can be anyone iff the child-bounty curator is"] + #[doc = "\"inactive\". Expiry update due of parent bounty is used to estimate"] + #[doc = "inactive state of child-bounty curator."] + #[doc = ""] + #[doc = "This allows anyone in the community to call out that a child-bounty"] + #[doc = "curator is not doing their due diligence, and we should pick a new"] + #[doc = "one. In this case the child-bounty curator deposit is slashed."] + #[doc = ""] + #[doc = "State of child-bounty is moved to Added state on successful call"] + #[doc = "completion."] + #[doc = ""] + #[doc = "- `parent_bounty_id`: Index of parent bounty."] + #[doc = "- `child_bounty_id`: Index of child bounty."] + pub fn unassign_curator( &self, - min_join_bond: runtime_types::pallet_nomination_pools::ConfigOp< - ::core::primitive::u128, - >, - min_create_bond: runtime_types::pallet_nomination_pools::ConfigOp< - ::core::primitive::u128, - >, - max_pools: runtime_types::pallet_nomination_pools::ConfigOp< - ::core::primitive::u32, - >, - max_members: runtime_types::pallet_nomination_pools::ConfigOp< - ::core::primitive::u32, - >, - max_members_per_pool: runtime_types::pallet_nomination_pools::ConfigOp< - ::core::primitive::u32, - >, - ) -> ::subxt::tx::Payload { + parent_bounty_id: ::core::primitive::u32, + child_bounty_id: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "NominationPools", - "set_configs", - SetConfigs { - min_join_bond, - min_create_bond, - max_pools, - max_members, - max_members_per_pool, + "ChildBounties", + "unassign_curator", + types::UnassignCurator { + parent_bounty_id, + child_bounty_id, }, [ - 143u8, 196u8, 211u8, 30u8, 71u8, 15u8, 150u8, 243u8, 7u8, 178u8, 179u8, - 168u8, 40u8, 116u8, 220u8, 140u8, 18u8, 206u8, 6u8, 189u8, 190u8, 37u8, - 68u8, 41u8, 45u8, 233u8, 247u8, 172u8, 185u8, 34u8, 243u8, 187u8, + 228u8, 189u8, 46u8, 75u8, 121u8, 161u8, 150u8, 87u8, 207u8, 86u8, + 192u8, 50u8, 52u8, 61u8, 49u8, 88u8, 178u8, 182u8, 89u8, 72u8, 203u8, + 45u8, 41u8, 26u8, 149u8, 114u8, 154u8, 169u8, 118u8, 128u8, 13u8, + 211u8, ], ) } - #[doc = "Update the roles of the pool."] + #[doc = "Award child-bounty to a beneficiary."] #[doc = ""] - #[doc = "The root is the only entity that can change any of the roles, including itself,"] - #[doc = "excluding the depositor, who can never change."] + #[doc = "The beneficiary will be able to claim the funds after a delay."] #[doc = ""] - #[doc = "It emits an event, notifying UIs of the role change. This event is quite relevant to"] - #[doc = "most pool members and they should be informed of changes to pool roles."] - pub fn update_roles( + #[doc = "The dispatch origin for this call must be the parent curator or"] + #[doc = "curator of this child-bounty."] + #[doc = ""] + #[doc = "Parent bounty must be in active state, for this child-bounty call to"] + #[doc = "work."] + #[doc = ""] + #[doc = "Child-bounty must be in active state, for processing the call. And"] + #[doc = "state of child-bounty is moved to \"PendingPayout\" on successful call"] + #[doc = "completion."] + #[doc = ""] + #[doc = "- `parent_bounty_id`: Index of parent bounty."] + #[doc = "- `child_bounty_id`: Index of child bounty."] + #[doc = "- `beneficiary`: Beneficiary account."] + pub fn award_child_bounty( &self, - pool_id: ::core::primitive::u32, - new_root: runtime_types::pallet_nomination_pools::ConfigOp< - ::subxt::utils::AccountId32, - >, - new_nominator: runtime_types::pallet_nomination_pools::ConfigOp< - ::subxt::utils::AccountId32, - >, - new_state_toggler: runtime_types::pallet_nomination_pools::ConfigOp< - ::subxt::utils::AccountId32, - >, - ) -> ::subxt::tx::Payload { + parent_bounty_id: ::core::primitive::u32, + child_bounty_id: ::core::primitive::u32, + beneficiary: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "NominationPools", - "update_roles", - UpdateRoles { - pool_id, - new_root, - new_nominator, - new_state_toggler, + "ChildBounties", + "award_child_bounty", + types::AwardChildBounty { + parent_bounty_id, + child_bounty_id, + beneficiary, }, [ - 247u8, 95u8, 234u8, 56u8, 181u8, 229u8, 158u8, 97u8, 69u8, 165u8, 38u8, - 17u8, 27u8, 209u8, 204u8, 250u8, 91u8, 193u8, 35u8, 93u8, 215u8, 131u8, - 148u8, 73u8, 67u8, 188u8, 92u8, 32u8, 34u8, 37u8, 113u8, 93u8, + 231u8, 185u8, 73u8, 232u8, 92u8, 116u8, 204u8, 165u8, 216u8, 194u8, + 151u8, 21u8, 127u8, 239u8, 78u8, 45u8, 27u8, 252u8, 119u8, 23u8, 71u8, + 140u8, 137u8, 209u8, 189u8, 128u8, 126u8, 247u8, 13u8, 42u8, 68u8, + 134u8, ], ) } - #[doc = "Chill on behalf of the pool."] + #[doc = "Claim the payout from an awarded child-bounty after payout delay."] #[doc = ""] - #[doc = "The dispatch origin of this call must be signed by the pool nominator or the pool"] - #[doc = "root role, same as [`Pallet::nominate`]."] + #[doc = "The dispatch origin for this call may be any signed origin."] #[doc = ""] - #[doc = "This directly forward the call to the staking pallet, on behalf of the pool bonded"] - #[doc = "account."] - pub fn chill( + #[doc = "Call works independent of parent bounty state, No need for parent"] + #[doc = "bounty to be in active state."] + #[doc = ""] + #[doc = "The Beneficiary is paid out with agreed bounty value. Curator fee is"] + #[doc = "paid & curator deposit is unreserved."] + #[doc = ""] + #[doc = "Child-bounty must be in \"PendingPayout\" state, for processing the"] + #[doc = "call. And instance of child-bounty is removed from the state on"] + #[doc = "successful call completion."] + #[doc = ""] + #[doc = "- `parent_bounty_id`: Index of parent bounty."] + #[doc = "- `child_bounty_id`: Index of child bounty."] + pub fn claim_child_bounty( &self, - pool_id: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + parent_bounty_id: ::core::primitive::u32, + child_bounty_id: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "NominationPools", - "chill", - Chill { pool_id }, + "ChildBounties", + "claim_child_bounty", + types::ClaimChildBounty { + parent_bounty_id, + child_bounty_id, + }, [ - 41u8, 114u8, 128u8, 121u8, 244u8, 15u8, 15u8, 52u8, 129u8, 88u8, 239u8, - 167u8, 216u8, 38u8, 123u8, 240u8, 172u8, 229u8, 132u8, 64u8, 175u8, - 87u8, 217u8, 27u8, 11u8, 124u8, 1u8, 140u8, 40u8, 191u8, 187u8, 36u8, + 134u8, 243u8, 151u8, 228u8, 38u8, 174u8, 96u8, 140u8, 104u8, 124u8, + 166u8, 206u8, 126u8, 211u8, 17u8, 100u8, 172u8, 5u8, 234u8, 171u8, + 125u8, 2u8, 191u8, 163u8, 72u8, 29u8, 163u8, 107u8, 65u8, 92u8, 41u8, + 45u8, + ], + ) + } + #[doc = "Cancel a proposed or active child-bounty. Child-bounty account funds"] + #[doc = "are transferred to parent bounty account. The child-bounty curator"] + #[doc = "deposit may be unreserved if possible."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be either parent curator or"] + #[doc = "`T::RejectOrigin`."] + #[doc = ""] + #[doc = "If the state of child-bounty is `Active`, curator deposit is"] + #[doc = "unreserved."] + #[doc = ""] + #[doc = "If the state of child-bounty is `PendingPayout`, call fails &"] + #[doc = "returns `PendingPayout` error."] + #[doc = ""] + #[doc = "For the origin other than T::RejectOrigin, parent bounty must be in"] + #[doc = "active state, for this child-bounty call to work. For origin"] + #[doc = "T::RejectOrigin execution is forced."] + #[doc = ""] + #[doc = "Instance of child-bounty is removed from the state on successful"] + #[doc = "call completion."] + #[doc = ""] + #[doc = "- `parent_bounty_id`: Index of parent bounty."] + #[doc = "- `child_bounty_id`: Index of child bounty."] + pub fn close_child_bounty( + &self, + parent_bounty_id: ::core::primitive::u32, + child_bounty_id: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "ChildBounties", + "close_child_bounty", + types::CloseChildBounty { + parent_bounty_id, + child_bounty_id, + }, + [ + 40u8, 0u8, 235u8, 75u8, 36u8, 196u8, 29u8, 26u8, 30u8, 172u8, 240u8, + 44u8, 129u8, 243u8, 55u8, 211u8, 96u8, 159u8, 72u8, 96u8, 142u8, 68u8, + 41u8, 238u8, 157u8, 167u8, 90u8, 141u8, 213u8, 249u8, 222u8, 22u8, ], ) } } } - #[doc = "Events of this pallet."] - pub type Event = runtime_types::pallet_nomination_pools::pallet::Event; + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub type Event = runtime_types::pallet_child_bounties::pallet::Event; pub mod events { use super::runtime_types; #[derive( @@ -22392,14 +21747,14 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A pool has been created."] - pub struct Created { - pub depositor: ::subxt::utils::AccountId32, - pub pool_id: ::core::primitive::u32, + #[doc = "A child-bounty is added."] + pub struct Added { + pub index: ::core::primitive::u32, + pub child_index: ::core::primitive::u32, } - impl ::subxt::events::StaticEvent for Created { - const PALLET: &'static str = "NominationPools"; - const EVENT: &'static str = "Created"; + impl ::subxt::events::StaticEvent for Added { + const PALLET: &'static str = "ChildBounties"; + const EVENT: &'static str = "Added"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -22411,16 +21766,15 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A member has became bonded in a pool."] - pub struct Bonded { - pub member: ::subxt::utils::AccountId32, - pub pool_id: ::core::primitive::u32, - pub bonded: ::core::primitive::u128, - pub joined: ::core::primitive::bool, + #[doc = "A child-bounty is awarded to a beneficiary."] + pub struct Awarded { + pub index: ::core::primitive::u32, + pub child_index: ::core::primitive::u32, + pub beneficiary: ::subxt::utils::AccountId32, } - impl ::subxt::events::StaticEvent for Bonded { - const PALLET: &'static str = "NominationPools"; - const EVENT: &'static str = "Bonded"; + impl ::subxt::events::StaticEvent for Awarded { + const PALLET: &'static str = "ChildBounties"; + const EVENT: &'static str = "Awarded"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -22432,15 +21786,16 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A payout has been made to a member."] - pub struct PaidOut { - pub member: ::subxt::utils::AccountId32, - pub pool_id: ::core::primitive::u32, + #[doc = "A child-bounty is claimed by beneficiary."] + pub struct Claimed { + pub index: ::core::primitive::u32, + pub child_index: ::core::primitive::u32, pub payout: ::core::primitive::u128, + pub beneficiary: ::subxt::utils::AccountId32, } - impl ::subxt::events::StaticEvent for PaidOut { - const PALLET: &'static str = "NominationPools"; - const EVENT: &'static str = "PaidOut"; + impl ::subxt::events::StaticEvent for Claimed { + const PALLET: &'static str = "ChildBounties"; + const EVENT: &'static str = "Claimed"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -22452,792 +21807,581 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A member has unbonded from their pool."] - #[doc = ""] - #[doc = "- `balance` is the corresponding balance of the number of points that has been"] - #[doc = " requested to be unbonded (the argument of the `unbond` transaction) from the bonded"] - #[doc = " pool."] - #[doc = "- `points` is the number of points that are issued as a result of `balance` being"] - #[doc = "dissolved into the corresponding unbonding pool."] - #[doc = "- `era` is the era in which the balance will be unbonded."] - #[doc = "In the absence of slashing, these values will match. In the presence of slashing, the"] - #[doc = "number of points that are issued in the unbonding pool will be less than the amount"] - #[doc = "requested to be unbonded."] - pub struct Unbonded { - pub member: ::subxt::utils::AccountId32, - pub pool_id: ::core::primitive::u32, - pub balance: ::core::primitive::u128, - pub points: ::core::primitive::u128, - pub era: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for Unbonded { - const PALLET: &'static str = "NominationPools"; - const EVENT: &'static str = "Unbonded"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A member has withdrawn from their pool."] - #[doc = ""] - #[doc = "The given number of `points` have been dissolved in return of `balance`."] - #[doc = ""] - #[doc = "Similar to `Unbonded` event, in the absence of slashing, the ratio of point to balance"] - #[doc = "will be 1."] - pub struct Withdrawn { - pub member: ::subxt::utils::AccountId32, - pub pool_id: ::core::primitive::u32, - pub balance: ::core::primitive::u128, - pub points: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for Withdrawn { - const PALLET: &'static str = "NominationPools"; - const EVENT: &'static str = "Withdrawn"; - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A pool has been destroyed."] - pub struct Destroyed { - pub pool_id: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for Destroyed { - const PALLET: &'static str = "NominationPools"; - const EVENT: &'static str = "Destroyed"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The state of a pool has changed"] - pub struct StateChanged { - pub pool_id: ::core::primitive::u32, - pub new_state: runtime_types::pallet_nomination_pools::PoolState, - } - impl ::subxt::events::StaticEvent for StateChanged { - const PALLET: &'static str = "NominationPools"; - const EVENT: &'static str = "StateChanged"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A member has been removed from a pool."] - #[doc = ""] - #[doc = "The removal can be voluntary (withdrawn all unbonded funds) or involuntary (kicked)."] - pub struct MemberRemoved { - pub pool_id: ::core::primitive::u32, - pub member: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for MemberRemoved { - const PALLET: &'static str = "NominationPools"; - const EVENT: &'static str = "MemberRemoved"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The roles of a pool have been updated to the given new roles. Note that the depositor"] - #[doc = "can never change."] - pub struct RolesUpdated { - pub root: ::core::option::Option<::subxt::utils::AccountId32>, - pub state_toggler: ::core::option::Option<::subxt::utils::AccountId32>, - pub nominator: ::core::option::Option<::subxt::utils::AccountId32>, - } - impl ::subxt::events::StaticEvent for RolesUpdated { - const PALLET: &'static str = "NominationPools"; - const EVENT: &'static str = "RolesUpdated"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The active balance of pool `pool_id` has been slashed to `balance`."] - pub struct PoolSlashed { - pub pool_id: ::core::primitive::u32, - pub balance: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for PoolSlashed { - const PALLET: &'static str = "NominationPools"; - const EVENT: &'static str = "PoolSlashed"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The unbond pool at `era` of pool `pool_id` has been slashed to `balance`."] - pub struct UnbondingPoolSlashed { - pub pool_id: ::core::primitive::u32, - pub era: ::core::primitive::u32, - pub balance: ::core::primitive::u128, + #[doc = "A child-bounty is cancelled."] + pub struct Canceled { + pub index: ::core::primitive::u32, + pub child_index: ::core::primitive::u32, } - impl ::subxt::events::StaticEvent for UnbondingPoolSlashed { - const PALLET: &'static str = "NominationPools"; - const EVENT: &'static str = "UnbondingPoolSlashed"; + impl ::subxt::events::StaticEvent for Canceled { + const PALLET: &'static str = "ChildBounties"; + const EVENT: &'static str = "Canceled"; } } pub mod storage { use super::runtime_types; pub struct StorageApi; impl StorageApi { - #[doc = " Minimum amount to bond to join a pool."] - pub fn min_join_bond( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u128, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "NominationPools", - "MinJoinBond", - vec![], - [ - 125u8, 239u8, 45u8, 225u8, 74u8, 129u8, 247u8, 184u8, 205u8, 58u8, - 45u8, 186u8, 126u8, 170u8, 112u8, 120u8, 23u8, 190u8, 247u8, 97u8, - 131u8, 126u8, 215u8, 44u8, 147u8, 122u8, 132u8, 212u8, 217u8, 84u8, - 240u8, 91u8, - ], - ) - } - #[doc = " Minimum bond required to create a pool."] - #[doc = ""] - #[doc = " This is the amount that the depositor must put as their initial stake in the pool, as an"] - #[doc = " indication of \"skin in the game\"."] - #[doc = ""] - #[doc = " This is the value that will always exist in the staking ledger of the pool bonded account"] - #[doc = " while all other accounts leave."] - pub fn min_create_bond( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u128, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "NominationPools", - "MinCreateBond", - vec![], - [ - 31u8, 208u8, 240u8, 158u8, 23u8, 218u8, 212u8, 138u8, 92u8, 210u8, - 207u8, 170u8, 32u8, 60u8, 5u8, 21u8, 84u8, 162u8, 1u8, 111u8, 181u8, - 243u8, 24u8, 148u8, 193u8, 253u8, 248u8, 190u8, 16u8, 222u8, 219u8, - 67u8, - ], - ) - } - #[doc = " Maximum number of nomination pools that can exist. If `None`, then an unbounded number of"] - #[doc = " pools can exist."] - pub fn max_pools( + #[doc = " Number of total child bounties."] + pub fn child_bounty_count( &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, ::core::primitive::u32, ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "NominationPools", - "MaxPools", - vec![], - [ - 216u8, 111u8, 68u8, 103u8, 33u8, 50u8, 109u8, 3u8, 176u8, 195u8, 23u8, - 73u8, 112u8, 138u8, 9u8, 194u8, 233u8, 73u8, 68u8, 215u8, 162u8, 255u8, - 217u8, 173u8, 141u8, 27u8, 72u8, 199u8, 7u8, 240u8, 25u8, 34u8, - ], - ) - } - #[doc = " Maximum number of members that can exist in the system. If `None`, then the count"] - #[doc = " members are not bound on a system wide basis."] - pub fn max_pool_members( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, ::subxt::storage::address::Yes, (), - (), > { ::subxt::storage::address::Address::new_static( - "NominationPools", - "MaxPoolMembers", + "ChildBounties", + "ChildBountyCount", vec![], [ - 82u8, 217u8, 26u8, 234u8, 223u8, 241u8, 66u8, 182u8, 43u8, 233u8, 59u8, - 242u8, 202u8, 254u8, 69u8, 50u8, 254u8, 196u8, 166u8, 89u8, 120u8, - 87u8, 76u8, 148u8, 31u8, 197u8, 49u8, 88u8, 206u8, 41u8, 242u8, 62u8, + 46u8, 10u8, 183u8, 160u8, 98u8, 215u8, 39u8, 253u8, 81u8, 94u8, 114u8, + 147u8, 115u8, 162u8, 33u8, 117u8, 160u8, 214u8, 167u8, 7u8, 109u8, + 143u8, 158u8, 1u8, 200u8, 205u8, 17u8, 93u8, 89u8, 26u8, 30u8, 95u8, ], ) } - #[doc = " Maximum number of members that may belong to pool. If `None`, then the count of"] - #[doc = " members is not bound on a per pool basis."] - pub fn max_pool_members_per_pool( + #[doc = " Number of child bounties per parent bounty."] + #[doc = " Map of parent bounty index to number of child bounties."] + pub fn parent_child_bounties( &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, ::core::primitive::u32, ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "NominationPools", - "MaxPoolMembersPerPool", - vec![], - [ - 93u8, 241u8, 16u8, 169u8, 138u8, 199u8, 128u8, 149u8, 65u8, 30u8, 55u8, - 11u8, 41u8, 252u8, 83u8, 250u8, 9u8, 33u8, 152u8, 239u8, 195u8, 147u8, - 16u8, 248u8, 180u8, 153u8, 88u8, 231u8, 248u8, 169u8, 186u8, 48u8, - ], - ) - } - #[doc = " Active members."] - pub fn pool_members( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_nomination_pools::PoolMember, ::subxt::storage::address::Yes, - (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( - "NominationPools", - "PoolMembers", + "ChildBounties", + "ParentChildBounties", vec![::subxt::storage::address::make_static_storage_map_key( _0.borrow(), )], [ - 252u8, 236u8, 201u8, 127u8, 219u8, 1u8, 19u8, 144u8, 5u8, 108u8, 70u8, - 30u8, 177u8, 232u8, 253u8, 237u8, 211u8, 91u8, 63u8, 62u8, 155u8, - 151u8, 153u8, 165u8, 206u8, 53u8, 111u8, 31u8, 60u8, 120u8, 100u8, - 249u8, - ], - ) - } - #[doc = " Active members."] - pub fn pool_members_root( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_nomination_pools::PoolMember, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "NominationPools", - "PoolMembers", - Vec::new(), - [ - 252u8, 236u8, 201u8, 127u8, 219u8, 1u8, 19u8, 144u8, 5u8, 108u8, 70u8, - 30u8, 177u8, 232u8, 253u8, 237u8, 211u8, 91u8, 63u8, 62u8, 155u8, - 151u8, 153u8, 165u8, 206u8, 53u8, 111u8, 31u8, 60u8, 120u8, 100u8, - 249u8, + 127u8, 161u8, 181u8, 79u8, 235u8, 196u8, 252u8, 162u8, 39u8, 15u8, + 251u8, 49u8, 125u8, 80u8, 101u8, 24u8, 234u8, 88u8, 212u8, 126u8, 63u8, + 63u8, 19u8, 75u8, 137u8, 125u8, 38u8, 250u8, 77u8, 49u8, 76u8, 188u8, ], ) } - #[doc = "Counter for the related counted storage map"] - pub fn counter_for_pool_members( + #[doc = " Number of child bounties per parent bounty."] + #[doc = " Map of parent bounty index to number of child bounties."] + pub fn parent_child_bounties_root( &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, ::core::primitive::u32, + (), ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, - (), > { ::subxt::storage::address::Address::new_static( - "NominationPools", - "CounterForPoolMembers", - vec![], + "ChildBounties", + "ParentChildBounties", + Vec::new(), [ - 114u8, 126u8, 27u8, 138u8, 119u8, 44u8, 45u8, 129u8, 84u8, 107u8, - 171u8, 206u8, 117u8, 141u8, 20u8, 75u8, 229u8, 237u8, 31u8, 229u8, - 124u8, 190u8, 27u8, 124u8, 63u8, 59u8, 167u8, 42u8, 62u8, 212u8, 160u8, - 2u8, + 127u8, 161u8, 181u8, 79u8, 235u8, 196u8, 252u8, 162u8, 39u8, 15u8, + 251u8, 49u8, 125u8, 80u8, 101u8, 24u8, 234u8, 88u8, 212u8, 126u8, 63u8, + 63u8, 19u8, 75u8, 137u8, 125u8, 38u8, 250u8, 77u8, 49u8, 76u8, 188u8, ], ) } - #[doc = " Storage for bonded pools."] - pub fn bonded_pools( + #[doc = " Child bounties that have been added."] + pub fn child_bounties( &self, _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + _1: impl ::std::borrow::Borrow<::core::primitive::u32>, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_nomination_pools::BondedPoolInner, + runtime_types::pallet_child_bounties::ChildBounty< + ::subxt::utils::AccountId32, + ::core::primitive::u128, + ::core::primitive::u32, + >, ::subxt::storage::address::Yes, (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( - "NominationPools", - "BondedPools", - vec![::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - )], + "ChildBounties", + "ChildBounties", + vec![ + ::subxt::storage::address::make_static_storage_map_key(_0.borrow()), + ::subxt::storage::address::make_static_storage_map_key(_1.borrow()), + ], [ - 34u8, 51u8, 86u8, 95u8, 237u8, 118u8, 40u8, 212u8, 128u8, 227u8, 113u8, - 6u8, 116u8, 28u8, 96u8, 223u8, 63u8, 249u8, 33u8, 152u8, 61u8, 7u8, - 205u8, 220u8, 221u8, 174u8, 207u8, 39u8, 53u8, 176u8, 13u8, 74u8, + 66u8, 132u8, 251u8, 223u8, 216u8, 52u8, 162u8, 150u8, 229u8, 239u8, + 219u8, 182u8, 211u8, 228u8, 181u8, 46u8, 243u8, 151u8, 111u8, 235u8, + 105u8, 40u8, 39u8, 10u8, 245u8, 113u8, 78u8, 116u8, 219u8, 186u8, + 165u8, 91u8, ], ) } - #[doc = " Storage for bonded pools."] - pub fn bonded_pools_root( + #[doc = " Child bounties that have been added."] + pub fn child_bounties_root( &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_nomination_pools::BondedPoolInner, + runtime_types::pallet_child_bounties::ChildBounty< + ::subxt::utils::AccountId32, + ::core::primitive::u128, + ::core::primitive::u32, + >, (), (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( - "NominationPools", - "BondedPools", + "ChildBounties", + "ChildBounties", Vec::new(), [ - 34u8, 51u8, 86u8, 95u8, 237u8, 118u8, 40u8, 212u8, 128u8, 227u8, 113u8, - 6u8, 116u8, 28u8, 96u8, 223u8, 63u8, 249u8, 33u8, 152u8, 61u8, 7u8, - 205u8, 220u8, 221u8, 174u8, 207u8, 39u8, 53u8, 176u8, 13u8, 74u8, - ], - ) - } - #[doc = "Counter for the related counted storage map"] - pub fn counter_for_bonded_pools( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "NominationPools", - "CounterForBondedPools", - vec![], - [ - 134u8, 94u8, 199u8, 73u8, 174u8, 253u8, 66u8, 242u8, 233u8, 244u8, - 140u8, 170u8, 242u8, 40u8, 41u8, 185u8, 183u8, 151u8, 58u8, 111u8, - 221u8, 225u8, 81u8, 71u8, 169u8, 219u8, 223u8, 135u8, 8u8, 171u8, - 180u8, 236u8, + 66u8, 132u8, 251u8, 223u8, 216u8, 52u8, 162u8, 150u8, 229u8, 239u8, + 219u8, 182u8, 211u8, 228u8, 181u8, 46u8, 243u8, 151u8, 111u8, 235u8, + 105u8, 40u8, 39u8, 10u8, 245u8, 113u8, 78u8, 116u8, 219u8, 186u8, + 165u8, 91u8, ], ) } - #[doc = " Reward pools. This is where there rewards for each pool accumulate. When a members payout"] - #[doc = " is claimed, the balance comes out fo the reward pool. Keyed by the bonded pools account."] - pub fn reward_pools( + #[doc = " The description of each child-bounty."] + pub fn child_bounty_descriptions( &self, _0: impl ::std::borrow::Borrow<::core::primitive::u32>, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_nomination_pools::RewardPool, + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, ::subxt::storage::address::Yes, (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( - "NominationPools", - "RewardPools", + "ChildBounties", + "ChildBountyDescriptions", vec![::subxt::storage::address::make_static_storage_map_key( _0.borrow(), )], [ - 139u8, 123u8, 46u8, 107u8, 9u8, 83u8, 141u8, 12u8, 188u8, 225u8, 170u8, - 215u8, 154u8, 21u8, 100u8, 95u8, 237u8, 245u8, 46u8, 216u8, 199u8, - 184u8, 187u8, 155u8, 8u8, 16u8, 34u8, 177u8, 153u8, 65u8, 109u8, 198u8, + 193u8, 200u8, 40u8, 30u8, 14u8, 71u8, 90u8, 42u8, 58u8, 253u8, 225u8, + 158u8, 172u8, 10u8, 45u8, 238u8, 36u8, 144u8, 184u8, 153u8, 11u8, + 157u8, 125u8, 220u8, 175u8, 31u8, 28u8, 93u8, 207u8, 212u8, 141u8, + 74u8, ], ) } - #[doc = " Reward pools. This is where there rewards for each pool accumulate. When a members payout"] - #[doc = " is claimed, the balance comes out fo the reward pool. Keyed by the bonded pools account."] - pub fn reward_pools_root( + #[doc = " The description of each child-bounty."] + pub fn child_bounty_descriptions_root( &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_nomination_pools::RewardPool, + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, (), (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( - "NominationPools", - "RewardPools", + "ChildBounties", + "ChildBountyDescriptions", Vec::new(), [ - 139u8, 123u8, 46u8, 107u8, 9u8, 83u8, 141u8, 12u8, 188u8, 225u8, 170u8, - 215u8, 154u8, 21u8, 100u8, 95u8, 237u8, 245u8, 46u8, 216u8, 199u8, - 184u8, 187u8, 155u8, 8u8, 16u8, 34u8, 177u8, 153u8, 65u8, 109u8, 198u8, - ], - ) - } - #[doc = "Counter for the related counted storage map"] - pub fn counter_for_reward_pools( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "NominationPools", - "CounterForRewardPools", - vec![], - [ - 209u8, 139u8, 212u8, 116u8, 210u8, 178u8, 213u8, 38u8, 75u8, 23u8, - 188u8, 57u8, 253u8, 213u8, 95u8, 118u8, 182u8, 250u8, 45u8, 205u8, - 17u8, 175u8, 17u8, 201u8, 234u8, 14u8, 98u8, 49u8, 143u8, 135u8, 201u8, - 81u8, + 193u8, 200u8, 40u8, 30u8, 14u8, 71u8, 90u8, 42u8, 58u8, 253u8, 225u8, + 158u8, 172u8, 10u8, 45u8, 238u8, 36u8, 144u8, 184u8, 153u8, 11u8, + 157u8, 125u8, 220u8, 175u8, 31u8, 28u8, 93u8, 207u8, 212u8, 141u8, + 74u8, ], ) } - #[doc = " Groups of unbonding pools. Each group of unbonding pools belongs to a bonded pool,"] - #[doc = " hence the name sub-pools. Keyed by the bonded pools account."] - pub fn sub_pools_storage( + #[doc = " The cumulative child-bounty curator fee for each parent bounty."] + pub fn children_curator_fees( &self, _0: impl ::std::borrow::Borrow<::core::primitive::u32>, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_nomination_pools::SubPools, + ::core::primitive::u128, + ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, - (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( - "NominationPools", - "SubPoolsStorage", + "ChildBounties", + "ChildrenCuratorFees", vec![::subxt::storage::address::make_static_storage_map_key( _0.borrow(), )], [ - 231u8, 13u8, 111u8, 248u8, 1u8, 208u8, 179u8, 134u8, 224u8, 196u8, - 94u8, 201u8, 229u8, 29u8, 155u8, 211u8, 163u8, 150u8, 157u8, 34u8, - 68u8, 238u8, 55u8, 4u8, 222u8, 96u8, 186u8, 29u8, 205u8, 237u8, 80u8, - 42u8, + 174u8, 128u8, 86u8, 179u8, 133u8, 76u8, 98u8, 169u8, 234u8, 166u8, + 249u8, 214u8, 172u8, 171u8, 8u8, 161u8, 105u8, 69u8, 148u8, 151u8, + 35u8, 174u8, 118u8, 139u8, 101u8, 56u8, 85u8, 211u8, 121u8, 168u8, 0u8, + 216u8, ], ) } - #[doc = " Groups of unbonding pools. Each group of unbonding pools belongs to a bonded pool,"] - #[doc = " hence the name sub-pools. Keyed by the bonded pools account."] - pub fn sub_pools_storage_root( + #[doc = " The cumulative child-bounty curator fee for each parent bounty."] + pub fn children_curator_fees_root( &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_nomination_pools::SubPools, - (), + ::core::primitive::u128, (), ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( - "NominationPools", - "SubPoolsStorage", + "ChildBounties", + "ChildrenCuratorFees", Vec::new(), [ - 231u8, 13u8, 111u8, 248u8, 1u8, 208u8, 179u8, 134u8, 224u8, 196u8, - 94u8, 201u8, 229u8, 29u8, 155u8, 211u8, 163u8, 150u8, 157u8, 34u8, - 68u8, 238u8, 55u8, 4u8, 222u8, 96u8, 186u8, 29u8, 205u8, 237u8, 80u8, - 42u8, + 174u8, 128u8, 86u8, 179u8, 133u8, 76u8, 98u8, 169u8, 234u8, 166u8, + 249u8, 214u8, 172u8, 171u8, 8u8, 161u8, 105u8, 69u8, 148u8, 151u8, + 35u8, 174u8, 118u8, 139u8, 101u8, 56u8, 85u8, 211u8, 121u8, 168u8, 0u8, + 216u8, ], ) } - #[doc = "Counter for the related counted storage map"] - pub fn counter_for_sub_pools_storage( + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " Maximum number of child bounties that can be added to a parent bounty."] + pub fn max_active_child_bounty_count( &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "NominationPools", - "CounterForSubPoolsStorage", - vec![], + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "ChildBounties", + "MaxActiveChildBountyCount", [ - 212u8, 145u8, 212u8, 226u8, 234u8, 31u8, 26u8, 240u8, 107u8, 91u8, - 171u8, 120u8, 41u8, 195u8, 16u8, 86u8, 55u8, 127u8, 103u8, 93u8, 128u8, - 48u8, 69u8, 104u8, 168u8, 236u8, 81u8, 54u8, 2u8, 184u8, 215u8, 51u8, + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, ], ) } - #[doc = " Metadata for the pool."] - pub fn metadata( + #[doc = " Minimum value for a child-bounty."] + pub fn child_bounty_value_minimum( &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::sp_core::bounded::bounded_vec::BoundedVec<::core::primitive::u8>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "NominationPools", - "Metadata", - vec![::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - )], + ) -> ::subxt::constants::Address<::core::primitive::u128> { + ::subxt::constants::Address::new_static( + "ChildBounties", + "ChildBountyValueMinimum", [ - 108u8, 250u8, 163u8, 54u8, 192u8, 143u8, 239u8, 62u8, 97u8, 163u8, - 161u8, 215u8, 171u8, 225u8, 49u8, 18u8, 37u8, 200u8, 143u8, 254u8, - 136u8, 26u8, 54u8, 187u8, 39u8, 3u8, 216u8, 24u8, 188u8, 25u8, 243u8, - 251u8, + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, + 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, ], ) } - #[doc = " Metadata for the pool."] - pub fn metadata_root( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::sp_core::bounded::bounded_vec::BoundedVec<::core::primitive::u8>, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "NominationPools", - "Metadata", - Vec::new(), - [ - 108u8, 250u8, 163u8, 54u8, 192u8, 143u8, 239u8, 62u8, 97u8, 163u8, - 161u8, 215u8, 171u8, 225u8, 49u8, 18u8, 37u8, 200u8, 143u8, 254u8, - 136u8, 26u8, 54u8, 187u8, 39u8, 3u8, 216u8, 24u8, 188u8, 25u8, 243u8, - 251u8, - ], - ) + } + } + } + pub mod tips { + use super::root_mod; + use super::runtime_types; + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub type Error = runtime_types::pallet_tips::pallet::Error; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ReportAwesome { + pub reason: ::std::vec::Vec<::core::primitive::u8>, + pub who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, } - #[doc = "Counter for the related counted storage map"] - pub fn counter_for_metadata( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "NominationPools", - "CounterForMetadata", - vec![], - [ - 190u8, 232u8, 77u8, 134u8, 245u8, 89u8, 160u8, 187u8, 163u8, 68u8, - 188u8, 204u8, 31u8, 145u8, 219u8, 165u8, 213u8, 1u8, 167u8, 90u8, - 175u8, 218u8, 147u8, 144u8, 158u8, 226u8, 23u8, 233u8, 55u8, 168u8, - 161u8, 237u8, - ], - ) + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct RetractTip { + pub hash: ::subxt::utils::H256, } - #[doc = " Ever increasing number of all pools created so far."] - pub fn last_pool_id( + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct TipNew { + pub reason: ::std::vec::Vec<::core::primitive::u8>, + pub who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + #[codec(compact)] + pub tip_value: ::core::primitive::u128, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Tip { + pub hash: ::subxt::utils::H256, + #[codec(compact)] + pub tip_value: ::core::primitive::u128, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct CloseTip { + pub hash: ::subxt::utils::H256, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SlashTip { + pub hash: ::subxt::utils::H256, + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Report something `reason` that deserves a tip and claim any eventual the finder's fee."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "Payment: `TipReportDepositBase` will be reserved from the origin account, as well as"] + #[doc = "`DataDepositPerByte` for each byte in `reason`."] + #[doc = ""] + #[doc = "- `reason`: The reason for, or the thing that deserves, the tip; generally this will be"] + #[doc = " a UTF-8-encoded URL."] + #[doc = "- `who`: The account which should be credited for the tip."] + #[doc = ""] + #[doc = "Emits `NewTip` if successful."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(R)` where `R` length of `reason`."] + #[doc = " - encoding and hashing of 'reason'"] + pub fn report_awesome( &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "NominationPools", - "LastPoolId", - vec![], + reason: ::std::vec::Vec<::core::primitive::u8>, + who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Tips", + "report_awesome", + types::ReportAwesome { reason, who }, [ - 50u8, 254u8, 218u8, 41u8, 213u8, 184u8, 170u8, 166u8, 31u8, 29u8, - 196u8, 57u8, 215u8, 20u8, 40u8, 40u8, 19u8, 22u8, 9u8, 184u8, 11u8, - 21u8, 21u8, 125u8, 97u8, 38u8, 219u8, 209u8, 2u8, 238u8, 247u8, 51u8, + 126u8, 68u8, 2u8, 54u8, 195u8, 15u8, 43u8, 27u8, 183u8, 254u8, 157u8, + 163u8, 252u8, 14u8, 207u8, 251u8, 215u8, 111u8, 98u8, 209u8, 150u8, + 11u8, 240u8, 177u8, 106u8, 93u8, 191u8, 31u8, 62u8, 11u8, 223u8, 79u8, ], ) } - #[doc = " A reverse lookup from the pool's account id to its id."] + #[doc = "Retract a prior tip-report from `report_awesome`, and cancel the process of tipping."] #[doc = ""] - #[doc = " This is only used for slashing. In all other instances, the pool id is used, and the"] - #[doc = " accounts are deterministically derived from it."] - pub fn reverse_pool_id_lookup( + #[doc = "If successful, the original deposit will be unreserved."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the tip identified by `hash`"] + #[doc = "must have been reported by the signing account through `report_awesome` (and not"] + #[doc = "through `tip_new`)."] + #[doc = ""] + #[doc = "- `hash`: The identity of the open tip for which a tip value is declared. This is formed"] + #[doc = " as the hash of the tuple of the original tip `reason` and the beneficiary account ID."] + #[doc = ""] + #[doc = "Emits `TipRetracted` if successful."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(1)`"] + #[doc = " - Depends on the length of `T::Hash` which is fixed."] + pub fn retract_tip( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "NominationPools", - "ReversePoolIdLookup", - vec![::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - )], + hash: ::subxt::utils::H256, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Tips", + "retract_tip", + types::RetractTip { hash }, [ - 178u8, 161u8, 51u8, 220u8, 128u8, 1u8, 135u8, 83u8, 236u8, 159u8, 36u8, - 237u8, 120u8, 128u8, 6u8, 191u8, 41u8, 159u8, 94u8, 178u8, 174u8, - 235u8, 221u8, 173u8, 44u8, 81u8, 211u8, 255u8, 231u8, 81u8, 16u8, 87u8, + 137u8, 42u8, 229u8, 188u8, 157u8, 195u8, 184u8, 176u8, 64u8, 142u8, + 67u8, 175u8, 185u8, 207u8, 214u8, 71u8, 165u8, 29u8, 137u8, 227u8, + 132u8, 195u8, 255u8, 66u8, 186u8, 57u8, 34u8, 184u8, 187u8, 65u8, + 129u8, 131u8, ], ) } - #[doc = " A reverse lookup from the pool's account id to its id."] + #[doc = "Give a tip for something new; no finder's fee will be taken."] #[doc = ""] - #[doc = " This is only used for slashing. In all other instances, the pool id is used, and the"] - #[doc = " accounts are deterministically derived from it."] - pub fn reverse_pool_id_lookup_root( + #[doc = "The dispatch origin for this call must be _Signed_ and the signing account must be a"] + #[doc = "member of the `Tippers` set."] + #[doc = ""] + #[doc = "- `reason`: The reason for, or the thing that deserves, the tip; generally this will be"] + #[doc = " a UTF-8-encoded URL."] + #[doc = "- `who`: The account which should be credited for the tip."] + #[doc = "- `tip_value`: The amount of tip that the sender would like to give. The median tip"] + #[doc = " value of active tippers will be given to the `who`."] + #[doc = ""] + #[doc = "Emits `NewTip` if successful."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(R + T)` where `R` length of `reason`, `T` is the number of tippers."] + #[doc = " - `O(T)`: decoding `Tipper` vec of length `T`. `T` is charged as upper bound given by"] + #[doc = " `ContainsLengthBound`. The actual cost depends on the implementation of"] + #[doc = " `T::Tippers`."] + #[doc = " - `O(R)`: hashing and encoding of reason of length `R`"] + pub fn tip_new( &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "NominationPools", - "ReversePoolIdLookup", - Vec::new(), + reason: ::std::vec::Vec<::core::primitive::u8>, + who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + tip_value: ::core::primitive::u128, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Tips", + "tip_new", + types::TipNew { + reason, + who, + tip_value, + }, [ - 178u8, 161u8, 51u8, 220u8, 128u8, 1u8, 135u8, 83u8, 236u8, 159u8, 36u8, - 237u8, 120u8, 128u8, 6u8, 191u8, 41u8, 159u8, 94u8, 178u8, 174u8, - 235u8, 221u8, 173u8, 44u8, 81u8, 211u8, 255u8, 231u8, 81u8, 16u8, 87u8, + 217u8, 15u8, 70u8, 80u8, 193u8, 110u8, 212u8, 110u8, 212u8, 45u8, + 197u8, 150u8, 43u8, 116u8, 115u8, 231u8, 148u8, 102u8, 202u8, 28u8, + 55u8, 88u8, 166u8, 238u8, 11u8, 238u8, 229u8, 189u8, 89u8, 115u8, + 196u8, 95u8, ], ) } - #[doc = "Counter for the related counted storage map"] - pub fn counter_for_reverse_pool_id_lookup( + #[doc = "Declare a tip value for an already-open tip."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the signing account must be a"] + #[doc = "member of the `Tippers` set."] + #[doc = ""] + #[doc = "- `hash`: The identity of the open tip for which a tip value is declared. This is formed"] + #[doc = " as the hash of the tuple of the hash of the original tip `reason` and the beneficiary"] + #[doc = " account ID."] + #[doc = "- `tip_value`: The amount of tip that the sender would like to give. The median tip"] + #[doc = " value of active tippers will be given to the `who`."] + #[doc = ""] + #[doc = "Emits `TipClosing` if the threshold of tippers has been reached and the countdown period"] + #[doc = "has started."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(T)` where `T` is the number of tippers. decoding `Tipper` vec of length `T`, insert"] + #[doc = " tip and check closing, `T` is charged as upper bound given by `ContainsLengthBound`."] + #[doc = " The actual cost depends on the implementation of `T::Tippers`."] + #[doc = ""] + #[doc = " Actually weight could be lower as it depends on how many tips are in `OpenTip` but it"] + #[doc = " is weighted as if almost full i.e of length `T-1`."] + pub fn tip( &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "NominationPools", - "CounterForReversePoolIdLookup", - vec![], + hash: ::subxt::utils::H256, + tip_value: ::core::primitive::u128, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Tips", + "tip", + types::Tip { hash, tip_value }, [ - 148u8, 83u8, 81u8, 33u8, 188u8, 72u8, 148u8, 208u8, 245u8, 178u8, 52u8, - 245u8, 229u8, 140u8, 100u8, 152u8, 8u8, 217u8, 161u8, 80u8, 226u8, - 42u8, 15u8, 252u8, 90u8, 197u8, 120u8, 114u8, 144u8, 90u8, 199u8, - 123u8, + 133u8, 52u8, 131u8, 14u8, 71u8, 232u8, 254u8, 31u8, 33u8, 206u8, 50u8, + 76u8, 56u8, 167u8, 228u8, 202u8, 195u8, 0u8, 164u8, 107u8, 170u8, 98u8, + 192u8, 37u8, 209u8, 199u8, 130u8, 15u8, 168u8, 63u8, 181u8, 134u8, ], ) } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " The nomination pool's pallet id."] - pub fn pallet_id( + #[doc = "Close and payout a tip."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "The tip identified by `hash` must have finished its countdown period."] + #[doc = ""] + #[doc = "- `hash`: The identity of the open tip for which a tip value is declared. This is formed"] + #[doc = " as the hash of the tuple of the original tip `reason` and the beneficiary account ID."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- : `O(T)` where `T` is the number of tippers. decoding `Tipper` vec of length `T`. `T`"] + #[doc = " is charged as upper bound given by `ContainsLengthBound`. The actual cost depends on"] + #[doc = " the implementation of `T::Tippers`."] + pub fn close_tip( &self, - ) -> ::subxt::constants::Address - { - ::subxt::constants::Address::new_static( - "NominationPools", - "PalletId", + hash: ::subxt::utils::H256, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Tips", + "close_tip", + types::CloseTip { hash }, [ - 139u8, 109u8, 228u8, 151u8, 252u8, 32u8, 130u8, 69u8, 112u8, 154u8, - 174u8, 45u8, 83u8, 245u8, 51u8, 132u8, 173u8, 5u8, 186u8, 24u8, 243u8, - 9u8, 12u8, 214u8, 80u8, 74u8, 69u8, 189u8, 30u8, 94u8, 22u8, 39u8, + 32u8, 53u8, 0u8, 222u8, 45u8, 157u8, 107u8, 174u8, 203u8, 50u8, 81u8, + 230u8, 6u8, 111u8, 79u8, 55u8, 49u8, 151u8, 107u8, 114u8, 81u8, 200u8, + 144u8, 175u8, 29u8, 142u8, 115u8, 184u8, 102u8, 116u8, 156u8, 173u8, ], ) } - #[doc = " The maximum pool points-to-balance ratio that an `open` pool can have."] + #[doc = "Remove and slash an already-open tip."] #[doc = ""] - #[doc = " This is important in the event slashing takes place and the pool's points-to-balance"] - #[doc = " ratio becomes disproportional."] + #[doc = "May only be called from `T::RejectOrigin`."] #[doc = ""] - #[doc = " Moreover, this relates to the `RewardCounter` type as well, as the arithmetic operations"] - #[doc = " are a function of number of points, and by setting this value to e.g. 10, you ensure"] - #[doc = " that the total number of points in the system are at most 10 times the total_issuance of"] - #[doc = " the chain, in the absolute worse case."] + #[doc = "As a result, the finder is slashed and the deposits are lost."] #[doc = ""] - #[doc = " For a value of 10, the threshold would be a pool points-to-balance ratio of 10:1."] - #[doc = " Such a scenario would also be the equivalent of the pool being 90% slashed."] - pub fn max_points_to_balance( + #[doc = "Emits `TipSlashed` if successful."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- O(1)."] + pub fn slash_tip( &self, - ) -> ::subxt::constants::Address<::core::primitive::u8> { - ::subxt::constants::Address::new_static( - "NominationPools", - "MaxPointsToBalance", + hash: ::subxt::utils::H256, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Tips", + "slash_tip", + types::SlashTip { hash }, [ - 141u8, 130u8, 11u8, 35u8, 226u8, 114u8, 92u8, 179u8, 168u8, 110u8, - 28u8, 91u8, 221u8, 64u8, 4u8, 148u8, 201u8, 193u8, 185u8, 66u8, 226u8, - 114u8, 97u8, 79u8, 62u8, 212u8, 202u8, 114u8, 237u8, 228u8, 183u8, - 165u8, + 222u8, 209u8, 22u8, 47u8, 114u8, 230u8, 81u8, 200u8, 131u8, 0u8, 209u8, + 54u8, 17u8, 200u8, 175u8, 125u8, 100u8, 254u8, 41u8, 178u8, 20u8, 27u8, + 9u8, 184u8, 79u8, 93u8, 208u8, 148u8, 27u8, 190u8, 176u8, 169u8, ], ) } } } - } - pub mod fast_unstake { - use super::root_mod; - use super::runtime_types; - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub type Error = runtime_types::pallet_fast_unstake::pallet::Error; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::root_mod; + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub type Event = runtime_types::pallet_tips::pallet::Event; + pub mod events { use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -23248,7 +22392,14 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RegisterFastUnstake; + #[doc = "A new tip suggestion has been opened."] + pub struct NewTip { + pub tip_hash: ::subxt::utils::H256, + } + impl ::subxt::events::StaticEvent for NewTip { + const PALLET: &'static str = "Tips"; + const EVENT: &'static str = "NewTip"; + } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -23259,9 +22410,15 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Deregister; + #[doc = "A tip suggestion has reached threshold and is closing."] + pub struct TipClosing { + pub tip_hash: ::subxt::utils::H256, + } + impl ::subxt::events::StaticEvent for TipClosing { + const PALLET: &'static str = "Tips"; + const EVENT: &'static str = "TipClosing"; + } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -23271,88 +22428,16 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Control { - pub unchecked_eras_to_check: ::core::primitive::u32, + #[doc = "A tip suggestion has been closed."] + pub struct TipClosed { + pub tip_hash: ::subxt::utils::H256, + pub who: ::subxt::utils::AccountId32, + pub payout: ::core::primitive::u128, } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Register oneself for fast-unstake."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be signed by the controller account, similar to"] - #[doc = "`staking::unbond`."] - #[doc = ""] - #[doc = "The stash associated with the origin must have no ongoing unlocking chunks. If"] - #[doc = "successful, this will fully unbond and chill the stash. Then, it will enqueue the stash"] - #[doc = "to be checked in further blocks."] - #[doc = ""] - #[doc = "If by the time this is called, the stash is actually eligible for fast-unstake, then"] - #[doc = "they are guaranteed to remain eligible, because the call will chill them as well."] - #[doc = ""] - #[doc = "If the check works, the entire staking data is removed, i.e. the stash is fully"] - #[doc = "unstaked."] - #[doc = ""] - #[doc = "If the check fails, the stash remains chilled and waiting for being unbonded as in with"] - #[doc = "the normal staking system, but they lose part of their unbonding chunks due to consuming"] - #[doc = "the chain's resources."] - pub fn register_fast_unstake(&self) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "FastUnstake", - "register_fast_unstake", - RegisterFastUnstake {}, - [ - 254u8, 85u8, 128u8, 135u8, 172u8, 170u8, 34u8, 145u8, 79u8, 117u8, - 234u8, 90u8, 16u8, 174u8, 159u8, 197u8, 27u8, 239u8, 180u8, 85u8, - 116u8, 23u8, 254u8, 30u8, 197u8, 110u8, 48u8, 184u8, 177u8, 129u8, - 42u8, 122u8, - ], - ) - } - #[doc = "Deregister oneself from the fast-unstake."] - #[doc = ""] - #[doc = "This is useful if one is registered, they are still waiting, and they change their mind."] - #[doc = ""] - #[doc = "Note that the associated stash is still fully unbonded and chilled as a consequence of"] - #[doc = "calling `register_fast_unstake`. This should probably be followed by a call to"] - #[doc = "`Staking::rebond`."] - pub fn deregister(&self) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "FastUnstake", - "deregister", - Deregister {}, - [ - 198u8, 180u8, 253u8, 148u8, 124u8, 145u8, 175u8, 121u8, 42u8, 181u8, - 41u8, 155u8, 229u8, 181u8, 66u8, 140u8, 103u8, 86u8, 242u8, 155u8, - 192u8, 34u8, 157u8, 107u8, 211u8, 162u8, 1u8, 144u8, 35u8, 252u8, 88u8, - 21u8, - ], - ) - } - #[doc = "Control the operation of this pallet."] - #[doc = ""] - #[doc = "Dispatch origin must be signed by the [`Config::ControlOrigin`]."] - pub fn control( - &self, - unchecked_eras_to_check: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "FastUnstake", - "control", - Control { - unchecked_eras_to_check, - }, - [ - 134u8, 85u8, 43u8, 231u8, 209u8, 34u8, 248u8, 0u8, 238u8, 73u8, 175u8, - 105u8, 40u8, 128u8, 186u8, 40u8, 211u8, 106u8, 107u8, 206u8, 124u8, - 155u8, 220u8, 125u8, 143u8, 10u8, 162u8, 20u8, 99u8, 142u8, 243u8, 5u8, - ], - ) - } + impl ::subxt::events::StaticEvent for TipClosed { + const PALLET: &'static str = "Tips"; + const EVENT: &'static str = "TipClosed"; } - } - #[doc = "The events of this pallet."] - pub type Event = runtime_types::pallet_fast_unstake::pallet::Event; - pub mod events { - use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -23363,14 +22448,13 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A staker was unstaked."] - pub struct Unstaked { - pub stash: ::subxt::utils::AccountId32, - pub result: ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + #[doc = "A tip suggestion has been retracted."] + pub struct TipRetracted { + pub tip_hash: ::subxt::utils::H256, } - impl ::subxt::events::StaticEvent for Unstaked { - const PALLET: &'static str = "FastUnstake"; - const EVENT: &'static str = "Unstaked"; + impl ::subxt::events::StaticEvent for TipRetracted { + const PALLET: &'static str = "Tips"; + const EVENT: &'static str = "TipRetracted"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -23382,228 +22466,447 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A staker was slashed for requesting fast-unstake whilst being exposed."] - pub struct Slashed { - pub stash: ::subxt::utils::AccountId32, - pub amount: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for Slashed { - const PALLET: &'static str = "FastUnstake"; - const EVENT: &'static str = "Slashed"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Some internal error happened while migrating stash. They are removed as head as a"] - #[doc = "consequence."] - pub struct Errored { - pub stash: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for Errored { - const PALLET: &'static str = "FastUnstake"; - const EVENT: &'static str = "Errored"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "An internal error happened. Operations will be paused now."] - pub struct InternalError; - impl ::subxt::events::StaticEvent for InternalError { - const PALLET: &'static str = "FastUnstake"; - const EVENT: &'static str = "InternalError"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A batch was partially checked for the given eras, but the process did not finish."] - pub struct BatchChecked { - pub eras: ::std::vec::Vec<::core::primitive::u32>, - } - impl ::subxt::events::StaticEvent for BatchChecked { - const PALLET: &'static str = "FastUnstake"; - const EVENT: &'static str = "BatchChecked"; + #[doc = "A tip suggestion has been slashed."] + pub struct TipSlashed { + pub tip_hash: ::subxt::utils::H256, + pub finder: ::subxt::utils::AccountId32, + pub deposit: ::core::primitive::u128, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A batch was terminated."] - #[doc = ""] - #[doc = "This is always follows by a number of `Unstaked` or `Slashed` events, marking the end"] - #[doc = "of the batch. A new batch will be created upon next block."] - pub struct BatchFinished; - impl ::subxt::events::StaticEvent for BatchFinished { - const PALLET: &'static str = "FastUnstake"; - const EVENT: &'static str = "BatchFinished"; + impl ::subxt::events::StaticEvent for TipSlashed { + const PALLET: &'static str = "Tips"; + const EVENT: &'static str = "TipSlashed"; } } pub mod storage { use super::runtime_types; pub struct StorageApi; impl StorageApi { - #[doc = " The current \"head of the queue\" being unstaked."] - pub fn head( + #[doc = " TipsMap that are not yet completed. Keyed by the hash of `(reason, who)` from the value."] + #[doc = " This has the insecure enumerable hash function since the key itself is already"] + #[doc = " guaranteed to be a secure hash."] + pub fn tips( &self, + _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_fast_unstake::types::UnstakeRequest, + runtime_types::pallet_tips::OpenTip< + ::subxt::utils::AccountId32, + ::core::primitive::u128, + ::core::primitive::u32, + ::subxt::utils::H256, + >, + ::subxt::storage::address::Yes, + (), ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Tips", + "Tips", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], + [ + 241u8, 196u8, 105u8, 248u8, 29u8, 66u8, 86u8, 98u8, 6u8, 159u8, 191u8, + 0u8, 227u8, 232u8, 147u8, 248u8, 173u8, 20u8, 225u8, 12u8, 232u8, 5u8, + 93u8, 78u8, 18u8, 154u8, 130u8, 38u8, 142u8, 36u8, 66u8, 0u8, + ], + ) + } + #[doc = " TipsMap that are not yet completed. Keyed by the hash of `(reason, who)` from the value."] + #[doc = " This has the insecure enumerable hash function since the key itself is already"] + #[doc = " guaranteed to be a secure hash."] + pub fn tips_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_tips::OpenTip< + ::subxt::utils::AccountId32, + ::core::primitive::u128, + ::core::primitive::u32, + ::subxt::utils::H256, + >, (), (), + ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( - "FastUnstake", - "Head", - vec![], + "Tips", + "Tips", + Vec::new(), [ - 206u8, 19u8, 169u8, 239u8, 214u8, 136u8, 16u8, 102u8, 82u8, 110u8, - 128u8, 205u8, 102u8, 96u8, 148u8, 190u8, 67u8, 75u8, 2u8, 213u8, 134u8, - 143u8, 40u8, 57u8, 54u8, 66u8, 170u8, 42u8, 135u8, 212u8, 108u8, 177u8, + 241u8, 196u8, 105u8, 248u8, 29u8, 66u8, 86u8, 98u8, 6u8, 159u8, 191u8, + 0u8, 227u8, 232u8, 147u8, 248u8, 173u8, 20u8, 225u8, 12u8, 232u8, 5u8, + 93u8, 78u8, 18u8, 154u8, 130u8, 38u8, 142u8, 36u8, 66u8, 0u8, ], ) } - #[doc = " The map of all accounts wishing to be unstaked."] - #[doc = ""] - #[doc = " Keeps track of `AccountId` wishing to unstake and it's corresponding deposit."] - pub fn queue( + #[doc = " Simple preimage lookup from the reason's hash to the original data. Again, has an"] + #[doc = " insecure enumerable hash since the key is guaranteed to be the result of a secure hash."] + pub fn reasons( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u128, + ::std::vec::Vec<::core::primitive::u8>, ::subxt::storage::address::Yes, (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( - "FastUnstake", - "Queue", + "Tips", + "Reasons", vec![::subxt::storage::address::make_static_storage_map_key( _0.borrow(), )], [ - 250u8, 208u8, 88u8, 68u8, 8u8, 87u8, 27u8, 59u8, 120u8, 242u8, 79u8, - 54u8, 108u8, 15u8, 62u8, 143u8, 126u8, 66u8, 159u8, 159u8, 55u8, 212u8, - 190u8, 26u8, 171u8, 90u8, 156u8, 205u8, 173u8, 189u8, 230u8, 71u8, + 202u8, 191u8, 36u8, 162u8, 156u8, 102u8, 115u8, 10u8, 203u8, 35u8, + 201u8, 70u8, 195u8, 151u8, 89u8, 82u8, 202u8, 35u8, 210u8, 176u8, 82u8, + 1u8, 77u8, 94u8, 31u8, 70u8, 252u8, 194u8, 166u8, 91u8, 189u8, 134u8, ], ) } - #[doc = " The map of all accounts wishing to be unstaked."] - #[doc = ""] - #[doc = " Keeps track of `AccountId` wishing to unstake and it's corresponding deposit."] - pub fn queue_root( + #[doc = " Simple preimage lookup from the reason's hash to the original data. Again, has an"] + #[doc = " insecure enumerable hash since the key is guaranteed to be the result of a secure hash."] + pub fn reasons_root( &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u128, + ::std::vec::Vec<::core::primitive::u8>, (), (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( - "FastUnstake", - "Queue", + "Tips", + "Reasons", Vec::new(), [ - 250u8, 208u8, 88u8, 68u8, 8u8, 87u8, 27u8, 59u8, 120u8, 242u8, 79u8, - 54u8, 108u8, 15u8, 62u8, 143u8, 126u8, 66u8, 159u8, 159u8, 55u8, 212u8, - 190u8, 26u8, 171u8, 90u8, 156u8, 205u8, 173u8, 189u8, 230u8, 71u8, + 202u8, 191u8, 36u8, 162u8, 156u8, 102u8, 115u8, 10u8, 203u8, 35u8, + 201u8, 70u8, 195u8, 151u8, 89u8, 82u8, 202u8, 35u8, 210u8, 176u8, 82u8, + 1u8, 77u8, 94u8, 31u8, 70u8, 252u8, 194u8, 166u8, 91u8, 189u8, 134u8, ], ) } - #[doc = "Counter for the related counted storage map"] - pub fn counter_for_queue( + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " Maximum acceptable reason length."] + #[doc = ""] + #[doc = " Benchmarks depend on this value, be sure to update weights file when changing this value"] + pub fn maximum_reason_length( &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "FastUnstake", - "CounterForQueue", - vec![], + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "Tips", + "MaximumReasonLength", [ - 241u8, 174u8, 224u8, 214u8, 204u8, 37u8, 117u8, 62u8, 114u8, 63u8, - 123u8, 121u8, 201u8, 128u8, 26u8, 60u8, 170u8, 24u8, 112u8, 5u8, 248u8, - 7u8, 143u8, 17u8, 150u8, 91u8, 23u8, 90u8, 237u8, 4u8, 138u8, 210u8, + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, ], ) } - #[doc = " Number of eras to check per block."] - #[doc = ""] - #[doc = " If set to 0, this pallet does absolutely nothing."] - #[doc = ""] - #[doc = " Based on the amount of weight available at `on_idle`, up to this many eras of a single"] - #[doc = " nominator might be checked."] - pub fn eras_to_check_per_block( + #[doc = " The amount held on deposit per byte within the tip report reason or bounty description."] + pub fn data_deposit_per_byte( &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "FastUnstake", - "ErasToCheckPerBlock", - vec![], + ) -> ::subxt::constants::Address<::core::primitive::u128> { + ::subxt::constants::Address::new_static( + "Tips", + "DataDepositPerByte", [ - 85u8, 55u8, 18u8, 11u8, 75u8, 176u8, 36u8, 253u8, 183u8, 250u8, 203u8, - 178u8, 201u8, 79u8, 101u8, 89u8, 51u8, 142u8, 254u8, 23u8, 49u8, 140u8, - 195u8, 116u8, 66u8, 124u8, 165u8, 161u8, 151u8, 174u8, 37u8, 51u8, + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, + 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) + } + #[doc = " The period for which a tip remains open after is has achieved threshold tippers."] + pub fn tip_countdown(&self) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "Tips", + "TipCountdown", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " The percent of the final tip which goes to the original reporter of the tip."] + pub fn tip_finders_fee( + &self, + ) -> ::subxt::constants::Address + { + ::subxt::constants::Address::new_static( + "Tips", + "TipFindersFee", + [ + 99u8, 121u8, 176u8, 172u8, 235u8, 159u8, 116u8, 114u8, 179u8, 91u8, + 129u8, 117u8, 204u8, 135u8, 53u8, 7u8, 151u8, 26u8, 124u8, 151u8, + 202u8, 171u8, 171u8, 207u8, 183u8, 177u8, 24u8, 53u8, 109u8, 185u8, + 71u8, 183u8, + ], + ) + } + #[doc = " The amount held on deposit for placing a tip report."] + pub fn tip_report_deposit_base( + &self, + ) -> ::subxt::constants::Address<::core::primitive::u128> { + ::subxt::constants::Address::new_static( + "Tips", + "TipReportDepositBase", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, + 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, ], ) } } } } - pub mod parachains_origin { - use super::root_mod; - use super::runtime_types; - } - pub mod configuration { + pub mod election_provider_multi_phase { use super::root_mod; use super::runtime_types; - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub type Error = runtime_types::polkadot_runtime_parachains::configuration::pallet::Error; + #[doc = "Error of the pallet that can be returned in response to dispatches."] + pub type Error = runtime_types::pallet_election_provider_multi_phase::pallet::Error; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub mod calls { use super::root_mod; use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SubmitUnsigned { + pub raw_solution: ::std::boxed::Box< + runtime_types::pallet_election_provider_multi_phase::RawSolution< + runtime_types::polkadot_runtime::NposCompactSolution16, + >, + >, + pub witness: + runtime_types::pallet_election_provider_multi_phase::SolutionOrSnapshotSize, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetMinimumUntrustedScore { + pub maybe_next_score: + ::core::option::Option, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetEmergencyElectionResult { + pub supports: ::std::vec::Vec<( + ::subxt::utils::AccountId32, + runtime_types::sp_npos_elections::Support<::subxt::utils::AccountId32>, + )>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Submit { + pub raw_solution: ::std::boxed::Box< + runtime_types::pallet_election_provider_multi_phase::RawSolution< + runtime_types::polkadot_runtime::NposCompactSolution16, + >, + >, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct GovernanceFallback { + pub maybe_max_voters: ::core::option::Option<::core::primitive::u32>, + pub maybe_max_targets: ::core::option::Option<::core::primitive::u32>, + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Submit a solution for the unsigned phase."] + #[doc = ""] + #[doc = "The dispatch origin fo this call must be __none__."] + #[doc = ""] + #[doc = "This submission is checked on the fly. Moreover, this unsigned solution is only"] + #[doc = "validated when submitted to the pool from the **local** node. Effectively, this means"] + #[doc = "that only active validators can submit this transaction when authoring a block (similar"] + #[doc = "to an inherent)."] + #[doc = ""] + #[doc = "To prevent any incorrect solution (and thus wasted time/weight), this transaction will"] + #[doc = "panic if the solution submitted by the validator is invalid in any way, effectively"] + #[doc = "putting their authoring reward at risk."] + #[doc = ""] + #[doc = "No deposit or reward is associated with this submission."] + pub fn submit_unsigned( + &self, + raw_solution: runtime_types::pallet_election_provider_multi_phase::RawSolution< + runtime_types::polkadot_runtime::NposCompactSolution16, + >, + witness : runtime_types :: pallet_election_provider_multi_phase :: SolutionOrSnapshotSize, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "ElectionProviderMultiPhase", + "submit_unsigned", + types::SubmitUnsigned { + raw_solution: ::std::boxed::Box::new(raw_solution), + witness, + }, + [ + 100u8, 240u8, 31u8, 34u8, 93u8, 98u8, 93u8, 57u8, 41u8, 197u8, 97u8, + 58u8, 242u8, 10u8, 69u8, 250u8, 185u8, 169u8, 21u8, 8u8, 202u8, 61u8, + 36u8, 25u8, 4u8, 148u8, 82u8, 56u8, 242u8, 18u8, 27u8, 219u8, + ], + ) + } + #[doc = "Set a new value for `MinimumUntrustedScore`."] + #[doc = ""] + #[doc = "Dispatch origin must be aligned with `T::ForceOrigin`."] + #[doc = ""] + #[doc = "This check can be turned off by setting the value to `None`."] + pub fn set_minimum_untrusted_score( + &self, + maybe_next_score: ::core::option::Option< + runtime_types::sp_npos_elections::ElectionScore, + >, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "ElectionProviderMultiPhase", + "set_minimum_untrusted_score", + types::SetMinimumUntrustedScore { maybe_next_score }, + [ + 63u8, 101u8, 105u8, 146u8, 133u8, 162u8, 149u8, 112u8, 150u8, 219u8, + 183u8, 213u8, 234u8, 211u8, 144u8, 74u8, 106u8, 15u8, 62u8, 196u8, + 247u8, 49u8, 20u8, 48u8, 3u8, 105u8, 85u8, 46u8, 76u8, 4u8, 67u8, 81u8, + ], + ) + } + #[doc = "Set a solution in the queue, to be handed out to the client of this pallet in the next"] + #[doc = "call to `ElectionProvider::elect`."] + #[doc = ""] + #[doc = "This can only be set by `T::ForceOrigin`, and only when the phase is `Emergency`."] + #[doc = ""] + #[doc = "The solution is not checked for any feasibility and is assumed to be trustworthy, as any"] + #[doc = "feasibility check itself can in principle cause the election process to fail (due to"] + #[doc = "memory/weight constrains)."] + pub fn set_emergency_election_result( + &self, + supports: ::std::vec::Vec<( + ::subxt::utils::AccountId32, + runtime_types::sp_npos_elections::Support<::subxt::utils::AccountId32>, + )>, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "ElectionProviderMultiPhase", + "set_emergency_election_result", + types::SetEmergencyElectionResult { supports }, + [ + 115u8, 255u8, 205u8, 58u8, 153u8, 1u8, 246u8, 8u8, 225u8, 36u8, 66u8, + 144u8, 250u8, 145u8, 70u8, 76u8, 54u8, 63u8, 251u8, 51u8, 214u8, 204u8, + 55u8, 112u8, 46u8, 228u8, 255u8, 250u8, 151u8, 5u8, 44u8, 133u8, + ], + ) + } + #[doc = "Submit a solution for the signed phase."] + #[doc = ""] + #[doc = "The dispatch origin fo this call must be __signed__."] + #[doc = ""] + #[doc = "The solution is potentially queued, based on the claimed score and processed at the end"] + #[doc = "of the signed phase."] + #[doc = ""] + #[doc = "A deposit is reserved and recorded for the solution. Based on the outcome, the solution"] + #[doc = "might be rewarded, slashed, or get all or a part of the deposit back."] + pub fn submit( + &self, + raw_solution: runtime_types::pallet_election_provider_multi_phase::RawSolution< + runtime_types::polkadot_runtime::NposCompactSolution16, + >, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "ElectionProviderMultiPhase", + "submit", + types::Submit { + raw_solution: ::std::boxed::Box::new(raw_solution), + }, + [ + 220u8, 167u8, 40u8, 47u8, 253u8, 244u8, 72u8, 124u8, 30u8, 123u8, + 127u8, 227u8, 2u8, 66u8, 119u8, 64u8, 211u8, 200u8, 210u8, 98u8, 248u8, + 132u8, 68u8, 25u8, 34u8, 182u8, 230u8, 225u8, 241u8, 58u8, 193u8, + 134u8, + ], + ) + } + #[doc = "Trigger the governance fallback."] + #[doc = ""] + #[doc = "This can only be called when [`Phase::Emergency`] is enabled, as an alternative to"] + #[doc = "calling [`Call::set_emergency_election_result`]."] + pub fn governance_fallback( + &self, + maybe_max_voters: ::core::option::Option<::core::primitive::u32>, + maybe_max_targets: ::core::option::Option<::core::primitive::u32>, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "ElectionProviderMultiPhase", + "governance_fallback", + types::GovernanceFallback { + maybe_max_voters, + maybe_max_targets, + }, + [ + 206u8, 247u8, 76u8, 85u8, 7u8, 24u8, 231u8, 226u8, 192u8, 143u8, 43u8, + 67u8, 91u8, 202u8, 88u8, 176u8, 130u8, 1u8, 83u8, 229u8, 227u8, 200u8, + 179u8, 4u8, 113u8, 60u8, 99u8, 190u8, 53u8, 226u8, 142u8, 182u8, + ], + ) + } + } + } + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub type Event = runtime_types::pallet_election_provider_multi_phase::pallet::Event; + pub mod events { + use super::runtime_types; #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -23613,11 +22916,23 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetValidationUpgradeCooldown { - pub new: ::core::primitive::u32, + #[doc = "A solution was stored with the given compute."] + #[doc = ""] + #[doc = "The `origin` indicates the origin of the solution. If `origin` is `Some(AccountId)`,"] + #[doc = "the stored solution was submited in the signed phase by a miner with the `AccountId`."] + #[doc = "Otherwise, the solution was stored either during the unsigned phase or by"] + #[doc = "`T::ForceOrigin`. The `bool` is `true` when a previous solution was ejected to make"] + #[doc = "room for this one."] + pub struct SolutionStored { + pub compute: runtime_types::pallet_election_provider_multi_phase::ElectionCompute, + pub origin: ::core::option::Option<::subxt::utils::AccountId32>, + pub prev_ejected: ::core::primitive::bool, + } + impl ::subxt::events::StaticEvent for SolutionStored { + const PALLET: &'static str = "ElectionProviderMultiPhase"; + const EVENT: &'static str = "SolutionStored"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -23627,11 +22942,16 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetValidationUpgradeDelay { - pub new: ::core::primitive::u32, + #[doc = "The election has been finalized, with the given computation and score."] + pub struct ElectionFinalized { + pub compute: runtime_types::pallet_election_provider_multi_phase::ElectionCompute, + pub score: runtime_types::sp_npos_elections::ElectionScore, + } + impl ::subxt::events::StaticEvent for ElectionFinalized { + const PALLET: &'static str = "ElectionProviderMultiPhase"; + const EVENT: &'static str = "ElectionFinalized"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -23641,512 +22961,15 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetCodeRetentionPeriod { - pub new: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetMaxCodeSize { - pub new: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetMaxPovSize { - pub new: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetMaxHeadDataSize { - pub new: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetParathreadCores { - pub new: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetParathreadRetries { - pub new: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetGroupRotationFrequency { - pub new: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetChainAvailabilityPeriod { - pub new: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetThreadAvailabilityPeriod { - pub new: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetSchedulingLookahead { - pub new: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetMaxValidatorsPerCore { - pub new: ::core::option::Option<::core::primitive::u32>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetMaxValidators { - pub new: ::core::option::Option<::core::primitive::u32>, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetDisputePeriod { - pub new: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetDisputePostConclusionAcceptancePeriod { - pub new: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetDisputeMaxSpamSlots { - pub new: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetDisputeConclusionByTimeOutPeriod { - pub new: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetNoShowSlots { - pub new: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetNDelayTranches { - pub new: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetZerothDelayTrancheWidth { - pub new: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetNeededApprovals { - pub new: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetRelayVrfModuloSamples { - pub new: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetMaxUpwardQueueCount { - pub new: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetMaxUpwardQueueSize { - pub new: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetMaxDownwardMessageSize { - pub new: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetUmpServiceTotalWeight { - pub new: runtime_types::sp_weights::weight_v2::Weight, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetMaxUpwardMessageSize { - pub new: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetMaxUpwardMessageNumPerCandidate { - pub new: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetHrmpOpenRequestTtl { - pub new: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetHrmpSenderDeposit { - pub new: ::core::primitive::u128, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetHrmpRecipientDeposit { - pub new: ::core::primitive::u128, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetHrmpChannelMaxCapacity { - pub new: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetHrmpChannelMaxTotalSize { - pub new: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetHrmpMaxParachainInboundChannels { - pub new: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetHrmpMaxParathreadInboundChannels { - pub new: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetHrmpChannelMaxMessageSize { - pub new: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetHrmpMaxParachainOutboundChannels { - pub new: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetHrmpMaxParathreadOutboundChannels { - pub new: ::core::primitive::u32, + #[doc = "An election failed."] + #[doc = ""] + #[doc = "Not much can be said about which computes failed in the process."] + pub struct ElectionFailed; + impl ::subxt::events::StaticEvent for ElectionFailed { + const PALLET: &'static str = "ElectionProviderMultiPhase"; + const EVENT: &'static str = "ElectionFailed"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -24156,21 +22979,14 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetHrmpMaxMessageNumPerCandidate { - pub new: ::core::primitive::u32, + #[doc = "An account has been rewarded for their signed submission being finalized."] + pub struct Rewarded { + pub account: ::subxt::utils::AccountId32, + pub value: ::core::primitive::u128, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetUmpMaxIndividualWeight { - pub new: runtime_types::sp_weights::weight_v2::Weight, + impl ::subxt::events::StaticEvent for Rewarded { + const PALLET: &'static str = "ElectionProviderMultiPhase"; + const EVENT: &'static str = "Rewarded"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -24182,25 +22998,16 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetPvfCheckingEnabled { - pub new: ::core::primitive::bool, + #[doc = "An account has been slashed for submitting an invalid signed submission."] + pub struct Slashed { + pub account: ::subxt::utils::AccountId32, + pub value: ::core::primitive::u128, } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetPvfVotingTtl { - pub new: ::core::primitive::u32, + impl ::subxt::events::StaticEvent for Slashed { + const PALLET: &'static str = "ElectionProviderMultiPhase"; + const EVENT: &'static str = "Slashed"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -24210,943 +23017,1927 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetMinimumValidationUpgradeDelay { - pub new: ::core::primitive::u32, + #[doc = "There was a phase transition in a given round."] + pub struct PhaseTransitioned { + pub from: runtime_types::pallet_election_provider_multi_phase::Phase< + ::core::primitive::u32, + >, + pub to: runtime_types::pallet_election_provider_multi_phase::Phase< + ::core::primitive::u32, + >, + pub round: ::core::primitive::u32, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetBypassConsistencyCheck { - pub new: ::core::primitive::bool, + impl ::subxt::events::StaticEvent for PhaseTransitioned { + const PALLET: &'static str = "ElectionProviderMultiPhase"; + const EVENT: &'static str = "PhaseTransitioned"; } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Set the validation upgrade cooldown."] - pub fn set_validation_upgrade_cooldown( + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " Internal counter for the number of rounds."] + #[doc = ""] + #[doc = " This is useful for de-duplication of transactions submitted to the pool, and general"] + #[doc = " diagnostics of the pallet."] + #[doc = ""] + #[doc = " This is merely incremented once per every time that an upstream `elect` is called."] + pub fn round( &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_validation_upgrade_cooldown", - SetValidationUpgradeCooldown { new }, - [ - 109u8, 185u8, 0u8, 59u8, 177u8, 198u8, 76u8, 90u8, 108u8, 190u8, 56u8, - 126u8, 147u8, 110u8, 76u8, 111u8, 38u8, 200u8, 230u8, 144u8, 42u8, - 167u8, 175u8, 220u8, 102u8, 37u8, 60u8, 10u8, 118u8, 79u8, 146u8, - 203u8, - ], - ) - } - #[doc = "Set the validation upgrade delay."] - pub fn set_validation_upgrade_delay( - &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_validation_upgrade_delay", - SetValidationUpgradeDelay { new }, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "ElectionProviderMultiPhase", + "Round", + vec![], [ - 18u8, 130u8, 158u8, 253u8, 160u8, 194u8, 220u8, 120u8, 9u8, 68u8, - 232u8, 176u8, 34u8, 81u8, 200u8, 236u8, 141u8, 139u8, 62u8, 110u8, - 76u8, 9u8, 218u8, 69u8, 55u8, 2u8, 233u8, 109u8, 83u8, 117u8, 141u8, - 253u8, + 16u8, 49u8, 176u8, 52u8, 202u8, 111u8, 120u8, 8u8, 217u8, 96u8, 35u8, + 14u8, 233u8, 130u8, 47u8, 98u8, 34u8, 44u8, 166u8, 188u8, 199u8, 210u8, + 21u8, 19u8, 70u8, 96u8, 139u8, 8u8, 53u8, 82u8, 165u8, 239u8, ], ) } - #[doc = "Set the acceptance period for an included candidate."] - pub fn set_code_retention_period( + #[doc = " Current phase."] + pub fn current_phase( &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_code_retention_period", - SetCodeRetentionPeriod { new }, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_election_provider_multi_phase::Phase< + ::core::primitive::u32, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "ElectionProviderMultiPhase", + "CurrentPhase", + vec![], [ - 221u8, 140u8, 253u8, 111u8, 64u8, 236u8, 93u8, 52u8, 214u8, 245u8, - 178u8, 30u8, 77u8, 166u8, 242u8, 252u8, 203u8, 106u8, 12u8, 195u8, - 27u8, 159u8, 96u8, 197u8, 145u8, 69u8, 241u8, 59u8, 74u8, 220u8, 62u8, - 205u8, + 236u8, 101u8, 8u8, 52u8, 68u8, 240u8, 74u8, 159u8, 181u8, 53u8, 153u8, + 101u8, 228u8, 81u8, 96u8, 161u8, 34u8, 67u8, 35u8, 28u8, 121u8, 44u8, + 229u8, 45u8, 196u8, 87u8, 73u8, 125u8, 216u8, 245u8, 255u8, 15u8, ], ) } - #[doc = "Set the max validation code size for incoming upgrades."] - pub fn set_max_code_size( + #[doc = " Current best solution, signed or unsigned, queued to be returned upon `elect`."] + pub fn queued_solution( &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_max_code_size", - SetMaxCodeSize { new }, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_election_provider_multi_phase::ReadySolution, + ::subxt::storage::address::Yes, + (), + (), + > { + ::subxt::storage::address::Address::new_static( + "ElectionProviderMultiPhase", + "QueuedSolution", + vec![], [ - 232u8, 106u8, 45u8, 195u8, 27u8, 162u8, 188u8, 213u8, 137u8, 13u8, - 123u8, 89u8, 215u8, 141u8, 231u8, 82u8, 205u8, 215u8, 73u8, 142u8, - 115u8, 109u8, 132u8, 118u8, 194u8, 211u8, 82u8, 20u8, 75u8, 55u8, - 218u8, 46u8, + 11u8, 152u8, 13u8, 167u8, 204u8, 209u8, 171u8, 249u8, 59u8, 250u8, + 58u8, 152u8, 164u8, 121u8, 146u8, 112u8, 241u8, 16u8, 159u8, 251u8, + 209u8, 251u8, 114u8, 29u8, 188u8, 30u8, 84u8, 71u8, 136u8, 173u8, + 145u8, 236u8, ], ) } - #[doc = "Set the max POV block size for incoming upgrades."] - pub fn set_max_pov_size( + #[doc = " Snapshot data of the round."] + #[doc = ""] + #[doc = " This is created at the beginning of the signed phase and cleared upon calling `elect`."] + pub fn snapshot( &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_max_pov_size", - SetMaxPovSize { new }, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_election_provider_multi_phase::RoundSnapshot< + ::subxt::utils::AccountId32, + ( + ::subxt::utils::AccountId32, + ::core::primitive::u64, + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::subxt::utils::AccountId32, + >, + ), + >, + ::subxt::storage::address::Yes, + (), + (), + > { + ::subxt::storage::address::Address::new_static( + "ElectionProviderMultiPhase", + "Snapshot", + vec![], [ - 15u8, 176u8, 13u8, 19u8, 177u8, 160u8, 211u8, 238u8, 29u8, 194u8, - 187u8, 235u8, 244u8, 65u8, 158u8, 47u8, 102u8, 221u8, 95u8, 10u8, 21u8, - 33u8, 219u8, 234u8, 82u8, 122u8, 75u8, 53u8, 14u8, 126u8, 218u8, 23u8, + 239u8, 56u8, 191u8, 77u8, 150u8, 224u8, 248u8, 88u8, 132u8, 224u8, + 164u8, 83u8, 253u8, 36u8, 46u8, 156u8, 72u8, 152u8, 36u8, 206u8, 72u8, + 27u8, 226u8, 87u8, 146u8, 220u8, 93u8, 178u8, 26u8, 115u8, 232u8, 71u8, ], ) } - #[doc = "Set the max head data size for paras."] - pub fn set_max_head_data_size( + #[doc = " Desired number of targets to elect for this round."] + #[doc = ""] + #[doc = " Only exists when [`Snapshot`] is present."] + pub fn desired_targets( &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_max_head_data_size", - SetMaxHeadDataSize { new }, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + ::subxt::storage::address::Yes, + (), + (), + > { + ::subxt::storage::address::Address::new_static( + "ElectionProviderMultiPhase", + "DesiredTargets", + vec![], [ - 219u8, 128u8, 213u8, 65u8, 190u8, 224u8, 87u8, 80u8, 172u8, 112u8, - 160u8, 229u8, 52u8, 1u8, 189u8, 125u8, 177u8, 139u8, 103u8, 39u8, 21u8, - 125u8, 62u8, 177u8, 74u8, 25u8, 41u8, 11u8, 200u8, 79u8, 139u8, 171u8, + 16u8, 247u8, 4u8, 181u8, 93u8, 79u8, 12u8, 212u8, 146u8, 167u8, 80u8, + 58u8, 118u8, 52u8, 68u8, 87u8, 90u8, 140u8, 31u8, 210u8, 2u8, 116u8, + 220u8, 231u8, 115u8, 112u8, 118u8, 118u8, 68u8, 34u8, 151u8, 165u8, ], ) } - #[doc = "Set the number of parathread execution cores."] - pub fn set_parathread_cores( + #[doc = " The metadata of the [`RoundSnapshot`]"] + #[doc = ""] + #[doc = " Only exists when [`Snapshot`] is present."] + pub fn snapshot_metadata( &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_parathread_cores", - SetParathreadCores { new }, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_election_provider_multi_phase::SolutionOrSnapshotSize, + ::subxt::storage::address::Yes, + (), + (), + > { + ::subxt::storage::address::Address::new_static( + "ElectionProviderMultiPhase", + "SnapshotMetadata", + vec![], [ - 155u8, 102u8, 168u8, 202u8, 236u8, 87u8, 16u8, 128u8, 141u8, 99u8, - 154u8, 162u8, 216u8, 198u8, 236u8, 233u8, 104u8, 230u8, 137u8, 132u8, - 41u8, 106u8, 167u8, 81u8, 195u8, 172u8, 107u8, 28u8, 138u8, 254u8, - 180u8, 61u8, + 135u8, 122u8, 60u8, 75u8, 194u8, 240u8, 187u8, 96u8, 240u8, 203u8, + 192u8, 22u8, 117u8, 148u8, 118u8, 24u8, 240u8, 213u8, 94u8, 22u8, + 194u8, 47u8, 181u8, 245u8, 77u8, 149u8, 11u8, 251u8, 117u8, 220u8, + 205u8, 78u8, ], ) } - #[doc = "Set the number of retries for a particular parathread."] - pub fn set_parathread_retries( + #[doc = " The next index to be assigned to an incoming signed submission."] + #[doc = ""] + #[doc = " Every accepted submission is assigned a unique index; that index is bound to that particular"] + #[doc = " submission for the duration of the election. On election finalization, the next index is"] + #[doc = " reset to 0."] + #[doc = ""] + #[doc = " We can't just use `SignedSubmissionIndices.len()`, because that's a bounded set; past its"] + #[doc = " capacity, it will simply saturate. We can't just iterate over `SignedSubmissionsMap`,"] + #[doc = " because iteration is slow. Instead, we store the value here."] + pub fn signed_submission_next_index( &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_parathread_retries", - SetParathreadRetries { new }, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "ElectionProviderMultiPhase", + "SignedSubmissionNextIndex", + vec![], [ - 192u8, 81u8, 152u8, 41u8, 40u8, 3u8, 251u8, 205u8, 244u8, 133u8, 42u8, - 197u8, 21u8, 221u8, 80u8, 196u8, 222u8, 69u8, 153u8, 39u8, 161u8, 90u8, - 4u8, 38u8, 167u8, 131u8, 237u8, 42u8, 135u8, 37u8, 156u8, 108u8, + 242u8, 11u8, 157u8, 105u8, 96u8, 7u8, 31u8, 20u8, 51u8, 141u8, 182u8, + 180u8, 13u8, 172u8, 155u8, 59u8, 42u8, 238u8, 115u8, 8u8, 6u8, 137u8, + 45u8, 2u8, 123u8, 187u8, 53u8, 215u8, 19u8, 129u8, 54u8, 22u8, ], ) } - #[doc = "Set the parachain validator-group rotation frequency"] - pub fn set_group_rotation_frequency( + #[doc = " A sorted, bounded vector of `(score, block_number, index)`, where each `index` points to a"] + #[doc = " value in `SignedSubmissions`."] + #[doc = ""] + #[doc = " We never need to process more than a single signed submission at a time. Signed submissions"] + #[doc = " can be quite large, so we're willing to pay the cost of multiple database accesses to access"] + #[doc = " them one at a time instead of reading and decoding all of them at once."] + pub fn signed_submission_indices( &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_group_rotation_frequency", - SetGroupRotationFrequency { new }, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::bounded_collections::bounded_vec::BoundedVec<( + runtime_types::sp_npos_elections::ElectionScore, + ::core::primitive::u32, + ::core::primitive::u32, + )>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "ElectionProviderMultiPhase", + "SignedSubmissionIndices", + vec![], [ - 205u8, 222u8, 129u8, 36u8, 136u8, 186u8, 114u8, 70u8, 214u8, 22u8, - 112u8, 65u8, 56u8, 42u8, 103u8, 93u8, 108u8, 242u8, 188u8, 229u8, - 150u8, 19u8, 12u8, 222u8, 25u8, 254u8, 48u8, 218u8, 200u8, 208u8, - 132u8, 251u8, + 228u8, 166u8, 94u8, 248u8, 71u8, 26u8, 125u8, 81u8, 32u8, 22u8, 46u8, + 185u8, 209u8, 123u8, 46u8, 17u8, 152u8, 149u8, 222u8, 125u8, 112u8, + 230u8, 29u8, 177u8, 162u8, 214u8, 66u8, 38u8, 170u8, 121u8, 129u8, + 100u8, ], ) } - #[doc = "Set the availability period for parachains."] - pub fn set_chain_availability_period( + #[doc = " Unchecked, signed solutions."] + #[doc = ""] + #[doc = " Together with `SubmissionIndices`, this stores a bounded set of `SignedSubmissions` while"] + #[doc = " allowing us to keep only a single one in memory at a time."] + #[doc = ""] + #[doc = " Twox note: the key of the map is an auto-incrementing index which users cannot inspect or"] + #[doc = " affect; we shouldn't need a cryptographically secure hasher."] + pub fn signed_submissions_map( &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_chain_availability_period", - SetChainAvailabilityPeriod { new }, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_election_provider_multi_phase::signed::SignedSubmission< + ::subxt::utils::AccountId32, + ::core::primitive::u128, + runtime_types::polkadot_runtime::NposCompactSolution16, + >, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "ElectionProviderMultiPhase", + "SignedSubmissionsMap", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], [ - 171u8, 21u8, 54u8, 241u8, 19u8, 100u8, 54u8, 143u8, 97u8, 191u8, 193u8, - 96u8, 7u8, 86u8, 255u8, 109u8, 255u8, 93u8, 113u8, 28u8, 182u8, 75u8, - 120u8, 208u8, 91u8, 125u8, 156u8, 38u8, 56u8, 230u8, 24u8, 139u8, + 84u8, 65u8, 205u8, 191u8, 143u8, 246u8, 239u8, 27u8, 243u8, 54u8, + 250u8, 8u8, 125u8, 32u8, 241u8, 141u8, 210u8, 225u8, 56u8, 101u8, + 241u8, 52u8, 157u8, 29u8, 13u8, 155u8, 73u8, 132u8, 118u8, 53u8, 2u8, + 135u8, ], ) } - #[doc = "Set the availability period for parathreads."] - pub fn set_thread_availability_period( + #[doc = " Unchecked, signed solutions."] + #[doc = ""] + #[doc = " Together with `SubmissionIndices`, this stores a bounded set of `SignedSubmissions` while"] + #[doc = " allowing us to keep only a single one in memory at a time."] + #[doc = ""] + #[doc = " Twox note: the key of the map is an auto-incrementing index which users cannot inspect or"] + #[doc = " affect; we shouldn't need a cryptographically secure hasher."] + pub fn signed_submissions_map_root( &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_thread_availability_period", - SetThreadAvailabilityPeriod { new }, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_election_provider_multi_phase::signed::SignedSubmission< + ::subxt::utils::AccountId32, + ::core::primitive::u128, + runtime_types::polkadot_runtime::NposCompactSolution16, + >, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "ElectionProviderMultiPhase", + "SignedSubmissionsMap", + Vec::new(), [ - 208u8, 27u8, 246u8, 33u8, 90u8, 200u8, 75u8, 177u8, 19u8, 107u8, 236u8, - 43u8, 159u8, 156u8, 184u8, 10u8, 146u8, 71u8, 212u8, 129u8, 44u8, 19u8, - 162u8, 172u8, 162u8, 46u8, 166u8, 10u8, 67u8, 112u8, 206u8, 50u8, + 84u8, 65u8, 205u8, 191u8, 143u8, 246u8, 239u8, 27u8, 243u8, 54u8, + 250u8, 8u8, 125u8, 32u8, 241u8, 141u8, 210u8, 225u8, 56u8, 101u8, + 241u8, 52u8, 157u8, 29u8, 13u8, 155u8, 73u8, 132u8, 118u8, 53u8, 2u8, + 135u8, ], ) } - #[doc = "Set the scheduling lookahead, in expected number of blocks at peak throughput."] - pub fn set_scheduling_lookahead( + #[doc = " The minimum score that each 'untrusted' solution must attain in order to be considered"] + #[doc = " feasible."] + #[doc = ""] + #[doc = " Can be set via `set_minimum_untrusted_score`."] + pub fn minimum_untrusted_score( &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_scheduling_lookahead", - SetSchedulingLookahead { new }, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::sp_npos_elections::ElectionScore, + ::subxt::storage::address::Yes, + (), + (), + > { + ::subxt::storage::address::Address::new_static( + "ElectionProviderMultiPhase", + "MinimumUntrustedScore", + vec![], [ - 220u8, 74u8, 0u8, 150u8, 45u8, 29u8, 56u8, 210u8, 66u8, 12u8, 119u8, - 176u8, 103u8, 24u8, 216u8, 55u8, 211u8, 120u8, 233u8, 204u8, 167u8, - 100u8, 199u8, 157u8, 186u8, 174u8, 40u8, 218u8, 19u8, 230u8, 253u8, - 7u8, + 77u8, 235u8, 181u8, 45u8, 230u8, 12u8, 0u8, 179u8, 152u8, 38u8, 74u8, + 199u8, 47u8, 84u8, 85u8, 55u8, 171u8, 226u8, 217u8, 125u8, 17u8, 194u8, + 95u8, 157u8, 73u8, 245u8, 75u8, 130u8, 248u8, 7u8, 53u8, 226u8, ], ) } - #[doc = "Set the maximum number of validators to assign to any core."] - pub fn set_max_validators_per_core( + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " Duration of the unsigned phase."] + pub fn unsigned_phase( &self, - new: ::core::option::Option<::core::primitive::u32>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_max_validators_per_core", - SetMaxValidatorsPerCore { new }, + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "ElectionProviderMultiPhase", + "UnsignedPhase", [ - 227u8, 113u8, 192u8, 116u8, 114u8, 171u8, 27u8, 22u8, 84u8, 117u8, - 146u8, 152u8, 94u8, 101u8, 14u8, 52u8, 228u8, 170u8, 163u8, 82u8, - 248u8, 130u8, 32u8, 103u8, 225u8, 151u8, 145u8, 36u8, 98u8, 158u8, 6u8, - 245u8, + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, ], ) } - #[doc = "Set the maximum number of validators to use in parachain consensus."] - pub fn set_max_validators( - &self, - new: ::core::option::Option<::core::primitive::u32>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_max_validators", - SetMaxValidators { new }, + #[doc = " Duration of the signed phase."] + pub fn signed_phase(&self) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "ElectionProviderMultiPhase", + "SignedPhase", [ - 143u8, 212u8, 59u8, 147u8, 4u8, 55u8, 142u8, 209u8, 237u8, 76u8, 7u8, - 178u8, 41u8, 81u8, 4u8, 203u8, 184u8, 149u8, 32u8, 1u8, 106u8, 180u8, - 121u8, 20u8, 137u8, 169u8, 144u8, 77u8, 38u8, 53u8, 243u8, 127u8, + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, ], ) } - #[doc = "Set the dispute period, in number of sessions to keep for disputes."] - pub fn set_dispute_period( + #[doc = " The minimum amount of improvement to the solution score that defines a solution as"] + #[doc = " \"better\" in the Signed phase."] + pub fn better_signed_threshold( &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_dispute_period", - SetDisputePeriod { new }, + ) -> ::subxt::constants::Address + { + ::subxt::constants::Address::new_static( + "ElectionProviderMultiPhase", + "BetterSignedThreshold", [ - 36u8, 191u8, 142u8, 240u8, 48u8, 101u8, 10u8, 197u8, 117u8, 125u8, - 156u8, 189u8, 130u8, 77u8, 242u8, 130u8, 205u8, 154u8, 152u8, 47u8, - 75u8, 56u8, 63u8, 61u8, 33u8, 163u8, 151u8, 97u8, 105u8, 99u8, 55u8, - 180u8, + 225u8, 236u8, 95u8, 157u8, 90u8, 94u8, 106u8, 192u8, 254u8, 19u8, 87u8, + 80u8, 16u8, 62u8, 42u8, 204u8, 136u8, 106u8, 225u8, 53u8, 212u8, 52u8, + 177u8, 79u8, 4u8, 116u8, 201u8, 104u8, 222u8, 75u8, 86u8, 227u8, ], ) } - #[doc = "Set the dispute post conclusion acceptance period."] - pub fn set_dispute_post_conclusion_acceptance_period( + #[doc = " The minimum amount of improvement to the solution score that defines a solution as"] + #[doc = " \"better\" in the Unsigned phase."] + pub fn better_unsigned_threshold( &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload + ) -> ::subxt::constants::Address { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_dispute_post_conclusion_acceptance_period", - SetDisputePostConclusionAcceptancePeriod { new }, + ::subxt::constants::Address::new_static( + "ElectionProviderMultiPhase", + "BetterUnsignedThreshold", [ - 66u8, 56u8, 45u8, 87u8, 51u8, 49u8, 91u8, 95u8, 255u8, 185u8, 54u8, - 165u8, 85u8, 142u8, 238u8, 251u8, 174u8, 81u8, 3u8, 61u8, 92u8, 97u8, - 203u8, 20u8, 107u8, 50u8, 208u8, 250u8, 208u8, 159u8, 225u8, 175u8, + 225u8, 236u8, 95u8, 157u8, 90u8, 94u8, 106u8, 192u8, 254u8, 19u8, 87u8, + 80u8, 16u8, 62u8, 42u8, 204u8, 136u8, 106u8, 225u8, 53u8, 212u8, 52u8, + 177u8, 79u8, 4u8, 116u8, 201u8, 104u8, 222u8, 75u8, 86u8, 227u8, ], ) } - #[doc = "Set the maximum number of dispute spam slots."] - pub fn set_dispute_max_spam_slots( + #[doc = " The repeat threshold of the offchain worker."] + #[doc = ""] + #[doc = " For example, if it is 5, that means that at least 5 blocks will elapse between attempts"] + #[doc = " to submit the worker's solution."] + pub fn offchain_repeat( &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_dispute_max_spam_slots", - SetDisputeMaxSpamSlots { new }, + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "ElectionProviderMultiPhase", + "OffchainRepeat", [ - 177u8, 58u8, 3u8, 205u8, 145u8, 85u8, 160u8, 162u8, 13u8, 171u8, 124u8, - 54u8, 58u8, 209u8, 88u8, 131u8, 230u8, 248u8, 142u8, 18u8, 121u8, - 129u8, 196u8, 121u8, 25u8, 15u8, 252u8, 229u8, 89u8, 230u8, 14u8, 68u8, + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, ], ) } - #[doc = "Set the dispute conclusion by time out period."] - pub fn set_dispute_conclusion_by_time_out_period( + #[doc = " The priority of the unsigned transaction submitted in the unsigned-phase"] + pub fn miner_tx_priority( &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_dispute_conclusion_by_time_out_period", - SetDisputeConclusionByTimeOutPeriod { new }, + ) -> ::subxt::constants::Address<::core::primitive::u64> { + ::subxt::constants::Address::new_static( + "ElectionProviderMultiPhase", + "MinerTxPriority", [ - 238u8, 102u8, 27u8, 169u8, 68u8, 116u8, 198u8, 64u8, 190u8, 33u8, 36u8, - 98u8, 176u8, 157u8, 123u8, 148u8, 126u8, 85u8, 32u8, 19u8, 49u8, 40u8, - 172u8, 41u8, 195u8, 182u8, 44u8, 255u8, 136u8, 204u8, 250u8, 6u8, + 128u8, 214u8, 205u8, 242u8, 181u8, 142u8, 124u8, 231u8, 190u8, 146u8, + 59u8, 226u8, 157u8, 101u8, 103u8, 117u8, 249u8, 65u8, 18u8, 191u8, + 103u8, 119u8, 53u8, 85u8, 81u8, 96u8, 220u8, 42u8, 184u8, 239u8, 42u8, + 246u8, ], ) } - #[doc = "Set the no show slots, in number of number of consensus slots."] - #[doc = "Must be at least 1."] - pub fn set_no_show_slots( + #[doc = " Maximum number of signed submissions that can be queued."] + #[doc = ""] + #[doc = " It is best to avoid adjusting this during an election, as it impacts downstream data"] + #[doc = " structures. In particular, `SignedSubmissionIndices` is bounded on this value. If you"] + #[doc = " update this value during an election, you _must_ ensure that"] + #[doc = " `SignedSubmissionIndices.len()` is less than or equal to the new value. Otherwise,"] + #[doc = " attempts to submit new solutions may cause a runtime panic."] + pub fn signed_max_submissions( &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_no_show_slots", - SetNoShowSlots { new }, + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "ElectionProviderMultiPhase", + "SignedMaxSubmissions", [ - 94u8, 230u8, 89u8, 131u8, 188u8, 246u8, 251u8, 34u8, 249u8, 16u8, - 134u8, 63u8, 238u8, 115u8, 19u8, 97u8, 97u8, 218u8, 238u8, 115u8, - 126u8, 140u8, 236u8, 17u8, 177u8, 192u8, 210u8, 239u8, 126u8, 107u8, - 117u8, 207u8, + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, ], ) } - #[doc = "Set the total number of delay tranches."] - pub fn set_n_delay_tranches( + #[doc = " Maximum weight of a signed solution."] + #[doc = ""] + #[doc = " If [`Config::MinerConfig`] is being implemented to submit signed solutions (outside of"] + #[doc = " this pallet), then [`MinerConfig::solution_weight`] is used to compare against"] + #[doc = " this value."] + pub fn signed_max_weight( &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_n_delay_tranches", - SetNDelayTranches { new }, + ) -> ::subxt::constants::Address + { + ::subxt::constants::Address::new_static( + "ElectionProviderMultiPhase", + "SignedMaxWeight", [ - 195u8, 168u8, 178u8, 51u8, 20u8, 107u8, 227u8, 236u8, 57u8, 30u8, - 130u8, 93u8, 149u8, 2u8, 161u8, 66u8, 48u8, 37u8, 71u8, 108u8, 195u8, - 65u8, 153u8, 30u8, 181u8, 181u8, 158u8, 252u8, 120u8, 119u8, 36u8, - 146u8, + 206u8, 61u8, 253u8, 247u8, 163u8, 40u8, 161u8, 52u8, 134u8, 140u8, + 206u8, 83u8, 44u8, 166u8, 226u8, 115u8, 181u8, 14u8, 227u8, 130u8, + 210u8, 32u8, 85u8, 29u8, 230u8, 97u8, 130u8, 165u8, 147u8, 134u8, + 106u8, 76u8, ], ) } - #[doc = "Set the zeroth delay tranche width."] - pub fn set_zeroth_delay_tranche_width( + #[doc = " The maximum amount of unchecked solutions to refund the call fee for."] + pub fn signed_max_refunds( &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_zeroth_delay_tranche_width", - SetZerothDelayTrancheWidth { new }, + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "ElectionProviderMultiPhase", + "SignedMaxRefunds", [ - 69u8, 56u8, 125u8, 24u8, 181u8, 62u8, 99u8, 92u8, 166u8, 107u8, 91u8, - 134u8, 230u8, 128u8, 214u8, 135u8, 245u8, 64u8, 62u8, 78u8, 96u8, - 231u8, 195u8, 29u8, 158u8, 113u8, 46u8, 96u8, 29u8, 0u8, 154u8, 80u8, + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, ], ) } - #[doc = "Set the number of validators needed to approve a block."] - pub fn set_needed_approvals( + #[doc = " Base reward for a signed solution"] + pub fn signed_reward_base( &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_needed_approvals", - SetNeededApprovals { new }, + ) -> ::subxt::constants::Address<::core::primitive::u128> { + ::subxt::constants::Address::new_static( + "ElectionProviderMultiPhase", + "SignedRewardBase", [ - 238u8, 55u8, 134u8, 30u8, 67u8, 153u8, 150u8, 5u8, 226u8, 227u8, 185u8, - 188u8, 66u8, 60u8, 147u8, 118u8, 46u8, 174u8, 104u8, 100u8, 26u8, - 162u8, 65u8, 58u8, 162u8, 52u8, 211u8, 66u8, 242u8, 177u8, 230u8, 98u8, + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, + 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, ], ) } - #[doc = "Set the number of samples to do of the `RelayVRFModulo` approval assignment criterion."] - pub fn set_relay_vrf_modulo_samples( + #[doc = " Base deposit for a signed solution."] + pub fn signed_deposit_base( &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_relay_vrf_modulo_samples", - SetRelayVrfModuloSamples { new }, + ) -> ::subxt::constants::Address<::core::primitive::u128> { + ::subxt::constants::Address::new_static( + "ElectionProviderMultiPhase", + "SignedDepositBase", [ - 76u8, 101u8, 207u8, 184u8, 211u8, 8u8, 43u8, 4u8, 165u8, 147u8, 166u8, - 3u8, 189u8, 42u8, 125u8, 130u8, 21u8, 43u8, 189u8, 120u8, 239u8, 131u8, - 235u8, 35u8, 151u8, 15u8, 30u8, 81u8, 0u8, 2u8, 64u8, 21u8, + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, + 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, ], ) } - #[doc = "Sets the maximum items that can present in a upward dispatch queue at once."] - pub fn set_max_upward_queue_count( + #[doc = " Per-byte deposit for a signed solution."] + pub fn signed_deposit_byte( &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_max_upward_queue_count", - SetMaxUpwardQueueCount { new }, + ) -> ::subxt::constants::Address<::core::primitive::u128> { + ::subxt::constants::Address::new_static( + "ElectionProviderMultiPhase", + "SignedDepositByte", [ - 116u8, 186u8, 216u8, 17u8, 150u8, 187u8, 86u8, 154u8, 92u8, 122u8, - 178u8, 167u8, 215u8, 165u8, 55u8, 86u8, 229u8, 114u8, 10u8, 149u8, - 50u8, 183u8, 165u8, 32u8, 233u8, 105u8, 82u8, 177u8, 120u8, 25u8, 44u8, - 130u8, + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, + 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, ], ) } - #[doc = "Sets the maximum total size of items that can present in a upward dispatch queue at once."] - pub fn set_max_upward_queue_size( + #[doc = " Per-weight deposit for a signed solution."] + pub fn signed_deposit_weight( &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_max_upward_queue_size", - SetMaxUpwardQueueSize { new }, + ) -> ::subxt::constants::Address<::core::primitive::u128> { + ::subxt::constants::Address::new_static( + "ElectionProviderMultiPhase", + "SignedDepositWeight", [ - 18u8, 60u8, 141u8, 57u8, 134u8, 96u8, 140u8, 85u8, 137u8, 9u8, 209u8, - 123u8, 10u8, 165u8, 33u8, 184u8, 34u8, 82u8, 59u8, 60u8, 30u8, 47u8, - 22u8, 163u8, 119u8, 200u8, 197u8, 192u8, 112u8, 243u8, 156u8, 12u8, + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, + 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, ], ) } - #[doc = "Set the critical downward message size."] - pub fn set_max_downward_message_size( + #[doc = " The maximum number of electing voters to put in the snapshot. At the moment, snapshots"] + #[doc = " are only over a single block, but once multi-block elections are introduced they will"] + #[doc = " take place over multiple blocks."] + pub fn max_electing_voters( &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_max_downward_message_size", - SetMaxDownwardMessageSize { new }, + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "ElectionProviderMultiPhase", + "MaxElectingVoters", [ - 104u8, 25u8, 229u8, 184u8, 53u8, 246u8, 206u8, 180u8, 13u8, 156u8, - 14u8, 224u8, 215u8, 115u8, 104u8, 127u8, 167u8, 189u8, 239u8, 183u8, - 68u8, 124u8, 55u8, 211u8, 186u8, 115u8, 70u8, 195u8, 61u8, 151u8, 32u8, - 218u8, + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, ], ) } - #[doc = "Sets the soft limit for the phase of dispatching dispatchable upward messages."] - pub fn set_ump_service_total_weight( + #[doc = " The maximum number of electable targets to put in the snapshot."] + pub fn max_electable_targets( &self, - new: runtime_types::sp_weights::weight_v2::Weight, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_ump_service_total_weight", - SetUmpServiceTotalWeight { new }, + ) -> ::subxt::constants::Address<::core::primitive::u16> { + ::subxt::constants::Address::new_static( + "ElectionProviderMultiPhase", + "MaxElectableTargets", [ - 178u8, 63u8, 233u8, 183u8, 160u8, 109u8, 10u8, 162u8, 150u8, 110u8, - 66u8, 166u8, 197u8, 207u8, 91u8, 208u8, 137u8, 106u8, 140u8, 184u8, - 35u8, 85u8, 138u8, 49u8, 32u8, 15u8, 150u8, 136u8, 50u8, 197u8, 21u8, - 99u8, + 116u8, 33u8, 2u8, 170u8, 181u8, 147u8, 171u8, 169u8, 167u8, 227u8, + 41u8, 144u8, 11u8, 236u8, 82u8, 100u8, 74u8, 60u8, 184u8, 72u8, 169u8, + 90u8, 208u8, 135u8, 15u8, 117u8, 10u8, 123u8, 128u8, 193u8, 29u8, 70u8, ], ) } - #[doc = "Sets the maximum size of an upward message that can be sent by a candidate."] - pub fn set_max_upward_message_size( - &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_max_upward_message_size", - SetMaxUpwardMessageSize { new }, + #[doc = " The maximum number of winners that can be elected by this `ElectionProvider`"] + #[doc = " implementation."] + #[doc = ""] + #[doc = " Note: This must always be greater or equal to `T::DataProvider::desired_targets()`."] + pub fn max_winners(&self) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "ElectionProviderMultiPhase", + "MaxWinners", [ - 213u8, 120u8, 21u8, 247u8, 101u8, 21u8, 164u8, 228u8, 33u8, 115u8, - 20u8, 138u8, 28u8, 174u8, 247u8, 39u8, 194u8, 113u8, 34u8, 73u8, 142u8, - 94u8, 116u8, 151u8, 113u8, 92u8, 151u8, 227u8, 116u8, 250u8, 101u8, - 179u8, + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, ], ) } - #[doc = "Sets the maximum number of messages that a candidate can contain."] - pub fn set_max_upward_message_num_per_candidate( + pub fn miner_max_length( &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_max_upward_message_num_per_candidate", - SetMaxUpwardMessageNumPerCandidate { new }, + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "ElectionProviderMultiPhase", + "MinerMaxLength", [ - 54u8, 133u8, 226u8, 138u8, 184u8, 27u8, 130u8, 153u8, 130u8, 196u8, - 54u8, 79u8, 124u8, 10u8, 37u8, 139u8, 59u8, 190u8, 169u8, 87u8, 255u8, - 211u8, 38u8, 142u8, 37u8, 74u8, 144u8, 204u8, 75u8, 94u8, 154u8, 149u8, + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, ], ) } - #[doc = "Sets the number of sessions after which an HRMP open channel request expires."] - pub fn set_hrmp_open_request_ttl( + pub fn miner_max_weight( &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_hrmp_open_request_ttl", - SetHrmpOpenRequestTtl { new }, + ) -> ::subxt::constants::Address + { + ::subxt::constants::Address::new_static( + "ElectionProviderMultiPhase", + "MinerMaxWeight", [ - 192u8, 113u8, 113u8, 133u8, 197u8, 75u8, 88u8, 67u8, 130u8, 207u8, - 37u8, 192u8, 157u8, 159u8, 114u8, 75u8, 83u8, 180u8, 194u8, 180u8, - 96u8, 129u8, 7u8, 138u8, 110u8, 14u8, 229u8, 98u8, 71u8, 22u8, 229u8, - 247u8, + 206u8, 61u8, 253u8, 247u8, 163u8, 40u8, 161u8, 52u8, 134u8, 140u8, + 206u8, 83u8, 44u8, 166u8, 226u8, 115u8, 181u8, 14u8, 227u8, 130u8, + 210u8, 32u8, 85u8, 29u8, 230u8, 97u8, 130u8, 165u8, 147u8, 134u8, + 106u8, 76u8, ], ) } - #[doc = "Sets the amount of funds that the sender should provide for opening an HRMP channel."] - pub fn set_hrmp_sender_deposit( + pub fn miner_max_votes_per_voter( &self, - new: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_hrmp_sender_deposit", - SetHrmpSenderDeposit { new }, + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "ElectionProviderMultiPhase", + "MinerMaxVotesPerVoter", [ - 49u8, 38u8, 173u8, 114u8, 66u8, 140u8, 15u8, 151u8, 193u8, 54u8, 128u8, - 108u8, 72u8, 71u8, 28u8, 65u8, 129u8, 199u8, 105u8, 61u8, 96u8, 119u8, - 16u8, 53u8, 115u8, 120u8, 152u8, 122u8, 182u8, 171u8, 233u8, 48u8, + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, ], ) } - #[doc = "Sets the amount of funds that the recipient should provide for accepting opening an HRMP"] - #[doc = "channel."] - pub fn set_hrmp_recipient_deposit( + pub fn miner_max_winners( &self, - new: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_hrmp_recipient_deposit", - SetHrmpRecipientDeposit { new }, + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "ElectionProviderMultiPhase", + "MinerMaxWinners", [ - 209u8, 212u8, 164u8, 56u8, 71u8, 215u8, 98u8, 250u8, 202u8, 150u8, - 228u8, 6u8, 166u8, 94u8, 171u8, 142u8, 10u8, 253u8, 89u8, 43u8, 6u8, - 173u8, 8u8, 235u8, 52u8, 18u8, 78u8, 129u8, 227u8, 61u8, 74u8, 83u8, + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, ], ) } - #[doc = "Sets the maximum number of messages allowed in an HRMP channel at once."] - pub fn set_hrmp_channel_max_capacity( + } + } + } + pub mod voter_list { + use super::root_mod; + use super::runtime_types; + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub type Error = runtime_types::pallet_bags_list::pallet::Error; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Rebag { + pub dislocated: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct PutInFrontOf { + pub lighter: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Declare that some `dislocated` account has, through rewards or penalties, sufficiently"] + #[doc = "changed its score that it should properly fall into a different bag than its current"] + #[doc = "one."] + #[doc = ""] + #[doc = "Anyone can call this function about any potentially dislocated account."] + #[doc = ""] + #[doc = "Will always update the stored score of `dislocated` to the correct score, based on"] + #[doc = "`ScoreProvider`."] + #[doc = ""] + #[doc = "If `dislocated` does not exists, it returns an error."] + pub fn rebag( &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + dislocated: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Configuration", - "set_hrmp_channel_max_capacity", - SetHrmpChannelMaxCapacity { new }, + "VoterList", + "rebag", + types::Rebag { dislocated }, [ - 148u8, 109u8, 67u8, 220u8, 1u8, 115u8, 70u8, 93u8, 138u8, 190u8, 60u8, - 220u8, 80u8, 137u8, 246u8, 230u8, 115u8, 162u8, 30u8, 197u8, 11u8, - 33u8, 211u8, 224u8, 49u8, 165u8, 149u8, 155u8, 197u8, 44u8, 6u8, 167u8, + 35u8, 182u8, 31u8, 22u8, 190u8, 187u8, 31u8, 138u8, 60u8, 48u8, 236u8, + 16u8, 191u8, 143u8, 52u8, 110u8, 228u8, 43u8, 116u8, 13u8, 171u8, + 108u8, 112u8, 123u8, 252u8, 231u8, 132u8, 97u8, 195u8, 148u8, 252u8, + 241u8, ], ) } - #[doc = "Sets the maximum total size of messages in bytes allowed in an HRMP channel at once."] - pub fn set_hrmp_channel_max_total_size( + #[doc = "Move the caller's Id directly in front of `lighter`."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and can only be called by the Id of"] + #[doc = "the account going in front of `lighter`."] + #[doc = ""] + #[doc = "Only works if"] + #[doc = "- both nodes are within the same bag,"] + #[doc = "- and `origin` has a greater `Score` than `lighter`."] + pub fn put_in_front_of( &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + lighter: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Configuration", - "set_hrmp_channel_max_total_size", - SetHrmpChannelMaxTotalSize { new }, + "VoterList", + "put_in_front_of", + types::PutInFrontOf { lighter }, [ - 79u8, 40u8, 207u8, 173u8, 168u8, 143u8, 130u8, 240u8, 205u8, 34u8, - 61u8, 217u8, 215u8, 106u8, 61u8, 181u8, 8u8, 21u8, 105u8, 64u8, 183u8, - 235u8, 39u8, 133u8, 70u8, 77u8, 233u8, 201u8, 222u8, 8u8, 43u8, 159u8, + 184u8, 194u8, 39u8, 91u8, 28u8, 220u8, 76u8, 199u8, 64u8, 252u8, 233u8, + 241u8, 74u8, 19u8, 246u8, 190u8, 108u8, 227u8, 77u8, 162u8, 225u8, + 230u8, 101u8, 72u8, 159u8, 217u8, 133u8, 107u8, 84u8, 83u8, 81u8, + 227u8, ], ) } - #[doc = "Sets the maximum number of inbound HRMP channels a parachain is allowed to accept."] - pub fn set_hrmp_max_parachain_inbound_channels( + } + } + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub type Event = runtime_types::pallet_bags_list::pallet::Event; + pub mod events { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Moved an account from one bag to another."] + pub struct Rebagged { + pub who: ::subxt::utils::AccountId32, + pub from: ::core::primitive::u64, + pub to: ::core::primitive::u64, + } + impl ::subxt::events::StaticEvent for Rebagged { + const PALLET: &'static str = "VoterList"; + const EVENT: &'static str = "Rebagged"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Updated the score of some account to the given amount."] + pub struct ScoreUpdated { + pub who: ::subxt::utils::AccountId32, + pub new_score: ::core::primitive::u64, + } + impl ::subxt::events::StaticEvent for ScoreUpdated { + const PALLET: &'static str = "VoterList"; + const EVENT: &'static str = "ScoreUpdated"; + } + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " A single node, within some bag."] + #[doc = ""] + #[doc = " Nodes store links forward and back within their respective bags."] + pub fn list_nodes( &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_hrmp_max_parachain_inbound_channels", - SetHrmpMaxParachainInboundChannels { new }, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_bags_list::list::Node, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "VoterList", + "ListNodes", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], [ - 91u8, 215u8, 212u8, 131u8, 140u8, 185u8, 119u8, 184u8, 61u8, 121u8, - 120u8, 73u8, 202u8, 98u8, 124u8, 187u8, 171u8, 84u8, 136u8, 77u8, - 103u8, 169u8, 185u8, 8u8, 214u8, 214u8, 23u8, 195u8, 100u8, 72u8, 45u8, - 12u8, + 176u8, 186u8, 93u8, 51u8, 100u8, 184u8, 240u8, 29u8, 70u8, 3u8, 117u8, + 47u8, 23u8, 66u8, 231u8, 234u8, 53u8, 8u8, 234u8, 175u8, 181u8, 8u8, + 161u8, 154u8, 48u8, 178u8, 147u8, 227u8, 122u8, 115u8, 57u8, 97u8, ], ) } - #[doc = "Sets the maximum number of inbound HRMP channels a parathread is allowed to accept."] - pub fn set_hrmp_max_parathread_inbound_channels( + #[doc = " A single node, within some bag."] + #[doc = ""] + #[doc = " Nodes store links forward and back within their respective bags."] + pub fn list_nodes_root( &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_hrmp_max_parathread_inbound_channels", - SetHrmpMaxParathreadInboundChannels { new }, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_bags_list::list::Node, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "VoterList", + "ListNodes", + Vec::new(), [ - 209u8, 66u8, 180u8, 20u8, 87u8, 242u8, 219u8, 71u8, 22u8, 145u8, 220u8, - 48u8, 44u8, 42u8, 77u8, 69u8, 255u8, 82u8, 27u8, 125u8, 231u8, 111u8, - 23u8, 32u8, 239u8, 28u8, 200u8, 255u8, 91u8, 207u8, 99u8, 107u8, + 176u8, 186u8, 93u8, 51u8, 100u8, 184u8, 240u8, 29u8, 70u8, 3u8, 117u8, + 47u8, 23u8, 66u8, 231u8, 234u8, 53u8, 8u8, 234u8, 175u8, 181u8, 8u8, + 161u8, 154u8, 48u8, 178u8, 147u8, 227u8, 122u8, 115u8, 57u8, 97u8, ], ) } - #[doc = "Sets the maximum size of a message that could ever be put into an HRMP channel."] - pub fn set_hrmp_channel_max_message_size( + #[doc = "Counter for the related counted storage map"] + pub fn counter_for_list_nodes( &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_hrmp_channel_max_message_size", - SetHrmpChannelMaxMessageSize { new }, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "VoterList", + "CounterForListNodes", + vec![], [ - 17u8, 224u8, 230u8, 9u8, 114u8, 221u8, 138u8, 46u8, 234u8, 151u8, 27u8, - 34u8, 179u8, 67u8, 113u8, 228u8, 128u8, 212u8, 209u8, 125u8, 122u8, - 1u8, 79u8, 28u8, 10u8, 14u8, 83u8, 65u8, 253u8, 173u8, 116u8, 209u8, + 156u8, 168u8, 97u8, 33u8, 84u8, 117u8, 220u8, 89u8, 62u8, 182u8, 24u8, + 88u8, 231u8, 244u8, 41u8, 19u8, 210u8, 131u8, 87u8, 0u8, 241u8, 230u8, + 160u8, 142u8, 128u8, 153u8, 83u8, 36u8, 88u8, 247u8, 70u8, 130u8, ], ) } - #[doc = "Sets the maximum number of outbound HRMP channels a parachain is allowed to open."] - pub fn set_hrmp_max_parachain_outbound_channels( + #[doc = " A bag stored in storage."] + #[doc = ""] + #[doc = " Stores a `Bag` struct, which stores head and tail pointers to itself."] + pub fn list_bags( &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_hrmp_max_parachain_outbound_channels", - SetHrmpMaxParachainOutboundChannels { new }, + _0: impl ::std::borrow::Borrow<::core::primitive::u64>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_bags_list::list::Bag, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "VoterList", + "ListBags", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], [ - 26u8, 146u8, 150u8, 88u8, 236u8, 8u8, 63u8, 103u8, 71u8, 11u8, 20u8, - 210u8, 205u8, 106u8, 101u8, 112u8, 116u8, 73u8, 116u8, 136u8, 149u8, - 181u8, 207u8, 95u8, 151u8, 7u8, 98u8, 17u8, 224u8, 157u8, 117u8, 88u8, + 38u8, 86u8, 63u8, 92u8, 85u8, 59u8, 225u8, 244u8, 14u8, 155u8, 76u8, + 249u8, 153u8, 140u8, 179u8, 7u8, 96u8, 170u8, 236u8, 179u8, 4u8, 18u8, + 232u8, 146u8, 216u8, 51u8, 135u8, 116u8, 196u8, 117u8, 143u8, 153u8, ], ) } - #[doc = "Sets the maximum number of outbound HRMP channels a parathread is allowed to open."] - pub fn set_hrmp_max_parathread_outbound_channels( + #[doc = " A bag stored in storage."] + #[doc = ""] + #[doc = " Stores a `Bag` struct, which stores head and tail pointers to itself."] + pub fn list_bags_root( &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_hrmp_max_parathread_outbound_channels", - SetHrmpMaxParathreadOutboundChannels { new }, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_bags_list::list::Bag, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "VoterList", + "ListBags", + Vec::new(), [ - 31u8, 72u8, 93u8, 21u8, 180u8, 156u8, 101u8, 24u8, 145u8, 220u8, 194u8, - 93u8, 176u8, 164u8, 53u8, 123u8, 36u8, 113u8, 152u8, 13u8, 222u8, 54u8, - 175u8, 170u8, 235u8, 68u8, 236u8, 130u8, 178u8, 56u8, 140u8, 31u8, + 38u8, 86u8, 63u8, 92u8, 85u8, 59u8, 225u8, 244u8, 14u8, 155u8, 76u8, + 249u8, 153u8, 140u8, 179u8, 7u8, 96u8, 170u8, 236u8, 179u8, 4u8, 18u8, + 232u8, 146u8, 216u8, 51u8, 135u8, 116u8, 196u8, 117u8, 143u8, 153u8, ], ) } - #[doc = "Sets the maximum number of outbound HRMP messages can be sent by a candidate."] - pub fn set_hrmp_max_message_num_per_candidate( - &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_hrmp_max_message_num_per_candidate", - SetHrmpMaxMessageNumPerCandidate { new }, - [ - 244u8, 94u8, 225u8, 194u8, 133u8, 116u8, 202u8, 238u8, 8u8, 57u8, - 122u8, 125u8, 6u8, 131u8, 84u8, 102u8, 180u8, 67u8, 250u8, 136u8, 30u8, - 29u8, 110u8, 105u8, 219u8, 166u8, 91u8, 140u8, 44u8, 192u8, 37u8, - 185u8, - ], - ) - } - #[doc = "Sets the maximum amount of weight any individual upward message may consume."] - pub fn set_ump_max_individual_weight( + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The list of thresholds separating the various bags."] + #[doc = ""] + #[doc = " Ids are separated into unsorted bags according to their score. This specifies the"] + #[doc = " thresholds separating the bags. An id's bag is the largest bag for which the id's score"] + #[doc = " is less than or equal to its upper threshold."] + #[doc = ""] + #[doc = " When ids are iterated, higher bags are iterated completely before lower bags. This means"] + #[doc = " that iteration is _semi-sorted_: ids of higher score tend to come before ids of lower"] + #[doc = " score, but peer ids within a particular bag are sorted in insertion order."] + #[doc = ""] + #[doc = " # Expressing the constant"] + #[doc = ""] + #[doc = " This constant must be sorted in strictly increasing order. Duplicate items are not"] + #[doc = " permitted."] + #[doc = ""] + #[doc = " There is an implied upper limit of `Score::MAX`; that value does not need to be"] + #[doc = " specified within the bag. For any two threshold lists, if one ends with"] + #[doc = " `Score::MAX`, the other one does not, and they are otherwise equal, the two"] + #[doc = " lists will behave identically."] + #[doc = ""] + #[doc = " # Calculation"] + #[doc = ""] + #[doc = " It is recommended to generate the set of thresholds in a geometric series, such that"] + #[doc = " there exists some constant ratio such that `threshold[k + 1] == (threshold[k] *"] + #[doc = " constant_ratio).max(threshold[k] + 1)` for all `k`."] + #[doc = ""] + #[doc = " The helpers in the `/utils/frame/generate-bags` module can simplify this calculation."] + #[doc = ""] + #[doc = " # Examples"] + #[doc = ""] + #[doc = " - If `BagThresholds::get().is_empty()`, then all ids are put into the same bag, and"] + #[doc = " iteration is strictly in insertion order."] + #[doc = " - If `BagThresholds::get().len() == 64`, and the thresholds are determined according to"] + #[doc = " the procedure given above, then the constant ratio is equal to 2."] + #[doc = " - If `BagThresholds::get().len() == 200`, and the thresholds are determined according to"] + #[doc = " the procedure given above, then the constant ratio is approximately equal to 1.248."] + #[doc = " - If the threshold list begins `[1, 2, 3, ...]`, then an id with score 0 or 1 will fall"] + #[doc = " into bag 0, an id with score 2 will fall into bag 1, etc."] + #[doc = ""] + #[doc = " # Migration"] + #[doc = ""] + #[doc = " In the event that this list ever changes, a copy of the old bags list must be retained."] + #[doc = " With that `List::migrate` can be called, which will perform the appropriate migration."] + pub fn bag_thresholds( &self, - new: runtime_types::sp_weights::weight_v2::Weight, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_ump_max_individual_weight", - SetUmpMaxIndividualWeight { new }, + ) -> ::subxt::constants::Address<::std::vec::Vec<::core::primitive::u64>> + { + ::subxt::constants::Address::new_static( + "VoterList", + "BagThresholds", [ - 66u8, 190u8, 15u8, 172u8, 67u8, 16u8, 117u8, 247u8, 176u8, 25u8, 163u8, - 130u8, 147u8, 224u8, 226u8, 101u8, 219u8, 173u8, 176u8, 49u8, 90u8, - 133u8, 12u8, 223u8, 220u8, 18u8, 83u8, 232u8, 137u8, 52u8, 206u8, 71u8, + 103u8, 102u8, 255u8, 165u8, 124u8, 54u8, 5u8, 172u8, 112u8, 234u8, + 25u8, 175u8, 178u8, 19u8, 251u8, 73u8, 91u8, 192u8, 227u8, 81u8, 249u8, + 45u8, 126u8, 116u8, 7u8, 37u8, 9u8, 200u8, 167u8, 182u8, 12u8, 131u8, ], ) } - #[doc = "Enable or disable PVF pre-checking. Consult the field documentation prior executing."] - pub fn set_pvf_checking_enabled( + } + } + } + pub mod nomination_pools { + use super::root_mod; + use super::runtime_types; + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub type Error = runtime_types::pallet_nomination_pools::pallet::Error; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Join { + #[codec(compact)] + pub amount: ::core::primitive::u128, + pub pool_id: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct BondExtra { + pub extra: + runtime_types::pallet_nomination_pools::BondExtra<::core::primitive::u128>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ClaimPayout; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Unbond { + pub member_account: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + #[codec(compact)] + pub unbonding_points: ::core::primitive::u128, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct PoolWithdrawUnbonded { + pub pool_id: ::core::primitive::u32, + pub num_slashing_spans: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct WithdrawUnbonded { + pub member_account: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub num_slashing_spans: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Create { + #[codec(compact)] + pub amount: ::core::primitive::u128, + pub root: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub nominator: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub bouncer: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct CreateWithPoolId { + #[codec(compact)] + pub amount: ::core::primitive::u128, + pub root: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub nominator: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub bouncer: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub pool_id: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Nominate { + pub pool_id: ::core::primitive::u32, + pub validators: ::std::vec::Vec<::subxt::utils::AccountId32>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetState { + pub pool_id: ::core::primitive::u32, + pub state: runtime_types::pallet_nomination_pools::PoolState, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetMetadata { + pub pool_id: ::core::primitive::u32, + pub metadata: ::std::vec::Vec<::core::primitive::u8>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetConfigs { + pub min_join_bond: + runtime_types::pallet_nomination_pools::ConfigOp<::core::primitive::u128>, + pub min_create_bond: + runtime_types::pallet_nomination_pools::ConfigOp<::core::primitive::u128>, + pub max_pools: + runtime_types::pallet_nomination_pools::ConfigOp<::core::primitive::u32>, + pub max_members: + runtime_types::pallet_nomination_pools::ConfigOp<::core::primitive::u32>, + pub max_members_per_pool: + runtime_types::pallet_nomination_pools::ConfigOp<::core::primitive::u32>, + pub global_max_commission: runtime_types::pallet_nomination_pools::ConfigOp< + runtime_types::sp_arithmetic::per_things::Perbill, + >, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct UpdateRoles { + pub pool_id: ::core::primitive::u32, + pub new_root: runtime_types::pallet_nomination_pools::ConfigOp< + ::subxt::utils::AccountId32, + >, + pub new_nominator: runtime_types::pallet_nomination_pools::ConfigOp< + ::subxt::utils::AccountId32, + >, + pub new_bouncer: runtime_types::pallet_nomination_pools::ConfigOp< + ::subxt::utils::AccountId32, + >, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Chill { + pub pool_id: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct BondExtraOther { + pub member: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub extra: + runtime_types::pallet_nomination_pools::BondExtra<::core::primitive::u128>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetClaimPermission { + pub permission: runtime_types::pallet_nomination_pools::ClaimPermission, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ClaimPayoutOther { + pub other: ::subxt::utils::AccountId32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetCommission { + pub pool_id: ::core::primitive::u32, + pub new_commission: ::core::option::Option<( + runtime_types::sp_arithmetic::per_things::Perbill, + ::subxt::utils::AccountId32, + )>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetCommissionMax { + pub pool_id: ::core::primitive::u32, + pub max_commission: runtime_types::sp_arithmetic::per_things::Perbill, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetCommissionChangeRate { + pub pool_id: ::core::primitive::u32, + pub change_rate: runtime_types::pallet_nomination_pools::CommissionChangeRate< + ::core::primitive::u32, + >, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ClaimCommission { + pub pool_id: ::core::primitive::u32, + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Stake funds with a pool. The amount to bond is transferred from the member to the"] + #[doc = "pools account and immediately increases the pools bond."] + #[doc = ""] + #[doc = "# Note"] + #[doc = ""] + #[doc = "* An account can only be a member of a single pool."] + #[doc = "* An account cannot join the same pool multiple times."] + #[doc = "* This call will *not* dust the member account, so the member must have at least"] + #[doc = " `existential deposit + amount` in their account."] + #[doc = "* Only a pool with [`PoolState::Open`] can be joined"] + pub fn join( &self, - new: ::core::primitive::bool, - ) -> ::subxt::tx::Payload { + amount: ::core::primitive::u128, + pool_id: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Configuration", - "set_pvf_checking_enabled", - SetPvfCheckingEnabled { new }, + "NominationPools", + "join", + types::Join { amount, pool_id }, [ - 123u8, 76u8, 1u8, 112u8, 174u8, 245u8, 18u8, 67u8, 13u8, 29u8, 219u8, - 197u8, 201u8, 112u8, 230u8, 191u8, 37u8, 148u8, 73u8, 125u8, 54u8, - 236u8, 3u8, 80u8, 114u8, 155u8, 244u8, 132u8, 57u8, 63u8, 158u8, 248u8, + 205u8, 66u8, 42u8, 72u8, 146u8, 148u8, 119u8, 162u8, 101u8, 183u8, + 46u8, 176u8, 221u8, 204u8, 197u8, 20u8, 75u8, 226u8, 29u8, 118u8, + 208u8, 60u8, 192u8, 247u8, 222u8, 100u8, 69u8, 80u8, 172u8, 13u8, 69u8, + 250u8, ], ) } - #[doc = "Set the number of session changes after which a PVF pre-checking voting is rejected."] - pub fn set_pvf_voting_ttl( + #[doc = "Bond `extra` more funds from `origin` into the pool to which they already belong."] + #[doc = ""] + #[doc = "Additional funds can come from either the free balance of the account, of from the"] + #[doc = "accumulated rewards, see [`BondExtra`]."] + #[doc = ""] + #[doc = "Bonding extra funds implies an automatic payout of all pending rewards as well."] + #[doc = "See `bond_extra_other` to bond pending rewards of `other` members."] + pub fn bond_extra( &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + extra: runtime_types::pallet_nomination_pools::BondExtra< + ::core::primitive::u128, + >, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Configuration", - "set_pvf_voting_ttl", - SetPvfVotingTtl { new }, + "NominationPools", + "bond_extra", + types::BondExtra { extra }, [ - 17u8, 11u8, 98u8, 217u8, 208u8, 102u8, 238u8, 83u8, 118u8, 123u8, 20u8, - 18u8, 46u8, 212u8, 21u8, 164u8, 61u8, 104u8, 208u8, 204u8, 91u8, 210u8, - 40u8, 6u8, 201u8, 147u8, 46u8, 166u8, 219u8, 227u8, 121u8, 187u8, + 50u8, 72u8, 181u8, 216u8, 249u8, 27u8, 250u8, 177u8, 253u8, 22u8, + 240u8, 100u8, 184u8, 202u8, 197u8, 34u8, 21u8, 188u8, 248u8, 191u8, + 11u8, 10u8, 236u8, 161u8, 168u8, 37u8, 38u8, 238u8, 61u8, 183u8, 86u8, + 55u8, ], ) } - #[doc = "Sets the minimum delay between announcing the upgrade block for a parachain until the"] - #[doc = "upgrade taking place."] + #[doc = "A bonded member can use this to claim their payout based on the rewards that the pool"] + #[doc = "has accumulated since their last claimed payout (OR since joining if this is their first"] + #[doc = "time claiming rewards). The payout will be transferred to the member's account."] #[doc = ""] - #[doc = "See the field documentation for information and constraints for the new value."] - pub fn set_minimum_validation_upgrade_delay( - &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + #[doc = "The member will earn rewards pro rata based on the members stake vs the sum of the"] + #[doc = "members in the pools stake. Rewards do not \"expire\"."] + #[doc = ""] + #[doc = "See `claim_payout_other` to caim rewards on bahalf of some `other` pool member."] + pub fn claim_payout(&self) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Configuration", - "set_minimum_validation_upgrade_delay", - SetMinimumValidationUpgradeDelay { new }, + "NominationPools", + "claim_payout", + types::ClaimPayout {}, [ - 205u8, 188u8, 75u8, 136u8, 228u8, 26u8, 112u8, 27u8, 119u8, 37u8, - 252u8, 109u8, 23u8, 145u8, 21u8, 212u8, 7u8, 28u8, 242u8, 210u8, 182u8, - 111u8, 121u8, 109u8, 50u8, 130u8, 46u8, 127u8, 122u8, 40u8, 141u8, - 242u8, + 128u8, 58u8, 138u8, 55u8, 64u8, 16u8, 129u8, 25u8, 211u8, 229u8, 193u8, + 115u8, 47u8, 45u8, 155u8, 221u8, 218u8, 1u8, 222u8, 5u8, 236u8, 32u8, + 88u8, 0u8, 198u8, 72u8, 196u8, 181u8, 104u8, 16u8, 212u8, 29u8, ], ) } - #[doc = "Setting this to true will disable consistency checks for the configuration setters."] - #[doc = "Use with caution."] - pub fn set_bypass_consistency_check( + #[doc = "Unbond up to `unbonding_points` of the `member_account`'s funds from the pool. It"] + #[doc = "implicitly collects the rewards one last time, since not doing so would mean some"] + #[doc = "rewards would be forfeited."] + #[doc = ""] + #[doc = "Under certain conditions, this call can be dispatched permissionlessly (i.e. by any"] + #[doc = "account)."] + #[doc = ""] + #[doc = "# Conditions for a permissionless dispatch."] + #[doc = ""] + #[doc = "* The pool is blocked and the caller is either the root or bouncer. This is refereed to"] + #[doc = " as a kick."] + #[doc = "* The pool is destroying and the member is not the depositor."] + #[doc = "* The pool is destroying, the member is the depositor and no other members are in the"] + #[doc = " pool."] + #[doc = ""] + #[doc = "## Conditions for permissioned dispatch (i.e. the caller is also the"] + #[doc = "`member_account`):"] + #[doc = ""] + #[doc = "* The caller is not the depositor."] + #[doc = "* The caller is the depositor, the pool is destroying and no other members are in the"] + #[doc = " pool."] + #[doc = ""] + #[doc = "# Note"] + #[doc = ""] + #[doc = "If there are too many unlocking chunks to unbond with the pool account,"] + #[doc = "[`Call::pool_withdraw_unbonded`] can be called to try and minimize unlocking chunks."] + #[doc = "The [`StakingInterface::unbond`] will implicitly call [`Call::pool_withdraw_unbonded`]"] + #[doc = "to try to free chunks if necessary (ie. if unbound was called and no unlocking chunks"] + #[doc = "are available). However, it may not be possible to release the current unlocking chunks,"] + #[doc = "in which case, the result of this call will likely be the `NoMoreChunks` error from the"] + #[doc = "staking system."] + pub fn unbond( &self, - new: ::core::primitive::bool, - ) -> ::subxt::tx::Payload { + member_account: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + unbonding_points: ::core::primitive::u128, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Configuration", - "set_bypass_consistency_check", - SetBypassConsistencyCheck { new }, + "NominationPools", + "unbond", + types::Unbond { + member_account, + unbonding_points, + }, [ - 80u8, 66u8, 200u8, 98u8, 54u8, 207u8, 64u8, 99u8, 162u8, 121u8, 26u8, - 173u8, 113u8, 224u8, 240u8, 106u8, 69u8, 191u8, 177u8, 107u8, 34u8, - 74u8, 103u8, 128u8, 252u8, 160u8, 169u8, 246u8, 125u8, 127u8, 153u8, - 129u8, + 78u8, 15u8, 37u8, 18u8, 129u8, 63u8, 31u8, 3u8, 68u8, 10u8, 12u8, 12u8, + 166u8, 179u8, 38u8, 232u8, 97u8, 1u8, 83u8, 53u8, 26u8, 59u8, 42u8, + 219u8, 176u8, 246u8, 169u8, 28u8, 35u8, 67u8, 139u8, 81u8, ], ) } - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " The active configuration for the current session."] - pub fn active_config( + #[doc = "Call `withdraw_unbonded` for the pools account. This call can be made by any account."] + #[doc = ""] + #[doc = "This is useful if their are too many unlocking chunks to call `unbond`, and some"] + #[doc = "can be cleared by withdrawing. In the case there are too many unlocking chunks, the user"] + #[doc = "would probably see an error like `NoMoreChunks` emitted from the staking system when"] + #[doc = "they attempt to unbond."] + pub fn pool_withdraw_unbonded( &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_runtime_parachains::configuration::HostConfiguration< - ::core::primitive::u32, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Configuration", - "ActiveConfig", - vec![], + pool_id: ::core::primitive::u32, + num_slashing_spans: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "NominationPools", + "pool_withdraw_unbonded", + types::PoolWithdrawUnbonded { + pool_id, + num_slashing_spans, + }, [ - 152u8, 7u8, 210u8, 144u8, 253u8, 1u8, 141u8, 200u8, 122u8, 214u8, - 104u8, 100u8, 228u8, 235u8, 16u8, 86u8, 213u8, 212u8, 204u8, 46u8, - 74u8, 95u8, 217u8, 3u8, 40u8, 28u8, 149u8, 175u8, 7u8, 146u8, 24u8, - 3u8, + 152u8, 245u8, 131u8, 247u8, 106u8, 214u8, 154u8, 8u8, 7u8, 210u8, + 149u8, 218u8, 118u8, 46u8, 242u8, 182u8, 191u8, 119u8, 28u8, 199u8, + 36u8, 49u8, 219u8, 123u8, 58u8, 203u8, 211u8, 226u8, 217u8, 36u8, 56u8, + 0u8, ], ) } - #[doc = " Pending configuration changes."] + #[doc = "Withdraw unbonded funds from `member_account`. If no bonded funds can be unbonded, an"] + #[doc = "error is returned."] #[doc = ""] - #[doc = " This is a list of configuration changes, each with a session index at which it should"] - #[doc = " be applied."] + #[doc = "Under certain conditions, this call can be dispatched permissionlessly (i.e. by any"] + #[doc = "account)."] #[doc = ""] - #[doc = " The list is sorted ascending by session index. Also, this list can only contain at most"] - #[doc = " 2 items: for the next session and for the `scheduled_session`."] pub fn pending_configs (& self ,) -> :: subxt :: storage :: address :: Address :: < :: subxt :: storage :: address :: StaticStorageMapKey , :: std :: vec :: Vec < (:: core :: primitive :: u32 , runtime_types :: polkadot_runtime_parachains :: configuration :: HostConfiguration < :: core :: primitive :: u32 > ,) > , :: subxt :: storage :: address :: Yes , :: subxt :: storage :: address :: Yes , () >{ - ::subxt::storage::address::Address::new_static( - "Configuration", - "PendingConfigs", - vec![], + #[doc = "# Conditions for a permissionless dispatch"] + #[doc = ""] + #[doc = "* The pool is in destroy mode and the target is not the depositor."] + #[doc = "* The target is the depositor and they are the only member in the sub pools."] + #[doc = "* The pool is blocked and the caller is either the root or bouncer."] + #[doc = ""] + #[doc = "# Conditions for permissioned dispatch"] + #[doc = ""] + #[doc = "* The caller is the target and they are not the depositor."] + #[doc = ""] + #[doc = "# Note"] + #[doc = ""] + #[doc = "If the target is the depositor, the pool will be destroyed."] + pub fn withdraw_unbonded( + &self, + member_account: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + num_slashing_spans: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "NominationPools", + "withdraw_unbonded", + types::WithdrawUnbonded { + member_account, + num_slashing_spans, + }, [ - 206u8, 161u8, 39u8, 154u8, 62u8, 215u8, 33u8, 93u8, 214u8, 37u8, 29u8, - 71u8, 32u8, 176u8, 87u8, 166u8, 39u8, 11u8, 81u8, 155u8, 174u8, 118u8, - 138u8, 76u8, 22u8, 248u8, 148u8, 210u8, 243u8, 41u8, 111u8, 216u8, + 61u8, 216u8, 214u8, 166u8, 59u8, 42u8, 186u8, 141u8, 47u8, 50u8, 135u8, + 236u8, 166u8, 88u8, 90u8, 244u8, 57u8, 106u8, 193u8, 211u8, 215u8, + 131u8, 203u8, 33u8, 195u8, 120u8, 213u8, 94u8, 213u8, 66u8, 79u8, + 140u8, ], ) } - #[doc = " If this is set, then the configuration setters will bypass the consistency checks. This"] - #[doc = " is meant to be used only as the last resort."] - pub fn bypass_consistency_check( + #[doc = "Create a new delegation pool."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `amount` - The amount of funds to delegate to the pool. This also acts of a sort of"] + #[doc = " deposit since the pools creator cannot fully unbond funds until the pool is being"] + #[doc = " destroyed."] + #[doc = "* `index` - A disambiguation index for creating the account. Likely only useful when"] + #[doc = " creating multiple pools in the same extrinsic."] + #[doc = "* `root` - The account to set as [`PoolRoles::root`]."] + #[doc = "* `nominator` - The account to set as the [`PoolRoles::nominator`]."] + #[doc = "* `bouncer` - The account to set as the [`PoolRoles::bouncer`]."] + #[doc = ""] + #[doc = "# Note"] + #[doc = ""] + #[doc = "In addition to `amount`, the caller will transfer the existential deposit; so the caller"] + #[doc = "needs at have at least `amount + existential_deposit` transferrable."] + pub fn create( &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::bool, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Configuration", - "BypassConsistencyCheck", - vec![], + amount: ::core::primitive::u128, + root: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + nominator: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + bouncer: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "NominationPools", + "create", + types::Create { + amount, + root, + nominator, + bouncer, + }, [ - 42u8, 191u8, 122u8, 163u8, 112u8, 2u8, 148u8, 59u8, 79u8, 219u8, 184u8, - 172u8, 246u8, 136u8, 185u8, 251u8, 189u8, 226u8, 83u8, 129u8, 162u8, - 109u8, 148u8, 75u8, 120u8, 216u8, 44u8, 28u8, 221u8, 78u8, 177u8, 94u8, + 182u8, 114u8, 123u8, 215u8, 240u8, 217u8, 208u8, 165u8, 237u8, 1u8, + 215u8, 183u8, 218u8, 125u8, 71u8, 229u8, 68u8, 142u8, 60u8, 76u8, + 101u8, 242u8, 218u8, 61u8, 165u8, 203u8, 233u8, 241u8, 130u8, 13u8, + 76u8, 214u8, ], ) } - } - } - } - pub mod paras_shared { - use super::root_mod; - use super::runtime_types; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub struct TransactionApi; - impl TransactionApi {} - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " The current session index."] - pub fn current_session_index( + #[doc = "Create a new delegation pool with a previously used pool id"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "same as `create` with the inclusion of"] + #[doc = "* `pool_id` - `A valid PoolId."] + pub fn create_with_pool_id( &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "ParasShared", - "CurrentSessionIndex", - vec![], + amount: ::core::primitive::u128, + root: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + nominator: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + bouncer: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pool_id: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "NominationPools", + "create_with_pool_id", + types::CreateWithPoolId { + amount, + root, + nominator, + bouncer, + pool_id, + }, [ - 83u8, 15u8, 20u8, 55u8, 103u8, 65u8, 76u8, 202u8, 69u8, 14u8, 221u8, - 93u8, 38u8, 163u8, 167u8, 83u8, 18u8, 245u8, 33u8, 175u8, 7u8, 97u8, - 67u8, 186u8, 96u8, 57u8, 147u8, 120u8, 107u8, 91u8, 147u8, 64u8, + 76u8, 77u8, 158u8, 172u8, 4u8, 68u8, 53u8, 249u8, 156u8, 91u8, 19u8, + 151u8, 58u8, 199u8, 179u8, 0u8, 186u8, 152u8, 157u8, 28u8, 65u8, 227u8, + 133u8, 101u8, 102u8, 205u8, 68u8, 245u8, 104u8, 151u8, 146u8, 76u8, ], ) } - #[doc = " All the validators actively participating in parachain consensus."] - #[doc = " Indices are into the broader validator set."] - pub fn active_validator_indices( + #[doc = "Nominate on behalf of the pool."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be signed by the pool nominator or the pool"] + #[doc = "root role."] + #[doc = ""] + #[doc = "This directly forward the call to the staking pallet, on behalf of the pool bonded"] + #[doc = "account."] + pub fn nominate( &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "ParasShared", - "ActiveValidatorIndices", - vec![], + pool_id: ::core::primitive::u32, + validators: ::std::vec::Vec<::subxt::utils::AccountId32>, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "NominationPools", + "nominate", + types::Nominate { + pool_id, + validators, + }, [ - 123u8, 26u8, 202u8, 53u8, 219u8, 42u8, 54u8, 92u8, 144u8, 74u8, 228u8, - 234u8, 129u8, 216u8, 161u8, 98u8, 199u8, 12u8, 13u8, 231u8, 23u8, - 166u8, 185u8, 209u8, 191u8, 33u8, 231u8, 252u8, 232u8, 44u8, 213u8, - 221u8, + 10u8, 235u8, 64u8, 157u8, 36u8, 249u8, 186u8, 27u8, 79u8, 172u8, 25u8, + 3u8, 203u8, 19u8, 192u8, 182u8, 36u8, 103u8, 13u8, 20u8, 89u8, 140u8, + 159u8, 4u8, 132u8, 242u8, 192u8, 146u8, 55u8, 251u8, 216u8, 255u8, ], ) } - #[doc = " The parachain attestation keys of the validators actively participating in parachain consensus."] - #[doc = " This should be the same length as `ActiveValidatorIndices`."] - pub fn active_validator_keys( + #[doc = "Set a new state for the pool."] + #[doc = ""] + #[doc = "If a pool is already in the `Destroying` state, then under no condition can its state"] + #[doc = "change again."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be either:"] + #[doc = ""] + #[doc = "1. signed by the bouncer, or the root role of the pool,"] + #[doc = "2. if the pool conditions to be open are NOT met (as described by `ok_to_be_open`), and"] + #[doc = " then the state of the pool can be permissionlessly changed to `Destroying`."] + pub fn set_state( &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "ParasShared", - "ActiveValidatorKeys", - vec![], + pool_id: ::core::primitive::u32, + state: runtime_types::pallet_nomination_pools::PoolState, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "NominationPools", + "set_state", + types::SetState { pool_id, state }, [ - 33u8, 14u8, 54u8, 86u8, 184u8, 171u8, 194u8, 35u8, 187u8, 252u8, 181u8, - 79u8, 229u8, 134u8, 50u8, 235u8, 162u8, 216u8, 108u8, 160u8, 175u8, - 172u8, 239u8, 114u8, 57u8, 238u8, 9u8, 54u8, 57u8, 196u8, 105u8, 15u8, + 104u8, 40u8, 213u8, 88u8, 159u8, 115u8, 35u8, 249u8, 78u8, 180u8, 99u8, + 1u8, 225u8, 218u8, 192u8, 151u8, 25u8, 194u8, 192u8, 187u8, 39u8, + 170u8, 212u8, 125u8, 75u8, 250u8, 248u8, 175u8, 159u8, 161u8, 151u8, + 162u8, + ], + ) + } + #[doc = "Set a new metadata for the pool."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be signed by the bouncer, or the root role of the"] + #[doc = "pool."] + pub fn set_metadata( + &self, + pool_id: ::core::primitive::u32, + metadata: ::std::vec::Vec<::core::primitive::u8>, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "NominationPools", + "set_metadata", + types::SetMetadata { pool_id, metadata }, + [ + 156u8, 81u8, 170u8, 161u8, 34u8, 100u8, 183u8, 174u8, 5u8, 81u8, 31u8, + 76u8, 12u8, 42u8, 77u8, 1u8, 6u8, 26u8, 168u8, 7u8, 8u8, 115u8, 158u8, + 151u8, 30u8, 211u8, 52u8, 177u8, 234u8, 87u8, 125u8, 127u8, + ], + ) + } + #[doc = "Update configurations for the nomination pools. The origin for this call must be"] + #[doc = "Root."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `min_join_bond` - Set [`MinJoinBond`]."] + #[doc = "* `min_create_bond` - Set [`MinCreateBond`]."] + #[doc = "* `max_pools` - Set [`MaxPools`]."] + #[doc = "* `max_members` - Set [`MaxPoolMembers`]."] + #[doc = "* `max_members_per_pool` - Set [`MaxPoolMembersPerPool`]."] + #[doc = "* `global_max_commission` - Set [`GlobalMaxCommission`]."] + pub fn set_configs( + &self, + min_join_bond: runtime_types::pallet_nomination_pools::ConfigOp< + ::core::primitive::u128, + >, + min_create_bond: runtime_types::pallet_nomination_pools::ConfigOp< + ::core::primitive::u128, + >, + max_pools: runtime_types::pallet_nomination_pools::ConfigOp< + ::core::primitive::u32, + >, + max_members: runtime_types::pallet_nomination_pools::ConfigOp< + ::core::primitive::u32, + >, + max_members_per_pool: runtime_types::pallet_nomination_pools::ConfigOp< + ::core::primitive::u32, + >, + global_max_commission: runtime_types::pallet_nomination_pools::ConfigOp< + runtime_types::sp_arithmetic::per_things::Perbill, + >, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "NominationPools", + "set_configs", + types::SetConfigs { + min_join_bond, + min_create_bond, + max_pools, + max_members, + max_members_per_pool, + global_max_commission, + }, + [ + 20u8, 66u8, 112u8, 172u8, 143u8, 78u8, 60u8, 159u8, 240u8, 102u8, + 245u8, 10u8, 207u8, 27u8, 99u8, 138u8, 217u8, 239u8, 101u8, 190u8, + 222u8, 253u8, 53u8, 77u8, 230u8, 225u8, 101u8, 109u8, 50u8, 144u8, + 31u8, 121u8, + ], + ) + } + #[doc = "Update the roles of the pool."] + #[doc = ""] + #[doc = "The root is the only entity that can change any of the roles, including itself,"] + #[doc = "excluding the depositor, who can never change."] + #[doc = ""] + #[doc = "It emits an event, notifying UIs of the role change. This event is quite relevant to"] + #[doc = "most pool members and they should be informed of changes to pool roles."] + pub fn update_roles( + &self, + pool_id: ::core::primitive::u32, + new_root: runtime_types::pallet_nomination_pools::ConfigOp< + ::subxt::utils::AccountId32, + >, + new_nominator: runtime_types::pallet_nomination_pools::ConfigOp< + ::subxt::utils::AccountId32, + >, + new_bouncer: runtime_types::pallet_nomination_pools::ConfigOp< + ::subxt::utils::AccountId32, + >, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "NominationPools", + "update_roles", + types::UpdateRoles { + pool_id, + new_root, + new_nominator, + new_bouncer, + }, + [ + 15u8, 154u8, 204u8, 28u8, 204u8, 120u8, 174u8, 203u8, 186u8, 33u8, + 123u8, 201u8, 143u8, 120u8, 193u8, 49u8, 164u8, 178u8, 55u8, 234u8, + 126u8, 247u8, 123u8, 73u8, 147u8, 107u8, 43u8, 72u8, 217u8, 4u8, 199u8, + 253u8, + ], + ) + } + #[doc = "Chill on behalf of the pool."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be signed by the pool nominator or the pool"] + #[doc = "root role, same as [`Pallet::nominate`]."] + #[doc = ""] + #[doc = "This directly forward the call to the staking pallet, on behalf of the pool bonded"] + #[doc = "account."] + pub fn chill( + &self, + pool_id: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "NominationPools", + "chill", + types::Chill { pool_id }, + [ + 41u8, 114u8, 128u8, 121u8, 244u8, 15u8, 15u8, 52u8, 129u8, 88u8, 239u8, + 167u8, 216u8, 38u8, 123u8, 240u8, 172u8, 229u8, 132u8, 64u8, 175u8, + 87u8, 217u8, 27u8, 11u8, 124u8, 1u8, 140u8, 40u8, 191u8, 187u8, 36u8, + ], + ) + } + #[doc = "`origin` bonds funds from `extra` for some pool member `member` into their respective"] + #[doc = "pools."] + #[doc = ""] + #[doc = "`origin` can bond extra funds from free balance or pending rewards when `origin =="] + #[doc = "other`."] + #[doc = ""] + #[doc = "In the case of `origin != other`, `origin` can only bond extra pending rewards of"] + #[doc = "`other` members assuming set_claim_permission for the given member is"] + #[doc = "`PermissionlessAll` or `PermissionlessCompound`."] + pub fn bond_extra_other( + &self, + member: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + extra: runtime_types::pallet_nomination_pools::BondExtra< + ::core::primitive::u128, + >, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "NominationPools", + "bond_extra_other", + types::BondExtraOther { member, extra }, + [ + 13u8, 60u8, 161u8, 6u8, 191u8, 248u8, 61u8, 226u8, 192u8, 37u8, 44u8, + 146u8, 250u8, 213u8, 235u8, 147u8, 0u8, 14u8, 147u8, 11u8, 14u8, 126u8, + 70u8, 240u8, 83u8, 26u8, 95u8, 49u8, 52u8, 15u8, 185u8, 162u8, + ], + ) + } + #[doc = "Allows a pool member to set a claim permission to allow or disallow permissionless"] + #[doc = "bonding and withdrawing."] + #[doc = ""] + #[doc = "By default, this is `Permissioned`, which implies only the pool member themselves can"] + #[doc = "claim their pending rewards. If a pool member wishes so, they can set this to"] + #[doc = "`PermissionlessAll` to allow any account to claim their rewards and bond extra to the"] + #[doc = "pool."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `origin` - Member of a pool."] + #[doc = "* `actor` - Account to claim reward. // improve this"] + pub fn set_claim_permission( + &self, + permission: runtime_types::pallet_nomination_pools::ClaimPermission, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "NominationPools", + "set_claim_permission", + types::SetClaimPermission { permission }, + [ + 23u8, 253u8, 135u8, 53u8, 83u8, 71u8, 182u8, 223u8, 123u8, 57u8, 93u8, + 154u8, 110u8, 91u8, 63u8, 241u8, 144u8, 218u8, 129u8, 238u8, 169u8, + 9u8, 215u8, 76u8, 65u8, 168u8, 103u8, 44u8, 40u8, 39u8, 34u8, 16u8, + ], + ) + } + #[doc = "`origin` can claim payouts on some pool member `other`'s behalf."] + #[doc = ""] + #[doc = "Pool member `other` must have a `PermissionlessAll` or `PermissionlessWithdraw` in order"] + #[doc = "for this call to be successful."] + pub fn claim_payout_other( + &self, + other: ::subxt::utils::AccountId32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "NominationPools", + "claim_payout_other", + types::ClaimPayoutOther { other }, + [ + 52u8, 165u8, 191u8, 125u8, 180u8, 54u8, 27u8, 235u8, 195u8, 22u8, 55u8, + 183u8, 209u8, 63u8, 116u8, 88u8, 154u8, 74u8, 100u8, 103u8, 88u8, 76u8, + 35u8, 14u8, 39u8, 156u8, 219u8, 253u8, 123u8, 104u8, 168u8, 76u8, + ], + ) + } + #[doc = "Set the commission of a pool."] + #[doc = "Both a commission percentage and a commission payee must be provided in the `current`"] + #[doc = "tuple. Where a `current` of `None` is provided, any current commission will be removed."] + #[doc = ""] + #[doc = "- If a `None` is supplied to `new_commission`, existing commission will be removed."] + pub fn set_commission( + &self, + pool_id: ::core::primitive::u32, + new_commission: ::core::option::Option<( + runtime_types::sp_arithmetic::per_things::Perbill, + ::subxt::utils::AccountId32, + )>, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "NominationPools", + "set_commission", + types::SetCommission { + pool_id, + new_commission, + }, + [ + 118u8, 240u8, 166u8, 40u8, 247u8, 44u8, 23u8, 92u8, 4u8, 78u8, 156u8, + 21u8, 178u8, 97u8, 197u8, 148u8, 61u8, 234u8, 15u8, 94u8, 248u8, 188u8, + 211u8, 13u8, 134u8, 10u8, 75u8, 59u8, 218u8, 13u8, 104u8, 115u8, + ], + ) + } + #[doc = "Set the maximum commission of a pool."] + #[doc = ""] + #[doc = "- Initial max can be set to any `Perbill`, and only smaller values thereafter."] + #[doc = "- Current commission will be lowered in the event it is higher than a new max"] + #[doc = " commission."] + pub fn set_commission_max( + &self, + pool_id: ::core::primitive::u32, + max_commission: runtime_types::sp_arithmetic::per_things::Perbill, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "NominationPools", + "set_commission_max", + types::SetCommissionMax { + pool_id, + max_commission, + }, + [ + 115u8, 90u8, 156u8, 35u8, 7u8, 125u8, 184u8, 123u8, 149u8, 232u8, 59u8, + 21u8, 42u8, 120u8, 14u8, 152u8, 184u8, 167u8, 18u8, 22u8, 148u8, 83u8, + 16u8, 81u8, 93u8, 182u8, 154u8, 182u8, 46u8, 40u8, 179u8, 187u8, + ], + ) + } + #[doc = "Set the commission change rate for a pool."] + #[doc = ""] + #[doc = "Initial change rate is not bounded, whereas subsequent updates can only be more"] + #[doc = "restrictive than the current."] + pub fn set_commission_change_rate( + &self, + pool_id: ::core::primitive::u32, + change_rate: runtime_types::pallet_nomination_pools::CommissionChangeRate< + ::core::primitive::u32, + >, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "NominationPools", + "set_commission_change_rate", + types::SetCommissionChangeRate { + pool_id, + change_rate, + }, + [ + 118u8, 194u8, 114u8, 197u8, 214u8, 246u8, 23u8, 237u8, 10u8, 90u8, + 230u8, 123u8, 172u8, 174u8, 98u8, 198u8, 160u8, 71u8, 113u8, 76u8, + 201u8, 201u8, 153u8, 92u8, 222u8, 252u8, 7u8, 184u8, 236u8, 235u8, + 126u8, 201u8, + ], + ) + } + #[doc = "Claim pending commission."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be signed by the `root` role of the pool. Pending"] + #[doc = "commission is paid out and added to total claimed commission`. Total pending commission"] + #[doc = "is reset to zero. the current."] + pub fn claim_commission( + &self, + pool_id: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "NominationPools", + "claim_commission", + types::ClaimCommission { pool_id }, + [ + 139u8, 126u8, 219u8, 117u8, 140u8, 51u8, 163u8, 32u8, 83u8, 60u8, + 250u8, 44u8, 186u8, 194u8, 225u8, 84u8, 61u8, 181u8, 212u8, 160u8, + 156u8, 93u8, 16u8, 255u8, 165u8, 178u8, 25u8, 64u8, 187u8, 29u8, 169u8, + 174u8, ], ) } } } - } - pub mod para_inclusion { - use super::root_mod; - use super::runtime_types; - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub type Error = runtime_types::polkadot_runtime_parachains::inclusion::pallet::Error; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub struct TransactionApi; - impl TransactionApi {} - } - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::polkadot_runtime_parachains::inclusion::pallet::Event; + #[doc = "Events of this pallet."] + pub type Event = runtime_types::pallet_nomination_pools::pallet::Event; pub mod events { use super::runtime_types; #[derive( @@ -25159,16 +24950,14 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A candidate was backed. `[candidate, head_data]`"] - pub struct CandidateBacked( - pub runtime_types::polkadot_primitives::v2::CandidateReceipt<::subxt::utils::H256>, - pub runtime_types::polkadot_parachain::primitives::HeadData, - pub runtime_types::polkadot_primitives::v2::CoreIndex, - pub runtime_types::polkadot_primitives::v2::GroupIndex, - ); - impl ::subxt::events::StaticEvent for CandidateBacked { - const PALLET: &'static str = "ParaInclusion"; - const EVENT: &'static str = "CandidateBacked"; + #[doc = "A pool has been created."] + pub struct Created { + pub depositor: ::subxt::utils::AccountId32, + pub pool_id: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for Created { + const PALLET: &'static str = "NominationPools"; + const EVENT: &'static str = "Created"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -25180,16 +24969,16 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A candidate was included. `[candidate, head_data]`"] - pub struct CandidateIncluded( - pub runtime_types::polkadot_primitives::v2::CandidateReceipt<::subxt::utils::H256>, - pub runtime_types::polkadot_parachain::primitives::HeadData, - pub runtime_types::polkadot_primitives::v2::CoreIndex, - pub runtime_types::polkadot_primitives::v2::GroupIndex, - ); - impl ::subxt::events::StaticEvent for CandidateIncluded { - const PALLET: &'static str = "ParaInclusion"; - const EVENT: &'static str = "CandidateIncluded"; + #[doc = "A member has became bonded in a pool."] + pub struct Bonded { + pub member: ::subxt::utils::AccountId32, + pub pool_id: ::core::primitive::u32, + pub bonded: ::core::primitive::u128, + pub joined: ::core::primitive::bool, + } + impl ::subxt::events::StaticEvent for Bonded { + const PALLET: &'static str = "NominationPools"; + const EVENT: &'static str = "Bonded"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -25201,139 +24990,16 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A candidate timed out. `[candidate, head_data]`"] - pub struct CandidateTimedOut( - pub runtime_types::polkadot_primitives::v2::CandidateReceipt<::subxt::utils::H256>, - pub runtime_types::polkadot_parachain::primitives::HeadData, - pub runtime_types::polkadot_primitives::v2::CoreIndex, - ); - impl ::subxt::events::StaticEvent for CandidateTimedOut { - const PALLET: &'static str = "ParaInclusion"; - const EVENT: &'static str = "CandidateTimedOut"; + #[doc = "A payout has been made to a member."] + pub struct PaidOut { + pub member: ::subxt::utils::AccountId32, + pub pool_id: ::core::primitive::u32, + pub payout: ::core::primitive::u128, } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " The latest bitfield for each validator, referred to by their index in the validator set."] pub fn availability_bitfields (& self , _0 : impl :: std :: borrow :: Borrow < runtime_types :: polkadot_primitives :: v2 :: ValidatorIndex > ,) -> :: subxt :: storage :: address :: Address :: < :: subxt :: storage :: address :: StaticStorageMapKey , runtime_types :: polkadot_runtime_parachains :: inclusion :: AvailabilityBitfieldRecord < :: core :: primitive :: u32 > , :: subxt :: storage :: address :: Yes , () , :: subxt :: storage :: address :: Yes >{ - ::subxt::storage::address::Address::new_static( - "ParaInclusion", - "AvailabilityBitfields", - vec![::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - )], - [ - 149u8, 215u8, 123u8, 226u8, 73u8, 240u8, 102u8, 39u8, 243u8, 232u8, - 226u8, 116u8, 65u8, 180u8, 110u8, 4u8, 194u8, 50u8, 60u8, 193u8, 142u8, - 62u8, 20u8, 148u8, 106u8, 162u8, 96u8, 114u8, 215u8, 250u8, 111u8, - 225u8, - ], - ) - } - #[doc = " The latest bitfield for each validator, referred to by their index in the validator set."] pub fn availability_bitfields_root (& self ,) -> :: subxt :: storage :: address :: Address :: < :: subxt :: storage :: address :: StaticStorageMapKey , runtime_types :: polkadot_runtime_parachains :: inclusion :: AvailabilityBitfieldRecord < :: core :: primitive :: u32 > , () , () , :: subxt :: storage :: address :: Yes >{ - ::subxt::storage::address::Address::new_static( - "ParaInclusion", - "AvailabilityBitfields", - Vec::new(), - [ - 149u8, 215u8, 123u8, 226u8, 73u8, 240u8, 102u8, 39u8, 243u8, 232u8, - 226u8, 116u8, 65u8, 180u8, 110u8, 4u8, 194u8, 50u8, 60u8, 193u8, 142u8, - 62u8, 20u8, 148u8, 106u8, 162u8, 96u8, 114u8, 215u8, 250u8, 111u8, - 225u8, - ], - ) - } - #[doc = " Candidates pending availability by `ParaId`."] pub fn pending_availability (& self , _0 : impl :: std :: borrow :: Borrow < runtime_types :: polkadot_parachain :: primitives :: Id > ,) -> :: subxt :: storage :: address :: Address :: < :: subxt :: storage :: address :: StaticStorageMapKey , runtime_types :: polkadot_runtime_parachains :: inclusion :: CandidatePendingAvailability < :: subxt :: utils :: H256 , :: core :: primitive :: u32 > , :: subxt :: storage :: address :: Yes , () , :: subxt :: storage :: address :: Yes >{ - ::subxt::storage::address::Address::new_static( - "ParaInclusion", - "PendingAvailability", - vec![::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - )], - [ - 54u8, 166u8, 18u8, 56u8, 51u8, 241u8, 31u8, 165u8, 220u8, 138u8, 67u8, - 171u8, 23u8, 101u8, 109u8, 26u8, 211u8, 237u8, 81u8, 143u8, 192u8, - 214u8, 49u8, 42u8, 69u8, 30u8, 168u8, 113u8, 72u8, 12u8, 140u8, 242u8, - ], - ) - } - #[doc = " Candidates pending availability by `ParaId`."] pub fn pending_availability_root (& self ,) -> :: subxt :: storage :: address :: Address :: < :: subxt :: storage :: address :: StaticStorageMapKey , runtime_types :: polkadot_runtime_parachains :: inclusion :: CandidatePendingAvailability < :: subxt :: utils :: H256 , :: core :: primitive :: u32 > , () , () , :: subxt :: storage :: address :: Yes >{ - ::subxt::storage::address::Address::new_static( - "ParaInclusion", - "PendingAvailability", - Vec::new(), - [ - 54u8, 166u8, 18u8, 56u8, 51u8, 241u8, 31u8, 165u8, 220u8, 138u8, 67u8, - 171u8, 23u8, 101u8, 109u8, 26u8, 211u8, 237u8, 81u8, 143u8, 192u8, - 214u8, 49u8, 42u8, 69u8, 30u8, 168u8, 113u8, 72u8, 12u8, 140u8, 242u8, - ], - ) - } - #[doc = " The commitments of candidates pending availability, by `ParaId`."] - pub fn pending_availability_commitments( - &self, - _0: impl ::std::borrow::Borrow, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_primitives::v2::CandidateCommitments< - ::core::primitive::u32, - >, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "ParaInclusion", - "PendingAvailabilityCommitments", - vec![::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - )], - [ - 146u8, 206u8, 148u8, 102u8, 55u8, 101u8, 144u8, 33u8, 197u8, 232u8, - 64u8, 205u8, 216u8, 21u8, 247u8, 170u8, 237u8, 115u8, 144u8, 43u8, - 106u8, 87u8, 82u8, 39u8, 11u8, 87u8, 149u8, 195u8, 56u8, 59u8, 54u8, - 8u8, - ], - ) - } - #[doc = " The commitments of candidates pending availability, by `ParaId`."] - pub fn pending_availability_commitments_root( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_primitives::v2::CandidateCommitments< - ::core::primitive::u32, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "ParaInclusion", - "PendingAvailabilityCommitments", - Vec::new(), - [ - 146u8, 206u8, 148u8, 102u8, 55u8, 101u8, 144u8, 33u8, 197u8, 232u8, - 64u8, 205u8, 216u8, 21u8, 247u8, 170u8, 237u8, 115u8, 144u8, 43u8, - 106u8, 87u8, 82u8, 39u8, 11u8, 87u8, 149u8, 195u8, 56u8, 59u8, 54u8, - 8u8, - ], - ) - } + impl ::subxt::events::StaticEvent for PaidOut { + const PALLET: &'static str = "NominationPools"; + const EVENT: &'static str = "PaidOut"; } - } - } - pub mod para_inherent { - use super::root_mod; - use super::runtime_types; - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub type Error = runtime_types::polkadot_runtime_parachains::paras_inherent::pallet::Error; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -25344,1606 +25010,1146 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Enter { - pub data: runtime_types::polkadot_primitives::v2::InherentData< - runtime_types::sp_runtime::generic::header::Header< - ::core::primitive::u32, - runtime_types::sp_runtime::traits::BlakeTwo256, - >, + #[doc = "A member has unbonded from their pool."] + #[doc = ""] + #[doc = "- `balance` is the corresponding balance of the number of points that has been"] + #[doc = " requested to be unbonded (the argument of the `unbond` transaction) from the bonded"] + #[doc = " pool."] + #[doc = "- `points` is the number of points that are issued as a result of `balance` being"] + #[doc = "dissolved into the corresponding unbonding pool."] + #[doc = "- `era` is the era in which the balance will be unbonded."] + #[doc = "In the absence of slashing, these values will match. In the presence of slashing, the"] + #[doc = "number of points that are issued in the unbonding pool will be less than the amount"] + #[doc = "requested to be unbonded."] + pub struct Unbonded { + pub member: ::subxt::utils::AccountId32, + pub pool_id: ::core::primitive::u32, + pub balance: ::core::primitive::u128, + pub points: ::core::primitive::u128, + pub era: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for Unbonded { + const PALLET: &'static str = "NominationPools"; + const EVENT: &'static str = "Unbonded"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A member has withdrawn from their pool."] + #[doc = ""] + #[doc = "The given number of `points` have been dissolved in return of `balance`."] + #[doc = ""] + #[doc = "Similar to `Unbonded` event, in the absence of slashing, the ratio of point to balance"] + #[doc = "will be 1."] + pub struct Withdrawn { + pub member: ::subxt::utils::AccountId32, + pub pool_id: ::core::primitive::u32, + pub balance: ::core::primitive::u128, + pub points: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for Withdrawn { + const PALLET: &'static str = "NominationPools"; + const EVENT: &'static str = "Withdrawn"; + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A pool has been destroyed."] + pub struct Destroyed { + pub pool_id: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for Destroyed { + const PALLET: &'static str = "NominationPools"; + const EVENT: &'static str = "Destroyed"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "The state of a pool has changed"] + pub struct StateChanged { + pub pool_id: ::core::primitive::u32, + pub new_state: runtime_types::pallet_nomination_pools::PoolState, + } + impl ::subxt::events::StaticEvent for StateChanged { + const PALLET: &'static str = "NominationPools"; + const EVENT: &'static str = "StateChanged"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A member has been removed from a pool."] + #[doc = ""] + #[doc = "The removal can be voluntary (withdrawn all unbonded funds) or involuntary (kicked)."] + pub struct MemberRemoved { + pub pool_id: ::core::primitive::u32, + pub member: ::subxt::utils::AccountId32, + } + impl ::subxt::events::StaticEvent for MemberRemoved { + const PALLET: &'static str = "NominationPools"; + const EVENT: &'static str = "MemberRemoved"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "The roles of a pool have been updated to the given new roles. Note that the depositor"] + #[doc = "can never change."] + pub struct RolesUpdated { + pub root: ::core::option::Option<::subxt::utils::AccountId32>, + pub bouncer: ::core::option::Option<::subxt::utils::AccountId32>, + pub nominator: ::core::option::Option<::subxt::utils::AccountId32>, + } + impl ::subxt::events::StaticEvent for RolesUpdated { + const PALLET: &'static str = "NominationPools"; + const EVENT: &'static str = "RolesUpdated"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "The active balance of pool `pool_id` has been slashed to `balance`."] + pub struct PoolSlashed { + pub pool_id: ::core::primitive::u32, + pub balance: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for PoolSlashed { + const PALLET: &'static str = "NominationPools"; + const EVENT: &'static str = "PoolSlashed"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "The unbond pool at `era` of pool `pool_id` has been slashed to `balance`."] + pub struct UnbondingPoolSlashed { + pub pool_id: ::core::primitive::u32, + pub era: ::core::primitive::u32, + pub balance: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for UnbondingPoolSlashed { + const PALLET: &'static str = "NominationPools"; + const EVENT: &'static str = "UnbondingPoolSlashed"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A pool's commission setting has been changed."] + pub struct PoolCommissionUpdated { + pub pool_id: ::core::primitive::u32, + pub current: ::core::option::Option<( + runtime_types::sp_arithmetic::per_things::Perbill, + ::subxt::utils::AccountId32, + )>, + } + impl ::subxt::events::StaticEvent for PoolCommissionUpdated { + const PALLET: &'static str = "NominationPools"; + const EVENT: &'static str = "PoolCommissionUpdated"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A pool's maximum commission setting has been changed."] + pub struct PoolMaxCommissionUpdated { + pub pool_id: ::core::primitive::u32, + pub max_commission: runtime_types::sp_arithmetic::per_things::Perbill, + } + impl ::subxt::events::StaticEvent for PoolMaxCommissionUpdated { + const PALLET: &'static str = "NominationPools"; + const EVENT: &'static str = "PoolMaxCommissionUpdated"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A pool's commission `change_rate` has been changed."] + pub struct PoolCommissionChangeRateUpdated { + pub pool_id: ::core::primitive::u32, + pub change_rate: runtime_types::pallet_nomination_pools::CommissionChangeRate< + ::core::primitive::u32, >, } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Enter the paras inherent. This will process bitfields and backed candidates."] - pub fn enter( - &self, - data: runtime_types::polkadot_primitives::v2::InherentData< - runtime_types::sp_runtime::generic::header::Header< - ::core::primitive::u32, - runtime_types::sp_runtime::traits::BlakeTwo256, - >, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "ParaInherent", - "enter", - Enter { data }, - [ - 92u8, 247u8, 59u8, 6u8, 2u8, 102u8, 76u8, 147u8, 46u8, 232u8, 38u8, - 191u8, 145u8, 155u8, 23u8, 39u8, 228u8, 95u8, 57u8, 249u8, 247u8, 20u8, - 9u8, 189u8, 156u8, 187u8, 207u8, 107u8, 0u8, 13u8, 228u8, 6u8, - ], - ) - } + impl ::subxt::events::StaticEvent for PoolCommissionChangeRateUpdated { + const PALLET: &'static str = "NominationPools"; + const EVENT: &'static str = "PoolCommissionChangeRateUpdated"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Pool commission has been claimed."] + pub struct PoolCommissionClaimed { + pub pool_id: ::core::primitive::u32, + pub commission: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for PoolCommissionClaimed { + const PALLET: &'static str = "NominationPools"; + const EVENT: &'static str = "PoolCommissionClaimed"; } } pub mod storage { use super::runtime_types; pub struct StorageApi; impl StorageApi { - #[doc = " Whether the paras inherent was included within this block."] + #[doc = " Minimum amount to bond to join a pool."] + pub fn min_join_bond( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u128, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "NominationPools", + "MinJoinBond", + vec![], + [ + 125u8, 239u8, 45u8, 225u8, 74u8, 129u8, 247u8, 184u8, 205u8, 58u8, + 45u8, 186u8, 126u8, 170u8, 112u8, 120u8, 23u8, 190u8, 247u8, 97u8, + 131u8, 126u8, 215u8, 44u8, 147u8, 122u8, 132u8, 212u8, 217u8, 84u8, + 240u8, 91u8, + ], + ) + } + #[doc = " Minimum bond required to create a pool."] #[doc = ""] - #[doc = " The `Option<()>` is effectively a `bool`, but it never hits storage in the `None` variant"] - #[doc = " due to the guarantees of FRAME's storage APIs."] + #[doc = " This is the amount that the depositor must put as their initial stake in the pool, as an"] + #[doc = " indication of \"skin in the game\"."] #[doc = ""] - #[doc = " If this is `None` at the end of the block, we panic and render the block invalid."] - pub fn included( + #[doc = " This is the value that will always exist in the staking ledger of the pool bonded account"] + #[doc = " while all other accounts leave."] + pub fn min_create_bond( &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - (), + ::core::primitive::u128, + ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, - (), (), > { ::subxt::storage::address::Address::new_static( - "ParaInherent", - "Included", + "NominationPools", + "MinCreateBond", vec![], [ - 208u8, 213u8, 76u8, 64u8, 90u8, 141u8, 144u8, 52u8, 220u8, 35u8, 143u8, - 171u8, 45u8, 59u8, 9u8, 218u8, 29u8, 186u8, 139u8, 203u8, 205u8, 12u8, - 10u8, 2u8, 27u8, 167u8, 182u8, 244u8, 167u8, 220u8, 44u8, 16u8, + 31u8, 208u8, 240u8, 158u8, 23u8, 218u8, 212u8, 138u8, 92u8, 210u8, + 207u8, 170u8, 32u8, 60u8, 5u8, 21u8, 84u8, 162u8, 1u8, 111u8, 181u8, + 243u8, 24u8, 148u8, 193u8, 253u8, 248u8, 190u8, 16u8, 222u8, 219u8, + 67u8, ], ) } - #[doc = " Scraped on chain data for extracting resolved disputes as well as backing votes."] - pub fn on_chain_votes( + #[doc = " Maximum number of nomination pools that can exist. If `None`, then an unbounded number of"] + #[doc = " pools can exist."] + pub fn max_pools( &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_primitives::v2::ScrapedOnChainVotes< - ::subxt::utils::H256, - >, + ::core::primitive::u32, ::subxt::storage::address::Yes, (), (), > { ::subxt::storage::address::Address::new_static( - "ParaInherent", - "OnChainVotes", + "NominationPools", + "MaxPools", vec![], [ - 187u8, 34u8, 219u8, 197u8, 202u8, 214u8, 140u8, 152u8, 253u8, 65u8, - 206u8, 217u8, 36u8, 40u8, 107u8, 215u8, 135u8, 115u8, 35u8, 61u8, - 180u8, 131u8, 0u8, 184u8, 193u8, 76u8, 165u8, 63u8, 106u8, 222u8, - 126u8, 113u8, + 216u8, 111u8, 68u8, 103u8, 33u8, 50u8, 109u8, 3u8, 176u8, 195u8, 23u8, + 73u8, 112u8, 138u8, 9u8, 194u8, 233u8, 73u8, 68u8, 215u8, 162u8, 255u8, + 217u8, 173u8, 141u8, 27u8, 72u8, 199u8, 7u8, 240u8, 25u8, 34u8, ], ) } - } - } - } - pub mod para_scheduler { - use super::root_mod; - use super::runtime_types; - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " All the validator groups. One for each core. Indices are into `ActiveValidators` - not the"] - #[doc = " broader set of Polkadot validators, but instead just the subset used for parachains during"] - #[doc = " this session."] - #[doc = ""] - #[doc = " Bound: The number of cores is the sum of the numbers of parachains and parathread multiplexers."] - #[doc = " Reasonably, 100-1000. The dominant factor is the number of validators: safe upper bound at 10k."] - pub fn validator_groups( + #[doc = " Maximum number of members that can exist in the system. If `None`, then the count"] + #[doc = " members are not bound on a system wide basis."] + pub fn max_pool_members( &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec< - ::std::vec::Vec, - >, - ::subxt::storage::address::Yes, + ::core::primitive::u32, ::subxt::storage::address::Yes, (), + (), > { ::subxt::storage::address::Address::new_static( - "ParaScheduler", - "ValidatorGroups", + "NominationPools", + "MaxPoolMembers", vec![], [ - 175u8, 187u8, 69u8, 76u8, 211u8, 36u8, 162u8, 147u8, 83u8, 65u8, 83u8, - 44u8, 241u8, 112u8, 246u8, 14u8, 237u8, 255u8, 248u8, 58u8, 44u8, - 207u8, 159u8, 112u8, 31u8, 90u8, 15u8, 85u8, 4u8, 212u8, 215u8, 211u8, + 82u8, 217u8, 26u8, 234u8, 223u8, 241u8, 66u8, 182u8, 43u8, 233u8, 59u8, + 242u8, 202u8, 254u8, 69u8, 50u8, 254u8, 196u8, 166u8, 89u8, 120u8, + 87u8, 76u8, 148u8, 31u8, 197u8, 49u8, 88u8, 206u8, 41u8, 242u8, 62u8, ], ) } - #[doc = " A queue of upcoming claims and which core they should be mapped onto."] - #[doc = ""] - #[doc = " The number of queued claims is bounded at the `scheduling_lookahead`"] - #[doc = " multiplied by the number of parathread multiplexer cores. Reasonably, 10 * 50 = 500."] - pub fn parathread_queue( + #[doc = " Maximum number of members that may belong to pool. If `None`, then the count of"] + #[doc = " members is not bound on a per pool basis."] + pub fn max_pool_members_per_pool( &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_runtime_parachains::scheduler::ParathreadClaimQueue, - ::subxt::storage::address::Yes, + ::core::primitive::u32, ::subxt::storage::address::Yes, (), + (), > { ::subxt::storage::address::Address::new_static( - "ParaScheduler", - "ParathreadQueue", + "NominationPools", + "MaxPoolMembersPerPool", vec![], [ - 79u8, 144u8, 191u8, 114u8, 235u8, 55u8, 133u8, 208u8, 73u8, 97u8, 73u8, - 148u8, 96u8, 185u8, 110u8, 95u8, 132u8, 54u8, 244u8, 86u8, 50u8, 218u8, - 121u8, 226u8, 153u8, 58u8, 232u8, 202u8, 132u8, 147u8, 168u8, 48u8, + 93u8, 241u8, 16u8, 169u8, 138u8, 199u8, 128u8, 149u8, 65u8, 30u8, 55u8, + 11u8, 41u8, 252u8, 83u8, 250u8, 9u8, 33u8, 152u8, 239u8, 195u8, 147u8, + 16u8, 248u8, 180u8, 153u8, 88u8, 231u8, 248u8, 169u8, 186u8, 48u8, ], ) } - #[doc = " One entry for each availability core. Entries are `None` if the core is not currently occupied. Can be"] - #[doc = " temporarily `Some` if scheduled but not occupied."] - #[doc = " The i'th parachain belongs to the i'th core, with the remaining cores all being"] - #[doc = " parathread-multiplexers."] - #[doc = ""] - #[doc = " Bounded by the maximum of either of these two values:"] - #[doc = " * The number of parachains and parathread multiplexers"] - #[doc = " * The number of validators divided by `configuration.max_validators_per_core`."] - pub fn availability_cores( + #[doc = " The maximum commission that can be charged by a pool. Used on commission payouts to bound"] + #[doc = " pool commissions that are > `GlobalMaxCommission`, necessary if a future"] + #[doc = " `GlobalMaxCommission` is lower than some current pool commissions."] + pub fn global_max_commission( &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec< - ::core::option::Option< - runtime_types::polkadot_primitives::v2::CoreOccupied, - >, - >, - ::subxt::storage::address::Yes, + runtime_types::sp_arithmetic::per_things::Perbill, ::subxt::storage::address::Yes, (), + (), > { ::subxt::storage::address::Address::new_static( - "ParaScheduler", - "AvailabilityCores", + "NominationPools", + "GlobalMaxCommission", vec![], [ - 103u8, 94u8, 52u8, 17u8, 118u8, 25u8, 254u8, 190u8, 74u8, 91u8, 64u8, - 205u8, 243u8, 113u8, 143u8, 166u8, 193u8, 110u8, 214u8, 151u8, 24u8, - 112u8, 69u8, 131u8, 235u8, 78u8, 240u8, 120u8, 240u8, 68u8, 56u8, - 215u8, + 142u8, 252u8, 92u8, 128u8, 162u8, 4u8, 216u8, 39u8, 118u8, 201u8, + 138u8, 171u8, 76u8, 90u8, 133u8, 176u8, 161u8, 138u8, 214u8, 183u8, + 193u8, 115u8, 245u8, 151u8, 216u8, 84u8, 99u8, 175u8, 144u8, 196u8, + 103u8, 190u8, ], ) } - #[doc = " An index used to ensure that only one claim on a parathread exists in the queue or is"] - #[doc = " currently being handled by an occupied core."] + #[doc = " Active members."] #[doc = ""] - #[doc = " Bounded by the number of parathread cores and scheduling lookahead. Reasonably, 10 * 50 = 500."] - pub fn parathread_claim_index( + #[doc = " TWOX-NOTE: SAFE since `AccountId` is a secure hash."] + pub fn pool_members( &self, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec, - ::subxt::storage::address::Yes, + runtime_types::pallet_nomination_pools::PoolMember, ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( - "ParaScheduler", - "ParathreadClaimIndex", - vec![], + "NominationPools", + "PoolMembers", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], [ - 64u8, 17u8, 173u8, 35u8, 14u8, 16u8, 149u8, 200u8, 118u8, 211u8, 130u8, - 15u8, 124u8, 112u8, 44u8, 220u8, 156u8, 132u8, 119u8, 148u8, 24u8, - 120u8, 252u8, 246u8, 204u8, 119u8, 206u8, 85u8, 44u8, 210u8, 135u8, - 83u8, + 252u8, 236u8, 201u8, 127u8, 219u8, 1u8, 19u8, 144u8, 5u8, 108u8, 70u8, + 30u8, 177u8, 232u8, 253u8, 237u8, 211u8, 91u8, 63u8, 62u8, 155u8, + 151u8, 153u8, 165u8, 206u8, 53u8, 111u8, 31u8, 60u8, 120u8, 100u8, + 249u8, ], ) } - #[doc = " The block number where the session start occurred. Used to track how many group rotations have occurred."] + #[doc = " Active members."] #[doc = ""] - #[doc = " Note that in the context of parachains modules the session change is signaled during"] - #[doc = " the block and enacted at the end of the block (at the finalization stage, to be exact)."] - #[doc = " Thus for all intents and purposes the effect of the session change is observed at the"] - #[doc = " block following the session change, block number of which we save in this storage value."] - pub fn session_start_block( + #[doc = " TWOX-NOTE: SAFE since `AccountId` is a secure hash."] + pub fn pool_members_root( &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, + runtime_types::pallet_nomination_pools::PoolMember, (), + (), + ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( - "ParaScheduler", - "SessionStartBlock", - vec![], + "NominationPools", + "PoolMembers", + Vec::new(), [ - 122u8, 37u8, 150u8, 1u8, 185u8, 201u8, 168u8, 67u8, 55u8, 17u8, 101u8, - 18u8, 133u8, 212u8, 6u8, 73u8, 191u8, 204u8, 229u8, 22u8, 185u8, 120u8, - 24u8, 245u8, 121u8, 215u8, 124u8, 210u8, 49u8, 28u8, 26u8, 80u8, + 252u8, 236u8, 201u8, 127u8, 219u8, 1u8, 19u8, 144u8, 5u8, 108u8, 70u8, + 30u8, 177u8, 232u8, 253u8, 237u8, 211u8, 91u8, 63u8, 62u8, 155u8, + 151u8, 153u8, 165u8, 206u8, 53u8, 111u8, 31u8, 60u8, 120u8, 100u8, + 249u8, ], ) } - #[doc = " Currently scheduled cores - free but up to be occupied."] - #[doc = ""] - #[doc = " Bounded by the number of cores: one for each parachain and parathread multiplexer."] - #[doc = ""] - #[doc = " The value contained here will not be valid after the end of a block. Runtime APIs should be used to determine scheduled cores/"] - #[doc = " for the upcoming block."] - pub fn scheduled( + #[doc = "Counter for the related counted storage map"] + pub fn counter_for_pool_members( &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec< - runtime_types::polkadot_runtime_parachains::scheduler::CoreAssignment, - >, + ::core::primitive::u32, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), > { ::subxt::storage::address::Address::new_static( - "ParaScheduler", - "Scheduled", + "NominationPools", + "CounterForPoolMembers", vec![], [ - 246u8, 105u8, 102u8, 107u8, 143u8, 92u8, 220u8, 69u8, 71u8, 102u8, - 212u8, 157u8, 56u8, 112u8, 42u8, 179u8, 183u8, 139u8, 128u8, 81u8, - 239u8, 84u8, 103u8, 126u8, 82u8, 247u8, 39u8, 39u8, 231u8, 218u8, - 131u8, 53u8, - ], - ) - } - } - } - } - pub mod paras { - use super::root_mod; - use super::runtime_types; - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub type Error = runtime_types::polkadot_runtime_parachains::paras::pallet::Error; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceSetCurrentCode { - pub para: runtime_types::polkadot_parachain::primitives::Id, - pub new_code: runtime_types::polkadot_parachain::primitives::ValidationCode, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceSetCurrentHead { - pub para: runtime_types::polkadot_parachain::primitives::Id, - pub new_head: runtime_types::polkadot_parachain::primitives::HeadData, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceScheduleCodeUpgrade { - pub para: runtime_types::polkadot_parachain::primitives::Id, - pub new_code: runtime_types::polkadot_parachain::primitives::ValidationCode, - pub relay_parent_number: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceNoteNewHead { - pub para: runtime_types::polkadot_parachain::primitives::Id, - pub new_head: runtime_types::polkadot_parachain::primitives::HeadData, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceQueueAction { - pub para: runtime_types::polkadot_parachain::primitives::Id, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AddTrustedValidationCode { - pub validation_code: runtime_types::polkadot_parachain::primitives::ValidationCode, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct PokeUnusedValidationCode { - pub validation_code_hash: - runtime_types::polkadot_parachain::primitives::ValidationCodeHash, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct IncludePvfCheckStatement { - pub stmt: runtime_types::polkadot_primitives::v2::PvfCheckStatement, - pub signature: runtime_types::polkadot_primitives::v2::validator_app::Signature, - } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Set the storage for the parachain validation code immediately."] - pub fn force_set_current_code( - &self, - para: runtime_types::polkadot_parachain::primitives::Id, - new_code: runtime_types::polkadot_parachain::primitives::ValidationCode, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Paras", - "force_set_current_code", - ForceSetCurrentCode { para, new_code }, - [ - 56u8, 59u8, 48u8, 185u8, 106u8, 99u8, 250u8, 32u8, 207u8, 2u8, 4u8, - 110u8, 165u8, 131u8, 22u8, 33u8, 248u8, 175u8, 186u8, 6u8, 118u8, 51u8, - 74u8, 239u8, 68u8, 122u8, 148u8, 242u8, 193u8, 131u8, 6u8, 135u8, - ], - ) - } - #[doc = "Set the storage for the current parachain head data immediately."] - pub fn force_set_current_head( - &self, - para: runtime_types::polkadot_parachain::primitives::Id, - new_head: runtime_types::polkadot_parachain::primitives::HeadData, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Paras", - "force_set_current_head", - ForceSetCurrentHead { para, new_head }, - [ - 203u8, 70u8, 33u8, 168u8, 133u8, 64u8, 146u8, 137u8, 156u8, 104u8, - 183u8, 26u8, 74u8, 227u8, 154u8, 224u8, 75u8, 85u8, 143u8, 51u8, 60u8, - 194u8, 59u8, 94u8, 100u8, 84u8, 194u8, 100u8, 153u8, 9u8, 222u8, 63u8, - ], - ) - } - #[doc = "Schedule an upgrade as if it was scheduled in the given relay parent block."] - pub fn force_schedule_code_upgrade( - &self, - para: runtime_types::polkadot_parachain::primitives::Id, - new_code: runtime_types::polkadot_parachain::primitives::ValidationCode, - relay_parent_number: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Paras", - "force_schedule_code_upgrade", - ForceScheduleCodeUpgrade { - para, - new_code, - relay_parent_number, - }, - [ - 30u8, 210u8, 178u8, 31u8, 48u8, 144u8, 167u8, 117u8, 220u8, 36u8, - 175u8, 220u8, 145u8, 193u8, 20u8, 98u8, 149u8, 130u8, 66u8, 54u8, 20u8, - 204u8, 231u8, 116u8, 203u8, 179u8, 253u8, 106u8, 55u8, 58u8, 116u8, - 109u8, - ], - ) - } - #[doc = "Note a new block head for para within the context of the current block."] - pub fn force_note_new_head( - &self, - para: runtime_types::polkadot_parachain::primitives::Id, - new_head: runtime_types::polkadot_parachain::primitives::HeadData, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Paras", - "force_note_new_head", - ForceNoteNewHead { para, new_head }, - [ - 83u8, 93u8, 166u8, 142u8, 213u8, 1u8, 243u8, 73u8, 192u8, 164u8, 104u8, - 206u8, 99u8, 250u8, 31u8, 222u8, 231u8, 54u8, 12u8, 45u8, 92u8, 74u8, - 248u8, 50u8, 180u8, 86u8, 251u8, 172u8, 227u8, 88u8, 45u8, 127u8, - ], - ) - } - #[doc = "Put a parachain directly into the next session's action queue."] - #[doc = "We can't queue it any sooner than this without going into the"] - #[doc = "initializer..."] - pub fn force_queue_action( - &self, - para: runtime_types::polkadot_parachain::primitives::Id, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Paras", - "force_queue_action", - ForceQueueAction { para }, - [ - 195u8, 243u8, 79u8, 34u8, 111u8, 246u8, 109u8, 90u8, 251u8, 137u8, - 48u8, 23u8, 117u8, 29u8, 26u8, 200u8, 37u8, 64u8, 36u8, 254u8, 224u8, - 99u8, 165u8, 246u8, 8u8, 76u8, 250u8, 36u8, 141u8, 67u8, 185u8, 17u8, - ], - ) - } - #[doc = "Adds the validation code to the storage."] - #[doc = ""] - #[doc = "The code will not be added if it is already present. Additionally, if PVF pre-checking"] - #[doc = "is running for that code, it will be instantly accepted."] - #[doc = ""] - #[doc = "Otherwise, the code will be added into the storage. Note that the code will be added"] - #[doc = "into storage with reference count 0. This is to account the fact that there are no users"] - #[doc = "for this code yet. The caller will have to make sure that this code eventually gets"] - #[doc = "used by some parachain or removed from the storage to avoid storage leaks. For the latter"] - #[doc = "prefer to use the `poke_unused_validation_code` dispatchable to raw storage manipulation."] - #[doc = ""] - #[doc = "This function is mainly meant to be used for upgrading parachains that do not follow"] - #[doc = "the go-ahead signal while the PVF pre-checking feature is enabled."] - pub fn add_trusted_validation_code( - &self, - validation_code: runtime_types::polkadot_parachain::primitives::ValidationCode, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Paras", - "add_trusted_validation_code", - AddTrustedValidationCode { validation_code }, - [ - 160u8, 199u8, 245u8, 178u8, 58u8, 65u8, 79u8, 199u8, 53u8, 60u8, 84u8, - 225u8, 2u8, 145u8, 154u8, 204u8, 165u8, 171u8, 173u8, 223u8, 59u8, - 196u8, 37u8, 12u8, 243u8, 158u8, 77u8, 184u8, 58u8, 64u8, 133u8, 71u8, - ], - ) - } - #[doc = "Remove the validation code from the storage iff the reference count is 0."] - #[doc = ""] - #[doc = "This is better than removing the storage directly, because it will not remove the code"] - #[doc = "that was suddenly got used by some parachain while this dispatchable was pending"] - #[doc = "dispatching."] - pub fn poke_unused_validation_code( - &self, - validation_code_hash : runtime_types :: polkadot_parachain :: primitives :: ValidationCodeHash, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Paras", - "poke_unused_validation_code", - PokeUnusedValidationCode { - validation_code_hash, - }, - [ - 98u8, 9u8, 24u8, 180u8, 8u8, 144u8, 36u8, 28u8, 111u8, 83u8, 162u8, - 160u8, 66u8, 119u8, 177u8, 117u8, 143u8, 233u8, 241u8, 128u8, 189u8, - 118u8, 241u8, 30u8, 74u8, 171u8, 193u8, 177u8, 233u8, 12u8, 254u8, - 146u8, - ], - ) - } - #[doc = "Includes a statement for a PVF pre-checking vote. Potentially, finalizes the vote and"] - #[doc = "enacts the results if that was the last vote before achieving the supermajority."] - pub fn include_pvf_check_statement( - &self, - stmt: runtime_types::polkadot_primitives::v2::PvfCheckStatement, - signature: runtime_types::polkadot_primitives::v2::validator_app::Signature, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Paras", - "include_pvf_check_statement", - IncludePvfCheckStatement { stmt, signature }, - [ - 22u8, 136u8, 241u8, 59u8, 36u8, 249u8, 239u8, 255u8, 169u8, 117u8, - 19u8, 58u8, 214u8, 16u8, 135u8, 65u8, 13u8, 250u8, 5u8, 41u8, 144u8, - 29u8, 207u8, 73u8, 215u8, 221u8, 1u8, 253u8, 123u8, 110u8, 6u8, 196u8, + 114u8, 126u8, 27u8, 138u8, 119u8, 44u8, 45u8, 129u8, 84u8, 107u8, + 171u8, 206u8, 117u8, 141u8, 20u8, 75u8, 229u8, 237u8, 31u8, 229u8, + 124u8, 190u8, 27u8, 124u8, 63u8, 59u8, 167u8, 42u8, 62u8, 212u8, 160u8, + 2u8, ], ) } - } - } - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::polkadot_runtime_parachains::paras::pallet::Event; - pub mod events { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Current code has been updated for a Para. `para_id`"] - pub struct CurrentCodeUpdated(pub runtime_types::polkadot_parachain::primitives::Id); - impl ::subxt::events::StaticEvent for CurrentCodeUpdated { - const PALLET: &'static str = "Paras"; - const EVENT: &'static str = "CurrentCodeUpdated"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Current head has been updated for a Para. `para_id`"] - pub struct CurrentHeadUpdated(pub runtime_types::polkadot_parachain::primitives::Id); - impl ::subxt::events::StaticEvent for CurrentHeadUpdated { - const PALLET: &'static str = "Paras"; - const EVENT: &'static str = "CurrentHeadUpdated"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A code upgrade has been scheduled for a Para. `para_id`"] - pub struct CodeUpgradeScheduled(pub runtime_types::polkadot_parachain::primitives::Id); - impl ::subxt::events::StaticEvent for CodeUpgradeScheduled { - const PALLET: &'static str = "Paras"; - const EVENT: &'static str = "CodeUpgradeScheduled"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A new head has been noted for a Para. `para_id`"] - pub struct NewHeadNoted(pub runtime_types::polkadot_parachain::primitives::Id); - impl ::subxt::events::StaticEvent for NewHeadNoted { - const PALLET: &'static str = "Paras"; - const EVENT: &'static str = "NewHeadNoted"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A para has been queued to execute pending actions. `para_id`"] - pub struct ActionQueued( - pub runtime_types::polkadot_parachain::primitives::Id, - pub ::core::primitive::u32, - ); - impl ::subxt::events::StaticEvent for ActionQueued { - const PALLET: &'static str = "Paras"; - const EVENT: &'static str = "ActionQueued"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The given para either initiated or subscribed to a PVF check for the given validation"] - #[doc = "code. `code_hash` `para_id`"] - pub struct PvfCheckStarted( - pub runtime_types::polkadot_parachain::primitives::ValidationCodeHash, - pub runtime_types::polkadot_parachain::primitives::Id, - ); - impl ::subxt::events::StaticEvent for PvfCheckStarted { - const PALLET: &'static str = "Paras"; - const EVENT: &'static str = "PvfCheckStarted"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The given validation code was accepted by the PVF pre-checking vote."] - #[doc = "`code_hash` `para_id`"] - pub struct PvfCheckAccepted( - pub runtime_types::polkadot_parachain::primitives::ValidationCodeHash, - pub runtime_types::polkadot_parachain::primitives::Id, - ); - impl ::subxt::events::StaticEvent for PvfCheckAccepted { - const PALLET: &'static str = "Paras"; - const EVENT: &'static str = "PvfCheckAccepted"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The given validation code was rejected by the PVF pre-checking vote."] - #[doc = "`code_hash` `para_id`"] - pub struct PvfCheckRejected( - pub runtime_types::polkadot_parachain::primitives::ValidationCodeHash, - pub runtime_types::polkadot_parachain::primitives::Id, - ); - impl ::subxt::events::StaticEvent for PvfCheckRejected { - const PALLET: &'static str = "Paras"; - const EVENT: &'static str = "PvfCheckRejected"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " All currently active PVF pre-checking votes."] - #[doc = ""] - #[doc = " Invariant:"] - #[doc = " - There are no PVF pre-checking votes that exists in list but not in the set and vice versa."] - pub fn pvf_active_vote_map( + #[doc = " Storage for bonded pools."] + pub fn bonded_pools( &self, - _0: impl ::std::borrow::Borrow< - runtime_types::polkadot_parachain::primitives::ValidationCodeHash, - >, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_runtime_parachains::paras::PvfCheckActiveVoteState< - ::core::primitive::u32, - >, + runtime_types::pallet_nomination_pools::BondedPoolInner, ::subxt::storage::address::Yes, (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( - "Paras", - "PvfActiveVoteMap", + "NominationPools", + "BondedPools", vec![::subxt::storage::address::make_static_storage_map_key( _0.borrow(), )], [ - 84u8, 214u8, 221u8, 221u8, 244u8, 56u8, 135u8, 87u8, 252u8, 39u8, - 188u8, 13u8, 196u8, 25u8, 214u8, 186u8, 152u8, 181u8, 190u8, 39u8, - 235u8, 211u8, 236u8, 114u8, 67u8, 85u8, 138u8, 43u8, 248u8, 134u8, - 124u8, 73u8, + 3u8, 183u8, 140u8, 154u8, 74u8, 225u8, 69u8, 243u8, 150u8, 132u8, + 163u8, 26u8, 101u8, 45u8, 231u8, 178u8, 85u8, 144u8, 9u8, 112u8, 212u8, + 167u8, 131u8, 188u8, 203u8, 50u8, 177u8, 218u8, 154u8, 182u8, 80u8, + 232u8, ], ) } - #[doc = " All currently active PVF pre-checking votes."] - #[doc = ""] - #[doc = " Invariant:"] - #[doc = " - There are no PVF pre-checking votes that exists in list but not in the set and vice versa."] - pub fn pvf_active_vote_map_root( + #[doc = " Storage for bonded pools."] + pub fn bonded_pools_root( &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_runtime_parachains::paras::PvfCheckActiveVoteState< - ::core::primitive::u32, - >, + runtime_types::pallet_nomination_pools::BondedPoolInner, (), (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( - "Paras", - "PvfActiveVoteMap", + "NominationPools", + "BondedPools", Vec::new(), [ - 84u8, 214u8, 221u8, 221u8, 244u8, 56u8, 135u8, 87u8, 252u8, 39u8, - 188u8, 13u8, 196u8, 25u8, 214u8, 186u8, 152u8, 181u8, 190u8, 39u8, - 235u8, 211u8, 236u8, 114u8, 67u8, 85u8, 138u8, 43u8, 248u8, 134u8, - 124u8, 73u8, - ], - ) - } - #[doc = " The list of all currently active PVF votes. Auxiliary to `PvfActiveVoteMap`."] - pub fn pvf_active_vote_list( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec< - runtime_types::polkadot_parachain::primitives::ValidationCodeHash, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Paras", - "PvfActiveVoteList", - vec![], - [ - 196u8, 23u8, 108u8, 162u8, 29u8, 33u8, 49u8, 219u8, 127u8, 26u8, 241u8, - 58u8, 102u8, 43u8, 156u8, 3u8, 87u8, 153u8, 195u8, 96u8, 68u8, 132u8, - 170u8, 162u8, 18u8, 156u8, 121u8, 63u8, 53u8, 91u8, 68u8, 69u8, + 3u8, 183u8, 140u8, 154u8, 74u8, 225u8, 69u8, 243u8, 150u8, 132u8, + 163u8, 26u8, 101u8, 45u8, 231u8, 178u8, 85u8, 144u8, 9u8, 112u8, 212u8, + 167u8, 131u8, 188u8, 203u8, 50u8, 177u8, 218u8, 154u8, 182u8, 80u8, + 232u8, ], ) } - #[doc = " All parachains. Ordered ascending by `ParaId`. Parathreads are not included."] - #[doc = ""] - #[doc = " Consider using the [`ParachainsCache`] type of modifying."] - pub fn parachains( + #[doc = "Counter for the related counted storage map"] + pub fn counter_for_bonded_pools( &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec, + ::core::primitive::u32, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), > { ::subxt::storage::address::Address::new_static( - "Paras", - "Parachains", + "NominationPools", + "CounterForBondedPools", vec![], [ - 85u8, 234u8, 218u8, 69u8, 20u8, 169u8, 235u8, 6u8, 69u8, 126u8, 28u8, - 18u8, 57u8, 93u8, 238u8, 7u8, 167u8, 221u8, 75u8, 35u8, 36u8, 4u8, - 46u8, 55u8, 234u8, 123u8, 122u8, 173u8, 13u8, 205u8, 58u8, 226u8, + 134u8, 94u8, 199u8, 73u8, 174u8, 253u8, 66u8, 242u8, 233u8, 244u8, + 140u8, 170u8, 242u8, 40u8, 41u8, 185u8, 183u8, 151u8, 58u8, 111u8, + 221u8, 225u8, 81u8, 71u8, 169u8, 219u8, 223u8, 135u8, 8u8, 171u8, + 180u8, 236u8, ], ) } - #[doc = " The current lifecycle of a all known Para IDs."] - pub fn para_lifecycles( + #[doc = " Reward pools. This is where there rewards for each pool accumulate. When a members payout is"] + #[doc = " claimed, the balance comes out fo the reward pool. Keyed by the bonded pools account."] + pub fn reward_pools( &self, - _0: impl ::std::borrow::Borrow, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_runtime_parachains::paras::ParaLifecycle, + runtime_types::pallet_nomination_pools::RewardPool, ::subxt::storage::address::Yes, (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( - "Paras", - "ParaLifecycles", + "NominationPools", + "RewardPools", vec![::subxt::storage::address::make_static_storage_map_key( _0.borrow(), )], [ - 221u8, 103u8, 112u8, 222u8, 86u8, 2u8, 172u8, 187u8, 174u8, 106u8, 4u8, - 253u8, 35u8, 73u8, 18u8, 78u8, 25u8, 31u8, 124u8, 110u8, 81u8, 62u8, - 215u8, 228u8, 183u8, 132u8, 138u8, 213u8, 186u8, 209u8, 191u8, 186u8, + 235u8, 6u8, 2u8, 103u8, 137u8, 31u8, 109u8, 165u8, 129u8, 48u8, 154u8, + 219u8, 110u8, 198u8, 241u8, 31u8, 174u8, 10u8, 92u8, 233u8, 161u8, + 76u8, 53u8, 136u8, 172u8, 214u8, 192u8, 12u8, 239u8, 165u8, 195u8, + 96u8, ], ) } - #[doc = " The current lifecycle of a all known Para IDs."] - pub fn para_lifecycles_root( + #[doc = " Reward pools. This is where there rewards for each pool accumulate. When a members payout is"] + #[doc = " claimed, the balance comes out fo the reward pool. Keyed by the bonded pools account."] + pub fn reward_pools_root( &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_runtime_parachains::paras::ParaLifecycle, + runtime_types::pallet_nomination_pools::RewardPool, (), (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( - "Paras", - "ParaLifecycles", + "NominationPools", + "RewardPools", Vec::new(), [ - 221u8, 103u8, 112u8, 222u8, 86u8, 2u8, 172u8, 187u8, 174u8, 106u8, 4u8, - 253u8, 35u8, 73u8, 18u8, 78u8, 25u8, 31u8, 124u8, 110u8, 81u8, 62u8, - 215u8, 228u8, 183u8, 132u8, 138u8, 213u8, 186u8, 209u8, 191u8, 186u8, + 235u8, 6u8, 2u8, 103u8, 137u8, 31u8, 109u8, 165u8, 129u8, 48u8, 154u8, + 219u8, 110u8, 198u8, 241u8, 31u8, 174u8, 10u8, 92u8, 233u8, 161u8, + 76u8, 53u8, 136u8, 172u8, 214u8, 192u8, 12u8, 239u8, 165u8, 195u8, + 96u8, ], ) } - #[doc = " The head-data of every registered para."] - pub fn heads( + #[doc = "Counter for the related counted storage map"] + pub fn counter_for_reward_pools( &self, - _0: impl ::std::borrow::Borrow, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_parachain::primitives::HeadData, + ::core::primitive::u32, ::subxt::storage::address::Yes, - (), ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Paras", - "Heads", - vec![::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - )], - [ - 122u8, 38u8, 181u8, 121u8, 245u8, 100u8, 136u8, 233u8, 237u8, 248u8, - 127u8, 2u8, 147u8, 41u8, 202u8, 242u8, 238u8, 70u8, 55u8, 200u8, 15u8, - 106u8, 138u8, 108u8, 192u8, 61u8, 158u8, 134u8, 131u8, 142u8, 70u8, - 3u8, - ], - ) - } - #[doc = " The head-data of every registered para."] - pub fn heads_root( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_parachain::primitives::HeadData, (), - (), - ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( - "Paras", - "Heads", - Vec::new(), + "NominationPools", + "CounterForRewardPools", + vec![], [ - 122u8, 38u8, 181u8, 121u8, 245u8, 100u8, 136u8, 233u8, 237u8, 248u8, - 127u8, 2u8, 147u8, 41u8, 202u8, 242u8, 238u8, 70u8, 55u8, 200u8, 15u8, - 106u8, 138u8, 108u8, 192u8, 61u8, 158u8, 134u8, 131u8, 142u8, 70u8, - 3u8, + 209u8, 139u8, 212u8, 116u8, 210u8, 178u8, 213u8, 38u8, 75u8, 23u8, + 188u8, 57u8, 253u8, 213u8, 95u8, 118u8, 182u8, 250u8, 45u8, 205u8, + 17u8, 175u8, 17u8, 201u8, 234u8, 14u8, 98u8, 49u8, 143u8, 135u8, 201u8, + 81u8, ], ) } - #[doc = " The validation code hash of every live para."] - #[doc = ""] - #[doc = " Corresponding code can be retrieved with [`CodeByHash`]."] - pub fn current_code_hash( + #[doc = " Groups of unbonding pools. Each group of unbonding pools belongs to a"] + #[doc = " bonded pool, hence the name sub-pools. Keyed by the bonded pools account."] + pub fn sub_pools_storage( &self, - _0: impl ::std::borrow::Borrow, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + runtime_types::pallet_nomination_pools::SubPools, ::subxt::storage::address::Yes, (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( - "Paras", - "CurrentCodeHash", + "NominationPools", + "SubPoolsStorage", vec![::subxt::storage::address::make_static_storage_map_key( _0.borrow(), )], [ - 179u8, 145u8, 45u8, 44u8, 130u8, 240u8, 50u8, 128u8, 190u8, 133u8, - 66u8, 85u8, 47u8, 141u8, 56u8, 87u8, 131u8, 99u8, 170u8, 203u8, 8u8, - 51u8, 123u8, 73u8, 206u8, 30u8, 173u8, 35u8, 157u8, 195u8, 104u8, - 236u8, + 231u8, 13u8, 111u8, 248u8, 1u8, 208u8, 179u8, 134u8, 224u8, 196u8, + 94u8, 201u8, 229u8, 29u8, 155u8, 211u8, 163u8, 150u8, 157u8, 34u8, + 68u8, 238u8, 55u8, 4u8, 222u8, 96u8, 186u8, 29u8, 205u8, 237u8, 80u8, + 42u8, ], ) } - #[doc = " The validation code hash of every live para."] - #[doc = ""] - #[doc = " Corresponding code can be retrieved with [`CodeByHash`]."] - pub fn current_code_hash_root( + #[doc = " Groups of unbonding pools. Each group of unbonding pools belongs to a"] + #[doc = " bonded pool, hence the name sub-pools. Keyed by the bonded pools account."] + pub fn sub_pools_storage_root( &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + runtime_types::pallet_nomination_pools::SubPools, (), (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( - "Paras", - "CurrentCodeHash", + "NominationPools", + "SubPoolsStorage", Vec::new(), [ - 179u8, 145u8, 45u8, 44u8, 130u8, 240u8, 50u8, 128u8, 190u8, 133u8, - 66u8, 85u8, 47u8, 141u8, 56u8, 87u8, 131u8, 99u8, 170u8, 203u8, 8u8, - 51u8, 123u8, 73u8, 206u8, 30u8, 173u8, 35u8, 157u8, 195u8, 104u8, - 236u8, + 231u8, 13u8, 111u8, 248u8, 1u8, 208u8, 179u8, 134u8, 224u8, 196u8, + 94u8, 201u8, 229u8, 29u8, 155u8, 211u8, 163u8, 150u8, 157u8, 34u8, + 68u8, 238u8, 55u8, 4u8, 222u8, 96u8, 186u8, 29u8, 205u8, 237u8, 80u8, + 42u8, ], ) } - #[doc = " Actual past code hash, indicated by the para id as well as the block number at which it"] - #[doc = " became outdated."] - #[doc = ""] - #[doc = " Corresponding code can be retrieved with [`CodeByHash`]."] - pub fn past_code_hash( + #[doc = "Counter for the related counted storage map"] + pub fn counter_for_sub_pools_storage( &self, - _0: impl ::std::borrow::Borrow, - _1: impl ::std::borrow::Borrow<::core::primitive::u32>, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + ::core::primitive::u32, ::subxt::storage::address::Yes, - (), ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Paras", - "PastCodeHash", - vec![ - ::subxt::storage::address::make_static_storage_map_key(_0.borrow()), - ::subxt::storage::address::make_static_storage_map_key(_1.borrow()), - ], - [ - 241u8, 112u8, 128u8, 226u8, 163u8, 193u8, 77u8, 78u8, 177u8, 146u8, - 31u8, 143u8, 44u8, 140u8, 159u8, 134u8, 221u8, 129u8, 36u8, 224u8, - 46u8, 119u8, 245u8, 253u8, 55u8, 22u8, 137u8, 187u8, 71u8, 94u8, 88u8, - 124u8, - ], - ) - } - #[doc = " Actual past code hash, indicated by the para id as well as the block number at which it"] - #[doc = " became outdated."] - #[doc = ""] - #[doc = " Corresponding code can be retrieved with [`CodeByHash`]."] - pub fn past_code_hash_root( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_parachain::primitives::ValidationCodeHash, - (), (), - ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( - "Paras", - "PastCodeHash", - Vec::new(), + "NominationPools", + "CounterForSubPoolsStorage", + vec![], [ - 241u8, 112u8, 128u8, 226u8, 163u8, 193u8, 77u8, 78u8, 177u8, 146u8, - 31u8, 143u8, 44u8, 140u8, 159u8, 134u8, 221u8, 129u8, 36u8, 224u8, - 46u8, 119u8, 245u8, 253u8, 55u8, 22u8, 137u8, 187u8, 71u8, 94u8, 88u8, - 124u8, + 212u8, 145u8, 212u8, 226u8, 234u8, 31u8, 26u8, 240u8, 107u8, 91u8, + 171u8, 120u8, 41u8, 195u8, 16u8, 86u8, 55u8, 127u8, 103u8, 93u8, 128u8, + 48u8, 69u8, 104u8, 168u8, 236u8, 81u8, 54u8, 2u8, 184u8, 215u8, 51u8, ], ) } - #[doc = " Past code of parachains. The parachains themselves may not be registered anymore,"] - #[doc = " but we also keep their code on-chain for the same amount of time as outdated code"] - #[doc = " to keep it available for secondary checkers."] - pub fn past_code_meta( + #[doc = " Metadata for the pool."] + pub fn metadata( &self, - _0: impl ::std::borrow::Borrow, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_runtime_parachains::paras::ParaPastCodeMeta< - ::core::primitive::u32, + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, >, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( - "Paras", - "PastCodeMeta", + "NominationPools", + "Metadata", vec![::subxt::storage::address::make_static_storage_map_key( _0.borrow(), )], [ - 251u8, 52u8, 126u8, 12u8, 21u8, 178u8, 151u8, 195u8, 153u8, 17u8, - 215u8, 242u8, 118u8, 192u8, 86u8, 72u8, 36u8, 97u8, 245u8, 134u8, - 155u8, 117u8, 85u8, 93u8, 225u8, 209u8, 63u8, 164u8, 168u8, 72u8, - 171u8, 228u8, + 108u8, 250u8, 163u8, 54u8, 192u8, 143u8, 239u8, 62u8, 97u8, 163u8, + 161u8, 215u8, 171u8, 225u8, 49u8, 18u8, 37u8, 200u8, 143u8, 254u8, + 136u8, 26u8, 54u8, 187u8, 39u8, 3u8, 216u8, 24u8, 188u8, 25u8, 243u8, + 251u8, ], ) } - #[doc = " Past code of parachains. The parachains themselves may not be registered anymore,"] - #[doc = " but we also keep their code on-chain for the same amount of time as outdated code"] - #[doc = " to keep it available for secondary checkers."] - pub fn past_code_meta_root( + #[doc = " Metadata for the pool."] + pub fn metadata_root( &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_runtime_parachains::paras::ParaPastCodeMeta< - ::core::primitive::u32, + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, >, (), ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( - "Paras", - "PastCodeMeta", + "NominationPools", + "Metadata", Vec::new(), [ - 251u8, 52u8, 126u8, 12u8, 21u8, 178u8, 151u8, 195u8, 153u8, 17u8, - 215u8, 242u8, 118u8, 192u8, 86u8, 72u8, 36u8, 97u8, 245u8, 134u8, - 155u8, 117u8, 85u8, 93u8, 225u8, 209u8, 63u8, 164u8, 168u8, 72u8, - 171u8, 228u8, + 108u8, 250u8, 163u8, 54u8, 192u8, 143u8, 239u8, 62u8, 97u8, 163u8, + 161u8, 215u8, 171u8, 225u8, 49u8, 18u8, 37u8, 200u8, 143u8, 254u8, + 136u8, 26u8, 54u8, 187u8, 39u8, 3u8, 216u8, 24u8, 188u8, 25u8, 243u8, + 251u8, ], ) } - #[doc = " Which paras have past code that needs pruning and the relay-chain block at which the code was replaced."] - #[doc = " Note that this is the actual height of the included block, not the expected height at which the"] - #[doc = " code upgrade would be applied, although they may be equal."] - #[doc = " This is to ensure the entire acceptance period is covered, not an offset acceptance period starting"] - #[doc = " from the time at which the parachain perceives a code upgrade as having occurred."] - #[doc = " Multiple entries for a single para are permitted. Ordered ascending by block number."] - pub fn past_code_pruning( + #[doc = "Counter for the related counted storage map"] + pub fn counter_for_metadata( &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec<( - runtime_types::polkadot_parachain::primitives::Id, - ::core::primitive::u32, - )>, + ::core::primitive::u32, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), > { ::subxt::storage::address::Address::new_static( - "Paras", - "PastCodePruning", + "NominationPools", + "CounterForMetadata", vec![], [ - 59u8, 26u8, 175u8, 129u8, 174u8, 27u8, 239u8, 77u8, 38u8, 130u8, 37u8, - 134u8, 62u8, 28u8, 218u8, 176u8, 16u8, 137u8, 175u8, 90u8, 248u8, 44u8, - 248u8, 172u8, 231u8, 6u8, 36u8, 190u8, 109u8, 237u8, 228u8, 135u8, + 190u8, 232u8, 77u8, 134u8, 245u8, 89u8, 160u8, 187u8, 163u8, 68u8, + 188u8, 204u8, 31u8, 145u8, 219u8, 165u8, 213u8, 1u8, 167u8, 90u8, + 175u8, 218u8, 147u8, 144u8, 158u8, 226u8, 23u8, 233u8, 55u8, 168u8, + 161u8, 237u8, ], ) } - #[doc = " The block number at which the planned code change is expected for a para."] - #[doc = " The change will be applied after the first parablock for this ID included which executes"] - #[doc = " in the context of a relay chain block with a number >= `expected_at`."] - pub fn future_code_upgrades( + #[doc = " Ever increasing number of all pools created so far."] + pub fn last_pool_id( &self, - _0: impl ::std::borrow::Borrow, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, ::core::primitive::u32, ::subxt::storage::address::Yes, - (), ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Paras", - "FutureCodeUpgrades", - vec![::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - )], - [ - 40u8, 134u8, 185u8, 28u8, 48u8, 105u8, 152u8, 229u8, 166u8, 235u8, - 32u8, 173u8, 64u8, 63u8, 151u8, 157u8, 190u8, 214u8, 7u8, 8u8, 6u8, - 128u8, 21u8, 104u8, 175u8, 71u8, 130u8, 207u8, 158u8, 115u8, 172u8, - 149u8, - ], - ) - } - #[doc = " The block number at which the planned code change is expected for a para."] - #[doc = " The change will be applied after the first parablock for this ID included which executes"] - #[doc = " in the context of a relay chain block with a number >= `expected_at`."] - pub fn future_code_upgrades_root( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, (), - (), - ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( - "Paras", - "FutureCodeUpgrades", - Vec::new(), + "NominationPools", + "LastPoolId", + vec![], [ - 40u8, 134u8, 185u8, 28u8, 48u8, 105u8, 152u8, 229u8, 166u8, 235u8, - 32u8, 173u8, 64u8, 63u8, 151u8, 157u8, 190u8, 214u8, 7u8, 8u8, 6u8, - 128u8, 21u8, 104u8, 175u8, 71u8, 130u8, 207u8, 158u8, 115u8, 172u8, - 149u8, + 50u8, 254u8, 218u8, 41u8, 213u8, 184u8, 170u8, 166u8, 31u8, 29u8, + 196u8, 57u8, 215u8, 20u8, 40u8, 40u8, 19u8, 22u8, 9u8, 184u8, 11u8, + 21u8, 21u8, 125u8, 97u8, 38u8, 219u8, 209u8, 2u8, 238u8, 247u8, 51u8, ], ) } - #[doc = " The actual future code hash of a para."] + #[doc = " A reverse lookup from the pool's account id to its id."] #[doc = ""] - #[doc = " Corresponding code can be retrieved with [`CodeByHash`]."] - pub fn future_code_hash( + #[doc = " This is only used for slashing. In all other instances, the pool id is used, and the"] + #[doc = " accounts are deterministically derived from it."] + pub fn reverse_pool_id_lookup( &self, - _0: impl ::std::borrow::Borrow, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + ::core::primitive::u32, ::subxt::storage::address::Yes, (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( - "Paras", - "FutureCodeHash", + "NominationPools", + "ReversePoolIdLookup", vec![::subxt::storage::address::make_static_storage_map_key( _0.borrow(), )], [ - 252u8, 24u8, 95u8, 200u8, 207u8, 91u8, 66u8, 103u8, 54u8, 171u8, 191u8, - 187u8, 73u8, 170u8, 132u8, 59u8, 205u8, 125u8, 68u8, 194u8, 122u8, - 124u8, 190u8, 53u8, 241u8, 225u8, 131u8, 53u8, 44u8, 145u8, 244u8, - 216u8, + 178u8, 161u8, 51u8, 220u8, 128u8, 1u8, 135u8, 83u8, 236u8, 159u8, 36u8, + 237u8, 120u8, 128u8, 6u8, 191u8, 41u8, 159u8, 94u8, 178u8, 174u8, + 235u8, 221u8, 173u8, 44u8, 81u8, 211u8, 255u8, 231u8, 81u8, 16u8, 87u8, ], ) } - #[doc = " The actual future code hash of a para."] + #[doc = " A reverse lookup from the pool's account id to its id."] #[doc = ""] - #[doc = " Corresponding code can be retrieved with [`CodeByHash`]."] - pub fn future_code_hash_root( + #[doc = " This is only used for slashing. In all other instances, the pool id is used, and the"] + #[doc = " accounts are deterministically derived from it."] + pub fn reverse_pool_id_lookup_root( &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + ::core::primitive::u32, (), (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( - "Paras", - "FutureCodeHash", + "NominationPools", + "ReversePoolIdLookup", Vec::new(), [ - 252u8, 24u8, 95u8, 200u8, 207u8, 91u8, 66u8, 103u8, 54u8, 171u8, 191u8, - 187u8, 73u8, 170u8, 132u8, 59u8, 205u8, 125u8, 68u8, 194u8, 122u8, - 124u8, 190u8, 53u8, 241u8, 225u8, 131u8, 53u8, 44u8, 145u8, 244u8, - 216u8, + 178u8, 161u8, 51u8, 220u8, 128u8, 1u8, 135u8, 83u8, 236u8, 159u8, 36u8, + 237u8, 120u8, 128u8, 6u8, 191u8, 41u8, 159u8, 94u8, 178u8, 174u8, + 235u8, 221u8, 173u8, 44u8, 81u8, 211u8, 255u8, 231u8, 81u8, 16u8, 87u8, ], ) } - #[doc = " This is used by the relay-chain to communicate to a parachain a go-ahead with in the upgrade procedure."] - #[doc = ""] - #[doc = " This value is absent when there are no upgrades scheduled or during the time the relay chain"] - #[doc = " performs the checks. It is set at the first relay-chain block when the corresponding parachain"] - #[doc = " can switch its upgrade function. As soon as the parachain's block is included, the value"] - #[doc = " gets reset to `None`."] - #[doc = ""] - #[doc = " NOTE that this field is used by parachains via merkle storage proofs, therefore changing"] - #[doc = " the format will require migration of parachains."] - pub fn upgrade_go_ahead_signal( + #[doc = "Counter for the related counted storage map"] + pub fn counter_for_reverse_pool_id_lookup( &self, - _0: impl ::std::borrow::Borrow, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_primitives::v2::UpgradeGoAhead, + ::core::primitive::u32, ::subxt::storage::address::Yes, - (), ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Paras", - "UpgradeGoAheadSignal", - vec![::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - )], - [ - 159u8, 47u8, 247u8, 154u8, 54u8, 20u8, 235u8, 49u8, 74u8, 41u8, 65u8, - 51u8, 52u8, 187u8, 242u8, 6u8, 84u8, 144u8, 200u8, 176u8, 222u8, 232u8, - 70u8, 50u8, 70u8, 97u8, 61u8, 249u8, 245u8, 120u8, 98u8, 183u8, - ], - ) - } - #[doc = " This is used by the relay-chain to communicate to a parachain a go-ahead with in the upgrade procedure."] - #[doc = ""] - #[doc = " This value is absent when there are no upgrades scheduled or during the time the relay chain"] - #[doc = " performs the checks. It is set at the first relay-chain block when the corresponding parachain"] - #[doc = " can switch its upgrade function. As soon as the parachain's block is included, the value"] - #[doc = " gets reset to `None`."] - #[doc = ""] - #[doc = " NOTE that this field is used by parachains via merkle storage proofs, therefore changing"] - #[doc = " the format will require migration of parachains."] - pub fn upgrade_go_ahead_signal_root( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_primitives::v2::UpgradeGoAhead, - (), (), - ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( - "Paras", - "UpgradeGoAheadSignal", - Vec::new(), + "NominationPools", + "CounterForReversePoolIdLookup", + vec![], [ - 159u8, 47u8, 247u8, 154u8, 54u8, 20u8, 235u8, 49u8, 74u8, 41u8, 65u8, - 51u8, 52u8, 187u8, 242u8, 6u8, 84u8, 144u8, 200u8, 176u8, 222u8, 232u8, - 70u8, 50u8, 70u8, 97u8, 61u8, 249u8, 245u8, 120u8, 98u8, 183u8, + 148u8, 83u8, 81u8, 33u8, 188u8, 72u8, 148u8, 208u8, 245u8, 178u8, 52u8, + 245u8, 229u8, 140u8, 100u8, 152u8, 8u8, 217u8, 161u8, 80u8, 226u8, + 42u8, 15u8, 252u8, 90u8, 197u8, 120u8, 114u8, 144u8, 90u8, 199u8, + 123u8, ], ) } - #[doc = " This is used by the relay-chain to communicate that there are restrictions for performing"] - #[doc = " an upgrade for this parachain."] - #[doc = ""] - #[doc = " This may be a because the parachain waits for the upgrade cooldown to expire. Another"] - #[doc = " potential use case is when we want to perform some maintenance (such as storage migration)"] - #[doc = " we could restrict upgrades to make the process simpler."] - #[doc = ""] - #[doc = " NOTE that this field is used by parachains via merkle storage proofs, therefore changing"] - #[doc = " the format will require migration of parachains."] - pub fn upgrade_restriction_signal( + #[doc = " Map from a pool member account to their opted claim permission."] + pub fn claim_permissions( &self, - _0: impl ::std::borrow::Borrow, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_primitives::v2::UpgradeRestriction, + runtime_types::pallet_nomination_pools::ClaimPermission, + ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, - (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( - "Paras", - "UpgradeRestrictionSignal", + "NominationPools", + "ClaimPermissions", vec![::subxt::storage::address::make_static_storage_map_key( _0.borrow(), )], [ - 86u8, 190u8, 41u8, 79u8, 66u8, 68u8, 46u8, 87u8, 212u8, 176u8, 255u8, - 134u8, 104u8, 121u8, 44u8, 143u8, 248u8, 100u8, 35u8, 157u8, 91u8, - 165u8, 118u8, 38u8, 49u8, 171u8, 158u8, 163u8, 45u8, 92u8, 44u8, 11u8, + 23u8, 124u8, 83u8, 109u8, 174u8, 228u8, 170u8, 25u8, 124u8, 91u8, + 224u8, 66u8, 55u8, 127u8, 190u8, 226u8, 163u8, 16u8, 81u8, 231u8, + 241u8, 214u8, 209u8, 137u8, 101u8, 206u8, 104u8, 138u8, 49u8, 56u8, + 152u8, 228u8, ], ) } - #[doc = " This is used by the relay-chain to communicate that there are restrictions for performing"] - #[doc = " an upgrade for this parachain."] - #[doc = ""] - #[doc = " This may be a because the parachain waits for the upgrade cooldown to expire. Another"] - #[doc = " potential use case is when we want to perform some maintenance (such as storage migration)"] - #[doc = " we could restrict upgrades to make the process simpler."] - #[doc = ""] - #[doc = " NOTE that this field is used by parachains via merkle storage proofs, therefore changing"] - #[doc = " the format will require migration of parachains."] - pub fn upgrade_restriction_signal_root( + #[doc = " Map from a pool member account to their opted claim permission."] + pub fn claim_permissions_root( &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_primitives::v2::UpgradeRestriction, - (), + runtime_types::pallet_nomination_pools::ClaimPermission, (), ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( - "Paras", - "UpgradeRestrictionSignal", + "NominationPools", + "ClaimPermissions", Vec::new(), [ - 86u8, 190u8, 41u8, 79u8, 66u8, 68u8, 46u8, 87u8, 212u8, 176u8, 255u8, - 134u8, 104u8, 121u8, 44u8, 143u8, 248u8, 100u8, 35u8, 157u8, 91u8, - 165u8, 118u8, 38u8, 49u8, 171u8, 158u8, 163u8, 45u8, 92u8, 44u8, 11u8, + 23u8, 124u8, 83u8, 109u8, 174u8, 228u8, 170u8, 25u8, 124u8, 91u8, + 224u8, 66u8, 55u8, 127u8, 190u8, 226u8, 163u8, 16u8, 81u8, 231u8, + 241u8, 214u8, 209u8, 137u8, 101u8, 206u8, 104u8, 138u8, 49u8, 56u8, + 152u8, 228u8, ], ) } - #[doc = " The list of parachains that are awaiting for their upgrade restriction to cooldown."] - #[doc = ""] - #[doc = " Ordered ascending by block number."] - pub fn upgrade_cooldowns( + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The nomination pool's pallet id."] + pub fn pallet_id( &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec<( - runtime_types::polkadot_parachain::primitives::Id, - ::core::primitive::u32, - )>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Paras", - "UpgradeCooldowns", - vec![], + ) -> ::subxt::constants::Address + { + ::subxt::constants::Address::new_static( + "NominationPools", + "PalletId", [ - 205u8, 236u8, 140u8, 145u8, 241u8, 245u8, 60u8, 68u8, 23u8, 175u8, - 226u8, 174u8, 154u8, 107u8, 243u8, 197u8, 61u8, 218u8, 7u8, 24u8, - 109u8, 221u8, 178u8, 80u8, 242u8, 123u8, 33u8, 119u8, 5u8, 241u8, - 179u8, 13u8, + 139u8, 109u8, 228u8, 151u8, 252u8, 32u8, 130u8, 69u8, 112u8, 154u8, + 174u8, 45u8, 83u8, 245u8, 51u8, 132u8, 173u8, 5u8, 186u8, 24u8, 243u8, + 9u8, 12u8, 214u8, 80u8, 74u8, 69u8, 189u8, 30u8, 94u8, 22u8, 39u8, ], ) } - #[doc = " The list of upcoming code upgrades. Each item is a pair of which para performs a code"] - #[doc = " upgrade and at which relay-chain block it is expected at."] + #[doc = " The maximum pool points-to-balance ratio that an `open` pool can have."] #[doc = ""] - #[doc = " Ordered ascending by block number."] - pub fn upcoming_upgrades( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec<( - runtime_types::polkadot_parachain::primitives::Id, - ::core::primitive::u32, - )>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Paras", - "UpcomingUpgrades", - vec![], - [ - 165u8, 112u8, 215u8, 149u8, 125u8, 175u8, 206u8, 195u8, 214u8, 173u8, - 0u8, 144u8, 46u8, 197u8, 55u8, 204u8, 144u8, 68u8, 158u8, 156u8, 145u8, - 230u8, 173u8, 101u8, 255u8, 108u8, 52u8, 199u8, 142u8, 37u8, 55u8, - 32u8, - ], - ) - } - #[doc = " The actions to perform during the start of a specific session index."] - pub fn actions_queue( + #[doc = " This is important in the event slashing takes place and the pool's points-to-balance"] + #[doc = " ratio becomes disproportional."] + #[doc = ""] + #[doc = " Moreover, this relates to the `RewardCounter` type as well, as the arithmetic operations"] + #[doc = " are a function of number of points, and by setting this value to e.g. 10, you ensure"] + #[doc = " that the total number of points in the system are at most 10 times the total_issuance of"] + #[doc = " the chain, in the absolute worse case."] + #[doc = ""] + #[doc = " For a value of 10, the threshold would be a pool points-to-balance ratio of 10:1."] + #[doc = " Such a scenario would also be the equivalent of the pool being 90% slashed."] + pub fn max_points_to_balance( &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Paras", - "ActionsQueue", - vec![::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - )], + ) -> ::subxt::constants::Address<::core::primitive::u8> { + ::subxt::constants::Address::new_static( + "NominationPools", + "MaxPointsToBalance", [ - 209u8, 106u8, 198u8, 228u8, 148u8, 75u8, 246u8, 248u8, 12u8, 143u8, - 175u8, 56u8, 168u8, 243u8, 67u8, 166u8, 59u8, 92u8, 219u8, 184u8, 1u8, - 34u8, 241u8, 66u8, 245u8, 48u8, 174u8, 41u8, 123u8, 16u8, 178u8, 161u8, + 141u8, 130u8, 11u8, 35u8, 226u8, 114u8, 92u8, 179u8, 168u8, 110u8, + 28u8, 91u8, 221u8, 64u8, 4u8, 148u8, 201u8, 193u8, 185u8, 66u8, 226u8, + 114u8, 97u8, 79u8, 62u8, 212u8, 202u8, 114u8, 237u8, 228u8, 183u8, + 165u8, ], ) } - #[doc = " The actions to perform during the start of a specific session index."] - pub fn actions_queue_root( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Paras", - "ActionsQueue", - Vec::new(), - [ - 209u8, 106u8, 198u8, 228u8, 148u8, 75u8, 246u8, 248u8, 12u8, 143u8, - 175u8, 56u8, 168u8, 243u8, 67u8, 166u8, 59u8, 92u8, 219u8, 184u8, 1u8, - 34u8, 241u8, 66u8, 245u8, 48u8, 174u8, 41u8, 123u8, 16u8, 178u8, 161u8, - ], - ) + } + } + } + pub mod fast_unstake { + use super::root_mod; + use super::runtime_types; + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub type Error = runtime_types::pallet_fast_unstake::pallet::Error; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct RegisterFastUnstake; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Deregister; + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Control { + pub eras_to_check: ::core::primitive::u32, } - #[doc = " Upcoming paras instantiation arguments."] + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Register oneself for fast-unstake."] #[doc = ""] - #[doc = " NOTE that after PVF pre-checking is enabled the para genesis arg will have it's code set"] - #[doc = " to empty. Instead, the code will be saved into the storage right away via `CodeByHash`."] - pub fn upcoming_paras_genesis( - &self, - _0: impl ::std::borrow::Borrow, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_runtime_parachains::paras::ParaGenesisArgs, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Paras", - "UpcomingParasGenesis", - vec![::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - )], - [ - 134u8, 111u8, 59u8, 49u8, 28u8, 111u8, 6u8, 57u8, 109u8, 75u8, 75u8, - 53u8, 91u8, 150u8, 86u8, 38u8, 223u8, 50u8, 107u8, 75u8, 200u8, 61u8, - 211u8, 7u8, 105u8, 251u8, 243u8, 18u8, 220u8, 195u8, 216u8, 167u8, - ], - ) - } - #[doc = " Upcoming paras instantiation arguments."] + #[doc = "The dispatch origin of this call must be signed by the controller account, similar to"] + #[doc = "`staking::unbond`."] #[doc = ""] - #[doc = " NOTE that after PVF pre-checking is enabled the para genesis arg will have it's code set"] - #[doc = " to empty. Instead, the code will be saved into the storage right away via `CodeByHash`."] - pub fn upcoming_paras_genesis_root( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_runtime_parachains::paras::ParaGenesisArgs, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Paras", - "UpcomingParasGenesis", - Vec::new(), - [ - 134u8, 111u8, 59u8, 49u8, 28u8, 111u8, 6u8, 57u8, 109u8, 75u8, 75u8, - 53u8, 91u8, 150u8, 86u8, 38u8, 223u8, 50u8, 107u8, 75u8, 200u8, 61u8, - 211u8, 7u8, 105u8, 251u8, 243u8, 18u8, 220u8, 195u8, 216u8, 167u8, - ], - ) - } - #[doc = " The number of reference on the validation code in [`CodeByHash`] storage."] - pub fn code_by_hash_refs( - &self, - _0: impl ::std::borrow::Borrow< - runtime_types::polkadot_parachain::primitives::ValidationCodeHash, - >, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Paras", - "CodeByHashRefs", - vec![::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - )], - [ - 24u8, 6u8, 23u8, 50u8, 105u8, 203u8, 126u8, 161u8, 0u8, 5u8, 121u8, - 165u8, 204u8, 106u8, 68u8, 91u8, 84u8, 126u8, 29u8, 239u8, 236u8, - 138u8, 32u8, 237u8, 241u8, 226u8, 190u8, 233u8, 160u8, 143u8, 88u8, - 168u8, - ], - ) - } - #[doc = " The number of reference on the validation code in [`CodeByHash`] storage."] - pub fn code_by_hash_refs_root( + #[doc = "The stash associated with the origin must have no ongoing unlocking chunks. If"] + #[doc = "successful, this will fully unbond and chill the stash. Then, it will enqueue the stash"] + #[doc = "to be checked in further blocks."] + #[doc = ""] + #[doc = "If by the time this is called, the stash is actually eligible for fast-unstake, then"] + #[doc = "they are guaranteed to remain eligible, because the call will chill them as well."] + #[doc = ""] + #[doc = "If the check works, the entire staking data is removed, i.e. the stash is fully"] + #[doc = "unstaked."] + #[doc = ""] + #[doc = "If the check fails, the stash remains chilled and waiting for being unbonded as in with"] + #[doc = "the normal staking system, but they lose part of their unbonding chunks due to consuming"] + #[doc = "the chain's resources."] + pub fn register_fast_unstake( &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Paras", - "CodeByHashRefs", - Vec::new(), + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "FastUnstake", + "register_fast_unstake", + types::RegisterFastUnstake {}, [ - 24u8, 6u8, 23u8, 50u8, 105u8, 203u8, 126u8, 161u8, 0u8, 5u8, 121u8, - 165u8, 204u8, 106u8, 68u8, 91u8, 84u8, 126u8, 29u8, 239u8, 236u8, - 138u8, 32u8, 237u8, 241u8, 226u8, 190u8, 233u8, 160u8, 143u8, 88u8, - 168u8, + 254u8, 85u8, 128u8, 135u8, 172u8, 170u8, 34u8, 145u8, 79u8, 117u8, + 234u8, 90u8, 16u8, 174u8, 159u8, 197u8, 27u8, 239u8, 180u8, 85u8, + 116u8, 23u8, 254u8, 30u8, 197u8, 110u8, 48u8, 184u8, 177u8, 129u8, + 42u8, 122u8, ], ) } - #[doc = " Validation code stored by its hash."] + #[doc = "Deregister oneself from the fast-unstake."] #[doc = ""] - #[doc = " This storage is consistent with [`FutureCodeHash`], [`CurrentCodeHash`] and"] - #[doc = " [`PastCodeHash`]."] - pub fn code_by_hash( - &self, - _0: impl ::std::borrow::Borrow< - runtime_types::polkadot_parachain::primitives::ValidationCodeHash, - >, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_parachain::primitives::ValidationCode, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Paras", - "CodeByHash", - vec![::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - )], + #[doc = "This is useful if one is registered, they are still waiting, and they change their mind."] + #[doc = ""] + #[doc = "Note that the associated stash is still fully unbonded and chilled as a consequence of"] + #[doc = "calling `register_fast_unstake`. This should probably be followed by a call to"] + #[doc = "`Staking::rebond`."] + pub fn deregister(&self) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "FastUnstake", + "deregister", + types::Deregister {}, [ - 58u8, 104u8, 36u8, 34u8, 226u8, 210u8, 253u8, 90u8, 23u8, 3u8, 6u8, - 202u8, 9u8, 44u8, 107u8, 108u8, 41u8, 149u8, 255u8, 173u8, 119u8, - 206u8, 201u8, 180u8, 32u8, 193u8, 44u8, 232u8, 73u8, 15u8, 210u8, - 226u8, + 198u8, 180u8, 253u8, 148u8, 124u8, 145u8, 175u8, 121u8, 42u8, 181u8, + 41u8, 155u8, 229u8, 181u8, 66u8, 140u8, 103u8, 86u8, 242u8, 155u8, + 192u8, 34u8, 157u8, 107u8, 211u8, 162u8, 1u8, 144u8, 35u8, 252u8, 88u8, + 21u8, ], ) } - #[doc = " Validation code stored by its hash."] + #[doc = "Control the operation of this pallet."] #[doc = ""] - #[doc = " This storage is consistent with [`FutureCodeHash`], [`CurrentCodeHash`] and"] - #[doc = " [`PastCodeHash`]."] - pub fn code_by_hash_root( + #[doc = "Dispatch origin must be signed by the [`Config::ControlOrigin`]."] + pub fn control( &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_parachain::primitives::ValidationCode, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Paras", - "CodeByHash", - Vec::new(), + eras_to_check: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "FastUnstake", + "control", + types::Control { eras_to_check }, [ - 58u8, 104u8, 36u8, 34u8, 226u8, 210u8, 253u8, 90u8, 23u8, 3u8, 6u8, - 202u8, 9u8, 44u8, 107u8, 108u8, 41u8, 149u8, 255u8, 173u8, 119u8, - 206u8, 201u8, 180u8, 32u8, 193u8, 44u8, 232u8, 73u8, 15u8, 210u8, - 226u8, + 92u8, 241u8, 123u8, 251u8, 82u8, 36u8, 209u8, 87u8, 238u8, 56u8, 32u8, + 54u8, 190u8, 89u8, 167u8, 2u8, 36u8, 249u8, 131u8, 54u8, 217u8, 217u8, + 231u8, 167u8, 232u8, 35u8, 108u8, 193u8, 70u8, 224u8, 47u8, 142u8, ], ) } } } - pub mod constants { + #[doc = "The events of this pallet."] + pub type Event = runtime_types::pallet_fast_unstake::pallet::Event; + pub mod events { use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - pub fn unsigned_priority( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u64> { - ::subxt::constants::Address::new_static( - "Paras", - "UnsignedPriority", - [ - 128u8, 214u8, 205u8, 242u8, 181u8, 142u8, 124u8, 231u8, 190u8, 146u8, - 59u8, 226u8, 157u8, 101u8, 103u8, 117u8, 249u8, 65u8, 18u8, 191u8, - 103u8, 119u8, 53u8, 85u8, 81u8, 96u8, 220u8, 42u8, 184u8, 239u8, 42u8, - 246u8, - ], - ) - } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A staker was unstaked."] + pub struct Unstaked { + pub stash: ::subxt::utils::AccountId32, + pub result: ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + } + impl ::subxt::events::StaticEvent for Unstaked { + const PALLET: &'static str = "FastUnstake"; + const EVENT: &'static str = "Unstaked"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A staker was slashed for requesting fast-unstake whilst being exposed."] + pub struct Slashed { + pub stash: ::subxt::utils::AccountId32, + pub amount: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for Slashed { + const PALLET: &'static str = "FastUnstake"; + const EVENT: &'static str = "Slashed"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "An internal error happened. Operations will be paused now."] + pub struct InternalError; + impl ::subxt::events::StaticEvent for InternalError { + const PALLET: &'static str = "FastUnstake"; + const EVENT: &'static str = "InternalError"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A batch was partially checked for the given eras, but the process did not finish."] + pub struct BatchChecked { + pub eras: ::std::vec::Vec<::core::primitive::u32>, + } + impl ::subxt::events::StaticEvent for BatchChecked { + const PALLET: &'static str = "FastUnstake"; + const EVENT: &'static str = "BatchChecked"; } - } - } - pub mod initializer { - use super::root_mod; - use super::runtime_types; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive( :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, @@ -26955,731 +26161,3870 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceApprove { - pub up_to: ::core::primitive::u32, + #[doc = "A batch of a given size was terminated."] + #[doc = ""] + #[doc = "This is always follows by a number of `Unstaked` or `Slashed` events, marking the end"] + #[doc = "of the batch. A new batch will be created upon next block."] + pub struct BatchFinished { + pub size: ::core::primitive::u32, } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Issue a signal to the consensus engine to forcibly act as though all parachain"] - #[doc = "blocks in all relay chain blocks up to and including the given number in the current"] - #[doc = "chain are valid and should be finalized."] - pub fn force_approve( - &self, - up_to: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Initializer", - "force_approve", - ForceApprove { up_to }, - [ - 28u8, 117u8, 86u8, 182u8, 19u8, 127u8, 43u8, 17u8, 153u8, 80u8, 193u8, - 53u8, 120u8, 41u8, 205u8, 23u8, 252u8, 148u8, 77u8, 227u8, 138u8, 35u8, - 182u8, 122u8, 112u8, 232u8, 246u8, 69u8, 173u8, 97u8, 42u8, 103u8, - ], - ) - } + impl ::subxt::events::StaticEvent for BatchFinished { + const PALLET: &'static str = "FastUnstake"; + const EVENT: &'static str = "BatchFinished"; } } pub mod storage { use super::runtime_types; pub struct StorageApi; impl StorageApi { - #[doc = " Whether the parachains modules have been initialized within this block."] - #[doc = ""] - #[doc = " Semantically a `bool`, but this guarantees it should never hit the trie,"] - #[doc = " as this is cleared in `on_finalize` and Frame optimizes `None` values to be empty values."] - #[doc = ""] - #[doc = " As a `bool`, `set(false)` and `remove()` both lead to the next `get()` being false, but one of"] - #[doc = " them writes to the trie and one does not. This confusion makes `Option<()>` more suitable for"] - #[doc = " the semantics of this variable."] - pub fn has_initialized( + #[doc = " The current \"head of the queue\" being unstaked."] + pub fn head( &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - (), + runtime_types::pallet_fast_unstake::types::UnstakeRequest, ::subxt::storage::address::Yes, (), (), > { ::subxt::storage::address::Address::new_static( - "Initializer", - "HasInitialized", + "FastUnstake", + "Head", vec![], [ - 251u8, 135u8, 247u8, 61u8, 139u8, 102u8, 12u8, 122u8, 227u8, 123u8, - 11u8, 232u8, 120u8, 80u8, 81u8, 48u8, 216u8, 115u8, 159u8, 131u8, - 133u8, 105u8, 200u8, 122u8, 114u8, 6u8, 109u8, 4u8, 164u8, 204u8, - 214u8, 111u8, + 206u8, 19u8, 169u8, 239u8, 214u8, 136u8, 16u8, 102u8, 82u8, 110u8, + 128u8, 205u8, 102u8, 96u8, 148u8, 190u8, 67u8, 75u8, 2u8, 213u8, 134u8, + 143u8, 40u8, 57u8, 54u8, 66u8, 170u8, 42u8, 135u8, 212u8, 108u8, 177u8, ], ) } - #[doc = " Buffered session changes along with the block number at which they should be applied."] + #[doc = " The map of all accounts wishing to be unstaked."] #[doc = ""] - #[doc = " Typically this will be empty or one element long. Apart from that this item never hits"] - #[doc = " the storage."] + #[doc = " Keeps track of `AccountId` wishing to unstake and it's corresponding deposit."] #[doc = ""] - #[doc = " However this is a `Vec` regardless to handle various edge cases that may occur at runtime"] - #[doc = " upgrade boundaries or if governance intervenes."] pub fn buffered_session_changes (& self ,) -> :: subxt :: storage :: address :: Address :: < :: subxt :: storage :: address :: StaticStorageMapKey , :: std :: vec :: Vec < runtime_types :: polkadot_runtime_parachains :: initializer :: BufferedSessionChange > , :: subxt :: storage :: address :: Yes , :: subxt :: storage :: address :: Yes , () >{ - ::subxt::storage::address::Address::new_static( - "Initializer", - "BufferedSessionChanges", - vec![], - [ - 176u8, 60u8, 165u8, 138u8, 99u8, 140u8, 22u8, 169u8, 121u8, 65u8, - 203u8, 85u8, 39u8, 198u8, 91u8, 167u8, 118u8, 49u8, 129u8, 128u8, - 171u8, 232u8, 249u8, 39u8, 6u8, 101u8, 57u8, 193u8, 85u8, 143u8, 105u8, - 29u8, - ], - ) - } - } - } - } - pub mod dmp { - use super::root_mod; - use super::runtime_types; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub struct TransactionApi; - impl TransactionApi {} - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " The downward messages addressed for a certain para."] - pub fn downward_message_queues( + #[doc = " TWOX-NOTE: SAFE since `AccountId` is a secure hash."] + pub fn queue( &self, - _0: impl ::std::borrow::Borrow, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec< - runtime_types::polkadot_core_primitives::InboundDownwardMessage< - ::core::primitive::u32, - >, - >, - ::subxt::storage::address::Yes, + ::core::primitive::u128, ::subxt::storage::address::Yes, + (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( - "Dmp", - "DownwardMessageQueues", + "FastUnstake", + "Queue", vec![::subxt::storage::address::make_static_storage_map_key( _0.borrow(), )], [ - 57u8, 115u8, 112u8, 195u8, 25u8, 43u8, 104u8, 199u8, 107u8, 238u8, - 93u8, 129u8, 141u8, 167u8, 167u8, 9u8, 85u8, 34u8, 53u8, 117u8, 148u8, - 246u8, 196u8, 46u8, 96u8, 114u8, 15u8, 88u8, 94u8, 40u8, 18u8, 31u8, + 250u8, 208u8, 88u8, 68u8, 8u8, 87u8, 27u8, 59u8, 120u8, 242u8, 79u8, + 54u8, 108u8, 15u8, 62u8, 143u8, 126u8, 66u8, 159u8, 159u8, 55u8, 212u8, + 190u8, 26u8, 171u8, 90u8, 156u8, 205u8, 173u8, 189u8, 230u8, 71u8, ], ) } - #[doc = " The downward messages addressed for a certain para."] - pub fn downward_message_queues_root( + #[doc = " The map of all accounts wishing to be unstaked."] + #[doc = ""] + #[doc = " Keeps track of `AccountId` wishing to unstake and it's corresponding deposit."] + #[doc = ""] + #[doc = " TWOX-NOTE: SAFE since `AccountId` is a secure hash."] + pub fn queue_root( &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec< - runtime_types::polkadot_core_primitives::InboundDownwardMessage< - ::core::primitive::u32, - >, - >, + ::core::primitive::u128, + (), (), - ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( - "Dmp", - "DownwardMessageQueues", + "FastUnstake", + "Queue", Vec::new(), [ - 57u8, 115u8, 112u8, 195u8, 25u8, 43u8, 104u8, 199u8, 107u8, 238u8, - 93u8, 129u8, 141u8, 167u8, 167u8, 9u8, 85u8, 34u8, 53u8, 117u8, 148u8, - 246u8, 196u8, 46u8, 96u8, 114u8, 15u8, 88u8, 94u8, 40u8, 18u8, 31u8, + 250u8, 208u8, 88u8, 68u8, 8u8, 87u8, 27u8, 59u8, 120u8, 242u8, 79u8, + 54u8, 108u8, 15u8, 62u8, 143u8, 126u8, 66u8, 159u8, 159u8, 55u8, 212u8, + 190u8, 26u8, 171u8, 90u8, 156u8, 205u8, 173u8, 189u8, 230u8, 71u8, ], ) } - #[doc = " A mapping that stores the downward message queue MQC head for each para."] - #[doc = ""] - #[doc = " Each link in this chain has a form:"] - #[doc = " `(prev_head, B, H(M))`, where"] - #[doc = " - `prev_head`: is the previous head hash or zero if none."] - #[doc = " - `B`: is the relay-chain block number in which a message was appended."] - #[doc = " - `H(M)`: is the hash of the message being appended."] - pub fn downward_message_queue_heads( + #[doc = "Counter for the related counted storage map"] + pub fn counter_for_queue( &self, - _0: impl ::std::borrow::Borrow, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - ::subxt::utils::H256, - ::subxt::storage::address::Yes, + ::core::primitive::u32, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, + (), > { ::subxt::storage::address::Address::new_static( - "Dmp", - "DownwardMessageQueueHeads", - vec![::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - )], + "FastUnstake", + "CounterForQueue", + vec![], [ - 137u8, 70u8, 108u8, 184u8, 177u8, 204u8, 17u8, 187u8, 250u8, 134u8, - 85u8, 18u8, 239u8, 185u8, 167u8, 224u8, 70u8, 18u8, 38u8, 245u8, 176u8, - 122u8, 254u8, 251u8, 204u8, 126u8, 34u8, 207u8, 163u8, 104u8, 103u8, - 38u8, + 241u8, 174u8, 224u8, 214u8, 204u8, 37u8, 117u8, 62u8, 114u8, 63u8, + 123u8, 121u8, 201u8, 128u8, 26u8, 60u8, 170u8, 24u8, 112u8, 5u8, 248u8, + 7u8, 143u8, 17u8, 150u8, 91u8, 23u8, 90u8, 237u8, 4u8, 138u8, 210u8, ], ) } - #[doc = " A mapping that stores the downward message queue MQC head for each para."] + #[doc = " Number of eras to check per block."] #[doc = ""] - #[doc = " Each link in this chain has a form:"] - #[doc = " `(prev_head, B, H(M))`, where"] - #[doc = " - `prev_head`: is the previous head hash or zero if none."] - #[doc = " - `B`: is the relay-chain block number in which a message was appended."] - #[doc = " - `H(M)`: is the hash of the message being appended."] - pub fn downward_message_queue_heads_root( + #[doc = " If set to 0, this pallet does absolutely nothing."] + #[doc = ""] + #[doc = " Based on the amount of weight available at `on_idle`, up to this many eras of a single"] + #[doc = " nominator might be checked."] + pub fn eras_to_check_per_block( &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - ::subxt::utils::H256, - (), + ::core::primitive::u32, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, + (), > { ::subxt::storage::address::Address::new_static( - "Dmp", - "DownwardMessageQueueHeads", - Vec::new(), - [ - 137u8, 70u8, 108u8, 184u8, 177u8, 204u8, 17u8, 187u8, 250u8, 134u8, - 85u8, 18u8, 239u8, 185u8, 167u8, 224u8, 70u8, 18u8, 38u8, 245u8, 176u8, - 122u8, 254u8, 251u8, 204u8, 126u8, 34u8, 207u8, 163u8, 104u8, 103u8, - 38u8, - ], - ) - } - } - } - } - pub mod ump { - use super::root_mod; - use super::runtime_types; - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub type Error = runtime_types::polkadot_runtime_parachains::ump::pallet::Error; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ServiceOverweight { - pub index: ::core::primitive::u64, - pub weight_limit: runtime_types::sp_weights::weight_v2::Weight, - } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Service a single overweight upward message."] - #[doc = ""] - #[doc = "- `origin`: Must pass `ExecuteOverweightOrigin`."] - #[doc = "- `index`: The index of the overweight message to service."] - #[doc = "- `weight_limit`: The amount of weight that message execution may take."] - #[doc = ""] - #[doc = "Errors:"] - #[doc = "- `UnknownMessageIndex`: Message of `index` is unknown."] - #[doc = "- `WeightOverLimit`: Message execution may use greater than `weight_limit`."] - #[doc = ""] - #[doc = "Events:"] - #[doc = "- `OverweightServiced`: On success."] - pub fn service_overweight( - &self, - index: ::core::primitive::u64, - weight_limit: runtime_types::sp_weights::weight_v2::Weight, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Ump", - "service_overweight", - ServiceOverweight { - index, - weight_limit, - }, + "FastUnstake", + "ErasToCheckPerBlock", + vec![], [ - 121u8, 236u8, 235u8, 23u8, 210u8, 238u8, 238u8, 122u8, 15u8, 86u8, - 34u8, 119u8, 105u8, 100u8, 214u8, 236u8, 117u8, 39u8, 254u8, 235u8, - 189u8, 15u8, 72u8, 74u8, 225u8, 134u8, 148u8, 126u8, 31u8, 203u8, - 144u8, 106u8, + 85u8, 55u8, 18u8, 11u8, 75u8, 176u8, 36u8, 253u8, 183u8, 250u8, 203u8, + 178u8, 201u8, 79u8, 101u8, 89u8, 51u8, 142u8, 254u8, 23u8, 49u8, 140u8, + 195u8, 116u8, 66u8, 124u8, 165u8, 161u8, 151u8, 174u8, 37u8, 51u8, ], ) } } } - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::polkadot_runtime_parachains::ump::pallet::Event; - pub mod events { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Upward message is invalid XCM."] - #[doc = "\\[ id \\]"] - pub struct InvalidFormat(pub [::core::primitive::u8; 32usize]); - impl ::subxt::events::StaticEvent for InvalidFormat { - const PALLET: &'static str = "Ump"; - const EVENT: &'static str = "InvalidFormat"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Upward message is unsupported version of XCM."] - #[doc = "\\[ id \\]"] - pub struct UnsupportedVersion(pub [::core::primitive::u8; 32usize]); - impl ::subxt::events::StaticEvent for UnsupportedVersion { - const PALLET: &'static str = "Ump"; - const EVENT: &'static str = "UnsupportedVersion"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Upward message executed with the given outcome."] - #[doc = "\\[ id, outcome \\]"] - pub struct ExecutedUpward( - pub [::core::primitive::u8; 32usize], - pub runtime_types::xcm::v2::traits::Outcome, - ); - impl ::subxt::events::StaticEvent for ExecutedUpward { - const PALLET: &'static str = "Ump"; - const EVENT: &'static str = "ExecutedUpward"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The weight limit for handling upward messages was reached."] - #[doc = "\\[ id, remaining, required \\]"] - pub struct WeightExhausted( - pub [::core::primitive::u8; 32usize], - pub runtime_types::sp_weights::weight_v2::Weight, - pub runtime_types::sp_weights::weight_v2::Weight, - ); - impl ::subxt::events::StaticEvent for WeightExhausted { - const PALLET: &'static str = "Ump"; - const EVENT: &'static str = "WeightExhausted"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Some upward messages have been received and will be processed."] - #[doc = "\\[ para, count, size \\]"] - pub struct UpwardMessagesReceived( - pub runtime_types::polkadot_parachain::primitives::Id, - pub ::core::primitive::u32, - pub ::core::primitive::u32, - ); - impl ::subxt::events::StaticEvent for UpwardMessagesReceived { - const PALLET: &'static str = "Ump"; - const EVENT: &'static str = "UpwardMessagesReceived"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The weight budget was exceeded for an individual upward message."] - #[doc = ""] - #[doc = "This message can be later dispatched manually using `service_overweight` dispatchable"] - #[doc = "using the assigned `overweight_index`."] - #[doc = ""] - #[doc = "\\[ para, id, overweight_index, required \\]"] - pub struct OverweightEnqueued( - pub runtime_types::polkadot_parachain::primitives::Id, - pub [::core::primitive::u8; 32usize], - pub ::core::primitive::u64, - pub runtime_types::sp_weights::weight_v2::Weight, - ); - impl ::subxt::events::StaticEvent for OverweightEnqueued { - const PALLET: &'static str = "Ump"; - const EVENT: &'static str = "OverweightEnqueued"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Upward message from the overweight queue was executed with the given actual weight"] - #[doc = "used."] - #[doc = ""] - #[doc = "\\[ overweight_index, used \\]"] - pub struct OverweightServiced( - pub ::core::primitive::u64, - pub runtime_types::sp_weights::weight_v2::Weight, - ); - impl ::subxt::events::StaticEvent for OverweightServiced { - const PALLET: &'static str = "Ump"; - const EVENT: &'static str = "OverweightServiced"; - } - } - pub mod storage { + pub mod constants { use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " The messages waiting to be handled by the relay-chain originating from a certain parachain."] - #[doc = ""] - #[doc = " Note that some upward messages might have been already processed by the inclusion logic. E.g."] - #[doc = " channel management messages."] - #[doc = ""] - #[doc = " The messages are processed in FIFO order."] - pub fn relay_dispatch_queues( - &self, - _0: impl ::std::borrow::Borrow, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Ump", - "RelayDispatchQueues", - vec![::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - )], - [ - 237u8, 72u8, 167u8, 6u8, 67u8, 106u8, 186u8, 191u8, 160u8, 9u8, 62u8, - 102u8, 229u8, 164u8, 100u8, 24u8, 202u8, 109u8, 90u8, 24u8, 192u8, - 233u8, 26u8, 239u8, 23u8, 127u8, 77u8, 191u8, 144u8, 14u8, 3u8, 141u8, - ], - ) - } - #[doc = " The messages waiting to be handled by the relay-chain originating from a certain parachain."] - #[doc = ""] - #[doc = " Note that some upward messages might have been already processed by the inclusion logic. E.g."] - #[doc = " channel management messages."] - #[doc = ""] - #[doc = " The messages are processed in FIFO order."] - pub fn relay_dispatch_queues_root( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Ump", - "RelayDispatchQueues", - Vec::new(), - [ - 237u8, 72u8, 167u8, 6u8, 67u8, 106u8, 186u8, 191u8, 160u8, 9u8, 62u8, - 102u8, 229u8, 164u8, 100u8, 24u8, 202u8, 109u8, 90u8, 24u8, 192u8, - 233u8, 26u8, 239u8, 23u8, 127u8, 77u8, 191u8, 144u8, 14u8, 3u8, 141u8, - ], - ) - } - #[doc = " Size of the dispatch queues. Caches sizes of the queues in `RelayDispatchQueue`."] - #[doc = ""] - #[doc = " First item in the tuple is the count of messages and second"] - #[doc = " is the total length (in bytes) of the message payloads."] - #[doc = ""] - #[doc = " Note that this is an auxiliary mapping: it's possible to tell the byte size and the number of"] - #[doc = " messages only looking at `RelayDispatchQueues`. This mapping is separate to avoid the cost of"] - #[doc = " loading the whole message queue if only the total size and count are required."] - #[doc = ""] - #[doc = " Invariant:"] - #[doc = " - The set of keys should exactly match the set of keys of `RelayDispatchQueues`."] - pub fn relay_dispatch_queue_size( - &self, - _0: impl ::std::borrow::Borrow, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - (::core::primitive::u32, ::core::primitive::u32), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Ump", - "RelayDispatchQueueSize", - vec![::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - )], - [ - 243u8, 120u8, 70u8, 2u8, 208u8, 105u8, 180u8, 25u8, 86u8, 219u8, 151u8, - 227u8, 233u8, 53u8, 151u8, 29u8, 231u8, 40u8, 84u8, 163u8, 71u8, 254u8, - 19u8, 47u8, 174u8, 63u8, 200u8, 173u8, 86u8, 199u8, 207u8, 138u8, - ], - ) - } - #[doc = " Size of the dispatch queues. Caches sizes of the queues in `RelayDispatchQueue`."] - #[doc = ""] - #[doc = " First item in the tuple is the count of messages and second"] - #[doc = " is the total length (in bytes) of the message payloads."] - #[doc = ""] - #[doc = " Note that this is an auxiliary mapping: it's possible to tell the byte size and the number of"] - #[doc = " messages only looking at `RelayDispatchQueues`. This mapping is separate to avoid the cost of"] - #[doc = " loading the whole message queue if only the total size and count are required."] - #[doc = ""] - #[doc = " Invariant:"] - #[doc = " - The set of keys should exactly match the set of keys of `RelayDispatchQueues`."] - pub fn relay_dispatch_queue_size_root( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - (::core::primitive::u32, ::core::primitive::u32), - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Ump", - "RelayDispatchQueueSize", - Vec::new(), - [ - 243u8, 120u8, 70u8, 2u8, 208u8, 105u8, 180u8, 25u8, 86u8, 219u8, 151u8, - 227u8, 233u8, 53u8, 151u8, 29u8, 231u8, 40u8, 84u8, 163u8, 71u8, 254u8, - 19u8, 47u8, 174u8, 63u8, 200u8, 173u8, 86u8, 199u8, 207u8, 138u8, - ], - ) - } - #[doc = " The ordered list of `ParaId`s that have a `RelayDispatchQueue` entry."] - #[doc = ""] - #[doc = " Invariant:"] - #[doc = " - The set of items from this vector should be exactly the set of the keys in"] - #[doc = " `RelayDispatchQueues` and `RelayDispatchQueueSize`."] - pub fn needs_dispatch( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Ump", - "NeedsDispatch", - vec![], - [ - 176u8, 94u8, 152u8, 112u8, 46u8, 124u8, 89u8, 29u8, 92u8, 104u8, 192u8, - 58u8, 59u8, 186u8, 81u8, 150u8, 157u8, 61u8, 235u8, 182u8, 222u8, - 127u8, 109u8, 11u8, 104u8, 175u8, 141u8, 219u8, 15u8, 152u8, 255u8, - 40u8, - ], - ) - } - #[doc = " This is the para that gets will get dispatched first during the next upward dispatchable queue"] - #[doc = " execution round."] - #[doc = ""] - #[doc = " Invariant:"] - #[doc = " - If `Some(para)`, then `para` must be present in `NeedsDispatch`."] - pub fn next_dispatch_round_start_with( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_parachain::primitives::Id, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "Ump", - "NextDispatchRoundStartWith", - vec![], - [ - 157u8, 221u8, 6u8, 175u8, 61u8, 99u8, 250u8, 30u8, 177u8, 53u8, 37u8, - 191u8, 138u8, 65u8, 251u8, 216u8, 37u8, 84u8, 246u8, 76u8, 8u8, 29u8, - 18u8, 253u8, 143u8, 75u8, 129u8, 141u8, 48u8, 178u8, 135u8, 197u8, - ], - ) - } - #[doc = " The messages that exceeded max individual message weight budget."] - #[doc = ""] - #[doc = " These messages stay there until manually dispatched."] - pub fn overweight( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u64>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ( - runtime_types::polkadot_parachain::primitives::Id, - ::std::vec::Vec<::core::primitive::u8>, - ), - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Ump", - "Overweight", - vec![::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - )], - [ - 49u8, 4u8, 221u8, 218u8, 249u8, 183u8, 49u8, 198u8, 48u8, 42u8, 110u8, - 67u8, 47u8, 50u8, 181u8, 141u8, 184u8, 47u8, 114u8, 3u8, 232u8, 132u8, - 32u8, 201u8, 13u8, 213u8, 175u8, 236u8, 111u8, 87u8, 146u8, 212u8, - ], - ) - } - #[doc = " The messages that exceeded max individual message weight budget."] - #[doc = ""] - #[doc = " These messages stay there until manually dispatched."] - pub fn overweight_root( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ( - runtime_types::polkadot_parachain::primitives::Id, - ::std::vec::Vec<::core::primitive::u8>, - ), - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Ump", - "Overweight", - Vec::new(), - [ - 49u8, 4u8, 221u8, 218u8, 249u8, 183u8, 49u8, 198u8, 48u8, 42u8, 110u8, - 67u8, 47u8, 50u8, 181u8, 141u8, 184u8, 47u8, 114u8, 3u8, 232u8, 132u8, - 32u8, 201u8, 13u8, 213u8, 175u8, 236u8, 111u8, 87u8, 146u8, 212u8, - ], - ) - } - #[doc = " The number of overweight messages ever recorded in `Overweight` (and thus the lowest free"] - #[doc = " index)."] - pub fn overweight_count( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u64, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Ump", - "OverweightCount", - vec![], + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " Deposit to take for unstaking, to make sure we're able to slash the it in order to cover"] + #[doc = " the costs of resources on unsuccessful unstake."] + pub fn deposit(&self) -> ::subxt::constants::Address<::core::primitive::u128> { + ::subxt::constants::Address::new_static( + "FastUnstake", + "Deposit", [ - 102u8, 180u8, 196u8, 148u8, 115u8, 62u8, 46u8, 238u8, 97u8, 116u8, - 117u8, 42u8, 14u8, 5u8, 72u8, 237u8, 230u8, 46u8, 150u8, 126u8, 89u8, - 64u8, 233u8, 166u8, 180u8, 137u8, 52u8, 233u8, 252u8, 255u8, 36u8, - 20u8, + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, + 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, ], ) } } } } - pub mod hrmp { + pub mod parachains_origin { + use super::root_mod; + use super::runtime_types; + } + pub mod configuration { use super::root_mod; use super::runtime_types; #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub type Error = runtime_types::polkadot_runtime_parachains::hrmp::pallet::Error; + pub type Error = runtime_types::polkadot_runtime_parachains::configuration::pallet::Error; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub mod calls { use super::root_mod; use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct HrmpInitOpenChannel { - pub recipient: runtime_types::polkadot_parachain::primitives::Id, - pub proposed_max_capacity: ::core::primitive::u32, - pub proposed_max_message_size: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct HrmpAcceptOpenChannel { - pub sender: runtime_types::polkadot_parachain::primitives::Id, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetValidationUpgradeCooldown { + pub new: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetValidationUpgradeDelay { + pub new: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetCodeRetentionPeriod { + pub new: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetMaxCodeSize { + pub new: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetMaxPovSize { + pub new: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetMaxHeadDataSize { + pub new: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetParathreadCores { + pub new: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetParathreadRetries { + pub new: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetGroupRotationFrequency { + pub new: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetChainAvailabilityPeriod { + pub new: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetThreadAvailabilityPeriod { + pub new: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetSchedulingLookahead { + pub new: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetMaxValidatorsPerCore { + pub new: ::core::option::Option<::core::primitive::u32>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetMaxValidators { + pub new: ::core::option::Option<::core::primitive::u32>, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetDisputePeriod { + pub new: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetDisputePostConclusionAcceptancePeriod { + pub new: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetNoShowSlots { + pub new: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetNDelayTranches { + pub new: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetZerothDelayTrancheWidth { + pub new: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetNeededApprovals { + pub new: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetRelayVrfModuloSamples { + pub new: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetMaxUpwardQueueCount { + pub new: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetMaxUpwardQueueSize { + pub new: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetMaxDownwardMessageSize { + pub new: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetUmpServiceTotalWeight { + pub new: runtime_types::sp_weights::weight_v2::Weight, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetMaxUpwardMessageSize { + pub new: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetMaxUpwardMessageNumPerCandidate { + pub new: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetHrmpOpenRequestTtl { + pub new: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetHrmpSenderDeposit { + pub new: ::core::primitive::u128, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetHrmpRecipientDeposit { + pub new: ::core::primitive::u128, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetHrmpChannelMaxCapacity { + pub new: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetHrmpChannelMaxTotalSize { + pub new: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetHrmpMaxParachainInboundChannels { + pub new: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetHrmpMaxParathreadInboundChannels { + pub new: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetHrmpChannelMaxMessageSize { + pub new: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetHrmpMaxParachainOutboundChannels { + pub new: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetHrmpMaxParathreadOutboundChannels { + pub new: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetHrmpMaxMessageNumPerCandidate { + pub new: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetUmpMaxIndividualWeight { + pub new: runtime_types::sp_weights::weight_v2::Weight, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetPvfCheckingEnabled { + pub new: ::core::primitive::bool, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetPvfVotingTtl { + pub new: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetMinimumValidationUpgradeDelay { + pub new: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetBypassConsistencyCheck { + pub new: ::core::primitive::bool, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetAsyncBackingParams { + pub new: runtime_types::polkadot_primitives::vstaging::AsyncBackingParams, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetExecutorParams { + pub new: + runtime_types::polkadot_primitives::v4::executor_params::ExecutorParams, + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Set the validation upgrade cooldown."] + pub fn set_validation_upgrade_cooldown( + &self, + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_validation_upgrade_cooldown", + types::SetValidationUpgradeCooldown { new }, + [ + 109u8, 185u8, 0u8, 59u8, 177u8, 198u8, 76u8, 90u8, 108u8, 190u8, 56u8, + 126u8, 147u8, 110u8, 76u8, 111u8, 38u8, 200u8, 230u8, 144u8, 42u8, + 167u8, 175u8, 220u8, 102u8, 37u8, 60u8, 10u8, 118u8, 79u8, 146u8, + 203u8, + ], + ) + } + #[doc = "Set the validation upgrade delay."] + pub fn set_validation_upgrade_delay( + &self, + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_validation_upgrade_delay", + types::SetValidationUpgradeDelay { new }, + [ + 18u8, 130u8, 158u8, 253u8, 160u8, 194u8, 220u8, 120u8, 9u8, 68u8, + 232u8, 176u8, 34u8, 81u8, 200u8, 236u8, 141u8, 139u8, 62u8, 110u8, + 76u8, 9u8, 218u8, 69u8, 55u8, 2u8, 233u8, 109u8, 83u8, 117u8, 141u8, + 253u8, + ], + ) + } + #[doc = "Set the acceptance period for an included candidate."] + pub fn set_code_retention_period( + &self, + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_code_retention_period", + types::SetCodeRetentionPeriod { new }, + [ + 221u8, 140u8, 253u8, 111u8, 64u8, 236u8, 93u8, 52u8, 214u8, 245u8, + 178u8, 30u8, 77u8, 166u8, 242u8, 252u8, 203u8, 106u8, 12u8, 195u8, + 27u8, 159u8, 96u8, 197u8, 145u8, 69u8, 241u8, 59u8, 74u8, 220u8, 62u8, + 205u8, + ], + ) + } + #[doc = "Set the max validation code size for incoming upgrades."] + pub fn set_max_code_size( + &self, + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_max_code_size", + types::SetMaxCodeSize { new }, + [ + 232u8, 106u8, 45u8, 195u8, 27u8, 162u8, 188u8, 213u8, 137u8, 13u8, + 123u8, 89u8, 215u8, 141u8, 231u8, 82u8, 205u8, 215u8, 73u8, 142u8, + 115u8, 109u8, 132u8, 118u8, 194u8, 211u8, 82u8, 20u8, 75u8, 55u8, + 218u8, 46u8, + ], + ) + } + #[doc = "Set the max POV block size for incoming upgrades."] + pub fn set_max_pov_size( + &self, + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_max_pov_size", + types::SetMaxPovSize { new }, + [ + 15u8, 176u8, 13u8, 19u8, 177u8, 160u8, 211u8, 238u8, 29u8, 194u8, + 187u8, 235u8, 244u8, 65u8, 158u8, 47u8, 102u8, 221u8, 95u8, 10u8, 21u8, + 33u8, 219u8, 234u8, 82u8, 122u8, 75u8, 53u8, 14u8, 126u8, 218u8, 23u8, + ], + ) + } + #[doc = "Set the max head data size for paras."] + pub fn set_max_head_data_size( + &self, + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_max_head_data_size", + types::SetMaxHeadDataSize { new }, + [ + 219u8, 128u8, 213u8, 65u8, 190u8, 224u8, 87u8, 80u8, 172u8, 112u8, + 160u8, 229u8, 52u8, 1u8, 189u8, 125u8, 177u8, 139u8, 103u8, 39u8, 21u8, + 125u8, 62u8, 177u8, 74u8, 25u8, 41u8, 11u8, 200u8, 79u8, 139u8, 171u8, + ], + ) + } + #[doc = "Set the number of parathread execution cores."] + pub fn set_parathread_cores( + &self, + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_parathread_cores", + types::SetParathreadCores { new }, + [ + 155u8, 102u8, 168u8, 202u8, 236u8, 87u8, 16u8, 128u8, 141u8, 99u8, + 154u8, 162u8, 216u8, 198u8, 236u8, 233u8, 104u8, 230u8, 137u8, 132u8, + 41u8, 106u8, 167u8, 81u8, 195u8, 172u8, 107u8, 28u8, 138u8, 254u8, + 180u8, 61u8, + ], + ) + } + #[doc = "Set the number of retries for a particular parathread."] + pub fn set_parathread_retries( + &self, + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_parathread_retries", + types::SetParathreadRetries { new }, + [ + 192u8, 81u8, 152u8, 41u8, 40u8, 3u8, 251u8, 205u8, 244u8, 133u8, 42u8, + 197u8, 21u8, 221u8, 80u8, 196u8, 222u8, 69u8, 153u8, 39u8, 161u8, 90u8, + 4u8, 38u8, 167u8, 131u8, 237u8, 42u8, 135u8, 37u8, 156u8, 108u8, + ], + ) + } + #[doc = "Set the parachain validator-group rotation frequency"] + pub fn set_group_rotation_frequency( + &self, + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_group_rotation_frequency", + types::SetGroupRotationFrequency { new }, + [ + 205u8, 222u8, 129u8, 36u8, 136u8, 186u8, 114u8, 70u8, 214u8, 22u8, + 112u8, 65u8, 56u8, 42u8, 103u8, 93u8, 108u8, 242u8, 188u8, 229u8, + 150u8, 19u8, 12u8, 222u8, 25u8, 254u8, 48u8, 218u8, 200u8, 208u8, + 132u8, 251u8, + ], + ) + } + #[doc = "Set the availability period for parachains."] + pub fn set_chain_availability_period( + &self, + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_chain_availability_period", + types::SetChainAvailabilityPeriod { new }, + [ + 171u8, 21u8, 54u8, 241u8, 19u8, 100u8, 54u8, 143u8, 97u8, 191u8, 193u8, + 96u8, 7u8, 86u8, 255u8, 109u8, 255u8, 93u8, 113u8, 28u8, 182u8, 75u8, + 120u8, 208u8, 91u8, 125u8, 156u8, 38u8, 56u8, 230u8, 24u8, 139u8, + ], + ) + } + #[doc = "Set the availability period for parathreads."] + pub fn set_thread_availability_period( + &self, + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_thread_availability_period", + types::SetThreadAvailabilityPeriod { new }, + [ + 208u8, 27u8, 246u8, 33u8, 90u8, 200u8, 75u8, 177u8, 19u8, 107u8, 236u8, + 43u8, 159u8, 156u8, 184u8, 10u8, 146u8, 71u8, 212u8, 129u8, 44u8, 19u8, + 162u8, 172u8, 162u8, 46u8, 166u8, 10u8, 67u8, 112u8, 206u8, 50u8, + ], + ) + } + #[doc = "Set the scheduling lookahead, in expected number of blocks at peak throughput."] + pub fn set_scheduling_lookahead( + &self, + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_scheduling_lookahead", + types::SetSchedulingLookahead { new }, + [ + 220u8, 74u8, 0u8, 150u8, 45u8, 29u8, 56u8, 210u8, 66u8, 12u8, 119u8, + 176u8, 103u8, 24u8, 216u8, 55u8, 211u8, 120u8, 233u8, 204u8, 167u8, + 100u8, 199u8, 157u8, 186u8, 174u8, 40u8, 218u8, 19u8, 230u8, 253u8, + 7u8, + ], + ) + } + #[doc = "Set the maximum number of validators to assign to any core."] + pub fn set_max_validators_per_core( + &self, + new: ::core::option::Option<::core::primitive::u32>, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_max_validators_per_core", + types::SetMaxValidatorsPerCore { new }, + [ + 227u8, 113u8, 192u8, 116u8, 114u8, 171u8, 27u8, 22u8, 84u8, 117u8, + 146u8, 152u8, 94u8, 101u8, 14u8, 52u8, 228u8, 170u8, 163u8, 82u8, + 248u8, 130u8, 32u8, 103u8, 225u8, 151u8, 145u8, 36u8, 98u8, 158u8, 6u8, + 245u8, + ], + ) + } + #[doc = "Set the maximum number of validators to use in parachain consensus."] + pub fn set_max_validators( + &self, + new: ::core::option::Option<::core::primitive::u32>, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_max_validators", + types::SetMaxValidators { new }, + [ + 143u8, 212u8, 59u8, 147u8, 4u8, 55u8, 142u8, 209u8, 237u8, 76u8, 7u8, + 178u8, 41u8, 81u8, 4u8, 203u8, 184u8, 149u8, 32u8, 1u8, 106u8, 180u8, + 121u8, 20u8, 137u8, 169u8, 144u8, 77u8, 38u8, 53u8, 243u8, 127u8, + ], + ) + } + #[doc = "Set the dispute period, in number of sessions to keep for disputes."] + pub fn set_dispute_period( + &self, + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_dispute_period", + types::SetDisputePeriod { new }, + [ + 36u8, 191u8, 142u8, 240u8, 48u8, 101u8, 10u8, 197u8, 117u8, 125u8, + 156u8, 189u8, 130u8, 77u8, 242u8, 130u8, 205u8, 154u8, 152u8, 47u8, + 75u8, 56u8, 63u8, 61u8, 33u8, 163u8, 151u8, 97u8, 105u8, 99u8, 55u8, + 180u8, + ], + ) + } + #[doc = "Set the dispute post conclusion acceptance period."] + pub fn set_dispute_post_conclusion_acceptance_period( + &self, + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload + { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_dispute_post_conclusion_acceptance_period", + types::SetDisputePostConclusionAcceptancePeriod { new }, + [ + 66u8, 56u8, 45u8, 87u8, 51u8, 49u8, 91u8, 95u8, 255u8, 185u8, 54u8, + 165u8, 85u8, 142u8, 238u8, 251u8, 174u8, 81u8, 3u8, 61u8, 92u8, 97u8, + 203u8, 20u8, 107u8, 50u8, 208u8, 250u8, 208u8, 159u8, 225u8, 175u8, + ], + ) + } + #[doc = "Set the no show slots, in number of number of consensus slots."] + #[doc = "Must be at least 1."] + pub fn set_no_show_slots( + &self, + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_no_show_slots", + types::SetNoShowSlots { new }, + [ + 94u8, 230u8, 89u8, 131u8, 188u8, 246u8, 251u8, 34u8, 249u8, 16u8, + 134u8, 63u8, 238u8, 115u8, 19u8, 97u8, 97u8, 218u8, 238u8, 115u8, + 126u8, 140u8, 236u8, 17u8, 177u8, 192u8, 210u8, 239u8, 126u8, 107u8, + 117u8, 207u8, + ], + ) + } + #[doc = "Set the total number of delay tranches."] + pub fn set_n_delay_tranches( + &self, + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_n_delay_tranches", + types::SetNDelayTranches { new }, + [ + 195u8, 168u8, 178u8, 51u8, 20u8, 107u8, 227u8, 236u8, 57u8, 30u8, + 130u8, 93u8, 149u8, 2u8, 161u8, 66u8, 48u8, 37u8, 71u8, 108u8, 195u8, + 65u8, 153u8, 30u8, 181u8, 181u8, 158u8, 252u8, 120u8, 119u8, 36u8, + 146u8, + ], + ) + } + #[doc = "Set the zeroth delay tranche width."] + pub fn set_zeroth_delay_tranche_width( + &self, + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_zeroth_delay_tranche_width", + types::SetZerothDelayTrancheWidth { new }, + [ + 69u8, 56u8, 125u8, 24u8, 181u8, 62u8, 99u8, 92u8, 166u8, 107u8, 91u8, + 134u8, 230u8, 128u8, 214u8, 135u8, 245u8, 64u8, 62u8, 78u8, 96u8, + 231u8, 195u8, 29u8, 158u8, 113u8, 46u8, 96u8, 29u8, 0u8, 154u8, 80u8, + ], + ) + } + #[doc = "Set the number of validators needed to approve a block."] + pub fn set_needed_approvals( + &self, + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_needed_approvals", + types::SetNeededApprovals { new }, + [ + 238u8, 55u8, 134u8, 30u8, 67u8, 153u8, 150u8, 5u8, 226u8, 227u8, 185u8, + 188u8, 66u8, 60u8, 147u8, 118u8, 46u8, 174u8, 104u8, 100u8, 26u8, + 162u8, 65u8, 58u8, 162u8, 52u8, 211u8, 66u8, 242u8, 177u8, 230u8, 98u8, + ], + ) + } + #[doc = "Set the number of samples to do of the `RelayVRFModulo` approval assignment criterion."] + pub fn set_relay_vrf_modulo_samples( + &self, + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_relay_vrf_modulo_samples", + types::SetRelayVrfModuloSamples { new }, + [ + 76u8, 101u8, 207u8, 184u8, 211u8, 8u8, 43u8, 4u8, 165u8, 147u8, 166u8, + 3u8, 189u8, 42u8, 125u8, 130u8, 21u8, 43u8, 189u8, 120u8, 239u8, 131u8, + 235u8, 35u8, 151u8, 15u8, 30u8, 81u8, 0u8, 2u8, 64u8, 21u8, + ], + ) + } + #[doc = "Sets the maximum items that can present in a upward dispatch queue at once."] + pub fn set_max_upward_queue_count( + &self, + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_max_upward_queue_count", + types::SetMaxUpwardQueueCount { new }, + [ + 116u8, 186u8, 216u8, 17u8, 150u8, 187u8, 86u8, 154u8, 92u8, 122u8, + 178u8, 167u8, 215u8, 165u8, 55u8, 86u8, 229u8, 114u8, 10u8, 149u8, + 50u8, 183u8, 165u8, 32u8, 233u8, 105u8, 82u8, 177u8, 120u8, 25u8, 44u8, + 130u8, + ], + ) + } + #[doc = "Sets the maximum total size of items that can present in a upward dispatch queue at once."] + pub fn set_max_upward_queue_size( + &self, + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_max_upward_queue_size", + types::SetMaxUpwardQueueSize { new }, + [ + 18u8, 60u8, 141u8, 57u8, 134u8, 96u8, 140u8, 85u8, 137u8, 9u8, 209u8, + 123u8, 10u8, 165u8, 33u8, 184u8, 34u8, 82u8, 59u8, 60u8, 30u8, 47u8, + 22u8, 163u8, 119u8, 200u8, 197u8, 192u8, 112u8, 243u8, 156u8, 12u8, + ], + ) + } + #[doc = "Set the critical downward message size."] + pub fn set_max_downward_message_size( + &self, + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_max_downward_message_size", + types::SetMaxDownwardMessageSize { new }, + [ + 104u8, 25u8, 229u8, 184u8, 53u8, 246u8, 206u8, 180u8, 13u8, 156u8, + 14u8, 224u8, 215u8, 115u8, 104u8, 127u8, 167u8, 189u8, 239u8, 183u8, + 68u8, 124u8, 55u8, 211u8, 186u8, 115u8, 70u8, 195u8, 61u8, 151u8, 32u8, + 218u8, + ], + ) + } + #[doc = "Sets the soft limit for the phase of dispatching dispatchable upward messages."] + pub fn set_ump_service_total_weight( + &self, + new: runtime_types::sp_weights::weight_v2::Weight, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_ump_service_total_weight", + types::SetUmpServiceTotalWeight { new }, + [ + 178u8, 63u8, 233u8, 183u8, 160u8, 109u8, 10u8, 162u8, 150u8, 110u8, + 66u8, 166u8, 197u8, 207u8, 91u8, 208u8, 137u8, 106u8, 140u8, 184u8, + 35u8, 85u8, 138u8, 49u8, 32u8, 15u8, 150u8, 136u8, 50u8, 197u8, 21u8, + 99u8, + ], + ) + } + #[doc = "Sets the maximum size of an upward message that can be sent by a candidate."] + pub fn set_max_upward_message_size( + &self, + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_max_upward_message_size", + types::SetMaxUpwardMessageSize { new }, + [ + 213u8, 120u8, 21u8, 247u8, 101u8, 21u8, 164u8, 228u8, 33u8, 115u8, + 20u8, 138u8, 28u8, 174u8, 247u8, 39u8, 194u8, 113u8, 34u8, 73u8, 142u8, + 94u8, 116u8, 151u8, 113u8, 92u8, 151u8, 227u8, 116u8, 250u8, 101u8, + 179u8, + ], + ) + } + #[doc = "Sets the maximum number of messages that a candidate can contain."] + pub fn set_max_upward_message_num_per_candidate( + &self, + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload + { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_max_upward_message_num_per_candidate", + types::SetMaxUpwardMessageNumPerCandidate { new }, + [ + 54u8, 133u8, 226u8, 138u8, 184u8, 27u8, 130u8, 153u8, 130u8, 196u8, + 54u8, 79u8, 124u8, 10u8, 37u8, 139u8, 59u8, 190u8, 169u8, 87u8, 255u8, + 211u8, 38u8, 142u8, 37u8, 74u8, 144u8, 204u8, 75u8, 94u8, 154u8, 149u8, + ], + ) + } + #[doc = "Sets the number of sessions after which an HRMP open channel request expires."] + pub fn set_hrmp_open_request_ttl( + &self, + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_hrmp_open_request_ttl", + types::SetHrmpOpenRequestTtl { new }, + [ + 192u8, 113u8, 113u8, 133u8, 197u8, 75u8, 88u8, 67u8, 130u8, 207u8, + 37u8, 192u8, 157u8, 159u8, 114u8, 75u8, 83u8, 180u8, 194u8, 180u8, + 96u8, 129u8, 7u8, 138u8, 110u8, 14u8, 229u8, 98u8, 71u8, 22u8, 229u8, + 247u8, + ], + ) + } + #[doc = "Sets the amount of funds that the sender should provide for opening an HRMP channel."] + pub fn set_hrmp_sender_deposit( + &self, + new: ::core::primitive::u128, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_hrmp_sender_deposit", + types::SetHrmpSenderDeposit { new }, + [ + 49u8, 38u8, 173u8, 114u8, 66u8, 140u8, 15u8, 151u8, 193u8, 54u8, 128u8, + 108u8, 72u8, 71u8, 28u8, 65u8, 129u8, 199u8, 105u8, 61u8, 96u8, 119u8, + 16u8, 53u8, 115u8, 120u8, 152u8, 122u8, 182u8, 171u8, 233u8, 48u8, + ], + ) + } + #[doc = "Sets the amount of funds that the recipient should provide for accepting opening an HRMP"] + #[doc = "channel."] + pub fn set_hrmp_recipient_deposit( + &self, + new: ::core::primitive::u128, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_hrmp_recipient_deposit", + types::SetHrmpRecipientDeposit { new }, + [ + 209u8, 212u8, 164u8, 56u8, 71u8, 215u8, 98u8, 250u8, 202u8, 150u8, + 228u8, 6u8, 166u8, 94u8, 171u8, 142u8, 10u8, 253u8, 89u8, 43u8, 6u8, + 173u8, 8u8, 235u8, 52u8, 18u8, 78u8, 129u8, 227u8, 61u8, 74u8, 83u8, + ], + ) + } + #[doc = "Sets the maximum number of messages allowed in an HRMP channel at once."] + pub fn set_hrmp_channel_max_capacity( + &self, + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_hrmp_channel_max_capacity", + types::SetHrmpChannelMaxCapacity { new }, + [ + 148u8, 109u8, 67u8, 220u8, 1u8, 115u8, 70u8, 93u8, 138u8, 190u8, 60u8, + 220u8, 80u8, 137u8, 246u8, 230u8, 115u8, 162u8, 30u8, 197u8, 11u8, + 33u8, 211u8, 224u8, 49u8, 165u8, 149u8, 155u8, 197u8, 44u8, 6u8, 167u8, + ], + ) + } + #[doc = "Sets the maximum total size of messages in bytes allowed in an HRMP channel at once."] + pub fn set_hrmp_channel_max_total_size( + &self, + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_hrmp_channel_max_total_size", + types::SetHrmpChannelMaxTotalSize { new }, + [ + 79u8, 40u8, 207u8, 173u8, 168u8, 143u8, 130u8, 240u8, 205u8, 34u8, + 61u8, 217u8, 215u8, 106u8, 61u8, 181u8, 8u8, 21u8, 105u8, 64u8, 183u8, + 235u8, 39u8, 133u8, 70u8, 77u8, 233u8, 201u8, 222u8, 8u8, 43u8, 159u8, + ], + ) + } + #[doc = "Sets the maximum number of inbound HRMP channels a parachain is allowed to accept."] + pub fn set_hrmp_max_parachain_inbound_channels( + &self, + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload + { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_hrmp_max_parachain_inbound_channels", + types::SetHrmpMaxParachainInboundChannels { new }, + [ + 91u8, 215u8, 212u8, 131u8, 140u8, 185u8, 119u8, 184u8, 61u8, 121u8, + 120u8, 73u8, 202u8, 98u8, 124u8, 187u8, 171u8, 84u8, 136u8, 77u8, + 103u8, 169u8, 185u8, 8u8, 214u8, 214u8, 23u8, 195u8, 100u8, 72u8, 45u8, + 12u8, + ], + ) + } + #[doc = "Sets the maximum number of inbound HRMP channels a parathread is allowed to accept."] + pub fn set_hrmp_max_parathread_inbound_channels( + &self, + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload + { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_hrmp_max_parathread_inbound_channels", + types::SetHrmpMaxParathreadInboundChannels { new }, + [ + 209u8, 66u8, 180u8, 20u8, 87u8, 242u8, 219u8, 71u8, 22u8, 145u8, 220u8, + 48u8, 44u8, 42u8, 77u8, 69u8, 255u8, 82u8, 27u8, 125u8, 231u8, 111u8, + 23u8, 32u8, 239u8, 28u8, 200u8, 255u8, 91u8, 207u8, 99u8, 107u8, + ], + ) + } + #[doc = "Sets the maximum size of a message that could ever be put into an HRMP channel."] + pub fn set_hrmp_channel_max_message_size( + &self, + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_hrmp_channel_max_message_size", + types::SetHrmpChannelMaxMessageSize { new }, + [ + 17u8, 224u8, 230u8, 9u8, 114u8, 221u8, 138u8, 46u8, 234u8, 151u8, 27u8, + 34u8, 179u8, 67u8, 113u8, 228u8, 128u8, 212u8, 209u8, 125u8, 122u8, + 1u8, 79u8, 28u8, 10u8, 14u8, 83u8, 65u8, 253u8, 173u8, 116u8, 209u8, + ], + ) + } + #[doc = "Sets the maximum number of outbound HRMP channels a parachain is allowed to open."] + pub fn set_hrmp_max_parachain_outbound_channels( + &self, + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload + { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_hrmp_max_parachain_outbound_channels", + types::SetHrmpMaxParachainOutboundChannels { new }, + [ + 26u8, 146u8, 150u8, 88u8, 236u8, 8u8, 63u8, 103u8, 71u8, 11u8, 20u8, + 210u8, 205u8, 106u8, 101u8, 112u8, 116u8, 73u8, 116u8, 136u8, 149u8, + 181u8, 207u8, 95u8, 151u8, 7u8, 98u8, 17u8, 224u8, 157u8, 117u8, 88u8, + ], + ) + } + #[doc = "Sets the maximum number of outbound HRMP channels a parathread is allowed to open."] + pub fn set_hrmp_max_parathread_outbound_channels( + &self, + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload + { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_hrmp_max_parathread_outbound_channels", + types::SetHrmpMaxParathreadOutboundChannels { new }, + [ + 31u8, 72u8, 93u8, 21u8, 180u8, 156u8, 101u8, 24u8, 145u8, 220u8, 194u8, + 93u8, 176u8, 164u8, 53u8, 123u8, 36u8, 113u8, 152u8, 13u8, 222u8, 54u8, + 175u8, 170u8, 235u8, 68u8, 236u8, 130u8, 178u8, 56u8, 140u8, 31u8, + ], + ) + } + #[doc = "Sets the maximum number of outbound HRMP messages can be sent by a candidate."] + pub fn set_hrmp_max_message_num_per_candidate( + &self, + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_hrmp_max_message_num_per_candidate", + types::SetHrmpMaxMessageNumPerCandidate { new }, + [ + 244u8, 94u8, 225u8, 194u8, 133u8, 116u8, 202u8, 238u8, 8u8, 57u8, + 122u8, 125u8, 6u8, 131u8, 84u8, 102u8, 180u8, 67u8, 250u8, 136u8, 30u8, + 29u8, 110u8, 105u8, 219u8, 166u8, 91u8, 140u8, 44u8, 192u8, 37u8, + 185u8, + ], + ) + } + #[doc = "Sets the maximum amount of weight any individual upward message may consume."] + pub fn set_ump_max_individual_weight( + &self, + new: runtime_types::sp_weights::weight_v2::Weight, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_ump_max_individual_weight", + types::SetUmpMaxIndividualWeight { new }, + [ + 66u8, 190u8, 15u8, 172u8, 67u8, 16u8, 117u8, 247u8, 176u8, 25u8, 163u8, + 130u8, 147u8, 224u8, 226u8, 101u8, 219u8, 173u8, 176u8, 49u8, 90u8, + 133u8, 12u8, 223u8, 220u8, 18u8, 83u8, 232u8, 137u8, 52u8, 206u8, 71u8, + ], + ) + } + #[doc = "Enable or disable PVF pre-checking. Consult the field documentation prior executing."] + pub fn set_pvf_checking_enabled( + &self, + new: ::core::primitive::bool, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_pvf_checking_enabled", + types::SetPvfCheckingEnabled { new }, + [ + 123u8, 76u8, 1u8, 112u8, 174u8, 245u8, 18u8, 67u8, 13u8, 29u8, 219u8, + 197u8, 201u8, 112u8, 230u8, 191u8, 37u8, 148u8, 73u8, 125u8, 54u8, + 236u8, 3u8, 80u8, 114u8, 155u8, 244u8, 132u8, 57u8, 63u8, 158u8, 248u8, + ], + ) + } + #[doc = "Set the number of session changes after which a PVF pre-checking voting is rejected."] + pub fn set_pvf_voting_ttl( + &self, + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_pvf_voting_ttl", + types::SetPvfVotingTtl { new }, + [ + 17u8, 11u8, 98u8, 217u8, 208u8, 102u8, 238u8, 83u8, 118u8, 123u8, 20u8, + 18u8, 46u8, 212u8, 21u8, 164u8, 61u8, 104u8, 208u8, 204u8, 91u8, 210u8, + 40u8, 6u8, 201u8, 147u8, 46u8, 166u8, 219u8, 227u8, 121u8, 187u8, + ], + ) + } + #[doc = "Sets the minimum delay between announcing the upgrade block for a parachain until the"] + #[doc = "upgrade taking place."] + #[doc = ""] + #[doc = "See the field documentation for information and constraints for the new value."] + pub fn set_minimum_validation_upgrade_delay( + &self, + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_minimum_validation_upgrade_delay", + types::SetMinimumValidationUpgradeDelay { new }, + [ + 205u8, 188u8, 75u8, 136u8, 228u8, 26u8, 112u8, 27u8, 119u8, 37u8, + 252u8, 109u8, 23u8, 145u8, 21u8, 212u8, 7u8, 28u8, 242u8, 210u8, 182u8, + 111u8, 121u8, 109u8, 50u8, 130u8, 46u8, 127u8, 122u8, 40u8, 141u8, + 242u8, + ], + ) + } + #[doc = "Setting this to true will disable consistency checks for the configuration setters."] + #[doc = "Use with caution."] + pub fn set_bypass_consistency_check( + &self, + new: ::core::primitive::bool, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_bypass_consistency_check", + types::SetBypassConsistencyCheck { new }, + [ + 80u8, 66u8, 200u8, 98u8, 54u8, 207u8, 64u8, 99u8, 162u8, 121u8, 26u8, + 173u8, 113u8, 224u8, 240u8, 106u8, 69u8, 191u8, 177u8, 107u8, 34u8, + 74u8, 103u8, 128u8, 252u8, 160u8, 169u8, 246u8, 125u8, 127u8, 153u8, + 129u8, + ], + ) + } + #[doc = "Set the asynchronous backing parameters."] + pub fn set_async_backing_params( + &self, + new: runtime_types::polkadot_primitives::vstaging::AsyncBackingParams, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_async_backing_params", + types::SetAsyncBackingParams { new }, + [ + 124u8, 182u8, 66u8, 138u8, 209u8, 54u8, 42u8, 232u8, 110u8, 67u8, + 248u8, 16u8, 61u8, 38u8, 120u8, 242u8, 34u8, 240u8, 219u8, 169u8, + 145u8, 246u8, 194u8, 208u8, 225u8, 108u8, 135u8, 74u8, 194u8, 214u8, + 199u8, 139u8, + ], + ) + } + #[doc = "Set PVF executor parameters."] + pub fn set_executor_params( + &self, + new: runtime_types::polkadot_primitives::v4::executor_params::ExecutorParams, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_executor_params", + types::SetExecutorParams { new }, + [ + 193u8, 235u8, 143u8, 62u8, 34u8, 192u8, 162u8, 49u8, 224u8, 10u8, + 189u8, 132u8, 70u8, 114u8, 50u8, 155u8, 39u8, 238u8, 238u8, 161u8, + 181u8, 108u8, 187u8, 28u8, 48u8, 14u8, 209u8, 42u8, 196u8, 181u8, + 159u8, 124u8, + ], + ) + } + } + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " The active configuration for the current session."] + pub fn active_config( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_runtime_parachains::configuration::HostConfiguration< + ::core::primitive::u32, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "Configuration", + "ActiveConfig", + vec![], + [ + 254u8, 47u8, 159u8, 237u8, 202u8, 82u8, 132u8, 16u8, 100u8, 209u8, + 166u8, 154u8, 226u8, 156u8, 117u8, 11u8, 114u8, 37u8, 208u8, 255u8, + 96u8, 27u8, 192u8, 144u8, 56u8, 241u8, 49u8, 163u8, 15u8, 86u8, 229u8, + 166u8, + ], + ) + } + #[doc = " Pending configuration changes."] + #[doc = ""] + #[doc = " This is a list of configuration changes, each with a session index at which it should"] + #[doc = " be applied."] + #[doc = ""] + #[doc = " The list is sorted ascending by session index. Also, this list can only contain at most"] + #[doc = " 2 items: for the next session and for the `scheduled_session`."] pub fn pending_configs (& self ,) -> :: subxt :: storage :: address :: Address :: < :: subxt :: storage :: address :: StaticStorageMapKey , :: std :: vec :: Vec < (:: core :: primitive :: u32 , runtime_types :: polkadot_runtime_parachains :: configuration :: HostConfiguration < :: core :: primitive :: u32 > ,) > , :: subxt :: storage :: address :: Yes , :: subxt :: storage :: address :: Yes , () >{ + ::subxt::storage::address::Address::new_static( + "Configuration", + "PendingConfigs", + vec![], + [ + 227u8, 119u8, 229u8, 201u8, 230u8, 27u8, 239u8, 171u8, 78u8, 212u8, + 218u8, 154u8, 195u8, 36u8, 129u8, 91u8, 53u8, 210u8, 185u8, 169u8, + 78u8, 146u8, 21u8, 67u8, 248u8, 117u8, 53u8, 130u8, 243u8, 186u8, + 144u8, 249u8, + ], + ) + } + #[doc = " If this is set, then the configuration setters will bypass the consistency checks. This"] + #[doc = " is meant to be used only as the last resort."] + pub fn bypass_consistency_check( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::bool, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "Configuration", + "BypassConsistencyCheck", + vec![], + [ + 42u8, 191u8, 122u8, 163u8, 112u8, 2u8, 148u8, 59u8, 79u8, 219u8, 184u8, + 172u8, 246u8, 136u8, 185u8, 251u8, 189u8, 226u8, 83u8, 129u8, 162u8, + 109u8, 148u8, 75u8, 120u8, 216u8, 44u8, 28u8, 221u8, 78u8, 177u8, 94u8, + ], + ) + } + } + } + } + pub mod paras_shared { + use super::root_mod; + use super::runtime_types; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod types { + use super::runtime_types; + } + pub struct TransactionApi; + impl TransactionApi {} + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " The current session index."] + pub fn current_session_index( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "ParasShared", + "CurrentSessionIndex", + vec![], + [ + 83u8, 15u8, 20u8, 55u8, 103u8, 65u8, 76u8, 202u8, 69u8, 14u8, 221u8, + 93u8, 38u8, 163u8, 167u8, 83u8, 18u8, 245u8, 33u8, 175u8, 7u8, 97u8, + 67u8, 186u8, 96u8, 57u8, 147u8, 120u8, 107u8, 91u8, 147u8, 64u8, + ], + ) + } + #[doc = " All the validators actively participating in parachain consensus."] + #[doc = " Indices are into the broader validator set."] + pub fn active_validator_indices( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "ParasShared", + "ActiveValidatorIndices", + vec![], + [ + 123u8, 26u8, 202u8, 53u8, 219u8, 42u8, 54u8, 92u8, 144u8, 74u8, 228u8, + 234u8, 129u8, 216u8, 161u8, 98u8, 199u8, 12u8, 13u8, 231u8, 23u8, + 166u8, 185u8, 209u8, 191u8, 33u8, 231u8, 252u8, 232u8, 44u8, 213u8, + 221u8, + ], + ) + } + #[doc = " The parachain attestation keys of the validators actively participating in parachain consensus."] + #[doc = " This should be the same length as `ActiveValidatorIndices`."] + pub fn active_validator_keys( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "ParasShared", + "ActiveValidatorKeys", + vec![], + [ + 33u8, 14u8, 54u8, 86u8, 184u8, 171u8, 194u8, 35u8, 187u8, 252u8, 181u8, + 79u8, 229u8, 134u8, 50u8, 235u8, 162u8, 216u8, 108u8, 160u8, 175u8, + 172u8, 239u8, 114u8, 57u8, 238u8, 9u8, 54u8, 57u8, 196u8, 105u8, 15u8, + ], + ) + } + } + } + } + pub mod para_inclusion { + use super::root_mod; + use super::runtime_types; + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub type Error = runtime_types::polkadot_runtime_parachains::inclusion::pallet::Error; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod types { + use super::runtime_types; + } + pub struct TransactionApi; + impl TransactionApi {} + } + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub type Event = runtime_types::polkadot_runtime_parachains::inclusion::pallet::Event; + pub mod events { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A candidate was backed. `[candidate, head_data]`"] + pub struct CandidateBacked( + pub runtime_types::polkadot_primitives::v4::CandidateReceipt<::subxt::utils::H256>, + pub runtime_types::polkadot_parachain::primitives::HeadData, + pub runtime_types::polkadot_primitives::v4::CoreIndex, + pub runtime_types::polkadot_primitives::v4::GroupIndex, + ); + impl ::subxt::events::StaticEvent for CandidateBacked { + const PALLET: &'static str = "ParaInclusion"; + const EVENT: &'static str = "CandidateBacked"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A candidate was included. `[candidate, head_data]`"] + pub struct CandidateIncluded( + pub runtime_types::polkadot_primitives::v4::CandidateReceipt<::subxt::utils::H256>, + pub runtime_types::polkadot_parachain::primitives::HeadData, + pub runtime_types::polkadot_primitives::v4::CoreIndex, + pub runtime_types::polkadot_primitives::v4::GroupIndex, + ); + impl ::subxt::events::StaticEvent for CandidateIncluded { + const PALLET: &'static str = "ParaInclusion"; + const EVENT: &'static str = "CandidateIncluded"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A candidate timed out. `[candidate, head_data]`"] + pub struct CandidateTimedOut( + pub runtime_types::polkadot_primitives::v4::CandidateReceipt<::subxt::utils::H256>, + pub runtime_types::polkadot_parachain::primitives::HeadData, + pub runtime_types::polkadot_primitives::v4::CoreIndex, + ); + impl ::subxt::events::StaticEvent for CandidateTimedOut { + const PALLET: &'static str = "ParaInclusion"; + const EVENT: &'static str = "CandidateTimedOut"; + } + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " The latest bitfield for each validator, referred to by their index in the validator set."] pub fn availability_bitfields (& self , _0 : impl :: std :: borrow :: Borrow < runtime_types :: polkadot_primitives :: v4 :: ValidatorIndex > ,) -> :: subxt :: storage :: address :: Address :: < :: subxt :: storage :: address :: StaticStorageMapKey , runtime_types :: polkadot_runtime_parachains :: inclusion :: AvailabilityBitfieldRecord < :: core :: primitive :: u32 > , :: subxt :: storage :: address :: Yes , () , :: subxt :: storage :: address :: Yes >{ + ::subxt::storage::address::Address::new_static( + "ParaInclusion", + "AvailabilityBitfields", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], + [ + 149u8, 215u8, 123u8, 226u8, 73u8, 240u8, 102u8, 39u8, 243u8, 232u8, + 226u8, 116u8, 65u8, 180u8, 110u8, 4u8, 194u8, 50u8, 60u8, 193u8, 142u8, + 62u8, 20u8, 148u8, 106u8, 162u8, 96u8, 114u8, 215u8, 250u8, 111u8, + 225u8, + ], + ) + } + #[doc = " The latest bitfield for each validator, referred to by their index in the validator set."] pub fn availability_bitfields_root (& self ,) -> :: subxt :: storage :: address :: Address :: < :: subxt :: storage :: address :: StaticStorageMapKey , runtime_types :: polkadot_runtime_parachains :: inclusion :: AvailabilityBitfieldRecord < :: core :: primitive :: u32 > , () , () , :: subxt :: storage :: address :: Yes >{ + ::subxt::storage::address::Address::new_static( + "ParaInclusion", + "AvailabilityBitfields", + Vec::new(), + [ + 149u8, 215u8, 123u8, 226u8, 73u8, 240u8, 102u8, 39u8, 243u8, 232u8, + 226u8, 116u8, 65u8, 180u8, 110u8, 4u8, 194u8, 50u8, 60u8, 193u8, 142u8, + 62u8, 20u8, 148u8, 106u8, 162u8, 96u8, 114u8, 215u8, 250u8, 111u8, + 225u8, + ], + ) + } + #[doc = " Candidates pending availability by `ParaId`."] pub fn pending_availability (& self , _0 : impl :: std :: borrow :: Borrow < runtime_types :: polkadot_parachain :: primitives :: Id > ,) -> :: subxt :: storage :: address :: Address :: < :: subxt :: storage :: address :: StaticStorageMapKey , runtime_types :: polkadot_runtime_parachains :: inclusion :: CandidatePendingAvailability < :: subxt :: utils :: H256 , :: core :: primitive :: u32 > , :: subxt :: storage :: address :: Yes , () , :: subxt :: storage :: address :: Yes >{ + ::subxt::storage::address::Address::new_static( + "ParaInclusion", + "PendingAvailability", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], + [ + 54u8, 166u8, 18u8, 56u8, 51u8, 241u8, 31u8, 165u8, 220u8, 138u8, 67u8, + 171u8, 23u8, 101u8, 109u8, 26u8, 211u8, 237u8, 81u8, 143u8, 192u8, + 214u8, 49u8, 42u8, 69u8, 30u8, 168u8, 113u8, 72u8, 12u8, 140u8, 242u8, + ], + ) + } + #[doc = " Candidates pending availability by `ParaId`."] pub fn pending_availability_root (& self ,) -> :: subxt :: storage :: address :: Address :: < :: subxt :: storage :: address :: StaticStorageMapKey , runtime_types :: polkadot_runtime_parachains :: inclusion :: CandidatePendingAvailability < :: subxt :: utils :: H256 , :: core :: primitive :: u32 > , () , () , :: subxt :: storage :: address :: Yes >{ + ::subxt::storage::address::Address::new_static( + "ParaInclusion", + "PendingAvailability", + Vec::new(), + [ + 54u8, 166u8, 18u8, 56u8, 51u8, 241u8, 31u8, 165u8, 220u8, 138u8, 67u8, + 171u8, 23u8, 101u8, 109u8, 26u8, 211u8, 237u8, 81u8, 143u8, 192u8, + 214u8, 49u8, 42u8, 69u8, 30u8, 168u8, 113u8, 72u8, 12u8, 140u8, 242u8, + ], + ) + } + #[doc = " The commitments of candidates pending availability, by `ParaId`."] + pub fn pending_availability_commitments( + &self, + _0: impl ::std::borrow::Borrow, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_primitives::v4::CandidateCommitments< + ::core::primitive::u32, + >, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "ParaInclusion", + "PendingAvailabilityCommitments", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], + [ + 128u8, 38u8, 30u8, 235u8, 157u8, 55u8, 36u8, 88u8, 188u8, 164u8, 61u8, + 62u8, 84u8, 83u8, 180u8, 208u8, 244u8, 240u8, 254u8, 183u8, 226u8, + 201u8, 27u8, 47u8, 212u8, 137u8, 251u8, 46u8, 13u8, 33u8, 13u8, 43u8, + ], + ) + } + #[doc = " The commitments of candidates pending availability, by `ParaId`."] + pub fn pending_availability_commitments_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_primitives::v4::CandidateCommitments< + ::core::primitive::u32, + >, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "ParaInclusion", + "PendingAvailabilityCommitments", + Vec::new(), + [ + 128u8, 38u8, 30u8, 235u8, 157u8, 55u8, 36u8, 88u8, 188u8, 164u8, 61u8, + 62u8, 84u8, 83u8, 180u8, 208u8, 244u8, 240u8, 254u8, 183u8, 226u8, + 201u8, 27u8, 47u8, 212u8, 137u8, 251u8, 46u8, 13u8, 33u8, 13u8, 43u8, + ], + ) + } + } + } + } + pub mod para_inherent { + use super::root_mod; + use super::runtime_types; + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub type Error = runtime_types::polkadot_runtime_parachains::paras_inherent::pallet::Error; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Enter { + pub data: runtime_types::polkadot_primitives::v4::InherentData< + runtime_types::sp_runtime::generic::header::Header< + ::core::primitive::u32, + runtime_types::sp_runtime::traits::BlakeTwo256, + >, + >, + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Enter the paras inherent. This will process bitfields and backed candidates."] + pub fn enter( + &self, + data: runtime_types::polkadot_primitives::v4::InherentData< + runtime_types::sp_runtime::generic::header::Header< + ::core::primitive::u32, + runtime_types::sp_runtime::traits::BlakeTwo256, + >, + >, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "ParaInherent", + "enter", + types::Enter { data }, + [ + 196u8, 247u8, 84u8, 213u8, 181u8, 15u8, 195u8, 125u8, 252u8, 46u8, + 165u8, 1u8, 23u8, 159u8, 187u8, 34u8, 8u8, 15u8, 44u8, 240u8, 136u8, + 148u8, 7u8, 82u8, 106u8, 255u8, 190u8, 127u8, 225u8, 230u8, 63u8, + 204u8, + ], + ) + } + } + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " Whether the paras inherent was included within this block."] + #[doc = ""] + #[doc = " The `Option<()>` is effectively a `bool`, but it never hits storage in the `None` variant"] + #[doc = " due to the guarantees of FRAME's storage APIs."] + #[doc = ""] + #[doc = " If this is `None` at the end of the block, we panic and render the block invalid."] + pub fn included( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + (), + ::subxt::storage::address::Yes, + (), + (), + > { + ::subxt::storage::address::Address::new_static( + "ParaInherent", + "Included", + vec![], + [ + 208u8, 213u8, 76u8, 64u8, 90u8, 141u8, 144u8, 52u8, 220u8, 35u8, 143u8, + 171u8, 45u8, 59u8, 9u8, 218u8, 29u8, 186u8, 139u8, 203u8, 205u8, 12u8, + 10u8, 2u8, 27u8, 167u8, 182u8, 244u8, 167u8, 220u8, 44u8, 16u8, + ], + ) + } + #[doc = " Scraped on chain data for extracting resolved disputes as well as backing votes."] + pub fn on_chain_votes( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_primitives::v4::ScrapedOnChainVotes< + ::subxt::utils::H256, + >, + ::subxt::storage::address::Yes, + (), + (), + > { + ::subxt::storage::address::Address::new_static( + "ParaInherent", + "OnChainVotes", + vec![], + [ + 187u8, 34u8, 219u8, 197u8, 202u8, 214u8, 140u8, 152u8, 253u8, 65u8, + 206u8, 217u8, 36u8, 40u8, 107u8, 215u8, 135u8, 115u8, 35u8, 61u8, + 180u8, 131u8, 0u8, 184u8, 193u8, 76u8, 165u8, 63u8, 106u8, 222u8, + 126u8, 113u8, + ], + ) + } + } + } + } + pub mod para_scheduler { + use super::root_mod; + use super::runtime_types; + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " All the validator groups. One for each core. Indices are into `ActiveValidators` - not the"] + #[doc = " broader set of Polkadot validators, but instead just the subset used for parachains during"] + #[doc = " this session."] + #[doc = ""] + #[doc = " Bound: The number of cores is the sum of the numbers of parachains and parathread multiplexers."] + #[doc = " Reasonably, 100-1000. The dominant factor is the number of validators: safe upper bound at 10k."] + pub fn validator_groups( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec< + ::std::vec::Vec, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "ParaScheduler", + "ValidatorGroups", + vec![], + [ + 175u8, 187u8, 69u8, 76u8, 211u8, 36u8, 162u8, 147u8, 83u8, 65u8, 83u8, + 44u8, 241u8, 112u8, 246u8, 14u8, 237u8, 255u8, 248u8, 58u8, 44u8, + 207u8, 159u8, 112u8, 31u8, 90u8, 15u8, 85u8, 4u8, 212u8, 215u8, 211u8, + ], + ) + } + #[doc = " A queue of upcoming claims and which core they should be mapped onto."] + #[doc = ""] + #[doc = " The number of queued claims is bounded at the `scheduling_lookahead`"] + #[doc = " multiplied by the number of parathread multiplexer cores. Reasonably, 10 * 50 = 500."] + pub fn parathread_queue( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_runtime_parachains::scheduler::ParathreadClaimQueue, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "ParaScheduler", + "ParathreadQueue", + vec![], + [ + 79u8, 144u8, 191u8, 114u8, 235u8, 55u8, 133u8, 208u8, 73u8, 97u8, 73u8, + 148u8, 96u8, 185u8, 110u8, 95u8, 132u8, 54u8, 244u8, 86u8, 50u8, 218u8, + 121u8, 226u8, 153u8, 58u8, 232u8, 202u8, 132u8, 147u8, 168u8, 48u8, + ], + ) + } + #[doc = " One entry for each availability core. Entries are `None` if the core is not currently occupied. Can be"] + #[doc = " temporarily `Some` if scheduled but not occupied."] + #[doc = " The i'th parachain belongs to the i'th core, with the remaining cores all being"] + #[doc = " parathread-multiplexers."] + #[doc = ""] + #[doc = " Bounded by the maximum of either of these two values:"] + #[doc = " * The number of parachains and parathread multiplexers"] + #[doc = " * The number of validators divided by `configuration.max_validators_per_core`."] + pub fn availability_cores( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec< + ::core::option::Option< + runtime_types::polkadot_primitives::v4::CoreOccupied, + >, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "ParaScheduler", + "AvailabilityCores", + vec![], + [ + 103u8, 94u8, 52u8, 17u8, 118u8, 25u8, 254u8, 190u8, 74u8, 91u8, 64u8, + 205u8, 243u8, 113u8, 143u8, 166u8, 193u8, 110u8, 214u8, 151u8, 24u8, + 112u8, 69u8, 131u8, 235u8, 78u8, 240u8, 120u8, 240u8, 68u8, 56u8, + 215u8, + ], + ) + } + #[doc = " An index used to ensure that only one claim on a parathread exists in the queue or is"] + #[doc = " currently being handled by an occupied core."] + #[doc = ""] + #[doc = " Bounded by the number of parathread cores and scheduling lookahead. Reasonably, 10 * 50 = 500."] + pub fn parathread_claim_index( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "ParaScheduler", + "ParathreadClaimIndex", + vec![], + [ + 64u8, 17u8, 173u8, 35u8, 14u8, 16u8, 149u8, 200u8, 118u8, 211u8, 130u8, + 15u8, 124u8, 112u8, 44u8, 220u8, 156u8, 132u8, 119u8, 148u8, 24u8, + 120u8, 252u8, 246u8, 204u8, 119u8, 206u8, 85u8, 44u8, 210u8, 135u8, + 83u8, + ], + ) + } + #[doc = " The block number where the session start occurred. Used to track how many group rotations have occurred."] + #[doc = ""] + #[doc = " Note that in the context of parachains modules the session change is signaled during"] + #[doc = " the block and enacted at the end of the block (at the finalization stage, to be exact)."] + #[doc = " Thus for all intents and purposes the effect of the session change is observed at the"] + #[doc = " block following the session change, block number of which we save in this storage value."] + pub fn session_start_block( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "ParaScheduler", + "SessionStartBlock", + vec![], + [ + 122u8, 37u8, 150u8, 1u8, 185u8, 201u8, 168u8, 67u8, 55u8, 17u8, 101u8, + 18u8, 133u8, 212u8, 6u8, 73u8, 191u8, 204u8, 229u8, 22u8, 185u8, 120u8, + 24u8, 245u8, 121u8, 215u8, 124u8, 210u8, 49u8, 28u8, 26u8, 80u8, + ], + ) + } + #[doc = " Currently scheduled cores - free but up to be occupied."] + #[doc = ""] + #[doc = " Bounded by the number of cores: one for each parachain and parathread multiplexer."] + #[doc = ""] + #[doc = " The value contained here will not be valid after the end of a block. Runtime APIs should be used to determine scheduled cores/"] + #[doc = " for the upcoming block."] + pub fn scheduled( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec< + runtime_types::polkadot_runtime_parachains::scheduler::CoreAssignment, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "ParaScheduler", + "Scheduled", + vec![], + [ + 246u8, 105u8, 102u8, 107u8, 143u8, 92u8, 220u8, 69u8, 71u8, 102u8, + 212u8, 157u8, 56u8, 112u8, 42u8, 179u8, 183u8, 139u8, 128u8, 81u8, + 239u8, 84u8, 103u8, 126u8, 82u8, 247u8, 39u8, 39u8, 231u8, 218u8, + 131u8, 53u8, + ], + ) + } + } + } + } + pub mod paras { + use super::root_mod; + use super::runtime_types; + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub type Error = runtime_types::polkadot_runtime_parachains::paras::pallet::Error; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ForceSetCurrentCode { + pub para: runtime_types::polkadot_parachain::primitives::Id, + pub new_code: runtime_types::polkadot_parachain::primitives::ValidationCode, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ForceSetCurrentHead { + pub para: runtime_types::polkadot_parachain::primitives::Id, + pub new_head: runtime_types::polkadot_parachain::primitives::HeadData, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ForceScheduleCodeUpgrade { + pub para: runtime_types::polkadot_parachain::primitives::Id, + pub new_code: runtime_types::polkadot_parachain::primitives::ValidationCode, + pub relay_parent_number: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ForceNoteNewHead { + pub para: runtime_types::polkadot_parachain::primitives::Id, + pub new_head: runtime_types::polkadot_parachain::primitives::HeadData, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ForceQueueAction { + pub para: runtime_types::polkadot_parachain::primitives::Id, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct AddTrustedValidationCode { + pub validation_code: + runtime_types::polkadot_parachain::primitives::ValidationCode, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct PokeUnusedValidationCode { + pub validation_code_hash: + runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct IncludePvfCheckStatement { + pub stmt: runtime_types::polkadot_primitives::v4::PvfCheckStatement, + pub signature: runtime_types::polkadot_primitives::v4::validator_app::Signature, + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Set the storage for the parachain validation code immediately."] + pub fn force_set_current_code( + &self, + para: runtime_types::polkadot_parachain::primitives::Id, + new_code: runtime_types::polkadot_parachain::primitives::ValidationCode, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Paras", + "force_set_current_code", + types::ForceSetCurrentCode { para, new_code }, + [ + 56u8, 59u8, 48u8, 185u8, 106u8, 99u8, 250u8, 32u8, 207u8, 2u8, 4u8, + 110u8, 165u8, 131u8, 22u8, 33u8, 248u8, 175u8, 186u8, 6u8, 118u8, 51u8, + 74u8, 239u8, 68u8, 122u8, 148u8, 242u8, 193u8, 131u8, 6u8, 135u8, + ], + ) + } + #[doc = "Set the storage for the current parachain head data immediately."] + pub fn force_set_current_head( + &self, + para: runtime_types::polkadot_parachain::primitives::Id, + new_head: runtime_types::polkadot_parachain::primitives::HeadData, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Paras", + "force_set_current_head", + types::ForceSetCurrentHead { para, new_head }, + [ + 203u8, 70u8, 33u8, 168u8, 133u8, 64u8, 146u8, 137u8, 156u8, 104u8, + 183u8, 26u8, 74u8, 227u8, 154u8, 224u8, 75u8, 85u8, 143u8, 51u8, 60u8, + 194u8, 59u8, 94u8, 100u8, 84u8, 194u8, 100u8, 153u8, 9u8, 222u8, 63u8, + ], + ) + } + #[doc = "Schedule an upgrade as if it was scheduled in the given relay parent block."] + pub fn force_schedule_code_upgrade( + &self, + para: runtime_types::polkadot_parachain::primitives::Id, + new_code: runtime_types::polkadot_parachain::primitives::ValidationCode, + relay_parent_number: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Paras", + "force_schedule_code_upgrade", + types::ForceScheduleCodeUpgrade { + para, + new_code, + relay_parent_number, + }, + [ + 30u8, 210u8, 178u8, 31u8, 48u8, 144u8, 167u8, 117u8, 220u8, 36u8, + 175u8, 220u8, 145u8, 193u8, 20u8, 98u8, 149u8, 130u8, 66u8, 54u8, 20u8, + 204u8, 231u8, 116u8, 203u8, 179u8, 253u8, 106u8, 55u8, 58u8, 116u8, + 109u8, + ], + ) + } + #[doc = "Note a new block head for para within the context of the current block."] + pub fn force_note_new_head( + &self, + para: runtime_types::polkadot_parachain::primitives::Id, + new_head: runtime_types::polkadot_parachain::primitives::HeadData, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Paras", + "force_note_new_head", + types::ForceNoteNewHead { para, new_head }, + [ + 83u8, 93u8, 166u8, 142u8, 213u8, 1u8, 243u8, 73u8, 192u8, 164u8, 104u8, + 206u8, 99u8, 250u8, 31u8, 222u8, 231u8, 54u8, 12u8, 45u8, 92u8, 74u8, + 248u8, 50u8, 180u8, 86u8, 251u8, 172u8, 227u8, 88u8, 45u8, 127u8, + ], + ) + } + #[doc = "Put a parachain directly into the next session's action queue."] + #[doc = "We can't queue it any sooner than this without going into the"] + #[doc = "initializer..."] + pub fn force_queue_action( + &self, + para: runtime_types::polkadot_parachain::primitives::Id, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Paras", + "force_queue_action", + types::ForceQueueAction { para }, + [ + 195u8, 243u8, 79u8, 34u8, 111u8, 246u8, 109u8, 90u8, 251u8, 137u8, + 48u8, 23u8, 117u8, 29u8, 26u8, 200u8, 37u8, 64u8, 36u8, 254u8, 224u8, + 99u8, 165u8, 246u8, 8u8, 76u8, 250u8, 36u8, 141u8, 67u8, 185u8, 17u8, + ], + ) + } + #[doc = "Adds the validation code to the storage."] + #[doc = ""] + #[doc = "The code will not be added if it is already present. Additionally, if PVF pre-checking"] + #[doc = "is running for that code, it will be instantly accepted."] + #[doc = ""] + #[doc = "Otherwise, the code will be added into the storage. Note that the code will be added"] + #[doc = "into storage with reference count 0. This is to account the fact that there are no users"] + #[doc = "for this code yet. The caller will have to make sure that this code eventually gets"] + #[doc = "used by some parachain or removed from the storage to avoid storage leaks. For the latter"] + #[doc = "prefer to use the `poke_unused_validation_code` dispatchable to raw storage manipulation."] + #[doc = ""] + #[doc = "This function is mainly meant to be used for upgrading parachains that do not follow"] + #[doc = "the go-ahead signal while the PVF pre-checking feature is enabled."] + pub fn add_trusted_validation_code( + &self, + validation_code: runtime_types::polkadot_parachain::primitives::ValidationCode, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Paras", + "add_trusted_validation_code", + types::AddTrustedValidationCode { validation_code }, + [ + 160u8, 199u8, 245u8, 178u8, 58u8, 65u8, 79u8, 199u8, 53u8, 60u8, 84u8, + 225u8, 2u8, 145u8, 154u8, 204u8, 165u8, 171u8, 173u8, 223u8, 59u8, + 196u8, 37u8, 12u8, 243u8, 158u8, 77u8, 184u8, 58u8, 64u8, 133u8, 71u8, + ], + ) + } + #[doc = "Remove the validation code from the storage iff the reference count is 0."] + #[doc = ""] + #[doc = "This is better than removing the storage directly, because it will not remove the code"] + #[doc = "that was suddenly got used by some parachain while this dispatchable was pending"] + #[doc = "dispatching."] + pub fn poke_unused_validation_code( + &self, + validation_code_hash : runtime_types :: polkadot_parachain :: primitives :: ValidationCodeHash, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Paras", + "poke_unused_validation_code", + types::PokeUnusedValidationCode { + validation_code_hash, + }, + [ + 98u8, 9u8, 24u8, 180u8, 8u8, 144u8, 36u8, 28u8, 111u8, 83u8, 162u8, + 160u8, 66u8, 119u8, 177u8, 117u8, 143u8, 233u8, 241u8, 128u8, 189u8, + 118u8, 241u8, 30u8, 74u8, 171u8, 193u8, 177u8, 233u8, 12u8, 254u8, + 146u8, + ], + ) + } + #[doc = "Includes a statement for a PVF pre-checking vote. Potentially, finalizes the vote and"] + #[doc = "enacts the results if that was the last vote before achieving the supermajority."] + pub fn include_pvf_check_statement( + &self, + stmt: runtime_types::polkadot_primitives::v4::PvfCheckStatement, + signature: runtime_types::polkadot_primitives::v4::validator_app::Signature, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Paras", + "include_pvf_check_statement", + types::IncludePvfCheckStatement { stmt, signature }, + [ + 22u8, 136u8, 241u8, 59u8, 36u8, 249u8, 239u8, 255u8, 169u8, 117u8, + 19u8, 58u8, 214u8, 16u8, 135u8, 65u8, 13u8, 250u8, 5u8, 41u8, 144u8, + 29u8, 207u8, 73u8, 215u8, 221u8, 1u8, 253u8, 123u8, 110u8, 6u8, 196u8, + ], + ) + } + } + } + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub type Event = runtime_types::polkadot_runtime_parachains::paras::pallet::Event; + pub mod events { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Current code has been updated for a Para. `para_id`"] + pub struct CurrentCodeUpdated(pub runtime_types::polkadot_parachain::primitives::Id); + impl ::subxt::events::StaticEvent for CurrentCodeUpdated { + const PALLET: &'static str = "Paras"; + const EVENT: &'static str = "CurrentCodeUpdated"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Current head has been updated for a Para. `para_id`"] + pub struct CurrentHeadUpdated(pub runtime_types::polkadot_parachain::primitives::Id); + impl ::subxt::events::StaticEvent for CurrentHeadUpdated { + const PALLET: &'static str = "Paras"; + const EVENT: &'static str = "CurrentHeadUpdated"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A code upgrade has been scheduled for a Para. `para_id`"] + pub struct CodeUpgradeScheduled(pub runtime_types::polkadot_parachain::primitives::Id); + impl ::subxt::events::StaticEvent for CodeUpgradeScheduled { + const PALLET: &'static str = "Paras"; + const EVENT: &'static str = "CodeUpgradeScheduled"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A new head has been noted for a Para. `para_id`"] + pub struct NewHeadNoted(pub runtime_types::polkadot_parachain::primitives::Id); + impl ::subxt::events::StaticEvent for NewHeadNoted { + const PALLET: &'static str = "Paras"; + const EVENT: &'static str = "NewHeadNoted"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A para has been queued to execute pending actions. `para_id`"] + pub struct ActionQueued( + pub runtime_types::polkadot_parachain::primitives::Id, + pub ::core::primitive::u32, + ); + impl ::subxt::events::StaticEvent for ActionQueued { + const PALLET: &'static str = "Paras"; + const EVENT: &'static str = "ActionQueued"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "The given para either initiated or subscribed to a PVF check for the given validation"] + #[doc = "code. `code_hash` `para_id`"] + pub struct PvfCheckStarted( + pub runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + pub runtime_types::polkadot_parachain::primitives::Id, + ); + impl ::subxt::events::StaticEvent for PvfCheckStarted { + const PALLET: &'static str = "Paras"; + const EVENT: &'static str = "PvfCheckStarted"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "The given validation code was accepted by the PVF pre-checking vote."] + #[doc = "`code_hash` `para_id`"] + pub struct PvfCheckAccepted( + pub runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + pub runtime_types::polkadot_parachain::primitives::Id, + ); + impl ::subxt::events::StaticEvent for PvfCheckAccepted { + const PALLET: &'static str = "Paras"; + const EVENT: &'static str = "PvfCheckAccepted"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "The given validation code was rejected by the PVF pre-checking vote."] + #[doc = "`code_hash` `para_id`"] + pub struct PvfCheckRejected( + pub runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + pub runtime_types::polkadot_parachain::primitives::Id, + ); + impl ::subxt::events::StaticEvent for PvfCheckRejected { + const PALLET: &'static str = "Paras"; + const EVENT: &'static str = "PvfCheckRejected"; + } + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " All currently active PVF pre-checking votes."] + #[doc = ""] + #[doc = " Invariant:"] + #[doc = " - There are no PVF pre-checking votes that exists in list but not in the set and vice versa."] + pub fn pvf_active_vote_map( + &self, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + >, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_runtime_parachains::paras::PvfCheckActiveVoteState< + ::core::primitive::u32, + >, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Paras", + "PvfActiveVoteMap", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], + [ + 84u8, 214u8, 221u8, 221u8, 244u8, 56u8, 135u8, 87u8, 252u8, 39u8, + 188u8, 13u8, 196u8, 25u8, 214u8, 186u8, 152u8, 181u8, 190u8, 39u8, + 235u8, 211u8, 236u8, 114u8, 67u8, 85u8, 138u8, 43u8, 248u8, 134u8, + 124u8, 73u8, + ], + ) + } + #[doc = " All currently active PVF pre-checking votes."] + #[doc = ""] + #[doc = " Invariant:"] + #[doc = " - There are no PVF pre-checking votes that exists in list but not in the set and vice versa."] + pub fn pvf_active_vote_map_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_runtime_parachains::paras::PvfCheckActiveVoteState< + ::core::primitive::u32, + >, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Paras", + "PvfActiveVoteMap", + Vec::new(), + [ + 84u8, 214u8, 221u8, 221u8, 244u8, 56u8, 135u8, 87u8, 252u8, 39u8, + 188u8, 13u8, 196u8, 25u8, 214u8, 186u8, 152u8, 181u8, 190u8, 39u8, + 235u8, 211u8, 236u8, 114u8, 67u8, 85u8, 138u8, 43u8, 248u8, 134u8, + 124u8, 73u8, + ], + ) + } + #[doc = " The list of all currently active PVF votes. Auxiliary to `PvfActiveVoteMap`."] + pub fn pvf_active_vote_list( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec< + runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "Paras", + "PvfActiveVoteList", + vec![], + [ + 196u8, 23u8, 108u8, 162u8, 29u8, 33u8, 49u8, 219u8, 127u8, 26u8, 241u8, + 58u8, 102u8, 43u8, 156u8, 3u8, 87u8, 153u8, 195u8, 96u8, 68u8, 132u8, + 170u8, 162u8, 18u8, 156u8, 121u8, 63u8, 53u8, 91u8, 68u8, 69u8, + ], + ) + } + #[doc = " All parachains. Ordered ascending by `ParaId`. Parathreads are not included."] + #[doc = ""] + #[doc = " Consider using the [`ParachainsCache`] type of modifying."] + pub fn parachains( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "Paras", + "Parachains", + vec![], + [ + 85u8, 234u8, 218u8, 69u8, 20u8, 169u8, 235u8, 6u8, 69u8, 126u8, 28u8, + 18u8, 57u8, 93u8, 238u8, 7u8, 167u8, 221u8, 75u8, 35u8, 36u8, 4u8, + 46u8, 55u8, 234u8, 123u8, 122u8, 173u8, 13u8, 205u8, 58u8, 226u8, + ], + ) + } + #[doc = " The current lifecycle of a all known Para IDs."] + pub fn para_lifecycles( + &self, + _0: impl ::std::borrow::Borrow, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_runtime_parachains::paras::ParaLifecycle, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Paras", + "ParaLifecycles", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], + [ + 221u8, 103u8, 112u8, 222u8, 86u8, 2u8, 172u8, 187u8, 174u8, 106u8, 4u8, + 253u8, 35u8, 73u8, 18u8, 78u8, 25u8, 31u8, 124u8, 110u8, 81u8, 62u8, + 215u8, 228u8, 183u8, 132u8, 138u8, 213u8, 186u8, 209u8, 191u8, 186u8, + ], + ) + } + #[doc = " The current lifecycle of a all known Para IDs."] + pub fn para_lifecycles_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_runtime_parachains::paras::ParaLifecycle, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Paras", + "ParaLifecycles", + Vec::new(), + [ + 221u8, 103u8, 112u8, 222u8, 86u8, 2u8, 172u8, 187u8, 174u8, 106u8, 4u8, + 253u8, 35u8, 73u8, 18u8, 78u8, 25u8, 31u8, 124u8, 110u8, 81u8, 62u8, + 215u8, 228u8, 183u8, 132u8, 138u8, 213u8, 186u8, 209u8, 191u8, 186u8, + ], + ) + } + #[doc = " The head-data of every registered para."] + pub fn heads( + &self, + _0: impl ::std::borrow::Borrow, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_parachain::primitives::HeadData, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Paras", + "Heads", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], + [ + 122u8, 38u8, 181u8, 121u8, 245u8, 100u8, 136u8, 233u8, 237u8, 248u8, + 127u8, 2u8, 147u8, 41u8, 202u8, 242u8, 238u8, 70u8, 55u8, 200u8, 15u8, + 106u8, 138u8, 108u8, 192u8, 61u8, 158u8, 134u8, 131u8, 142u8, 70u8, + 3u8, + ], + ) + } + #[doc = " The head-data of every registered para."] + pub fn heads_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_parachain::primitives::HeadData, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Paras", + "Heads", + Vec::new(), + [ + 122u8, 38u8, 181u8, 121u8, 245u8, 100u8, 136u8, 233u8, 237u8, 248u8, + 127u8, 2u8, 147u8, 41u8, 202u8, 242u8, 238u8, 70u8, 55u8, 200u8, 15u8, + 106u8, 138u8, 108u8, 192u8, 61u8, 158u8, 134u8, 131u8, 142u8, 70u8, + 3u8, + ], + ) + } + #[doc = " The validation code hash of every live para."] + #[doc = ""] + #[doc = " Corresponding code can be retrieved with [`CodeByHash`]."] + pub fn current_code_hash( + &self, + _0: impl ::std::borrow::Borrow, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Paras", + "CurrentCodeHash", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], + [ + 179u8, 145u8, 45u8, 44u8, 130u8, 240u8, 50u8, 128u8, 190u8, 133u8, + 66u8, 85u8, 47u8, 141u8, 56u8, 87u8, 131u8, 99u8, 170u8, 203u8, 8u8, + 51u8, 123u8, 73u8, 206u8, 30u8, 173u8, 35u8, 157u8, 195u8, 104u8, + 236u8, + ], + ) + } + #[doc = " The validation code hash of every live para."] + #[doc = ""] + #[doc = " Corresponding code can be retrieved with [`CodeByHash`]."] + pub fn current_code_hash_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Paras", + "CurrentCodeHash", + Vec::new(), + [ + 179u8, 145u8, 45u8, 44u8, 130u8, 240u8, 50u8, 128u8, 190u8, 133u8, + 66u8, 85u8, 47u8, 141u8, 56u8, 87u8, 131u8, 99u8, 170u8, 203u8, 8u8, + 51u8, 123u8, 73u8, 206u8, 30u8, 173u8, 35u8, 157u8, 195u8, 104u8, + 236u8, + ], + ) + } + #[doc = " Actual past code hash, indicated by the para id as well as the block number at which it"] + #[doc = " became outdated."] + #[doc = ""] + #[doc = " Corresponding code can be retrieved with [`CodeByHash`]."] + pub fn past_code_hash( + &self, + _0: impl ::std::borrow::Borrow, + _1: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Paras", + "PastCodeHash", + vec![ + ::subxt::storage::address::make_static_storage_map_key(_0.borrow()), + ::subxt::storage::address::make_static_storage_map_key(_1.borrow()), + ], + [ + 241u8, 112u8, 128u8, 226u8, 163u8, 193u8, 77u8, 78u8, 177u8, 146u8, + 31u8, 143u8, 44u8, 140u8, 159u8, 134u8, 221u8, 129u8, 36u8, 224u8, + 46u8, 119u8, 245u8, 253u8, 55u8, 22u8, 137u8, 187u8, 71u8, 94u8, 88u8, + 124u8, + ], + ) + } + #[doc = " Actual past code hash, indicated by the para id as well as the block number at which it"] + #[doc = " became outdated."] + #[doc = ""] + #[doc = " Corresponding code can be retrieved with [`CodeByHash`]."] + pub fn past_code_hash_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Paras", + "PastCodeHash", + Vec::new(), + [ + 241u8, 112u8, 128u8, 226u8, 163u8, 193u8, 77u8, 78u8, 177u8, 146u8, + 31u8, 143u8, 44u8, 140u8, 159u8, 134u8, 221u8, 129u8, 36u8, 224u8, + 46u8, 119u8, 245u8, 253u8, 55u8, 22u8, 137u8, 187u8, 71u8, 94u8, 88u8, + 124u8, + ], + ) + } + #[doc = " Past code of parachains. The parachains themselves may not be registered anymore,"] + #[doc = " but we also keep their code on-chain for the same amount of time as outdated code"] + #[doc = " to keep it available for approval checkers."] + pub fn past_code_meta( + &self, + _0: impl ::std::borrow::Borrow, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_runtime_parachains::paras::ParaPastCodeMeta< + ::core::primitive::u32, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Paras", + "PastCodeMeta", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], + [ + 251u8, 52u8, 126u8, 12u8, 21u8, 178u8, 151u8, 195u8, 153u8, 17u8, + 215u8, 242u8, 118u8, 192u8, 86u8, 72u8, 36u8, 97u8, 245u8, 134u8, + 155u8, 117u8, 85u8, 93u8, 225u8, 209u8, 63u8, 164u8, 168u8, 72u8, + 171u8, 228u8, + ], + ) + } + #[doc = " Past code of parachains. The parachains themselves may not be registered anymore,"] + #[doc = " but we also keep their code on-chain for the same amount of time as outdated code"] + #[doc = " to keep it available for approval checkers."] + pub fn past_code_meta_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_runtime_parachains::paras::ParaPastCodeMeta< + ::core::primitive::u32, + >, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Paras", + "PastCodeMeta", + Vec::new(), + [ + 251u8, 52u8, 126u8, 12u8, 21u8, 178u8, 151u8, 195u8, 153u8, 17u8, + 215u8, 242u8, 118u8, 192u8, 86u8, 72u8, 36u8, 97u8, 245u8, 134u8, + 155u8, 117u8, 85u8, 93u8, 225u8, 209u8, 63u8, 164u8, 168u8, 72u8, + 171u8, 228u8, + ], + ) + } + #[doc = " Which paras have past code that needs pruning and the relay-chain block at which the code was replaced."] + #[doc = " Note that this is the actual height of the included block, not the expected height at which the"] + #[doc = " code upgrade would be applied, although they may be equal."] + #[doc = " This is to ensure the entire acceptance period is covered, not an offset acceptance period starting"] + #[doc = " from the time at which the parachain perceives a code upgrade as having occurred."] + #[doc = " Multiple entries for a single para are permitted. Ordered ascending by block number."] + pub fn past_code_pruning( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec<( + runtime_types::polkadot_parachain::primitives::Id, + ::core::primitive::u32, + )>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "Paras", + "PastCodePruning", + vec![], + [ + 59u8, 26u8, 175u8, 129u8, 174u8, 27u8, 239u8, 77u8, 38u8, 130u8, 37u8, + 134u8, 62u8, 28u8, 218u8, 176u8, 16u8, 137u8, 175u8, 90u8, 248u8, 44u8, + 248u8, 172u8, 231u8, 6u8, 36u8, 190u8, 109u8, 237u8, 228u8, 135u8, + ], + ) + } + #[doc = " The block number at which the planned code change is expected for a para."] + #[doc = " The change will be applied after the first parablock for this ID included which executes"] + #[doc = " in the context of a relay chain block with a number >= `expected_at`."] + pub fn future_code_upgrades( + &self, + _0: impl ::std::borrow::Borrow, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Paras", + "FutureCodeUpgrades", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], + [ + 40u8, 134u8, 185u8, 28u8, 48u8, 105u8, 152u8, 229u8, 166u8, 235u8, + 32u8, 173u8, 64u8, 63u8, 151u8, 157u8, 190u8, 214u8, 7u8, 8u8, 6u8, + 128u8, 21u8, 104u8, 175u8, 71u8, 130u8, 207u8, 158u8, 115u8, 172u8, + 149u8, + ], + ) + } + #[doc = " The block number at which the planned code change is expected for a para."] + #[doc = " The change will be applied after the first parablock for this ID included which executes"] + #[doc = " in the context of a relay chain block with a number >= `expected_at`."] + pub fn future_code_upgrades_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Paras", + "FutureCodeUpgrades", + Vec::new(), + [ + 40u8, 134u8, 185u8, 28u8, 48u8, 105u8, 152u8, 229u8, 166u8, 235u8, + 32u8, 173u8, 64u8, 63u8, 151u8, 157u8, 190u8, 214u8, 7u8, 8u8, 6u8, + 128u8, 21u8, 104u8, 175u8, 71u8, 130u8, 207u8, 158u8, 115u8, 172u8, + 149u8, + ], + ) + } + #[doc = " The actual future code hash of a para."] + #[doc = ""] + #[doc = " Corresponding code can be retrieved with [`CodeByHash`]."] + pub fn future_code_hash( + &self, + _0: impl ::std::borrow::Borrow, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Paras", + "FutureCodeHash", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], + [ + 252u8, 24u8, 95u8, 200u8, 207u8, 91u8, 66u8, 103u8, 54u8, 171u8, 191u8, + 187u8, 73u8, 170u8, 132u8, 59u8, 205u8, 125u8, 68u8, 194u8, 122u8, + 124u8, 190u8, 53u8, 241u8, 225u8, 131u8, 53u8, 44u8, 145u8, 244u8, + 216u8, + ], + ) + } + #[doc = " The actual future code hash of a para."] + #[doc = ""] + #[doc = " Corresponding code can be retrieved with [`CodeByHash`]."] + pub fn future_code_hash_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Paras", + "FutureCodeHash", + Vec::new(), + [ + 252u8, 24u8, 95u8, 200u8, 207u8, 91u8, 66u8, 103u8, 54u8, 171u8, 191u8, + 187u8, 73u8, 170u8, 132u8, 59u8, 205u8, 125u8, 68u8, 194u8, 122u8, + 124u8, 190u8, 53u8, 241u8, 225u8, 131u8, 53u8, 44u8, 145u8, 244u8, + 216u8, + ], + ) + } + #[doc = " This is used by the relay-chain to communicate to a parachain a go-ahead with in the upgrade procedure."] + #[doc = ""] + #[doc = " This value is absent when there are no upgrades scheduled or during the time the relay chain"] + #[doc = " performs the checks. It is set at the first relay-chain block when the corresponding parachain"] + #[doc = " can switch its upgrade function. As soon as the parachain's block is included, the value"] + #[doc = " gets reset to `None`."] + #[doc = ""] + #[doc = " NOTE that this field is used by parachains via merkle storage proofs, therefore changing"] + #[doc = " the format will require migration of parachains."] + pub fn upgrade_go_ahead_signal( + &self, + _0: impl ::std::borrow::Borrow, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_primitives::v4::UpgradeGoAhead, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Paras", + "UpgradeGoAheadSignal", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], + [ + 159u8, 47u8, 247u8, 154u8, 54u8, 20u8, 235u8, 49u8, 74u8, 41u8, 65u8, + 51u8, 52u8, 187u8, 242u8, 6u8, 84u8, 144u8, 200u8, 176u8, 222u8, 232u8, + 70u8, 50u8, 70u8, 97u8, 61u8, 249u8, 245u8, 120u8, 98u8, 183u8, + ], + ) + } + #[doc = " This is used by the relay-chain to communicate to a parachain a go-ahead with in the upgrade procedure."] + #[doc = ""] + #[doc = " This value is absent when there are no upgrades scheduled or during the time the relay chain"] + #[doc = " performs the checks. It is set at the first relay-chain block when the corresponding parachain"] + #[doc = " can switch its upgrade function. As soon as the parachain's block is included, the value"] + #[doc = " gets reset to `None`."] + #[doc = ""] + #[doc = " NOTE that this field is used by parachains via merkle storage proofs, therefore changing"] + #[doc = " the format will require migration of parachains."] + pub fn upgrade_go_ahead_signal_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_primitives::v4::UpgradeGoAhead, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Paras", + "UpgradeGoAheadSignal", + Vec::new(), + [ + 159u8, 47u8, 247u8, 154u8, 54u8, 20u8, 235u8, 49u8, 74u8, 41u8, 65u8, + 51u8, 52u8, 187u8, 242u8, 6u8, 84u8, 144u8, 200u8, 176u8, 222u8, 232u8, + 70u8, 50u8, 70u8, 97u8, 61u8, 249u8, 245u8, 120u8, 98u8, 183u8, + ], + ) + } + #[doc = " This is used by the relay-chain to communicate that there are restrictions for performing"] + #[doc = " an upgrade for this parachain."] + #[doc = ""] + #[doc = " This may be a because the parachain waits for the upgrade cooldown to expire. Another"] + #[doc = " potential use case is when we want to perform some maintenance (such as storage migration)"] + #[doc = " we could restrict upgrades to make the process simpler."] + #[doc = ""] + #[doc = " NOTE that this field is used by parachains via merkle storage proofs, therefore changing"] + #[doc = " the format will require migration of parachains."] + pub fn upgrade_restriction_signal( + &self, + _0: impl ::std::borrow::Borrow, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_primitives::v4::UpgradeRestriction, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Paras", + "UpgradeRestrictionSignal", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], + [ + 86u8, 190u8, 41u8, 79u8, 66u8, 68u8, 46u8, 87u8, 212u8, 176u8, 255u8, + 134u8, 104u8, 121u8, 44u8, 143u8, 248u8, 100u8, 35u8, 157u8, 91u8, + 165u8, 118u8, 38u8, 49u8, 171u8, 158u8, 163u8, 45u8, 92u8, 44u8, 11u8, + ], + ) + } + #[doc = " This is used by the relay-chain to communicate that there are restrictions for performing"] + #[doc = " an upgrade for this parachain."] + #[doc = ""] + #[doc = " This may be a because the parachain waits for the upgrade cooldown to expire. Another"] + #[doc = " potential use case is when we want to perform some maintenance (such as storage migration)"] + #[doc = " we could restrict upgrades to make the process simpler."] + #[doc = ""] + #[doc = " NOTE that this field is used by parachains via merkle storage proofs, therefore changing"] + #[doc = " the format will require migration of parachains."] + pub fn upgrade_restriction_signal_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_primitives::v4::UpgradeRestriction, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Paras", + "UpgradeRestrictionSignal", + Vec::new(), + [ + 86u8, 190u8, 41u8, 79u8, 66u8, 68u8, 46u8, 87u8, 212u8, 176u8, 255u8, + 134u8, 104u8, 121u8, 44u8, 143u8, 248u8, 100u8, 35u8, 157u8, 91u8, + 165u8, 118u8, 38u8, 49u8, 171u8, 158u8, 163u8, 45u8, 92u8, 44u8, 11u8, + ], + ) + } + #[doc = " The list of parachains that are awaiting for their upgrade restriction to cooldown."] + #[doc = ""] + #[doc = " Ordered ascending by block number."] + pub fn upgrade_cooldowns( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec<( + runtime_types::polkadot_parachain::primitives::Id, + ::core::primitive::u32, + )>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "Paras", + "UpgradeCooldowns", + vec![], + [ + 205u8, 236u8, 140u8, 145u8, 241u8, 245u8, 60u8, 68u8, 23u8, 175u8, + 226u8, 174u8, 154u8, 107u8, 243u8, 197u8, 61u8, 218u8, 7u8, 24u8, + 109u8, 221u8, 178u8, 80u8, 242u8, 123u8, 33u8, 119u8, 5u8, 241u8, + 179u8, 13u8, + ], + ) + } + #[doc = " The list of upcoming code upgrades. Each item is a pair of which para performs a code"] + #[doc = " upgrade and at which relay-chain block it is expected at."] + #[doc = ""] + #[doc = " Ordered ascending by block number."] + pub fn upcoming_upgrades( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec<( + runtime_types::polkadot_parachain::primitives::Id, + ::core::primitive::u32, + )>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "Paras", + "UpcomingUpgrades", + vec![], + [ + 165u8, 112u8, 215u8, 149u8, 125u8, 175u8, 206u8, 195u8, 214u8, 173u8, + 0u8, 144u8, 46u8, 197u8, 55u8, 204u8, 144u8, 68u8, 158u8, 156u8, 145u8, + 230u8, 173u8, 101u8, 255u8, 108u8, 52u8, 199u8, 142u8, 37u8, 55u8, + 32u8, + ], + ) + } + #[doc = " The actions to perform during the start of a specific session index."] + pub fn actions_queue( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Paras", + "ActionsQueue", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], + [ + 209u8, 106u8, 198u8, 228u8, 148u8, 75u8, 246u8, 248u8, 12u8, 143u8, + 175u8, 56u8, 168u8, 243u8, 67u8, 166u8, 59u8, 92u8, 219u8, 184u8, 1u8, + 34u8, 241u8, 66u8, 245u8, 48u8, 174u8, 41u8, 123u8, 16u8, 178u8, 161u8, + ], + ) + } + #[doc = " The actions to perform during the start of a specific session index."] + pub fn actions_queue_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Paras", + "ActionsQueue", + Vec::new(), + [ + 209u8, 106u8, 198u8, 228u8, 148u8, 75u8, 246u8, 248u8, 12u8, 143u8, + 175u8, 56u8, 168u8, 243u8, 67u8, 166u8, 59u8, 92u8, 219u8, 184u8, 1u8, + 34u8, 241u8, 66u8, 245u8, 48u8, 174u8, 41u8, 123u8, 16u8, 178u8, 161u8, + ], + ) + } + #[doc = " Upcoming paras instantiation arguments."] + #[doc = ""] + #[doc = " NOTE that after PVF pre-checking is enabled the para genesis arg will have it's code set"] + #[doc = " to empty. Instead, the code will be saved into the storage right away via `CodeByHash`."] + pub fn upcoming_paras_genesis( + &self, + _0: impl ::std::borrow::Borrow, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_runtime_parachains::paras::ParaGenesisArgs, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Paras", + "UpcomingParasGenesis", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], + [ + 134u8, 111u8, 59u8, 49u8, 28u8, 111u8, 6u8, 57u8, 109u8, 75u8, 75u8, + 53u8, 91u8, 150u8, 86u8, 38u8, 223u8, 50u8, 107u8, 75u8, 200u8, 61u8, + 211u8, 7u8, 105u8, 251u8, 243u8, 18u8, 220u8, 195u8, 216u8, 167u8, + ], + ) + } + #[doc = " Upcoming paras instantiation arguments."] + #[doc = ""] + #[doc = " NOTE that after PVF pre-checking is enabled the para genesis arg will have it's code set"] + #[doc = " to empty. Instead, the code will be saved into the storage right away via `CodeByHash`."] + pub fn upcoming_paras_genesis_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_runtime_parachains::paras::ParaGenesisArgs, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Paras", + "UpcomingParasGenesis", + Vec::new(), + [ + 134u8, 111u8, 59u8, 49u8, 28u8, 111u8, 6u8, 57u8, 109u8, 75u8, 75u8, + 53u8, 91u8, 150u8, 86u8, 38u8, 223u8, 50u8, 107u8, 75u8, 200u8, 61u8, + 211u8, 7u8, 105u8, 251u8, 243u8, 18u8, 220u8, 195u8, 216u8, 167u8, + ], + ) + } + #[doc = " The number of reference on the validation code in [`CodeByHash`] storage."] + pub fn code_by_hash_refs( + &self, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + >, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Paras", + "CodeByHashRefs", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], + [ + 24u8, 6u8, 23u8, 50u8, 105u8, 203u8, 126u8, 161u8, 0u8, 5u8, 121u8, + 165u8, 204u8, 106u8, 68u8, 91u8, 84u8, 126u8, 29u8, 239u8, 236u8, + 138u8, 32u8, 237u8, 241u8, 226u8, 190u8, 233u8, 160u8, 143u8, 88u8, + 168u8, + ], + ) + } + #[doc = " The number of reference on the validation code in [`CodeByHash`] storage."] + pub fn code_by_hash_refs_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Paras", + "CodeByHashRefs", + Vec::new(), + [ + 24u8, 6u8, 23u8, 50u8, 105u8, 203u8, 126u8, 161u8, 0u8, 5u8, 121u8, + 165u8, 204u8, 106u8, 68u8, 91u8, 84u8, 126u8, 29u8, 239u8, 236u8, + 138u8, 32u8, 237u8, 241u8, 226u8, 190u8, 233u8, 160u8, 143u8, 88u8, + 168u8, + ], + ) + } + #[doc = " Validation code stored by its hash."] + #[doc = ""] + #[doc = " This storage is consistent with [`FutureCodeHash`], [`CurrentCodeHash`] and"] + #[doc = " [`PastCodeHash`]."] + pub fn code_by_hash( + &self, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + >, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_parachain::primitives::ValidationCode, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Paras", + "CodeByHash", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], + [ + 58u8, 104u8, 36u8, 34u8, 226u8, 210u8, 253u8, 90u8, 23u8, 3u8, 6u8, + 202u8, 9u8, 44u8, 107u8, 108u8, 41u8, 149u8, 255u8, 173u8, 119u8, + 206u8, 201u8, 180u8, 32u8, 193u8, 44u8, 232u8, 73u8, 15u8, 210u8, + 226u8, + ], + ) + } + #[doc = " Validation code stored by its hash."] + #[doc = ""] + #[doc = " This storage is consistent with [`FutureCodeHash`], [`CurrentCodeHash`] and"] + #[doc = " [`PastCodeHash`]."] + pub fn code_by_hash_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_parachain::primitives::ValidationCode, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Paras", + "CodeByHash", + Vec::new(), + [ + 58u8, 104u8, 36u8, 34u8, 226u8, 210u8, 253u8, 90u8, 23u8, 3u8, 6u8, + 202u8, 9u8, 44u8, 107u8, 108u8, 41u8, 149u8, 255u8, 173u8, 119u8, + 206u8, 201u8, 180u8, 32u8, 193u8, 44u8, 232u8, 73u8, 15u8, 210u8, + 226u8, + ], + ) + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + pub fn unsigned_priority( + &self, + ) -> ::subxt::constants::Address<::core::primitive::u64> { + ::subxt::constants::Address::new_static( + "Paras", + "UnsignedPriority", + [ + 128u8, 214u8, 205u8, 242u8, 181u8, 142u8, 124u8, 231u8, 190u8, 146u8, + 59u8, 226u8, 157u8, 101u8, 103u8, 117u8, 249u8, 65u8, 18u8, 191u8, + 103u8, 119u8, 53u8, 85u8, 81u8, 96u8, 220u8, 42u8, 184u8, 239u8, 42u8, + 246u8, + ], + ) + } + } + } + } + pub mod initializer { + use super::root_mod; + use super::runtime_types; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ForceApprove { + pub up_to: ::core::primitive::u32, + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Issue a signal to the consensus engine to forcibly act as though all parachain"] + #[doc = "blocks in all relay chain blocks up to and including the given number in the current"] + #[doc = "chain are valid and should be finalized."] + pub fn force_approve( + &self, + up_to: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Initializer", + "force_approve", + types::ForceApprove { up_to }, + [ + 28u8, 117u8, 86u8, 182u8, 19u8, 127u8, 43u8, 17u8, 153u8, 80u8, 193u8, + 53u8, 120u8, 41u8, 205u8, 23u8, 252u8, 148u8, 77u8, 227u8, 138u8, 35u8, + 182u8, 122u8, 112u8, 232u8, 246u8, 69u8, 173u8, 97u8, 42u8, 103u8, + ], + ) + } + } + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " Whether the parachains modules have been initialized within this block."] + #[doc = ""] + #[doc = " Semantically a `bool`, but this guarantees it should never hit the trie,"] + #[doc = " as this is cleared in `on_finalize` and Frame optimizes `None` values to be empty values."] + #[doc = ""] + #[doc = " As a `bool`, `set(false)` and `remove()` both lead to the next `get()` being false, but one of"] + #[doc = " them writes to the trie and one does not. This confusion makes `Option<()>` more suitable for"] + #[doc = " the semantics of this variable."] + pub fn has_initialized( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + (), + ::subxt::storage::address::Yes, + (), + (), + > { + ::subxt::storage::address::Address::new_static( + "Initializer", + "HasInitialized", + vec![], + [ + 251u8, 135u8, 247u8, 61u8, 139u8, 102u8, 12u8, 122u8, 227u8, 123u8, + 11u8, 232u8, 120u8, 80u8, 81u8, 48u8, 216u8, 115u8, 159u8, 131u8, + 133u8, 105u8, 200u8, 122u8, 114u8, 6u8, 109u8, 4u8, 164u8, 204u8, + 214u8, 111u8, + ], + ) + } + #[doc = " Buffered session changes along with the block number at which they should be applied."] + #[doc = ""] + #[doc = " Typically this will be empty or one element long. Apart from that this item never hits"] + #[doc = " the storage."] + #[doc = ""] + #[doc = " However this is a `Vec` regardless to handle various edge cases that may occur at runtime"] + #[doc = " upgrade boundaries or if governance intervenes."] pub fn buffered_session_changes (& self ,) -> :: subxt :: storage :: address :: Address :: < :: subxt :: storage :: address :: StaticStorageMapKey , :: std :: vec :: Vec < runtime_types :: polkadot_runtime_parachains :: initializer :: BufferedSessionChange > , :: subxt :: storage :: address :: Yes , :: subxt :: storage :: address :: Yes , () >{ + ::subxt::storage::address::Address::new_static( + "Initializer", + "BufferedSessionChanges", + vec![], + [ + 176u8, 60u8, 165u8, 138u8, 99u8, 140u8, 22u8, 169u8, 121u8, 65u8, + 203u8, 85u8, 39u8, 198u8, 91u8, 167u8, 118u8, 49u8, 129u8, 128u8, + 171u8, 232u8, 249u8, 39u8, 6u8, 101u8, 57u8, 193u8, 85u8, 143u8, 105u8, + 29u8, + ], + ) + } + } + } + } + pub mod dmp { + use super::root_mod; + use super::runtime_types; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod types { + use super::runtime_types; + } + pub struct TransactionApi; + impl TransactionApi {} + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " The downward messages addressed for a certain para."] + pub fn downward_message_queues( + &self, + _0: impl ::std::borrow::Borrow, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec< + runtime_types::polkadot_core_primitives::InboundDownwardMessage< + ::core::primitive::u32, + >, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Dmp", + "DownwardMessageQueues", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], + [ + 57u8, 115u8, 112u8, 195u8, 25u8, 43u8, 104u8, 199u8, 107u8, 238u8, + 93u8, 129u8, 141u8, 167u8, 167u8, 9u8, 85u8, 34u8, 53u8, 117u8, 148u8, + 246u8, 196u8, 46u8, 96u8, 114u8, 15u8, 88u8, 94u8, 40u8, 18u8, 31u8, + ], + ) + } + #[doc = " The downward messages addressed for a certain para."] + pub fn downward_message_queues_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec< + runtime_types::polkadot_core_primitives::InboundDownwardMessage< + ::core::primitive::u32, + >, + >, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Dmp", + "DownwardMessageQueues", + Vec::new(), + [ + 57u8, 115u8, 112u8, 195u8, 25u8, 43u8, 104u8, 199u8, 107u8, 238u8, + 93u8, 129u8, 141u8, 167u8, 167u8, 9u8, 85u8, 34u8, 53u8, 117u8, 148u8, + 246u8, 196u8, 46u8, 96u8, 114u8, 15u8, 88u8, 94u8, 40u8, 18u8, 31u8, + ], + ) + } + #[doc = " A mapping that stores the downward message queue MQC head for each para."] + #[doc = ""] + #[doc = " Each link in this chain has a form:"] + #[doc = " `(prev_head, B, H(M))`, where"] + #[doc = " - `prev_head`: is the previous head hash or zero if none."] + #[doc = " - `B`: is the relay-chain block number in which a message was appended."] + #[doc = " - `H(M)`: is the hash of the message being appended."] + pub fn downward_message_queue_heads( + &self, + _0: impl ::std::borrow::Borrow, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::subxt::utils::H256, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Dmp", + "DownwardMessageQueueHeads", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], + [ + 137u8, 70u8, 108u8, 184u8, 177u8, 204u8, 17u8, 187u8, 250u8, 134u8, + 85u8, 18u8, 239u8, 185u8, 167u8, 224u8, 70u8, 18u8, 38u8, 245u8, 176u8, + 122u8, 254u8, 251u8, 204u8, 126u8, 34u8, 207u8, 163u8, 104u8, 103u8, + 38u8, + ], + ) + } + #[doc = " A mapping that stores the downward message queue MQC head for each para."] + #[doc = ""] + #[doc = " Each link in this chain has a form:"] + #[doc = " `(prev_head, B, H(M))`, where"] + #[doc = " - `prev_head`: is the previous head hash or zero if none."] + #[doc = " - `B`: is the relay-chain block number in which a message was appended."] + #[doc = " - `H(M)`: is the hash of the message being appended."] + pub fn downward_message_queue_heads_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::subxt::utils::H256, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Dmp", + "DownwardMessageQueueHeads", + Vec::new(), + [ + 137u8, 70u8, 108u8, 184u8, 177u8, 204u8, 17u8, 187u8, 250u8, 134u8, + 85u8, 18u8, 239u8, 185u8, 167u8, 224u8, 70u8, 18u8, 38u8, 245u8, 176u8, + 122u8, 254u8, 251u8, 204u8, 126u8, 34u8, 207u8, 163u8, 104u8, 103u8, + 38u8, + ], + ) + } + } + } + } + pub mod ump { + use super::root_mod; + use super::runtime_types; + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub type Error = runtime_types::polkadot_runtime_parachains::ump::pallet::Error; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ServiceOverweight { + pub index: ::core::primitive::u64, + pub weight_limit: runtime_types::sp_weights::weight_v2::Weight, + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Service a single overweight upward message."] + #[doc = ""] + #[doc = "- `origin`: Must pass `ExecuteOverweightOrigin`."] + #[doc = "- `index`: The index of the overweight message to service."] + #[doc = "- `weight_limit`: The amount of weight that message execution may take."] + #[doc = ""] + #[doc = "Errors:"] + #[doc = "- `UnknownMessageIndex`: Message of `index` is unknown."] + #[doc = "- `WeightOverLimit`: Message execution may use greater than `weight_limit`."] + #[doc = ""] + #[doc = "Events:"] + #[doc = "- `OverweightServiced`: On success."] + pub fn service_overweight( + &self, + index: ::core::primitive::u64, + weight_limit: runtime_types::sp_weights::weight_v2::Weight, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Ump", + "service_overweight", + types::ServiceOverweight { + index, + weight_limit, + }, + [ + 121u8, 236u8, 235u8, 23u8, 210u8, 238u8, 238u8, 122u8, 15u8, 86u8, + 34u8, 119u8, 105u8, 100u8, 214u8, 236u8, 117u8, 39u8, 254u8, 235u8, + 189u8, 15u8, 72u8, 74u8, 225u8, 134u8, 148u8, 126u8, 31u8, 203u8, + 144u8, 106u8, + ], + ) + } + } + } + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub type Event = runtime_types::polkadot_runtime_parachains::ump::pallet::Event; + pub mod events { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Upward message is invalid XCM."] + #[doc = "\\[ id \\]"] + pub struct InvalidFormat(pub [::core::primitive::u8; 32usize]); + impl ::subxt::events::StaticEvent for InvalidFormat { + const PALLET: &'static str = "Ump"; + const EVENT: &'static str = "InvalidFormat"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct HrmpCloseChannel { - pub channel_id: runtime_types::polkadot_parachain::primitives::HrmpChannelId, + #[doc = "Upward message is unsupported version of XCM."] + #[doc = "\\[ id \\]"] + pub struct UnsupportedVersion(pub [::core::primitive::u8; 32usize]); + impl ::subxt::events::StaticEvent for UnsupportedVersion { + const PALLET: &'static str = "Ump"; + const EVENT: &'static str = "UnsupportedVersion"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -27691,13 +30036,17 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceCleanHrmp { - pub para: runtime_types::polkadot_parachain::primitives::Id, - pub inbound: ::core::primitive::u32, - pub outbound: ::core::primitive::u32, + #[doc = "Upward message executed with the given outcome."] + #[doc = "\\[ id, outcome \\]"] + pub struct ExecutedUpward( + pub [::core::primitive::u8; 32usize], + pub runtime_types::xcm::v3::traits::Outcome, + ); + impl ::subxt::events::StaticEvent for ExecutedUpward { + const PALLET: &'static str = "Ump"; + const EVENT: &'static str = "ExecutedUpward"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -27707,11 +30056,18 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceProcessHrmpOpen { - pub channels: ::core::primitive::u32, + #[doc = "The weight limit for handling upward messages was reached."] + #[doc = "\\[ id, remaining, required \\]"] + pub struct WeightExhausted( + pub [::core::primitive::u8; 32usize], + pub runtime_types::sp_weights::weight_v2::Weight, + pub runtime_types::sp_weights::weight_v2::Weight, + ); + impl ::subxt::events::StaticEvent for WeightExhausted { + const PALLET: &'static str = "Ump"; + const EVENT: &'static str = "WeightExhausted"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -27721,8 +30077,16 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceProcessHrmpClose { - pub channels: ::core::primitive::u32, + #[doc = "Some upward messages have been received and will be processed."] + #[doc = "\\[ para, count, size \\]"] + pub struct UpwardMessagesReceived( + pub runtime_types::polkadot_parachain::primitives::Id, + pub ::core::primitive::u32, + pub ::core::primitive::u32, + ); + impl ::subxt::events::StaticEvent for UpwardMessagesReceived { + const PALLET: &'static str = "Ump"; + const EVENT: &'static str = "UpwardMessagesReceived"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -27734,9 +30098,21 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct HrmpCancelOpenRequest { - pub channel_id: runtime_types::polkadot_parachain::primitives::HrmpChannelId, - pub open_requests: ::core::primitive::u32, + #[doc = "The weight budget was exceeded for an individual upward message."] + #[doc = ""] + #[doc = "This message can be later dispatched manually using `service_overweight` dispatchable"] + #[doc = "using the assigned `overweight_index`."] + #[doc = ""] + #[doc = "\\[ para, id, overweight_index, required \\]"] + pub struct OverweightEnqueued( + pub runtime_types::polkadot_parachain::primitives::Id, + pub [::core::primitive::u8; 32usize], + pub ::core::primitive::u64, + pub runtime_types::sp_weights::weight_v2::Weight, + ); + impl ::subxt::events::StaticEvent for OverweightEnqueued { + const PALLET: &'static str = "Ump"; + const EVENT: &'static str = "OverweightEnqueued"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -27748,11 +30124,423 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceOpenHrmpChannel { - pub sender: runtime_types::polkadot_parachain::primitives::Id, - pub recipient: runtime_types::polkadot_parachain::primitives::Id, - pub max_capacity: ::core::primitive::u32, - pub max_message_size: ::core::primitive::u32, + #[doc = "Upward message from the overweight queue was executed with the given actual weight"] + #[doc = "used."] + #[doc = ""] + #[doc = "\\[ overweight_index, used \\]"] + pub struct OverweightServiced( + pub ::core::primitive::u64, + pub runtime_types::sp_weights::weight_v2::Weight, + ); + impl ::subxt::events::StaticEvent for OverweightServiced { + const PALLET: &'static str = "Ump"; + const EVENT: &'static str = "OverweightServiced"; + } + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " The messages waiting to be handled by the relay-chain originating from a certain parachain."] + #[doc = ""] + #[doc = " Note that some upward messages might have been already processed by the inclusion logic. E.g."] + #[doc = " channel management messages."] + #[doc = ""] + #[doc = " The messages are processed in FIFO order."] + pub fn relay_dispatch_queues( + &self, + _0: impl ::std::borrow::Borrow, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Ump", + "RelayDispatchQueues", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], + [ + 237u8, 72u8, 167u8, 6u8, 67u8, 106u8, 186u8, 191u8, 160u8, 9u8, 62u8, + 102u8, 229u8, 164u8, 100u8, 24u8, 202u8, 109u8, 90u8, 24u8, 192u8, + 233u8, 26u8, 239u8, 23u8, 127u8, 77u8, 191u8, 144u8, 14u8, 3u8, 141u8, + ], + ) + } + #[doc = " The messages waiting to be handled by the relay-chain originating from a certain parachain."] + #[doc = ""] + #[doc = " Note that some upward messages might have been already processed by the inclusion logic. E.g."] + #[doc = " channel management messages."] + #[doc = ""] + #[doc = " The messages are processed in FIFO order."] + pub fn relay_dispatch_queues_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Ump", + "RelayDispatchQueues", + Vec::new(), + [ + 237u8, 72u8, 167u8, 6u8, 67u8, 106u8, 186u8, 191u8, 160u8, 9u8, 62u8, + 102u8, 229u8, 164u8, 100u8, 24u8, 202u8, 109u8, 90u8, 24u8, 192u8, + 233u8, 26u8, 239u8, 23u8, 127u8, 77u8, 191u8, 144u8, 14u8, 3u8, 141u8, + ], + ) + } + #[doc = " Size of the dispatch queues. Caches sizes of the queues in `RelayDispatchQueue`."] + #[doc = ""] + #[doc = " First item in the tuple is the count of messages and second"] + #[doc = " is the total length (in bytes) of the message payloads."] + #[doc = ""] + #[doc = " Note that this is an auxiliary mapping: it's possible to tell the byte size and the number of"] + #[doc = " messages only looking at `RelayDispatchQueues`. This mapping is separate to avoid the cost of"] + #[doc = " loading the whole message queue if only the total size and count are required."] + #[doc = ""] + #[doc = " Invariant:"] + #[doc = " - The set of keys should exactly match the set of keys of `RelayDispatchQueues`."] + pub fn relay_dispatch_queue_size( + &self, + _0: impl ::std::borrow::Borrow, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + (::core::primitive::u32, ::core::primitive::u32), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Ump", + "RelayDispatchQueueSize", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], + [ + 243u8, 120u8, 70u8, 2u8, 208u8, 105u8, 180u8, 25u8, 86u8, 219u8, 151u8, + 227u8, 233u8, 53u8, 151u8, 29u8, 231u8, 40u8, 84u8, 163u8, 71u8, 254u8, + 19u8, 47u8, 174u8, 63u8, 200u8, 173u8, 86u8, 199u8, 207u8, 138u8, + ], + ) + } + #[doc = " Size of the dispatch queues. Caches sizes of the queues in `RelayDispatchQueue`."] + #[doc = ""] + #[doc = " First item in the tuple is the count of messages and second"] + #[doc = " is the total length (in bytes) of the message payloads."] + #[doc = ""] + #[doc = " Note that this is an auxiliary mapping: it's possible to tell the byte size and the number of"] + #[doc = " messages only looking at `RelayDispatchQueues`. This mapping is separate to avoid the cost of"] + #[doc = " loading the whole message queue if only the total size and count are required."] + #[doc = ""] + #[doc = " Invariant:"] + #[doc = " - The set of keys should exactly match the set of keys of `RelayDispatchQueues`."] + pub fn relay_dispatch_queue_size_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + (::core::primitive::u32, ::core::primitive::u32), + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Ump", + "RelayDispatchQueueSize", + Vec::new(), + [ + 243u8, 120u8, 70u8, 2u8, 208u8, 105u8, 180u8, 25u8, 86u8, 219u8, 151u8, + 227u8, 233u8, 53u8, 151u8, 29u8, 231u8, 40u8, 84u8, 163u8, 71u8, 254u8, + 19u8, 47u8, 174u8, 63u8, 200u8, 173u8, 86u8, 199u8, 207u8, 138u8, + ], + ) + } + #[doc = " The ordered list of `ParaId`s that have a `RelayDispatchQueue` entry."] + #[doc = ""] + #[doc = " Invariant:"] + #[doc = " - The set of items from this vector should be exactly the set of the keys in"] + #[doc = " `RelayDispatchQueues` and `RelayDispatchQueueSize`."] + pub fn needs_dispatch( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "Ump", + "NeedsDispatch", + vec![], + [ + 176u8, 94u8, 152u8, 112u8, 46u8, 124u8, 89u8, 29u8, 92u8, 104u8, 192u8, + 58u8, 59u8, 186u8, 81u8, 150u8, 157u8, 61u8, 235u8, 182u8, 222u8, + 127u8, 109u8, 11u8, 104u8, 175u8, 141u8, 219u8, 15u8, 152u8, 255u8, + 40u8, + ], + ) + } + #[doc = " This is the para that gets will get dispatched first during the next upward dispatchable queue"] + #[doc = " execution round."] + #[doc = ""] + #[doc = " Invariant:"] + #[doc = " - If `Some(para)`, then `para` must be present in `NeedsDispatch`."] + pub fn next_dispatch_round_start_with( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_parachain::primitives::Id, + ::subxt::storage::address::Yes, + (), + (), + > { + ::subxt::storage::address::Address::new_static( + "Ump", + "NextDispatchRoundStartWith", + vec![], + [ + 157u8, 221u8, 6u8, 175u8, 61u8, 99u8, 250u8, 30u8, 177u8, 53u8, 37u8, + 191u8, 138u8, 65u8, 251u8, 216u8, 37u8, 84u8, 246u8, 76u8, 8u8, 29u8, + 18u8, 253u8, 143u8, 75u8, 129u8, 141u8, 48u8, 178u8, 135u8, 197u8, + ], + ) + } + #[doc = " The messages that exceeded max individual message weight budget."] + #[doc = ""] + #[doc = " These messages stay there until manually dispatched."] + pub fn overweight( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u64>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ( + runtime_types::polkadot_parachain::primitives::Id, + ::std::vec::Vec<::core::primitive::u8>, + ), + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Ump", + "Overweight", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], + [ + 49u8, 4u8, 221u8, 218u8, 249u8, 183u8, 49u8, 198u8, 48u8, 42u8, 110u8, + 67u8, 47u8, 50u8, 181u8, 141u8, 184u8, 47u8, 114u8, 3u8, 232u8, 132u8, + 32u8, 201u8, 13u8, 213u8, 175u8, 236u8, 111u8, 87u8, 146u8, 212u8, + ], + ) + } + #[doc = " The messages that exceeded max individual message weight budget."] + #[doc = ""] + #[doc = " These messages stay there until manually dispatched."] + pub fn overweight_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ( + runtime_types::polkadot_parachain::primitives::Id, + ::std::vec::Vec<::core::primitive::u8>, + ), + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Ump", + "Overweight", + Vec::new(), + [ + 49u8, 4u8, 221u8, 218u8, 249u8, 183u8, 49u8, 198u8, 48u8, 42u8, 110u8, + 67u8, 47u8, 50u8, 181u8, 141u8, 184u8, 47u8, 114u8, 3u8, 232u8, 132u8, + 32u8, 201u8, 13u8, 213u8, 175u8, 236u8, 111u8, 87u8, 146u8, 212u8, + ], + ) + } + #[doc = "Counter for the related counted storage map"] + pub fn counter_for_overweight( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "Ump", + "CounterForOverweight", + vec![], + [ + 148u8, 226u8, 248u8, 107u8, 165u8, 97u8, 218u8, 160u8, 127u8, 48u8, + 185u8, 251u8, 35u8, 137u8, 119u8, 251u8, 151u8, 167u8, 189u8, 66u8, + 80u8, 74u8, 134u8, 129u8, 222u8, 180u8, 51u8, 182u8, 50u8, 110u8, 10u8, + 43u8, + ], + ) + } + #[doc = " The number of overweight messages ever recorded in `Overweight` (and thus the lowest free"] + #[doc = " index)."] + pub fn overweight_count( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u64, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "Ump", + "OverweightCount", + vec![], + [ + 102u8, 180u8, 196u8, 148u8, 115u8, 62u8, 46u8, 238u8, 97u8, 116u8, + 117u8, 42u8, 14u8, 5u8, 72u8, 237u8, 230u8, 46u8, 150u8, 126u8, 89u8, + 64u8, 233u8, 166u8, 180u8, 137u8, 52u8, 233u8, 252u8, 255u8, 36u8, + 20u8, + ], + ) + } + } + } + } + pub mod hrmp { + use super::root_mod; + use super::runtime_types; + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub type Error = runtime_types::polkadot_runtime_parachains::hrmp::pallet::Error; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct HrmpInitOpenChannel { + pub recipient: runtime_types::polkadot_parachain::primitives::Id, + pub proposed_max_capacity: ::core::primitive::u32, + pub proposed_max_message_size: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct HrmpAcceptOpenChannel { + pub sender: runtime_types::polkadot_parachain::primitives::Id, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct HrmpCloseChannel { + pub channel_id: runtime_types::polkadot_parachain::primitives::HrmpChannelId, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ForceCleanHrmp { + pub para: runtime_types::polkadot_parachain::primitives::Id, + pub inbound: ::core::primitive::u32, + pub outbound: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ForceProcessHrmpOpen { + pub channels: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ForceProcessHrmpClose { + pub channels: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct HrmpCancelOpenRequest { + pub channel_id: runtime_types::polkadot_parachain::primitives::HrmpChannelId, + pub open_requests: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ForceOpenHrmpChannel { + pub sender: runtime_types::polkadot_parachain::primitives::Id, + pub recipient: runtime_types::polkadot_parachain::primitives::Id, + pub max_capacity: ::core::primitive::u32, + pub max_message_size: ::core::primitive::u32, + } } pub struct TransactionApi; impl TransactionApi { @@ -27771,11 +30559,11 @@ pub mod api { recipient: runtime_types::polkadot_parachain::primitives::Id, proposed_max_capacity: ::core::primitive::u32, proposed_max_message_size: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Hrmp", "hrmp_init_open_channel", - HrmpInitOpenChannel { + types::HrmpInitOpenChannel { recipient, proposed_max_capacity, proposed_max_message_size, @@ -27794,11 +30582,11 @@ pub mod api { pub fn hrmp_accept_open_channel( &self, sender: runtime_types::polkadot_parachain::primitives::Id, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Hrmp", "hrmp_accept_open_channel", - HrmpAcceptOpenChannel { sender }, + types::HrmpAcceptOpenChannel { sender }, [ 75u8, 111u8, 52u8, 164u8, 204u8, 100u8, 204u8, 111u8, 127u8, 84u8, 60u8, 136u8, 95u8, 255u8, 48u8, 157u8, 189u8, 76u8, 33u8, 177u8, 223u8, @@ -27813,11 +30601,11 @@ pub mod api { pub fn hrmp_close_channel( &self, channel_id: runtime_types::polkadot_parachain::primitives::HrmpChannelId, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Hrmp", "hrmp_close_channel", - HrmpCloseChannel { channel_id }, + types::HrmpCloseChannel { channel_id }, [ 11u8, 202u8, 76u8, 107u8, 213u8, 21u8, 191u8, 190u8, 40u8, 229u8, 60u8, 115u8, 232u8, 136u8, 41u8, 114u8, 21u8, 19u8, 238u8, 236u8, 202u8, @@ -27837,11 +30625,11 @@ pub mod api { para: runtime_types::polkadot_parachain::primitives::Id, inbound: ::core::primitive::u32, outbound: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Hrmp", "force_clean_hrmp", - ForceCleanHrmp { + types::ForceCleanHrmp { para, inbound, outbound, @@ -27863,11 +30651,11 @@ pub mod api { pub fn force_process_hrmp_open( &self, channels: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Hrmp", "force_process_hrmp_open", - ForceProcessHrmpOpen { channels }, + types::ForceProcessHrmpOpen { channels }, [ 231u8, 80u8, 233u8, 15u8, 131u8, 167u8, 223u8, 28u8, 182u8, 185u8, 213u8, 24u8, 154u8, 160u8, 68u8, 94u8, 160u8, 59u8, 78u8, 85u8, 85u8, @@ -27885,11 +30673,11 @@ pub mod api { pub fn force_process_hrmp_close( &self, channels: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Hrmp", "force_process_hrmp_close", - ForceProcessHrmpClose { channels }, + types::ForceProcessHrmpClose { channels }, [ 248u8, 138u8, 30u8, 151u8, 53u8, 16u8, 44u8, 116u8, 51u8, 194u8, 173u8, 252u8, 143u8, 53u8, 184u8, 129u8, 80u8, 80u8, 25u8, 118u8, 47u8, 183u8, @@ -27909,11 +30697,11 @@ pub mod api { &self, channel_id: runtime_types::polkadot_parachain::primitives::HrmpChannelId, open_requests: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Hrmp", "hrmp_cancel_open_request", - HrmpCancelOpenRequest { + types::HrmpCancelOpenRequest { channel_id, open_requests, }, @@ -27937,11 +30725,11 @@ pub mod api { recipient: runtime_types::polkadot_parachain::primitives::Id, max_capacity: ::core::primitive::u32, max_message_size: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Hrmp", "force_open_hrmp_channel", - ForceOpenHrmpChannel { + types::ForceOpenHrmpChannel { sender, recipient, max_capacity, @@ -28679,7 +31467,7 @@ pub mod api { &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec, + ::std::vec::Vec, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), @@ -28725,7 +31513,7 @@ pub mod api { _0: impl ::std::borrow::Borrow<::core::primitive::u32>, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_primitives::v2::SessionInfo, + runtime_types::polkadot_primitives::v4::SessionInfo, ::subxt::storage::address::Yes, (), ::subxt::storage::address::Yes, @@ -28751,7 +31539,7 @@ pub mod api { &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_primitives::v2::SessionInfo, + runtime_types::polkadot_primitives::v4::SessionInfo, (), (), ::subxt::storage::address::Yes, @@ -28813,6 +31601,51 @@ pub mod api { ], ) } + #[doc = " Executor parameter set for a given session index"] + pub fn session_executor_params( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_primitives::v4::executor_params::ExecutorParams, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "ParaSessionInfo", + "SessionExecutorParams", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], + [ + 182u8, 246u8, 210u8, 246u8, 208u8, 93u8, 19u8, 9u8, 132u8, 75u8, 158u8, + 40u8, 146u8, 8u8, 143u8, 37u8, 148u8, 19u8, 89u8, 70u8, 151u8, 143u8, + 143u8, 62u8, 127u8, 208u8, 74u8, 177u8, 82u8, 55u8, 226u8, 43u8, + ], + ) + } + #[doc = " Executor parameter set for a given session index"] + pub fn session_executor_params_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_primitives::v4::executor_params::ExecutorParams, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "ParaSessionInfo", + "SessionExecutorParams", + Vec::new(), + [ + 182u8, 246u8, 210u8, 246u8, 208u8, 93u8, 19u8, 9u8, 132u8, 75u8, 158u8, + 40u8, 146u8, 8u8, 143u8, 37u8, 148u8, 19u8, 89u8, 70u8, 151u8, 143u8, + 143u8, 62u8, 127u8, 208u8, 74u8, 177u8, 82u8, 55u8, 226u8, 43u8, + ], + ) + } } } } @@ -28826,24 +31659,27 @@ pub mod api { use super::root_mod; use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceUnfreeze; + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ForceUnfreeze; + } pub struct TransactionApi; impl TransactionApi { - pub fn force_unfreeze(&self) -> ::subxt::tx::Payload { + pub fn force_unfreeze(&self) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "ParasDisputes", "force_unfreeze", - ForceUnfreeze {}, + types::ForceUnfreeze {}, [ 212u8, 211u8, 58u8, 159u8, 23u8, 220u8, 64u8, 175u8, 65u8, 50u8, 192u8, 122u8, 113u8, 189u8, 74u8, 191u8, 48u8, 93u8, 251u8, 50u8, 237u8, @@ -28897,23 +31733,6 @@ pub mod api { const PALLET: &'static str = "ParasDisputes"; const EVENT: &'static str = "DisputeConcluded"; } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A dispute has timed out due to insufficient participation."] - #[doc = "`\\[para id, candidate hash\\]`"] - pub struct DisputeTimedOut(pub runtime_types::polkadot_core_primitives::CandidateHash); - impl ::subxt::events::StaticEvent for DisputeTimedOut { - const PALLET: &'static str = "ParasDisputes"; - const EVENT: &'static str = "DisputeTimedOut"; - } #[derive( :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, @@ -28970,7 +31789,7 @@ pub mod api { >, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_primitives::v2::DisputeState<::core::primitive::u32>, + runtime_types::polkadot_primitives::v4::DisputeState<::core::primitive::u32>, ::subxt::storage::address::Yes, (), ::subxt::storage::address::Yes, @@ -28995,7 +31814,7 @@ pub mod api { &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_primitives::v2::DisputeState<::core::primitive::u32>, + runtime_types::polkadot_primitives::v4::DisputeState<::core::primitive::u32>, (), (), ::subxt::storage::address::Yes, @@ -29012,9 +31831,9 @@ pub mod api { ], ) } - #[doc = " All included blocks on the chain, as well as the block number in this chain that"] - #[doc = " should be reverted back to if the candidate is disputed and determined to be invalid."] - pub fn included( + #[doc = " Backing votes stored for each dispute."] + #[doc = " This storage is used for slashing."] + pub fn backers_on_disputes( &self, _0: impl ::std::borrow::Borrow<::core::primitive::u32>, _1: impl ::std::borrow::Borrow< @@ -29022,101 +31841,97 @@ pub mod api { >, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, + ::std::vec::Vec, ::subxt::storage::address::Yes, (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( "ParasDisputes", - "Included", + "BackersOnDisputes", vec![ ::subxt::storage::address::make_static_storage_map_key(_0.borrow()), ::subxt::storage::address::make_static_storage_map_key(_1.borrow()), ], [ - 129u8, 50u8, 76u8, 60u8, 82u8, 106u8, 248u8, 164u8, 152u8, 80u8, 58u8, - 185u8, 211u8, 225u8, 122u8, 100u8, 234u8, 241u8, 123u8, 205u8, 4u8, - 8u8, 193u8, 116u8, 167u8, 158u8, 252u8, 223u8, 204u8, 226u8, 74u8, - 195u8, + 78u8, 51u8, 233u8, 125u8, 212u8, 66u8, 171u8, 4u8, 46u8, 64u8, 92u8, + 237u8, 177u8, 72u8, 36u8, 163u8, 64u8, 238u8, 47u8, 61u8, 34u8, 249u8, + 178u8, 133u8, 129u8, 52u8, 103u8, 14u8, 91u8, 184u8, 192u8, 237u8, ], ) } - #[doc = " All included blocks on the chain, as well as the block number in this chain that"] - #[doc = " should be reverted back to if the candidate is disputed and determined to be invalid."] - pub fn included_root( + #[doc = " Backing votes stored for each dispute."] + #[doc = " This storage is used for slashing."] + pub fn backers_on_disputes_root( &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, + ::std::vec::Vec, (), (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( "ParasDisputes", - "Included", + "BackersOnDisputes", Vec::new(), [ - 129u8, 50u8, 76u8, 60u8, 82u8, 106u8, 248u8, 164u8, 152u8, 80u8, 58u8, - 185u8, 211u8, 225u8, 122u8, 100u8, 234u8, 241u8, 123u8, 205u8, 4u8, - 8u8, 193u8, 116u8, 167u8, 158u8, 252u8, 223u8, 204u8, 226u8, 74u8, - 195u8, + 78u8, 51u8, 233u8, 125u8, 212u8, 66u8, 171u8, 4u8, 46u8, 64u8, 92u8, + 237u8, 177u8, 72u8, 36u8, 163u8, 64u8, 238u8, 47u8, 61u8, 34u8, 249u8, + 178u8, 133u8, 129u8, 52u8, 103u8, 14u8, 91u8, 184u8, 192u8, 237u8, ], ) } - #[doc = " Maps session indices to a vector indicating the number of potentially-spam disputes"] - #[doc = " each validator is participating in. Potentially-spam disputes are remote disputes which have"] - #[doc = " fewer than `byzantine_threshold + 1` validators."] - #[doc = ""] - #[doc = " The i'th entry of the vector corresponds to the i'th validator in the session."] - pub fn spam_slots( + #[doc = " All included blocks on the chain, as well as the block number in this chain that"] + #[doc = " should be reverted back to if the candidate is disputed and determined to be invalid."] + pub fn included( &self, _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + _1: impl ::std::borrow::Borrow< + runtime_types::polkadot_core_primitives::CandidateHash, + >, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec<::core::primitive::u32>, + ::core::primitive::u32, ::subxt::storage::address::Yes, (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( "ParasDisputes", - "SpamSlots", - vec![::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - )], + "Included", + vec![ + ::subxt::storage::address::make_static_storage_map_key(_0.borrow()), + ::subxt::storage::address::make_static_storage_map_key(_1.borrow()), + ], [ - 172u8, 23u8, 120u8, 188u8, 71u8, 248u8, 252u8, 41u8, 132u8, 221u8, - 98u8, 215u8, 33u8, 242u8, 168u8, 196u8, 90u8, 123u8, 190u8, 27u8, - 147u8, 6u8, 196u8, 175u8, 198u8, 216u8, 50u8, 74u8, 138u8, 122u8, - 251u8, 238u8, + 129u8, 50u8, 76u8, 60u8, 82u8, 106u8, 248u8, 164u8, 152u8, 80u8, 58u8, + 185u8, 211u8, 225u8, 122u8, 100u8, 234u8, 241u8, 123u8, 205u8, 4u8, + 8u8, 193u8, 116u8, 167u8, 158u8, 252u8, 223u8, 204u8, 226u8, 74u8, + 195u8, ], ) } - #[doc = " Maps session indices to a vector indicating the number of potentially-spam disputes"] - #[doc = " each validator is participating in. Potentially-spam disputes are remote disputes which have"] - #[doc = " fewer than `byzantine_threshold + 1` validators."] - #[doc = ""] - #[doc = " The i'th entry of the vector corresponds to the i'th validator in the session."] - pub fn spam_slots_root( + #[doc = " All included blocks on the chain, as well as the block number in this chain that"] + #[doc = " should be reverted back to if the candidate is disputed and determined to be invalid."] + pub fn included_root( &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec<::core::primitive::u32>, + ::core::primitive::u32, (), (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( "ParasDisputes", - "SpamSlots", + "Included", Vec::new(), [ - 172u8, 23u8, 120u8, 188u8, 71u8, 248u8, 252u8, 41u8, 132u8, 221u8, - 98u8, 215u8, 33u8, 242u8, 168u8, 196u8, 90u8, 123u8, 190u8, 27u8, - 147u8, 6u8, 196u8, 175u8, 198u8, 216u8, 50u8, 74u8, 138u8, 122u8, - 251u8, 238u8, + 129u8, 50u8, 76u8, 60u8, 82u8, 106u8, 248u8, 164u8, 152u8, 80u8, 58u8, + 185u8, 211u8, 225u8, 122u8, 100u8, 234u8, 241u8, 123u8, 205u8, 4u8, + 8u8, 193u8, 116u8, 167u8, 158u8, 252u8, 223u8, 204u8, 226u8, 74u8, + 195u8, ], ) } @@ -29158,129 +31973,134 @@ pub mod api { use super::root_mod; use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - 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, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceRegister { - pub who: ::subxt::utils::AccountId32, - pub deposit: ::core::primitive::u128, - pub id: runtime_types::polkadot_parachain::primitives::Id, - pub genesis_head: runtime_types::polkadot_parachain::primitives::HeadData, - pub validation_code: runtime_types::polkadot_parachain::primitives::ValidationCode, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Deregister { - pub id: runtime_types::polkadot_parachain::primitives::Id, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Swap { - pub id: runtime_types::polkadot_parachain::primitives::Id, - pub other: runtime_types::polkadot_parachain::primitives::Id, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RemoveLock { - pub para: runtime_types::polkadot_parachain::primitives::Id, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Reserve; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AddLock { - pub para: runtime_types::polkadot_parachain::primitives::Id, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ScheduleCodeUpgrade { - pub para: runtime_types::polkadot_parachain::primitives::Id, - pub new_code: runtime_types::polkadot_parachain::primitives::ValidationCode, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetCurrentHead { - pub para: runtime_types::polkadot_parachain::primitives::Id, - pub new_head: runtime_types::polkadot_parachain::primitives::HeadData, + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + 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, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ForceRegister { + pub who: ::subxt::utils::AccountId32, + pub deposit: ::core::primitive::u128, + pub id: runtime_types::polkadot_parachain::primitives::Id, + pub genesis_head: runtime_types::polkadot_parachain::primitives::HeadData, + pub validation_code: + runtime_types::polkadot_parachain::primitives::ValidationCode, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Deregister { + pub id: runtime_types::polkadot_parachain::primitives::Id, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Swap { + pub id: runtime_types::polkadot_parachain::primitives::Id, + pub other: runtime_types::polkadot_parachain::primitives::Id, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct RemoveLock { + pub para: runtime_types::polkadot_parachain::primitives::Id, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Reserve; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct AddLock { + pub para: runtime_types::polkadot_parachain::primitives::Id, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ScheduleCodeUpgrade { + pub para: runtime_types::polkadot_parachain::primitives::Id, + pub new_code: runtime_types::polkadot_parachain::primitives::ValidationCode, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetCurrentHead { + pub para: runtime_types::polkadot_parachain::primitives::Id, + pub new_head: runtime_types::polkadot_parachain::primitives::HeadData, + } } pub struct TransactionApi; impl TransactionApi { @@ -29303,11 +32123,11 @@ 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::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Registrar", "register", - Register { + types::Register { id, genesis_head, validation_code, @@ -29332,11 +32152,11 @@ 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::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Registrar", "force_register", - ForceRegister { + types::ForceRegister { who, deposit, id, @@ -29356,11 +32176,11 @@ pub mod api { pub fn deregister( &self, id: runtime_types::polkadot_parachain::primitives::Id, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Registrar", "deregister", - Deregister { id }, + types::Deregister { id }, [ 137u8, 9u8, 146u8, 11u8, 126u8, 125u8, 186u8, 222u8, 246u8, 199u8, 94u8, 229u8, 147u8, 245u8, 213u8, 51u8, 203u8, 181u8, 78u8, 87u8, 18u8, @@ -29383,11 +32203,11 @@ pub mod api { &self, id: runtime_types::polkadot_parachain::primitives::Id, other: runtime_types::polkadot_parachain::primitives::Id, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Registrar", "swap", - Swap { id, other }, + types::Swap { id, other }, [ 238u8, 154u8, 249u8, 250u8, 57u8, 242u8, 47u8, 17u8, 50u8, 70u8, 124u8, 189u8, 193u8, 137u8, 107u8, 138u8, 216u8, 137u8, 160u8, 103u8, 192u8, @@ -29402,11 +32222,11 @@ pub mod api { pub fn remove_lock( &self, para: runtime_types::polkadot_parachain::primitives::Id, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Registrar", "remove_lock", - RemoveLock { para }, + types::RemoveLock { para }, [ 93u8, 50u8, 223u8, 180u8, 185u8, 3u8, 225u8, 27u8, 233u8, 205u8, 101u8, 86u8, 122u8, 19u8, 147u8, 8u8, 202u8, 151u8, 80u8, 24u8, 196u8, 2u8, @@ -29428,11 +32248,11 @@ pub mod api { #[doc = ""] #[doc = "## Events"] #[doc = "The `Reserved` event is emitted in case of success, which provides the ID reserved for use."] - pub fn reserve(&self) -> ::subxt::tx::Payload { + pub fn reserve(&self) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Registrar", "reserve", - Reserve {}, + types::Reserve {}, [ 22u8, 210u8, 13u8, 54u8, 253u8, 13u8, 89u8, 174u8, 232u8, 119u8, 148u8, 206u8, 130u8, 133u8, 199u8, 127u8, 201u8, 205u8, 8u8, 213u8, 108u8, @@ -29448,11 +32268,11 @@ pub mod api { pub fn add_lock( &self, para: runtime_types::polkadot_parachain::primitives::Id, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Registrar", "add_lock", - AddLock { para }, + types::AddLock { para }, [ 99u8, 199u8, 192u8, 92u8, 180u8, 52u8, 86u8, 165u8, 249u8, 60u8, 72u8, 79u8, 233u8, 5u8, 83u8, 194u8, 48u8, 83u8, 249u8, 218u8, 141u8, 234u8, @@ -29467,11 +32287,11 @@ pub mod api { &self, para: runtime_types::polkadot_parachain::primitives::Id, new_code: runtime_types::polkadot_parachain::primitives::ValidationCode, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Registrar", "schedule_code_upgrade", - ScheduleCodeUpgrade { para, new_code }, + types::ScheduleCodeUpgrade { para, new_code }, [ 67u8, 11u8, 148u8, 83u8, 36u8, 106u8, 97u8, 77u8, 79u8, 114u8, 249u8, 218u8, 207u8, 89u8, 209u8, 120u8, 45u8, 101u8, 69u8, 21u8, 61u8, 158u8, @@ -29486,11 +32306,11 @@ pub mod api { &self, para: runtime_types::polkadot_parachain::primitives::Id, new_head: runtime_types::polkadot_parachain::primitives::HeadData, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Registrar", "set_current_head", - SetCurrentHead { para, new_head }, + types::SetCurrentHead { para, new_head }, [ 103u8, 240u8, 206u8, 26u8, 120u8, 189u8, 94u8, 221u8, 174u8, 225u8, 210u8, 176u8, 217u8, 18u8, 94u8, 216u8, 77u8, 205u8, 86u8, 196u8, @@ -29734,48 +32554,51 @@ pub mod api { use super::root_mod; use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceLease { - pub para: runtime_types::polkadot_parachain::primitives::Id, - pub leaser: ::subxt::utils::AccountId32, - pub amount: ::core::primitive::u128, - pub period_begin: ::core::primitive::u32, - pub period_count: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ClearAllLeases { - pub para: runtime_types::polkadot_parachain::primitives::Id, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct TriggerOnboard { - pub para: runtime_types::polkadot_parachain::primitives::Id, + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ForceLease { + pub para: runtime_types::polkadot_parachain::primitives::Id, + pub leaser: ::subxt::utils::AccountId32, + pub amount: ::core::primitive::u128, + pub period_begin: ::core::primitive::u32, + pub period_count: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ClearAllLeases { + pub para: runtime_types::polkadot_parachain::primitives::Id, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct TriggerOnboard { + pub para: runtime_types::polkadot_parachain::primitives::Id, + } } pub struct TransactionApi; impl TransactionApi { @@ -29790,11 +32613,11 @@ pub mod api { amount: ::core::primitive::u128, period_begin: ::core::primitive::u32, period_count: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Slots", "force_lease", - ForceLease { + types::ForceLease { para, leaser, amount, @@ -29814,11 +32637,11 @@ pub mod api { pub fn clear_all_leases( &self, para: runtime_types::polkadot_parachain::primitives::Id, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Slots", "clear_all_leases", - ClearAllLeases { para }, + types::ClearAllLeases { para }, [ 16u8, 14u8, 185u8, 45u8, 149u8, 70u8, 177u8, 133u8, 130u8, 173u8, 196u8, 244u8, 77u8, 63u8, 218u8, 64u8, 108u8, 83u8, 84u8, 184u8, 175u8, @@ -29836,11 +32659,11 @@ pub mod api { pub fn trigger_onboard( &self, para: runtime_types::polkadot_parachain::primitives::Id, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Slots", "trigger_onboard", - TriggerOnboard { para }, + types::TriggerOnboard { para }, [ 74u8, 158u8, 122u8, 37u8, 34u8, 62u8, 61u8, 218u8, 94u8, 222u8, 1u8, 153u8, 131u8, 215u8, 157u8, 180u8, 98u8, 130u8, 151u8, 179u8, 22u8, @@ -30033,55 +32856,58 @@ pub mod api { use super::root_mod; use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct NewAuction { - #[codec(compact)] - pub duration: ::core::primitive::u32, - #[codec(compact)] - pub lease_period_index: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Bid { - #[codec(compact)] - pub para: runtime_types::polkadot_parachain::primitives::Id, - #[codec(compact)] - pub auction_index: ::core::primitive::u32, - #[codec(compact)] - pub first_slot: ::core::primitive::u32, - #[codec(compact)] - pub last_slot: ::core::primitive::u32, - #[codec(compact)] - pub amount: ::core::primitive::u128, + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct NewAuction { + #[codec(compact)] + pub duration: ::core::primitive::u32, + #[codec(compact)] + pub lease_period_index: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Bid { + #[codec(compact)] + pub para: runtime_types::polkadot_parachain::primitives::Id, + #[codec(compact)] + pub auction_index: ::core::primitive::u32, + #[codec(compact)] + pub first_slot: ::core::primitive::u32, + #[codec(compact)] + pub last_slot: ::core::primitive::u32, + #[codec(compact)] + pub amount: ::core::primitive::u128, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct CancelAuction; } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CancelAuction; pub struct TransactionApi; impl TransactionApi { #[doc = "Create a new auction."] @@ -30093,11 +32919,11 @@ pub mod api { &self, duration: ::core::primitive::u32, lease_period_index: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Auctions", "new_auction", - NewAuction { + types::NewAuction { duration, lease_period_index, }, @@ -30132,11 +32958,11 @@ pub mod api { first_slot: ::core::primitive::u32, last_slot: ::core::primitive::u32, amount: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Auctions", "bid", - Bid { + types::Bid { para, auction_index, first_slot, @@ -30153,11 +32979,11 @@ pub mod api { #[doc = "Cancel an in-progress auction."] #[doc = ""] #[doc = "Can only be called by Root origin."] - pub fn cancel_auction(&self) -> ::subxt::tx::Payload { + pub fn cancel_auction(&self) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Auctions", "cancel_auction", - CancelAuction {}, + types::CancelAuction {}, [ 182u8, 223u8, 178u8, 136u8, 1u8, 115u8, 229u8, 78u8, 166u8, 128u8, 28u8, 106u8, 6u8, 248u8, 46u8, 55u8, 110u8, 120u8, 213u8, 11u8, 90u8, @@ -30548,153 +33374,158 @@ pub mod api { use super::root_mod; use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Create { - #[codec(compact)] - pub index: runtime_types::polkadot_parachain::primitives::Id, - #[codec(compact)] - pub cap: ::core::primitive::u128, - #[codec(compact)] - pub first_period: ::core::primitive::u32, - #[codec(compact)] - pub last_period: ::core::primitive::u32, - #[codec(compact)] - pub end: ::core::primitive::u32, - pub verifier: ::core::option::Option, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Contribute { - #[codec(compact)] - pub index: runtime_types::polkadot_parachain::primitives::Id, - #[codec(compact)] - pub value: ::core::primitive::u128, - pub signature: ::core::option::Option, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Withdraw { - pub who: ::subxt::utils::AccountId32, - #[codec(compact)] - pub index: runtime_types::polkadot_parachain::primitives::Id, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Refund { - #[codec(compact)] - pub index: runtime_types::polkadot_parachain::primitives::Id, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Dissolve { - #[codec(compact)] - pub index: runtime_types::polkadot_parachain::primitives::Id, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Edit { - #[codec(compact)] - pub index: runtime_types::polkadot_parachain::primitives::Id, - #[codec(compact)] - pub cap: ::core::primitive::u128, - #[codec(compact)] - pub first_period: ::core::primitive::u32, - #[codec(compact)] - pub last_period: ::core::primitive::u32, - #[codec(compact)] - pub end: ::core::primitive::u32, - pub verifier: ::core::option::Option, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AddMemo { - pub index: runtime_types::polkadot_parachain::primitives::Id, - pub memo: ::std::vec::Vec<::core::primitive::u8>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Poke { - pub index: runtime_types::polkadot_parachain::primitives::Id, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ContributeAll { - #[codec(compact)] - pub index: runtime_types::polkadot_parachain::primitives::Id, - pub signature: ::core::option::Option, + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Create { + #[codec(compact)] + pub index: runtime_types::polkadot_parachain::primitives::Id, + #[codec(compact)] + pub cap: ::core::primitive::u128, + #[codec(compact)] + pub first_period: ::core::primitive::u32, + #[codec(compact)] + pub last_period: ::core::primitive::u32, + #[codec(compact)] + pub end: ::core::primitive::u32, + pub verifier: ::core::option::Option, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Contribute { + #[codec(compact)] + pub index: runtime_types::polkadot_parachain::primitives::Id, + #[codec(compact)] + pub value: ::core::primitive::u128, + pub signature: + ::core::option::Option, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Withdraw { + pub who: ::subxt::utils::AccountId32, + #[codec(compact)] + pub index: runtime_types::polkadot_parachain::primitives::Id, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Refund { + #[codec(compact)] + pub index: runtime_types::polkadot_parachain::primitives::Id, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Dissolve { + #[codec(compact)] + pub index: runtime_types::polkadot_parachain::primitives::Id, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Edit { + #[codec(compact)] + pub index: runtime_types::polkadot_parachain::primitives::Id, + #[codec(compact)] + pub cap: ::core::primitive::u128, + #[codec(compact)] + pub first_period: ::core::primitive::u32, + #[codec(compact)] + pub last_period: ::core::primitive::u32, + #[codec(compact)] + pub end: ::core::primitive::u32, + pub verifier: ::core::option::Option, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct AddMemo { + pub index: runtime_types::polkadot_parachain::primitives::Id, + pub memo: ::std::vec::Vec<::core::primitive::u8>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Poke { + pub index: runtime_types::polkadot_parachain::primitives::Id, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ContributeAll { + #[codec(compact)] + pub index: runtime_types::polkadot_parachain::primitives::Id, + pub signature: + ::core::option::Option, + } } pub struct TransactionApi; impl TransactionApi { @@ -30710,11 +33541,11 @@ pub mod api { last_period: ::core::primitive::u32, end: ::core::primitive::u32, verifier: ::core::option::Option, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Crowdloan", "create", - Create { + types::Create { index, cap, first_period, @@ -30736,11 +33567,11 @@ pub mod api { index: runtime_types::polkadot_parachain::primitives::Id, value: ::core::primitive::u128, signature: ::core::option::Option, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Crowdloan", "contribute", - Contribute { + types::Contribute { index, value, signature, @@ -30774,11 +33605,11 @@ pub mod api { &self, who: ::subxt::utils::AccountId32, index: runtime_types::polkadot_parachain::primitives::Id, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Crowdloan", "withdraw", - Withdraw { who, index }, + types::Withdraw { who, index }, [ 147u8, 177u8, 116u8, 152u8, 9u8, 102u8, 4u8, 201u8, 204u8, 145u8, 104u8, 226u8, 86u8, 211u8, 66u8, 109u8, 109u8, 139u8, 229u8, 97u8, @@ -30795,11 +33626,11 @@ pub mod api { pub fn refund( &self, index: runtime_types::polkadot_parachain::primitives::Id, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Crowdloan", "refund", - Refund { index }, + types::Refund { index }, [ 223u8, 64u8, 5u8, 135u8, 15u8, 234u8, 60u8, 114u8, 199u8, 216u8, 73u8, 165u8, 198u8, 34u8, 140u8, 142u8, 214u8, 254u8, 203u8, 163u8, 224u8, @@ -30812,11 +33643,11 @@ pub mod api { pub fn dissolve( &self, index: runtime_types::polkadot_parachain::primitives::Id, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Crowdloan", "dissolve", - Dissolve { index }, + types::Dissolve { index }, [ 100u8, 67u8, 105u8, 3u8, 213u8, 149u8, 201u8, 146u8, 241u8, 62u8, 31u8, 108u8, 58u8, 30u8, 241u8, 141u8, 134u8, 115u8, 56u8, 131u8, 60u8, 75u8, @@ -30835,11 +33666,11 @@ pub mod api { last_period: ::core::primitive::u32, end: ::core::primitive::u32, verifier: ::core::option::Option, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Crowdloan", "edit", - Edit { + types::Edit { index, cap, first_period, @@ -30862,11 +33693,11 @@ pub mod api { &self, index: runtime_types::polkadot_parachain::primitives::Id, memo: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Crowdloan", "add_memo", - AddMemo { index, memo }, + types::AddMemo { index, memo }, [ 104u8, 199u8, 143u8, 251u8, 28u8, 49u8, 144u8, 186u8, 83u8, 108u8, 26u8, 127u8, 22u8, 141u8, 48u8, 62u8, 194u8, 193u8, 97u8, 10u8, 84u8, @@ -30880,11 +33711,11 @@ pub mod api { pub fn poke( &self, index: runtime_types::polkadot_parachain::primitives::Id, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Crowdloan", "poke", - Poke { index }, + types::Poke { index }, [ 118u8, 60u8, 131u8, 17u8, 27u8, 153u8, 57u8, 24u8, 191u8, 211u8, 101u8, 123u8, 34u8, 145u8, 193u8, 113u8, 244u8, 162u8, 148u8, 143u8, 81u8, @@ -30898,11 +33729,11 @@ pub mod api { &self, index: runtime_types::polkadot_parachain::primitives::Id, signature: ::core::option::Option, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Crowdloan", "contribute_all", - ContributeAll { index, signature }, + types::ContributeAll { index, signature }, [ 94u8, 61u8, 105u8, 107u8, 204u8, 18u8, 223u8, 242u8, 19u8, 162u8, 205u8, 130u8, 203u8, 73u8, 42u8, 85u8, 208u8, 157u8, 115u8, 112u8, @@ -31294,153 +34125,156 @@ pub mod api { use super::root_mod; use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Send { - pub dest: ::std::boxed::Box, - pub message: ::std::boxed::Box, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct TeleportAssets { - pub dest: ::std::boxed::Box, - pub beneficiary: ::std::boxed::Box, - pub assets: ::std::boxed::Box, - pub fee_asset_item: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ReserveTransferAssets { - pub dest: ::std::boxed::Box, - pub beneficiary: ::std::boxed::Box, - pub assets: ::std::boxed::Box, - pub fee_asset_item: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Execute { - pub message: ::std::boxed::Box, - pub max_weight: ::core::primitive::u64, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceXcmVersion { - pub location: - ::std::boxed::Box, - pub xcm_version: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceDefaultXcmVersion { - pub maybe_xcm_version: ::core::option::Option<::core::primitive::u32>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceSubscribeVersionNotify { - pub location: ::std::boxed::Box, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceUnsubscribeVersionNotify { - pub location: ::std::boxed::Box, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct LimitedReserveTransferAssets { - 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, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct LimitedTeleportAssets { - 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 types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Send { + pub dest: ::std::boxed::Box, + pub message: ::std::boxed::Box, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct TeleportAssets { + pub dest: ::std::boxed::Box, + pub beneficiary: ::std::boxed::Box, + pub assets: ::std::boxed::Box, + pub fee_asset_item: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ReserveTransferAssets { + pub dest: ::std::boxed::Box, + pub beneficiary: ::std::boxed::Box, + pub assets: ::std::boxed::Box, + pub fee_asset_item: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Execute { + pub message: ::std::boxed::Box, + pub max_weight: runtime_types::sp_weights::weight_v2::Weight, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ForceXcmVersion { + pub location: + ::std::boxed::Box, + pub xcm_version: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ForceDefaultXcmVersion { + pub maybe_xcm_version: ::core::option::Option<::core::primitive::u32>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ForceSubscribeVersionNotify { + pub location: ::std::boxed::Box, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ForceUnsubscribeVersionNotify { + pub location: ::std::boxed::Box, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct LimitedReserveTransferAssets { + 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::v3::WeightLimit, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct LimitedTeleportAssets { + 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::v3::WeightLimit, + } } pub struct TransactionApi; impl TransactionApi { @@ -31448,18 +34282,18 @@ pub mod api { &self, dest: runtime_types::xcm::VersionedMultiLocation, message: runtime_types::xcm::VersionedXcm, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "XcmPallet", "send", - Send { + types::Send { dest: ::std::boxed::Box::new(dest), message: ::std::boxed::Box::new(message), }, [ - 190u8, 88u8, 197u8, 248u8, 111u8, 198u8, 199u8, 206u8, 39u8, 121u8, - 23u8, 121u8, 93u8, 82u8, 22u8, 61u8, 96u8, 210u8, 142u8, 249u8, 195u8, - 78u8, 44u8, 8u8, 118u8, 120u8, 113u8, 168u8, 99u8, 94u8, 232u8, 4u8, + 246u8, 35u8, 227u8, 112u8, 223u8, 7u8, 44u8, 186u8, 60u8, 225u8, 153u8, + 249u8, 104u8, 51u8, 123u8, 227u8, 143u8, 65u8, 232u8, 209u8, 178u8, + 104u8, 70u8, 56u8, 230u8, 14u8, 75u8, 83u8, 250u8, 160u8, 9u8, 39u8, ], ) } @@ -31484,20 +34318,20 @@ pub mod api { beneficiary: runtime_types::xcm::VersionedMultiLocation, assets: runtime_types::xcm::VersionedMultiAssets, fee_asset_item: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "XcmPallet", "teleport_assets", - TeleportAssets { + types::TeleportAssets { dest: ::std::boxed::Box::new(dest), beneficiary: ::std::boxed::Box::new(beneficiary), assets: ::std::boxed::Box::new(assets), fee_asset_item, }, [ - 255u8, 5u8, 68u8, 38u8, 44u8, 181u8, 75u8, 221u8, 239u8, 103u8, 88u8, - 47u8, 136u8, 90u8, 253u8, 55u8, 0u8, 122u8, 217u8, 126u8, 13u8, 77u8, - 209u8, 41u8, 7u8, 35u8, 235u8, 171u8, 150u8, 235u8, 202u8, 240u8, + 187u8, 42u8, 2u8, 96u8, 105u8, 125u8, 74u8, 53u8, 2u8, 21u8, 31u8, + 160u8, 201u8, 197u8, 157u8, 190u8, 40u8, 145u8, 5u8, 99u8, 194u8, 41u8, + 114u8, 60u8, 165u8, 186u8, 15u8, 226u8, 85u8, 113u8, 159u8, 136u8, ], ) } @@ -31523,20 +34357,20 @@ pub mod api { beneficiary: runtime_types::xcm::VersionedMultiLocation, assets: runtime_types::xcm::VersionedMultiAssets, fee_asset_item: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "XcmPallet", "reserve_transfer_assets", - ReserveTransferAssets { + types::ReserveTransferAssets { dest: ::std::boxed::Box::new(dest), beneficiary: ::std::boxed::Box::new(beneficiary), assets: ::std::boxed::Box::new(assets), fee_asset_item, }, [ - 177u8, 160u8, 188u8, 106u8, 153u8, 135u8, 121u8, 12u8, 83u8, 233u8, - 43u8, 161u8, 133u8, 26u8, 104u8, 79u8, 113u8, 8u8, 33u8, 128u8, 82u8, - 62u8, 30u8, 46u8, 203u8, 199u8, 175u8, 193u8, 55u8, 130u8, 206u8, 28u8, + 249u8, 177u8, 76u8, 204u8, 186u8, 165u8, 16u8, 186u8, 129u8, 239u8, + 65u8, 252u8, 9u8, 132u8, 32u8, 164u8, 117u8, 177u8, 40u8, 21u8, 196u8, + 246u8, 147u8, 2u8, 95u8, 110u8, 68u8, 162u8, 148u8, 9u8, 59u8, 170u8, ], ) } @@ -31554,19 +34388,19 @@ pub mod api { pub fn execute( &self, message: runtime_types::xcm::VersionedXcm, - max_weight: ::core::primitive::u64, - ) -> ::subxt::tx::Payload { + max_weight: runtime_types::sp_weights::weight_v2::Weight, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "XcmPallet", "execute", - Execute { + types::Execute { message: ::std::boxed::Box::new(message), max_weight, }, [ - 191u8, 177u8, 39u8, 21u8, 1u8, 110u8, 39u8, 58u8, 94u8, 27u8, 44u8, - 18u8, 253u8, 135u8, 100u8, 205u8, 0u8, 231u8, 68u8, 247u8, 5u8, 140u8, - 131u8, 184u8, 251u8, 197u8, 100u8, 113u8, 253u8, 255u8, 120u8, 206u8, + 102u8, 41u8, 146u8, 29u8, 241u8, 205u8, 95u8, 153u8, 228u8, 141u8, + 11u8, 228u8, 13u8, 44u8, 75u8, 204u8, 174u8, 35u8, 155u8, 104u8, 204u8, + 82u8, 239u8, 98u8, 249u8, 187u8, 193u8, 1u8, 122u8, 88u8, 162u8, 200u8, ], ) } @@ -31578,20 +34412,20 @@ pub mod api { #[doc = "- `xcm_version`: The latest version of XCM that `location` supports."] pub fn force_xcm_version( &self, - location: runtime_types::xcm::v1::multilocation::MultiLocation, + location: runtime_types::xcm::v3::multilocation::MultiLocation, xcm_version: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "XcmPallet", "force_xcm_version", - ForceXcmVersion { + types::ForceXcmVersion { location: ::std::boxed::Box::new(location), xcm_version, }, [ - 231u8, 106u8, 60u8, 226u8, 31u8, 25u8, 20u8, 115u8, 107u8, 246u8, - 248u8, 11u8, 71u8, 183u8, 93u8, 3u8, 219u8, 21u8, 97u8, 188u8, 119u8, - 121u8, 239u8, 72u8, 200u8, 81u8, 6u8, 177u8, 111u8, 188u8, 168u8, 86u8, + 68u8, 48u8, 95u8, 61u8, 152u8, 95u8, 213u8, 126u8, 209u8, 176u8, 230u8, + 160u8, 164u8, 42u8, 128u8, 62u8, 175u8, 3u8, 161u8, 170u8, 20u8, 31u8, + 216u8, 122u8, 31u8, 77u8, 64u8, 182u8, 121u8, 41u8, 23u8, 80u8, ], ) } @@ -31603,11 +34437,11 @@ pub mod api { pub fn force_default_xcm_version( &self, maybe_xcm_version: ::core::option::Option<::core::primitive::u32>, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "XcmPallet", "force_default_xcm_version", - ForceDefaultXcmVersion { maybe_xcm_version }, + types::ForceDefaultXcmVersion { maybe_xcm_version }, [ 38u8, 36u8, 59u8, 231u8, 18u8, 79u8, 76u8, 9u8, 200u8, 125u8, 214u8, 166u8, 37u8, 99u8, 111u8, 161u8, 135u8, 2u8, 133u8, 157u8, 165u8, 18u8, @@ -31622,18 +34456,17 @@ pub mod api { pub fn force_subscribe_version_notify( &self, location: runtime_types::xcm::VersionedMultiLocation, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "XcmPallet", "force_subscribe_version_notify", - ForceSubscribeVersionNotify { + types::ForceSubscribeVersionNotify { location: ::std::boxed::Box::new(location), }, [ - 136u8, 216u8, 207u8, 51u8, 42u8, 153u8, 92u8, 70u8, 140u8, 169u8, - 172u8, 89u8, 69u8, 28u8, 200u8, 100u8, 209u8, 226u8, 194u8, 240u8, - 71u8, 38u8, 18u8, 6u8, 6u8, 83u8, 103u8, 254u8, 248u8, 241u8, 62u8, - 189u8, + 236u8, 37u8, 153u8, 26u8, 174u8, 187u8, 154u8, 38u8, 179u8, 223u8, + 130u8, 32u8, 128u8, 30u8, 148u8, 229u8, 7u8, 185u8, 174u8, 9u8, 96u8, + 215u8, 189u8, 178u8, 148u8, 141u8, 249u8, 118u8, 7u8, 238u8, 1u8, 49u8, ], ) } @@ -31646,17 +34479,17 @@ pub mod api { pub fn force_unsubscribe_version_notify( &self, location: runtime_types::xcm::VersionedMultiLocation, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "XcmPallet", "force_unsubscribe_version_notify", - ForceUnsubscribeVersionNotify { + types::ForceUnsubscribeVersionNotify { location: ::std::boxed::Box::new(location), }, [ - 51u8, 72u8, 5u8, 227u8, 251u8, 243u8, 199u8, 9u8, 8u8, 213u8, 191u8, - 52u8, 21u8, 215u8, 170u8, 6u8, 53u8, 242u8, 225u8, 89u8, 150u8, 142u8, - 104u8, 249u8, 225u8, 209u8, 142u8, 234u8, 161u8, 100u8, 153u8, 120u8, + 154u8, 169u8, 145u8, 211u8, 185u8, 71u8, 9u8, 63u8, 3u8, 158u8, 187u8, + 173u8, 115u8, 166u8, 100u8, 66u8, 12u8, 40u8, 198u8, 40u8, 213u8, + 104u8, 95u8, 183u8, 215u8, 53u8, 94u8, 158u8, 106u8, 56u8, 149u8, 52u8, ], ) } @@ -31684,12 +34517,12 @@ pub mod api { beneficiary: runtime_types::xcm::VersionedMultiLocation, assets: runtime_types::xcm::VersionedMultiAssets, fee_asset_item: ::core::primitive::u32, - weight_limit: runtime_types::xcm::v2::WeightLimit, - ) -> ::subxt::tx::Payload { + weight_limit: runtime_types::xcm::v3::WeightLimit, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "XcmPallet", "limited_reserve_transfer_assets", - LimitedReserveTransferAssets { + types::LimitedReserveTransferAssets { dest: ::std::boxed::Box::new(dest), beneficiary: ::std::boxed::Box::new(beneficiary), assets: ::std::boxed::Box::new(assets), @@ -31697,10 +34530,9 @@ pub mod api { weight_limit, }, [ - 191u8, 81u8, 68u8, 116u8, 196u8, 125u8, 226u8, 154u8, 144u8, 126u8, - 159u8, 149u8, 17u8, 124u8, 205u8, 60u8, 249u8, 106u8, 38u8, 251u8, - 136u8, 128u8, 81u8, 201u8, 164u8, 242u8, 216u8, 80u8, 21u8, 234u8, - 20u8, 70u8, + 131u8, 191u8, 89u8, 27u8, 236u8, 142u8, 130u8, 129u8, 245u8, 95u8, + 159u8, 96u8, 252u8, 80u8, 28u8, 40u8, 128u8, 55u8, 41u8, 123u8, 22u8, + 18u8, 0u8, 236u8, 77u8, 68u8, 135u8, 181u8, 40u8, 47u8, 92u8, 240u8, ], ) } @@ -31727,12 +34559,12 @@ pub mod api { beneficiary: runtime_types::xcm::VersionedMultiLocation, assets: runtime_types::xcm::VersionedMultiAssets, fee_asset_item: ::core::primitive::u32, - weight_limit: runtime_types::xcm::v2::WeightLimit, - ) -> ::subxt::tx::Payload { + weight_limit: runtime_types::xcm::v3::WeightLimit, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "XcmPallet", "limited_teleport_assets", - LimitedTeleportAssets { + types::LimitedTeleportAssets { dest: ::std::boxed::Box::new(dest), beneficiary: ::std::boxed::Box::new(beneficiary), assets: ::std::boxed::Box::new(assets), @@ -31740,10 +34572,10 @@ pub mod api { weight_limit, }, [ - 29u8, 31u8, 229u8, 83u8, 40u8, 60u8, 36u8, 185u8, 169u8, 74u8, 30u8, - 47u8, 118u8, 118u8, 22u8, 15u8, 246u8, 220u8, 169u8, 135u8, 72u8, - 154u8, 109u8, 192u8, 195u8, 58u8, 121u8, 240u8, 166u8, 243u8, 29u8, - 29u8, + 234u8, 19u8, 104u8, 174u8, 98u8, 159u8, 205u8, 110u8, 240u8, 78u8, + 186u8, 138u8, 236u8, 116u8, 104u8, 215u8, 57u8, 178u8, 166u8, 208u8, + 197u8, 113u8, 101u8, 56u8, 23u8, 56u8, 84u8, 14u8, 173u8, 70u8, 211u8, + 201u8, ], ) } @@ -31766,7 +34598,7 @@ pub mod api { #[doc = "Execution of an XCM message was attempted."] #[doc = ""] #[doc = "\\[ outcome \\]"] - pub struct Attempted(pub runtime_types::xcm::v2::traits::Outcome); + pub struct Attempted(pub runtime_types::xcm::v3::traits::Outcome); impl ::subxt::events::StaticEvent for Attempted { const PALLET: &'static str = "XcmPallet"; const EVENT: &'static str = "Attempted"; @@ -31785,9 +34617,9 @@ pub mod api { #[doc = ""] #[doc = "\\[ origin, destination, message \\]"] pub struct Sent( - pub runtime_types::xcm::v1::multilocation::MultiLocation, - pub runtime_types::xcm::v1::multilocation::MultiLocation, - pub runtime_types::xcm::v2::Xcm, + pub runtime_types::xcm::v3::multilocation::MultiLocation, + pub runtime_types::xcm::v3::multilocation::MultiLocation, + pub runtime_types::xcm::v3::Xcm, ); impl ::subxt::events::StaticEvent for Sent { const PALLET: &'static str = "XcmPallet"; @@ -31809,7 +34641,7 @@ pub mod api { #[doc = ""] #[doc = "\\[ origin location, id \\]"] pub struct UnexpectedResponse( - pub runtime_types::xcm::v1::multilocation::MultiLocation, + pub runtime_types::xcm::v3::multilocation::MultiLocation, pub ::core::primitive::u64, ); impl ::subxt::events::StaticEvent for UnexpectedResponse { @@ -31832,7 +34664,7 @@ pub mod api { #[doc = "\\[ id, response \\]"] pub struct ResponseReady( pub ::core::primitive::u64, - pub runtime_types::xcm::v2::Response, + pub runtime_types::xcm::v3::Response, ); impl ::subxt::events::StaticEvent for ResponseReady { const PALLET: &'static str = "XcmPallet"; @@ -31950,9 +34782,9 @@ pub mod api { #[doc = ""] #[doc = "\\[ origin location, id, expected location \\]"] pub struct InvalidResponder( - pub runtime_types::xcm::v1::multilocation::MultiLocation, + pub runtime_types::xcm::v3::multilocation::MultiLocation, pub ::core::primitive::u64, - pub ::core::option::Option, + pub ::core::option::Option, ); impl ::subxt::events::StaticEvent for InvalidResponder { const PALLET: &'static str = "XcmPallet"; @@ -31978,7 +34810,7 @@ pub mod api { #[doc = ""] #[doc = "\\[ origin location, id \\]"] pub struct InvalidResponderVersion( - pub runtime_types::xcm::v1::multilocation::MultiLocation, + pub runtime_types::xcm::v3::multilocation::MultiLocation, pub ::core::primitive::u64, ); impl ::subxt::events::StaticEvent for InvalidResponderVersion { @@ -32019,7 +34851,7 @@ pub mod api { #[doc = "\\[ hash, origin, assets \\]"] pub struct AssetsTrapped( pub ::subxt::utils::H256, - pub runtime_types::xcm::v1::multilocation::MultiLocation, + pub runtime_types::xcm::v3::multilocation::MultiLocation, pub runtime_types::xcm::VersionedMultiAssets, ); impl ::subxt::events::StaticEvent for AssetsTrapped { @@ -32038,10 +34870,13 @@ pub mod api { #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "An XCM version change notification message has been attempted to be sent."] #[doc = ""] - #[doc = "\\[ destination, result \\]"] + #[doc = "The cost of sending it (borne by the chain) is included."] + #[doc = ""] + #[doc = "\\[ destination, result, cost \\]"] pub struct VersionChangeNotified( - pub runtime_types::xcm::v1::multilocation::MultiLocation, + pub runtime_types::xcm::v3::multilocation::MultiLocation, pub ::core::primitive::u32, + pub runtime_types::xcm::v3::multiasset::MultiAssets, ); impl ::subxt::events::StaticEvent for VersionChangeNotified { const PALLET: &'static str = "XcmPallet"; @@ -32062,7 +34897,7 @@ pub mod api { #[doc = ""] #[doc = "\\[ location, XCM version \\]"] pub struct SupportedVersionChanged( - pub runtime_types::xcm::v1::multilocation::MultiLocation, + pub runtime_types::xcm::v3::multilocation::MultiLocation, pub ::core::primitive::u32, ); impl ::subxt::events::StaticEvent for SupportedVersionChanged { @@ -32084,9 +34919,9 @@ pub mod api { #[doc = ""] #[doc = "\\[ location, query ID, error \\]"] pub struct NotifyTargetSendFail( - pub runtime_types::xcm::v1::multilocation::MultiLocation, + pub runtime_types::xcm::v3::multilocation::MultiLocation, pub ::core::primitive::u64, - pub runtime_types::xcm::v2::traits::Error, + pub runtime_types::xcm::v3::traits::Error, ); impl ::subxt::events::StaticEvent for NotifyTargetSendFail { const PALLET: &'static str = "XcmPallet"; @@ -32124,12 +34959,149 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Expected query response has been received but the expected querier location placed in"] + #[doc = "storage by this runtime previously cannot be decoded. The query remains registered."] + #[doc = ""] + #[doc = "This is unexpected (since a location placed in storage in a previously executing"] + #[doc = "runtime should be readable prior to query timeout) and dangerous since the possibly"] + #[doc = "valid response will be dropped. Manual governance intervention is probably going to be"] + #[doc = "needed."] + #[doc = ""] + #[doc = "\\[ origin location, id \\]"] + pub struct InvalidQuerierVersion( + pub runtime_types::xcm::v3::multilocation::MultiLocation, + pub ::core::primitive::u64, + ); + impl ::subxt::events::StaticEvent for InvalidQuerierVersion { + const PALLET: &'static str = "XcmPallet"; + const EVENT: &'static str = "InvalidQuerierVersion"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Expected query response has been received but the querier location of the response does"] + #[doc = "not match the expected. The query remains registered for a later, valid, response to"] + #[doc = "be received and acted upon."] + #[doc = ""] + #[doc = "\\[ origin location, id, expected querier, maybe actual querier \\]"] + pub struct InvalidQuerier( + pub runtime_types::xcm::v3::multilocation::MultiLocation, + pub ::core::primitive::u64, + pub runtime_types::xcm::v3::multilocation::MultiLocation, + pub ::core::option::Option, + ); + impl ::subxt::events::StaticEvent for InvalidQuerier { + const PALLET: &'static str = "XcmPallet"; + const EVENT: &'static str = "InvalidQuerier"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A remote has requested XCM version change notification from us and we have honored it."] + #[doc = "A version information message is sent to them and its cost is included."] + #[doc = ""] + #[doc = "\\[ destination location, cost \\]"] + pub struct VersionNotifyStarted( + pub runtime_types::xcm::v3::multilocation::MultiLocation, + pub runtime_types::xcm::v3::multiasset::MultiAssets, + ); + impl ::subxt::events::StaticEvent for VersionNotifyStarted { + const PALLET: &'static str = "XcmPallet"; + const EVENT: &'static str = "VersionNotifyStarted"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "We have requested that a remote chain sends us XCM version change notifications."] + #[doc = ""] + #[doc = "\\[ destination location, cost \\]"] + pub struct VersionNotifyRequested( + pub runtime_types::xcm::v3::multilocation::MultiLocation, + pub runtime_types::xcm::v3::multiasset::MultiAssets, + ); + impl ::subxt::events::StaticEvent for VersionNotifyRequested { + const PALLET: &'static str = "XcmPallet"; + const EVENT: &'static str = "VersionNotifyRequested"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "We have requested that a remote chain stops sending us XCM version change notifications."] + #[doc = ""] + #[doc = "\\[ destination location, cost \\]"] + pub struct VersionNotifyUnrequested( + pub runtime_types::xcm::v3::multilocation::MultiLocation, + pub runtime_types::xcm::v3::multiasset::MultiAssets, + ); + impl ::subxt::events::StaticEvent for VersionNotifyUnrequested { + const PALLET: &'static str = "XcmPallet"; + const EVENT: &'static str = "VersionNotifyUnrequested"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Fees were paid from a location for an operation (often for using `SendXcm`)."] + #[doc = ""] + #[doc = "\\[ paying location, fees \\]"] + pub struct FeesPaid( + pub runtime_types::xcm::v3::multilocation::MultiLocation, + pub runtime_types::xcm::v3::multiasset::MultiAssets, + ); + impl ::subxt::events::StaticEvent for FeesPaid { + const PALLET: &'static str = "XcmPallet"; + const EVENT: &'static str = "FeesPaid"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Some assets have been claimed from an asset trap"] #[doc = ""] #[doc = "\\[ hash, origin, assets \\]"] pub struct AssetsClaimed( pub ::subxt::utils::H256, - pub runtime_types::xcm::v1::multilocation::MultiLocation, + pub runtime_types::xcm::v3::multilocation::MultiLocation, pub runtime_types::xcm::VersionedMultiAssets, ); impl ::subxt::events::StaticEvent for AssetsClaimed { @@ -32181,10 +35153,10 @@ pub mod api { _0.borrow(), )], [ - 251u8, 97u8, 131u8, 135u8, 93u8, 68u8, 156u8, 25u8, 181u8, 231u8, - 124u8, 93u8, 170u8, 114u8, 250u8, 177u8, 172u8, 51u8, 59u8, 44u8, - 148u8, 189u8, 199u8, 62u8, 118u8, 89u8, 75u8, 29u8, 71u8, 49u8, 248u8, - 48u8, + 72u8, 239u8, 157u8, 117u8, 200u8, 28u8, 80u8, 70u8, 205u8, 253u8, + 147u8, 30u8, 130u8, 72u8, 154u8, 95u8, 183u8, 162u8, 165u8, 203u8, + 128u8, 98u8, 216u8, 172u8, 98u8, 220u8, 16u8, 236u8, 216u8, 68u8, 33u8, + 184u8, ], ) } @@ -32203,10 +35175,10 @@ pub mod api { "Queries", Vec::new(), [ - 251u8, 97u8, 131u8, 135u8, 93u8, 68u8, 156u8, 25u8, 181u8, 231u8, - 124u8, 93u8, 170u8, 114u8, 250u8, 177u8, 172u8, 51u8, 59u8, 44u8, - 148u8, 189u8, 199u8, 62u8, 118u8, 89u8, 75u8, 29u8, 71u8, 49u8, 248u8, - 48u8, + 72u8, 239u8, 157u8, 117u8, 200u8, 28u8, 80u8, 70u8, 205u8, 253u8, + 147u8, 30u8, 130u8, 72u8, 154u8, 95u8, 183u8, 162u8, 165u8, 203u8, + 128u8, 98u8, 216u8, 172u8, 98u8, 220u8, 16u8, 236u8, 216u8, 68u8, 33u8, + 184u8, ], ) } @@ -32304,9 +35276,10 @@ pub mod api { ::subxt::storage::address::make_static_storage_map_key(_1.borrow()), ], [ - 112u8, 34u8, 251u8, 179u8, 217u8, 54u8, 125u8, 242u8, 190u8, 8u8, 44u8, - 14u8, 138u8, 76u8, 241u8, 95u8, 233u8, 96u8, 141u8, 26u8, 151u8, 196u8, - 219u8, 137u8, 165u8, 27u8, 87u8, 128u8, 19u8, 35u8, 222u8, 202u8, + 16u8, 172u8, 183u8, 14u8, 63u8, 199u8, 42u8, 204u8, 218u8, 197u8, + 129u8, 40u8, 32u8, 213u8, 50u8, 170u8, 231u8, 123u8, 188u8, 83u8, + 250u8, 148u8, 133u8, 78u8, 249u8, 33u8, 122u8, 55u8, 22u8, 179u8, 98u8, + 113u8, ], ) } @@ -32325,9 +35298,10 @@ pub mod api { "SupportedVersion", Vec::new(), [ - 112u8, 34u8, 251u8, 179u8, 217u8, 54u8, 125u8, 242u8, 190u8, 8u8, 44u8, - 14u8, 138u8, 76u8, 241u8, 95u8, 233u8, 96u8, 141u8, 26u8, 151u8, 196u8, - 219u8, 137u8, 165u8, 27u8, 87u8, 128u8, 19u8, 35u8, 222u8, 202u8, + 16u8, 172u8, 183u8, 14u8, 63u8, 199u8, 42u8, 204u8, 218u8, 197u8, + 129u8, 40u8, 32u8, 213u8, 50u8, 170u8, 231u8, 123u8, 188u8, 83u8, + 250u8, 148u8, 133u8, 78u8, 249u8, 33u8, 122u8, 55u8, 22u8, 179u8, 98u8, + 113u8, ], ) } @@ -32351,10 +35325,9 @@ pub mod api { ::subxt::storage::address::make_static_storage_map_key(_1.borrow()), ], [ - 233u8, 217u8, 119u8, 102u8, 41u8, 77u8, 198u8, 24u8, 161u8, 22u8, - 104u8, 149u8, 204u8, 128u8, 123u8, 166u8, 17u8, 36u8, 202u8, 92u8, - 190u8, 44u8, 73u8, 239u8, 88u8, 17u8, 92u8, 41u8, 236u8, 80u8, 154u8, - 10u8, + 137u8, 87u8, 59u8, 219u8, 207u8, 188u8, 145u8, 38u8, 197u8, 219u8, + 197u8, 179u8, 102u8, 25u8, 184u8, 83u8, 31u8, 63u8, 251u8, 21u8, 211u8, + 124u8, 23u8, 40u8, 4u8, 43u8, 113u8, 158u8, 233u8, 192u8, 38u8, 177u8, ], ) } @@ -32373,10 +35346,9 @@ pub mod api { "VersionNotifiers", Vec::new(), [ - 233u8, 217u8, 119u8, 102u8, 41u8, 77u8, 198u8, 24u8, 161u8, 22u8, - 104u8, 149u8, 204u8, 128u8, 123u8, 166u8, 17u8, 36u8, 202u8, 92u8, - 190u8, 44u8, 73u8, 239u8, 88u8, 17u8, 92u8, 41u8, 236u8, 80u8, 154u8, - 10u8, + 137u8, 87u8, 59u8, 219u8, 207u8, 188u8, 145u8, 38u8, 197u8, 219u8, + 197u8, 179u8, 102u8, 25u8, 184u8, 83u8, 31u8, 63u8, 251u8, 21u8, 211u8, + 124u8, 23u8, 40u8, 4u8, 43u8, 113u8, 158u8, 233u8, 192u8, 38u8, 177u8, ], ) } @@ -32390,7 +35362,7 @@ pub mod api { ::subxt::storage::address::StaticStorageMapKey, ( ::core::primitive::u64, - ::core::primitive::u64, + runtime_types::sp_weights::weight_v2::Weight, ::core::primitive::u32, ), ::subxt::storage::address::Yes, @@ -32405,9 +35377,9 @@ pub mod api { ::subxt::storage::address::make_static_storage_map_key(_1.borrow()), ], [ - 108u8, 104u8, 137u8, 191u8, 2u8, 2u8, 240u8, 174u8, 32u8, 174u8, 150u8, - 136u8, 33u8, 84u8, 30u8, 74u8, 95u8, 94u8, 20u8, 112u8, 101u8, 204u8, - 15u8, 47u8, 136u8, 56u8, 40u8, 66u8, 1u8, 42u8, 16u8, 247u8, + 138u8, 26u8, 26u8, 108u8, 21u8, 255u8, 143u8, 241u8, 15u8, 163u8, 22u8, + 155u8, 221u8, 63u8, 58u8, 104u8, 4u8, 186u8, 66u8, 178u8, 67u8, 178u8, + 220u8, 78u8, 1u8, 77u8, 45u8, 214u8, 98u8, 240u8, 120u8, 254u8, ], ) } @@ -32419,7 +35391,7 @@ pub mod api { ::subxt::storage::address::StaticStorageMapKey, ( ::core::primitive::u64, - ::core::primitive::u64, + runtime_types::sp_weights::weight_v2::Weight, ::core::primitive::u32, ), (), @@ -32431,9 +35403,9 @@ pub mod api { "VersionNotifyTargets", Vec::new(), [ - 108u8, 104u8, 137u8, 191u8, 2u8, 2u8, 240u8, 174u8, 32u8, 174u8, 150u8, - 136u8, 33u8, 84u8, 30u8, 74u8, 95u8, 94u8, 20u8, 112u8, 101u8, 204u8, - 15u8, 47u8, 136u8, 56u8, 40u8, 66u8, 1u8, 42u8, 16u8, 247u8, + 138u8, 26u8, 26u8, 108u8, 21u8, 255u8, 143u8, 241u8, 15u8, 163u8, 22u8, + 155u8, 221u8, 63u8, 58u8, 104u8, 4u8, 186u8, 66u8, 178u8, 67u8, 178u8, + 220u8, 78u8, 1u8, 77u8, 45u8, 214u8, 98u8, 240u8, 120u8, 254u8, ], ) } @@ -32444,7 +35416,7 @@ pub mod api { &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::sp_core::bounded::bounded_vec::BoundedVec<( + runtime_types::bounded_collections::bounded_vec::BoundedVec<( runtime_types::xcm::VersionedMultiLocation, ::core::primitive::u32, )>, @@ -32457,10 +35429,9 @@ pub mod api { "VersionDiscoveryQueue", vec![], [ - 30u8, 163u8, 210u8, 133u8, 30u8, 63u8, 36u8, 9u8, 162u8, 133u8, 99u8, - 170u8, 34u8, 205u8, 27u8, 41u8, 226u8, 141u8, 165u8, 151u8, 46u8, - 140u8, 150u8, 242u8, 178u8, 88u8, 164u8, 12u8, 129u8, 118u8, 25u8, - 79u8, + 134u8, 60u8, 255u8, 145u8, 139u8, 29u8, 38u8, 47u8, 209u8, 218u8, + 127u8, 123u8, 2u8, 196u8, 52u8, 99u8, 143u8, 112u8, 0u8, 133u8, 99u8, + 218u8, 187u8, 171u8, 175u8, 153u8, 149u8, 1u8, 57u8, 45u8, 118u8, 79u8, ], ) } @@ -32485,11 +35456,158 @@ pub mod api { ], ) } + #[doc = " Fungible assets which we know are locked on a remote chain."] + pub fn remote_locked_fungibles( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + _1: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + _2: impl ::std::borrow::Borrow, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_xcm::pallet::RemoteLockedFungibleRecord, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "XcmPallet", + "RemoteLockedFungibles", + vec![ + ::subxt::storage::address::make_static_storage_map_key(_0.borrow()), + ::subxt::storage::address::make_static_storage_map_key(_1.borrow()), + ::subxt::storage::address::make_static_storage_map_key(_2.borrow()), + ], + [ + 26u8, 71u8, 1u8, 2u8, 214u8, 3u8, 65u8, 62u8, 133u8, 85u8, 151u8, + 180u8, 225u8, 180u8, 40u8, 49u8, 133u8, 107u8, 190u8, 102u8, 1u8, + 111u8, 144u8, 240u8, 0u8, 209u8, 198u8, 76u8, 143u8, 121u8, 2u8, 118u8, + ], + ) + } + #[doc = " Fungible assets which we know are locked on a remote chain."] + pub fn remote_locked_fungibles_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_xcm::pallet::RemoteLockedFungibleRecord, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "XcmPallet", + "RemoteLockedFungibles", + Vec::new(), + [ + 26u8, 71u8, 1u8, 2u8, 214u8, 3u8, 65u8, 62u8, 133u8, 85u8, 151u8, + 180u8, 225u8, 180u8, 40u8, 49u8, 133u8, 107u8, 190u8, 102u8, 1u8, + 111u8, 144u8, 240u8, 0u8, 209u8, 198u8, 76u8, 143u8, 121u8, 2u8, 118u8, + ], + ) + } + #[doc = " Fungible assets which we know are locked on this chain."] + pub fn locked_fungibles( + &self, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::bounded_collections::bounded_vec::BoundedVec<( + ::core::primitive::u128, + runtime_types::xcm::VersionedMultiLocation, + )>, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "XcmPallet", + "LockedFungibles", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], + [ + 158u8, 103u8, 153u8, 216u8, 19u8, 122u8, 251u8, 183u8, 15u8, 143u8, + 161u8, 105u8, 168u8, 100u8, 76u8, 220u8, 56u8, 129u8, 185u8, 251u8, + 220u8, 166u8, 3u8, 100u8, 48u8, 147u8, 123u8, 94u8, 226u8, 112u8, 59u8, + 171u8, + ], + ) + } + #[doc = " Fungible assets which we know are locked on this chain."] + pub fn locked_fungibles_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::bounded_collections::bounded_vec::BoundedVec<( + ::core::primitive::u128, + runtime_types::xcm::VersionedMultiLocation, + )>, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "XcmPallet", + "LockedFungibles", + Vec::new(), + [ + 158u8, 103u8, 153u8, 216u8, 19u8, 122u8, 251u8, 183u8, 15u8, 143u8, + 161u8, 105u8, 168u8, 100u8, 76u8, 220u8, 56u8, 129u8, 185u8, 251u8, + 220u8, 166u8, 3u8, 100u8, 48u8, 147u8, 123u8, 94u8, 226u8, 112u8, 59u8, + 171u8, + ], + ) + } } } } pub mod runtime_types { use super::runtime_types; + pub mod bounded_collections { + use super::runtime_types; + pub mod bounded_btree_map { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct BoundedBTreeMap<_0, _1>(pub ::subxt::utils::KeyedVec<_0, _1>); + } + pub mod bounded_vec { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct BoundedVec<_0>(pub ::std::vec::Vec<_0>); + } + pub mod weak_bounded_vec { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct WeakBoundedVec<_0>(pub ::std::vec::Vec<_0>); + } + } pub mod finality_grandpa { use super::runtime_types; #[derive( @@ -32615,6 +35733,21 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct PostDispatchInfo { + pub actual_weight: + ::core::option::Option, + pub pays_fee: runtime_types::frame_support::dispatch::Pays, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum RawOrigin<_0> { #[codec(index = 0)] Root, @@ -32662,7 +35795,7 @@ pub mod api { }, #[codec(index = 1)] Inline( - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + runtime_types::bounded_collections::bounded_vec::BoundedVec< ::core::primitive::u8, >, ), @@ -32674,6 +35807,25 @@ pub mod api { __Ignore(::core::marker::PhantomData<_0>), } } + pub mod schedule { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum DispatchTime<_0> { + #[codec(index = 0)] + At(_0), + #[codec(index = 1)] + After(_0), + } + } pub mod tokens { use super::runtime_types; pub mod misc { @@ -32881,52 +36033,33 @@ pub mod api { #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { #[codec(index = 0)] - #[doc = "A dispatch that will fill the block weight up to the given ratio."] - fill_block { - ratio: runtime_types::sp_arithmetic::per_things::Perbill, - }, - #[codec(index = 1)] #[doc = "Make some on-chain remark."] #[doc = ""] - #[doc = "# "] + #[doc = "## Complexity"] #[doc = "- `O(1)`"] - #[doc = "# "] remark { remark: ::std::vec::Vec<::core::primitive::u8>, }, - #[codec(index = 2)] + #[codec(index = 1)] #[doc = "Set the number of pages in the WebAssembly environment's heap."] set_heap_pages { pages: ::core::primitive::u64 }, - #[codec(index = 3)] + #[codec(index = 2)] #[doc = "Set the new runtime code."] #[doc = ""] - #[doc = "# "] + #[doc = "## Complexity"] #[doc = "- `O(C + S)` where `C` length of `code` and `S` complexity of `can_set_code`"] - #[doc = "- 1 call to `can_set_code`: `O(S)` (calls `sp_io::misc::runtime_version` which is"] - #[doc = " expensive)."] - #[doc = "- 1 storage write (codec `O(C)`)."] - #[doc = "- 1 digest item."] - #[doc = "- 1 event."] - #[doc = "The weight of this function is dependent on the runtime, but generally this is very"] - #[doc = "expensive. We will treat this as a full block."] - #[doc = "# "] set_code { code: ::std::vec::Vec<::core::primitive::u8>, }, - #[codec(index = 4)] + #[codec(index = 3)] #[doc = "Set the new runtime code without doing any checks of the given `code`."] #[doc = ""] - #[doc = "# "] + #[doc = "## Complexity"] #[doc = "- `O(C)` where `C` length of `code`"] - #[doc = "- 1 storage write (codec `O(C)`)."] - #[doc = "- 1 digest item."] - #[doc = "- 1 event."] - #[doc = "The weight of this function is dependent on the runtime. We will treat this as a full"] - #[doc = "block. # "] set_code_without_checks { code: ::std::vec::Vec<::core::primitive::u8>, }, - #[codec(index = 5)] + #[codec(index = 4)] #[doc = "Set some items of storage."] set_storage { items: ::std::vec::Vec<( @@ -32934,12 +36067,12 @@ pub mod api { ::std::vec::Vec<::core::primitive::u8>, )>, }, - #[codec(index = 6)] + #[codec(index = 5)] #[doc = "Kill some items from storage."] kill_storage { keys: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, }, - #[codec(index = 7)] + #[codec(index = 6)] #[doc = "Kill all storage items with a key that starts with the given prefix."] #[doc = ""] #[doc = "**NOTE:** We rely on the Root origin to provide us the number of subkeys under"] @@ -32948,7 +36081,7 @@ pub mod api { prefix: ::std::vec::Vec<::core::primitive::u8>, subkeys: ::core::primitive::u32, }, - #[codec(index = 8)] + #[codec(index = 7)] #[doc = "Make some on-chain remark and emit event."] remark_with_event { remark: ::std::vec::Vec<::core::primitive::u8>, @@ -33099,85 +36232,6 @@ pub mod api { Initialization, } } - pub mod pallet_authorship { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "Provide a set of uncles."] - 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 :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - #[doc = "The uncle parent not in the chain."] - InvalidUncleParent, - #[codec(index = 1)] - #[doc = "Uncles already set in the block."] - UnclesAlreadySet, - #[codec(index = 2)] - #[doc = "Too many uncles."] - TooManyUncles, - #[codec(index = 3)] - #[doc = "The uncle is genesis."] - GenesisUncle, - #[codec(index = 4)] - #[doc = "The uncle is too high in chain."] - TooHighUncle, - #[codec(index = 5)] - #[doc = "The uncle is already included."] - UncleAlreadyIncluded, - #[codec(index = 6)] - #[doc = "The uncle isn't recent enough to be included."] - OldUncle, - } - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - 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 { @@ -33428,57 +36482,33 @@ pub mod api { #[codec(index = 0)] #[doc = "Transfer some liquid free balance to another account."] #[doc = ""] - #[doc = "`transfer` will set the `FreeBalance` of the sender and receiver."] + #[doc = "`transfer_allow_death` will set the `FreeBalance` of the sender and receiver."] #[doc = "If the sender's account is below the existential deposit as a result"] #[doc = "of the transfer, the account will be reaped."] #[doc = ""] #[doc = "The dispatch origin for this call must be `Signed` by the transactor."] - #[doc = ""] - #[doc = "# "] - #[doc = "- Dependent on arguments but not critical, given proper implementations for input config"] - #[doc = " types. See related functions below."] - #[doc = "- It contains a limited number of reads and writes internally and no complex"] - #[doc = " computation."] - #[doc = ""] - #[doc = "Related functions:"] - #[doc = ""] - #[doc = " - `ensure_can_withdraw` is always called internally but has a bounded complexity."] - #[doc = " - Transferring balances to accounts that did not exist before will cause"] - #[doc = " `T::OnNewAccount::on_new_account` to be called."] - #[doc = " - Removing enough funds from an account will trigger `T::DustRemoval::on_unbalanced`."] - #[doc = " - `transfer_keep_alive` works the same way as `transfer`, but has an additional check"] - #[doc = " that the transfer will not kill the origin account."] - #[doc = "---------------------------------"] - #[doc = "- Origin account is already in memory, so no DB operations for them."] - #[doc = "# "] - transfer { + transfer_allow_death { dest: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, #[codec(compact)] value: ::core::primitive::u128, }, #[codec(index = 1)] - #[doc = "Set the balances of a given account."] - #[doc = ""] - #[doc = "This will alter `FreeBalance` and `ReservedBalance` in storage. it will"] - #[doc = "also alter the total issuance of the system (`TotalIssuance`) appropriately."] - #[doc = "If the new free or reserved balance is below the existential deposit,"] - #[doc = "it will reset the account nonce (`frame_system::AccountNonce`)."] + #[doc = "Set the regular balance of a given account; it also takes a reserved balance but this"] + #[doc = "must be the same as the account's current reserved balance."] #[doc = ""] #[doc = "The dispatch origin for this call is `root`."] - set_balance { + #[doc = ""] + #[doc = "WARNING: This call is DEPRECATED! Use `force_set_balance` instead."] + set_balance_deprecated { who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, #[codec(compact)] new_free: ::core::primitive::u128, #[codec(compact)] - new_reserved: ::core::primitive::u128, + old_reserved: ::core::primitive::u128, }, #[codec(index = 2)] - #[doc = "Exactly as `transfer`, except the origin must be root and the source account may be"] - #[doc = "specified."] - #[doc = "# "] - #[doc = "- Same as transfer, but additional read and write because the source account is not"] - #[doc = " assumed to be in the overlay."] - #[doc = "# "] + #[doc = "Exactly as `transfer_allow_death`, except the origin must be root and the source account"] + #[doc = "may be specified."] force_transfer { source: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, dest: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, @@ -33486,12 +36516,12 @@ pub mod api { value: ::core::primitive::u128, }, #[codec(index = 3)] - #[doc = "Same as the [`transfer`] call, but with a check that the transfer will not kill the"] - #[doc = "origin account."] + #[doc = "Same as the [`transfer_allow_death`] call, but with a check that the transfer will not"] + #[doc = "kill the origin account."] #[doc = ""] - #[doc = "99% of the time you want [`transfer`] instead."] + #[doc = "99% of the time you want [`transfer_allow_death`] instead."] #[doc = ""] - #[doc = "[`transfer`]: struct.Pallet.html#method.transfer"] + #[doc = "[`transfer_allow_death`]: struct.Pallet.html#method.transfer"] transfer_keep_alive { dest: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, #[codec(compact)] @@ -33512,9 +36542,7 @@ pub mod api { #[doc = "- `keep_alive`: A boolean to determine if the `transfer_all` operation should send all"] #[doc = " of the funds the account has, causing the sender account to be killed (false), or"] #[doc = " transfer everything except at least the existential deposit, which will guarantee to"] - #[doc = " keep the sender account alive (true). # "] - #[doc = "- O(1). Just like transfer, but reading the user's transferable balance first."] - #[doc = " #"] + #[doc = " keep the sender account alive (true)."] transfer_all { dest: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, keep_alive: ::core::primitive::bool, @@ -33527,6 +36555,36 @@ pub mod api { who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, amount: ::core::primitive::u128, }, + #[codec(index = 6)] + #[doc = "Upgrade a specified account."] + #[doc = ""] + #[doc = "- `origin`: Must be `Signed`."] + #[doc = "- `who`: The account to be upgraded."] + #[doc = ""] + #[doc = "This will waive the transaction fee if at least all but 10% of the accounts needed to"] + #[doc = "be upgraded. (We let some not have to be upgraded just in order to allow for the"] + #[doc = "possibililty of churn)."] + upgrade_accounts { + who: ::std::vec::Vec<::subxt::utils::AccountId32>, + }, + #[codec(index = 7)] + #[doc = "Alias for `transfer_allow_death`, provided only for name-wise compatibility."] + #[doc = ""] + #[doc = "WARNING: DEPRECATED! Will be released in approximately 3 months."] + transfer { + dest: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + #[codec(compact)] + value: ::core::primitive::u128, + }, + #[codec(index = 8)] + #[doc = "Set the regular balance of a given account."] + #[doc = ""] + #[doc = "The dispatch origin for this call is `root`."] + force_set_balance { + who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + #[codec(compact)] + new_free: ::core::primitive::u128, + }, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -33541,29 +36599,35 @@ pub mod api { #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { #[codec(index = 0)] - #[doc = "Vesting balance too high to send value"] + #[doc = "Vesting balance too high to send value."] VestingBalance, #[codec(index = 1)] - #[doc = "Account liquidity restrictions prevent withdrawal"] + #[doc = "Account liquidity restrictions prevent withdrawal."] LiquidityRestrictions, #[codec(index = 2)] #[doc = "Balance too low to send value."] InsufficientBalance, #[codec(index = 3)] - #[doc = "Value too low to create account due to existential deposit"] + #[doc = "Value too low to create account due to existential deposit."] ExistentialDeposit, #[codec(index = 4)] - #[doc = "Transfer/payment would kill account"] - KeepAlive, + #[doc = "Transfer/payment would kill account."] + Expendability, #[codec(index = 5)] - #[doc = "A vesting schedule already exists for this account"] + #[doc = "A vesting schedule already exists for this account."] ExistingVestingSchedule, #[codec(index = 6)] - #[doc = "Beneficiary account must pre-exist"] + #[doc = "Beneficiary account must pre-exist."] DeadAccount, #[codec(index = 7)] - #[doc = "Number of named reserves exceed MaxReserves"] + #[doc = "Number of named reserves exceed `MaxReserves`."] TooManyReserves, + #[codec(index = 8)] + #[doc = "Number of holds exceed `MaxHolds`."] + TooManyHolds, + #[codec(index = 9)] + #[doc = "Number of freezes exceed `MaxFreezes`."] + TooManyFreezes, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -33602,7 +36666,6 @@ pub mod api { BalanceSet { who: ::subxt::utils::AccountId32, free: ::core::primitive::u128, - reserved: ::core::primitive::u128, }, #[codec(index = 4)] #[doc = "Some balance was reserved (moved from free to reserved)."] @@ -33644,86 +36707,144 @@ pub mod api { who: ::subxt::utils::AccountId32, amount: ::core::primitive::u128, }, + #[codec(index = 10)] + #[doc = "Some amount was minted into an account."] + Minted { + who: ::subxt::utils::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 11)] + #[doc = "Some amount was burned from an account."] + Burned { + who: ::subxt::utils::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 12)] + #[doc = "Some amount was suspended from an account (it can be restored later)."] + Suspended { + who: ::subxt::utils::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 13)] + #[doc = "Some amount was restored into an account."] + Restored { + who: ::subxt::utils::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 14)] + #[doc = "An account was upgraded."] + Upgraded { who: ::subxt::utils::AccountId32 }, + #[codec(index = 15)] + #[doc = "Total issuance was increased by `amount`, creating a credit to be balanced."] + Issued { amount: ::core::primitive::u128 }, + #[codec(index = 16)] + #[doc = "Total issuance was decreased by `amount`, creating a debt to be balanced."] + Rescinded { amount: ::core::primitive::u128 }, + #[codec(index = 17)] + #[doc = "Some balance was locked."] + Locked { + who: ::subxt::utils::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 18)] + #[doc = "Some balance was unlocked."] + Unlocked { + who: ::subxt::utils::AccountId32, + amount: ::core::primitive::u128, + }, } } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AccountData<_0> { - pub free: _0, - pub reserved: _0, - pub misc_frozen: _0, - pub fee_frozen: _0, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct BalanceLock<_0> { - pub id: [::core::primitive::u8; 8usize], - pub amount: _0, - pub reasons: runtime_types::pallet_balances::Reasons, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Reasons { - #[codec(index = 0)] - Fee, - #[codec(index = 1)] - Misc, - #[codec(index = 2)] - All, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Releases { - #[codec(index = 0)] - V1_0_0, - #[codec(index = 1)] - V2_0_0, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ReserveData<_0, _1> { - pub id: _0, - pub amount: _1, + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct AccountData<_0> { + pub free: _0, + pub reserved: _0, + pub frozen: _0, + pub flags: runtime_types::pallet_balances::types::ExtraFlags, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct BalanceLock<_0> { + pub id: [::core::primitive::u8; 8usize], + pub amount: _0, + pub reasons: runtime_types::pallet_balances::types::Reasons, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ExtraFlags(pub ::core::primitive::u128); + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct IdAmount<_0, _1> { + pub id: _0, + pub amount: _1, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum Reasons { + #[codec(index = 0)] + Fee, + #[codec(index = 1)] + Misc, + #[codec(index = 2)] + All, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ReserveData<_0, _1> { + pub id: _0, + pub amount: _1, + } } } pub mod pallet_bounties { @@ -33764,11 +36885,10 @@ pub mod api { #[doc = "Approve a bounty proposal. At a later time, the bounty will be funded and become active"] #[doc = "and the original deposit will be returned."] #[doc = ""] - #[doc = "May only be called from `T::ApproveOrigin`."] + #[doc = "May only be called from `T::SpendOrigin`."] #[doc = ""] - #[doc = "# "] + #[doc = "## Complexity"] #[doc = "- O(1)."] - #[doc = "# "] approve_bounty { #[codec(compact)] bounty_id: ::core::primitive::u32, @@ -33776,11 +36896,10 @@ pub mod api { #[codec(index = 2)] #[doc = "Assign a curator to a funded bounty."] #[doc = ""] - #[doc = "May only be called from `T::ApproveOrigin`."] + #[doc = "May only be called from `T::SpendOrigin`."] #[doc = ""] - #[doc = "# "] + #[doc = "## Complexity"] #[doc = "- O(1)."] - #[doc = "# "] propose_curator { #[codec(compact)] bounty_id: ::core::primitive::u32, @@ -33804,9 +36923,8 @@ pub mod api { #[doc = "anyone in the community to call out that a curator is not doing their due diligence, and"] #[doc = "we should pick a new curator. In this case the curator should also be slashed."] #[doc = ""] - #[doc = "# "] + #[doc = "## Complexity"] #[doc = "- O(1)."] - #[doc = "# "] unassign_curator { #[codec(compact)] bounty_id: ::core::primitive::u32, @@ -33817,9 +36935,8 @@ pub mod api { #[doc = ""] #[doc = "May only be called from the curator."] #[doc = ""] - #[doc = "# "] + #[doc = "## Complexity"] #[doc = "- O(1)."] - #[doc = "# "] accept_curator { #[codec(compact)] bounty_id: ::core::primitive::u32, @@ -33833,9 +36950,8 @@ pub mod api { #[doc = "- `bounty_id`: Bounty ID to award."] #[doc = "- `beneficiary`: The beneficiary account whom will receive the payout."] #[doc = ""] - #[doc = "# "] + #[doc = "## Complexity"] #[doc = "- O(1)."] - #[doc = "# "] award_bounty { #[codec(compact)] bounty_id: ::core::primitive::u32, @@ -33848,9 +36964,8 @@ pub mod api { #[doc = ""] #[doc = "- `bounty_id`: Bounty ID to claim."] #[doc = ""] - #[doc = "# "] + #[doc = "## Complexity"] #[doc = "- O(1)."] - #[doc = "# "] claim_bounty { #[codec(compact)] bounty_id: ::core::primitive::u32, @@ -33863,9 +36978,8 @@ pub mod api { #[doc = ""] #[doc = "- `bounty_id`: Bounty ID to cancel."] #[doc = ""] - #[doc = "# "] + #[doc = "## Complexity"] #[doc = "- O(1)."] - #[doc = "# "] close_bounty { #[codec(compact)] bounty_id: ::core::primitive::u32, @@ -33878,9 +36992,8 @@ pub mod api { #[doc = "- `bounty_id`: Bounty ID to extend."] #[doc = "- `remark`: additional information."] #[doc = ""] - #[doc = "# "] + #[doc = "## Complexity"] #[doc = "- O(1)."] - #[doc = "# "] extend_bounty_expiry { #[codec(compact)] bounty_id: ::core::primitive::u32, @@ -34368,7 +37481,7 @@ pub mod api { #[doc = "- `old_count`: The upper bound for the previous number of members in storage. Used for"] #[doc = " weight estimation."] #[doc = ""] - #[doc = "Requires root origin."] + #[doc = "The dispatch of this call must be `SetMembersOrigin`."] #[doc = ""] #[doc = "NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but"] #[doc = " the weight estimations rely on it to estimate dispatchable weight."] @@ -34380,19 +37493,11 @@ pub mod api { #[doc = "Any call to `set_members` must be careful that the member set doesn't get out of sync"] #[doc = "with other logic managing the member set."] #[doc = ""] - #[doc = "# "] - #[doc = "## Weight"] + #[doc = "## Complexity:"] #[doc = "- `O(MP + N)` where:"] #[doc = " - `M` old-members-count (code- and governance-bounded)"] #[doc = " - `N` new-members-count (code- and governance-bounded)"] #[doc = " - `P` proposals-count (code-bounded)"] - #[doc = "- DB:"] - #[doc = " - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the"] - #[doc = " members"] - #[doc = " - 1 storage read (codec `O(P)`) for reading the proposals"] - #[doc = " - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal"] - #[doc = " - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one"] - #[doc = "# "] set_members { new_members: ::std::vec::Vec<::subxt::utils::AccountId32>, prime: ::core::option::Option<::subxt::utils::AccountId32>, @@ -34403,13 +37508,11 @@ pub mod api { #[doc = ""] #[doc = "Origin must be a member of the collective."] #[doc = ""] - #[doc = "# "] - #[doc = "## Weight"] - #[doc = "- `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching"] - #[doc = " `proposal`"] - #[doc = "- DB: 1 read (codec `O(M)`) + DB access of `proposal`"] - #[doc = "- 1 event"] - #[doc = "# "] + #[doc = "## Complexity:"] + #[doc = "- `O(B + M + P)` where:"] + #[doc = "- `B` is `proposal` size in bytes (length-fee-bounded)"] + #[doc = "- `M` members-count (code-bounded)"] + #[doc = "- `P` complexity of dispatching `proposal`"] execute { proposal: ::std::boxed::Box, #[codec(compact)] @@ -34423,26 +37526,13 @@ pub mod api { #[doc = "`threshold` determines whether `proposal` is executed directly (`threshold < 2`)"] #[doc = "or put up for voting."] #[doc = ""] - #[doc = "# "] - #[doc = "## Weight"] + #[doc = "## Complexity"] #[doc = "- `O(B + M + P1)` or `O(B + M + P2)` where:"] #[doc = " - `B` is `proposal` size in bytes (length-fee-bounded)"] #[doc = " - `M` is members-count (code- and governance-bounded)"] #[doc = " - branching is influenced by `threshold` where:"] #[doc = " - `P1` is proposal execution complexity (`threshold < 2`)"] #[doc = " - `P2` is proposals-count (code-bounded) (`threshold >= 2`)"] - #[doc = "- DB:"] - #[doc = " - 1 storage read `is_member` (codec `O(M)`)"] - #[doc = " - 1 storage read `ProposalOf::contains_key` (codec `O(1)`)"] - #[doc = " - DB accesses influenced by `threshold`:"] - #[doc = " - EITHER storage accesses done by `proposal` (`threshold < 2`)"] - #[doc = " - OR proposal insertion (`threshold <= 2`)"] - #[doc = " - 1 storage mutation `Proposals` (codec `O(P2)`)"] - #[doc = " - 1 storage mutation `ProposalCount` (codec `O(1)`)"] - #[doc = " - 1 storage write `ProposalOf` (codec `O(B)`)"] - #[doc = " - 1 storage write `Voting` (codec `O(M)`)"] - #[doc = " - 1 event"] - #[doc = "# "] propose { #[codec(compact)] threshold: ::core::primitive::u32, @@ -34458,62 +37548,14 @@ pub mod api { #[doc = "Transaction fees will be waived if the member is voting on any particular proposal"] #[doc = "for the first time and the call is successful. Subsequent vote changes will charge a"] #[doc = "fee."] - #[doc = "# "] - #[doc = "## Weight"] + #[doc = "## Complexity"] #[doc = "- `O(M)` where `M` is members-count (code- and governance-bounded)"] - #[doc = "- DB:"] - #[doc = " - 1 storage read `Members` (codec `O(M)`)"] - #[doc = " - 1 storage mutation `Voting` (codec `O(M)`)"] - #[doc = "- 1 event"] - #[doc = "# "] vote { proposal: ::subxt::utils::H256, #[codec(compact)] index: ::core::primitive::u32, approve: ::core::primitive::bool, }, - #[codec(index = 4)] - #[doc = "Close a vote that is either approved, disapproved or whose voting period has ended."] - #[doc = ""] - #[doc = "May be called by any signed account in order to finish voting and close the proposal."] - #[doc = ""] - #[doc = "If called before the end of the voting period it will only close the vote if it is"] - #[doc = "has enough votes to be approved or disapproved."] - #[doc = ""] - #[doc = "If called after the end of the voting period abstentions are counted as rejections"] - #[doc = "unless there is a prime member set and the prime member cast an approval."] - #[doc = ""] - #[doc = "If the close operation completes successfully with disapproval, the transaction fee will"] - #[doc = "be waived. Otherwise execution of the approved operation will be charged to the caller."] - #[doc = ""] - #[doc = "+ `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed"] - #[doc = "proposal."] - #[doc = "+ `length_bound`: The upper bound for the length of the proposal in storage. Checked via"] - #[doc = "`storage::read` so it is `size_of::() == 4` larger than the pure length."] - #[doc = ""] - #[doc = "# "] - #[doc = "## Weight"] - #[doc = "- `O(B + M + P1 + P2)` where:"] - #[doc = " - `B` is `proposal` size in bytes (length-fee-bounded)"] - #[doc = " - `M` is members-count (code- and governance-bounded)"] - #[doc = " - `P1` is the complexity of `proposal` preimage."] - #[doc = " - `P2` is proposal-count (code-bounded)"] - #[doc = "- DB:"] - #[doc = " - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`)"] - #[doc = " - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec"] - #[doc = " `O(P2)`)"] - #[doc = " - any mutations done while executing `proposal` (`P1`)"] - #[doc = "- up to 3 events"] - #[doc = "# "] - close_old_weight { - proposal_hash: ::subxt::utils::H256, - #[codec(compact)] - index: ::core::primitive::u32, - #[codec(compact)] - proposal_weight_bound: runtime_types::sp_weights::OldWeight, - #[codec(compact)] - length_bound: ::core::primitive::u32, - }, #[codec(index = 5)] #[doc = "Disapprove a proposal, close, and remove it from the system, regardless of its current"] #[doc = "state."] @@ -34523,12 +37565,8 @@ pub mod api { #[doc = "Parameters:"] #[doc = "* `proposal_hash`: The hash of the proposal that should be disapproved."] #[doc = ""] - #[doc = "# "] - #[doc = "Complexity: O(P) where P is the number of max proposals"] - #[doc = "DB Weight:"] - #[doc = "* Reads: Proposals"] - #[doc = "* Writes: Voting, Proposals, ProposalOf"] - #[doc = "# "] + #[doc = "## Complexity"] + #[doc = "O(P) where P is the number of max proposals"] disapprove_proposal { proposal_hash: ::subxt::utils::H256 }, #[codec(index = 6)] #[doc = "Close a vote that is either approved, disapproved or whose voting period has ended."] @@ -34549,20 +37587,12 @@ pub mod api { #[doc = "+ `length_bound`: The upper bound for the length of the proposal in storage. Checked via"] #[doc = "`storage::read` so it is `size_of::() == 4` larger than the pure length."] #[doc = ""] - #[doc = "# "] - #[doc = "## Weight"] + #[doc = "## Complexity"] #[doc = "- `O(B + M + P1 + P2)` where:"] #[doc = " - `B` is `proposal` size in bytes (length-fee-bounded)"] #[doc = " - `M` is members-count (code- and governance-bounded)"] #[doc = " - `P1` is the complexity of `proposal` preimage."] #[doc = " - `P2` is proposal-count (code-bounded)"] - #[doc = "- DB:"] - #[doc = " - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`)"] - #[doc = " - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec"] - #[doc = " `O(P2)`)"] - #[doc = " - any mutations done while executing `proposal` (`P1`)"] - #[doc = "- up to 3 events"] - #[doc = "# "] close { proposal_hash: ::subxt::utils::H256, #[codec(compact)] @@ -34711,6 +37741,393 @@ pub mod api { pub end: _1, } } + pub mod pallet_conviction_voting { + use super::runtime_types; + pub mod conviction { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + 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 mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Vote in a poll. If `vote.is_aye()`, the vote is to enact the proposal;"] + #[doc = "otherwise it is a vote to keep the status quo."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be _Signed_."] + #[doc = ""] + #[doc = "- `poll_index`: The index of the poll to vote for."] + #[doc = "- `vote`: The vote configuration."] + #[doc = ""] + #[doc = "Weight: `O(R)` where R is the number of polls the voter has voted on."] + vote { + #[codec(compact)] + poll_index: ::core::primitive::u32, + vote: runtime_types::pallet_conviction_voting::vote::AccountVote< + ::core::primitive::u128, + >, + }, + #[codec(index = 1)] + #[doc = "Delegate the voting power (with some given conviction) of the sending account for a"] + #[doc = "particular class of polls."] + #[doc = ""] + #[doc = "The balance delegated is locked for as long as it's delegated, and thereafter for the"] + #[doc = "time appropriate for the conviction's lock period."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be _Signed_, and the signing account must either:"] + #[doc = " - be delegating already; or"] + #[doc = " - have no voting activity (if there is, then it will need to be removed/consolidated"] + #[doc = " through `reap_vote` or `unvote`)."] + #[doc = ""] + #[doc = "- `to`: The account whose voting the `target` account's voting power will follow."] + #[doc = "- `class`: The class of polls to delegate. To delegate multiple classes, multiple calls"] + #[doc = " to this function are required."] + #[doc = "- `conviction`: The conviction that will be attached to the delegated votes. When the"] + #[doc = " account is undelegated, the funds will be locked for the corresponding period."] + #[doc = "- `balance`: The amount of the account's balance to be used in delegating. This must not"] + #[doc = " be more than the account's current balance."] + #[doc = ""] + #[doc = "Emits `Delegated`."] + #[doc = ""] + #[doc = "Weight: `O(R)` where R is the number of polls the voter delegating to has"] + #[doc = " voted on. Weight is initially charged as if maximum votes, but is refunded later."] + delegate { + class: ::core::primitive::u16, + to: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + conviction: runtime_types::pallet_conviction_voting::conviction::Conviction, + balance: ::core::primitive::u128, + }, + #[codec(index = 2)] + #[doc = "Undelegate the voting power of the sending account for a particular class of polls."] + #[doc = ""] + #[doc = "Tokens may be unlocked following once an amount of time consistent with the lock period"] + #[doc = "of the conviction with which the delegation was issued has passed."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be _Signed_ and the signing account must be"] + #[doc = "currently delegating."] + #[doc = ""] + #[doc = "- `class`: The class of polls to remove the delegation from."] + #[doc = ""] + #[doc = "Emits `Undelegated`."] + #[doc = ""] + #[doc = "Weight: `O(R)` where R is the number of polls the voter delegating to has"] + #[doc = " voted on. Weight is initially charged as if maximum votes, but is refunded later."] + undelegate { class: ::core::primitive::u16 }, + #[codec(index = 3)] + #[doc = "Remove the lock caused by prior voting/delegating which has expired within a particular"] + #[doc = "class."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be _Signed_."] + #[doc = ""] + #[doc = "- `class`: The class of polls to unlock."] + #[doc = "- `target`: The account to remove the lock on."] + #[doc = ""] + #[doc = "Weight: `O(R)` with R number of vote of target."] + unlock { + class: ::core::primitive::u16, + target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + }, + #[codec(index = 4)] + #[doc = "Remove a vote for a poll."] + #[doc = ""] + #[doc = "If:"] + #[doc = "- the poll was cancelled, or"] + #[doc = "- the poll is ongoing, or"] + #[doc = "- the poll has ended such that"] + #[doc = " - the vote of the account was in opposition to the result; or"] + #[doc = " - there was no conviction to the account's vote; or"] + #[doc = " - the account made a split vote"] + #[doc = "...then the vote is removed cleanly and a following call to `unlock` may result in more"] + #[doc = "funds being available."] + #[doc = ""] + #[doc = "If, however, the poll has ended and:"] + #[doc = "- it finished corresponding to the vote of the account, and"] + #[doc = "- the account made a standard vote with conviction, and"] + #[doc = "- the lock period of the conviction is not over"] + #[doc = "...then the lock will be aggregated into the overall account's lock, which may involve"] + #[doc = "*overlocking* (where the two locks are combined into a single lock that is the maximum"] + #[doc = "of both the amount locked and the time is it locked for)."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be _Signed_, and the signer must have a vote"] + #[doc = "registered for poll `index`."] + #[doc = ""] + #[doc = "- `index`: The index of poll of the vote to be removed."] + #[doc = "- `class`: Optional parameter, if given it indicates the class of the poll. For polls"] + #[doc = " which have finished or are cancelled, this must be `Some`."] + #[doc = ""] + #[doc = "Weight: `O(R + log R)` where R is the number of polls that `target` has voted on."] + #[doc = " Weight is calculated for the maximum number of vote."] + remove_vote { + class: ::core::option::Option<::core::primitive::u16>, + index: ::core::primitive::u32, + }, + #[codec(index = 5)] + #[doc = "Remove a vote for a poll."] + #[doc = ""] + #[doc = "If the `target` is equal to the signer, then this function is exactly equivalent to"] + #[doc = "`remove_vote`. If not equal to the signer, then the vote must have expired,"] + #[doc = "either because the poll was cancelled, because the voter lost the poll or"] + #[doc = "because the conviction period is over."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be _Signed_."] + #[doc = ""] + #[doc = "- `target`: The account of the vote to be removed; this account must have voted for poll"] + #[doc = " `index`."] + #[doc = "- `index`: The index of poll of the vote to be removed."] + #[doc = "- `class`: The class of the poll."] + #[doc = ""] + #[doc = "Weight: `O(R + log R)` where R is the number of polls that `target` has voted on."] + #[doc = " Weight is calculated for the maximum number of vote."] + remove_other_vote { + target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + class: ::core::primitive::u16, + index: ::core::primitive::u32, + }, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "Poll is not ongoing."] + NotOngoing, + #[codec(index = 1)] + #[doc = "The given account did not vote on the poll."] + NotVoter, + #[codec(index = 2)] + #[doc = "The actor has no permission to conduct the action."] + NoPermission, + #[codec(index = 3)] + #[doc = "The actor has no permission to conduct the action right now but will do in the future."] + NoPermissionYet, + #[codec(index = 4)] + #[doc = "The account is already delegating."] + AlreadyDelegating, + #[codec(index = 5)] + #[doc = "The account currently has votes attached to it and the operation cannot succeed until"] + #[doc = "these are removed, either through `unvote` or `reap_vote`."] + AlreadyVoting, + #[codec(index = 6)] + #[doc = "Too high a balance was provided that the account cannot afford."] + InsufficientFunds, + #[codec(index = 7)] + #[doc = "The account is not currently delegating."] + NotDelegating, + #[codec(index = 8)] + #[doc = "Delegation to oneself makes no sense."] + Nonsense, + #[codec(index = 9)] + #[doc = "Maximum number of votes reached."] + MaxVotesReached, + #[codec(index = 10)] + #[doc = "The class must be supplied since it is not easily determinable from the state."] + ClassNeeded, + #[codec(index = 11)] + #[doc = "The class ID supplied is invalid."] + BadClass, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub enum Event { + #[codec(index = 0)] + #[doc = "An account has delegated their vote to another account. \\[who, target\\]"] + Delegated(::subxt::utils::AccountId32, ::subxt::utils::AccountId32), + #[codec(index = 1)] + #[doc = "An \\[account\\] has cancelled a previous delegation operation."] + Undelegated(::subxt::utils::AccountId32), + } + } + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Delegations<_0> { + pub votes: _0, + pub capital: _0, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Tally<_0> { + pub ayes: _0, + pub nays: _0, + pub support: _0, + } + } + pub mod vote { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum AccountVote<_0> { + #[codec(index = 0)] + Standard { + vote: runtime_types::pallet_conviction_voting::vote::Vote, + balance: _0, + }, + #[codec(index = 1)] + Split { aye: _0, nay: _0 }, + #[codec(index = 2)] + SplitAbstain { aye: _0, nay: _0, abstain: _0 }, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Casting<_0, _1, _2> { + pub votes: runtime_types::bounded_collections::bounded_vec::BoundedVec<( + _1, + runtime_types::pallet_conviction_voting::vote::AccountVote<_0>, + )>, + pub delegations: + runtime_types::pallet_conviction_voting::types::Delegations<_0>, + pub prior: runtime_types::pallet_conviction_voting::vote::PriorLock<_1, _0>, + #[codec(skip)] + pub __subxt_unused_type_params: ::core::marker::PhantomData<_2>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Delegating<_0, _1, _2> { + pub balance: _0, + pub target: _1, + pub conviction: runtime_types::pallet_conviction_voting::conviction::Conviction, + pub delegations: + runtime_types::pallet_conviction_voting::types::Delegations<_0>, + pub prior: runtime_types::pallet_conviction_voting::vote::PriorLock<_2, _0>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct PriorLock<_0, _1>(pub _0, pub _1); + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Vote(pub ::core::primitive::u8); + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum Voting<_0, _1, _2, _3> { + #[codec(index = 0)] + Casting(runtime_types::pallet_conviction_voting::vote::Casting<_0, _2, _2>), + #[codec(index = 1)] + Delegating( + runtime_types::pallet_conviction_voting::vote::Delegating<_0, _1, _2>, + ), + __Ignore(::core::marker::PhantomData<_3>), + } + } + } pub mod pallet_democracy { use super::runtime_types; pub mod conviction { @@ -35039,6 +38456,26 @@ pub mod api { #[codec(compact)] prop_index: ::core::primitive::u32, }, + #[codec(index = 18)] + #[doc = "Set or clear a metadata of a proposal or a referendum."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `origin`: Must correspond to the `MetadataOwner`."] + #[doc = " - `ExternalOrigin` for an external proposal with the `SuperMajorityApprove`"] + #[doc = " threshold."] + #[doc = " - `ExternalDefaultOrigin` for an external proposal with the `SuperMajorityAgainst`"] + #[doc = " threshold."] + #[doc = " - `ExternalMajorityOrigin` for an external proposal with the `SimpleMajority`"] + #[doc = " threshold."] + #[doc = " - `Signed` by a creator for a public proposal."] + #[doc = " - `Signed` to clear a metadata for a finished referendum."] + #[doc = " - `Root` to set a metadata for an ongoing referendum."] + #[doc = "- `owner`: an identifier of a metadata owner."] + #[doc = "- `maybe_hash`: The hash of an on-chain stored preimage. `None` to clear a metadata."] + set_metadata { + owner: runtime_types::pallet_democracy::types::MetadataOwner, + maybe_hash: ::core::option::Option<::subxt::utils::H256>, + }, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -35122,6 +38559,9 @@ pub mod api { #[codec(index = 22)] #[doc = "Voting period too low"] VotingPeriodLow, + #[codec(index = 23)] + #[doc = "The preimage does not exist."] + PreimageNotExist, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -35204,6 +38644,25 @@ pub mod api { #[codec(index = 13)] #[doc = "A proposal got canceled."] ProposalCanceled { prop_index: ::core::primitive::u32 }, + #[codec(index = 14)] + #[doc = "Metadata for a proposal or a referendum has been set."] + MetadataSet { + owner: runtime_types::pallet_democracy::types::MetadataOwner, + hash: ::subxt::utils::H256, + }, + #[codec(index = 15)] + #[doc = "Metadata for a proposal or a referendum has been cleared."] + MetadataCleared { + owner: runtime_types::pallet_democracy::types::MetadataOwner, + hash: ::subxt::utils::H256, + }, + #[codec(index = 16)] + #[doc = "Metadata has been transferred to new owner."] + MetadataTransferred { + prev_owner: runtime_types::pallet_democracy::types::MetadataOwner, + owner: runtime_types::pallet_democracy::types::MetadataOwner, + hash: ::subxt::utils::H256, + }, } } pub mod types { @@ -35232,6 +38691,24 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum MetadataOwner { + #[codec(index = 0)] + External, + #[codec(index = 1)] + Proposal(::core::primitive::u32), + #[codec(index = 2)] + Referendum(::core::primitive::u32), + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum ReferendumInfo<_0, _1, _2> { #[codec(index = 0)] Ongoing(runtime_types::pallet_democracy::types::ReferendumStatus<_0, _1, _2>), @@ -35331,7 +38808,7 @@ pub mod api { pub enum Voting<_0, _1, _2> { #[codec(index = 0)] Direct { - votes: runtime_types::sp_core::bounded::bounded_vec::BoundedVec<( + votes: runtime_types::bounded_collections::bounded_vec::BoundedVec<( _2, runtime_types::pallet_democracy::vote::AccountVote<_0>, )>, @@ -35457,13 +38934,15 @@ pub mod api { #[codec(index = 0)] #[doc = "A solution was stored with the given compute."] #[doc = ""] - #[doc = "If the solution is signed, this means that it hasn't yet been processed. If the"] - #[doc = "solution is unsigned, this means that it has also been processed."] - #[doc = ""] - #[doc = "The `bool` is `true` when a previous solution was ejected to make room for this one."] + #[doc = "The `origin` indicates the origin of the solution. If `origin` is `Some(AccountId)`,"] + #[doc = "the stored solution was submited in the signed phase by a miner with the `AccountId`."] + #[doc = "Otherwise, the solution was stored either during the unsigned phase or by"] + #[doc = "`T::ForceOrigin`. The `bool` is `true` when a previous solution was ejected to make"] + #[doc = "room for this one."] SolutionStored { compute: runtime_types::pallet_election_provider_multi_phase::ElectionCompute, + origin: ::core::option::Option<::subxt::utils::AccountId32>, prev_ejected: ::core::primitive::bool, }, #[codec(index = 1)] @@ -35491,11 +38970,16 @@ pub mod api { value: ::core::primitive::u128, }, #[codec(index = 5)] - #[doc = "The signed phase of the given round has started."] - SignedPhaseStarted { round: ::core::primitive::u32 }, - #[codec(index = 6)] - #[doc = "The unsigned phase of the given round has started."] - UnsignedPhaseStarted { round: ::core::primitive::u32 }, + #[doc = "There was a phase transition in a given round."] + PhaseTransitioned { + from: runtime_types::pallet_election_provider_multi_phase::Phase< + ::core::primitive::u32, + >, + to: runtime_types::pallet_election_provider_multi_phase::Phase< + ::core::primitive::u32, + >, + round: ::core::primitive::u32, + }, } } pub mod signed { @@ -35586,7 +39070,7 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ReadySolution { - pub supports: runtime_types::sp_core::bounded::bounded_vec::BoundedVec<( + pub supports: runtime_types::bounded_collections::bounded_vec::BoundedVec<( ::subxt::utils::AccountId32, runtime_types::sp_npos_elections::Support<::subxt::utils::AccountId32>, )>, @@ -35603,15 +39087,9 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RoundSnapshot { - pub voters: ::std::vec::Vec<( - ::subxt::utils::AccountId32, - ::core::primitive::u64, - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::subxt::utils::AccountId32, - >, - )>, - pub targets: ::std::vec::Vec<::subxt::utils::AccountId32>, + pub struct RoundSnapshot<_0, _1> { + pub voters: ::std::vec::Vec<_1>, + pub targets: ::std::vec::Vec<_0>, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -35666,10 +39144,6 @@ pub mod api { #[doc = ""] #[doc = "It is the responsibility of the caller to **NOT** place all of their balance into the"] #[doc = "lock and keep some for further operations."] - #[doc = ""] - #[doc = "# "] - #[doc = "We assume the maximum weight among all 3 cases: vote_equal, vote_more and vote_less."] - #[doc = "# "] vote { votes: ::std::vec::Vec<::subxt::utils::AccountId32>, #[codec(compact)] @@ -35695,9 +39169,9 @@ pub mod api { #[doc = "Even if a candidate ends up being a member, they must call [`Call::renounce_candidacy`]"] #[doc = "to get their deposit back. Losing the spot in an election will always lead to a slash."] #[doc = ""] - #[doc = "# "] #[doc = "The number of current candidates must be provided as witness data."] - #[doc = "# "] + #[doc = "## Complexity"] + #[doc = "O(C + log(C)) where C is candidate_count."] submit_candidacy { #[codec(compact)] candidate_count: ::core::primitive::u32, @@ -35717,10 +39191,12 @@ pub mod api { #[doc = " next round."] #[doc = ""] #[doc = "The dispatch origin of this call must be signed, and have one of the above roles."] - #[doc = ""] - #[doc = "# "] #[doc = "The type of renouncing must be provided as witness data."] - #[doc = "# "] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = " - Renouncing::Candidate(count): O(count + log(count))"] + #[doc = " - Renouncing::Member: O(1)"] + #[doc = " - Renouncing::RunnerUp: O(1)"] renounce_candidacy { renouncing: runtime_types::pallet_elections_phragmen::Renouncing, }, @@ -35739,10 +39215,8 @@ pub mod api { #[doc = ""] #[doc = "Note that this does not affect the designated block number of the next election."] #[doc = ""] - #[doc = "# "] - #[doc = "If we have a replacement, we use a small weight. Else, since this is a root call and"] - #[doc = "will go into phragmen, we assume full block for now."] - #[doc = "# "] + #[doc = "## Complexity"] + #[doc = "- Check details of remove_and_replace_member() and do_phragmen()."] remove_member { who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, slash_bond: ::core::primitive::bool, @@ -35756,9 +39230,8 @@ pub mod api { #[doc = ""] #[doc = "The dispatch origin of this call must be root."] #[doc = ""] - #[doc = "# "] - #[doc = "The total number of voters and those that are defunct must be provided as witness data."] - #[doc = "# "] + #[doc = "## Complexity"] + #[doc = "- Check is_defunct_voter() details."] clean_defunct_voters { num_voters: ::core::primitive::u32, num_defunct: ::core::primitive::u32, @@ -35982,7 +39455,7 @@ pub mod api { #[doc = ""] #[doc = "Dispatch origin must be signed by the [`Config::ControlOrigin`]."] control { - unchecked_eras_to_check: ::core::primitive::u32, + eras_to_check: ::core::primitive::u32, }, } #[derive( @@ -36044,23 +39517,19 @@ pub mod api { amount: ::core::primitive::u128, }, #[codec(index = 2)] - #[doc = "Some internal error happened while migrating stash. They are removed as head as a"] - #[doc = "consequence."] - Errored { stash: ::subxt::utils::AccountId32 }, - #[codec(index = 3)] #[doc = "An internal error happened. Operations will be paused now."] InternalError, - #[codec(index = 4)] + #[codec(index = 3)] #[doc = "A batch was partially checked for the given eras, but the process did not finish."] BatchChecked { eras: ::std::vec::Vec<::core::primitive::u32>, }, - #[codec(index = 5)] - #[doc = "A batch was terminated."] + #[codec(index = 4)] + #[doc = "A batch of a given size was terminated."] #[doc = ""] #[doc = "This is always follows by a number of `Unstaked` or `Slashed` events, marking the end"] #[doc = "of the batch. A new batch will be created upon next block."] - BatchFinished, + BatchFinished { size: ::core::primitive::u32 }, } } pub mod types { @@ -36076,11 +39545,11 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct UnstakeRequest { - pub stashes: runtime_types::sp_core::bounded::bounded_vec::BoundedVec<( + pub stashes: runtime_types::bounded_collections::bounded_vec::BoundedVec<( ::subxt::utils::AccountId32, ::core::primitive::u128, )>, - pub checked: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + pub checked: runtime_types::bounded_collections::bounded_vec::BoundedVec< ::core::primitive::u32, >, } @@ -36109,7 +39578,7 @@ pub mod api { #[doc = "will be reported."] report_equivocation { equivocation_proof: ::std::boxed::Box< - runtime_types::sp_finality_grandpa::EquivocationProof< + runtime_types::sp_consensus_grandpa::EquivocationProof< ::subxt::utils::H256, ::core::primitive::u32, >, @@ -36128,7 +39597,7 @@ pub mod api { #[doc = "reporter."] report_equivocation_unsigned { equivocation_proof: ::std::boxed::Box< - runtime_types::sp_finality_grandpa::EquivocationProof< + runtime_types::sp_consensus_grandpa::EquivocationProof< ::subxt::utils::H256, ::core::primitive::u32, >, @@ -36205,7 +39674,7 @@ pub mod api { #[doc = "New authority set has been applied."] NewAuthorities { authority_set: ::std::vec::Vec<( - runtime_types::sp_finality_grandpa::app::Public, + runtime_types::sp_consensus_grandpa::app::Public, ::core::primitive::u64, )>, }, @@ -36231,8 +39700,8 @@ pub mod api { pub scheduled_at: _0, pub delay: _0, pub next_authorities: - runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec<( - runtime_types::sp_finality_grandpa::app::Public, + runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec<( + runtime_types::sp_consensus_grandpa::app::Public, ::core::primitive::u64, )>, pub forced: ::core::option::Option<_0>, @@ -36283,11 +39752,8 @@ pub mod api { #[doc = ""] #[doc = "Emits `RegistrarAdded` if successful."] #[doc = ""] - #[doc = "# "] + #[doc = "## Complexity"] #[doc = "- `O(R)` where `R` registrar-count (governance-bounded and code-bounded)."] - #[doc = "- One storage mutation (codec `O(R)`)."] - #[doc = "- One event."] - #[doc = "# "] add_registrar { account: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, }, @@ -36303,14 +39769,10 @@ pub mod api { #[doc = ""] #[doc = "Emits `IdentitySet` if successful."] #[doc = ""] - #[doc = "# "] + #[doc = "## Complexity"] #[doc = "- `O(X + X' + R)`"] #[doc = " - where `X` additional-field-count (deposit-bounded and code-bounded)"] #[doc = " - where `R` judgements-count (registrar-count-bounded)"] - #[doc = "- One balance reserve operation."] - #[doc = "- One storage mutation (codec-read `O(X' + R)`, codec-write `O(X + R)`)."] - #[doc = "- One event."] - #[doc = "# "] set_identity { info: ::std::boxed::Box, @@ -36326,17 +39788,10 @@ pub mod api { #[doc = ""] #[doc = "- `subs`: The identity's (new) sub-accounts."] #[doc = ""] - #[doc = "# "] + #[doc = "## Complexity"] #[doc = "- `O(P + S)`"] #[doc = " - where `P` old-subs-count (hard- and deposit-bounded)."] #[doc = " - where `S` subs-count (hard- and deposit-bounded)."] - #[doc = "- At most one balance operations."] - #[doc = "- DB:"] - #[doc = " - `P + S` storage mutations (codec complexity `O(1)`)"] - #[doc = " - One storage read (codec complexity `O(P)`)."] - #[doc = " - One storage write (codec complexity `O(S)`)."] - #[doc = " - One storage-exists (`IdentityOf::contains_key`)."] - #[doc = "# "] set_subs { subs: ::std::vec::Vec<( ::subxt::utils::AccountId32, @@ -36353,15 +39808,11 @@ pub mod api { #[doc = ""] #[doc = "Emits `IdentityCleared` if successful."] #[doc = ""] - #[doc = "# "] + #[doc = "## Complexity"] #[doc = "- `O(R + S + X)`"] #[doc = " - where `R` registrar-count (governance-bounded)."] #[doc = " - where `S` subs-count (hard- and deposit-bounded)."] #[doc = " - where `X` additional-field-count (deposit-bounded and code-bounded)."] - #[doc = "- One balance-unreserve operation."] - #[doc = "- `2` storage reads and `S + 2` storage deletions."] - #[doc = "- One event."] - #[doc = "# "] clear_identity, #[codec(index = 4)] #[doc = "Request a judgement from a registrar."] @@ -36381,12 +39832,10 @@ pub mod api { #[doc = ""] #[doc = "Emits `JudgementRequested` if successful."] #[doc = ""] - #[doc = "# "] + #[doc = "## Complexity"] #[doc = "- `O(R + X)`."] - #[doc = "- One balance-reserve operation."] - #[doc = "- Storage: 1 read `O(R)`, 1 mutate `O(X + R)`."] - #[doc = "- One event."] - #[doc = "# "] + #[doc = " - where `R` registrar-count (governance-bounded)."] + #[doc = " - where `X` additional-field-count (deposit-bounded and code-bounded)."] request_judgement { #[codec(compact)] reg_index: ::core::primitive::u32, @@ -36405,12 +39854,10 @@ pub mod api { #[doc = ""] #[doc = "Emits `JudgementUnrequested` if successful."] #[doc = ""] - #[doc = "# "] + #[doc = "## Complexity"] #[doc = "- `O(R + X)`."] - #[doc = "- One balance-reserve operation."] - #[doc = "- One storage mutation `O(R + X)`."] - #[doc = "- One event"] - #[doc = "# "] + #[doc = " - where `R` registrar-count (governance-bounded)."] + #[doc = " - where `X` additional-field-count (deposit-bounded and code-bounded)."] cancel_request { reg_index: ::core::primitive::u32 }, #[codec(index = 6)] #[doc = "Set the fee required for a judgement to be requested from a registrar."] @@ -36421,11 +39868,9 @@ pub mod api { #[doc = "- `index`: the index of the registrar whose fee is to be set."] #[doc = "- `fee`: the new fee."] #[doc = ""] - #[doc = "# "] + #[doc = "## Complexity"] #[doc = "- `O(R)`."] - #[doc = "- One storage mutation `O(R)`."] - #[doc = "- Benchmark: 7.315 + R * 0.329 µs (min squares analysis)"] - #[doc = "# "] + #[doc = " - where `R` registrar-count (governance-bounded)."] set_fee { #[codec(compact)] index: ::core::primitive::u32, @@ -36441,11 +39886,9 @@ pub mod api { #[doc = "- `index`: the index of the registrar whose fee is to be set."] #[doc = "- `new`: the new account ID."] #[doc = ""] - #[doc = "# "] + #[doc = "## Complexity"] #[doc = "- `O(R)`."] - #[doc = "- One storage mutation `O(R)`."] - #[doc = "- Benchmark: 8.823 + R * 0.32 µs (min squares analysis)"] - #[doc = "# "] + #[doc = " - where `R` registrar-count (governance-bounded)."] set_account_id { #[codec(compact)] index: ::core::primitive::u32, @@ -36460,11 +39903,9 @@ pub mod api { #[doc = "- `index`: the index of the registrar whose fee is to be set."] #[doc = "- `fields`: the fields that the registrar concerns themselves with."] #[doc = ""] - #[doc = "# "] + #[doc = "## Complexity"] #[doc = "- `O(R)`."] - #[doc = "- One storage mutation `O(R)`."] - #[doc = "- Benchmark: 7.464 + R * 0.325 µs (min squares analysis)"] - #[doc = "# "] + #[doc = " - where `R` registrar-count (governance-bounded)."] set_fields { #[codec(compact)] index: ::core::primitive::u32, @@ -36486,13 +39927,10 @@ pub mod api { #[doc = ""] #[doc = "Emits `JudgementGiven` if successful."] #[doc = ""] - #[doc = "# "] + #[doc = "## Complexity"] #[doc = "- `O(R + X)`."] - #[doc = "- One balance-transfer operation."] - #[doc = "- Up to one account-lookup operation."] - #[doc = "- Storage: 1 read `O(R)`, 1 mutate `O(R + X)`."] - #[doc = "- One event."] - #[doc = "# "] + #[doc = " - where `R` registrar-count (governance-bounded)."] + #[doc = " - where `X` additional-field-count (deposit-bounded and code-bounded)."] provide_judgement { #[codec(compact)] reg_index: ::core::primitive::u32, @@ -36516,12 +39954,11 @@ pub mod api { #[doc = ""] #[doc = "Emits `IdentityKilled` if successful."] #[doc = ""] - #[doc = "# "] - #[doc = "- `O(R + S + X)`."] - #[doc = "- One balance-reserve operation."] - #[doc = "- `S + 2` storage mutations."] - #[doc = "- One event."] - #[doc = "# "] + #[doc = "## Complexity"] + #[doc = "- `O(R + S + X)`"] + #[doc = " - where `R` registrar-count (governance-bounded)."] + #[doc = " - where `S` subs-count (hard- and deposit-bounded)."] + #[doc = " - where `X` additional-field-count (deposit-bounded and code-bounded)."] kill_identity { target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, }, @@ -36855,7 +40292,7 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct IdentityInfo { - pub additional: runtime_types::sp_core::bounded::bounded_vec::BoundedVec<( + pub additional: runtime_types::bounded_collections::bounded_vec::BoundedVec<( runtime_types::pallet_identity::types::Data, runtime_types::pallet_identity::types::Data, )>, @@ -36922,7 +40359,7 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Registration<_0> { - pub judgements: runtime_types::sp_core::bounded::bounded_vec::BoundedVec<( + pub judgements: runtime_types::bounded_collections::bounded_vec::BoundedVec<( ::core::primitive::u32, runtime_types::pallet_identity::types::Judgement<_0>, )>, @@ -36948,15 +40385,11 @@ pub mod api { #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { #[codec(index = 0)] - #[doc = "# "] - #[doc = "- Complexity: `O(K + E)` where K is length of `Keys` (heartbeat.validators_len) and E is"] - #[doc = " length of `heartbeat.network_state.external_address`"] + #[doc = "## Complexity:"] + #[doc = "- `O(K + E)` where K is length of `Keys` (heartbeat.validators_len) and E is length of"] + #[doc = " `heartbeat.network_state.external_address`"] #[doc = " - `O(K)`: decoding of length `K`"] #[doc = " - `O(E)`: decoding/encoding of length `E`"] - #[doc = "- DbReads: pallet_session `Validators`, pallet_session `CurrentIndex`, `Keys`,"] - #[doc = " `ReceivedHeartbeats`"] - #[doc = "- DbWrites: `ReceivedHeartbeats`"] - #[doc = "# "] heartbeat { heartbeat: runtime_types::pallet_im_online::Heartbeat<::core::primitive::u32>, @@ -37054,12 +40487,12 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct BoundedOpaqueNetworkState { - pub peer_id: runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec< + pub peer_id: runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec< ::core::primitive::u8, >, pub external_addresses: - runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec< - runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec< + runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec< + runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec< ::core::primitive::u8, >, >, @@ -37109,14 +40542,8 @@ pub mod api { #[doc = ""] #[doc = "Emits `IndexAssigned` if successful."] #[doc = ""] - #[doc = "# "] + #[doc = "## Complexity"] #[doc = "- `O(1)`."] - #[doc = "- One storage mutation (codec `O(1)`)."] - #[doc = "- One reserve operation."] - #[doc = "- One event."] - #[doc = "-------------------"] - #[doc = "- DB Weight: 1 Read/Write (Accounts)"] - #[doc = "# "] claim { index: ::core::primitive::u32 }, #[codec(index = 1)] #[doc = "Assign an index already owned by the sender to another account. The balance reservation"] @@ -37129,16 +40556,8 @@ pub mod api { #[doc = ""] #[doc = "Emits `IndexAssigned` if successful."] #[doc = ""] - #[doc = "# "] + #[doc = "## Complexity"] #[doc = "- `O(1)`."] - #[doc = "- One storage mutation (codec `O(1)`)."] - #[doc = "- One transfer operation."] - #[doc = "- One event."] - #[doc = "-------------------"] - #[doc = "- DB Weight:"] - #[doc = " - Reads: Indices Accounts, System Account (recipient)"] - #[doc = " - Writes: Indices Accounts, System Account (recipient)"] - #[doc = "# "] transfer { new: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, index: ::core::primitive::u32, @@ -37154,14 +40573,8 @@ pub mod api { #[doc = ""] #[doc = "Emits `IndexFreed` if successful."] #[doc = ""] - #[doc = "# "] + #[doc = "## Complexity"] #[doc = "- `O(1)`."] - #[doc = "- One storage mutation (codec `O(1)`)."] - #[doc = "- One reserve operation."] - #[doc = "- One event."] - #[doc = "-------------------"] - #[doc = "- DB Weight: 1 Read/Write (Accounts)"] - #[doc = "# "] free { index: ::core::primitive::u32 }, #[codec(index = 3)] #[doc = "Force an index to an account. This doesn't require a deposit. If the index is already"] @@ -37175,16 +40588,8 @@ pub mod api { #[doc = ""] #[doc = "Emits `IndexAssigned` if successful."] #[doc = ""] - #[doc = "# "] + #[doc = "## Complexity"] #[doc = "- `O(1)`."] - #[doc = "- One storage mutation (codec `O(1)`)."] - #[doc = "- Up to one reserve operation."] - #[doc = "- One event."] - #[doc = "-------------------"] - #[doc = "- DB Weight:"] - #[doc = " - Reads: Indices Accounts, System Account (original owner)"] - #[doc = " - Writes: Indices Accounts, System Account (original owner)"] - #[doc = "# "] force_transfer { new: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, index: ::core::primitive::u32, @@ -37201,14 +40606,8 @@ pub mod api { #[doc = ""] #[doc = "Emits `IndexFrozen` if successful."] #[doc = ""] - #[doc = "# "] + #[doc = "## Complexity"] #[doc = "- `O(1)`."] - #[doc = "- One storage mutation (codec `O(1)`)."] - #[doc = "- Up to one slash operation."] - #[doc = "- One event."] - #[doc = "-------------------"] - #[doc = "- DB Weight: 1 Read/Write (Accounts)"] - #[doc = "# "] freeze { index: ::core::primitive::u32 }, } #[derive( @@ -37421,12 +40820,8 @@ pub mod api { #[doc = ""] #[doc = "Result is equivalent to the dispatched result."] #[doc = ""] - #[doc = "# "] + #[doc = "## Complexity"] #[doc = "O(Z + C) where Z is the length of the call and C its execution weight."] - #[doc = "-------------------------------"] - #[doc = "- DB Weight: None"] - #[doc = "- Plus Call Weight"] - #[doc = "# "] as_multi_threshold_1 { other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, call: ::std::boxed::Box, @@ -37458,7 +40853,7 @@ pub mod api { #[doc = "on success, result is `Ok` and the result from the interior call, if it was executed,"] #[doc = "may be found in the deposited `MultisigExecuted` event."] #[doc = ""] - #[doc = "# "] + #[doc = "## Complexity"] #[doc = "- `O(S + Z + Call)`."] #[doc = "- Up to one balance-reserve or unreserve operation."] #[doc = "- One passthrough operation, one insert, both `O(S)` where `S` is the number of"] @@ -37471,12 +40866,6 @@ pub mod api { #[doc = "- The weight of the `call`."] #[doc = "- Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit"] #[doc = " taken for its lifetime of `DepositBase + threshold * DepositFactor`."] - #[doc = "-------------------------------"] - #[doc = "- DB Weight:"] - #[doc = " - Reads: Multisig Storage, [Caller Account]"] - #[doc = " - Writes: Multisig Storage, [Caller Account]"] - #[doc = "- Plus Call Weight"] - #[doc = "# "] as_multi { threshold: ::core::primitive::u16, other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, @@ -37506,7 +40895,7 @@ pub mod api { #[doc = ""] #[doc = "NOTE: If this is the final approval, you will want to use `as_multi` instead."] #[doc = ""] - #[doc = "# "] + #[doc = "## Complexity"] #[doc = "- `O(S)`."] #[doc = "- Up to one balance-reserve or unreserve operation."] #[doc = "- One passthrough operation, one insert, both `O(S)` where `S` is the number of"] @@ -37517,11 +40906,6 @@ pub mod api { #[doc = "- One event."] #[doc = "- Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit"] #[doc = " taken for its lifetime of `DepositBase + threshold * DepositFactor`."] - #[doc = "----------------------------------"] - #[doc = "- DB Weight:"] - #[doc = " - Read: Multisig Storage, [Caller Account]"] - #[doc = " - Write: Multisig Storage, [Caller Account]"] - #[doc = "# "] approve_as_multi { threshold: ::core::primitive::u16, other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, @@ -37544,7 +40928,7 @@ pub mod api { #[doc = "transaction for this dispatch."] #[doc = "- `call_hash`: The hash of the call to be executed."] #[doc = ""] - #[doc = "# "] + #[doc = "## Complexity"] #[doc = "- `O(S)`."] #[doc = "- Up to one balance-reserve or unreserve operation."] #[doc = "- One passthrough operation, one insert, both `O(S)` where `S` is the number of"] @@ -37553,11 +40937,6 @@ pub mod api { #[doc = "- One event."] #[doc = "- I/O: 1 read `O(S)`, one remove."] #[doc = "- Storage: removes one item."] - #[doc = "----------------------------------"] - #[doc = "- DB Weight:"] - #[doc = " - Read: Multisig Storage, [Caller Account], Refund Account"] - #[doc = " - Write: Multisig Storage, [Caller Account], Refund Account"] - #[doc = "# "] cancel_as_multi { threshold: ::core::primitive::u16, other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, @@ -37685,7 +41064,7 @@ pub mod api { pub when: runtime_types::pallet_multisig::Timepoint<_0>, pub deposit: _1, pub depositor: _2, - pub approvals: runtime_types::sp_core::bounded::bounded_vec::BoundedVec<_2>, + pub approvals: runtime_types::bounded_collections::bounded_vec::BoundedVec<_2>, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -37741,6 +41120,7 @@ pub mod api { #[doc = "accumulated rewards, see [`BondExtra`]."] #[doc = ""] #[doc = "Bonding extra funds implies an automatic payout of all pending rewards as well."] + #[doc = "See `bond_extra_other` to bond pending rewards of `other` members."] bond_extra { extra: runtime_types::pallet_nomination_pools::BondExtra< ::core::primitive::u128, @@ -37748,11 +41128,13 @@ pub mod api { }, #[codec(index = 2)] #[doc = "A bonded member can use this to claim their payout based on the rewards that the pool"] - #[doc = "has accumulated since their last claimed payout (OR since joining if this is there first"] + #[doc = "has accumulated since their last claimed payout (OR since joining if this is their first"] #[doc = "time claiming rewards). The payout will be transferred to the member's account."] #[doc = ""] #[doc = "The member will earn rewards pro rata based on the members stake vs the sum of the"] #[doc = "members in the pools stake. Rewards do not \"expire\"."] + #[doc = ""] + #[doc = "See `claim_payout_other` to caim rewards on bahalf of some `other` pool member."] claim_payout, #[codec(index = 3)] #[doc = "Unbond up to `unbonding_points` of the `member_account`'s funds from the pool. It"] @@ -37764,8 +41146,8 @@ pub mod api { #[doc = ""] #[doc = "# Conditions for a permissionless dispatch."] #[doc = ""] - #[doc = "* The pool is blocked and the caller is either the root or state-toggler. This is"] - #[doc = " refereed to as a kick."] + #[doc = "* The pool is blocked and the caller is either the root or bouncer. This is refereed to"] + #[doc = " as a kick."] #[doc = "* The pool is destroying and the member is not the depositor."] #[doc = "* The pool is destroying, the member is the depositor and no other members are in the"] #[doc = " pool."] @@ -37780,9 +41162,12 @@ pub mod api { #[doc = "# Note"] #[doc = ""] #[doc = "If there are too many unlocking chunks to unbond with the pool account,"] - #[doc = "[`Call::pool_withdraw_unbonded`] can be called to try and minimize unlocking chunks. If"] - #[doc = "there are too many unlocking chunks, the result of this call will likely be the"] - #[doc = "`NoMoreChunks` error from the staking system."] + #[doc = "[`Call::pool_withdraw_unbonded`] can be called to try and minimize unlocking chunks."] + #[doc = "The [`StakingInterface::unbond`] will implicitly call [`Call::pool_withdraw_unbonded`]"] + #[doc = "to try to free chunks if necessary (ie. if unbound was called and no unlocking chunks"] + #[doc = "are available). However, it may not be possible to release the current unlocking chunks,"] + #[doc = "in which case, the result of this call will likely be the `NoMoreChunks` error from the"] + #[doc = "staking system."] unbond { member_account: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, @@ -37811,7 +41196,7 @@ pub mod api { #[doc = ""] #[doc = "* The pool is in destroy mode and the target is not the depositor."] #[doc = "* The target is the depositor and they are the only member in the sub pools."] - #[doc = "* The pool is blocked and the caller is either the root or state-toggler."] + #[doc = "* The pool is blocked and the caller is either the root or bouncer."] #[doc = ""] #[doc = "# Conditions for permissioned dispatch"] #[doc = ""] @@ -37837,7 +41222,7 @@ pub mod api { #[doc = " creating multiple pools in the same extrinsic."] #[doc = "* `root` - The account to set as [`PoolRoles::root`]."] #[doc = "* `nominator` - The account to set as the [`PoolRoles::nominator`]."] - #[doc = "* `state_toggler` - The account to set as the [`PoolRoles::state_toggler`]."] + #[doc = "* `bouncer` - The account to set as the [`PoolRoles::bouncer`]."] #[doc = ""] #[doc = "# Note"] #[doc = ""] @@ -37848,8 +41233,7 @@ pub mod api { amount: ::core::primitive::u128, root: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, nominator: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - state_toggler: - ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + bouncer: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, }, #[codec(index = 7)] #[doc = "Create a new delegation pool with a previously used pool id"] @@ -37863,8 +41247,7 @@ pub mod api { amount: ::core::primitive::u128, root: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, nominator: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - state_toggler: - ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + bouncer: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, pool_id: ::core::primitive::u32, }, #[codec(index = 8)] @@ -37887,7 +41270,7 @@ pub mod api { #[doc = ""] #[doc = "The dispatch origin of this call must be either:"] #[doc = ""] - #[doc = "1. signed by the state toggler, or the root role of the pool,"] + #[doc = "1. signed by the bouncer, or the root role of the pool,"] #[doc = "2. if the pool conditions to be open are NOT met (as described by `ok_to_be_open`), and"] #[doc = " then the state of the pool can be permissionlessly changed to `Destroying`."] set_state { @@ -37897,8 +41280,8 @@ pub mod api { #[codec(index = 10)] #[doc = "Set a new metadata for the pool."] #[doc = ""] - #[doc = "The dispatch origin of this call must be signed by the state toggler, or the root role"] - #[doc = "of the pool."] + #[doc = "The dispatch origin of this call must be signed by the bouncer, or the root role of the"] + #[doc = "pool."] set_metadata { pool_id: ::core::primitive::u32, metadata: ::std::vec::Vec<::core::primitive::u8>, @@ -37914,6 +41297,7 @@ pub mod api { #[doc = "* `max_pools` - Set [`MaxPools`]."] #[doc = "* `max_members` - Set [`MaxPoolMembers`]."] #[doc = "* `max_members_per_pool` - Set [`MaxPoolMembersPerPool`]."] + #[doc = "* `global_max_commission` - Set [`GlobalMaxCommission`]."] set_configs { min_join_bond: runtime_types::pallet_nomination_pools::ConfigOp< ::core::primitive::u128, @@ -37930,6 +41314,9 @@ pub mod api { max_members_per_pool: runtime_types::pallet_nomination_pools::ConfigOp< ::core::primitive::u32, >, + global_max_commission: runtime_types::pallet_nomination_pools::ConfigOp< + runtime_types::sp_arithmetic::per_things::Perbill, + >, }, #[codec(index = 12)] #[doc = "Update the roles of the pool."] @@ -37947,7 +41334,7 @@ pub mod api { new_nominator: runtime_types::pallet_nomination_pools::ConfigOp< ::subxt::utils::AccountId32, >, - new_state_toggler: runtime_types::pallet_nomination_pools::ConfigOp< + new_bouncer: runtime_types::pallet_nomination_pools::ConfigOp< ::subxt::utils::AccountId32, >, }, @@ -37960,6 +41347,85 @@ pub mod api { #[doc = "This directly forward the call to the staking pallet, on behalf of the pool bonded"] #[doc = "account."] chill { pool_id: ::core::primitive::u32 }, + #[codec(index = 14)] + #[doc = "`origin` bonds funds from `extra` for some pool member `member` into their respective"] + #[doc = "pools."] + #[doc = ""] + #[doc = "`origin` can bond extra funds from free balance or pending rewards when `origin =="] + #[doc = "other`."] + #[doc = ""] + #[doc = "In the case of `origin != other`, `origin` can only bond extra pending rewards of"] + #[doc = "`other` members assuming set_claim_permission for the given member is"] + #[doc = "`PermissionlessAll` or `PermissionlessCompound`."] + bond_extra_other { + member: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + extra: runtime_types::pallet_nomination_pools::BondExtra< + ::core::primitive::u128, + >, + }, + #[codec(index = 15)] + #[doc = "Allows a pool member to set a claim permission to allow or disallow permissionless"] + #[doc = "bonding and withdrawing."] + #[doc = ""] + #[doc = "By default, this is `Permissioned`, which implies only the pool member themselves can"] + #[doc = "claim their pending rewards. If a pool member wishes so, they can set this to"] + #[doc = "`PermissionlessAll` to allow any account to claim their rewards and bond extra to the"] + #[doc = "pool."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `origin` - Member of a pool."] + #[doc = "* `actor` - Account to claim reward. // improve this"] + set_claim_permission { + permission: runtime_types::pallet_nomination_pools::ClaimPermission, + }, + #[codec(index = 16)] + #[doc = "`origin` can claim payouts on some pool member `other`'s behalf."] + #[doc = ""] + #[doc = "Pool member `other` must have a `PermissionlessAll` or `PermissionlessWithdraw` in order"] + #[doc = "for this call to be successful."] + claim_payout_other { other: ::subxt::utils::AccountId32 }, + #[codec(index = 17)] + #[doc = "Set the commission of a pool."] + #[doc = "Both a commission percentage and a commission payee must be provided in the `current`"] + #[doc = "tuple. Where a `current` of `None` is provided, any current commission will be removed."] + #[doc = ""] + #[doc = "- If a `None` is supplied to `new_commission`, existing commission will be removed."] + set_commission { + pool_id: ::core::primitive::u32, + new_commission: ::core::option::Option<( + runtime_types::sp_arithmetic::per_things::Perbill, + ::subxt::utils::AccountId32, + )>, + }, + #[codec(index = 18)] + #[doc = "Set the maximum commission of a pool."] + #[doc = ""] + #[doc = "- Initial max can be set to any `Perbill`, and only smaller values thereafter."] + #[doc = "- Current commission will be lowered in the event it is higher than a new max"] + #[doc = " commission."] + set_commission_max { + pool_id: ::core::primitive::u32, + max_commission: runtime_types::sp_arithmetic::per_things::Perbill, + }, + #[codec(index = 19)] + #[doc = "Set the commission change rate for a pool."] + #[doc = ""] + #[doc = "Initial change rate is not bounded, whereas subsequent updates can only be more"] + #[doc = "restrictive than the current."] + set_commission_change_rate { + pool_id: ::core::primitive::u32, + change_rate: runtime_types::pallet_nomination_pools::CommissionChangeRate< + ::core::primitive::u32, + >, + }, + #[codec(index = 20)] + #[doc = "Claim pending commission."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be signed by the `root` role of the pool. Pending"] + #[doc = "commission is paid out and added to total claimed commission`. Total pending commission"] + #[doc = "is reset to zero. the current."] + claim_commission { pool_id: ::core::primitive::u32 }, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -38067,11 +41533,32 @@ pub mod api { #[doc = "Partial unbonding now allowed permissionlessly."] PartialUnbondNotAllowedPermissionlessly, #[codec(index = 21)] + #[doc = "The pool's max commission cannot be set higher than the existing value."] + MaxCommissionRestricted, + #[codec(index = 22)] + #[doc = "The supplied commission exceeds the max allowed commission."] + CommissionExceedsMaximum, + #[codec(index = 23)] + #[doc = "Not enough blocks have surpassed since the last commission update."] + CommissionChangeThrottled, + #[codec(index = 24)] + #[doc = "The submitted changes to commission change rate are not allowed."] + CommissionChangeRateNotAllowed, + #[codec(index = 25)] + #[doc = "There is no pending commission to claim."] + NoPendingCommission, + #[codec(index = 26)] + #[doc = "No commission current has been set."] + NoCommissionCurrentSet, + #[codec(index = 27)] #[doc = "Pool id currently in use."] PoolIdInUse, - #[codec(index = 22)] + #[codec(index = 28)] #[doc = "Pool id provided is not correct/usable."] InvalidPoolId, + #[codec(index = 29)] + #[doc = "Bonding extra is restricted to the exact pending reward amount."] + BondExtraRestricted, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -38160,7 +41647,7 @@ pub mod api { #[doc = "can never change."] RolesUpdated { root: ::core::option::Option<::subxt::utils::AccountId32>, - state_toggler: ::core::option::Option<::subxt::utils::AccountId32>, + bouncer: ::core::option::Option<::subxt::utils::AccountId32>, nominator: ::core::option::Option<::subxt::utils::AccountId32>, }, #[codec(index = 9)] @@ -38176,6 +41663,35 @@ pub mod api { era: ::core::primitive::u32, balance: ::core::primitive::u128, }, + #[codec(index = 11)] + #[doc = "A pool's commission setting has been changed."] + PoolCommissionUpdated { + pool_id: ::core::primitive::u32, + current: ::core::option::Option<( + runtime_types::sp_arithmetic::per_things::Perbill, + ::subxt::utils::AccountId32, + )>, + }, + #[codec(index = 12)] + #[doc = "A pool's maximum commission setting has been changed."] + PoolMaxCommissionUpdated { + pool_id: ::core::primitive::u32, + max_commission: runtime_types::sp_arithmetic::per_things::Perbill, + }, + #[codec(index = 13)] + #[doc = "A pool's commission `change_rate` has been changed."] + PoolCommissionChangeRateUpdated { + pool_id: ::core::primitive::u32, + change_rate: runtime_types::pallet_nomination_pools::CommissionChangeRate< + ::core::primitive::u32, + >, + }, + #[codec(index = 14)] + #[doc = "Pool commission has been claimed."] + PoolCommissionClaimed { + pool_id: ::core::primitive::u32, + commission: ::core::primitive::u128, + }, } } #[derive( @@ -38205,11 +41721,69 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct BondedPoolInner { - pub points: ::core::primitive::u128, - pub state: runtime_types::pallet_nomination_pools::PoolState, + pub commission: runtime_types::pallet_nomination_pools::Commission, pub member_counter: ::core::primitive::u32, + pub points: ::core::primitive::u128, pub roles: runtime_types::pallet_nomination_pools::PoolRoles<::subxt::utils::AccountId32>, + pub state: runtime_types::pallet_nomination_pools::PoolState, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum ClaimPermission { + #[codec(index = 0)] + Permissioned, + #[codec(index = 1)] + PermissionlessCompound, + #[codec(index = 2)] + PermissionlessWithdraw, + #[codec(index = 3)] + PermissionlessAll, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Commission { + pub current: ::core::option::Option<( + runtime_types::sp_arithmetic::per_things::Perbill, + ::subxt::utils::AccountId32, + )>, + pub max: ::core::option::Option, + pub change_rate: ::core::option::Option< + runtime_types::pallet_nomination_pools::CommissionChangeRate< + ::core::primitive::u32, + >, + >, + pub throttle_from: ::core::option::Option<::core::primitive::u32>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct CommissionChangeRate<_0> { + pub max_increase: runtime_types::sp_arithmetic::per_things::Perbill, + pub min_delay: _0, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -38245,7 +41819,7 @@ pub mod api { pub last_recorded_reward_counter: runtime_types::sp_arithmetic::fixed_point::FixedU128, pub unbonding_eras: - runtime_types::sp_core::bounded::bounded_btree_map::BoundedBTreeMap< + runtime_types::bounded_collections::bounded_btree_map::BoundedBTreeMap< ::core::primitive::u32, ::core::primitive::u128, >, @@ -38264,7 +41838,7 @@ pub mod api { pub depositor: _0, pub root: ::core::option::Option<_0>, pub nominator: ::core::option::Option<_0>, - pub state_toggler: ::core::option::Option<_0>, + pub bouncer: ::core::option::Option<_0>, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -38299,6 +41873,8 @@ pub mod api { runtime_types::sp_arithmetic::fixed_point::FixedU128, pub last_recorded_total_payouts: ::core::primitive::u128, pub total_rewards_claimed: ::core::primitive::u128, + pub total_commission_pending: ::core::primitive::u128, + pub total_commission_claimed: ::core::primitive::u128, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -38312,10 +41888,11 @@ pub mod api { #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SubPools { pub no_era: runtime_types::pallet_nomination_pools::UnbondPool, - pub with_era: runtime_types::sp_core::bounded::bounded_btree_map::BoundedBTreeMap< - ::core::primitive::u32, - runtime_types::pallet_nomination_pools::UnbondPool, - >, + pub with_era: + runtime_types::bounded_collections::bounded_btree_map::BoundedBTreeMap< + ::core::primitive::u32, + runtime_types::pallet_nomination_pools::UnbondPool, + >, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -38501,8 +42078,6 @@ pub mod api { #[doc = "Dispatch the given `call` from an account that the sender is authorised for through"] #[doc = "`add_proxy`."] #[doc = ""] - #[doc = "Removes any corresponding announcement(s)."] - #[doc = ""] #[doc = "The dispatch origin for this call must be _Signed_."] #[doc = ""] #[doc = "Parameters:"] @@ -38657,18 +42232,249 @@ pub mod api { #[doc = ""] #[doc = "Removes any corresponding announcement(s)."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `real`: The account that the proxy will make a call on behalf of."] + #[doc = "- `force_proxy_type`: Specify the exact proxy type to be used and checked for this call."] + #[doc = "- `call`: The call to be made by the `real` account."] + proxy_announced { + delegate: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + real: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + force_proxy_type: + ::core::option::Option, + call: ::std::boxed::Box, + }, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "There are too many proxies registered or too many announcements pending."] + TooMany, + #[codec(index = 1)] + #[doc = "Proxy registration not found."] + NotFound, + #[codec(index = 2)] + #[doc = "Sender is not a proxy of the account to be proxied."] + NotProxy, + #[codec(index = 3)] + #[doc = "A call which is incompatible with the proxy type's filter was attempted."] + Unproxyable, + #[codec(index = 4)] + #[doc = "Account is already a proxy."] + Duplicate, + #[codec(index = 5)] + #[doc = "Call may not be made by proxy because it may escalate its privileges."] + NoPermission, + #[codec(index = 6)] + #[doc = "Announcement, if made at all, was made too recently."] + Unannounced, + #[codec(index = 7)] + #[doc = "Cannot add self as proxy."] + NoSelfProxy, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub enum Event { + #[codec(index = 0)] + #[doc = "A proxy was executed correctly, with the given."] + ProxyExecuted { + result: + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + }, + #[codec(index = 1)] + #[doc = "A pure account has been created by new proxy with given"] + #[doc = "disambiguation index and proxy type."] + PureCreated { + pure: ::subxt::utils::AccountId32, + who: ::subxt::utils::AccountId32, + proxy_type: runtime_types::polkadot_runtime::ProxyType, + disambiguation_index: ::core::primitive::u16, + }, + #[codec(index = 2)] + #[doc = "An announcement was placed to make a call in the future."] + Announced { + real: ::subxt::utils::AccountId32, + proxy: ::subxt::utils::AccountId32, + call_hash: ::subxt::utils::H256, + }, + #[codec(index = 3)] + #[doc = "A proxy was added."] + ProxyAdded { + delegator: ::subxt::utils::AccountId32, + delegatee: ::subxt::utils::AccountId32, + proxy_type: runtime_types::polkadot_runtime::ProxyType, + delay: ::core::primitive::u32, + }, + #[codec(index = 4)] + #[doc = "A proxy was removed."] + ProxyRemoved { + delegator: ::subxt::utils::AccountId32, + delegatee: ::subxt::utils::AccountId32, + proxy_type: runtime_types::polkadot_runtime::ProxyType, + delay: ::core::primitive::u32, + }, + } + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Announcement<_0, _1, _2> { + pub real: _0, + pub call_hash: _1, + pub height: _2, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ProxyDefinition<_0, _1, _2> { + pub delegate: _0, + pub proxy_type: _1, + pub delay: _2, + } + } + pub mod pallet_referenda { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Propose a referendum on a privileged action."] + #[doc = ""] + #[doc = "- `origin`: must be `SubmitOrigin` and the account must have `SubmissionDeposit` funds"] + #[doc = " available."] + #[doc = "- `proposal_origin`: The origin from which the proposal should be executed."] + #[doc = "- `proposal`: The proposal."] + #[doc = "- `enactment_moment`: The moment that the proposal should be enacted."] + #[doc = ""] + #[doc = "Emits `Submitted`."] + submit { + proposal_origin: + ::std::boxed::Box, + proposal: runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::polkadot_runtime::RuntimeCall, + >, + enactment_moment: + runtime_types::frame_support::traits::schedule::DispatchTime< + ::core::primitive::u32, + >, + }, + #[codec(index = 1)] + #[doc = "Post the Decision Deposit for a referendum."] + #[doc = ""] + #[doc = "- `origin`: must be `Signed` and the account must have funds available for the"] + #[doc = " referendum's track's Decision Deposit."] + #[doc = "- `index`: The index of the submitted referendum whose Decision Deposit is yet to be"] + #[doc = " posted."] + #[doc = ""] + #[doc = "Emits `DecisionDepositPlaced`."] + place_decision_deposit { index: ::core::primitive::u32 }, + #[codec(index = 2)] + #[doc = "Refund the Decision Deposit for a closed referendum back to the depositor."] + #[doc = ""] + #[doc = "- `origin`: must be `Signed` or `Root`."] + #[doc = "- `index`: The index of a closed referendum whose Decision Deposit has not yet been"] + #[doc = " refunded."] + #[doc = ""] + #[doc = "Emits `DecisionDepositRefunded`."] + refund_decision_deposit { index: ::core::primitive::u32 }, + #[codec(index = 3)] + #[doc = "Cancel an ongoing referendum."] + #[doc = ""] + #[doc = "- `origin`: must be the `CancelOrigin`."] + #[doc = "- `index`: The index of the referendum to be cancelled."] + #[doc = ""] + #[doc = "Emits `Cancelled`."] + cancel { index: ::core::primitive::u32 }, + #[codec(index = 4)] + #[doc = "Cancel an ongoing referendum and slash the deposits."] + #[doc = ""] + #[doc = "- `origin`: must be the `KillOrigin`."] + #[doc = "- `index`: The index of the referendum to be cancelled."] + #[doc = ""] + #[doc = "Emits `Killed` and `DepositSlashed`."] + kill { index: ::core::primitive::u32 }, + #[codec(index = 5)] + #[doc = "Advance a referendum onto its next logical state. Only used internally."] + #[doc = ""] + #[doc = "- `origin`: must be `Root`."] + #[doc = "- `index`: the referendum to be advanced."] + nudge_referendum { index: ::core::primitive::u32 }, + #[codec(index = 6)] + #[doc = "Advance a track onto its next logical state. Only used internally."] + #[doc = ""] + #[doc = "- `origin`: must be `Root`."] + #[doc = "- `track`: the track to be advanced."] + #[doc = ""] + #[doc = "Action item for when there is now one fewer referendum in the deciding phase and the"] + #[doc = "`DecidingCount` is not yet updated. This means that we should either:"] + #[doc = "- begin deciding another referendum (and leave `DecidingCount` alone); or"] + #[doc = "- decrement `DecidingCount`."] + one_fewer_deciding { track: ::core::primitive::u16 }, + #[codec(index = 7)] + #[doc = "Refund the Submission Deposit for a closed referendum back to the depositor."] + #[doc = ""] + #[doc = "- `origin`: must be `Signed` or `Root`."] + #[doc = "- `index`: The index of a closed referendum whose Submission Deposit has not yet been"] + #[doc = " refunded."] + #[doc = ""] + #[doc = "Emits `SubmissionDepositRefunded`."] + refund_submission_deposit { index: ::core::primitive::u32 }, + #[codec(index = 8)] + #[doc = "Set or clear metadata of a referendum."] #[doc = ""] #[doc = "Parameters:"] - #[doc = "- `real`: The account that the proxy will make a call on behalf of."] - #[doc = "- `force_proxy_type`: Specify the exact proxy type to be used and checked for this call."] - #[doc = "- `call`: The call to be made by the `real` account."] - proxy_announced { - delegate: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - real: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - force_proxy_type: - ::core::option::Option, - call: ::std::boxed::Box, + #[doc = "- `origin`: Must be `Signed` by a creator of a referendum or by anyone to clear a"] + #[doc = " metadata of a finished referendum."] + #[doc = "- `index`: The index of a referendum to set or clear metadata for."] + #[doc = "- `maybe_hash`: The hash of an on-chain stored preimage. `None` to clear a metadata."] + set_metadata { + index: ::core::primitive::u32, + maybe_hash: ::core::option::Option<::subxt::utils::H256>, }, } #[derive( @@ -38684,29 +42490,44 @@ pub mod api { #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { #[codec(index = 0)] - #[doc = "There are too many proxies registered or too many announcements pending."] - TooMany, + #[doc = "Referendum is not ongoing."] + NotOngoing, #[codec(index = 1)] - #[doc = "Proxy registration not found."] - NotFound, + #[doc = "Referendum's decision deposit is already paid."] + HasDeposit, #[codec(index = 2)] - #[doc = "Sender is not a proxy of the account to be proxied."] - NotProxy, + #[doc = "The track identifier given was invalid."] + BadTrack, #[codec(index = 3)] - #[doc = "A call which is incompatible with the proxy type's filter was attempted."] - Unproxyable, + #[doc = "There are already a full complement of referenda in progress for this track."] + Full, #[codec(index = 4)] - #[doc = "Account is already a proxy."] - Duplicate, + #[doc = "The queue of the track is empty."] + QueueEmpty, #[codec(index = 5)] - #[doc = "Call may not be made by proxy because it may escalate its privileges."] - NoPermission, + #[doc = "The referendum index provided is invalid in this context."] + BadReferendum, #[codec(index = 6)] - #[doc = "Announcement, if made at all, was made too recently."] - Unannounced, + #[doc = "There was nothing to do in the advancement."] + NothingToDo, #[codec(index = 7)] - #[doc = "Cannot add self as proxy."] - NoSelfProxy, + #[doc = "No track exists for the proposal origin."] + NoTrack, + #[codec(index = 8)] + #[doc = "Any deposit cannot be refunded until after the decision is over."] + Unfinished, + #[codec(index = 9)] + #[doc = "The deposit refunder is not the depositor."] + NoPermission, + #[codec(index = 10)] + #[doc = "The deposit cannot be refunded since none was made."] + NoDeposit, + #[codec(index = 11)] + #[doc = "The referendum status is invalid for this operation."] + BadStatus, + #[codec(index = 12)] + #[doc = "The preimage does not exist."] + PreimageNotExist, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -38721,74 +42542,290 @@ pub mod api { #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] pub enum Event { #[codec(index = 0)] - #[doc = "A proxy was executed correctly, with the given."] - ProxyExecuted { - result: - ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + #[doc = "A referendum has been submitted."] + Submitted { + index: ::core::primitive::u32, + track: ::core::primitive::u16, + proposal: runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::polkadot_runtime::RuntimeCall, + >, }, #[codec(index = 1)] - #[doc = "A pure account has been created by new proxy with given"] - #[doc = "disambiguation index and proxy type."] - PureCreated { - pure: ::subxt::utils::AccountId32, + #[doc = "The decision deposit has been placed."] + DecisionDepositPlaced { + index: ::core::primitive::u32, who: ::subxt::utils::AccountId32, - proxy_type: runtime_types::polkadot_runtime::ProxyType, - disambiguation_index: ::core::primitive::u16, + amount: ::core::primitive::u128, }, #[codec(index = 2)] - #[doc = "An announcement was placed to make a call in the future."] - Announced { - real: ::subxt::utils::AccountId32, - proxy: ::subxt::utils::AccountId32, - call_hash: ::subxt::utils::H256, + #[doc = "The decision deposit has been refunded."] + DecisionDepositRefunded { + index: ::core::primitive::u32, + who: ::subxt::utils::AccountId32, + amount: ::core::primitive::u128, }, #[codec(index = 3)] - #[doc = "A proxy was added."] - ProxyAdded { - delegator: ::subxt::utils::AccountId32, - delegatee: ::subxt::utils::AccountId32, - proxy_type: runtime_types::polkadot_runtime::ProxyType, - delay: ::core::primitive::u32, + #[doc = "A deposit has been slashaed."] + DepositSlashed { + who: ::subxt::utils::AccountId32, + amount: ::core::primitive::u128, }, #[codec(index = 4)] - #[doc = "A proxy was removed."] - ProxyRemoved { - delegator: ::subxt::utils::AccountId32, - delegatee: ::subxt::utils::AccountId32, - proxy_type: runtime_types::polkadot_runtime::ProxyType, - delay: ::core::primitive::u32, + #[doc = "A referendum has moved into the deciding phase."] + DecisionStarted { + index: ::core::primitive::u32, + track: ::core::primitive::u16, + proposal: runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::polkadot_runtime::RuntimeCall, + >, + tally: runtime_types::pallet_conviction_voting::types::Tally< + ::core::primitive::u128, + >, + }, + #[codec(index = 5)] + ConfirmStarted { index: ::core::primitive::u32 }, + #[codec(index = 6)] + ConfirmAborted { index: ::core::primitive::u32 }, + #[codec(index = 7)] + #[doc = "A referendum has ended its confirmation phase and is ready for approval."] + Confirmed { + index: ::core::primitive::u32, + tally: runtime_types::pallet_conviction_voting::types::Tally< + ::core::primitive::u128, + >, + }, + #[codec(index = 8)] + #[doc = "A referendum has been approved and its proposal has been scheduled."] + Approved { index: ::core::primitive::u32 }, + #[codec(index = 9)] + #[doc = "A proposal has been rejected by referendum."] + Rejected { + index: ::core::primitive::u32, + tally: runtime_types::pallet_conviction_voting::types::Tally< + ::core::primitive::u128, + >, + }, + #[codec(index = 10)] + #[doc = "A referendum has been timed out without being decided."] + TimedOut { + index: ::core::primitive::u32, + tally: runtime_types::pallet_conviction_voting::types::Tally< + ::core::primitive::u128, + >, + }, + #[codec(index = 11)] + #[doc = "A referendum has been cancelled."] + Cancelled { + index: ::core::primitive::u32, + tally: runtime_types::pallet_conviction_voting::types::Tally< + ::core::primitive::u128, + >, + }, + #[codec(index = 12)] + #[doc = "A referendum has been killed."] + Killed { + index: ::core::primitive::u32, + tally: runtime_types::pallet_conviction_voting::types::Tally< + ::core::primitive::u128, + >, + }, + #[codec(index = 13)] + #[doc = "The submission deposit has been refunded."] + SubmissionDepositRefunded { + index: ::core::primitive::u32, + who: ::subxt::utils::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 14)] + #[doc = "Metadata for a referendum has been set."] + MetadataSet { + index: ::core::primitive::u32, + hash: ::subxt::utils::H256, + }, + #[codec(index = 15)] + #[doc = "Metadata for a referendum has been cleared."] + MetadataCleared { + index: ::core::primitive::u32, + hash: ::subxt::utils::H256, }, } } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Announcement<_0, _1, _2> { - pub real: _0, - pub call_hash: _1, - pub height: _2, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ProxyDefinition<_0, _1, _2> { - pub delegate: _0, - pub proxy_type: _1, - pub delay: _2, + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum Curve { + #[codec(index = 0)] + LinearDecreasing { + length: runtime_types::sp_arithmetic::per_things::Perbill, + floor: runtime_types::sp_arithmetic::per_things::Perbill, + ceil: runtime_types::sp_arithmetic::per_things::Perbill, + }, + #[codec(index = 1)] + SteppedDecreasing { + begin: runtime_types::sp_arithmetic::per_things::Perbill, + end: runtime_types::sp_arithmetic::per_things::Perbill, + step: runtime_types::sp_arithmetic::per_things::Perbill, + period: runtime_types::sp_arithmetic::per_things::Perbill, + }, + #[codec(index = 2)] + Reciprocal { + factor: runtime_types::sp_arithmetic::fixed_point::FixedI64, + x_offset: runtime_types::sp_arithmetic::fixed_point::FixedI64, + y_offset: runtime_types::sp_arithmetic::fixed_point::FixedI64, + }, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct DecidingStatus<_0> { + pub since: _0, + pub confirming: ::core::option::Option<_0>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Deposit<_0, _1> { + pub who: _0, + pub amount: _1, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum ReferendumInfo<_0, _1, _2, _3, _4, _5, _6, _7> { + #[codec(index = 0)] + Ongoing( + runtime_types::pallet_referenda::types::ReferendumStatus< + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + >, + ), + #[codec(index = 1)] + Approved( + _2, + ::core::option::Option< + runtime_types::pallet_referenda::types::Deposit<_6, _4>, + >, + ::core::option::Option< + runtime_types::pallet_referenda::types::Deposit<_6, _4>, + >, + ), + #[codec(index = 2)] + Rejected( + _2, + ::core::option::Option< + runtime_types::pallet_referenda::types::Deposit<_6, _4>, + >, + ::core::option::Option< + runtime_types::pallet_referenda::types::Deposit<_6, _4>, + >, + ), + #[codec(index = 3)] + Cancelled( + _2, + ::core::option::Option< + runtime_types::pallet_referenda::types::Deposit<_6, _4>, + >, + ::core::option::Option< + runtime_types::pallet_referenda::types::Deposit<_6, _4>, + >, + ), + #[codec(index = 4)] + TimedOut( + _2, + ::core::option::Option< + runtime_types::pallet_referenda::types::Deposit<_6, _4>, + >, + ::core::option::Option< + runtime_types::pallet_referenda::types::Deposit<_6, _4>, + >, + ), + #[codec(index = 5)] + Killed(_2), + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ReferendumStatus<_0, _1, _2, _3, _4, _5, _6, _7> { + pub track: _0, + pub origin: _1, + pub proposal: _3, + pub enactment: runtime_types::frame_support::traits::schedule::DispatchTime<_2>, + pub submitted: _2, + pub submission_deposit: runtime_types::pallet_referenda::types::Deposit<_6, _4>, + pub decision_deposit: ::core::option::Option< + runtime_types::pallet_referenda::types::Deposit<_6, _4>, + >, + pub deciding: ::core::option::Option< + runtime_types::pallet_referenda::types::DecidingStatus<_2>, + >, + pub tally: _5, + pub in_queue: ::core::primitive::bool, + pub alarm: ::core::option::Option<(_2, _7)>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct TrackInfo<_0, _1> { + pub name: ::std::string::String, + pub max_deciding: _1, + pub decision_deposit: _0, + pub prepare_period: _1, + pub decision_period: _1, + pub confirm_period: _1, + pub min_enactment_period: _1, + pub min_approval: runtime_types::pallet_referenda::types::Curve, + pub min_support: runtime_types::pallet_referenda::types::Curve, + } } } pub mod pallet_scheduler { @@ -38843,10 +42880,6 @@ pub mod api { }, #[codec(index = 4)] #[doc = "Anonymously schedule a task after a delay."] - #[doc = ""] - #[doc = "# "] - #[doc = "Same as [`schedule`]."] - #[doc = "# "] schedule_after { after: ::core::primitive::u32, maybe_periodic: ::core::option::Option<( @@ -38858,10 +42891,6 @@ pub mod api { }, #[codec(index = 5)] #[doc = "Schedule a named task after a delay."] - #[doc = ""] - #[doc = "# "] - #[doc = "Same as [`schedule_named`](Self::schedule_named)."] - #[doc = "# "] schedule_named_after { id: [::core::primitive::u8; 32usize], after: ::core::primitive::u32, @@ -38996,14 +43025,9 @@ pub mod api { #[doc = ""] #[doc = "The dispatch origin of this function must be signed."] #[doc = ""] - #[doc = "# "] - #[doc = "- Complexity: `O(1)`. Actual cost depends on the number of length of"] - #[doc = " `T::Keys::key_ids()` which is fixed."] - #[doc = "- DbReads: `origin account`, `T::ValidatorIdOf`, `NextKeys`"] - #[doc = "- DbWrites: `origin account`, `NextKeys`"] - #[doc = "- DbReads per key id: `KeyOwner`"] - #[doc = "- DbWrites per key id: `KeyOwner`"] - #[doc = "# "] + #[doc = "## Complexity"] + #[doc = "- `O(1)`. Actual cost depends on the number of length of `T::Keys::key_ids()` which is"] + #[doc = " fixed."] set_keys { keys: runtime_types::polkadot_runtime::SessionKeys, proof: ::std::vec::Vec<::core::primitive::u8>, @@ -39018,13 +43042,9 @@ pub mod api { #[doc = "means being a controller account) or directly convertible into a validator ID (which"] #[doc = "usually means being a stash account)."] #[doc = ""] - #[doc = "# "] - #[doc = "- Complexity: `O(1)` in number of key types. Actual cost depends on the number of length"] - #[doc = " of `T::Keys::key_ids()` which is fixed."] - #[doc = "- DbReads: `T::ValidatorIdOf`, `NextKeys`, `origin account`"] - #[doc = "- DbWrites: `NextKeys`, `origin account`"] - #[doc = "- DbWrites per key id: `KeyOwner`"] - #[doc = "# "] + #[doc = "## Complexity"] + #[doc = "- `O(1)` in number of key types. Actual cost depends on the number of length of"] + #[doc = " `T::Keys::key_ids()` which is fixed."] purge_keys, } #[derive( @@ -39103,15 +43123,13 @@ pub mod api { #[doc = "The dispatch origin for this call must be _Signed_ by the stash account."] #[doc = ""] #[doc = "Emits `Bonded`."] - #[doc = "# "] + #[doc = "## Complexity"] #[doc = "- Independent of the arguments. Moderate complexity."] #[doc = "- O(1)."] #[doc = "- Three extra DB entries."] #[doc = ""] #[doc = "NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned"] #[doc = "unless the `origin` falls below _existential deposit_ and gets removed as dust."] - #[doc = "------------------"] - #[doc = "# "] bond { controller: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, @@ -39133,10 +43151,9 @@ pub mod api { #[doc = ""] #[doc = "Emits `Bonded`."] #[doc = ""] - #[doc = "# "] + #[doc = "## Complexity"] #[doc = "- Independent of the arguments. Insignificant complexity."] #[doc = "- O(1)."] - #[doc = "# "] bond_extra { #[codec(compact)] max_additional: ::core::primitive::u128, @@ -39152,8 +43169,8 @@ pub mod api { #[doc = "the funds out of management ready for transfer."] #[doc = ""] #[doc = "No more than a limited number of unlocking chunks (see `MaxUnlockingChunks`)"] - #[doc = "can co-exists at the same time. In that case, [`Call::withdraw_unbonded`] need"] - #[doc = "to be called first to remove some of the chunks (if possible)."] + #[doc = "can co-exists at the same time. If there are no unlocking chunks slots available"] + #[doc = "[`Call::withdraw_unbonded`] is called to remove some of the chunks (if possible)."] #[doc = ""] #[doc = "If a user encounters the `InsufficientBond` error when calling this extrinsic,"] #[doc = "they should call `chill` first in order to free up their bonded funds."] @@ -39177,10 +43194,9 @@ pub mod api { #[doc = ""] #[doc = "See also [`Call::unbond`]."] #[doc = ""] - #[doc = "# "] - #[doc = "Complexity O(S) where S is the number of slashing spans to remove"] + #[doc = "## Complexity"] + #[doc = "O(S) where S is the number of slashing spans to remove"] #[doc = "NOTE: Weight annotation is the kill scenario, we refund otherwise."] - #[doc = "# "] withdraw_unbonded { num_slashing_spans: ::core::primitive::u32, }, @@ -39200,11 +43216,10 @@ pub mod api { #[doc = ""] #[doc = "The dispatch origin for this call must be _Signed_ by the controller, not the stash."] #[doc = ""] - #[doc = "# "] + #[doc = "## Complexity"] #[doc = "- The transaction's complexity is proportional to the size of `targets` (N)"] #[doc = "which is capped at CompactAssignments::LIMIT (T::MaxNominations)."] #[doc = "- Both the reads and writes follow a similar pattern."] - #[doc = "# "] nominate { targets: ::std::vec::Vec< ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, @@ -39217,11 +43232,10 @@ pub mod api { #[doc = ""] #[doc = "The dispatch origin for this call must be _Signed_ by the controller, not the stash."] #[doc = ""] - #[doc = "# "] + #[doc = "## Complexity"] #[doc = "- Independent of the arguments. Insignificant complexity."] #[doc = "- Contains one read."] #[doc = "- Writes are limited to the `origin` account key."] - #[doc = "# "] chill, #[codec(index = 7)] #[doc = "(Re-)set the payment target for a controller."] @@ -39230,16 +43244,12 @@ pub mod api { #[doc = ""] #[doc = "The dispatch origin for this call must be _Signed_ by the controller, not the stash."] #[doc = ""] - #[doc = "# "] + #[doc = "## Complexity"] + #[doc = "- O(1)"] #[doc = "- Independent of the arguments. Insignificant complexity."] #[doc = "- Contains a limited number of reads."] #[doc = "- Writes are limited to the `origin` account key."] #[doc = "---------"] - #[doc = "- Weight: O(1)"] - #[doc = "- DB Weight:"] - #[doc = " - Read: Ledger"] - #[doc = " - Write: Payee"] - #[doc = "# "] set_payee { payee: runtime_types::pallet_staking::RewardDestination< ::subxt::utils::AccountId32, @@ -39252,16 +43262,11 @@ pub mod api { #[doc = ""] #[doc = "The dispatch origin for this call must be _Signed_ by the stash, not the controller."] #[doc = ""] - #[doc = "# "] + #[doc = "## Complexity"] + #[doc = "O(1)"] #[doc = "- Independent of the arguments. Insignificant complexity."] #[doc = "- Contains a limited number of reads."] #[doc = "- Writes are limited to the `origin` account key."] - #[doc = "----------"] - #[doc = "Weight: O(1)"] - #[doc = "DB Weight:"] - #[doc = "- Read: Bonded, Ledger New Controller, Ledger Old Controller"] - #[doc = "- Write: Bonded, Ledger New Controller, Ledger Old Controller"] - #[doc = "# "] set_controller { controller: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, @@ -39271,10 +43276,8 @@ pub mod api { #[doc = ""] #[doc = "The dispatch origin must be Root."] #[doc = ""] - #[doc = "# "] - #[doc = "Weight: O(1)"] - #[doc = "Write: Validator Count"] - #[doc = "# "] + #[doc = "## Complexity"] + #[doc = "O(1)"] set_validator_count { #[codec(compact)] new: ::core::primitive::u32, @@ -39285,9 +43288,8 @@ pub mod api { #[doc = ""] #[doc = "The dispatch origin must be Root."] #[doc = ""] - #[doc = "# "] + #[doc = "## Complexity"] #[doc = "Same as [`Self::set_validator_count`]."] - #[doc = "# "] increase_validator_count { #[codec(compact)] additional: ::core::primitive::u32, @@ -39298,9 +43300,8 @@ pub mod api { #[doc = ""] #[doc = "The dispatch origin must be Root."] #[doc = ""] - #[doc = "# "] + #[doc = "## Complexity"] #[doc = "Same as [`Self::set_validator_count`]."] - #[doc = "# "] scale_validator_count { factor: runtime_types::sp_arithmetic::per_things::Percent, }, @@ -39315,11 +43316,9 @@ pub mod api { #[doc = "Thus the election process may be ongoing when this is called. In this case the"] #[doc = "election will continue until the next era is triggered."] #[doc = ""] - #[doc = "# "] + #[doc = "## Complexity"] #[doc = "- No arguments."] #[doc = "- Weight: O(1)"] - #[doc = "- Write: ForceEra"] - #[doc = "# "] force_no_eras, #[codec(index = 13)] #[doc = "Force there to be a new era at the end of the next session. After this, it will be"] @@ -39333,11 +43332,9 @@ pub mod api { #[doc = "If this is called just before a new era is triggered, the election process may not"] #[doc = "have enough blocks to get a result."] #[doc = ""] - #[doc = "# "] + #[doc = "## Complexity"] #[doc = "- No arguments."] #[doc = "- Weight: O(1)"] - #[doc = "- Write ForceEra"] - #[doc = "# "] force_new_era, #[codec(index = 14)] #[doc = "Set the validators who cannot be slashed (if any)."] @@ -39368,7 +43365,7 @@ pub mod api { #[codec(index = 17)] #[doc = "Cancel enactment of a deferred slash."] #[doc = ""] - #[doc = "Can be called by the `T::SlashCancelOrigin`."] + #[doc = "Can be called by the `T::AdminOrigin`."] #[doc = ""] #[doc = "Parameters: era and indices of the slashes for that era to kill."] cancel_deferred_slash { @@ -39385,18 +43382,8 @@ pub mod api { #[doc = "The origin of this call must be _Signed_. Any account can call this function, even if"] #[doc = "it is not one of the stakers."] #[doc = ""] - #[doc = "# "] - #[doc = "- Time complexity: at most O(MaxNominatorRewardedPerValidator)."] - #[doc = "- Contains a limited number of reads and writes."] - #[doc = "-----------"] - #[doc = "N is the Number of payouts for the validator (including the validator)"] - #[doc = "Weight:"] - #[doc = "- Reward Destination Staked: O(N)"] - #[doc = "- Reward Destination Controller (Creating): O(N)"] - #[doc = ""] - #[doc = " NOTE: weights are assuming that payouts are made to alive stash account (Staked)."] - #[doc = " Paying even a dead controller is cheaper weight-wise. We don't do any refunds here."] - #[doc = "# "] + #[doc = "## Complexity"] + #[doc = "- At most O(MaxNominatorRewardedPerValidator)."] payout_stakers { validator_stash: ::subxt::utils::AccountId32, era: ::core::primitive::u32, @@ -39406,11 +43393,9 @@ pub mod api { #[doc = ""] #[doc = "The dispatch origin must be signed by the controller."] #[doc = ""] - #[doc = "# "] + #[doc = "## Complexity"] #[doc = "- Time complexity: O(L), where L is unlocking chunks"] #[doc = "- Bounded by `MaxUnlockingChunks`."] - #[doc = "- Storage changes: Can't increase storage, only decrease it."] - #[doc = "# "] rebond { #[codec(compact)] value: ::core::primitive::u128, @@ -39529,6 +43514,14 @@ pub mod api { force_apply_min_commission { validator_stash: ::subxt::utils::AccountId32, }, + #[codec(index = 25)] + #[doc = "Sets the minimum amount of commission that each validators must maintain."] + #[doc = ""] + #[doc = "This call has lower privilege requirements than `set_staking_config` and can be called"] + #[doc = "by the `T::AdminOrigin`. Root can always call this."] + set_min_commission { + new: runtime_types::sp_arithmetic::per_things::Perbill, + }, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -39667,21 +43660,29 @@ pub mod api { amount: ::core::primitive::u128, }, #[codec(index = 2)] - #[doc = "One staker (and potentially its nominators) has been slashed by the given amount."] + #[doc = "A staker (validator or nominator) has been slashed by the given amount."] Slashed { staker: ::subxt::utils::AccountId32, amount: ::core::primitive::u128, }, #[codec(index = 3)] + #[doc = "A slash for the given validator, for the given percentage of their stake, at the given"] + #[doc = "era as been reported."] + SlashReported { + validator: ::subxt::utils::AccountId32, + fraction: runtime_types::sp_arithmetic::per_things::Perbill, + slash_era: ::core::primitive::u32, + }, + #[codec(index = 4)] #[doc = "An old slashing report from a prior era was discarded because it could"] #[doc = "not be processed."] OldSlashingReportDiscarded { session_index: ::core::primitive::u32, }, - #[codec(index = 4)] + #[codec(index = 5)] #[doc = "A new set of stakers was elected."] StakersElected, - #[codec(index = 5)] + #[codec(index = 6)] #[doc = "An account has bonded this amount. \\[stash, amount\\]"] #[doc = ""] #[doc = "NOTE: This event is only emitted when funds are bonded via a dispatchable. Notably,"] @@ -39690,43 +43691,48 @@ pub mod api { stash: ::subxt::utils::AccountId32, amount: ::core::primitive::u128, }, - #[codec(index = 6)] + #[codec(index = 7)] #[doc = "An account has unbonded this amount."] Unbonded { stash: ::subxt::utils::AccountId32, amount: ::core::primitive::u128, }, - #[codec(index = 7)] + #[codec(index = 8)] #[doc = "An account has called `withdraw_unbonded` and removed unbonding chunks worth `Balance`"] #[doc = "from the unlocking queue."] Withdrawn { stash: ::subxt::utils::AccountId32, amount: ::core::primitive::u128, }, - #[codec(index = 8)] + #[codec(index = 9)] #[doc = "A nominator has been kicked from a validator."] Kicked { nominator: ::subxt::utils::AccountId32, stash: ::subxt::utils::AccountId32, }, - #[codec(index = 9)] + #[codec(index = 10)] #[doc = "The election failed. No new era is planned."] StakingElectionFailed, - #[codec(index = 10)] + #[codec(index = 11)] #[doc = "An account has stopped participating as either a validator or nominator."] Chilled { stash: ::subxt::utils::AccountId32 }, - #[codec(index = 11)] + #[codec(index = 12)] #[doc = "The stakers' rewards are getting paid."] PayoutStarted { era_index: ::core::primitive::u32, validator_stash: ::subxt::utils::AccountId32, }, - #[codec(index = 12)] + #[codec(index = 13)] #[doc = "A validator has set their preferences."] ValidatorPrefsSet { stash: ::subxt::utils::AccountId32, prefs: runtime_types::pallet_staking::ValidatorPrefs, }, + #[codec(index = 14)] + #[doc = "A new force era mode was set."] + ForceEra { + mode: runtime_types::pallet_staking::Forcing, + }, } } } @@ -39855,7 +43861,7 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Nominations { - pub targets: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + pub targets: runtime_types::bounded_collections::bounded_vec::BoundedVec< ::subxt::utils::AccountId32, >, pub submitted_in: ::core::primitive::u32, @@ -39871,42 +43877,6 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Releases { - #[codec(index = 0)] - V1_0_0Ancient, - #[codec(index = 1)] - V2_0_0, - #[codec(index = 2)] - V3_0_0, - #[codec(index = 3)] - V4_0_0, - #[codec(index = 4)] - V5_0_0, - #[codec(index = 5)] - V6_0_0, - #[codec(index = 6)] - V7_0_0, - #[codec(index = 7)] - V8_0_0, - #[codec(index = 8)] - V9_0_0, - #[codec(index = 9)] - V10_0_0, - #[codec(index = 10)] - V11_0_0, - #[codec(index = 11)] - V12_0_0, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum RewardDestination<_0> { #[codec(index = 0)] Staked, @@ -39935,10 +43905,10 @@ pub mod api { pub total: ::core::primitive::u128, #[codec(compact)] pub active: ::core::primitive::u128, - pub unlocking: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + pub unlocking: runtime_types::bounded_collections::bounded_vec::BoundedVec< runtime_types::pallet_staking::UnlockChunk<::core::primitive::u128>, >, - pub claimed_rewards: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + pub claimed_rewards: runtime_types::bounded_collections::bounded_vec::BoundedVec< ::core::primitive::u32, >, } @@ -40018,12 +43988,11 @@ pub mod api { #[doc = ""] #[doc = "The dispatch origin for this call must be `Inherent`."] #[doc = ""] - #[doc = "# "] + #[doc = "## Complexity"] #[doc = "- `O(1)` (Note that implementations of `OnTimestampSet` must also be `O(1)`)"] #[doc = "- 1 storage read and 1 storage mutation (codec `O(1)`). (because of `DidUpdate::take` in"] #[doc = " `on_finalize`)"] #[doc = "- 1 event handler `on_timestamp_set`. Must be `O(1)`."] - #[doc = "# "] set { #[codec(compact)] now: ::core::primitive::u64, @@ -40061,12 +44030,9 @@ pub mod api { #[doc = ""] #[doc = "Emits `NewTip` if successful."] #[doc = ""] - #[doc = "# "] - #[doc = "- Complexity: `O(R)` where `R` length of `reason`."] + #[doc = "## Complexity"] + #[doc = "- `O(R)` where `R` length of `reason`."] #[doc = " - encoding and hashing of 'reason'"] - #[doc = "- DbReads: `Reasons`, `Tips`"] - #[doc = "- DbWrites: `Reasons`, `Tips`"] - #[doc = "# "] report_awesome { reason: ::std::vec::Vec<::core::primitive::u8>, who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, @@ -40085,12 +44051,9 @@ pub mod api { #[doc = ""] #[doc = "Emits `TipRetracted` if successful."] #[doc = ""] - #[doc = "# "] - #[doc = "- Complexity: `O(1)`"] + #[doc = "## Complexity"] + #[doc = "- `O(1)`"] #[doc = " - Depends on the length of `T::Hash` which is fixed."] - #[doc = "- DbReads: `Tips`, `origin account`"] - #[doc = "- DbWrites: `Reasons`, `Tips`, `origin account`"] - #[doc = "# "] retract_tip { hash: ::subxt::utils::H256 }, #[codec(index = 2)] #[doc = "Give a tip for something new; no finder's fee will be taken."] @@ -40106,15 +44069,12 @@ pub mod api { #[doc = ""] #[doc = "Emits `NewTip` if successful."] #[doc = ""] - #[doc = "# "] - #[doc = "- Complexity: `O(R + T)` where `R` length of `reason`, `T` is the number of tippers."] + #[doc = "## Complexity"] + #[doc = "- `O(R + T)` where `R` length of `reason`, `T` is the number of tippers."] #[doc = " - `O(T)`: decoding `Tipper` vec of length `T`. `T` is charged as upper bound given by"] #[doc = " `ContainsLengthBound`. The actual cost depends on the implementation of"] #[doc = " `T::Tippers`."] #[doc = " - `O(R)`: hashing and encoding of reason of length `R`"] - #[doc = "- DbReads: `Tippers`, `Reasons`"] - #[doc = "- DbWrites: `Reasons`, `Tips`"] - #[doc = "# "] tip_new { reason: ::std::vec::Vec<::core::primitive::u8>, who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, @@ -40136,16 +44096,13 @@ pub mod api { #[doc = "Emits `TipClosing` if the threshold of tippers has been reached and the countdown period"] #[doc = "has started."] #[doc = ""] - #[doc = "# "] - #[doc = "- Complexity: `O(T)` where `T` is the number of tippers. decoding `Tipper` vec of length"] - #[doc = " `T`, insert tip and check closing, `T` is charged as upper bound given by"] - #[doc = " `ContainsLengthBound`. The actual cost depends on the implementation of `T::Tippers`."] + #[doc = "## Complexity"] + #[doc = "- `O(T)` where `T` is the number of tippers. decoding `Tipper` vec of length `T`, insert"] + #[doc = " tip and check closing, `T` is charged as upper bound given by `ContainsLengthBound`."] + #[doc = " The actual cost depends on the implementation of `T::Tippers`."] #[doc = ""] #[doc = " Actually weight could be lower as it depends on how many tips are in `OpenTip` but it"] #[doc = " is weighted as if almost full i.e of length `T-1`."] - #[doc = "- DbReads: `Tippers`, `Tips`"] - #[doc = "- DbWrites: `Tips`"] - #[doc = "# "] tip { hash: ::subxt::utils::H256, #[codec(compact)] @@ -40161,13 +44118,10 @@ pub mod api { #[doc = "- `hash`: The identity of the open tip for which a tip value is declared. This is formed"] #[doc = " as the hash of the tuple of the original tip `reason` and the beneficiary account ID."] #[doc = ""] - #[doc = "# "] - #[doc = "- Complexity: `O(T)` where `T` is the number of tippers. decoding `Tipper` vec of length"] - #[doc = " `T`. `T` is charged as upper bound given by `ContainsLengthBound`. The actual cost"] - #[doc = " depends on the implementation of `T::Tippers`."] - #[doc = "- DbReads: `Tips`, `Tippers`, `tip finder`"] - #[doc = "- DbWrites: `Reasons`, `Tips`, `Tippers`, `tip finder`"] - #[doc = "# "] + #[doc = "## Complexity"] + #[doc = "- : `O(T)` where `T` is the number of tippers. decoding `Tipper` vec of length `T`. `T`"] + #[doc = " is charged as upper bound given by `ContainsLengthBound`. The actual cost depends on"] + #[doc = " the implementation of `T::Tippers`."] close_tip { hash: ::subxt::utils::H256 }, #[codec(index = 5)] #[doc = "Remove and slash an already-open tip."] @@ -40178,10 +44132,8 @@ pub mod api { #[doc = ""] #[doc = "Emits `TipSlashed` if successful."] #[doc = ""] - #[doc = "# "] - #[doc = " `T` is charged as upper bound given by `ContainsLengthBound`."] - #[doc = " The actual cost depends on the implementation of `T::Tippers`."] - #[doc = "# "] + #[doc = "## Complexity"] + #[doc = "- O(1)."] slash_tip { hash: ::subxt::utils::H256 }, } #[derive( @@ -40347,11 +44299,8 @@ pub mod api { #[doc = "is reserved and slashed if the proposal is rejected. It is returned once the"] #[doc = "proposal is awarded."] #[doc = ""] - #[doc = "# "] - #[doc = "- Complexity: O(1)"] - #[doc = "- DbReads: `ProposalCount`, `origin account`"] - #[doc = "- DbWrites: `ProposalCount`, `Proposals`, `origin account`"] - #[doc = "# "] + #[doc = "## Complexity"] + #[doc = "- O(1)"] propose_spend { #[codec(compact)] value: ::core::primitive::u128, @@ -40362,11 +44311,8 @@ pub mod api { #[doc = ""] #[doc = "May only be called from `T::RejectOrigin`."] #[doc = ""] - #[doc = "# "] - #[doc = "- Complexity: O(1)"] - #[doc = "- DbReads: `Proposals`, `rejected proposer account`"] - #[doc = "- DbWrites: `Proposals`, `rejected proposer account`"] - #[doc = "# "] + #[doc = "## Complexity"] + #[doc = "- O(1)"] reject_proposal { #[codec(compact)] proposal_id: ::core::primitive::u32, @@ -40377,11 +44323,8 @@ pub mod api { #[doc = ""] #[doc = "May only be called from `T::ApproveOrigin`."] #[doc = ""] - #[doc = "# "] - #[doc = "- Complexity: O(1)."] - #[doc = "- DbReads: `Proposals`, `Approvals`"] - #[doc = "- DbWrite: `Approvals`"] - #[doc = "# "] + #[doc = "## Complexity"] + #[doc = " - O(1)."] approve_proposal { #[codec(compact)] proposal_id: ::core::primitive::u32, @@ -40407,10 +44350,8 @@ pub mod api { #[doc = "May only be called from `T::RejectOrigin`."] #[doc = "- `proposal_id`: The index of a proposal"] #[doc = ""] - #[doc = "# "] - #[doc = "- Complexity: O(A) where `A` is the number of approvals"] - #[doc = "- Db reads and writes: `Approvals`"] - #[doc = "# "] + #[doc = "## Complexity"] + #[doc = "- O(A) where `A` is the number of approvals"] #[doc = ""] #[doc = "Errors:"] #[doc = "- `ProposalNotApproved`: The `proposal_id` supplied was not found in the approval queue,"] @@ -40505,6 +44446,12 @@ pub mod api { amount: ::core::primitive::u128, beneficiary: ::subxt::utils::AccountId32, }, + #[codec(index = 8)] + #[doc = "The inactive funds of the pallet have been updated."] + UpdatedInactive { + reactivated: ::core::primitive::u128, + deactivated: ::core::primitive::u128, + }, } } #[derive( @@ -40551,9 +44498,8 @@ pub mod api { #[doc = "If origin is root then the calls are dispatched without checking origin filter. (This"] #[doc = "includes bypassing `frame_system::Config::BaseCallFilter`)."] #[doc = ""] - #[doc = "# "] - #[doc = "- Complexity: O(C) where C is the number of calls to be batched."] - #[doc = "# "] + #[doc = "## Complexity"] + #[doc = "- O(C) where C is the number of calls to be batched."] #[doc = ""] #[doc = "This will return `Ok` in all circumstances. To determine the success of the batch, an"] #[doc = "event is deposited. If a call failed and the batch was interrupted, then the"] @@ -40593,9 +44539,8 @@ pub mod api { #[doc = "If origin is root then the calls are dispatched without checking origin filter. (This"] #[doc = "includes bypassing `frame_system::Config::BaseCallFilter`)."] #[doc = ""] - #[doc = "# "] - #[doc = "- Complexity: O(C) where C is the number of calls to be batched."] - #[doc = "# "] + #[doc = "## Complexity"] + #[doc = "- O(C) where C is the number of calls to be batched."] batch_all { calls: ::std::vec::Vec, }, @@ -40604,12 +44549,8 @@ pub mod api { #[doc = ""] #[doc = "The dispatch origin for this call must be _Root_."] #[doc = ""] - #[doc = "# "] + #[doc = "## Complexity"] #[doc = "- O(1)."] - #[doc = "- Limited storage reads."] - #[doc = "- One DB write (event)."] - #[doc = "- Weight of derivative `call` execution + T::WeightInfo::dispatch_as()."] - #[doc = "# "] dispatch_as { as_origin: ::std::boxed::Box, call: ::std::boxed::Box, @@ -40626,12 +44567,22 @@ pub mod api { #[doc = "If origin is root then the calls are dispatch without checking origin filter. (This"] #[doc = "includes bypassing `frame_system::Config::BaseCallFilter`)."] #[doc = ""] - #[doc = "# "] - #[doc = "- Complexity: O(C) where C is the number of calls to be batched."] - #[doc = "# "] + #[doc = "## Complexity"] + #[doc = "- O(C) where C is the number of calls to be batched."] force_batch { calls: ::std::vec::Vec, }, + #[codec(index = 5)] + #[doc = "Dispatch a function call with a specified weight."] + #[doc = ""] + #[doc = "This function does not check the weight of the call, and instead allows the"] + #[doc = "Root origin to specify the weight of the call."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Root_."] + with_weight { + call: ::std::boxed::Box, + weight: runtime_types::sp_weights::weight_v2::Weight, + }, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -40715,12 +44666,8 @@ pub mod api { #[doc = ""] #[doc = "Emits either `VestingCompleted` or `VestingUpdated`."] #[doc = ""] - #[doc = "# "] + #[doc = "## Complexity"] #[doc = "- `O(1)`."] - #[doc = "- DbWeight: 2 Reads, 2 Writes"] - #[doc = " - Reads: Vesting Storage, Balances Locks, [Sender Account]"] - #[doc = " - Writes: Vesting Storage, Balances Locks, [Sender Account]"] - #[doc = "# "] vest, #[codec(index = 1)] #[doc = "Unlock any vested funds of a `target` account."] @@ -40732,12 +44679,8 @@ pub mod api { #[doc = ""] #[doc = "Emits either `VestingCompleted` or `VestingUpdated`."] #[doc = ""] - #[doc = "# "] + #[doc = "## Complexity"] #[doc = "- `O(1)`."] - #[doc = "- DbWeight: 3 Reads, 3 Writes"] - #[doc = " - Reads: Vesting Storage, Balances Locks, Target Account"] - #[doc = " - Writes: Vesting Storage, Balances Locks, Target Account"] - #[doc = "# "] vest_other { target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, }, @@ -40753,12 +44696,8 @@ pub mod api { #[doc = ""] #[doc = "NOTE: This will unlock all schedules through the current block."] #[doc = ""] - #[doc = "# "] + #[doc = "## Complexity"] #[doc = "- `O(1)`."] - #[doc = "- DbWeight: 3 Reads, 3 Writes"] - #[doc = " - Reads: Vesting Storage, Balances Locks, Target Account, [Sender Account]"] - #[doc = " - Writes: Vesting Storage, Balances Locks, Target Account, [Sender Account]"] - #[doc = "# "] vested_transfer { target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, schedule: runtime_types::pallet_vesting::vesting_info::VestingInfo< @@ -40779,12 +44718,8 @@ pub mod api { #[doc = ""] #[doc = "NOTE: This will unlock all schedules through the current block."] #[doc = ""] - #[doc = "# "] + #[doc = "## Complexity"] #[doc = "- `O(1)`."] - #[doc = "- DbWeight: 4 Reads, 4 Writes"] - #[doc = " - Reads: Vesting Storage, Balances Locks, Target Account, Source Account"] - #[doc = " - Writes: Vesting Storage, Balances Locks, Target Account, Source Account"] - #[doc = "# "] force_vested_transfer { source: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, @@ -40910,6 +44845,94 @@ pub mod api { V1, } } + pub mod pallet_whitelist { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + whitelist_call { call_hash: ::subxt::utils::H256 }, + #[codec(index = 1)] + remove_whitelisted_call { call_hash: ::subxt::utils::H256 }, + #[codec(index = 2)] + dispatch_whitelisted_call { + call_hash: ::subxt::utils::H256, + call_encoded_len: ::core::primitive::u32, + call_weight_witness: runtime_types::sp_weights::weight_v2::Weight, + }, + #[codec(index = 3)] + dispatch_whitelisted_call_with_preimage { + call: ::std::boxed::Box, + }, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "The preimage of the call hash could not be loaded."] + UnavailablePreImage, + #[codec(index = 1)] + #[doc = "The call could not be decoded."] + UndecodableCall, + #[codec(index = 2)] + #[doc = "The weight of the decoded call was higher than the witness."] + InvalidCallWeightWitness, + #[codec(index = 3)] + #[doc = "The call was not whitelisted."] + CallIsNotWhitelisted, + #[codec(index = 4)] + #[doc = "The call was already whitelisted; No-Op."] + CallAlreadyWhitelisted, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub enum Event { + #[codec(index = 0)] + CallWhitelisted { call_hash: ::subxt::utils::H256 }, + #[codec(index = 1)] + WhitelistedCallRemoved { call_hash: ::subxt::utils::H256 }, + #[codec(index = 2)] + WhitelistedCallDispatched { + call_hash: ::subxt::utils::H256, + result: ::core::result::Result< + runtime_types::frame_support::dispatch::PostDispatchInfo, + runtime_types::sp_runtime::DispatchErrorWithPostInfo< + runtime_types::frame_support::dispatch::PostDispatchInfo, + >, + >, + }, + } + } + } pub mod pallet_xcm { use super::runtime_types; pub mod pallet { @@ -40990,7 +45013,7 @@ pub mod api { #[doc = "to completion; only that *some* of it was executed."] execute { message: ::std::boxed::Box, - max_weight: ::core::primitive::u64, + max_weight: runtime_types::sp_weights::weight_v2::Weight, }, #[codec(index = 4)] #[doc = "Extoll that a particular destination can be communicated with through a particular"] @@ -41001,7 +45024,7 @@ pub mod api { #[doc = "- `xcm_version`: The latest version of XCM that `location` supports."] force_xcm_version { location: - ::std::boxed::Box, + ::std::boxed::Box, xcm_version: ::core::primitive::u32, }, #[codec(index = 5)] @@ -41055,7 +45078,7 @@ pub mod api { beneficiary: ::std::boxed::Box, assets: ::std::boxed::Box, fee_asset_item: ::core::primitive::u32, - weight_limit: runtime_types::xcm::v2::WeightLimit, + weight_limit: runtime_types::xcm::v3::WeightLimit, }, #[codec(index = 9)] #[doc = "Teleport some assets from the local chain to some destination chain."] @@ -41080,7 +45103,7 @@ pub mod api { beneficiary: ::std::boxed::Box, assets: ::std::boxed::Box, fee_asset_item: ::core::primitive::u32, - weight_limit: runtime_types::xcm::v2::WeightLimit, + weight_limit: runtime_types::xcm::v3::WeightLimit, }, } #[derive( @@ -41137,6 +45160,27 @@ pub mod api { #[codec(index = 12)] #[doc = "The location is invalid since it already has a subscription from us."] AlreadySubscribed, + #[codec(index = 13)] + #[doc = "Invalid asset for the operation."] + InvalidAsset, + #[codec(index = 14)] + #[doc = "The owner does not own (all) of the asset that they wish to do the operation on."] + LowBalance, + #[codec(index = 15)] + #[doc = "The asset owner has too many locks on the asset."] + TooManyLocks, + #[codec(index = 16)] + #[doc = "The given account is not an identifiable sovereign account for any location."] + AccountNotSovereign, + #[codec(index = 17)] + #[doc = "The operation required fees to be paid which the initiator could not meet."] + FeesNotMet, + #[codec(index = 18)] + #[doc = "A remote lock with the corresponding data could not be found."] + LockNotFound, + #[codec(index = 19)] + #[doc = "The unlock operation cannot succeed because there are still users of the lock."] + InUse, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -41154,15 +45198,15 @@ pub mod api { #[doc = "Execution of an XCM message was attempted."] #[doc = ""] #[doc = "\\[ outcome \\]"] - Attempted(runtime_types::xcm::v2::traits::Outcome), + Attempted(runtime_types::xcm::v3::traits::Outcome), #[codec(index = 1)] #[doc = "A XCM message was sent."] #[doc = ""] #[doc = "\\[ origin, destination, message \\]"] Sent( - runtime_types::xcm::v1::multilocation::MultiLocation, - runtime_types::xcm::v1::multilocation::MultiLocation, - runtime_types::xcm::v2::Xcm, + runtime_types::xcm::v3::multilocation::MultiLocation, + runtime_types::xcm::v3::multilocation::MultiLocation, + runtime_types::xcm::v3::Xcm, ), #[codec(index = 2)] #[doc = "Query response received which does not match a registered query. This may be because a"] @@ -41171,7 +45215,7 @@ pub mod api { #[doc = ""] #[doc = "\\[ origin location, id \\]"] UnexpectedResponse( - runtime_types::xcm::v1::multilocation::MultiLocation, + runtime_types::xcm::v3::multilocation::MultiLocation, ::core::primitive::u64, ), #[codec(index = 3)] @@ -41179,7 +45223,7 @@ pub mod api { #[doc = "no registered notification call."] #[doc = ""] #[doc = "\\[ id, response \\]"] - ResponseReady(::core::primitive::u64, runtime_types::xcm::v2::Response), + ResponseReady(::core::primitive::u64, runtime_types::xcm::v3::Response), #[codec(index = 4)] #[doc = "Query response has been received and query is removed. The registered notification has"] #[doc = "been dispatched and executed successfully."] @@ -41231,10 +45275,10 @@ pub mod api { #[doc = ""] #[doc = "\\[ origin location, id, expected location \\]"] InvalidResponder( - runtime_types::xcm::v1::multilocation::MultiLocation, + runtime_types::xcm::v3::multilocation::MultiLocation, ::core::primitive::u64, ::core::option::Option< - runtime_types::xcm::v1::multilocation::MultiLocation, + runtime_types::xcm::v3::multilocation::MultiLocation, >, ), #[codec(index = 9)] @@ -41248,7 +45292,7 @@ pub mod api { #[doc = ""] #[doc = "\\[ origin location, id \\]"] InvalidResponderVersion( - runtime_types::xcm::v1::multilocation::MultiLocation, + runtime_types::xcm::v3::multilocation::MultiLocation, ::core::primitive::u64, ), #[codec(index = 10)] @@ -41262,16 +45306,19 @@ pub mod api { #[doc = "\\[ hash, origin, assets \\]"] AssetsTrapped( ::subxt::utils::H256, - runtime_types::xcm::v1::multilocation::MultiLocation, + runtime_types::xcm::v3::multilocation::MultiLocation, runtime_types::xcm::VersionedMultiAssets, ), #[codec(index = 12)] #[doc = "An XCM version change notification message has been attempted to be sent."] #[doc = ""] - #[doc = "\\[ destination, result \\]"] + #[doc = "The cost of sending it (borne by the chain) is included."] + #[doc = ""] + #[doc = "\\[ destination, result, cost \\]"] VersionChangeNotified( - runtime_types::xcm::v1::multilocation::MultiLocation, + runtime_types::xcm::v3::multilocation::MultiLocation, ::core::primitive::u32, + runtime_types::xcm::v3::multiasset::MultiAssets, ), #[codec(index = 13)] #[doc = "The supported version of a location has been changed. This might be through an"] @@ -41279,7 +45326,7 @@ pub mod api { #[doc = ""] #[doc = "\\[ location, XCM version \\]"] SupportedVersionChanged( - runtime_types::xcm::v1::multilocation::MultiLocation, + runtime_types::xcm::v3::multilocation::MultiLocation, ::core::primitive::u32, ), #[codec(index = 14)] @@ -41288,9 +45335,9 @@ pub mod api { #[doc = ""] #[doc = "\\[ location, query ID, error \\]"] NotifyTargetSendFail( - runtime_types::xcm::v1::multilocation::MultiLocation, + runtime_types::xcm::v3::multilocation::MultiLocation, ::core::primitive::u64, - runtime_types::xcm::v2::traits::Error, + runtime_types::xcm::v3::traits::Error, ), #[codec(index = 15)] #[doc = "A given location which had a version change subscription was dropped owing to an error"] @@ -41302,12 +45349,73 @@ pub mod api { ::core::primitive::u64, ), #[codec(index = 16)] + #[doc = "Expected query response has been received but the expected querier location placed in"] + #[doc = "storage by this runtime previously cannot be decoded. The query remains registered."] + #[doc = ""] + #[doc = "This is unexpected (since a location placed in storage in a previously executing"] + #[doc = "runtime should be readable prior to query timeout) and dangerous since the possibly"] + #[doc = "valid response will be dropped. Manual governance intervention is probably going to be"] + #[doc = "needed."] + #[doc = ""] + #[doc = "\\[ origin location, id \\]"] + InvalidQuerierVersion( + runtime_types::xcm::v3::multilocation::MultiLocation, + ::core::primitive::u64, + ), + #[codec(index = 17)] + #[doc = "Expected query response has been received but the querier location of the response does"] + #[doc = "not match the expected. The query remains registered for a later, valid, response to"] + #[doc = "be received and acted upon."] + #[doc = ""] + #[doc = "\\[ origin location, id, expected querier, maybe actual querier \\]"] + InvalidQuerier( + runtime_types::xcm::v3::multilocation::MultiLocation, + ::core::primitive::u64, + runtime_types::xcm::v3::multilocation::MultiLocation, + ::core::option::Option< + runtime_types::xcm::v3::multilocation::MultiLocation, + >, + ), + #[codec(index = 18)] + #[doc = "A remote has requested XCM version change notification from us and we have honored it."] + #[doc = "A version information message is sent to them and its cost is included."] + #[doc = ""] + #[doc = "\\[ destination location, cost \\]"] + VersionNotifyStarted( + runtime_types::xcm::v3::multilocation::MultiLocation, + runtime_types::xcm::v3::multiasset::MultiAssets, + ), + #[codec(index = 19)] + #[doc = "We have requested that a remote chain sends us XCM version change notifications."] + #[doc = ""] + #[doc = "\\[ destination location, cost \\]"] + VersionNotifyRequested( + runtime_types::xcm::v3::multilocation::MultiLocation, + runtime_types::xcm::v3::multiasset::MultiAssets, + ), + #[codec(index = 20)] + #[doc = "We have requested that a remote chain stops sending us XCM version change notifications."] + #[doc = ""] + #[doc = "\\[ destination location, cost \\]"] + VersionNotifyUnrequested( + runtime_types::xcm::v3::multilocation::MultiLocation, + runtime_types::xcm::v3::multiasset::MultiAssets, + ), + #[codec(index = 21)] + #[doc = "Fees were paid from a location for an operation (often for using `SendXcm`)."] + #[doc = ""] + #[doc = "\\[ paying location, fees \\]"] + FeesPaid( + runtime_types::xcm::v3::multilocation::MultiLocation, + runtime_types::xcm::v3::multiasset::MultiAssets, + ), + #[codec(index = 22)] #[doc = "Some assets have been claimed from an asset trap"] #[doc = ""] #[doc = "\\[ hash, origin, assets \\]"] AssetsClaimed( ::subxt::utils::H256, - runtime_types::xcm::v1::multilocation::MultiLocation, + runtime_types::xcm::v3::multilocation::MultiLocation, runtime_types::xcm::VersionedMultiAssets, ), } @@ -41323,9 +45431,9 @@ pub mod api { #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum Origin { #[codec(index = 0)] - Xcm(runtime_types::xcm::v1::multilocation::MultiLocation), + Xcm(runtime_types::xcm::v3::multilocation::MultiLocation), #[codec(index = 1)] - Response(runtime_types::xcm::v1::multilocation::MultiLocation), + Response(runtime_types::xcm::v3::multilocation::MultiLocation), } #[derive( :: subxt :: ext :: codec :: Decode, @@ -41341,6 +45449,8 @@ pub mod api { #[codec(index = 0)] Pending { responder: runtime_types::xcm::VersionedMultiLocation, + maybe_match_querier: + ::core::option::Option, maybe_notify: ::core::option::Option<(::core::primitive::u8, ::core::primitive::u8)>, timeout: _0, @@ -41366,6 +45476,22 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct RemoteLockedFungibleRecord { + pub amount: ::core::primitive::u128, + pub owner: runtime_types::xcm::VersionedMultiLocation, + pub locker: runtime_types::xcm::VersionedMultiLocation, + pub users: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum VersionMigrationStage { #[codec(index = 0)] MigrateSupportedVersion, @@ -41503,7 +45629,7 @@ pub mod api { } pub mod polkadot_primitives { use super::runtime_types; - pub mod v2 { + pub mod v4 { use super::runtime_types; pub mod assignment_app { use super::runtime_types; @@ -41544,6 +45670,56 @@ pub mod api { #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Signature(pub runtime_types::sp_core::sr25519::Signature); } + pub mod executor_params { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum ExecutorParam { + #[codec(index = 1)] + MaxMemoryPages(::core::primitive::u32), + #[codec(index = 2)] + StackLogicalMax(::core::primitive::u32), + #[codec(index = 3)] + StackNativeMax(::core::primitive::u32), + #[codec(index = 4)] + PrecheckingMaxMemory(::core::primitive::u64), + #[codec(index = 5)] + PvfPrepTimeout( + runtime_types::polkadot_primitives::v4::PvfPrepTimeoutKind, + ::core::primitive::u64, + ), + #[codec(index = 6)] + PvfExecTimeout( + runtime_types::polkadot_primitives::v4::PvfExecTimeoutKind, + ::core::primitive::u64, + ), + #[codec(index = 7)] + WasmExtBulkMemory, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ExecutorParams( + pub ::std::vec::Vec< + runtime_types::polkadot_primitives::v4::executor_params::ExecutorParam, + >, + ); + } pub mod signed { use super::runtime_types; #[derive( @@ -41558,9 +45734,9 @@ pub mod api { #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct UncheckedSigned<_0, _1> { pub payload: _0, - pub validator_index: runtime_types::polkadot_primitives::v2::ValidatorIndex, + pub validator_index: runtime_types::polkadot_primitives::v4::ValidatorIndex, pub signature: - runtime_types::polkadot_primitives::v2::validator_app::Signature, + runtime_types::polkadot_primitives::v4::validator_app::Signature, #[codec(skip)] pub __subxt_unused_type_params: ::core::marker::PhantomData<_1>, } @@ -41618,9 +45794,9 @@ pub mod api { #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct BackedCandidate<_0> { pub candidate: - runtime_types::polkadot_primitives::v2::CommittedCandidateReceipt<_0>, + runtime_types::polkadot_primitives::v4::CommittedCandidateReceipt<_0>, pub validity_votes: ::std::vec::Vec< - runtime_types::polkadot_primitives::v2::ValidityAttestation, + runtime_types::polkadot_primitives::v4::ValidityAttestation, >, pub validator_indices: ::subxt::utils::bits::DecodedBits< ::core::primitive::u8, @@ -41638,12 +45814,16 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct CandidateCommitments<_0> { - pub upward_messages: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, - pub horizontal_messages: ::std::vec::Vec< - runtime_types::polkadot_core_primitives::OutboundHrmpMessage< - runtime_types::polkadot_parachain::primitives::Id, + pub upward_messages: + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::std::vec::Vec<::core::primitive::u8>, + >, + pub horizontal_messages: + runtime_types::bounded_collections::bounded_vec::BoundedVec< + runtime_types::polkadot_core_primitives::OutboundHrmpMessage< + runtime_types::polkadot_parachain::primitives::Id, + >, >, - >, pub new_validation_code: ::core::option::Option< runtime_types::polkadot_parachain::primitives::ValidationCode, >, @@ -41664,11 +45844,11 @@ pub mod api { pub struct CandidateDescriptor<_0> { pub para_id: runtime_types::polkadot_parachain::primitives::Id, pub relay_parent: _0, - pub collator: runtime_types::polkadot_primitives::v2::collator_app::Public, + pub collator: runtime_types::polkadot_primitives::v4::collator_app::Public, pub persisted_validation_data_hash: _0, pub pov_hash: _0, pub erasure_root: _0, - pub signature: runtime_types::polkadot_primitives::v2::collator_app::Signature, + pub signature: runtime_types::polkadot_primitives::v4::collator_app::Signature, pub para_head: _0, pub validation_code_hash: runtime_types::polkadot_parachain::primitives::ValidationCodeHash, @@ -41684,7 +45864,7 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct CandidateReceipt<_0> { - pub descriptor: runtime_types::polkadot_primitives::v2::CandidateDescriptor<_0>, + pub descriptor: runtime_types::polkadot_primitives::v4::CandidateDescriptor<_0>, pub commitments_hash: _0, } #[derive( @@ -41698,8 +45878,8 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct CommittedCandidateReceipt<_0> { - pub descriptor: runtime_types::polkadot_primitives::v2::CandidateDescriptor<_0>, - pub commitments: runtime_types::polkadot_primitives::v2::CandidateCommitments< + pub descriptor: runtime_types::polkadot_primitives::v4::CandidateDescriptor<_0>, + pub commitments: runtime_types::polkadot_primitives::v4::CandidateCommitments< ::core::primitive::u32, >, } @@ -41727,7 +45907,7 @@ pub mod api { #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum CoreOccupied { #[codec(index = 0)] - Parathread(runtime_types::polkadot_primitives::v2::ParathreadEntry), + Parathread(runtime_types::polkadot_primitives::v4::ParathreadEntry), #[codec(index = 1)] Parachain, } @@ -41765,9 +45945,9 @@ pub mod api { #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum DisputeStatement { #[codec(index = 0)] - Valid(runtime_types::polkadot_primitives::v2::ValidDisputeStatementKind), + Valid(runtime_types::polkadot_primitives::v4::ValidDisputeStatementKind), #[codec(index = 1)] - Invalid(runtime_types::polkadot_primitives::v2::InvalidDisputeStatementKind), + Invalid(runtime_types::polkadot_primitives::v4::InvalidDisputeStatementKind), } #[derive( :: subxt :: ext :: codec :: Decode, @@ -41783,9 +45963,9 @@ pub mod api { pub candidate_hash: runtime_types::polkadot_core_primitives::CandidateHash, pub session: ::core::primitive::u32, pub statements: ::std::vec::Vec<( - runtime_types::polkadot_primitives::v2::DisputeStatement, - runtime_types::polkadot_primitives::v2::ValidatorIndex, - runtime_types::polkadot_primitives::v2::validator_app::Signature, + runtime_types::polkadot_primitives::v4::DisputeStatement, + runtime_types::polkadot_primitives::v4::ValidatorIndex, + runtime_types::polkadot_primitives::v4::validator_app::Signature, )>, } #[derive( @@ -41826,18 +46006,18 @@ pub mod api { #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct InherentData<_0> { pub bitfields: ::std::vec::Vec< - runtime_types::polkadot_primitives::v2::signed::UncheckedSigned< - runtime_types::polkadot_primitives::v2::AvailabilityBitfield, - runtime_types::polkadot_primitives::v2::AvailabilityBitfield, + runtime_types::polkadot_primitives::v4::signed::UncheckedSigned< + runtime_types::polkadot_primitives::v4::AvailabilityBitfield, + runtime_types::polkadot_primitives::v4::AvailabilityBitfield, >, >, pub backed_candidates: ::std::vec::Vec< - runtime_types::polkadot_primitives::v2::BackedCandidate< + runtime_types::polkadot_primitives::v4::BackedCandidate< ::subxt::utils::H256, >, >, pub disputes: ::std::vec::Vec< - runtime_types::polkadot_primitives::v2::DisputeStatementSet, + runtime_types::polkadot_primitives::v4::DisputeStatementSet, >, pub parent_header: _0, } @@ -41867,7 +46047,7 @@ pub mod api { #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ParathreadClaim( pub runtime_types::polkadot_parachain::primitives::Id, - pub runtime_types::polkadot_primitives::v2::collator_app::Public, + pub runtime_types::polkadot_primitives::v4::collator_app::Public, ); #[derive( :: subxt :: ext :: codec :: Decode, @@ -41880,7 +46060,7 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ParathreadEntry { - pub claim: runtime_types::polkadot_primitives::v2::ParathreadClaim, + pub claim: runtime_types::polkadot_primitives::v4::ParathreadClaim, pub retries: ::core::primitive::u32, } #[derive( @@ -41897,7 +46077,39 @@ pub mod api { 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::v2::ValidatorIndex, + pub validator_index: runtime_types::polkadot_primitives::v4::ValidatorIndex, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum PvfExecTimeoutKind { + #[codec(index = 0)] + Backing, + #[codec(index = 1)] + Approval, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum PvfPrepTimeoutKind { + #[codec(index = 0)] + Precheck, + #[codec(index = 1)] + Lenient, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -41912,14 +46124,14 @@ pub mod api { pub struct ScrapedOnChainVotes<_0> { pub session: ::core::primitive::u32, pub backing_validators_per_candidate: ::std::vec::Vec<( - runtime_types::polkadot_primitives::v2::CandidateReceipt<_0>, + runtime_types::polkadot_primitives::v4::CandidateReceipt<_0>, ::std::vec::Vec<( - runtime_types::polkadot_primitives::v2::ValidatorIndex, - runtime_types::polkadot_primitives::v2::ValidityAttestation, + runtime_types::polkadot_primitives::v4::ValidatorIndex, + runtime_types::polkadot_primitives::v4::ValidityAttestation, )>, )>, pub disputes: ::std::vec::Vec< - runtime_types::polkadot_primitives::v2::DisputeStatementSet, + runtime_types::polkadot_primitives::v4::DisputeStatementSet, >, } #[derive( @@ -41934,21 +46146,21 @@ pub mod api { #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SessionInfo { pub active_validator_indices: - ::std::vec::Vec, + ::std::vec::Vec, pub random_seed: [::core::primitive::u8; 32usize], pub dispute_period: ::core::primitive::u32, - pub validators: runtime_types::polkadot_primitives::v2::IndexedVec< - runtime_types::polkadot_primitives::v2::ValidatorIndex, - runtime_types::polkadot_primitives::v2::validator_app::Public, + pub validators: runtime_types::polkadot_primitives::v4::IndexedVec< + runtime_types::polkadot_primitives::v4::ValidatorIndex, + runtime_types::polkadot_primitives::v4::validator_app::Public, >, pub discovery_keys: ::std::vec::Vec, pub assignment_keys: ::std::vec::Vec< - runtime_types::polkadot_primitives::v2::assignment_app::Public, + runtime_types::polkadot_primitives::v4::assignment_app::Public, >, - pub validator_groups: runtime_types::polkadot_primitives::v2::IndexedVec< - runtime_types::polkadot_primitives::v2::GroupIndex, - ::std::vec::Vec, + pub validator_groups: runtime_types::polkadot_primitives::v4::IndexedVec< + runtime_types::polkadot_primitives::v4::GroupIndex, + ::std::vec::Vec, >, pub n_cores: ::core::primitive::u32, pub zeroth_delay_tranche_width: ::core::primitive::u32, @@ -42031,14 +46243,80 @@ pub mod api { #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum ValidityAttestation { #[codec(index = 1)] - Implicit(runtime_types::polkadot_primitives::v2::validator_app::Signature), + Implicit(runtime_types::polkadot_primitives::v4::validator_app::Signature), #[codec(index = 2)] - Explicit(runtime_types::polkadot_primitives::v2::validator_app::Signature), + Explicit(runtime_types::polkadot_primitives::v4::validator_app::Signature), + } + } + pub mod vstaging { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct AsyncBackingParams { + pub max_candidate_depth: ::core::primitive::u32, + pub allowed_ancestry_len: ::core::primitive::u32, } } } pub mod polkadot_runtime { use super::runtime_types; + pub mod governance { + use super::runtime_types; + pub mod origins { + use super::runtime_types; + pub mod pallet_custom_origins { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum Origin { + #[codec(index = 0)] + StakingAdmin, + #[codec(index = 1)] + Treasurer, + #[codec(index = 2)] + FellowshipAdmin, + #[codec(index = 3)] + GeneralAdmin, + #[codec(index = 4)] + AuctionAdmin, + #[codec(index = 5)] + LeaseAdmin, + #[codec(index = 6)] + ReferendumCanceller, + #[codec(index = 7)] + ReferendumKiller, + #[codec(index = 8)] + SmallTipper, + #[codec(index = 9)] + BigTipper, + #[codec(index = 10)] + SmallSpender, + #[codec(index = 11)] + MediumSpender, + #[codec(index = 12)] + BigSpender, + #[codec(index = 13)] + WhitelistedCaller, + } + } + } + } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -42216,25 +46494,7 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum OriginCaller { - #[codec(index = 0)] - system( - runtime_types::frame_support::dispatch::RawOrigin<::subxt::utils::AccountId32>, - ), - #[codec(index = 15)] - Council(runtime_types::pallet_collective::RawOrigin<::subxt::utils::AccountId32>), - #[codec(index = 16)] - TechnicalCommittee( - runtime_types::pallet_collective::RawOrigin<::subxt::utils::AccountId32>, - ), - #[codec(index = 50)] - ParachainsOrigin( - runtime_types::polkadot_runtime_parachains::origin::pallet::Origin, - ), - #[codec(index = 99)] - XcmPallet(runtime_types::pallet_xcm::pallet::Origin), - #[codec(index = 5)] - Void(runtime_types::sp_core::Void), - } + # [codec (index = 0)] system (runtime_types :: frame_support :: dispatch :: RawOrigin < :: subxt :: utils :: AccountId32 > ,) , # [codec (index = 15)] Council (runtime_types :: pallet_collective :: RawOrigin < :: subxt :: utils :: AccountId32 > ,) , # [codec (index = 16)] TechnicalCommittee (runtime_types :: pallet_collective :: RawOrigin < :: subxt :: utils :: AccountId32 > ,) , # [codec (index = 22)] Origins (runtime_types :: polkadot_runtime :: governance :: origins :: pallet_custom_origins :: Origin ,) , # [codec (index = 50)] ParachainsOrigin (runtime_types :: polkadot_runtime_parachains :: origin :: pallet :: Origin ,) , # [codec (index = 99)] XcmPallet (runtime_types :: pallet_xcm :: pallet :: Origin ,) , # [codec (index = 6)] Void (runtime_types :: sp_core :: Void ,) , } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -42260,6 +46520,8 @@ pub mod api { CancelProxy, #[codec(index = 7)] Auction, + #[codec(index = 8)] + NominationPools, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -42297,8 +46559,6 @@ pub mod api { 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)] @@ -42319,6 +46579,12 @@ pub mod api { TechnicalMembership(runtime_types::pallet_membership::pallet::Call), #[codec(index = 19)] Treasury(runtime_types::pallet_treasury::pallet::Call), + #[codec(index = 20)] + ConvictionVoting(runtime_types::pallet_conviction_voting::pallet::Call), + #[codec(index = 21)] + Referenda(runtime_types::pallet_referenda::pallet::Call), + #[codec(index = 23)] + Whitelist(runtime_types::pallet_whitelist::pallet::Call), #[codec(index = 24)] Claims(runtime_types::polkadot_runtime_common::claims::pallet::Call), #[codec(index = 25)] @@ -42427,6 +46693,12 @@ pub mod api { TechnicalMembership(runtime_types::pallet_membership::pallet::Event), #[codec(index = 19)] Treasury(runtime_types::pallet_treasury::pallet::Event), + #[codec(index = 20)] + ConvictionVoting(runtime_types::pallet_conviction_voting::pallet::Event), + #[codec(index = 21)] + Referenda(runtime_types::pallet_referenda::pallet::Event), + #[codec(index = 23)] + Whitelist(runtime_types::pallet_whitelist::pallet::Event), #[codec(index = 24)] Claims(runtime_types::polkadot_runtime_common::claims::pallet::Event), #[codec(index = 25)] @@ -42487,11 +46759,11 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SessionKeys { - pub grandpa: runtime_types::sp_finality_grandpa::app::Public, + pub grandpa: runtime_types::sp_consensus_grandpa::app::Public, pub babe: runtime_types::sp_consensus_babe::app::Public, pub im_online: runtime_types::pallet_im_online::sr25519::app_sr25519::Public, - pub para_validator: runtime_types::polkadot_primitives::v2::validator_app::Public, - pub para_assignment: runtime_types::polkadot_primitives::v2::assignment_app::Public, + pub para_validator: runtime_types::polkadot_primitives::v4::validator_app::Public, + pub para_assignment: runtime_types::polkadot_primitives::v4::assignment_app::Public, pub authority_discovery: runtime_types::sp_authority_discovery::app::Public, } } @@ -43568,158 +47840,7 @@ pub mod api { #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { - #[codec(index = 0)] - #[doc = "Set the validation upgrade cooldown."] - set_validation_upgrade_cooldown { new: ::core::primitive::u32 }, - #[codec(index = 1)] - #[doc = "Set the validation upgrade delay."] - set_validation_upgrade_delay { new: ::core::primitive::u32 }, - #[codec(index = 2)] - #[doc = "Set the acceptance period for an included candidate."] - set_code_retention_period { new: ::core::primitive::u32 }, - #[codec(index = 3)] - #[doc = "Set the max validation code size for incoming upgrades."] - set_max_code_size { new: ::core::primitive::u32 }, - #[codec(index = 4)] - #[doc = "Set the max POV block size for incoming upgrades."] - set_max_pov_size { new: ::core::primitive::u32 }, - #[codec(index = 5)] - #[doc = "Set the max head data size for paras."] - set_max_head_data_size { new: ::core::primitive::u32 }, - #[codec(index = 6)] - #[doc = "Set the number of parathread execution cores."] - set_parathread_cores { new: ::core::primitive::u32 }, - #[codec(index = 7)] - #[doc = "Set the number of retries for a particular parathread."] - set_parathread_retries { new: ::core::primitive::u32 }, - #[codec(index = 8)] - #[doc = "Set the parachain validator-group rotation frequency"] - set_group_rotation_frequency { new: ::core::primitive::u32 }, - #[codec(index = 9)] - #[doc = "Set the availability period for parachains."] - set_chain_availability_period { new: ::core::primitive::u32 }, - #[codec(index = 10)] - #[doc = "Set the availability period for parathreads."] - set_thread_availability_period { new: ::core::primitive::u32 }, - #[codec(index = 11)] - #[doc = "Set the scheduling lookahead, in expected number of blocks at peak throughput."] - set_scheduling_lookahead { new: ::core::primitive::u32 }, - #[codec(index = 12)] - #[doc = "Set the maximum number of validators to assign to any core."] - set_max_validators_per_core { - new: ::core::option::Option<::core::primitive::u32>, - }, - #[codec(index = 13)] - #[doc = "Set the maximum number of validators to use in parachain consensus."] - set_max_validators { - new: ::core::option::Option<::core::primitive::u32>, - }, - #[codec(index = 14)] - #[doc = "Set the dispute period, in number of sessions to keep for disputes."] - set_dispute_period { new: ::core::primitive::u32 }, - #[codec(index = 15)] - #[doc = "Set the dispute post conclusion acceptance period."] - set_dispute_post_conclusion_acceptance_period { - new: ::core::primitive::u32, - }, - #[codec(index = 16)] - #[doc = "Set the maximum number of dispute spam slots."] - set_dispute_max_spam_slots { new: ::core::primitive::u32 }, - #[codec(index = 17)] - #[doc = "Set the dispute conclusion by time out period."] - set_dispute_conclusion_by_time_out_period { new: ::core::primitive::u32 }, - #[codec(index = 18)] - #[doc = "Set the no show slots, in number of number of consensus slots."] - #[doc = "Must be at least 1."] - set_no_show_slots { new: ::core::primitive::u32 }, - #[codec(index = 19)] - #[doc = "Set the total number of delay tranches."] - set_n_delay_tranches { new: ::core::primitive::u32 }, - #[codec(index = 20)] - #[doc = "Set the zeroth delay tranche width."] - set_zeroth_delay_tranche_width { new: ::core::primitive::u32 }, - #[codec(index = 21)] - #[doc = "Set the number of validators needed to approve a block."] - set_needed_approvals { new: ::core::primitive::u32 }, - #[codec(index = 22)] - #[doc = "Set the number of samples to do of the `RelayVRFModulo` approval assignment criterion."] - set_relay_vrf_modulo_samples { new: ::core::primitive::u32 }, - #[codec(index = 23)] - #[doc = "Sets the maximum items that can present in a upward dispatch queue at once."] - set_max_upward_queue_count { new: ::core::primitive::u32 }, - #[codec(index = 24)] - #[doc = "Sets the maximum total size of items that can present in a upward dispatch queue at once."] - set_max_upward_queue_size { new: ::core::primitive::u32 }, - #[codec(index = 25)] - #[doc = "Set the critical downward message size."] - set_max_downward_message_size { new: ::core::primitive::u32 }, - #[codec(index = 26)] - #[doc = "Sets the soft limit for the phase of dispatching dispatchable upward messages."] - set_ump_service_total_weight { - new: runtime_types::sp_weights::weight_v2::Weight, - }, - #[codec(index = 27)] - #[doc = "Sets the maximum size of an upward message that can be sent by a candidate."] - set_max_upward_message_size { new: ::core::primitive::u32 }, - #[codec(index = 28)] - #[doc = "Sets the maximum number of messages that a candidate can contain."] - set_max_upward_message_num_per_candidate { new: ::core::primitive::u32 }, - #[codec(index = 29)] - #[doc = "Sets the number of sessions after which an HRMP open channel request expires."] - set_hrmp_open_request_ttl { new: ::core::primitive::u32 }, - #[codec(index = 30)] - #[doc = "Sets the amount of funds that the sender should provide for opening an HRMP channel."] - set_hrmp_sender_deposit { new: ::core::primitive::u128 }, - #[codec(index = 31)] - #[doc = "Sets the amount of funds that the recipient should provide for accepting opening an HRMP"] - #[doc = "channel."] - set_hrmp_recipient_deposit { new: ::core::primitive::u128 }, - #[codec(index = 32)] - #[doc = "Sets the maximum number of messages allowed in an HRMP channel at once."] - set_hrmp_channel_max_capacity { new: ::core::primitive::u32 }, - #[codec(index = 33)] - #[doc = "Sets the maximum total size of messages in bytes allowed in an HRMP channel at once."] - set_hrmp_channel_max_total_size { new: ::core::primitive::u32 }, - #[codec(index = 34)] - #[doc = "Sets the maximum number of inbound HRMP channels a parachain is allowed to accept."] - set_hrmp_max_parachain_inbound_channels { new: ::core::primitive::u32 }, - #[codec(index = 35)] - #[doc = "Sets the maximum number of inbound HRMP channels a parathread is allowed to accept."] - set_hrmp_max_parathread_inbound_channels { new: ::core::primitive::u32 }, - #[codec(index = 36)] - #[doc = "Sets the maximum size of a message that could ever be put into an HRMP channel."] - set_hrmp_channel_max_message_size { new: ::core::primitive::u32 }, - #[codec(index = 37)] - #[doc = "Sets the maximum number of outbound HRMP channels a parachain is allowed to open."] - set_hrmp_max_parachain_outbound_channels { new: ::core::primitive::u32 }, - #[codec(index = 38)] - #[doc = "Sets the maximum number of outbound HRMP channels a parathread is allowed to open."] - set_hrmp_max_parathread_outbound_channels { new: ::core::primitive::u32 }, - #[codec(index = 39)] - #[doc = "Sets the maximum number of outbound HRMP messages can be sent by a candidate."] - set_hrmp_max_message_num_per_candidate { new: ::core::primitive::u32 }, - #[codec(index = 40)] - #[doc = "Sets the maximum amount of weight any individual upward message may consume."] - set_ump_max_individual_weight { - new: runtime_types::sp_weights::weight_v2::Weight, - }, - #[codec(index = 41)] - #[doc = "Enable or disable PVF pre-checking. Consult the field documentation prior executing."] - set_pvf_checking_enabled { new: ::core::primitive::bool }, - #[codec(index = 42)] - #[doc = "Set the number of session changes after which a PVF pre-checking voting is rejected."] - set_pvf_voting_ttl { new: ::core::primitive::u32 }, - #[codec(index = 43)] - #[doc = "Sets the minimum delay between announcing the upgrade block for a parachain until the"] - #[doc = "upgrade taking place."] - #[doc = ""] - #[doc = "See the field documentation for information and constraints for the new value."] - set_minimum_validation_upgrade_delay { new: ::core::primitive::u32 }, - #[codec(index = 44)] - #[doc = "Setting this to true will disable consistency checks for the configuration setters."] - #[doc = "Use with caution."] - set_bypass_consistency_check { new: ::core::primitive::bool }, - } + # [codec (index = 0)] # [doc = "Set the validation upgrade cooldown."] set_validation_upgrade_cooldown { new : :: core :: primitive :: u32 , } , # [codec (index = 1)] # [doc = "Set the validation upgrade delay."] set_validation_upgrade_delay { new : :: core :: primitive :: u32 , } , # [codec (index = 2)] # [doc = "Set the acceptance period for an included candidate."] set_code_retention_period { new : :: core :: primitive :: u32 , } , # [codec (index = 3)] # [doc = "Set the max validation code size for incoming upgrades."] set_max_code_size { new : :: core :: primitive :: u32 , } , # [codec (index = 4)] # [doc = "Set the max POV block size for incoming upgrades."] set_max_pov_size { new : :: core :: primitive :: u32 , } , # [codec (index = 5)] # [doc = "Set the max head data size for paras."] set_max_head_data_size { new : :: core :: primitive :: u32 , } , # [codec (index = 6)] # [doc = "Set the number of parathread execution cores."] set_parathread_cores { new : :: core :: primitive :: u32 , } , # [codec (index = 7)] # [doc = "Set the number of retries for a particular parathread."] set_parathread_retries { new : :: core :: primitive :: u32 , } , # [codec (index = 8)] # [doc = "Set the parachain validator-group rotation frequency"] set_group_rotation_frequency { new : :: core :: primitive :: u32 , } , # [codec (index = 9)] # [doc = "Set the availability period for parachains."] set_chain_availability_period { new : :: core :: primitive :: u32 , } , # [codec (index = 10)] # [doc = "Set the availability period for parathreads."] set_thread_availability_period { new : :: core :: primitive :: u32 , } , # [codec (index = 11)] # [doc = "Set the scheduling lookahead, in expected number of blocks at peak throughput."] set_scheduling_lookahead { new : :: core :: primitive :: u32 , } , # [codec (index = 12)] # [doc = "Set the maximum number of validators to assign to any core."] set_max_validators_per_core { new : :: core :: option :: Option < :: core :: primitive :: u32 > , } , # [codec (index = 13)] # [doc = "Set the maximum number of validators to use in parachain consensus."] set_max_validators { new : :: core :: option :: Option < :: core :: primitive :: u32 > , } , # [codec (index = 14)] # [doc = "Set the dispute period, in number of sessions to keep for disputes."] set_dispute_period { new : :: core :: primitive :: u32 , } , # [codec (index = 15)] # [doc = "Set the dispute post conclusion acceptance period."] set_dispute_post_conclusion_acceptance_period { new : :: core :: primitive :: u32 , } , # [codec (index = 18)] # [doc = "Set the no show slots, in number of number of consensus slots."] # [doc = "Must be at least 1."] set_no_show_slots { new : :: core :: primitive :: u32 , } , # [codec (index = 19)] # [doc = "Set the total number of delay tranches."] set_n_delay_tranches { new : :: core :: primitive :: u32 , } , # [codec (index = 20)] # [doc = "Set the zeroth delay tranche width."] set_zeroth_delay_tranche_width { new : :: core :: primitive :: u32 , } , # [codec (index = 21)] # [doc = "Set the number of validators needed to approve a block."] set_needed_approvals { new : :: core :: primitive :: u32 , } , # [codec (index = 22)] # [doc = "Set the number of samples to do of the `RelayVRFModulo` approval assignment criterion."] set_relay_vrf_modulo_samples { new : :: core :: primitive :: u32 , } , # [codec (index = 23)] # [doc = "Sets the maximum items that can present in a upward dispatch queue at once."] set_max_upward_queue_count { new : :: core :: primitive :: u32 , } , # [codec (index = 24)] # [doc = "Sets the maximum total size of items that can present in a upward dispatch queue at once."] set_max_upward_queue_size { new : :: core :: primitive :: u32 , } , # [codec (index = 25)] # [doc = "Set the critical downward message size."] set_max_downward_message_size { new : :: core :: primitive :: u32 , } , # [codec (index = 26)] # [doc = "Sets the soft limit for the phase of dispatching dispatchable upward messages."] set_ump_service_total_weight { new : runtime_types :: sp_weights :: weight_v2 :: Weight , } , # [codec (index = 27)] # [doc = "Sets the maximum size of an upward message that can be sent by a candidate."] set_max_upward_message_size { new : :: core :: primitive :: u32 , } , # [codec (index = 28)] # [doc = "Sets the maximum number of messages that a candidate can contain."] set_max_upward_message_num_per_candidate { new : :: core :: primitive :: u32 , } , # [codec (index = 29)] # [doc = "Sets the number of sessions after which an HRMP open channel request expires."] set_hrmp_open_request_ttl { new : :: core :: primitive :: u32 , } , # [codec (index = 30)] # [doc = "Sets the amount of funds that the sender should provide for opening an HRMP channel."] set_hrmp_sender_deposit { new : :: core :: primitive :: u128 , } , # [codec (index = 31)] # [doc = "Sets the amount of funds that the recipient should provide for accepting opening an HRMP"] # [doc = "channel."] set_hrmp_recipient_deposit { new : :: core :: primitive :: u128 , } , # [codec (index = 32)] # [doc = "Sets the maximum number of messages allowed in an HRMP channel at once."] set_hrmp_channel_max_capacity { new : :: core :: primitive :: u32 , } , # [codec (index = 33)] # [doc = "Sets the maximum total size of messages in bytes allowed in an HRMP channel at once."] set_hrmp_channel_max_total_size { new : :: core :: primitive :: u32 , } , # [codec (index = 34)] # [doc = "Sets the maximum number of inbound HRMP channels a parachain is allowed to accept."] set_hrmp_max_parachain_inbound_channels { new : :: core :: primitive :: u32 , } , # [codec (index = 35)] # [doc = "Sets the maximum number of inbound HRMP channels a parathread is allowed to accept."] set_hrmp_max_parathread_inbound_channels { new : :: core :: primitive :: u32 , } , # [codec (index = 36)] # [doc = "Sets the maximum size of a message that could ever be put into an HRMP channel."] set_hrmp_channel_max_message_size { new : :: core :: primitive :: u32 , } , # [codec (index = 37)] # [doc = "Sets the maximum number of outbound HRMP channels a parachain is allowed to open."] set_hrmp_max_parachain_outbound_channels { new : :: core :: primitive :: u32 , } , # [codec (index = 38)] # [doc = "Sets the maximum number of outbound HRMP channels a parathread is allowed to open."] set_hrmp_max_parathread_outbound_channels { new : :: core :: primitive :: u32 , } , # [codec (index = 39)] # [doc = "Sets the maximum number of outbound HRMP messages can be sent by a candidate."] set_hrmp_max_message_num_per_candidate { new : :: core :: primitive :: u32 , } , # [codec (index = 40)] # [doc = "Sets the maximum amount of weight any individual upward message may consume."] set_ump_max_individual_weight { new : runtime_types :: sp_weights :: weight_v2 :: Weight , } , # [codec (index = 41)] # [doc = "Enable or disable PVF pre-checking. Consult the field documentation prior executing."] set_pvf_checking_enabled { new : :: core :: primitive :: bool , } , # [codec (index = 42)] # [doc = "Set the number of session changes after which a PVF pre-checking voting is rejected."] set_pvf_voting_ttl { new : :: core :: primitive :: u32 , } , # [codec (index = 43)] # [doc = "Sets the minimum delay between announcing the upgrade block for a parachain until the"] # [doc = "upgrade taking place."] # [doc = ""] # [doc = "See the field documentation for information and constraints for the new value."] set_minimum_validation_upgrade_delay { new : :: core :: primitive :: u32 , } , # [codec (index = 44)] # [doc = "Setting this to true will disable consistency checks for the configuration setters."] # [doc = "Use with caution."] set_bypass_consistency_check { new : :: core :: primitive :: bool , } , # [codec (index = 45)] # [doc = "Set the asynchronous backing parameters."] set_async_backing_params { new : runtime_types :: polkadot_primitives :: vstaging :: AsyncBackingParams , } , # [codec (index = 46)] # [doc = "Set PVF executor parameters."] set_executor_params { new : runtime_types :: polkadot_primitives :: v4 :: executor_params :: ExecutorParams , } , } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -43757,6 +47878,8 @@ pub mod api { pub hrmp_max_message_num_per_candidate: _0, pub validation_upgrade_cooldown: _0, pub validation_upgrade_delay: _0, + pub async_backing_params: + runtime_types::polkadot_primitives::vstaging::AsyncBackingParams, pub max_pov_size: _0, pub max_downward_message_size: _0, pub ump_service_total_weight: runtime_types::sp_weights::weight_v2::Weight, @@ -43769,6 +47892,8 @@ pub mod api { pub hrmp_max_parachain_inbound_channels: _0, pub hrmp_max_parathread_inbound_channels: _0, pub hrmp_channel_max_message_size: _0, + pub executor_params: + runtime_types::polkadot_primitives::v4::executor_params::ExecutorParams, pub code_retention_period: _0, pub parathread_cores: _0, pub parathread_retries: _0, @@ -43780,8 +47905,6 @@ pub mod api { 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, @@ -43840,11 +47963,17 @@ pub mod api { #[doc = "Validator vote submitted more than once to dispute."] DuplicateStatement, #[codec(index = 5)] - #[doc = "Too many spam slots used by some specific validator."] - PotentialSpam, - #[codec(index = 6)] #[doc = "A dispute where there are only votes on one side."] SingleSidedDispute, + #[codec(index = 6)] + #[doc = "A dispute vote from a malicious backer."] + MaliciousBacker, + #[codec(index = 7)] + #[doc = "No backing votes were provides along dispute statements."] + MissingBackingVotes, + #[codec(index = 8)] + #[doc = "Unconfirmed dispute statement sets provided."] + UnconfirmedDispute, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -43872,10 +48001,6 @@ pub mod api { runtime_types::polkadot_runtime_parachains::disputes::DisputeResult, ), #[codec(index = 2)] - #[doc = "A dispute has timed out due to insufficient participation."] - #[doc = "`\\[para id, candidate hash\\]`"] - DisputeTimedOut(runtime_types::polkadot_core_primitives::CandidateHash), - #[codec(index = 3)] #[doc = "A dispute has concluded with supermajority against a candidate."] #[doc = "Block authors should no longer build on top of this head and should"] #[doc = "instead revert the block at the given height. This should be the"] @@ -44333,31 +48458,31 @@ pub mod api { #[codec(index = 0)] #[doc = "A candidate was backed. `[candidate, head_data]`"] CandidateBacked( - runtime_types::polkadot_primitives::v2::CandidateReceipt< + runtime_types::polkadot_primitives::v4::CandidateReceipt< ::subxt::utils::H256, >, runtime_types::polkadot_parachain::primitives::HeadData, - runtime_types::polkadot_primitives::v2::CoreIndex, - runtime_types::polkadot_primitives::v2::GroupIndex, + runtime_types::polkadot_primitives::v4::CoreIndex, + runtime_types::polkadot_primitives::v4::GroupIndex, ), #[codec(index = 1)] #[doc = "A candidate was included. `[candidate, head_data]`"] CandidateIncluded( - runtime_types::polkadot_primitives::v2::CandidateReceipt< + runtime_types::polkadot_primitives::v4::CandidateReceipt< ::subxt::utils::H256, >, runtime_types::polkadot_parachain::primitives::HeadData, - runtime_types::polkadot_primitives::v2::CoreIndex, - runtime_types::polkadot_primitives::v2::GroupIndex, + runtime_types::polkadot_primitives::v4::CoreIndex, + runtime_types::polkadot_primitives::v4::GroupIndex, ), #[codec(index = 2)] #[doc = "A candidate timed out. `[candidate, head_data]`"] CandidateTimedOut( - runtime_types::polkadot_primitives::v2::CandidateReceipt< + runtime_types::polkadot_primitives::v4::CandidateReceipt< ::subxt::utils::H256, >, runtime_types::polkadot_parachain::primitives::HeadData, - runtime_types::polkadot_primitives::v2::CoreIndex, + runtime_types::polkadot_primitives::v4::CoreIndex, ), } } @@ -44372,7 +48497,7 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct AvailabilityBitfieldRecord<_0> { - pub bitfield: runtime_types::polkadot_primitives::v2::AvailabilityBitfield, + pub bitfield: runtime_types::polkadot_primitives::v4::AvailabilityBitfield, pub submitted_at: _0, } #[derive( @@ -44386,9 +48511,9 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct CandidatePendingAvailability<_0, _1> { - pub core: runtime_types::polkadot_primitives::v2::CoreIndex, + pub core: runtime_types::polkadot_primitives::v4::CoreIndex, pub hash: runtime_types::polkadot_core_primitives::CandidateHash, - pub descriptor: runtime_types::polkadot_primitives::v2::CandidateDescriptor<_0>, + pub descriptor: runtime_types::polkadot_primitives::v4::CandidateDescriptor<_0>, pub availability_votes: ::subxt::utils::bits::DecodedBits< ::core::primitive::u8, ::subxt::utils::bits::Lsb0, @@ -44399,7 +48524,7 @@ pub mod api { >, pub relay_parent_number: _1, pub backed_in_number: _1, - pub backing_group: runtime_types::polkadot_primitives::v2::GroupIndex, + pub backing_group: runtime_types::polkadot_primitives::v4::GroupIndex, } } pub mod initializer { @@ -44437,10 +48562,10 @@ pub mod api { #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct BufferedSessionChange { pub validators: ::std::vec::Vec< - runtime_types::polkadot_primitives::v2::validator_app::Public, + runtime_types::polkadot_primitives::v4::validator_app::Public, >, pub queued: ::std::vec::Vec< - runtime_types::polkadot_primitives::v2::validator_app::Public, + runtime_types::polkadot_primitives::v4::validator_app::Public, >, pub session_index: ::core::primitive::u32, } @@ -44545,9 +48670,9 @@ pub mod api { #[doc = "Includes a statement for a PVF pre-checking vote. Potentially, finalizes the vote and"] #[doc = "enacts the results if that was the last vote before achieving the supermajority."] include_pvf_check_statement { - stmt: runtime_types::polkadot_primitives::v2::PvfCheckStatement, + stmt: runtime_types::polkadot_primitives::v4::PvfCheckStatement, signature: - runtime_types::polkadot_primitives::v2::validator_app::Signature, + runtime_types::polkadot_primitives::v4::validator_app::Signature, }, } #[derive( @@ -44792,7 +48917,7 @@ pub mod api { #[codec(index = 0)] #[doc = "Enter the paras inherent. This will process bitfields and backed candidates."] enter { - data: runtime_types::polkadot_primitives::v2::InherentData< + data: runtime_types::polkadot_primitives::v4::InherentData< runtime_types::sp_runtime::generic::header::Header< ::core::primitive::u32, runtime_types::sp_runtime::traits::BlakeTwo256, @@ -44851,7 +48976,7 @@ pub mod api { Parachain, #[codec(index = 1)] Parathread( - runtime_types::polkadot_primitives::v2::collator_app::Public, + runtime_types::polkadot_primitives::v4::collator_app::Public, ::core::primitive::u32, ), } @@ -44866,10 +48991,10 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct CoreAssignment { - pub core: runtime_types::polkadot_primitives::v2::CoreIndex, + pub core: runtime_types::polkadot_primitives::v4::CoreIndex, pub para_id: runtime_types::polkadot_parachain::primitives::Id, pub kind: runtime_types::polkadot_runtime_parachains::scheduler::AssignmentKind, - pub group_idx: runtime_types::polkadot_primitives::v2::GroupIndex, + pub group_idx: runtime_types::polkadot_primitives::v4::GroupIndex, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -44898,7 +49023,7 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct QueuedParathread { - pub claim: runtime_types::polkadot_primitives::v2::ParathreadEntry, + pub claim: runtime_types::polkadot_primitives::v4::ParathreadEntry, pub core_offset: ::core::primitive::u32, } } @@ -44998,7 +49123,7 @@ pub mod api { #[doc = "\\[ id, outcome \\]"] ExecutedUpward( [::core::primitive::u8; 32usize], - runtime_types::xcm::v2::traits::Outcome, + runtime_types::xcm::v3::traits::Outcome, ), #[codec(index = 3)] #[doc = "The weight limit for handling upward messages was reached."] @@ -45046,6 +49171,17 @@ pub mod api { use super::runtime_types; pub mod fixed_point { use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct FixedI64(pub ::core::primitive::i64); #[derive( :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, @@ -45110,6 +49246,24 @@ pub mod api { #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Permill(pub ::core::primitive::u32); } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum ArithmeticError { + #[codec(index = 0)] + Underflow, + #[codec(index = 1)] + Overflow, + #[codec(index = 2)] + DivisionByZero, + } } pub mod sp_authority_discovery { use super::runtime_types; @@ -45196,8 +49350,7 @@ pub mod api { pub struct PrimaryPreDigest { pub authority_index: ::core::primitive::u32, pub slot: runtime_types::sp_consensus_slots::Slot, - pub vrf_output: [::core::primitive::u8; 32usize], - pub vrf_proof: [::core::primitive::u8; 64usize], + pub vrf_signature: runtime_types::sp_core::sr25519::vrf::VrfSignature, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -45226,8 +49379,7 @@ pub mod api { pub struct SecondaryVRFPreDigest { pub authority_index: ::core::primitive::u32, pub slot: runtime_types::sp_consensus_slots::Slot, - pub vrf_output: [::core::primitive::u8; 32usize], - pub vrf_proof: [::core::primitive::u8; 64usize], + pub vrf_signature: runtime_types::sp_core::sr25519::vrf::VrfSignature, } } #[derive( @@ -45263,6 +49415,76 @@ pub mod api { pub allowed_slots: runtime_types::sp_consensus_babe::AllowedSlots, } } + pub mod sp_consensus_grandpa { + use super::runtime_types; + pub mod app { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Public(pub runtime_types::sp_core::ed25519::Public); + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Signature(pub runtime_types::sp_core::ed25519::Signature); + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum Equivocation<_0, _1> { + #[codec(index = 0)] + Prevote( + runtime_types::finality_grandpa::Equivocation< + runtime_types::sp_consensus_grandpa::app::Public, + runtime_types::finality_grandpa::Prevote<_0, _1>, + runtime_types::sp_consensus_grandpa::app::Signature, + >, + ), + #[codec(index = 1)] + Precommit( + runtime_types::finality_grandpa::Equivocation< + runtime_types::sp_consensus_grandpa::app::Public, + runtime_types::finality_grandpa::Precommit<_0, _1>, + runtime_types::sp_consensus_grandpa::app::Signature, + >, + ), + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct EquivocationProof<_0, _1> { + pub set_id: ::core::primitive::u64, + pub equivocation: runtime_types::sp_consensus_grandpa::Equivocation<_0, _1>, + } + } pub mod sp_consensus_slots { use super::runtime_types; #[derive( @@ -45296,51 +49518,6 @@ pub mod api { } pub mod sp_core { use super::runtime_types; - pub mod bounded { - use super::runtime_types; - pub mod bounded_btree_map { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct BoundedBTreeMap<_0, _1>(pub ::subxt::utils::KeyedVec<_0, _1>); - } - pub mod bounded_vec { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct BoundedVec<_0>(pub ::std::vec::Vec<_0>); - } - pub mod weak_bounded_vec { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct WeakBoundedVec<_0>(pub ::std::vec::Vec<_0>); - } - } pub mod crypto { use super::runtime_types; #[derive( @@ -45405,86 +49582,7 @@ pub mod api { #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Signature(pub [::core::primitive::u8; 64usize]); } - pub mod offchain { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct OpaqueMultiaddr(pub ::std::vec::Vec<::core::primitive::u8>); - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct OpaqueNetworkState { - pub peer_id: runtime_types::sp_core::OpaquePeerId, - pub external_addresses: - ::std::vec::Vec, - } - } - pub mod sr25519 { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Public(pub [::core::primitive::u8; 32usize]); - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Signature(pub [::core::primitive::u8; 64usize]); - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct OpaquePeerId(pub ::std::vec::Vec<::core::primitive::u8>); - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Void {} - } - pub mod sp_finality_grandpa { - use super::runtime_types; - pub mod app { + pub mod offchain { use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, @@ -45496,7 +49594,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Public(pub runtime_types::sp_core::ed25519::Public); + pub struct OpaqueMultiaddr(pub ::std::vec::Vec<::core::primitive::u8>); #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -45507,7 +49605,53 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Signature(pub runtime_types::sp_core::ed25519::Signature); + pub struct OpaqueNetworkState { + pub peer_id: runtime_types::sp_core::OpaquePeerId, + pub external_addresses: + ::std::vec::Vec, + } + } + pub mod sr25519 { + use super::runtime_types; + pub mod vrf { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct VrfSignature { + pub output: [::core::primitive::u8; 32usize], + pub proof: [::core::primitive::u8; 64usize], + } + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Public(pub [::core::primitive::u8; 32usize]); + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Signature(pub [::core::primitive::u8; 64usize]); } #[derive( :: subxt :: ext :: codec :: Decode, @@ -45519,24 +49663,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Equivocation<_0, _1> { - #[codec(index = 0)] - Prevote( - runtime_types::finality_grandpa::Equivocation< - runtime_types::sp_finality_grandpa::app::Public, - runtime_types::finality_grandpa::Prevote<_0, _1>, - runtime_types::sp_finality_grandpa::app::Signature, - >, - ), - #[codec(index = 1)] - Precommit( - runtime_types::finality_grandpa::Equivocation< - runtime_types::sp_finality_grandpa::app::Public, - runtime_types::finality_grandpa::Precommit<_0, _1>, - runtime_types::sp_finality_grandpa::app::Signature, - >, - ), - } + pub struct OpaquePeerId(pub ::std::vec::Vec<::core::primitive::u8>); #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -45547,10 +49674,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct EquivocationProof<_0, _1> { - pub set_id: ::core::primitive::u64, - pub equivocation: runtime_types::sp_finality_grandpa::Equivocation<_0, _1>, - } + pub enum Void {} } pub mod sp_npos_elections { use super::runtime_types; @@ -46163,7 +50287,379 @@ pub mod api { Mortal255(::core::primitive::u8), } } - pub mod header { + pub mod header { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Header<_0, _1> { + pub parent_hash: ::subxt::utils::H256, + #[codec(compact)] + pub number: _0, + pub state_root: ::subxt::utils::H256, + pub extrinsics_root: ::subxt::utils::H256, + pub digest: runtime_types::sp_runtime::generic::digest::Digest, + #[codec(skip)] + pub __subxt_unused_type_params: ::core::marker::PhantomData<_1>, + } + } + pub mod unchecked_extrinsic { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + 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 traits { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct BlakeTwo256; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum DispatchError { + #[codec(index = 0)] + Other, + #[codec(index = 1)] + CannotLookup, + #[codec(index = 2)] + BadOrigin, + #[codec(index = 3)] + Module(runtime_types::sp_runtime::ModuleError), + #[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_arithmetic::ArithmeticError), + #[codec(index = 9)] + Transactional(runtime_types::sp_runtime::TransactionalError), + #[codec(index = 10)] + Exhausted, + #[codec(index = 11)] + Corruption, + #[codec(index = 12)] + Unavailable, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct DispatchErrorWithPostInfo<_0> { + pub post_info: _0, + pub error: runtime_types::sp_runtime::DispatchError, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ModuleError { + pub index: ::core::primitive::u8, + pub error: [::core::primitive::u8; 4usize], + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + 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 :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + 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 :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum TokenError { + #[codec(index = 0)] + FundsUnavailable, + #[codec(index = 1)] + OnlyProvider, + #[codec(index = 2)] + BelowMinimum, + #[codec(index = 3)] + CannotCreate, + #[codec(index = 4)] + UnknownAsset, + #[codec(index = 5)] + Frozen, + #[codec(index = 6)] + Unsupported, + #[codec(index = 7)] + CannotCreateHold, + #[codec(index = 8)] + NotExpendable, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum TransactionalError { + #[codec(index = 0)] + LimitReached, + #[codec(index = 1)] + NoLayer, + } + } + pub mod sp_session { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + 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 :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct OffenceDetails<_0, _1> { + pub offender: _1, + pub reporters: ::std::vec::Vec<_0>, + } + } + } + pub mod sp_version { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + 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 sp_weights { + use super::runtime_types; + pub mod weight_v2 { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Weight { + #[codec(compact)] + pub ref_time: ::core::primitive::u64, + #[codec(compact)] + pub proof_size: ::core::primitive::u64, + } + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct RuntimeDbWeight { + pub read: ::core::primitive::u64, + pub write: ::core::primitive::u64, + } + } + pub mod xcm { + use super::runtime_types; + pub mod double_encoded { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct DoubleEncoded { + pub encoded: ::std::vec::Vec<::core::primitive::u8>, + } + } + pub mod v2 { + use super::runtime_types; + pub mod junction { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum Junction { + #[codec(index = 0)] + Parachain(#[codec(compact)] ::core::primitive::u32), + #[codec(index = 1)] + AccountId32 { + network: runtime_types::xcm::v2::NetworkId, + id: [::core::primitive::u8; 32usize], + }, + #[codec(index = 2)] + AccountIndex64 { + network: runtime_types::xcm::v2::NetworkId, + #[codec(compact)] + index: ::core::primitive::u64, + }, + #[codec(index = 3)] + AccountKey20 { + network: runtime_types::xcm::v2::NetworkId, + key: [::core::primitive::u8; 20usize], + }, + #[codec(index = 4)] + PalletInstance(::core::primitive::u8), + #[codec(index = 5)] + GeneralIndex(#[codec(compact)] ::core::primitive::u128), + #[codec(index = 6)] + GeneralKey( + runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec< + ::core::primitive::u8, + >, + ), + #[codec(index = 7)] + OnlyChild, + #[codec(index = 8)] + Plurality { + id: runtime_types::xcm::v2::BodyId, + part: runtime_types::xcm::v2::BodyPart, + }, + } + } + pub mod multiasset { use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, @@ -46175,37 +50671,514 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Header<_0, _1> { - pub parent_hash: ::subxt::utils::H256, + pub enum AssetId { + #[codec(index = 0)] + Concrete(runtime_types::xcm::v2::multilocation::MultiLocation), + #[codec(index = 1)] + Abstract(::std::vec::Vec<::core::primitive::u8>), + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + 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 :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum Fungibility { + #[codec(index = 0)] + Fungible(#[codec(compact)] ::core::primitive::u128), + #[codec(index = 1)] + NonFungible(runtime_types::xcm::v2::multiasset::AssetInstance), + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct MultiAsset { + pub id: runtime_types::xcm::v2::multiasset::AssetId, + pub fun: runtime_types::xcm::v2::multiasset::Fungibility, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum MultiAssetFilter { + #[codec(index = 0)] + Definite(runtime_types::xcm::v2::multiasset::MultiAssets), + #[codec(index = 1)] + Wild(runtime_types::xcm::v2::multiasset::WildMultiAsset), + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct MultiAssets( + pub ::std::vec::Vec, + ); + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum WildFungibility { + #[codec(index = 0)] + Fungible, + #[codec(index = 1)] + NonFungible, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum WildMultiAsset { + #[codec(index = 0)] + All, + #[codec(index = 1)] + AllOf { + id: runtime_types::xcm::v2::multiasset::AssetId, + fun: runtime_types::xcm::v2::multiasset::WildFungibility, + }, + } + } + pub mod multilocation { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum Junctions { + #[codec(index = 0)] + Here, + #[codec(index = 1)] + X1(runtime_types::xcm::v2::junction::Junction), + #[codec(index = 2)] + X2( + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + ), + #[codec(index = 3)] + X3( + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + ), + #[codec(index = 4)] + X4( + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + ), + #[codec(index = 5)] + X5( + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + ), + #[codec(index = 6)] + X6( + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + ), + #[codec(index = 7)] + X7( + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + ), + #[codec(index = 8)] + X8( + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + ), + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct MultiLocation { + pub parents: ::core::primitive::u8, + pub interior: runtime_types::xcm::v2::multilocation::Junctions, + } + } + pub mod traits { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum Error { + #[codec(index = 0)] + Overflow, + #[codec(index = 1)] + Unimplemented, + #[codec(index = 2)] + UntrustedReserveLocation, + #[codec(index = 3)] + UntrustedTeleportLocation, + #[codec(index = 4)] + MultiLocationFull, + #[codec(index = 5)] + MultiLocationNotInvertible, + #[codec(index = 6)] + BadOrigin, + #[codec(index = 7)] + InvalidLocation, + #[codec(index = 8)] + AssetNotFound, + #[codec(index = 9)] + FailedToTransactAsset, + #[codec(index = 10)] + NotWithdrawable, + #[codec(index = 11)] + LocationCannotHold, + #[codec(index = 12)] + ExceedsMaxMessageSize, + #[codec(index = 13)] + DestinationUnsupported, + #[codec(index = 14)] + Transport, + #[codec(index = 15)] + Unroutable, + #[codec(index = 16)] + UnknownClaim, + #[codec(index = 17)] + FailedToDecode, + #[codec(index = 18)] + MaxWeightInvalid, + #[codec(index = 19)] + NotHoldingFees, + #[codec(index = 20)] + TooExpensive, + #[codec(index = 21)] + Trap(::core::primitive::u64), + #[codec(index = 22)] + UnhandledXcmVersion, + #[codec(index = 23)] + WeightLimitReached(::core::primitive::u64), + #[codec(index = 24)] + Barrier, + #[codec(index = 25)] + WeightNotComputable, + } + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum BodyId { + #[codec(index = 0)] + Unit, + #[codec(index = 1)] + Named( + runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec< + ::core::primitive::u8, + >, + ), + #[codec(index = 2)] + Index(#[codec(compact)] ::core::primitive::u32), + #[codec(index = 3)] + Executive, + #[codec(index = 4)] + Technical, + #[codec(index = 5)] + Legislative, + #[codec(index = 6)] + Judicial, + #[codec(index = 7)] + Defense, + #[codec(index = 8)] + Administration, + #[codec(index = 9)] + Treasury, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + 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 :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum Instruction { + #[codec(index = 0)] + WithdrawAsset(runtime_types::xcm::v2::multiasset::MultiAssets), + #[codec(index = 1)] + ReserveAssetDeposited(runtime_types::xcm::v2::multiasset::MultiAssets), + #[codec(index = 2)] + ReceiveTeleportedAsset(runtime_types::xcm::v2::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::v2::multiasset::MultiAssets, + beneficiary: runtime_types::xcm::v2::multilocation::MultiLocation, + }, + #[codec(index = 5)] + TransferReserveAsset { + assets: runtime_types::xcm::v2::multiasset::MultiAssets, + dest: runtime_types::xcm::v2::multilocation::MultiLocation, + xcm: runtime_types::xcm::v2::Xcm, + }, + #[codec(index = 6)] + Transact { + origin_type: runtime_types::xcm::v2::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)] - pub number: _0, - pub state_root: ::subxt::utils::H256, - pub extrinsics_root: ::subxt::utils::H256, - pub digest: runtime_types::sp_runtime::generic::digest::Digest, - #[codec(skip)] - pub __subxt_unused_type_params: ::core::marker::PhantomData<_1>, - } - } - pub mod unchecked_extrinsic { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct UncheckedExtrinsic<_0, _1, _2, _3>( - pub ::std::vec::Vec<::core::primitive::u8>, - #[codec(skip)] pub ::core::marker::PhantomData<(_1, _0, _2, _3)>, - ); + 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::v2::multilocation::Junctions), + #[codec(index = 12)] + ReportError { + #[codec(compact)] + query_id: ::core::primitive::u64, + dest: runtime_types::xcm::v2::multilocation::MultiLocation, + #[codec(compact)] + max_response_weight: ::core::primitive::u64, + }, + #[codec(index = 13)] + DepositAsset { + assets: runtime_types::xcm::v2::multiasset::MultiAssetFilter, + #[codec(compact)] + max_assets: ::core::primitive::u32, + beneficiary: runtime_types::xcm::v2::multilocation::MultiLocation, + }, + #[codec(index = 14)] + DepositReserveAsset { + assets: runtime_types::xcm::v2::multiasset::MultiAssetFilter, + #[codec(compact)] + max_assets: ::core::primitive::u32, + dest: runtime_types::xcm::v2::multilocation::MultiLocation, + xcm: runtime_types::xcm::v2::Xcm, + }, + #[codec(index = 15)] + ExchangeAsset { + give: runtime_types::xcm::v2::multiasset::MultiAssetFilter, + receive: runtime_types::xcm::v2::multiasset::MultiAssets, + }, + #[codec(index = 16)] + InitiateReserveWithdraw { + assets: runtime_types::xcm::v2::multiasset::MultiAssetFilter, + reserve: runtime_types::xcm::v2::multilocation::MultiLocation, + xcm: runtime_types::xcm::v2::Xcm, + }, + #[codec(index = 17)] + InitiateTeleport { + assets: runtime_types::xcm::v2::multiasset::MultiAssetFilter, + dest: runtime_types::xcm::v2::multilocation::MultiLocation, + xcm: runtime_types::xcm::v2::Xcm, + }, + #[codec(index = 18)] + QueryHolding { + #[codec(compact)] + query_id: ::core::primitive::u64, + dest: runtime_types::xcm::v2::multilocation::MultiLocation, + assets: runtime_types::xcm::v2::multiasset::MultiAssetFilter, + #[codec(compact)] + max_response_weight: ::core::primitive::u64, + }, + #[codec(index = 19)] + BuyExecution { + fees: runtime_types::xcm::v2::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::v2::multiasset::MultiAssets, + ticket: runtime_types::xcm::v2::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, } - } - pub mod traits { - use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -46216,179 +51189,20 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct BlakeTwo256; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum ArithmeticError { - #[codec(index = 0)] - Underflow, - #[codec(index = 1)] - Overflow, - #[codec(index = 2)] - DivisionByZero, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum DispatchError { - #[codec(index = 0)] - Other, - #[codec(index = 1)] - CannotLookup, - #[codec(index = 2)] - BadOrigin, - #[codec(index = 3)] - Module(runtime_types::sp_runtime::ModuleError), - #[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), - #[codec(index = 9)] - Transactional(runtime_types::sp_runtime::TransactionalError), - #[codec(index = 10)] - Exhausted, - #[codec(index = 11)] - Corruption, - #[codec(index = 12)] - Unavailable, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ModuleError { - pub index: ::core::primitive::u8, - pub error: [::core::primitive::u8; 4usize], - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - 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 :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - 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 :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - 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, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum TransactionalError { - #[codec(index = 0)] - LimitReached, - #[codec(index = 1)] - NoLayer, - } - } - pub mod sp_session { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - 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; + pub enum NetworkId { + #[codec(index = 0)] + Any, + #[codec(index = 1)] + Named( + runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec< + ::core::primitive::u8, + >, + ), + #[codec(index = 2)] + Polkadot, + #[codec(index = 3)] + Kusama, + } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -46399,40 +51213,16 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct OffenceDetails<_0, _1> { - pub offender: _1, - pub reporters: ::std::vec::Vec<_0>, + pub enum OriginKind { + #[codec(index = 0)] + Native, + #[codec(index = 1)] + SovereignAccount, + #[codec(index = 2)] + Superuser, + #[codec(index = 3)] + Xcm, } - } - } - pub mod sp_version { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - 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 sp_weights { - use super::runtime_types; - pub mod weight_v2 { - use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -46443,44 +51233,21 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Weight { - #[codec(compact)] - pub ref_time: ::core::primitive::u64, - #[codec(compact)] - pub proof_size: ::core::primitive::u64, + pub enum Response { + #[codec(index = 0)] + Null, + #[codec(index = 1)] + Assets(runtime_types::xcm::v2::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 :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct OldWeight(pub ::core::primitive::u64); - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RuntimeDbWeight { - pub read: ::core::primitive::u64, - pub write: ::core::primitive::u64, - } - } - pub mod xcm { - use super::runtime_types; - pub mod double_encoded { - use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -46491,11 +51258,25 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct DoubleEncoded { - pub encoded: ::std::vec::Vec<::core::primitive::u8>, + pub enum WeightLimit { + #[codec(index = 0)] + Unlimited, + #[codec(index = 1)] + Limited(#[codec(compact)] ::core::primitive::u64), } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Xcm(pub ::std::vec::Vec); } - pub mod v0 { + pub mod v3 { use super::runtime_types; pub mod junction { use super::runtime_types; @@ -46513,11 +51294,7 @@ pub mod api { #[codec(index = 0)] Unit, #[codec(index = 1)] - Named( - runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec< - ::core::primitive::u8, - >, - ), + Moniker([::core::primitive::u8; 4usize]), #[codec(index = 2)] Index(#[codec(compact)] ::core::primitive::u32), #[codec(index = 3)] @@ -46528,6 +51305,12 @@ pub mod api { Legislative, #[codec(index = 6)] Judicial, + #[codec(index = 7)] + Defense, + #[codec(index = 8)] + Administration, + #[codec(index = 9)] + Treasury, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -46552,160 +51335,23 @@ pub mod api { #[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 :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Junction { - #[codec(index = 0)] - Parent, - #[codec(index = 1)] - Parachain(#[codec(compact)] ::core::primitive::u32), - #[codec(index = 2)] - AccountId32 { - network: runtime_types::xcm::v0::junction::NetworkId, - id: [::core::primitive::u8; 32usize], - }, - #[codec(index = 3)] - AccountIndex64 { - network: runtime_types::xcm::v0::junction::NetworkId, - #[codec(compact)] - index: ::core::primitive::u64, - }, - #[codec(index = 4)] - AccountKey20 { - network: runtime_types::xcm::v0::junction::NetworkId, - key: [::core::primitive::u8; 20usize], - }, - #[codec(index = 5)] - PalletInstance(::core::primitive::u8), - #[codec(index = 6)] - GeneralIndex(#[codec(compact)] ::core::primitive::u128), - #[codec(index = 7)] - GeneralKey( - runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec< - ::core::primitive::u8, - >, - ), - #[codec(index = 8)] - OnlyChild, - #[codec(index = 9)] - Plurality { - id: runtime_types::xcm::v0::junction::BodyId, - part: runtime_types::xcm::v0::junction::BodyPart, - }, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum NetworkId { - #[codec(index = 0)] - Any, - #[codec(index = 1)] - Named( - runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec< - ::core::primitive::u8, - >, - ), - #[codec(index = 2)] - Polkadot, - #[codec(index = 3)] - Kusama, - } - } - pub mod multi_asset { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - 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, + denom: ::core::primitive::u32, }, - #[codec(index = 10)] - ConcreteFungible { - id: runtime_types::xcm::v0::multi_location::MultiLocation, + #[codec(index = 3)] + AtLeastProportion { #[codec(compact)] - amount: ::core::primitive::u128, + nom: ::core::primitive::u32, + #[codec(compact)] + denom: ::core::primitive::u32, }, - #[codec(index = 11)] - ConcreteNonFungible { - class: runtime_types::xcm::v0::multi_location::MultiLocation, - instance: runtime_types::xcm::v1::multiasset::AssetInstance, + #[codec(index = 4)] + MoreThanProportion { + #[codec(compact)] + nom: ::core::primitive::u32, + #[codec(compact)] + denom: ::core::primitive::u32, }, } - } - pub mod multi_location { - use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -46716,71 +51362,47 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum MultiLocation { + pub enum Junction { #[codec(index = 0)] - Null, + Parachain(#[codec(compact)] ::core::primitive::u32), #[codec(index = 1)] - X1(runtime_types::xcm::v0::junction::Junction), + AccountId32 { + network: + ::core::option::Option, + id: [::core::primitive::u8; 32usize], + }, #[codec(index = 2)] - X2( - runtime_types::xcm::v0::junction::Junction, - runtime_types::xcm::v0::junction::Junction, - ), + AccountIndex64 { + network: + ::core::option::Option, + #[codec(compact)] + index: ::core::primitive::u64, + }, #[codec(index = 3)] - X3( - runtime_types::xcm::v0::junction::Junction, - runtime_types::xcm::v0::junction::Junction, - runtime_types::xcm::v0::junction::Junction, - ), + AccountKey20 { + network: + ::core::option::Option, + key: [::core::primitive::u8; 20usize], + }, #[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, - ), + PalletInstance(::core::primitive::u8), #[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, - ), + GeneralIndex(#[codec(compact)] ::core::primitive::u128), #[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, - ), + GeneralKey { + length: ::core::primitive::u8, + data: [::core::primitive::u8; 32usize], + }, #[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, - ), + OnlyChild, #[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, - ), + Plurality { + id: runtime_types::xcm::v3::junction::BodyId, + part: runtime_types::xcm::v3::junction::BodyPart, + }, + #[codec(index = 9)] + GlobalConsensus(runtime_types::xcm::v3::junction::NetworkId), } - } - pub mod order { - use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -46791,176 +51413,36 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Order { + pub enum NetworkId { #[codec(index = 0)] - Null, + ByGenesis([::core::primitive::u8; 32usize]), #[codec(index = 1)] - DepositAsset { - assets: - ::std::vec::Vec, - dest: runtime_types::xcm::v0::multi_location::MultiLocation, + ByFork { + block_number: ::core::primitive::u64, + block_hash: [::core::primitive::u8; 32usize], }, #[codec(index = 2)] - DepositReserveAsset { - assets: - ::std::vec::Vec, - dest: runtime_types::xcm::v0::multi_location::MultiLocation, - effects: ::std::vec::Vec, - }, + Polkadot, #[codec(index = 3)] - ExchangeAsset { - give: ::std::vec::Vec, - receive: - ::std::vec::Vec, - }, + Kusama, #[codec(index = 4)] - InitiateReserveWithdraw { - assets: - ::std::vec::Vec, - reserve: runtime_types::xcm::v0::multi_location::MultiLocation, - effects: ::std::vec::Vec, - }, + Westend, #[codec(index = 5)] - InitiateTeleport { - assets: - ::std::vec::Vec, - dest: runtime_types::xcm::v0::multi_location::MultiLocation, - effects: ::std::vec::Vec, - }, + Rococo, #[codec(index = 6)] - QueryHolding { - #[codec(compact)] - query_id: ::core::primitive::u64, - dest: runtime_types::xcm::v0::multi_location::MultiLocation, - assets: - ::std::vec::Vec, - }, + Wococo, #[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, + Ethereum { + #[codec(compact)] + chain_id: ::core::primitive::u64, }, + #[codec(index = 8)] + BitcoinCore, + #[codec(index = 9)] + BitcoinCash, } } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum OriginKind { - #[codec(index = 0)] - Native, - #[codec(index = 1)] - SovereignAccount, - #[codec(index = 2)] - Superuser, - #[codec(index = 3)] - Xcm, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Response { - #[codec(index = 0)] - Assets(::std::vec::Vec), - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Xcm { - #[codec(index = 0)] - WithdrawAsset { - assets: ::std::vec::Vec, - effects: ::std::vec::Vec, - }, - #[codec(index = 1)] - ReserveAssetDeposit { - assets: ::std::vec::Vec, - effects: ::std::vec::Vec, - }, - #[codec(index = 2)] - TeleportAsset { - assets: ::std::vec::Vec, - 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, - dest: runtime_types::xcm::v0::multi_location::MultiLocation, - }, - #[codec(index = 5)] - TransferReserveAsset { - assets: ::std::vec::Vec, - dest: runtime_types::xcm::v0::multi_location::MultiLocation, - effects: ::std::vec::Vec, - }, - #[codec(index = 6)] - Transact { - origin_type: runtime_types::xcm::v0::OriginKind, - require_weight_at_most: ::core::primitive::u64, - call: runtime_types::xcm::double_encoded::DoubleEncoded, - }, - #[codec(index = 7)] - HrmpNewChannelOpenRequest { - #[codec(compact)] - sender: ::core::primitive::u32, - #[codec(compact)] - max_message_size: ::core::primitive::u32, - #[codec(compact)] - max_capacity: ::core::primitive::u32, - }, - #[codec(index = 8)] - HrmpChannelAccepted { - #[codec(compact)] - recipient: ::core::primitive::u32, - }, - #[codec(index = 9)] - HrmpChannelClosing { - #[codec(compact)] - initiator: ::core::primitive::u32, - #[codec(compact)] - sender: ::core::primitive::u32, - #[codec(compact)] - recipient: ::core::primitive::u32, - }, - #[codec(index = 10)] - RelayedFrom { - who: runtime_types::xcm::v0::multi_location::MultiLocation, - message: ::std::boxed::Box, - }, - } - } - pub mod v1 { - use super::runtime_types; - pub mod junction { + pub mod junctions { use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, @@ -46972,42 +51454,67 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Junction { + pub enum Junctions { #[codec(index = 0)] - Parachain(#[codec(compact)] ::core::primitive::u32), + Here, #[codec(index = 1)] - AccountId32 { - network: runtime_types::xcm::v0::junction::NetworkId, - id: [::core::primitive::u8; 32usize], - }, + X1(runtime_types::xcm::v3::junction::Junction), #[codec(index = 2)] - AccountIndex64 { - network: runtime_types::xcm::v0::junction::NetworkId, - #[codec(compact)] - index: ::core::primitive::u64, - }, + X2( + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + ), #[codec(index = 3)] - AccountKey20 { - network: runtime_types::xcm::v0::junction::NetworkId, - key: [::core::primitive::u8; 20usize], - }, + X3( + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + ), #[codec(index = 4)] - PalletInstance(::core::primitive::u8), + X4( + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + ), #[codec(index = 5)] - GeneralIndex(#[codec(compact)] ::core::primitive::u128), + X5( + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + ), #[codec(index = 6)] - GeneralKey( - runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec< - ::core::primitive::u8, - >, + X6( + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, ), #[codec(index = 7)] - OnlyChild, + X7( + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + ), #[codec(index = 8)] - Plurality { - id: runtime_types::xcm::v0::junction::BodyId, - part: runtime_types::xcm::v0::junction::BodyPart, - }, + X8( + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + ), } } pub mod multiasset { @@ -47024,9 +51531,9 @@ pub mod api { #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum AssetId { #[codec(index = 0)] - Concrete(runtime_types::xcm::v1::multilocation::MultiLocation), + Concrete(runtime_types::xcm::v3::multilocation::MultiLocation), #[codec(index = 1)] - Abstract(::std::vec::Vec<::core::primitive::u8>), + Abstract([::core::primitive::u8; 32usize]), } #[derive( :: subxt :: ext :: codec :: Decode, @@ -47051,8 +51558,6 @@ pub mod api { 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 :: ext :: codec :: Decode, @@ -47068,7 +51573,7 @@ pub mod api { #[codec(index = 0)] Fungible(#[codec(compact)] ::core::primitive::u128), #[codec(index = 1)] - NonFungible(runtime_types::xcm::v1::multiasset::AssetInstance), + NonFungible(runtime_types::xcm::v3::multiasset::AssetInstance), } #[derive( :: subxt :: ext :: codec :: Decode, @@ -47081,8 +51586,8 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct MultiAsset { - pub id: runtime_types::xcm::v1::multiasset::AssetId, - pub fun: runtime_types::xcm::v1::multiasset::Fungibility, + pub id: runtime_types::xcm::v3::multiasset::AssetId, + pub fun: runtime_types::xcm::v3::multiasset::Fungibility, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -47096,9 +51601,9 @@ pub mod api { #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum MultiAssetFilter { #[codec(index = 0)] - Definite(runtime_types::xcm::v1::multiasset::MultiAssets), + Definite(runtime_types::xcm::v3::multiasset::MultiAssets), #[codec(index = 1)] - Wild(runtime_types::xcm::v1::multiasset::WildMultiAsset), + Wild(runtime_types::xcm::v3::multiasset::WildMultiAsset), } #[derive( :: subxt :: ext :: codec :: Decode, @@ -47111,7 +51616,7 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct MultiAssets( - pub ::std::vec::Vec, + pub ::std::vec::Vec, ); #[derive( :: subxt :: ext :: codec :: Decode, @@ -47144,8 +51649,17 @@ pub mod api { All, #[codec(index = 1)] AllOf { - id: runtime_types::xcm::v1::multiasset::AssetId, - fun: runtime_types::xcm::v1::multiasset::WildFungibility, + id: runtime_types::xcm::v3::multiasset::AssetId, + fun: runtime_types::xcm::v3::multiasset::WildFungibility, + }, + #[codec(index = 2)] + AllCounted(#[codec(compact)] ::core::primitive::u32), + #[codec(index = 3)] + AllOfCounted { + id: runtime_types::xcm::v3::multiasset::AssetId, + fun: runtime_types::xcm::v3::multiasset::WildFungibility, + #[codec(compact)] + count: ::core::primitive::u32, }, } } @@ -47161,251 +51675,11 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - 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 :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] 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 :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Order { - #[codec(index = 0)] - Noop, - #[codec(index = 1)] - DepositAsset { - assets: runtime_types::xcm::v1::multiasset::MultiAssetFilter, - max_assets: ::core::primitive::u32, - beneficiary: runtime_types::xcm::v1::multilocation::MultiLocation, - }, - #[codec(index = 2)] - DepositReserveAsset { - assets: runtime_types::xcm::v1::multiasset::MultiAssetFilter, - max_assets: ::core::primitive::u32, - dest: runtime_types::xcm::v1::multilocation::MultiLocation, - effects: ::std::vec::Vec, - }, - #[codec(index = 3)] - ExchangeAsset { - give: runtime_types::xcm::v1::multiasset::MultiAssetFilter, - receive: runtime_types::xcm::v1::multiasset::MultiAssets, - }, - #[codec(index = 4)] - InitiateReserveWithdraw { - assets: runtime_types::xcm::v1::multiasset::MultiAssetFilter, - reserve: runtime_types::xcm::v1::multilocation::MultiLocation, - effects: ::std::vec::Vec, - }, - #[codec(index = 5)] - InitiateTeleport { - assets: runtime_types::xcm::v1::multiasset::MultiAssetFilter, - dest: runtime_types::xcm::v1::multilocation::MultiLocation, - effects: ::std::vec::Vec, - }, - #[codec(index = 6)] - QueryHolding { - #[codec(compact)] - query_id: ::core::primitive::u64, - dest: runtime_types::xcm::v1::multilocation::MultiLocation, - assets: runtime_types::xcm::v1::multiasset::MultiAssetFilter, - }, - #[codec(index = 7)] - BuyExecution { - fees: runtime_types::xcm::v1::multiasset::MultiAsset, - weight: ::core::primitive::u64, - debt: ::core::primitive::u64, - halt_on_error: ::core::primitive::bool, - instructions: ::std::vec::Vec, - }, + pub interior: runtime_types::xcm::v3::junctions::Junctions, } } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Response { - #[codec(index = 0)] - Assets(runtime_types::xcm::v1::multiasset::MultiAssets), - #[codec(index = 1)] - Version(::core::primitive::u32), - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - 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 v2 { - use super::runtime_types; pub mod traits { use super::runtime_types; #[derive( @@ -47428,9 +51702,9 @@ pub mod api { #[codec(index = 3)] UntrustedTeleportLocation, #[codec(index = 4)] - MultiLocationFull, + LocationFull, #[codec(index = 5)] - MultiLocationNotInvertible, + LocationNotInvertible, #[codec(index = 6)] BadOrigin, #[codec(index = 7)] @@ -47464,13 +51738,41 @@ pub mod api { #[codec(index = 21)] Trap(::core::primitive::u64), #[codec(index = 22)] - UnhandledXcmVersion, + ExpectationFalse, #[codec(index = 23)] - WeightLimitReached(::core::primitive::u64), + PalletNotFound, #[codec(index = 24)] - Barrier, + NameMismatch, #[codec(index = 25)] + VersionIncompatible, + #[codec(index = 26)] + HoldingWouldOverflow, + #[codec(index = 27)] + ExportError, + #[codec(index = 28)] + ReanchorFailed, + #[codec(index = 29)] + NoDeal, + #[codec(index = 30)] + FeesNotMet, + #[codec(index = 31)] + LockError, + #[codec(index = 32)] + NoPermission, + #[codec(index = 33)] + Unanchored, + #[codec(index = 34)] + NotDepositable, + #[codec(index = 35)] + UnhandledXcmVersion, + #[codec(index = 36)] + WeightLimitReached(runtime_types::sp_weights::weight_v2::Weight), + #[codec(index = 37)] + Barrier, + #[codec(index = 38)] WeightNotComputable, + #[codec(index = 39)] + ExceedsStackLimit, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -47484,14 +51786,14 @@ pub mod api { #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum Outcome { #[codec(index = 0)] - Complete(::core::primitive::u64), + Complete(runtime_types::sp_weights::weight_v2::Weight), #[codec(index = 1)] Incomplete( - ::core::primitive::u64, - runtime_types::xcm::v2::traits::Error, + runtime_types::sp_weights::weight_v2::Weight, + runtime_types::xcm::v3::traits::Error, ), #[codec(index = 2)] - Error(runtime_types::xcm::v2::traits::Error), + Error(runtime_types::xcm::v3::traits::Error), } } #[derive( @@ -47506,35 +51808,36 @@ pub mod api { #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum Instruction { #[codec(index = 0)] - WithdrawAsset(runtime_types::xcm::v1::multiasset::MultiAssets), + WithdrawAsset(runtime_types::xcm::v3::multiasset::MultiAssets), #[codec(index = 1)] - ReserveAssetDeposited(runtime_types::xcm::v1::multiasset::MultiAssets), + ReserveAssetDeposited(runtime_types::xcm::v3::multiasset::MultiAssets), #[codec(index = 2)] - ReceiveTeleportedAsset(runtime_types::xcm::v1::multiasset::MultiAssets), + ReceiveTeleportedAsset(runtime_types::xcm::v3::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, + response: runtime_types::xcm::v3::Response, + max_weight: runtime_types::sp_weights::weight_v2::Weight, + querier: ::core::option::Option< + runtime_types::xcm::v3::multilocation::MultiLocation, + >, }, #[codec(index = 4)] TransferAsset { - assets: runtime_types::xcm::v1::multiasset::MultiAssets, - beneficiary: runtime_types::xcm::v1::multilocation::MultiLocation, + assets: runtime_types::xcm::v3::multiasset::MultiAssets, + beneficiary: runtime_types::xcm::v3::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, + assets: runtime_types::xcm::v3::multiasset::MultiAssets, + dest: runtime_types::xcm::v3::multilocation::MultiLocation, + xcm: runtime_types::xcm::v3::Xcm, }, #[codec(index = 6)] Transact { - origin_type: runtime_types::xcm::v0::OriginKind, - #[codec(compact)] - require_weight_at_most: ::core::primitive::u64, + origin_kind: runtime_types::xcm::v2::OriginKind, + require_weight_at_most: runtime_types::sp_weights::weight_v2::Weight, call: runtime_types::xcm::double_encoded::DoubleEncoded, }, #[codec(index = 7)] @@ -47563,73 +51866,60 @@ pub mod api { #[codec(index = 10)] ClearOrigin, #[codec(index = 11)] - DescendOrigin(runtime_types::xcm::v1::multilocation::Junctions), + DescendOrigin(runtime_types::xcm::v3::junctions::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, - }, + ReportError(runtime_types::xcm::v3::QueryResponseInfo), #[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, + assets: runtime_types::xcm::v3::multiasset::MultiAssetFilter, + beneficiary: runtime_types::xcm::v3::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, + assets: runtime_types::xcm::v3::multiasset::MultiAssetFilter, + dest: runtime_types::xcm::v3::multilocation::MultiLocation, + xcm: runtime_types::xcm::v3::Xcm, }, #[codec(index = 15)] ExchangeAsset { - give: runtime_types::xcm::v1::multiasset::MultiAssetFilter, - receive: runtime_types::xcm::v1::multiasset::MultiAssets, + give: runtime_types::xcm::v3::multiasset::MultiAssetFilter, + want: runtime_types::xcm::v3::multiasset::MultiAssets, + maximal: ::core::primitive::bool, }, #[codec(index = 16)] InitiateReserveWithdraw { - assets: runtime_types::xcm::v1::multiasset::MultiAssetFilter, - reserve: runtime_types::xcm::v1::multilocation::MultiLocation, - xcm: runtime_types::xcm::v2::Xcm, + assets: runtime_types::xcm::v3::multiasset::MultiAssetFilter, + reserve: runtime_types::xcm::v3::multilocation::MultiLocation, + xcm: runtime_types::xcm::v3::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, + assets: runtime_types::xcm::v3::multiasset::MultiAssetFilter, + dest: runtime_types::xcm::v3::multilocation::MultiLocation, + xcm: runtime_types::xcm::v3::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, + ReportHolding { + response_info: runtime_types::xcm::v3::QueryResponseInfo, + assets: runtime_types::xcm::v3::multiasset::MultiAssetFilter, }, #[codec(index = 19)] BuyExecution { - fees: runtime_types::xcm::v1::multiasset::MultiAsset, - weight_limit: runtime_types::xcm::v2::WeightLimit, + fees: runtime_types::xcm::v3::multiasset::MultiAsset, + weight_limit: runtime_types::xcm::v3::WeightLimit, }, #[codec(index = 20)] RefundSurplus, #[codec(index = 21)] - SetErrorHandler(runtime_types::xcm::v2::Xcm), + SetErrorHandler(runtime_types::xcm::v3::Xcm), #[codec(index = 22)] - SetAppendix(runtime_types::xcm::v2::Xcm), + SetAppendix(runtime_types::xcm::v3::Xcm), #[codec(index = 23)] ClearError, #[codec(index = 24)] ClaimAsset { - assets: runtime_types::xcm::v1::multiasset::MultiAssets, - ticket: runtime_types::xcm::v1::multilocation::MultiLocation, + assets: runtime_types::xcm::v3::multiasset::MultiAssets, + ticket: runtime_types::xcm::v3::multilocation::MultiLocation, }, #[codec(index = 25)] Trap(#[codec(compact)] ::core::primitive::u64), @@ -47637,11 +51927,162 @@ pub mod api { SubscribeVersion { #[codec(compact)] query_id: ::core::primitive::u64, - #[codec(compact)] - max_response_weight: ::core::primitive::u64, + max_response_weight: runtime_types::sp_weights::weight_v2::Weight, }, #[codec(index = 27)] UnsubscribeVersion, + #[codec(index = 28)] + BurnAsset(runtime_types::xcm::v3::multiasset::MultiAssets), + #[codec(index = 29)] + ExpectAsset(runtime_types::xcm::v3::multiasset::MultiAssets), + #[codec(index = 30)] + ExpectOrigin( + ::core::option::Option< + runtime_types::xcm::v3::multilocation::MultiLocation, + >, + ), + #[codec(index = 31)] + ExpectError( + ::core::option::Option<( + ::core::primitive::u32, + runtime_types::xcm::v3::traits::Error, + )>, + ), + #[codec(index = 32)] + ExpectTransactStatus(runtime_types::xcm::v3::MaybeErrorCode), + #[codec(index = 33)] + QueryPallet { + module_name: ::std::vec::Vec<::core::primitive::u8>, + response_info: runtime_types::xcm::v3::QueryResponseInfo, + }, + #[codec(index = 34)] + ExpectPallet { + #[codec(compact)] + index: ::core::primitive::u32, + name: ::std::vec::Vec<::core::primitive::u8>, + module_name: ::std::vec::Vec<::core::primitive::u8>, + #[codec(compact)] + crate_major: ::core::primitive::u32, + #[codec(compact)] + min_crate_minor: ::core::primitive::u32, + }, + #[codec(index = 35)] + ReportTransactStatus(runtime_types::xcm::v3::QueryResponseInfo), + #[codec(index = 36)] + ClearTransactStatus, + #[codec(index = 37)] + UniversalOrigin(runtime_types::xcm::v3::junction::Junction), + #[codec(index = 38)] + ExportMessage { + network: runtime_types::xcm::v3::junction::NetworkId, + destination: runtime_types::xcm::v3::junctions::Junctions, + xcm: runtime_types::xcm::v3::Xcm, + }, + #[codec(index = 39)] + LockAsset { + asset: runtime_types::xcm::v3::multiasset::MultiAsset, + unlocker: runtime_types::xcm::v3::multilocation::MultiLocation, + }, + #[codec(index = 40)] + UnlockAsset { + asset: runtime_types::xcm::v3::multiasset::MultiAsset, + target: runtime_types::xcm::v3::multilocation::MultiLocation, + }, + #[codec(index = 41)] + NoteUnlockable { + asset: runtime_types::xcm::v3::multiasset::MultiAsset, + owner: runtime_types::xcm::v3::multilocation::MultiLocation, + }, + #[codec(index = 42)] + RequestUnlock { + asset: runtime_types::xcm::v3::multiasset::MultiAsset, + locker: runtime_types::xcm::v3::multilocation::MultiLocation, + }, + #[codec(index = 43)] + SetFeesMode { + jit_withdraw: ::core::primitive::bool, + }, + #[codec(index = 44)] + SetTopic([::core::primitive::u8; 32usize]), + #[codec(index = 45)] + ClearTopic, + #[codec(index = 46)] + AliasOrigin(runtime_types::xcm::v3::multilocation::MultiLocation), + #[codec(index = 47)] + UnpaidExecution { + weight_limit: runtime_types::xcm::v3::WeightLimit, + check_origin: ::core::option::Option< + runtime_types::xcm::v3::multilocation::MultiLocation, + >, + }, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum MaybeErrorCode { + #[codec(index = 0)] + Success, + #[codec(index = 1)] + Error( + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + ), + #[codec(index = 2)] + TruncatedError( + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + ), + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct PalletInfo { + #[codec(compact)] + pub index: ::core::primitive::u32, + pub name: runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + pub module_name: runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + #[codec(compact)] + pub major: ::core::primitive::u32, + #[codec(compact)] + pub minor: ::core::primitive::u32, + #[codec(compact)] + pub patch: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct QueryResponseInfo { + pub destination: runtime_types::xcm::v3::multilocation::MultiLocation, + #[codec(compact)] + pub query_id: ::core::primitive::u64, + pub max_weight: runtime_types::sp_weights::weight_v2::Weight, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -47657,16 +52098,24 @@ pub mod api { #[codec(index = 0)] Null, #[codec(index = 1)] - Assets(runtime_types::xcm::v1::multiasset::MultiAssets), + Assets(runtime_types::xcm::v3::multiasset::MultiAssets), #[codec(index = 2)] ExecutionResult( ::core::option::Option<( ::core::primitive::u32, - runtime_types::xcm::v2::traits::Error, + runtime_types::xcm::v3::traits::Error, )>, ), #[codec(index = 3)] Version(::core::primitive::u32), + #[codec(index = 4)] + PalletsInfo( + runtime_types::bounded_collections::bounded_vec::BoundedVec< + runtime_types::xcm::v3::PalletInfo, + >, + ), + #[codec(index = 5)] + DispatchResult(runtime_types::xcm::v3::MaybeErrorCode), } #[derive( :: subxt :: ext :: codec :: Decode, @@ -47682,7 +52131,7 @@ pub mod api { #[codec(index = 0)] Unlimited, #[codec(index = 1)] - Limited(#[codec(compact)] ::core::primitive::u64), + Limited(runtime_types::sp_weights::weight_v2::Weight), } #[derive( :: subxt :: ext :: codec :: Decode, @@ -47694,7 +52143,21 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Xcm(pub ::std::vec::Vec); + pub struct Xcm(pub ::std::vec::Vec); + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum VersionedAssetId { + #[codec(index = 3)] + V3(runtime_types::xcm::v3::multiasset::AssetId), } #[derive( :: subxt :: ext :: codec :: Decode, @@ -47707,10 +52170,10 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum VersionedMultiAssets { - #[codec(index = 0)] - V0(::std::vec::Vec), #[codec(index = 1)] - V1(runtime_types::xcm::v1::multiasset::MultiAssets), + V2(runtime_types::xcm::v2::multiasset::MultiAssets), + #[codec(index = 3)] + V3(runtime_types::xcm::v3::multiasset::MultiAssets), } #[derive( :: subxt :: ext :: codec :: Decode, @@ -47723,10 +52186,10 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum VersionedMultiLocation { - #[codec(index = 0)] - V0(runtime_types::xcm::v0::multi_location::MultiLocation), #[codec(index = 1)] - V1(runtime_types::xcm::v1::multilocation::MultiLocation), + V2(runtime_types::xcm::v2::multilocation::MultiLocation), + #[codec(index = 3)] + V3(runtime_types::xcm::v3::multilocation::MultiLocation), } #[derive( :: subxt :: ext :: codec :: Decode, @@ -47739,12 +52202,10 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] 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), + #[codec(index = 3)] + V3(runtime_types::xcm::v3::Response), } #[derive( :: subxt :: ext :: codec :: Decode, @@ -47757,12 +52218,10 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] 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), + #[codec(index = 3)] + V3(runtime_types::xcm::v3::Xcm), } } } diff --git a/testing/integration-tests/src/lib.rs b/testing/integration-tests/src/lib.rs index 38f0c47490..9b68870e7b 100644 --- a/testing/integration-tests/src/lib.rs +++ b/testing/integration-tests/src/lib.rs @@ -18,6 +18,8 @@ mod frame; #[cfg(test)] mod metadata; #[cfg(test)] +mod runtime_api; +#[cfg(test)] mod storage; #[cfg(test)] diff --git a/testing/integration-tests/src/runtime_api/mod.rs b/testing/integration-tests/src/runtime_api/mod.rs new file mode 100644 index 0000000000..c70b1fdfd2 --- /dev/null +++ b/testing/integration-tests/src/runtime_api/mod.rs @@ -0,0 +1,49 @@ +// Copyright 2019-2023 Parity Technologies (UK) Ltd. +// This file is dual-licensed as Apache-2.0 or GPL-3.0. +// see LICENSE for license details. + +use crate::{node_runtime, pair_signer, test_context}; +use sp_keyring::AccountKeyring; +use subxt::utils::AccountId32; + +#[tokio::test] +async fn account_nonce() -> Result<(), subxt::Error> { + let ctx = test_context().await; + let api = ctx.client(); + + let signer = pair_signer(AccountKeyring::Alice.pair()); + let alice: AccountId32 = AccountKeyring::Alice.to_account_id().into(); + + // Check Alice nonce is starting from 0. + let runtime_api_call = node_runtime::apis() + .account_nonce_api() + .account_nonce(alice.clone()); + let nonce = api + .runtime_api() + .at_latest() + .await? + .call(runtime_api_call) + .await?; + assert_eq!(nonce, 0); + + // Do some transaction to bump the Alice nonce to 1: + let remark_tx = node_runtime::tx().system().remark(vec![1, 2, 3, 4, 5]); + api.tx() + .sign_and_submit_then_watch_default(&remark_tx, &signer) + .await? + .wait_for_finalized_success() + .await?; + + let runtime_api_call = node_runtime::apis() + .account_nonce_api() + .account_nonce(alice); + let nonce = api + .runtime_api() + .at_latest() + .await? + .call(runtime_api_call) + .await?; + assert_eq!(nonce, 1); + + Ok(()) +} diff --git a/testing/test-runtime/Cargo.toml b/testing/test-runtime/Cargo.toml index 4236ef57aa..b8085a4b6c 100644 --- a/testing/test-runtime/Cargo.toml +++ b/testing/test-runtime/Cargo.toml @@ -14,3 +14,5 @@ serde = { workspace = true } tokio = { workspace = true } which = { workspace = true } jsonrpsee = { workspace = true, features = ["async-client", "client-ws-transport"] } +hex = { workspace = true } +codec = { workspace = true } diff --git a/testing/test-runtime/build.rs b/testing/test-runtime/build.rs index 8b584d2185..bdd45d08bc 100644 --- a/testing/test-runtime/build.rs +++ b/testing/test-runtime/build.rs @@ -2,6 +2,7 @@ // This file is dual-licensed as Apache-2.0 or GPL-3.0. // see LICENSE for license details. +use codec::{Decode, Encode}; use std::{env, fs, path::Path}; use substrate_runner::{Error as SubstrateNodeError, SubstrateNode}; @@ -36,22 +37,31 @@ async fn run() { // Download metadata from binary. Avoid Subxt dep on `subxt::rpc::types::Bytes`and just impl here. // This may at least prevent this script from running so often (ie whenever we change Subxt). - #[derive(serde::Deserialize)] - pub struct Bytes(#[serde(with = "impl_serde::serialize")] pub Vec); - let metadata_bytes: Bytes = { + const V15_METADATA_VERSION: u32 = u32::MAX; + let bytes = V15_METADATA_VERSION.encode(); + let version: String = format!("0x{}", hex::encode(&bytes)); + let raw: String = { use client::ClientT; client::build(&format!("ws://localhost:{port}")) .await .unwrap_or_else(|e| panic!("Failed to connect to node: {e}")) - .request("state_getMetadata", client::rpc_params![]) + .request( + "state_call", + client::rpc_params!["Metadata_metadata_at_version", &version], + ) .await .unwrap_or_else(|e| panic!("Failed to obtain metadata from node: {e}")) }; + let raw_bytes = hex::decode(raw.trim_start_matches("0x")) + .unwrap_or_else(|e| panic!("Failed to hex-decode metadata: {e}")); + let bytes: Option> = Decode::decode(&mut &raw_bytes[..]) + .unwrap_or_else(|e| panic!("Failed to decode metadata bytes: {e}")); + let metadata_bytes = bytes.expect("Metadata version not found"); // Save metadata to a file: let out_dir = env::var_os("OUT_DIR").unwrap(); let metadata_path = Path::new(&out_dir).join("metadata.scale"); - fs::write(&metadata_path, metadata_bytes.0).expect("Couldn't write metadata output"); + fs::write(&metadata_path, metadata_bytes).expect("Couldn't write metadata output"); // Write out our expression to generate the runtime API to a file. Ideally, we'd just write this code // in lib.rs, but we must pass a string literal (and not `concat!(..)`) as an arg to `runtime_metadata_path`,