From 8af6a4038eee4147a0bd82867399575fa96d51d7 Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Mon, 10 Apr 2023 16:23:39 +0300 Subject: [PATCH 01/66] Update frame-metadata to v15.1.0 Signed-off-by: Alexandru Vasile --- Cargo.lock | 4 ++-- cli/Cargo.toml | 2 +- codegen/Cargo.toml | 2 +- metadata/Cargo.toml | 2 +- subxt/Cargo.toml | 2 +- testing/integration-tests/Cargo.toml | 2 +- testing/ui-tests/Cargo.toml | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8ead4ce860..0ec21c8362 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -997,9 +997,9 @@ dependencies = [ [[package]] name = "frame-metadata" -version = "15.0.0" +version = "15.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df6bb8542ef006ef0de09a5c4420787d79823c0ed7924225822362fd2bf2ff2d" +checksum = "878babb0b136e731cc77ec2fd883ff02745ff21e6fb662729953d44923df009c" dependencies = [ "cfg-if", "parity-scale-codec", diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 0c0537a52c..7f786cfaff 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -32,7 +32,7 @@ serde_json = "1.0.95" # hex encoded metadata to bytes hex = "0.4.3" # actual metadata types -frame-metadata = { version = "15.0.0", features = ["v14", "std"] } +frame-metadata = { version = "15.1.0", features = ["v14", "std"] } # decode bytes into the metadata types scale = { package = "parity-scale-codec", version = "3.0.0", default-features = false } # generate the item mod for codegen diff --git a/codegen/Cargo.toml b/codegen/Cargo.toml index 3d2940fdf8..af42bba052 100644 --- a/codegen/Cargo.toml +++ b/codegen/Cargo.toml @@ -15,7 +15,7 @@ description = "Generate an API for interacting with a substrate node from FRAME [dependencies] codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "full"] } darling = "0.14.4" -frame-metadata = "15.0.0" +frame-metadata = "15.1.0" heck = "0.4.1" proc-macro2 = "1.0.55" quote = "1.0.8" diff --git a/metadata/Cargo.toml b/metadata/Cargo.toml index 0ef5b94a37..42ae5b2f60 100644 --- a/metadata/Cargo.toml +++ b/metadata/Cargo.toml @@ -15,7 +15,7 @@ description = "Command line utilities for checking metadata compatibility betwee [dependencies] codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "full"] } -frame-metadata = "15.0.0" +frame-metadata = "15.1.0" scale-info = "2.5.0" sp-core-hashing = "7.0.0" diff --git a/subxt/Cargo.toml b/subxt/Cargo.toml index 04f038bfe9..b7ed700d26 100644 --- a/subxt/Cargo.toml +++ b/subxt/Cargo.toml @@ -49,7 +49,7 @@ serde_json = { version = "1.0.95", features = ["raw_value"] } thiserror = "1.0.40" tracing = "0.1.34" parking_lot = "0.12.0" -frame-metadata = "15.0.0" +frame-metadata = "15.1.0" derivative = "2.2.0" either = "1.8.1" diff --git a/testing/integration-tests/Cargo.toml b/testing/integration-tests/Cargo.toml index 6f50290bb9..2edd905ef8 100644 --- a/testing/integration-tests/Cargo.toml +++ b/testing/integration-tests/Cargo.toml @@ -18,7 +18,7 @@ default = ["subxt/integration-tests"] [dev-dependencies] assert_matches = "1.5.0" codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "full", "bit-vec"] } -frame-metadata = "15.0.0" +frame-metadata = "15.1.0" futures = "0.3.27" hex = "0.4.3" regex = "1.7.3" diff --git a/testing/ui-tests/Cargo.toml b/testing/ui-tests/Cargo.toml index 21ca7e3cff..4ad293bb66 100644 --- a/testing/ui-tests/Cargo.toml +++ b/testing/ui-tests/Cargo.toml @@ -11,7 +11,7 @@ publish = false [dev-dependencies] trybuild = "1.0.79" scale-info = { version = "2.5.0", features = ["bit-vec"] } -frame-metadata = "15.0.0" +frame-metadata = "15.1.0" codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "full", "bit-vec"] } subxt = { path = "../../subxt" } subxt-metadata = { path = "../../metadata" } From dd89dd6b3c13b492bc23e315e325e5a4efe37d52 Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Mon, 10 Apr 2023 16:35:57 +0300 Subject: [PATCH 02/66] Enable V15 unstable metadata in frame-metadata Signed-off-by: Alexandru Vasile --- cli/Cargo.toml | 2 +- codegen/Cargo.toml | 2 +- metadata/Cargo.toml | 2 +- subxt/Cargo.toml | 2 +- testing/integration-tests/Cargo.toml | 2 +- testing/ui-tests/Cargo.toml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 7f786cfaff..8ab5d9e48e 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -32,7 +32,7 @@ serde_json = "1.0.95" # hex encoded metadata to bytes hex = "0.4.3" # actual metadata types -frame-metadata = { version = "15.1.0", features = ["v14", "std"] } +frame-metadata = { version = "15.1.0", features = ["v14", "v15-unstable", "std"] } # decode bytes into the metadata types scale = { package = "parity-scale-codec", version = "3.0.0", default-features = false } # generate the item mod for codegen diff --git a/codegen/Cargo.toml b/codegen/Cargo.toml index af42bba052..cf5f4991d4 100644 --- a/codegen/Cargo.toml +++ b/codegen/Cargo.toml @@ -15,7 +15,7 @@ description = "Generate an API for interacting with a substrate node from FRAME [dependencies] codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "full"] } darling = "0.14.4" -frame-metadata = "15.1.0" +frame-metadata = { version = "15.1.0", features = ["v14", "v15-unstable", "std"] } heck = "0.4.1" proc-macro2 = "1.0.55" quote = "1.0.8" diff --git a/metadata/Cargo.toml b/metadata/Cargo.toml index 42ae5b2f60..a51d718d91 100644 --- a/metadata/Cargo.toml +++ b/metadata/Cargo.toml @@ -15,7 +15,7 @@ description = "Command line utilities for checking metadata compatibility betwee [dependencies] codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "full"] } -frame-metadata = "15.1.0" +frame-metadata = { version = "15.1.0", features = ["v14", "v15-unstable", "std"] } scale-info = "2.5.0" sp-core-hashing = "7.0.0" diff --git a/subxt/Cargo.toml b/subxt/Cargo.toml index b7ed700d26..07d3e2c814 100644 --- a/subxt/Cargo.toml +++ b/subxt/Cargo.toml @@ -49,7 +49,7 @@ serde_json = { version = "1.0.95", features = ["raw_value"] } thiserror = "1.0.40" tracing = "0.1.34" parking_lot = "0.12.0" -frame-metadata = "15.1.0" +frame-metadata = { version = "15.1.0", features = ["v14", "v15-unstable", "std"] } derivative = "2.2.0" either = "1.8.1" diff --git a/testing/integration-tests/Cargo.toml b/testing/integration-tests/Cargo.toml index 2edd905ef8..c70b76bbef 100644 --- a/testing/integration-tests/Cargo.toml +++ b/testing/integration-tests/Cargo.toml @@ -18,7 +18,7 @@ default = ["subxt/integration-tests"] [dev-dependencies] assert_matches = "1.5.0" codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "full", "bit-vec"] } -frame-metadata = "15.1.0" +frame-metadata = { version = "15.1.0", features = ["v14", "v15-unstable", "std"] } futures = "0.3.27" hex = "0.4.3" regex = "1.7.3" diff --git a/testing/ui-tests/Cargo.toml b/testing/ui-tests/Cargo.toml index 4ad293bb66..ce614e208b 100644 --- a/testing/ui-tests/Cargo.toml +++ b/testing/ui-tests/Cargo.toml @@ -11,7 +11,7 @@ publish = false [dev-dependencies] trybuild = "1.0.79" scale-info = { version = "2.5.0", features = ["bit-vec"] } -frame-metadata = "15.1.0" +frame-metadata = { version = "15.1.0", features = ["v14", "v15-unstable", "std"] } codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "full", "bit-vec"] } subxt = { path = "../../subxt" } subxt-metadata = { path = "../../metadata" } From 073aea90da204f7a64054813bfe057fb30b11139 Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Mon, 10 Apr 2023 16:41:38 +0300 Subject: [PATCH 03/66] metadata: Move validation hashing to dedicated file Signed-off-by: Alexandru Vasile --- metadata/src/lib.rs | 844 +----------------------------------- metadata/src/validation.rs | 845 +++++++++++++++++++++++++++++++++++++ 2 files changed, 850 insertions(+), 839 deletions(-) create mode 100644 metadata/src/validation.rs diff --git a/metadata/src/lib.rs b/metadata/src/lib.rs index d31ea9a92b..8867f7ed24 100644 --- a/metadata/src/lib.rs +++ b/metadata/src/lib.rs @@ -3,844 +3,10 @@ // see LICENSE for license details. mod retain; +mod validation; -use frame_metadata::{ - ExtrinsicMetadata, RuntimeMetadataV14, StorageEntryMetadata, StorageEntryType, -}; pub use retain::retain_metadata_pallets; -use scale_info::{form::PortableForm, Field, PortableRegistry, TypeDef, Variant}; -use std::collections::HashSet; - -/// Internal byte representation for various metadata types utilized for -/// generating deterministic hashes between different rust versions. -#[repr(u8)] -enum TypeBeingHashed { - Composite, - Variant, - Sequence, - Array, - Tuple, - Primitive, - Compact, - BitSequence, -} - -/// Hashing function utilized internally. -fn hash(data: &[u8]) -> [u8; 32] { - sp_core_hashing::twox_256(data) -} - -/// XOR two hashes together. If we have two pseudorandom hashes, then this will -/// lead to another pseudorandom value. If there is potentially some pattern to -/// the hashes we are xoring (eg we might be xoring the same hashes a few times), -/// prefer `hash_hashes` to give us stronger pseudorandomness guarantees. -fn xor(a: [u8; 32], b: [u8; 32]) -> [u8; 32] { - let mut out = [0u8; 32]; - for (idx, (a, b)) in a.into_iter().zip(b).enumerate() { - out[idx] = a ^ b; - } - out -} - -/// Combine two hashes or hash-like sets of bytes together into a single hash. -/// `xor` is OK for one-off combinations of bytes, but if we are merging -/// potentially identical hashes, this is a safer way to ensure the result is -/// unique. -fn hash_hashes(a: [u8; 32], b: [u8; 32]) -> [u8; 32] { - let mut out = [0u8; 32 * 2]; - for (idx, byte) in a.into_iter().chain(b).enumerate() { - out[idx] = byte; - } - hash(&out) -} - -/// Obtain the hash representation of a `scale_info::Field`. -fn get_field_hash( - registry: &PortableRegistry, - field: &Field, - visited_ids: &mut HashSet, -) -> [u8; 32] { - let mut bytes = get_type_hash(registry, field.ty.id, visited_ids); - - // XOR name and field name with the type hash if they exist - if let Some(name) = &field.name { - bytes = xor(bytes, hash(name.as_bytes())); - } - - bytes -} - -/// Obtain the hash representation of a `scale_info::Variant`. -fn get_variant_hash( - registry: &PortableRegistry, - var: &Variant, - visited_ids: &mut HashSet, -) -> [u8; 32] { - // Merge our hashes of the name and each field together using xor. - let mut bytes = hash(var.name.as_bytes()); - for field in &var.fields { - bytes = hash_hashes(bytes, get_field_hash(registry, field, visited_ids)) - } - - bytes -} - -/// Obtain the hash representation of a `scale_info::TypeDef`. -fn get_type_def_hash( - registry: &PortableRegistry, - ty_def: &TypeDef, - visited_ids: &mut HashSet, -) -> [u8; 32] { - match ty_def { - TypeDef::Composite(composite) => { - let mut bytes = hash(&[TypeBeingHashed::Composite as u8]); - for field in &composite.fields { - bytes = hash_hashes(bytes, get_field_hash(registry, field, visited_ids)); - } - bytes - } - TypeDef::Variant(variant) => { - let mut bytes = hash(&[TypeBeingHashed::Variant as u8]); - for var in &variant.variants { - bytes = hash_hashes(bytes, get_variant_hash(registry, var, visited_ids)); - } - bytes - } - TypeDef::Sequence(sequence) => { - let bytes = hash(&[TypeBeingHashed::Sequence as u8]); - xor( - bytes, - get_type_hash(registry, sequence.type_param.id, visited_ids), - ) - } - TypeDef::Array(array) => { - // Take length into account; different length must lead to different hash. - let len_bytes = array.len.to_be_bytes(); - let bytes = hash(&[ - TypeBeingHashed::Array as u8, - len_bytes[0], - len_bytes[1], - len_bytes[2], - len_bytes[3], - ]); - xor( - bytes, - get_type_hash(registry, array.type_param.id, visited_ids), - ) - } - TypeDef::Tuple(tuple) => { - let mut bytes = hash(&[TypeBeingHashed::Tuple as u8]); - for field in &tuple.fields { - bytes = hash_hashes(bytes, get_type_hash(registry, field.id, visited_ids)); - } - bytes - } - TypeDef::Primitive(primitive) => { - // Cloning the 'primitive' type should essentially be a copy. - hash(&[TypeBeingHashed::Primitive as u8, primitive.clone() as u8]) - } - TypeDef::Compact(compact) => { - let bytes = hash(&[TypeBeingHashed::Compact as u8]); - xor( - bytes, - get_type_hash(registry, compact.type_param.id, visited_ids), - ) - } - TypeDef::BitSequence(bitseq) => { - let mut bytes = hash(&[TypeBeingHashed::BitSequence as u8]); - bytes = xor( - bytes, - get_type_hash(registry, bitseq.bit_order_type.id, visited_ids), - ); - bytes = xor( - bytes, - get_type_hash(registry, bitseq.bit_store_type.id, visited_ids), - ); - bytes - } - } -} - -/// Obtain the hash representation of a `scale_info::Type` identified by id. -fn get_type_hash(registry: &PortableRegistry, id: u32, visited_ids: &mut HashSet) -> [u8; 32] { - // Guard against recursive types and return a fixed arbitrary hash - if !visited_ids.insert(id) { - return hash(&[123u8]); - } - - let ty = registry.resolve(id).unwrap(); - get_type_def_hash(registry, &ty.type_def, visited_ids) -} - -/// Obtain the hash representation of a `frame_metadata::ExtrinsicMetadata`. -fn get_extrinsic_hash( - registry: &PortableRegistry, - extrinsic: &ExtrinsicMetadata, -) -> [u8; 32] { - let mut visited_ids = HashSet::::new(); - - let mut bytes = get_type_hash(registry, extrinsic.ty.id, &mut visited_ids); - - bytes = xor(bytes, hash(&[extrinsic.version])); - for signed_extension in extrinsic.signed_extensions.iter() { - let mut ext_bytes = hash(signed_extension.identifier.as_bytes()); - ext_bytes = xor( - ext_bytes, - get_type_hash(registry, signed_extension.ty.id, &mut visited_ids), - ); - ext_bytes = xor( - ext_bytes, - get_type_hash( - registry, - signed_extension.additional_signed.id, - &mut visited_ids, - ), - ); - bytes = hash_hashes(bytes, ext_bytes); - } - - bytes -} - -/// Get the hash corresponding to a single storage entry. -fn get_storage_entry_hash( - registry: &PortableRegistry, - entry: &StorageEntryMetadata, - visited_ids: &mut HashSet, -) -> [u8; 32] { - let mut bytes = hash(entry.name.as_bytes()); - // Cloning 'entry.modifier' should essentially be a copy. - bytes = xor(bytes, hash(&[entry.modifier.clone() as u8])); - bytes = xor(bytes, hash(&entry.default)); - - match &entry.ty { - StorageEntryType::Plain(ty) => { - bytes = xor(bytes, get_type_hash(registry, ty.id, visited_ids)); - } - StorageEntryType::Map { - hashers, - key, - value, - } => { - for hasher in hashers { - // Cloning the hasher should essentially be a copy. - bytes = hash_hashes(bytes, [hasher.clone() as u8; 32]); - } - bytes = xor(bytes, get_type_hash(registry, key.id, visited_ids)); - bytes = xor(bytes, get_type_hash(registry, value.id, visited_ids)); - } - } - - bytes -} - -/// Obtain the hash for a specific storage item, or an error if it's not found. -pub fn get_storage_hash( - metadata: &RuntimeMetadataV14, - pallet_name: &str, - storage_name: &str, -) -> Result<[u8; 32], NotFound> { - let pallet = metadata - .pallets - .iter() - .find(|p| p.name == pallet_name) - .ok_or(NotFound::Pallet)?; - - let storage = pallet.storage.as_ref().ok_or(NotFound::Item)?; - - let entry = storage - .entries - .iter() - .find(|s| s.name == storage_name) - .ok_or(NotFound::Item)?; - - let hash = get_storage_entry_hash(&metadata.types, entry, &mut HashSet::new()); - Ok(hash) -} - -/// Obtain the hash for a specific constant, or an error if it's not found. -pub fn get_constant_hash( - metadata: &RuntimeMetadataV14, - pallet_name: &str, - constant_name: &str, -) -> Result<[u8; 32], NotFound> { - let pallet = metadata - .pallets - .iter() - .find(|p| p.name == pallet_name) - .ok_or(NotFound::Pallet)?; - - let constant = pallet - .constants - .iter() - .find(|c| c.name == constant_name) - .ok_or(NotFound::Item)?; - - // We only need to check that the type of the constant asked for matches. - let bytes = get_type_hash(&metadata.types, constant.ty.id, &mut HashSet::new()); - Ok(bytes) -} - -/// Obtain the hash for a specific call, or an error if it's not found. -pub fn get_call_hash( - metadata: &RuntimeMetadataV14, - pallet_name: &str, - call_name: &str, -) -> Result<[u8; 32], NotFound> { - let pallet = metadata - .pallets - .iter() - .find(|p| p.name == pallet_name) - .ok_or(NotFound::Pallet)?; - - let call_id = pallet.calls.as_ref().ok_or(NotFound::Item)?.ty.id; - - let call_ty = metadata.types.resolve(call_id).ok_or(NotFound::Item)?; - - let call_variants = match &call_ty.type_def { - TypeDef::Variant(variant) => &variant.variants, - _ => return Err(NotFound::Item), - }; - - let variant = call_variants - .iter() - .find(|v| v.name == call_name) - .ok_or(NotFound::Item)?; - - // hash the specific variant representing the call we are interested in. - let hash = get_variant_hash(&metadata.types, variant, &mut HashSet::new()); - Ok(hash) -} - -/// Obtain the hash representation of a `frame_metadata::PalletMetadata`. -pub fn get_pallet_hash( - registry: &PortableRegistry, - pallet: &frame_metadata::PalletMetadata, -) -> [u8; 32] { - // Begin with some arbitrary hash (we don't really care what it is). - let mut bytes = hash(&[19]); - let mut visited_ids = HashSet::::new(); - - if let Some(calls) = &pallet.calls { - bytes = xor( - bytes, - get_type_hash(registry, calls.ty.id, &mut visited_ids), - ); - } - if let Some(ref event) = pallet.event { - bytes = xor( - bytes, - get_type_hash(registry, event.ty.id, &mut visited_ids), - ); - } - for constant in pallet.constants.iter() { - bytes = xor(bytes, hash(constant.name.as_bytes())); - bytes = xor( - bytes, - get_type_hash(registry, constant.ty.id, &mut visited_ids), - ); - } - if let Some(ref error) = pallet.error { - bytes = xor( - bytes, - get_type_hash(registry, error.ty.id, &mut visited_ids), - ); - } - if let Some(ref storage) = pallet.storage { - bytes = xor(bytes, hash(storage.prefix.as_bytes())); - for entry in storage.entries.iter() { - bytes = hash_hashes( - bytes, - get_storage_entry_hash(registry, entry, &mut visited_ids), - ); - } - } - - bytes -} - -/// Obtain the hash representation of a `frame_metadata::RuntimeMetadataV14`. -pub fn get_metadata_hash(metadata: &RuntimeMetadataV14) -> [u8; 32] { - // Collect all pairs of (pallet name, pallet hash). - let mut pallets: Vec<(&str, [u8; 32])> = metadata - .pallets - .iter() - .map(|pallet| { - let hash = get_pallet_hash(&metadata.types, pallet); - (&*pallet.name, hash) - }) - .collect(); - - // Sort by pallet name to create a deterministic representation of the underlying metadata. - pallets.sort_by_key(|&(name, _hash)| name); - - // Note: pallet name is excluded from hashing. - // Each pallet has a hash of 32 bytes, and the vector is extended with - // extrinsic hash and metadata ty hash (2 * 32). - let mut bytes = Vec::with_capacity(pallets.len() * 32 + 64); - for (_, hash) in pallets.iter() { - bytes.extend(hash) - } - - bytes.extend(get_extrinsic_hash(&metadata.types, &metadata.extrinsic)); - - let mut visited_ids = HashSet::::new(); - bytes.extend(get_type_hash( - &metadata.types, - metadata.ty.id, - &mut visited_ids, - )); - - hash(&bytes) -} - -/// Obtain the hash representation of a `frame_metadata::RuntimeMetadataV14` -/// hashing only the provided pallets. -/// -/// **Note:** This is similar to `get_metadata_hash`, but performs hashing only of the provided -/// pallets if they exist. There are cases where the runtime metadata contains a subset of -/// the pallets from the static metadata. In those cases, the static API can communicate -/// properly with the subset of pallets from the runtime node. -pub fn get_metadata_per_pallet_hash>( - metadata: &RuntimeMetadataV14, - pallets: &[T], -) -> [u8; 32] { - // Collect all pairs of (pallet name, pallet hash). - let mut pallets_hashed: Vec<(&str, [u8; 32])> = metadata - .pallets - .iter() - .filter_map(|pallet| { - // Make sure to filter just the pallets we are interested in. - let in_pallet = pallets - .iter() - .any(|pallet_ref| pallet_ref.as_ref() == pallet.name); - if in_pallet { - let hash = get_pallet_hash(&metadata.types, pallet); - Some((&*pallet.name, hash)) - } else { - None - } - }) - .collect(); - - // Sort by pallet name to create a deterministic representation of the underlying metadata. - pallets_hashed.sort_by_key(|&(name, _hash)| name); - - // Note: pallet name is excluded from hashing. - // Each pallet has a hash of 32 bytes, and the vector is extended with - // extrinsic hash and metadata ty hash (2 * 32). - let mut bytes = Vec::with_capacity(pallets_hashed.len() * 32); - for (_, hash) in pallets_hashed.iter() { - bytes.extend(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. -#[derive(Clone, Debug)] -pub enum NotFound { - Pallet, - Item, -} - -#[cfg(test)] -mod tests { - use super::*; - use bitvec::{order::Lsb0, vec::BitVec}; - use frame_metadata::{ - ExtrinsicMetadata, PalletCallMetadata, PalletConstantMetadata, PalletErrorMetadata, - PalletEventMetadata, PalletMetadata, PalletStorageMetadata, RuntimeMetadataV14, - StorageEntryMetadata, StorageEntryModifier, - }; - use scale_info::meta_type; - - // Define recursive types. - #[allow(dead_code)] - #[derive(scale_info::TypeInfo)] - struct A { - pub b: Box, - } - #[allow(dead_code)] - #[derive(scale_info::TypeInfo)] - struct B { - pub a: Box, - } - - // Define TypeDef supported types. - #[allow(dead_code)] - #[derive(scale_info::TypeInfo)] - // TypeDef::Composite with TypeDef::Array with Typedef::Primitive. - struct AccountId32([u8; 32]); - #[allow(dead_code)] - #[derive(scale_info::TypeInfo)] - // TypeDef::Variant. - enum DigestItem { - PreRuntime( - // TypeDef::Array with primitive. - [::core::primitive::u8; 4usize], - // TypeDef::Sequence. - ::std::vec::Vec<::core::primitive::u8>, - ), - Other(::std::vec::Vec<::core::primitive::u8>), - // Nested TypeDef::Tuple. - RuntimeEnvironmentUpdated(((i8, i16), (u32, u64))), - // TypeDef::Compact. - Index(#[codec(compact)] ::core::primitive::u8), - // TypeDef::BitSequence. - BitSeq(BitVec), - } - #[allow(dead_code)] - #[derive(scale_info::TypeInfo)] - // Ensure recursive types and TypeDef variants are captured. - struct MetadataTestType { - recursive: A, - composite: AccountId32, - type_def: DigestItem, - } - #[allow(dead_code)] - #[derive(scale_info::TypeInfo)] - // Simulate a PalletCallMetadata. - enum Call { - #[codec(index = 0)] - FillBlock { ratio: AccountId32 }, - #[codec(index = 1)] - Remark { remark: DigestItem }, - } - - fn build_default_extrinsic() -> ExtrinsicMetadata { - ExtrinsicMetadata { - ty: meta_type::<()>(), - version: 0, - signed_extensions: vec![], - } - } - - fn default_pallet() -> PalletMetadata { - PalletMetadata { - name: "Test", - storage: None, - calls: None, - event: None, - constants: vec![], - error: None, - index: 0, - } - } - - fn build_default_pallets() -> Vec { - vec![ - PalletMetadata { - name: "First", - calls: Some(PalletCallMetadata { - ty: meta_type::(), - }), - ..default_pallet() - }, - PalletMetadata { - name: "Second", - index: 1, - calls: Some(PalletCallMetadata { - ty: meta_type::<(DigestItem, AccountId32, A)>(), - }), - ..default_pallet() - }, - ] - } - - fn pallets_to_metadata(pallets: Vec) -> RuntimeMetadataV14 { - RuntimeMetadataV14::new(pallets, build_default_extrinsic(), meta_type::<()>()) - } - - #[test] - fn different_pallet_index() { - let pallets = build_default_pallets(); - let mut pallets_swap = pallets.clone(); - - let metadata = pallets_to_metadata(pallets); - - // Change the order in which pallets are registered. - pallets_swap.swap(0, 1); - pallets_swap[0].index = 0; - pallets_swap[1].index = 1; - let metadata_swap = pallets_to_metadata(pallets_swap); - - let hash = get_metadata_hash(&metadata); - let hash_swap = get_metadata_hash(&metadata_swap); - - // Changing pallet order must still result in a deterministic unique hash. - assert_eq!(hash, hash_swap); - } - - #[test] - fn recursive_type() { - let mut pallet = default_pallet(); - pallet.calls = Some(PalletCallMetadata { - ty: meta_type::(), - }); - let metadata = pallets_to_metadata(vec![pallet]); - - // Check hashing algorithm finishes on a recursive type. - get_metadata_hash(&metadata); - } - - #[test] - /// Ensure correctness of hashing when parsing the `metadata.types`. - /// - /// Having a recursive structure `A: { B }` and `B: { A }` registered in different order - /// `types: { { id: 0, A }, { id: 1, B } }` and `types: { { id: 0, B }, { id: 1, A } }` - /// must produce the same deterministic hashing value. - fn recursive_types_different_order() { - let mut pallets = build_default_pallets(); - pallets[0].calls = Some(PalletCallMetadata { - ty: meta_type::(), - }); - pallets[1].calls = Some(PalletCallMetadata { - ty: meta_type::(), - }); - pallets[1].index = 1; - let mut pallets_swap = pallets.clone(); - let metadata = pallets_to_metadata(pallets); - - pallets_swap.swap(0, 1); - pallets_swap[0].index = 0; - pallets_swap[1].index = 1; - let metadata_swap = pallets_to_metadata(pallets_swap); - - let hash = get_metadata_hash(&metadata); - let hash_swap = get_metadata_hash(&metadata_swap); - - // Changing pallet order must still result in a deterministic unique hash. - assert_eq!(hash, hash_swap); - } - - #[test] - fn pallet_hash_correctness() { - let compare_pallets_hash = |lhs: &PalletMetadata, rhs: &PalletMetadata| { - let metadata = pallets_to_metadata(vec![lhs.clone()]); - let hash = get_metadata_hash(&metadata); - - let metadata = pallets_to_metadata(vec![rhs.clone()]); - let new_hash = get_metadata_hash(&metadata); - - assert_ne!(hash, new_hash); - }; - - // Build metadata progressively from an empty pallet to a fully populated pallet. - let mut pallet = default_pallet(); - let pallet_lhs = pallet.clone(); - pallet.storage = Some(PalletStorageMetadata { - prefix: "Storage", - entries: vec![StorageEntryMetadata { - name: "BlockWeight", - modifier: StorageEntryModifier::Default, - ty: StorageEntryType::Plain(meta_type::()), - default: vec![], - docs: vec![], - }], - }); - compare_pallets_hash(&pallet_lhs, &pallet); - - let pallet_lhs = pallet.clone(); - // Calls are similar to: - // - // ``` - // pub enum Call { - // call_name_01 { arg01: type }, - // call_name_02 { arg01: type, arg02: type } - // } - // ``` - pallet.calls = Some(PalletCallMetadata { - ty: meta_type::(), - }); - compare_pallets_hash(&pallet_lhs, &pallet); - - let pallet_lhs = pallet.clone(); - // Events are similar to Calls. - pallet.event = Some(PalletEventMetadata { - ty: meta_type::(), - }); - compare_pallets_hash(&pallet_lhs, &pallet); - - let pallet_lhs = pallet.clone(); - pallet.constants = vec![PalletConstantMetadata { - name: "BlockHashCount", - ty: meta_type::(), - value: vec![96u8, 0, 0, 0], - docs: vec![], - }]; - compare_pallets_hash(&pallet_lhs, &pallet); - - let pallet_lhs = pallet.clone(); - pallet.error = Some(PalletErrorMetadata { - ty: meta_type::(), - }); - compare_pallets_hash(&pallet_lhs, &pallet); - } - - #[test] - fn metadata_per_pallet_hash_correctness() { - let pallets = build_default_pallets(); - - // Build metadata with just the first pallet. - let metadata_one = pallets_to_metadata(vec![pallets[0].clone()]); - // Build metadata with both pallets. - let metadata_both = pallets_to_metadata(pallets); - - // Hashing will ignore any non-existant pallet and return the same result. - let hash = get_metadata_per_pallet_hash(&metadata_one, &["First", "Second"]); - let hash_rhs = get_metadata_per_pallet_hash(&metadata_one, &["First"]); - assert_eq!(hash, hash_rhs, "hashing should ignore non-existant pallets"); - - // Hashing one pallet from metadata with 2 pallets inserted will ignore the second pallet. - let hash_second = get_metadata_per_pallet_hash(&metadata_both, &["First"]); - assert_eq!( - hash_second, hash, - "hashing one pallet should ignore the others" - ); - - // Check hashing with all pallets. - let hash_second = get_metadata_per_pallet_hash(&metadata_both, &["First", "Second"]); - assert_ne!( - hash_second, hash, - "hashing both pallets should produce a different result from hashing just one pallet" - ); - } - - #[test] - fn field_semantic_changes() { - // Get a hash representation of the provided meta type, - // inserted in the context of pallet metadata call. - let to_hash = |meta_ty| { - let pallet = PalletMetadata { - calls: Some(PalletCallMetadata { ty: meta_ty }), - ..default_pallet() - }; - let metadata = pallets_to_metadata(vec![pallet]); - get_metadata_hash(&metadata) - }; - - #[allow(dead_code)] - #[derive(scale_info::TypeInfo)] - enum EnumFieldNotNamedA { - First(u8), - } - #[allow(dead_code)] - #[derive(scale_info::TypeInfo)] - enum EnumFieldNotNamedB { - First(u8), - } - // Semantic changes apply only to field names. - // This is considered to be a good tradeoff in hashing performance, as refactoring - // a structure / enum 's name is less likely to cause a breaking change. - // Even if the enums have different names, 'EnumFieldNotNamedA' and 'EnumFieldNotNamedB', - // they are equal in meaning (i.e, both contain `First(u8)`). - assert_eq!( - to_hash(meta_type::()), - to_hash(meta_type::()) - ); - - #[allow(dead_code)] - #[derive(scale_info::TypeInfo)] - struct StructFieldNotNamedA([u8; 32]); - #[allow(dead_code)] - #[derive(scale_info::TypeInfo)] - struct StructFieldNotNamedSecondB([u8; 32]); - // Similarly to enums, semantic changes apply only inside the structure fields. - assert_eq!( - to_hash(meta_type::()), - to_hash(meta_type::()) - ); - - #[allow(dead_code)] - #[derive(scale_info::TypeInfo)] - enum EnumFieldNotNamed { - First(u8), - } - #[allow(dead_code)] - #[derive(scale_info::TypeInfo)] - enum EnumFieldNotNamedSecond { - Second(u8), - } - // The enums are binary compatible, they contain a different semantic meaning: - // `First(u8)` and `Second(u8)`. - assert_ne!( - to_hash(meta_type::()), - to_hash(meta_type::()) - ); - - #[allow(dead_code)] - #[derive(scale_info::TypeInfo)] - enum EnumFieldNamed { - First { a: u8 }, - } - #[allow(dead_code)] - #[derive(scale_info::TypeInfo)] - enum EnumFieldNamedSecond { - First { b: u8 }, - } - // Named fields contain a different semantic meaning ('a' and 'b'). - assert_ne!( - to_hash(meta_type::()), - to_hash(meta_type::()) - ); - - #[allow(dead_code)] - #[derive(scale_info::TypeInfo)] - struct StructFieldNamed { - a: u32, - } - #[allow(dead_code)] - #[derive(scale_info::TypeInfo)] - struct StructFieldNamedSecond { - b: u32, - } - // Similar to enums, struct fields contain a different semantic meaning ('a' and 'b'). - assert_ne!( - to_hash(meta_type::()), - to_hash(meta_type::()) - ); - - #[allow(dead_code)] - #[derive(scale_info::TypeInfo)] - enum EnumField { - First, - // Field is unnamed, but has type name `u8`. - Second(u8), - // File is named and has type name `u8`. - Third { named: u8 }, - } - - #[allow(dead_code)] - #[derive(scale_info::TypeInfo)] - enum EnumFieldSwap { - Second(u8), - First, - Third { named: u8 }, - } - // Swapping the registration order should also be taken into account. - assert_ne!( - to_hash(meta_type::()), - to_hash(meta_type::()) - ); - - #[allow(dead_code)] - #[derive(scale_info::TypeInfo)] - struct StructField { - a: u32, - b: u32, - } - - #[allow(dead_code)] - #[derive(scale_info::TypeInfo)] - struct StructFieldSwap { - b: u32, - a: u32, - } - assert_ne!( - to_hash(meta_type::()), - to_hash(meta_type::()) - ); - } -} +pub use validation::{ + get_call_hash, get_constant_hash, get_metadata_hash, get_metadata_per_pallet_hash, + get_pallet_hash, get_storage_hash, NotFound, +}; diff --git a/metadata/src/validation.rs b/metadata/src/validation.rs new file mode 100644 index 0000000000..426301ddcd --- /dev/null +++ b/metadata/src/validation.rs @@ -0,0 +1,845 @@ +// 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. + +//! Utility functions for metadata validation. + +use frame_metadata::{ + ExtrinsicMetadata, RuntimeMetadataV14, StorageEntryMetadata, StorageEntryType, +}; +use scale_info::{form::PortableForm, Field, PortableRegistry, TypeDef, Variant}; +use std::collections::HashSet; + +/// Internal byte representation for various metadata types utilized for +/// generating deterministic hashes between different rust versions. +#[repr(u8)] +enum TypeBeingHashed { + Composite, + Variant, + Sequence, + Array, + Tuple, + Primitive, + Compact, + BitSequence, +} + +/// Hashing function utilized internally. +fn hash(data: &[u8]) -> [u8; 32] { + sp_core_hashing::twox_256(data) +} + +/// XOR two hashes together. If we have two pseudorandom hashes, then this will +/// lead to another pseudorandom value. If there is potentially some pattern to +/// the hashes we are xoring (eg we might be xoring the same hashes a few times), +/// prefer `hash_hashes` to give us stronger pseudorandomness guarantees. +fn xor(a: [u8; 32], b: [u8; 32]) -> [u8; 32] { + let mut out = [0u8; 32]; + for (idx, (a, b)) in a.into_iter().zip(b).enumerate() { + out[idx] = a ^ b; + } + out +} + +/// Combine two hashes or hash-like sets of bytes together into a single hash. +/// `xor` is OK for one-off combinations of bytes, but if we are merging +/// potentially identical hashes, this is a safer way to ensure the result is +/// unique. +fn hash_hashes(a: [u8; 32], b: [u8; 32]) -> [u8; 32] { + let mut out = [0u8; 32 * 2]; + for (idx, byte) in a.into_iter().chain(b).enumerate() { + out[idx] = byte; + } + hash(&out) +} + +/// Obtain the hash representation of a `scale_info::Field`. +fn get_field_hash( + registry: &PortableRegistry, + field: &Field, + visited_ids: &mut HashSet, +) -> [u8; 32] { + let mut bytes = get_type_hash(registry, field.ty.id, visited_ids); + + // XOR name and field name with the type hash if they exist + if let Some(name) = &field.name { + bytes = xor(bytes, hash(name.as_bytes())); + } + + bytes +} + +/// Obtain the hash representation of a `scale_info::Variant`. +fn get_variant_hash( + registry: &PortableRegistry, + var: &Variant, + visited_ids: &mut HashSet, +) -> [u8; 32] { + // Merge our hashes of the name and each field together using xor. + let mut bytes = hash(var.name.as_bytes()); + for field in &var.fields { + bytes = hash_hashes(bytes, get_field_hash(registry, field, visited_ids)) + } + + bytes +} + +/// Obtain the hash representation of a `scale_info::TypeDef`. +fn get_type_def_hash( + registry: &PortableRegistry, + ty_def: &TypeDef, + visited_ids: &mut HashSet, +) -> [u8; 32] { + match ty_def { + TypeDef::Composite(composite) => { + let mut bytes = hash(&[TypeBeingHashed::Composite as u8]); + for field in &composite.fields { + bytes = hash_hashes(bytes, get_field_hash(registry, field, visited_ids)); + } + bytes + } + TypeDef::Variant(variant) => { + let mut bytes = hash(&[TypeBeingHashed::Variant as u8]); + for var in &variant.variants { + bytes = hash_hashes(bytes, get_variant_hash(registry, var, visited_ids)); + } + bytes + } + TypeDef::Sequence(sequence) => { + let bytes = hash(&[TypeBeingHashed::Sequence as u8]); + xor( + bytes, + get_type_hash(registry, sequence.type_param.id, visited_ids), + ) + } + TypeDef::Array(array) => { + // Take length into account; different length must lead to different hash. + let len_bytes = array.len.to_be_bytes(); + let bytes = hash(&[ + TypeBeingHashed::Array as u8, + len_bytes[0], + len_bytes[1], + len_bytes[2], + len_bytes[3], + ]); + xor( + bytes, + get_type_hash(registry, array.type_param.id, visited_ids), + ) + } + TypeDef::Tuple(tuple) => { + let mut bytes = hash(&[TypeBeingHashed::Tuple as u8]); + for field in &tuple.fields { + bytes = hash_hashes(bytes, get_type_hash(registry, field.id, visited_ids)); + } + bytes + } + TypeDef::Primitive(primitive) => { + // Cloning the 'primitive' type should essentially be a copy. + hash(&[TypeBeingHashed::Primitive as u8, primitive.clone() as u8]) + } + TypeDef::Compact(compact) => { + let bytes = hash(&[TypeBeingHashed::Compact as u8]); + xor( + bytes, + get_type_hash(registry, compact.type_param.id, visited_ids), + ) + } + TypeDef::BitSequence(bitseq) => { + let mut bytes = hash(&[TypeBeingHashed::BitSequence as u8]); + bytes = xor( + bytes, + get_type_hash(registry, bitseq.bit_order_type.id, visited_ids), + ); + bytes = xor( + bytes, + get_type_hash(registry, bitseq.bit_store_type.id, visited_ids), + ); + bytes + } + } +} + +/// Obtain the hash representation of a `scale_info::Type` identified by id. +fn get_type_hash(registry: &PortableRegistry, id: u32, visited_ids: &mut HashSet) -> [u8; 32] { + // Guard against recursive types and return a fixed arbitrary hash + if !visited_ids.insert(id) { + return hash(&[123u8]); + } + + let ty = registry.resolve(id).unwrap(); + get_type_def_hash(registry, &ty.type_def, visited_ids) +} + +/// Obtain the hash representation of a `frame_metadata::ExtrinsicMetadata`. +fn get_extrinsic_hash( + registry: &PortableRegistry, + extrinsic: &ExtrinsicMetadata, +) -> [u8; 32] { + let mut visited_ids = HashSet::::new(); + + let mut bytes = get_type_hash(registry, extrinsic.ty.id, &mut visited_ids); + + bytes = xor(bytes, hash(&[extrinsic.version])); + for signed_extension in extrinsic.signed_extensions.iter() { + let mut ext_bytes = hash(signed_extension.identifier.as_bytes()); + ext_bytes = xor( + ext_bytes, + get_type_hash(registry, signed_extension.ty.id, &mut visited_ids), + ); + ext_bytes = xor( + ext_bytes, + get_type_hash( + registry, + signed_extension.additional_signed.id, + &mut visited_ids, + ), + ); + bytes = hash_hashes(bytes, ext_bytes); + } + + bytes +} + +/// Get the hash corresponding to a single storage entry. +fn get_storage_entry_hash( + registry: &PortableRegistry, + entry: &StorageEntryMetadata, + visited_ids: &mut HashSet, +) -> [u8; 32] { + let mut bytes = hash(entry.name.as_bytes()); + // Cloning 'entry.modifier' should essentially be a copy. + bytes = xor(bytes, hash(&[entry.modifier.clone() as u8])); + bytes = xor(bytes, hash(&entry.default)); + + match &entry.ty { + StorageEntryType::Plain(ty) => { + bytes = xor(bytes, get_type_hash(registry, ty.id, visited_ids)); + } + StorageEntryType::Map { + hashers, + key, + value, + } => { + for hasher in hashers { + // Cloning the hasher should essentially be a copy. + bytes = hash_hashes(bytes, [hasher.clone() as u8; 32]); + } + bytes = xor(bytes, get_type_hash(registry, key.id, visited_ids)); + bytes = xor(bytes, get_type_hash(registry, value.id, visited_ids)); + } + } + + bytes +} + +/// Obtain the hash for a specific storage item, or an error if it's not found. +pub fn get_storage_hash( + metadata: &RuntimeMetadataV14, + pallet_name: &str, + storage_name: &str, +) -> Result<[u8; 32], NotFound> { + let pallet = metadata + .pallets + .iter() + .find(|p| p.name == pallet_name) + .ok_or(NotFound::Pallet)?; + + let storage = pallet.storage.as_ref().ok_or(NotFound::Item)?; + + let entry = storage + .entries + .iter() + .find(|s| s.name == storage_name) + .ok_or(NotFound::Item)?; + + let hash = get_storage_entry_hash(&metadata.types, entry, &mut HashSet::new()); + Ok(hash) +} + +/// Obtain the hash for a specific constant, or an error if it's not found. +pub fn get_constant_hash( + metadata: &RuntimeMetadataV14, + pallet_name: &str, + constant_name: &str, +) -> Result<[u8; 32], NotFound> { + let pallet = metadata + .pallets + .iter() + .find(|p| p.name == pallet_name) + .ok_or(NotFound::Pallet)?; + + let constant = pallet + .constants + .iter() + .find(|c| c.name == constant_name) + .ok_or(NotFound::Item)?; + + // We only need to check that the type of the constant asked for matches. + let bytes = get_type_hash(&metadata.types, constant.ty.id, &mut HashSet::new()); + Ok(bytes) +} + +/// Obtain the hash for a specific call, or an error if it's not found. +pub fn get_call_hash( + metadata: &RuntimeMetadataV14, + pallet_name: &str, + call_name: &str, +) -> Result<[u8; 32], NotFound> { + let pallet = metadata + .pallets + .iter() + .find(|p| p.name == pallet_name) + .ok_or(NotFound::Pallet)?; + + let call_id = pallet.calls.as_ref().ok_or(NotFound::Item)?.ty.id; + + let call_ty = metadata.types.resolve(call_id).ok_or(NotFound::Item)?; + + let call_variants = match &call_ty.type_def { + TypeDef::Variant(variant) => &variant.variants, + _ => return Err(NotFound::Item), + }; + + let variant = call_variants + .iter() + .find(|v| v.name == call_name) + .ok_or(NotFound::Item)?; + + // hash the specific variant representing the call we are interested in. + let hash = get_variant_hash(&metadata.types, variant, &mut HashSet::new()); + Ok(hash) +} + +/// Obtain the hash representation of a `frame_metadata::PalletMetadata`. +pub fn get_pallet_hash( + registry: &PortableRegistry, + pallet: &frame_metadata::PalletMetadata, +) -> [u8; 32] { + // Begin with some arbitrary hash (we don't really care what it is). + let mut bytes = hash(&[19]); + let mut visited_ids = HashSet::::new(); + + if let Some(calls) = &pallet.calls { + bytes = xor( + bytes, + get_type_hash(registry, calls.ty.id, &mut visited_ids), + ); + } + if let Some(ref event) = pallet.event { + bytes = xor( + bytes, + get_type_hash(registry, event.ty.id, &mut visited_ids), + ); + } + for constant in pallet.constants.iter() { + bytes = xor(bytes, hash(constant.name.as_bytes())); + bytes = xor( + bytes, + get_type_hash(registry, constant.ty.id, &mut visited_ids), + ); + } + if let Some(ref error) = pallet.error { + bytes = xor( + bytes, + get_type_hash(registry, error.ty.id, &mut visited_ids), + ); + } + if let Some(ref storage) = pallet.storage { + bytes = xor(bytes, hash(storage.prefix.as_bytes())); + for entry in storage.entries.iter() { + bytes = hash_hashes( + bytes, + get_storage_entry_hash(registry, entry, &mut visited_ids), + ); + } + } + + bytes +} + +/// Obtain the hash representation of a `frame_metadata::RuntimeMetadataV14`. +pub fn get_metadata_hash(metadata: &RuntimeMetadataV14) -> [u8; 32] { + // Collect all pairs of (pallet name, pallet hash). + let mut pallets: Vec<(&str, [u8; 32])> = metadata + .pallets + .iter() + .map(|pallet| { + let hash = get_pallet_hash(&metadata.types, pallet); + (&*pallet.name, hash) + }) + .collect(); + + // Sort by pallet name to create a deterministic representation of the underlying metadata. + pallets.sort_by_key(|&(name, _hash)| name); + + // Note: pallet name is excluded from hashing. + // Each pallet has a hash of 32 bytes, and the vector is extended with + // extrinsic hash and metadata ty hash (2 * 32). + let mut bytes = Vec::with_capacity(pallets.len() * 32 + 64); + for (_, hash) in pallets.iter() { + bytes.extend(hash) + } + + bytes.extend(get_extrinsic_hash(&metadata.types, &metadata.extrinsic)); + + let mut visited_ids = HashSet::::new(); + bytes.extend(get_type_hash( + &metadata.types, + metadata.ty.id, + &mut visited_ids, + )); + + hash(&bytes) +} + +/// Obtain the hash representation of a `frame_metadata::RuntimeMetadataV14` +/// hashing only the provided pallets. +/// +/// **Note:** This is similar to `get_metadata_hash`, but performs hashing only of the provided +/// pallets if they exist. There are cases where the runtime metadata contains a subset of +/// the pallets from the static metadata. In those cases, the static API can communicate +/// properly with the subset of pallets from the runtime node. +pub fn get_metadata_per_pallet_hash>( + metadata: &RuntimeMetadataV14, + pallets: &[T], +) -> [u8; 32] { + // Collect all pairs of (pallet name, pallet hash). + let mut pallets_hashed: Vec<(&str, [u8; 32])> = metadata + .pallets + .iter() + .filter_map(|pallet| { + // Make sure to filter just the pallets we are interested in. + let in_pallet = pallets + .iter() + .any(|pallet_ref| pallet_ref.as_ref() == pallet.name); + if in_pallet { + let hash = get_pallet_hash(&metadata.types, pallet); + Some((&*pallet.name, hash)) + } else { + None + } + }) + .collect(); + + // Sort by pallet name to create a deterministic representation of the underlying metadata. + pallets_hashed.sort_by_key(|&(name, _hash)| name); + + // Note: pallet name is excluded from hashing. + // Each pallet has a hash of 32 bytes, and the vector is extended with + // extrinsic hash and metadata ty hash (2 * 32). + let mut bytes = Vec::with_capacity(pallets_hashed.len() * 32); + for (_, hash) in pallets_hashed.iter() { + bytes.extend(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. +#[derive(Clone, Debug)] +pub enum NotFound { + Pallet, + Item, +} + +#[cfg(test)] +mod tests { + use super::*; + use bitvec::{order::Lsb0, vec::BitVec}; + use frame_metadata::{ + ExtrinsicMetadata, PalletCallMetadata, PalletConstantMetadata, PalletErrorMetadata, + PalletEventMetadata, PalletMetadata, PalletStorageMetadata, RuntimeMetadataV14, + StorageEntryMetadata, StorageEntryModifier, + }; + use scale_info::meta_type; + + // Define recursive types. + #[allow(dead_code)] + #[derive(scale_info::TypeInfo)] + struct A { + pub b: Box, + } + #[allow(dead_code)] + #[derive(scale_info::TypeInfo)] + struct B { + pub a: Box, + } + + // Define TypeDef supported types. + #[allow(dead_code)] + #[derive(scale_info::TypeInfo)] + // TypeDef::Composite with TypeDef::Array with Typedef::Primitive. + struct AccountId32([u8; 32]); + #[allow(dead_code)] + #[derive(scale_info::TypeInfo)] + // TypeDef::Variant. + enum DigestItem { + PreRuntime( + // TypeDef::Array with primitive. + [::core::primitive::u8; 4usize], + // TypeDef::Sequence. + ::std::vec::Vec<::core::primitive::u8>, + ), + Other(::std::vec::Vec<::core::primitive::u8>), + // Nested TypeDef::Tuple. + RuntimeEnvironmentUpdated(((i8, i16), (u32, u64))), + // TypeDef::Compact. + Index(#[codec(compact)] ::core::primitive::u8), + // TypeDef::BitSequence. + BitSeq(BitVec), + } + #[allow(dead_code)] + #[derive(scale_info::TypeInfo)] + // Ensure recursive types and TypeDef variants are captured. + struct MetadataTestType { + recursive: A, + composite: AccountId32, + type_def: DigestItem, + } + #[allow(dead_code)] + #[derive(scale_info::TypeInfo)] + // Simulate a PalletCallMetadata. + enum Call { + #[codec(index = 0)] + FillBlock { ratio: AccountId32 }, + #[codec(index = 1)] + Remark { remark: DigestItem }, + } + + fn build_default_extrinsic() -> ExtrinsicMetadata { + ExtrinsicMetadata { + ty: meta_type::<()>(), + version: 0, + signed_extensions: vec![], + } + } + + fn default_pallet() -> PalletMetadata { + PalletMetadata { + name: "Test", + storage: None, + calls: None, + event: None, + constants: vec![], + error: None, + index: 0, + } + } + + fn build_default_pallets() -> Vec { + vec![ + PalletMetadata { + name: "First", + calls: Some(PalletCallMetadata { + ty: meta_type::(), + }), + ..default_pallet() + }, + PalletMetadata { + name: "Second", + index: 1, + calls: Some(PalletCallMetadata { + ty: meta_type::<(DigestItem, AccountId32, A)>(), + }), + ..default_pallet() + }, + ] + } + + fn pallets_to_metadata(pallets: Vec) -> RuntimeMetadataV14 { + RuntimeMetadataV14::new(pallets, build_default_extrinsic(), meta_type::<()>()) + } + + #[test] + fn different_pallet_index() { + let pallets = build_default_pallets(); + let mut pallets_swap = pallets.clone(); + + let metadata = pallets_to_metadata(pallets); + + // Change the order in which pallets are registered. + pallets_swap.swap(0, 1); + pallets_swap[0].index = 0; + pallets_swap[1].index = 1; + let metadata_swap = pallets_to_metadata(pallets_swap); + + let hash = get_metadata_hash(&metadata); + let hash_swap = get_metadata_hash(&metadata_swap); + + // Changing pallet order must still result in a deterministic unique hash. + assert_eq!(hash, hash_swap); + } + + #[test] + fn recursive_type() { + let mut pallet = default_pallet(); + pallet.calls = Some(PalletCallMetadata { + ty: meta_type::(), + }); + let metadata = pallets_to_metadata(vec![pallet]); + + // Check hashing algorithm finishes on a recursive type. + get_metadata_hash(&metadata); + } + + #[test] + /// Ensure correctness of hashing when parsing the `metadata.types`. + /// + /// Having a recursive structure `A: { B }` and `B: { A }` registered in different order + /// `types: { { id: 0, A }, { id: 1, B } }` and `types: { { id: 0, B }, { id: 1, A } }` + /// must produce the same deterministic hashing value. + fn recursive_types_different_order() { + let mut pallets = build_default_pallets(); + pallets[0].calls = Some(PalletCallMetadata { + ty: meta_type::(), + }); + pallets[1].calls = Some(PalletCallMetadata { + ty: meta_type::(), + }); + pallets[1].index = 1; + let mut pallets_swap = pallets.clone(); + let metadata = pallets_to_metadata(pallets); + + pallets_swap.swap(0, 1); + pallets_swap[0].index = 0; + pallets_swap[1].index = 1; + let metadata_swap = pallets_to_metadata(pallets_swap); + + let hash = get_metadata_hash(&metadata); + let hash_swap = get_metadata_hash(&metadata_swap); + + // Changing pallet order must still result in a deterministic unique hash. + assert_eq!(hash, hash_swap); + } + + #[test] + fn pallet_hash_correctness() { + let compare_pallets_hash = |lhs: &PalletMetadata, rhs: &PalletMetadata| { + let metadata = pallets_to_metadata(vec![lhs.clone()]); + let hash = get_metadata_hash(&metadata); + + let metadata = pallets_to_metadata(vec![rhs.clone()]); + let new_hash = get_metadata_hash(&metadata); + + assert_ne!(hash, new_hash); + }; + + // Build metadata progressively from an empty pallet to a fully populated pallet. + let mut pallet = default_pallet(); + let pallet_lhs = pallet.clone(); + pallet.storage = Some(PalletStorageMetadata { + prefix: "Storage", + entries: vec![StorageEntryMetadata { + name: "BlockWeight", + modifier: StorageEntryModifier::Default, + ty: StorageEntryType::Plain(meta_type::()), + default: vec![], + docs: vec![], + }], + }); + compare_pallets_hash(&pallet_lhs, &pallet); + + let pallet_lhs = pallet.clone(); + // Calls are similar to: + // + // ``` + // pub enum Call { + // call_name_01 { arg01: type }, + // call_name_02 { arg01: type, arg02: type } + // } + // ``` + pallet.calls = Some(PalletCallMetadata { + ty: meta_type::(), + }); + compare_pallets_hash(&pallet_lhs, &pallet); + + let pallet_lhs = pallet.clone(); + // Events are similar to Calls. + pallet.event = Some(PalletEventMetadata { + ty: meta_type::(), + }); + compare_pallets_hash(&pallet_lhs, &pallet); + + let pallet_lhs = pallet.clone(); + pallet.constants = vec![PalletConstantMetadata { + name: "BlockHashCount", + ty: meta_type::(), + value: vec![96u8, 0, 0, 0], + docs: vec![], + }]; + compare_pallets_hash(&pallet_lhs, &pallet); + + let pallet_lhs = pallet.clone(); + pallet.error = Some(PalletErrorMetadata { + ty: meta_type::(), + }); + compare_pallets_hash(&pallet_lhs, &pallet); + } + + #[test] + fn metadata_per_pallet_hash_correctness() { + let pallets = build_default_pallets(); + + // Build metadata with just the first pallet. + let metadata_one = pallets_to_metadata(vec![pallets[0].clone()]); + // Build metadata with both pallets. + let metadata_both = pallets_to_metadata(pallets); + + // Hashing will ignore any non-existant pallet and return the same result. + let hash = get_metadata_per_pallet_hash(&metadata_one, &["First", "Second"]); + let hash_rhs = get_metadata_per_pallet_hash(&metadata_one, &["First"]); + assert_eq!(hash, hash_rhs, "hashing should ignore non-existant pallets"); + + // Hashing one pallet from metadata with 2 pallets inserted will ignore the second pallet. + let hash_second = get_metadata_per_pallet_hash(&metadata_both, &["First"]); + assert_eq!( + hash_second, hash, + "hashing one pallet should ignore the others" + ); + + // Check hashing with all pallets. + let hash_second = get_metadata_per_pallet_hash(&metadata_both, &["First", "Second"]); + assert_ne!( + hash_second, hash, + "hashing both pallets should produce a different result from hashing just one pallet" + ); + } + + #[test] + fn field_semantic_changes() { + // Get a hash representation of the provided meta type, + // inserted in the context of pallet metadata call. + let to_hash = |meta_ty| { + let pallet = PalletMetadata { + calls: Some(PalletCallMetadata { ty: meta_ty }), + ..default_pallet() + }; + let metadata = pallets_to_metadata(vec![pallet]); + get_metadata_hash(&metadata) + }; + + #[allow(dead_code)] + #[derive(scale_info::TypeInfo)] + enum EnumFieldNotNamedA { + First(u8), + } + #[allow(dead_code)] + #[derive(scale_info::TypeInfo)] + enum EnumFieldNotNamedB { + First(u8), + } + // Semantic changes apply only to field names. + // This is considered to be a good tradeoff in hashing performance, as refactoring + // a structure / enum 's name is less likely to cause a breaking change. + // Even if the enums have different names, 'EnumFieldNotNamedA' and 'EnumFieldNotNamedB', + // they are equal in meaning (i.e, both contain `First(u8)`). + assert_eq!( + to_hash(meta_type::()), + to_hash(meta_type::()) + ); + + #[allow(dead_code)] + #[derive(scale_info::TypeInfo)] + struct StructFieldNotNamedA([u8; 32]); + #[allow(dead_code)] + #[derive(scale_info::TypeInfo)] + struct StructFieldNotNamedSecondB([u8; 32]); + // Similarly to enums, semantic changes apply only inside the structure fields. + assert_eq!( + to_hash(meta_type::()), + to_hash(meta_type::()) + ); + + #[allow(dead_code)] + #[derive(scale_info::TypeInfo)] + enum EnumFieldNotNamed { + First(u8), + } + #[allow(dead_code)] + #[derive(scale_info::TypeInfo)] + enum EnumFieldNotNamedSecond { + Second(u8), + } + // The enums are binary compatible, they contain a different semantic meaning: + // `First(u8)` and `Second(u8)`. + assert_ne!( + to_hash(meta_type::()), + to_hash(meta_type::()) + ); + + #[allow(dead_code)] + #[derive(scale_info::TypeInfo)] + enum EnumFieldNamed { + First { a: u8 }, + } + #[allow(dead_code)] + #[derive(scale_info::TypeInfo)] + enum EnumFieldNamedSecond { + First { b: u8 }, + } + // Named fields contain a different semantic meaning ('a' and 'b'). + assert_ne!( + to_hash(meta_type::()), + to_hash(meta_type::()) + ); + + #[allow(dead_code)] + #[derive(scale_info::TypeInfo)] + struct StructFieldNamed { + a: u32, + } + #[allow(dead_code)] + #[derive(scale_info::TypeInfo)] + struct StructFieldNamedSecond { + b: u32, + } + // Similar to enums, struct fields contain a different semantic meaning ('a' and 'b'). + assert_ne!( + to_hash(meta_type::()), + to_hash(meta_type::()) + ); + + #[allow(dead_code)] + #[derive(scale_info::TypeInfo)] + enum EnumField { + First, + // Field is unnamed, but has type name `u8`. + Second(u8), + // File is named and has type name `u8`. + Third { named: u8 }, + } + + #[allow(dead_code)] + #[derive(scale_info::TypeInfo)] + enum EnumFieldSwap { + Second(u8), + First, + Third { named: u8 }, + } + // Swapping the registration order should also be taken into account. + assert_ne!( + to_hash(meta_type::()), + to_hash(meta_type::()) + ); + + #[allow(dead_code)] + #[derive(scale_info::TypeInfo)] + struct StructField { + a: u32, + b: u32, + } + + #[allow(dead_code)] + #[derive(scale_info::TypeInfo)] + struct StructFieldSwap { + b: u32, + a: u32, + } + assert_ne!( + to_hash(meta_type::()), + to_hash(meta_type::()) + ); + } +} From 3c2d78a416d21ca4e6ebb3b75e6126d5f7b993dc Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Tue, 11 Apr 2023 19:53:14 +0300 Subject: [PATCH 04/66] Use sp-metadata-ir from substrate to work with metadata Signed-off-by: Alexandru Vasile --- Cargo.lock | 47 ++++++++++++++++++++++++++++++--------------- metadata/Cargo.toml | 1 + metadata/src/lib.rs | 2 ++ 3 files changed, 35 insertions(+), 15 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0ec21c8362..4fa5e98d2b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2937,7 +2937,7 @@ dependencies = [ "serde", "sp-core", "sp-io", - "sp-std", + "sp-std 7.0.0", ] [[package]] @@ -2951,7 +2951,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-std", + "sp-std 7.0.0", "static_assertions", ] @@ -2990,7 +2990,7 @@ dependencies = [ "sp-debug-derive", "sp-externalities", "sp-runtime-interface", - "sp-std", + "sp-std 7.0.0", "sp-storage", "ss58-registry", "substrate-bip39", @@ -3010,7 +3010,7 @@ dependencies = [ "digest 0.10.6", "sha2 0.10.6", "sha3", - "sp-std", + "sp-std 7.0.0", "twox-hash", ] @@ -3045,7 +3045,7 @@ checksum = "8ae0f275760689aaefe967943331d458cd99f5169d18364365d4cb584b246d1c" dependencies = [ "environmental", "parity-scale-codec", - "sp-std", + "sp-std 7.0.0", "sp-storage", ] @@ -3068,7 +3068,7 @@ dependencies = [ "sp-keystore", "sp-runtime-interface", "sp-state-machine", - "sp-std", + "sp-std 7.0.0", "sp-tracing", "sp-trie", "tracing", @@ -3104,6 +3104,17 @@ dependencies = [ "thiserror", ] +[[package]] +name = "sp-metadata-ir" +version = "0.1.0" +source = "git+https://github.com/paritytech/substrate.git#da9f88dcac328d8f6de38dd61e33078c20bd6685" +dependencies = [ + "frame-metadata", + "parity-scale-codec", + "scale-info", + "sp-std 5.0.0", +] + [[package]] name = "sp-panic-handler" version = "7.0.0" @@ -3134,7 +3145,7 @@ dependencies = [ "sp-arithmetic", "sp-core", "sp-io", - "sp-std", + "sp-std 7.0.0", "sp-weights", ] @@ -3150,7 +3161,7 @@ dependencies = [ "primitive-types", "sp-externalities", "sp-runtime-interface-proc-macro", - "sp-std", + "sp-std 7.0.0", "sp-storage", "sp-tracing", "sp-wasm-interface", @@ -3185,12 +3196,17 @@ dependencies = [ "sp-core", "sp-externalities", "sp-panic-handler", - "sp-std", + "sp-std 7.0.0", "sp-trie", "thiserror", "tracing", ] +[[package]] +name = "sp-std" +version = "5.0.0" +source = "git+https://github.com/paritytech/substrate.git#da9f88dcac328d8f6de38dd61e33078c20bd6685" + [[package]] name = "sp-std" version = "7.0.0" @@ -3208,7 +3224,7 @@ dependencies = [ "ref-cast", "serde", "sp-debug-derive", - "sp-std", + "sp-std 7.0.0", ] [[package]] @@ -3218,7 +3234,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00fab60bf3d42255ce3f678903d3a2564662371c75623de4a1ffc7cac46143df" dependencies = [ "parity-scale-codec", - "sp-std", + "sp-std 7.0.0", "tracing", "tracing-core", "tracing-subscriber 0.2.25", @@ -3241,7 +3257,7 @@ dependencies = [ "scale-info", "schnellru", "sp-core", - "sp-std", + "sp-std 7.0.0", "thiserror", "tracing", "trie-db", @@ -3261,7 +3277,7 @@ dependencies = [ "serde", "sp-core-hashing-proc-macro", "sp-runtime", - "sp-std", + "sp-std 7.0.0", "sp-version-proc-macro", "thiserror", ] @@ -3288,7 +3304,7 @@ dependencies = [ "impl-trait-for-tuples", "log", "parity-scale-codec", - "sp-std", + "sp-std 7.0.0", "wasmi", "wasmtime", ] @@ -3306,7 +3322,7 @@ dependencies = [ "sp-arithmetic", "sp-core", "sp-debug-derive", - "sp-std", + "sp-std 7.0.0", ] [[package]] @@ -3500,6 +3516,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-core-hashing", + "sp-metadata-ir", ] [[package]] diff --git a/metadata/Cargo.toml b/metadata/Cargo.toml index a51d718d91..093db6022f 100644 --- a/metadata/Cargo.toml +++ b/metadata/Cargo.toml @@ -18,6 +18,7 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features = frame-metadata = { version = "15.1.0", features = ["v14", "v15-unstable", "std"] } scale-info = "2.5.0" sp-core-hashing = "7.0.0" +sp-metadata-ir = { git = "https://github.com/paritytech/substrate.git", version = "0.1.0" } [dev-dependencies] bitvec = { version = "1.0.0", default-features = false, features = ["alloc"] } diff --git a/metadata/src/lib.rs b/metadata/src/lib.rs index 8867f7ed24..3b31f205e9 100644 --- a/metadata/src/lib.rs +++ b/metadata/src/lib.rs @@ -5,6 +5,8 @@ mod retain; mod validation; +pub use sp_metadata_ir as metadata_ir; + pub use retain::retain_metadata_pallets; pub use validation::{ get_call_hash, get_constant_hash, get_metadata_hash, get_metadata_per_pallet_hash, From d2d29dca1cff920140d9819cd9c0425ad584b553 Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Thu, 13 Apr 2023 15:52:00 +0300 Subject: [PATCH 05/66] Revert using sp-metadata-ir in favor of conversion to v15 Signed-off-by: Alexandru Vasile --- Cargo.lock | 47 +++++++++++++++------------------------------ metadata/Cargo.toml | 1 - 2 files changed, 15 insertions(+), 33 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4fa5e98d2b..0ec21c8362 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2937,7 +2937,7 @@ dependencies = [ "serde", "sp-core", "sp-io", - "sp-std 7.0.0", + "sp-std", ] [[package]] @@ -2951,7 +2951,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-std 7.0.0", + "sp-std", "static_assertions", ] @@ -2990,7 +2990,7 @@ dependencies = [ "sp-debug-derive", "sp-externalities", "sp-runtime-interface", - "sp-std 7.0.0", + "sp-std", "sp-storage", "ss58-registry", "substrate-bip39", @@ -3010,7 +3010,7 @@ dependencies = [ "digest 0.10.6", "sha2 0.10.6", "sha3", - "sp-std 7.0.0", + "sp-std", "twox-hash", ] @@ -3045,7 +3045,7 @@ checksum = "8ae0f275760689aaefe967943331d458cd99f5169d18364365d4cb584b246d1c" dependencies = [ "environmental", "parity-scale-codec", - "sp-std 7.0.0", + "sp-std", "sp-storage", ] @@ -3068,7 +3068,7 @@ dependencies = [ "sp-keystore", "sp-runtime-interface", "sp-state-machine", - "sp-std 7.0.0", + "sp-std", "sp-tracing", "sp-trie", "tracing", @@ -3104,17 +3104,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "sp-metadata-ir" -version = "0.1.0" -source = "git+https://github.com/paritytech/substrate.git#da9f88dcac328d8f6de38dd61e33078c20bd6685" -dependencies = [ - "frame-metadata", - "parity-scale-codec", - "scale-info", - "sp-std 5.0.0", -] - [[package]] name = "sp-panic-handler" version = "7.0.0" @@ -3145,7 +3134,7 @@ dependencies = [ "sp-arithmetic", "sp-core", "sp-io", - "sp-std 7.0.0", + "sp-std", "sp-weights", ] @@ -3161,7 +3150,7 @@ dependencies = [ "primitive-types", "sp-externalities", "sp-runtime-interface-proc-macro", - "sp-std 7.0.0", + "sp-std", "sp-storage", "sp-tracing", "sp-wasm-interface", @@ -3196,17 +3185,12 @@ dependencies = [ "sp-core", "sp-externalities", "sp-panic-handler", - "sp-std 7.0.0", + "sp-std", "sp-trie", "thiserror", "tracing", ] -[[package]] -name = "sp-std" -version = "5.0.0" -source = "git+https://github.com/paritytech/substrate.git#da9f88dcac328d8f6de38dd61e33078c20bd6685" - [[package]] name = "sp-std" version = "7.0.0" @@ -3224,7 +3208,7 @@ dependencies = [ "ref-cast", "serde", "sp-debug-derive", - "sp-std 7.0.0", + "sp-std", ] [[package]] @@ -3234,7 +3218,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00fab60bf3d42255ce3f678903d3a2564662371c75623de4a1ffc7cac46143df" dependencies = [ "parity-scale-codec", - "sp-std 7.0.0", + "sp-std", "tracing", "tracing-core", "tracing-subscriber 0.2.25", @@ -3257,7 +3241,7 @@ dependencies = [ "scale-info", "schnellru", "sp-core", - "sp-std 7.0.0", + "sp-std", "thiserror", "tracing", "trie-db", @@ -3277,7 +3261,7 @@ dependencies = [ "serde", "sp-core-hashing-proc-macro", "sp-runtime", - "sp-std 7.0.0", + "sp-std", "sp-version-proc-macro", "thiserror", ] @@ -3304,7 +3288,7 @@ dependencies = [ "impl-trait-for-tuples", "log", "parity-scale-codec", - "sp-std 7.0.0", + "sp-std", "wasmi", "wasmtime", ] @@ -3322,7 +3306,7 @@ dependencies = [ "sp-arithmetic", "sp-core", "sp-debug-derive", - "sp-std 7.0.0", + "sp-std", ] [[package]] @@ -3516,7 +3500,6 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-core-hashing", - "sp-metadata-ir", ] [[package]] diff --git a/metadata/Cargo.toml b/metadata/Cargo.toml index 093db6022f..a51d718d91 100644 --- a/metadata/Cargo.toml +++ b/metadata/Cargo.toml @@ -18,7 +18,6 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features = frame-metadata = { version = "15.1.0", features = ["v14", "v15-unstable", "std"] } scale-info = "2.5.0" sp-core-hashing = "7.0.0" -sp-metadata-ir = { git = "https://github.com/paritytech/substrate.git", version = "0.1.0" } [dev-dependencies] bitvec = { version = "1.0.0", default-features = false, features = ["alloc"] } From a795b62b491d93335ed501736db1ecdfb0fe1390 Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Thu, 13 Apr 2023 15:54:10 +0300 Subject: [PATCH 06/66] metadata: Convert v14 to v15 Signed-off-by: Alexandru Vasile --- metadata/src/lib.rs | 93 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 92 insertions(+), 1 deletion(-) diff --git a/metadata/src/lib.rs b/metadata/src/lib.rs index 3b31f205e9..49e23d9a04 100644 --- a/metadata/src/lib.rs +++ b/metadata/src/lib.rs @@ -5,10 +5,101 @@ mod retain; mod validation; -pub use sp_metadata_ir as metadata_ir; +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, }; + +/// Latest runtime metadata version supported by subxt. +pub type LatestRuntimeMetadata = RuntimeMetadataV15; + +/// Convert the metadata V14 to the latest metadata version. +pub fn metadata_v14_to_latest(metadata: RuntimeMetadataV14) -> LatestRuntimeMetadata { + RuntimeMetadataV15 { + types: metadata.types, + pallets: metadata + .pallets + .into_iter() + .map(|pallet| frame_metadata::v15::PalletMetadata { + name: pallet.name, + storage: pallet + .storage + .map(|storage| frame_metadata::v15::PalletStorageMetadata { + prefix: storage.prefix, + entries: storage + .entries + .into_iter() + .map(|entry| { + let modifier = match entry.modifier { + frame_metadata::v14::StorageEntryModifier::Optional => { + frame_metadata::v15::StorageEntryModifier::Optional + } + frame_metadata::v14::StorageEntryModifier::Default => { + frame_metadata::v15::StorageEntryModifier::Default + } + }; + + let ty = match entry.ty { + frame_metadata::v14::StorageEntryType::Plain(ty) => { + frame_metadata::v15::StorageEntryType::Plain(ty) + }, + frame_metadata::v14::StorageEntryType::Map { + hashers, + key, + value, + } => frame_metadata::v15::StorageEntryType::Map { + hashers: hashers.into_iter().map(|hasher| match hasher { + frame_metadata::v14::StorageHasher::Blake2_128 => frame_metadata::v15::StorageHasher::Blake2_128, + frame_metadata::v14::StorageHasher::Blake2_256 => frame_metadata::v15::StorageHasher::Blake2_256, + frame_metadata::v14::StorageHasher::Blake2_128Concat => frame_metadata::v15::StorageHasher::Blake2_128Concat , + frame_metadata::v14::StorageHasher::Twox128 => frame_metadata::v15::StorageHasher::Twox128, + frame_metadata::v14::StorageHasher::Twox256 => frame_metadata::v15::StorageHasher::Twox256, + frame_metadata::v14::StorageHasher::Twox64Concat => frame_metadata::v15::StorageHasher::Twox64Concat, + frame_metadata::v14::StorageHasher::Identity=> frame_metadata::v15::StorageHasher::Identity, + }).collect(), + key, + value, + }, + }; + + frame_metadata::v15::StorageEntryMetadata { + name: entry.name, + modifier, + ty, + default: entry.default, + docs: entry.docs, + } + }) + .collect(), + }), + calls: pallet.calls.map(|calls| frame_metadata::v15::PalletCallMetadata { ty: calls.ty } ), + event: pallet.event.map(|event| frame_metadata::v15::PalletEventMetadata { ty: event.ty } ), + constants: pallet.constants.into_iter().map(|constant| frame_metadata::v15::PalletConstantMetadata { + name: constant.name, + ty: constant.ty, + value: constant.value, + docs: constant.docs, + } ).collect(), + error: pallet.error.map(|error| frame_metadata::v15::PalletErrorMetadata { ty: error.ty } ), + index: pallet.index, + docs: Default::default(), + }) + .collect(), + extrinsic: frame_metadata::v15::ExtrinsicMetadata { + ty: metadata.extrinsic.ty, + version: metadata.extrinsic.version, + signed_extensions: metadata.extrinsic.signed_extensions.into_iter().map(|ext| { + frame_metadata::v15::SignedExtensionMetadata { + identifier: ext.identifier, + ty: ext.ty, + additional_signed: ext.additional_signed, + } + }).collect() + }, + ty: metadata.ty, + apis: Default::default(), + } +} From 98360c3f00f123bc62508a9bcc5559d1af74e5e7 Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Thu, 13 Apr 2023 18:11:49 +0300 Subject: [PATCH 07/66] metadata: Use v15 for validation Signed-off-by: Alexandru Vasile --- metadata/src/validation.rs | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/metadata/src/validation.rs b/metadata/src/validation.rs index 426301ddcd..cd5bd9a271 100644 --- a/metadata/src/validation.rs +++ b/metadata/src/validation.rs @@ -4,8 +4,8 @@ //! Utility functions for metadata validation. -use frame_metadata::{ - ExtrinsicMetadata, RuntimeMetadataV14, StorageEntryMetadata, StorageEntryType, +use frame_metadata::v15::{ + ExtrinsicMetadata, PalletMetadata, RuntimeMetadataV15, StorageEntryMetadata, StorageEntryType, }; use scale_info::{form::PortableForm, Field, PortableRegistry, TypeDef, Variant}; use std::collections::HashSet; @@ -171,7 +171,7 @@ fn get_type_hash(registry: &PortableRegistry, id: u32, visited_ids: &mut HashSet get_type_def_hash(registry, &ty.type_def, visited_ids) } -/// Obtain the hash representation of a `frame_metadata::ExtrinsicMetadata`. +/// Obtain the hash representation of a `frame_metadata::v15::ExtrinsicMetadata`. fn get_extrinsic_hash( registry: &PortableRegistry, extrinsic: &ExtrinsicMetadata, @@ -235,7 +235,7 @@ fn get_storage_entry_hash( /// Obtain the hash for a specific storage item, or an error if it's not found. pub fn get_storage_hash( - metadata: &RuntimeMetadataV14, + metadata: &RuntimeMetadataV15, pallet_name: &str, storage_name: &str, ) -> Result<[u8; 32], NotFound> { @@ -259,7 +259,7 @@ pub fn get_storage_hash( /// Obtain the hash for a specific constant, or an error if it's not found. pub fn get_constant_hash( - metadata: &RuntimeMetadataV14, + metadata: &RuntimeMetadataV15, pallet_name: &str, constant_name: &str, ) -> Result<[u8; 32], NotFound> { @@ -282,7 +282,7 @@ pub fn get_constant_hash( /// Obtain the hash for a specific call, or an error if it's not found. pub fn get_call_hash( - metadata: &RuntimeMetadataV14, + metadata: &RuntimeMetadataV15, pallet_name: &str, call_name: &str, ) -> Result<[u8; 32], NotFound> { @@ -311,10 +311,10 @@ pub fn get_call_hash( Ok(hash) } -/// Obtain the hash representation of a `frame_metadata::PalletMetadata`. +/// Obtain the hash representation of a `frame_metadata::v15::PalletMetadata`. pub fn get_pallet_hash( registry: &PortableRegistry, - pallet: &frame_metadata::PalletMetadata, + pallet: &PalletMetadata, ) -> [u8; 32] { // Begin with some arbitrary hash (we don't really care what it is). let mut bytes = hash(&[19]); @@ -358,8 +358,8 @@ pub fn get_pallet_hash( bytes } -/// Obtain the hash representation of a `frame_metadata::RuntimeMetadataV14`. -pub fn get_metadata_hash(metadata: &RuntimeMetadataV14) -> [u8; 32] { +/// Obtain the hash representation of a `frame_metadata::v15::RuntimeMetadataV15`. +pub fn get_metadata_hash(metadata: &RuntimeMetadataV15) -> [u8; 32] { // Collect all pairs of (pallet name, pallet hash). let mut pallets: Vec<(&str, [u8; 32])> = metadata .pallets @@ -393,7 +393,7 @@ pub fn get_metadata_hash(metadata: &RuntimeMetadataV14) -> [u8; 32] { hash(&bytes) } -/// Obtain the hash representation of a `frame_metadata::RuntimeMetadataV14` +/// Obtain the hash representation of a `frame_metadata::v15::RuntimeMetadataV15` /// hashing only the provided pallets. /// /// **Note:** This is similar to `get_metadata_hash`, but performs hashing only of the provided @@ -401,7 +401,7 @@ pub fn get_metadata_hash(metadata: &RuntimeMetadataV14) -> [u8; 32] { /// the pallets from the static metadata. In those cases, the static API can communicate /// properly with the subset of pallets from the runtime node. pub fn get_metadata_per_pallet_hash>( - metadata: &RuntimeMetadataV14, + metadata: &RuntimeMetadataV15, pallets: &[T], ) -> [u8; 32] { // Collect all pairs of (pallet name, pallet hash). @@ -448,9 +448,9 @@ pub enum NotFound { mod tests { use super::*; use bitvec::{order::Lsb0, vec::BitVec}; - use frame_metadata::{ + use frame_metadata::v15::{ ExtrinsicMetadata, PalletCallMetadata, PalletConstantMetadata, PalletErrorMetadata, - PalletEventMetadata, PalletMetadata, PalletStorageMetadata, RuntimeMetadataV14, + PalletEventMetadata, PalletMetadata, PalletStorageMetadata, RuntimeMetadataV15, StorageEntryMetadata, StorageEntryModifier, }; use scale_info::meta_type; @@ -525,6 +525,7 @@ mod tests { constants: vec![], error: None, index: 0, + docs: vec![], } } @@ -548,8 +549,13 @@ mod tests { ] } - fn pallets_to_metadata(pallets: Vec) -> RuntimeMetadataV14 { - RuntimeMetadataV14::new(pallets, build_default_extrinsic(), meta_type::<()>()) + fn pallets_to_metadata(pallets: Vec) -> RuntimeMetadataV15 { + RuntimeMetadataV15::new( + pallets, + build_default_extrinsic(), + meta_type::<()>(), + vec![], + ) } #[test] From 04dc695aea253407ce21a866bb33cc5b9c3980a2 Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Thu, 13 Apr 2023 18:15:35 +0300 Subject: [PATCH 08/66] codegen: Use v15 for codegen Signed-off-by: Alexandru Vasile --- codegen/src/api/calls.rs | 4 ++-- codegen/src/api/constants.rs | 4 ++-- codegen/src/api/events.rs | 2 +- codegen/src/api/mod.rs | 15 ++++++++++++--- codegen/src/api/storage.rs | 8 ++++---- 5 files changed, 21 insertions(+), 12 deletions(-) diff --git a/codegen/src/api/calls.rs b/codegen/src/api/calls.rs index dae3f124b3..37fe1e0e66 100644 --- a/codegen/src/api/calls.rs +++ b/codegen/src/api/calls.rs @@ -7,7 +7,7 @@ use crate::{ types::{CompositeDefFields, TypeGenerator}, CratePath, }; -use frame_metadata::{v14::RuntimeMetadataV14, PalletMetadata}; +use frame_metadata::v15::{PalletMetadata, RuntimeMetadataV15}; use heck::{ToSnakeCase as _, ToUpperCamelCase as _}; use proc_macro2::TokenStream as TokenStream2; use quote::{format_ident, quote}; @@ -23,7 +23,7 @@ use scale_info::form::PortableForm; /// - `pallet` - Pallet metadata from which the calls are generated. /// - `types_mod_ident` - The ident of the base module that we can use to access the generated types from. pub fn generate_calls( - metadata: &RuntimeMetadataV14, + metadata: &RuntimeMetadataV15, type_gen: &TypeGenerator, pallet: &PalletMetadata, types_mod_ident: &syn::Ident, diff --git a/codegen/src/api/constants.rs b/codegen/src/api/constants.rs index 58dca550f9..c08745e826 100644 --- a/codegen/src/api/constants.rs +++ b/codegen/src/api/constants.rs @@ -3,7 +3,7 @@ // see LICENSE for license details. use crate::{types::TypeGenerator, CratePath}; -use frame_metadata::{v14::RuntimeMetadataV14, PalletMetadata}; +use frame_metadata::v15::{PalletMetadata, RuntimeMetadataV15}; use heck::ToSnakeCase as _; use proc_macro2::TokenStream as TokenStream2; use quote::{format_ident, quote}; @@ -35,7 +35,7 @@ use super::CodegenError; /// - `pallet` - Pallet metadata from which the calls are generated. /// - `types_mod_ident` - The ident of the base module that we can use to access the generated types from. pub fn generate_constants( - metadata: &RuntimeMetadataV14, + metadata: &RuntimeMetadataV15, type_gen: &TypeGenerator, pallet: &PalletMetadata, types_mod_ident: &syn::Ident, diff --git a/codegen/src/api/events.rs b/codegen/src/api/events.rs index fce8b77f7d..01f46e989d 100644 --- a/codegen/src/api/events.rs +++ b/codegen/src/api/events.rs @@ -3,7 +3,7 @@ // see LICENSE for license details. use crate::{types::TypeGenerator, CratePath}; -use frame_metadata::PalletMetadata; +use frame_metadata::v15::PalletMetadata; use proc_macro2::TokenStream as TokenStream2; use quote::quote; use scale_info::form::PortableForm; diff --git a/codegen/src/api/mod.rs b/codegen/src/api/mod.rs index 308f2a03ce..5427436f18 100644 --- a/codegen/src/api/mod.rs +++ b/codegen/src/api/mod.rs @@ -9,6 +9,7 @@ mod constants; mod events; mod storage; +use frame_metadata::v15::RuntimeMetadataV15; use subxt_metadata::get_metadata_per_pallet_hash; use super::DerivesRegistry; @@ -20,7 +21,7 @@ use crate::{ CratePath, }; use codec::Decode; -use frame_metadata::{v14::RuntimeMetadataV14, RuntimeMetadata, RuntimeMetadataPrefixed}; +use frame_metadata::{RuntimeMetadata, RuntimeMetadataPrefixed}; use heck::ToSnakeCase as _; use proc_macro2::TokenStream as TokenStream2; use quote::{format_ident, quote}; @@ -152,7 +153,7 @@ pub fn generate_runtime_api_from_bytes( /// Create the API for interacting with a Substrate runtime. pub struct RuntimeGenerator { - metadata: RuntimeMetadataV14, + metadata: RuntimeMetadataV15, } impl RuntimeGenerator { @@ -161,9 +162,17 @@ impl RuntimeGenerator { /// **Note:** If you have the metadata path, URL or bytes to hand, prefer to use /// one of the `generate_runtime_api_from_*` functions for generating the runtime API /// from that. + /// + /// # Panics + /// + /// If the metadata version is not supported by subxt. + /// Only v14 and v15 versions are supported. pub fn new(metadata: RuntimeMetadataPrefixed) -> Self { match metadata.1 { - RuntimeMetadata::V14(v14) => Self { metadata: v14 }, + RuntimeMetadata::V14(v14) => Self { + metadata: subxt_metadata::metadata_v14_to_latest(v14), + }, + RuntimeMetadata::V15(v15) => Self { metadata: v15 }, _ => panic!("Unsupported metadata version {:?}", metadata.1), } } diff --git a/codegen/src/api/storage.rs b/codegen/src/api/storage.rs index a4d3a7f214..058730db43 100644 --- a/codegen/src/api/storage.rs +++ b/codegen/src/api/storage.rs @@ -3,8 +3,8 @@ // see LICENSE for license details. use crate::{types::TypeGenerator, CratePath}; -use frame_metadata::{ - v14::RuntimeMetadataV14, PalletMetadata, StorageEntryMetadata, StorageEntryModifier, +use frame_metadata::v15::{ + PalletMetadata, RuntimeMetadataV15, StorageEntryMetadata, StorageEntryModifier, StorageEntryType, }; use heck::ToSnakeCase as _; @@ -24,7 +24,7 @@ use super::CodegenError; /// - `pallet` - Pallet metadata from which the storages are generated. /// - `types_mod_ident` - The ident of the base module that we can use to access the generated types from. pub fn generate_storage( - metadata: &RuntimeMetadataV14, + metadata: &RuntimeMetadataV15, type_gen: &TypeGenerator, pallet: &PalletMetadata, types_mod_ident: &syn::Ident, @@ -64,7 +64,7 @@ pub fn generate_storage( } fn generate_storage_entry_fns( - metadata: &RuntimeMetadataV14, + metadata: &RuntimeMetadataV15, type_gen: &TypeGenerator, pallet: &PalletMetadata, storage_entry: &StorageEntryMetadata, From 47d84bccaafca1cd585f64a12b99370d869da292 Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Thu, 13 Apr 2023 18:18:15 +0300 Subject: [PATCH 09/66] metadata/bench: Use v15 Signed-off-by: Alexandru Vasile --- metadata/benches/bench.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/metadata/benches/bench.rs b/metadata/benches/bench.rs index ab9d240b1e..d264fbe5f3 100644 --- a/metadata/benches/bench.rs +++ b/metadata/benches/bench.rs @@ -4,21 +4,23 @@ use codec::Decode; use criterion::*; -use frame_metadata::{RuntimeMetadata::V14, RuntimeMetadataPrefixed, RuntimeMetadataV14}; +use frame_metadata::{v15::RuntimeMetadataV15, RuntimeMetadata, RuntimeMetadataPrefixed}; use scale_info::{form::PortableForm, TypeDef, TypeDefVariant}; use std::{fs, path::Path}; use subxt_metadata::{ get_call_hash, get_constant_hash, get_metadata_hash, get_pallet_hash, get_storage_hash, + metadata_v14_to_latest, }; -fn load_metadata() -> RuntimeMetadataV14 { +fn load_metadata() -> RuntimeMetadataV15 { let bytes = fs::read(Path::new("../artifacts/polkadot_metadata.scale")) .expect("Cannot read metadata blob"); let meta: RuntimeMetadataPrefixed = Decode::decode(&mut &*bytes).expect("Cannot decode scale metadata"); match meta.1 { - V14(v14) => v14, + RuntimeMetadata::V14(v14) => metadata_v14_to_latest(v14), + RuntimeMetadata::V15(v15) => v15, _ => panic!("Unsupported metadata version {:?}", meta.1), } } From 365e78d7395f0df0fe0784a13eb673950408e41f Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Thu, 13 Apr 2023 19:28:51 +0300 Subject: [PATCH 10/66] Adjust to v15 metadata Signed-off-by: Alexandru Vasile --- cli/src/commands/compatibility.rs | 11 +++++---- cli/src/commands/metadata.rs | 11 +++++---- codegen/src/api/mod.rs | 15 +++++------- metadata/src/lib.rs | 19 ++++++++++++++- metadata/src/retain.rs | 18 +++++++------- subxt/src/metadata/metadata_type.rs | 24 +++++++++++-------- subxt/src/storage/storage_address.rs | 2 +- subxt/src/storage/storage_type.rs | 2 +- .../src/codegen/codegen_documentation.rs | 3 ++- .../src/utils/pallet_metadata_test_runner.rs | 11 +++++---- 10 files changed, 71 insertions(+), 45 deletions(-) diff --git a/cli/src/commands/compatibility.rs b/cli/src/commands/compatibility.rs index a3860487be..2e0c66dfbd 100644 --- a/cli/src/commands/compatibility.rs +++ b/cli/src/commands/compatibility.rs @@ -4,12 +4,14 @@ use clap::Parser as ClapParser; use color_eyre::eyre::{self, WrapErr}; -use frame_metadata::{RuntimeMetadata, RuntimeMetadataPrefixed, RuntimeMetadataV14, META_RESERVED}; +use frame_metadata::{ + v15::RuntimeMetadataV15, RuntimeMetadata, RuntimeMetadataPrefixed, META_RESERVED, +}; use jsonrpsee::client_transport::ws::Uri; use scale::Decode; use serde::{Deserialize, Serialize}; use std::collections::HashMap; -use subxt_metadata::{get_metadata_hash, get_pallet_hash}; +use subxt_metadata::{get_metadata_hash, get_pallet_hash, metadata_v14_to_latest}; /// Verify metadata compatibility between substrate nodes. #[derive(Debug, ClapParser)] @@ -94,7 +96,7 @@ async fn handle_full_metadata(nodes: &[Uri]) -> color_eyre::Result<()> { Ok(()) } -async fn fetch_runtime_metadata(url: &Uri) -> color_eyre::Result { +async fn fetch_runtime_metadata(url: &Uri) -> color_eyre::Result { let bytes = subxt_codegen::utils::fetch_metadata_bytes(url).await?; let metadata = ::decode(&mut &bytes[..])?; @@ -108,7 +110,8 @@ async fn fetch_runtime_metadata(url: &Uri) -> color_eyre::Result Ok(v14), + RuntimeMetadata::V14(v14) => Ok(metadata_v14_to_latest(v14)), + RuntimeMetadata::V15(v15) => Ok(v15), _ => Err(eyre::eyre!( "Node {:?} with unsupported metadata version: {:?}", url, diff --git a/cli/src/commands/metadata.rs b/cli/src/commands/metadata.rs index f8d3aec83a..014d2cf6bc 100644 --- a/cli/src/commands/metadata.rs +++ b/cli/src/commands/metadata.rs @@ -8,7 +8,7 @@ use color_eyre::eyre; use frame_metadata::{RuntimeMetadata, RuntimeMetadataPrefixed}; use scale::{Decode, Encode}; use std::io::{self, Write}; -use subxt_metadata::retain_metadata_pallets; +use subxt_metadata::{metadata_v14_to_latest, retain_metadata_pallets}; /// Download metadata from a substrate node, for use with `subxt` codegen. #[derive(Debug, ClapParser)] @@ -29,8 +29,9 @@ pub async fn run(opts: Opts) -> color_eyre::Result<()> { let mut metadata = ::decode(&mut &bytes[..])?; if let Some(pallets) = opts.pallets { - let metadata_v14 = match &mut metadata.1 { - RuntimeMetadata::V14(metadata_v14) => metadata_v14, + let mut metadata_v15 = match metadata.1 { + RuntimeMetadata::V14(metadata_v14) => metadata_v14_to_latest(metadata_v14), + RuntimeMetadata::V15(metadata_v15) => metadata_v15, _ => { return Err(eyre::eyre!( "Unsupported metadata version {:?}, expected V14.", @@ -39,9 +40,11 @@ pub async fn run(opts: Opts) -> color_eyre::Result<()> { } }; - retain_metadata_pallets(metadata_v14, |pallet_name| { + retain_metadata_pallets(&mut metadata_v15, |pallet_name| { pallets.iter().any(|p| &**p == pallet_name) }); + + metadata = metadata_v15.into(); } match opts.format.as_str() { diff --git a/codegen/src/api/mod.rs b/codegen/src/api/mod.rs index 5427436f18..7f9beaaa58 100644 --- a/codegen/src/api/mod.rs +++ b/codegen/src/api/mod.rs @@ -21,7 +21,7 @@ use crate::{ CratePath, }; use codec::Decode; -use frame_metadata::{RuntimeMetadata, RuntimeMetadataPrefixed}; +use frame_metadata::RuntimeMetadataPrefixed; use heck::ToSnakeCase as _; use proc_macro2::TokenStream as TokenStream2; use quote::{format_ident, quote}; @@ -165,15 +165,12 @@ impl RuntimeGenerator { /// /// # Panics /// - /// If the metadata version is not supported by subxt. - /// Only v14 and v15 versions are supported. + /// Panics if the runtime metadata version is not supported. + /// + /// Supported versions: v14 and v15. pub fn new(metadata: RuntimeMetadataPrefixed) -> Self { - match metadata.1 { - RuntimeMetadata::V14(v14) => Self { - metadata: subxt_metadata::metadata_v14_to_latest(v14), - }, - RuntimeMetadata::V15(v15) => Self { metadata: v15 }, - _ => panic!("Unsupported metadata version {:?}", metadata.1), + RuntimeGenerator { + metadata: subxt_metadata::metadata_to_latest(metadata), } } diff --git a/metadata/src/lib.rs b/metadata/src/lib.rs index 49e23d9a04..c173f7e4f7 100644 --- a/metadata/src/lib.rs +++ b/metadata/src/lib.rs @@ -5,7 +5,9 @@ mod retain; mod validation; -use frame_metadata::{v14::RuntimeMetadataV14, v15::RuntimeMetadataV15}; +use frame_metadata::{ + v14::RuntimeMetadataV14, v15::RuntimeMetadataV15, RuntimeMetadata, RuntimeMetadataPrefixed, +}; pub use retain::retain_metadata_pallets; pub use validation::{ @@ -103,3 +105,18 @@ pub fn metadata_v14_to_latest(metadata: RuntimeMetadataV14) -> LatestRuntimeMeta apis: Default::default(), } } + +/// Convert a prefixed runtime metadata to the latest version of the runtime metadata. +/// +/// # Panics +/// +/// Panics if the runtime metadata version is not supported. +/// +/// Supported versions: v14 and v15. +pub fn metadata_to_latest(meta: RuntimeMetadataPrefixed) -> LatestRuntimeMetadata { + match meta.1 { + RuntimeMetadata::V14(v14) => metadata_v14_to_latest(v14), + RuntimeMetadata::V15(v15) => v15, + _ => panic!("Unsupported metadata version {:?}", meta.1), + } +} diff --git a/metadata/src/retain.rs b/metadata/src/retain.rs index 67cd06a05b..dcdabccd47 100644 --- a/metadata/src/retain.rs +++ b/metadata/src/retain.rs @@ -4,7 +4,9 @@ //! Utility functions to generate a subset of the metadata. -use frame_metadata::{ExtrinsicMetadata, PalletMetadata, RuntimeMetadataV14, StorageEntryType}; +use frame_metadata::v15::{ + ExtrinsicMetadata, PalletMetadata, RuntimeMetadataV15, StorageEntryType, +}; use scale_info::{form::PortableForm, interner::UntrackedSymbol, TypeDef}; use std::{ any::TypeId, @@ -120,7 +122,7 @@ fn update_type(ty: &mut UntrackedSymbol, map_ids: &BTreeMap) { /// Strip any pallets out of the RuntimeCall type that aren't the ones we want to keep. /// The RuntimeCall type is referenced in a bunch of places, so doing this prevents us from /// holding on to stuff in pallets we've asked not to keep. -fn retain_pallets_in_runtime_call_type(metadata: &mut RuntimeMetadataV14, mut filter: F) +fn retain_pallets_in_runtime_call_type(metadata: &mut RuntimeMetadataV15, mut filter: F) where F: FnMut(&str) -> bool, { @@ -161,7 +163,7 @@ where /// /// Panics if the [`scale_info::PortableRegistry`] did not retain all needed types, /// or the metadata does not contain the "sp_runtime::DispatchError" type. -pub fn retain_metadata_pallets(metadata: &mut RuntimeMetadataV14, mut filter: F) +pub fn retain_metadata_pallets(metadata: &mut RuntimeMetadataV15, mut filter: F) where F: FnMut(&str) -> bool, { @@ -214,20 +216,18 @@ where #[cfg(test)] mod tests { use super::*; + use crate::metadata_to_latest; use codec::Decode; - use frame_metadata::{RuntimeMetadata, RuntimeMetadataPrefixed, RuntimeMetadataV14}; + use frame_metadata::{v15::RuntimeMetadataV15, RuntimeMetadataPrefixed}; use std::{fs, path::Path}; - fn load_metadata() -> RuntimeMetadataV14 { + fn load_metadata() -> RuntimeMetadataV15 { let bytes = fs::read(Path::new("../artifacts/polkadot_metadata.scale")) .expect("Cannot read metadata blob"); let meta: RuntimeMetadataPrefixed = Decode::decode(&mut &*bytes).expect("Cannot decode scale metadata"); - match meta.1 { - RuntimeMetadata::V14(v14) => v14, - _ => panic!("Unsupported metadata version {:?}", meta.1), - } + metadata_to_latest(meta) } #[test] diff --git a/subxt/src/metadata/metadata_type.rs b/subxt/src/metadata/metadata_type.rs index d9668bff3f..7a8966d3ea 100644 --- a/subxt/src/metadata/metadata_type.rs +++ b/subxt/src/metadata/metadata_type.rs @@ -5,8 +5,8 @@ use super::hash_cache::HashCache; use codec::Error as CodecError; use frame_metadata::{ - PalletConstantMetadata, RuntimeMetadata, RuntimeMetadataPrefixed, RuntimeMetadataV14, - StorageEntryMetadata, META_RESERVED, + v15::PalletConstantMetadata, v15::RuntimeMetadataV15, v15::StorageEntryMetadata, + RuntimeMetadata, RuntimeMetadataPrefixed, META_RESERVED, }; use parking_lot::RwLock; use scale_info::{form::PortableForm, PortableRegistry, Type}; @@ -65,7 +65,7 @@ pub enum MetadataError { // We hide the innards behind an Arc so that it's easy to clone and share. #[derive(Debug)] struct MetadataInner { - metadata: RuntimeMetadataV14, + metadata: RuntimeMetadataV15, // Events are hashed by pallet an error index (decode oriented) events: HashMap<(u8, u8), EventMetadata>, @@ -147,7 +147,7 @@ impl Metadata { } /// Return the runtime metadata. - pub fn runtime_metadata(&self) -> &RuntimeMetadataV14 { + pub fn runtime_metadata(&self) -> &RuntimeMetadataV15 { &self.inner.metadata } @@ -371,7 +371,8 @@ impl TryFrom for Metadata { return Err(InvalidMetadataError::InvalidPrefix); } let metadata = match metadata.1 { - RuntimeMetadata::V14(meta) => meta, + RuntimeMetadata::V14(v14) => subxt_metadata::metadata_v14_to_latest(v14), + RuntimeMetadata::V15(v15) => v15, _ => return Err(InvalidMetadataError::InvalidVersion), }; @@ -503,8 +504,9 @@ impl TryFrom for Metadata { #[cfg(test)] mod tests { use super::*; - use frame_metadata::{ - ExtrinsicMetadata, PalletStorageMetadata, StorageEntryModifier, StorageEntryType, + use frame_metadata::v15::{ + ExtrinsicMetadata, PalletCallMetadata, PalletMetadata, PalletStorageMetadata, + StorageEntryModifier, StorageEntryType, }; use scale_info::{meta_type, TypeInfo}; @@ -531,19 +533,20 @@ mod tests { value: vec![1, 2, 3], docs: vec![], }; - let pallet = frame_metadata::PalletMetadata { + let pallet = PalletMetadata { index: 0, name: "System", - calls: Some(frame_metadata::PalletCallMetadata { + calls: Some(PalletCallMetadata { ty: meta_type::(), }), storage: Some(storage), constants: vec![constant], event: None, error: None, + docs: vec![], }; - let metadata = RuntimeMetadataV14::new( + let metadata = RuntimeMetadataV15::new( vec![pallet], ExtrinsicMetadata { ty: meta_type::<()>(), @@ -551,6 +554,7 @@ mod tests { signed_extensions: vec![], }, meta_type::<()>(), + vec![], ); let prefixed = RuntimeMetadataPrefixed::from(metadata); diff --git a/subxt/src/storage/storage_address.rs b/subxt/src/storage/storage_address.rs index b2cb21964e..527d8c31bd 100644 --- a/subxt/src/storage/storage_address.rs +++ b/subxt/src/storage/storage_address.rs @@ -8,7 +8,7 @@ use crate::{ metadata::{DecodeWithMetadata, EncodeWithMetadata, Metadata}, utils::{Encoded, Static}, }; -use frame_metadata::{StorageEntryType, StorageHasher}; +use frame_metadata::v15::{StorageEntryType, StorageHasher}; use scale_info::TypeDef; use std::borrow::Cow; diff --git a/subxt/src/storage/storage_type.rs b/subxt/src/storage/storage_type.rs index 44170818d8..6033b00bf6 100644 --- a/subxt/src/storage/storage_type.rs +++ b/subxt/src/storage/storage_type.rs @@ -11,7 +11,7 @@ use crate::{ Config, }; use derivative::Derivative; -use frame_metadata::StorageEntryType; +use frame_metadata::v15::StorageEntryType; use scale_info::form::PortableForm; use std::{future::Future, marker::PhantomData}; diff --git a/testing/integration-tests/src/codegen/codegen_documentation.rs b/testing/integration-tests/src/codegen/codegen_documentation.rs index b81722afcf..b8356d5bd9 100644 --- a/testing/integration-tests/src/codegen/codegen_documentation.rs +++ b/testing/integration-tests/src/codegen/codegen_documentation.rs @@ -14,7 +14,8 @@ fn metadata_docs() -> Vec { // Load the runtime metadata downloaded from a node via `test-runtime`. let meta = load_test_metadata(); let metadata = match meta.1 { - frame_metadata::RuntimeMetadata::V14(v14) => v14, + frame_metadata::RuntimeMetadata::V14(v14) => subxt_metadata::metadata_v14_to_latest(v14), + frame_metadata::RuntimeMetadata::V15(v15) => v15, _ => panic!("Unsupported metadata version {:?}", meta.1), }; diff --git a/testing/ui-tests/src/utils/pallet_metadata_test_runner.rs b/testing/ui-tests/src/utils/pallet_metadata_test_runner.rs index a27450c9f5..e87c755f23 100644 --- a/testing/ui-tests/src/utils/pallet_metadata_test_runner.rs +++ b/testing/ui-tests/src/utils/pallet_metadata_test_runner.rs @@ -3,15 +3,15 @@ // see LICENSE for license details. use codec::{Decode, Encode}; -use frame_metadata::{RuntimeMetadataPrefixed, RuntimeMetadataV14}; +use frame_metadata::{v15::RuntimeMetadataV15, RuntimeMetadataPrefixed}; use std::io::Read; -use subxt_metadata::retain_metadata_pallets; +use subxt_metadata::{metadata_v14_to_latest, retain_metadata_pallets}; static TEST_DIR_PREFIX: &str = "subxt_generated_pallets_ui_tests_"; static METADATA_FILE: &str = "../../artifacts/polkadot_metadata.scale"; pub struct PalletMetadataTestRunner { - metadata: RuntimeMetadataV14, + metadata: RuntimeMetadataV15, index: usize, } @@ -28,8 +28,9 @@ impl PalletMetadataTestRunner { Decode::decode(&mut &*bytes).expect("Cannot decode metadata bytes"); let metadata = match meta.1 { - frame_metadata::RuntimeMetadata::V14(v14) => v14, - _ => panic!("Unsupported metadata version. Tests support only v14"), + frame_metadata::RuntimeMetadata::V14(v14) => metadata_v14_to_latest(v14), + frame_metadata::RuntimeMetadata::V15(v15) => v15, + _ => panic!("Unsupported metadata version {:?}", meta.1), }; PalletMetadataTestRunner { metadata, index: 0 } From 9302fa231785bacefb56e2ba2f223ea7e361bd8e Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Thu, 13 Apr 2023 19:43:07 +0300 Subject: [PATCH 11/66] Adjust testing Signed-off-by: Alexandru Vasile --- Cargo.lock | 1 + codegen/src/error.rs | 16 +++++++-------- subxt/src/events/events_type.rs | 7 ++++--- testing/integration-tests/Cargo.toml | 1 + testing/integration-tests/src/blocks/mod.rs | 7 +++++-- testing/integration-tests/src/client/mod.rs | 8 +++++--- .../src/metadata/validation.rs | 20 +++++++++++-------- testing/ui-tests/src/storage.rs | 3 ++- testing/ui-tests/src/utils/mod.rs | 13 ++++++++---- 9 files changed, 47 insertions(+), 29 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0ec21c8362..1e10eedd12 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1548,6 +1548,7 @@ dependencies = [ "sp-runtime", "subxt", "subxt-codegen", + "subxt-metadata", "syn 1.0.109", "test-runtime", "tokio", diff --git a/codegen/src/error.rs b/codegen/src/error.rs index 8d38bbfdba..411225e34a 100644 --- a/codegen/src/error.rs +++ b/codegen/src/error.rs @@ -13,10 +13,10 @@ pub enum CodegenError { #[error("Could not find type with ID {0} in the type registry; please raise a support issue.")] TypeNotFound(u32), /// Cannot fetch the metadata bytes. - #[error("Failed to fetch metadata, make sure that you're pointing at a node which is providing V14 metadata: {0}")] + #[error("Failed to fetch metadata, make sure that you're pointing at a node which is providing substrate-based metadata: {0}")] Fetch(#[from] FetchMetadataError), /// Failed IO for the metadata file. - #[error("Failed IO for {0}, make sure that you are providing the correct file path for metadata V14: {1}")] + #[error("Failed IO for {0}, make sure that you are providing the correct file path for metadata: {1}")] Io(String, std::io::Error), /// Cannot decode the metadata bytes. #[error("Could not decode metadata, only V14 metadata is supported: {0}")] @@ -25,7 +25,7 @@ pub enum CodegenError { #[error("Out-of-line subxt modules are not supported, make sure you are providing a body to your module: pub mod polkadot {{ ... }}")] InvalidModule(Span), /// Expected named or unnamed fields. - #[error("Fields should either be all named or all unnamed, make sure you are providing a valid metadata V14: {0}")] + #[error("Fields should either be all named or all unnamed, make sure you are providing a valid metadata: {0}")] InvalidFields(String), /// Substitute types must have a valid path. #[error("Type substitution error: {0}")] @@ -34,20 +34,20 @@ pub enum CodegenError { #[error("Invalid type path {0}: {1}")] InvalidTypePath(String, syn::Error), /// Metadata for constant could not be found. - #[error("Metadata for constant entry {0}_{1} could not be found. Make sure you are providing a valid metadata V14")] + #[error("Metadata for constant entry {0}_{1} could not be found. Make sure you are providing a valid substrate-based metadata")] MissingConstantMetadata(String, String), /// Metadata for storage could not be found. - #[error("Metadata for storage entry {0}_{1} could not be found. Make sure you are providing a valid metadata V14")] + #[error("Metadata for storage entry {0}_{1} could not be found. Make sure you are providing a valid substrate-based metadata")] MissingStorageMetadata(String, String), /// 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 metadata V14")] + #[error("Metadata for call entry {0}_{1} could not be found. Make sure you are providing a valid substrate-based metadata")] MissingCallMetadata(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 metadata V14")] + #[error("Call variant for type {0} must have all named fields. Make sure you are providing a valid substrate-based metadata")] InvalidCallVariant(u32), /// Type should be an variant/enum. #[error( - "{0} type should be an variant/enum type. Make sure you are providing a valid metadata V14" + "{0} type should be an variant/enum type. Make sure you are providing a valid substrate-based metadata" )] InvalidType(String), } diff --git a/subxt/src/events/events_type.rs b/subxt/src/events/events_type.rs index 11f3294a7c..4fcec55cb7 100644 --- a/subxt/src/events/events_type.rs +++ b/subxt/src/events/events_type.rs @@ -430,7 +430,7 @@ pub(crate) mod test_utils { use crate::{Config, SubstrateConfig}; use codec::Encode; use frame_metadata::{ - v14::{ExtrinsicMetadata, PalletEventMetadata, PalletMetadata, RuntimeMetadataV14}, + v15::{ExtrinsicMetadata, PalletEventMetadata, PalletMetadata, RuntimeMetadataV15}, RuntimeMetadataPrefixed, }; use scale_info::{meta_type, TypeInfo}; @@ -503,6 +503,7 @@ pub(crate) mod test_utils { constants: vec![], error: None, index: 0, + docs: vec![], }]; let extrinsic = ExtrinsicMetadata { @@ -511,8 +512,8 @@ pub(crate) mod test_utils { signed_extensions: vec![], }; - let v14 = RuntimeMetadataV14::new(pallets, extrinsic, meta_type::<()>()); - let runtime_metadata: RuntimeMetadataPrefixed = v14.into(); + let meta = RuntimeMetadataV15::new(pallets, extrinsic, meta_type::<()>(), vec![]); + let runtime_metadata: RuntimeMetadataPrefixed = meta.into(); Metadata::try_from(runtime_metadata).unwrap() } diff --git a/testing/integration-tests/Cargo.toml b/testing/integration-tests/Cargo.toml index c70b76bbef..c321ff5013 100644 --- a/testing/integration-tests/Cargo.toml +++ b/testing/integration-tests/Cargo.toml @@ -29,6 +29,7 @@ sp-keyring = "20.0.0" syn = "1.0.109" subxt = { version = "0.27.1", path = "../../subxt" } subxt-codegen = { version = "0.27.1", path = "../../codegen" } +subxt-metadata = { version = "0.27.1", path = "../../metadata" } test-runtime = { path = "../test-runtime" } tokio = { version = "1.27", features = ["macros", "time"] } tracing = "0.1.34" diff --git a/testing/integration-tests/src/blocks/mod.rs b/testing/integration-tests/src/blocks/mod.rs index ed3fb4b5e5..24deac1c30 100644 --- a/testing/integration-tests/src/blocks/mod.rs +++ b/testing/integration-tests/src/blocks/mod.rs @@ -106,8 +106,11 @@ async fn runtime_api_call() -> Result<(), subxt::Error> { let _ = >::decode(cursor)?; let meta: RuntimeMetadataPrefixed = Decode::decode(cursor)?; let metadata_call = match meta.1 { - frame_metadata::RuntimeMetadata::V14(metadata) => metadata, - _ => panic!("Metadata V14 unavailable"), + frame_metadata::RuntimeMetadata::V14(metadata) => { + subxt_metadata::metadata_v14_to_latest(metadata) + } + frame_metadata::RuntimeMetadata::V15(metadata) => metadata, + _ => panic!("Metadata V14 or V15 unavailable"), }; // Compare the runtime API call against the `state_getMetadata`. diff --git a/testing/integration-tests/src/client/mod.rs b/testing/integration-tests/src/client/mod.rs index 139759c4b6..34afcf2d4d 100644 --- a/testing/integration-tests/src/client/mod.rs +++ b/testing/integration-tests/src/client/mod.rs @@ -398,10 +398,12 @@ async fn rpc_state_call() { let _ = >::decode(cursor).unwrap(); let meta: RuntimeMetadataPrefixed = Decode::decode(cursor).unwrap(); let metadata_call = match meta.1 { - frame_metadata::RuntimeMetadata::V14(metadata) => metadata, - _ => panic!("Metadata V14 unavailable"), + frame_metadata::RuntimeMetadata::V14(metadata) => { + subxt_metadata::metadata_v14_to_latest(metadata) + } + frame_metadata::RuntimeMetadata::V15(metadata) => metadata, + _ => 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 = metadata.runtime_metadata(); diff --git a/testing/integration-tests/src/metadata/validation.rs b/testing/integration-tests/src/metadata/validation.rs index 015be5e589..c8d30d6418 100644 --- a/testing/integration-tests/src/metadata/validation.rs +++ b/testing/integration-tests/src/metadata/validation.rs @@ -4,9 +4,11 @@ use crate::{node_runtime, test_context, TestContext}; use frame_metadata::{ - ExtrinsicMetadata, PalletCallMetadata, PalletMetadata, PalletStorageMetadata, - RuntimeMetadataPrefixed, RuntimeMetadataV14, StorageEntryMetadata, StorageEntryModifier, - StorageEntryType, + v15::{ + ExtrinsicMetadata, PalletCallMetadata, PalletMetadata, PalletStorageMetadata, + RuntimeMetadataV15, StorageEntryMetadata, StorageEntryModifier, StorageEntryType, + }, + RuntimeMetadataPrefixed, }; use scale_info::{ build::{Fields, Variants}, @@ -15,7 +17,7 @@ use scale_info::{ use subxt::{Metadata, OfflineClient, SubstrateConfig}; async fn metadata_to_api( - metadata: RuntimeMetadataV14, + metadata: RuntimeMetadataV15, ctx: &TestContext, ) -> OfflineClient { let prefixed = RuntimeMetadataPrefixed::from(metadata); @@ -37,7 +39,7 @@ async fn full_metadata_check() { assert!(node_runtime::validate_codegen(&api).is_ok()); // Modify the metadata. - let mut metadata: RuntimeMetadataV14 = api.metadata().runtime_metadata().clone(); + let mut metadata = api.metadata().runtime_metadata().clone(); metadata.pallets[0].name = "NewPallet".to_string(); let api = metadata_to_api(metadata, &ctx).await; @@ -59,7 +61,7 @@ async fn constant_values_are_not_validated() { assert!(api.constants().at(&deposit_addr).is_ok()); // Modify the metadata. - let mut metadata: RuntimeMetadataV14 = api.metadata().runtime_metadata().clone(); + let mut metadata = api.metadata().runtime_metadata().clone(); let mut existential = metadata .pallets @@ -89,11 +91,12 @@ fn default_pallet() -> PalletMetadata { constants: vec![], error: None, index: 0, + docs: vec![], } } -fn pallets_to_metadata(pallets: Vec) -> RuntimeMetadataV14 { - RuntimeMetadataV14::new( +fn pallets_to_metadata(pallets: Vec) -> RuntimeMetadataV15 { + RuntimeMetadataV15::new( pallets, ExtrinsicMetadata { ty: meta_type::<()>(), @@ -101,6 +104,7 @@ fn pallets_to_metadata(pallets: Vec) -> RuntimeMetadataV14 { signed_extensions: vec![], }, meta_type::<()>(), + vec![], ) } diff --git a/testing/ui-tests/src/storage.rs b/testing/ui-tests/src/storage.rs index 07983521d4..eb9c96cf1d 100644 --- a/testing/ui-tests/src/storage.rs +++ b/testing/ui-tests/src/storage.rs @@ -3,7 +3,8 @@ // see LICENSE for license details. use frame_metadata::{ - RuntimeMetadataPrefixed, StorageEntryMetadata, StorageEntryModifier, StorageEntryType, + v15::{StorageEntryMetadata, StorageEntryModifier, StorageEntryType}, + RuntimeMetadataPrefixed, }; use scale_info::meta_type; diff --git a/testing/ui-tests/src/utils/mod.rs b/testing/ui-tests/src/utils/mod.rs index d2aef3c31f..9c8a1c86fa 100644 --- a/testing/ui-tests/src/utils/mod.rs +++ b/testing/ui-tests/src/utils/mod.rs @@ -7,8 +7,11 @@ mod metadata_test_runner; mod pallet_metadata_test_runner; use frame_metadata::{ - v14::RuntimeMetadataV14, ExtrinsicMetadata, PalletMetadata, PalletStorageMetadata, - RuntimeMetadataPrefixed, StorageEntryMetadata, + v15::{ + ExtrinsicMetadata, PalletMetadata, PalletStorageMetadata, RuntimeMetadataV15, + StorageEntryMetadata, + }, + RuntimeMetadataPrefixed, }; use scale_info::{meta_type, IntoPortable, TypeInfo}; @@ -28,7 +31,7 @@ pub fn generate_metadata_from_pallets_custom_dispatch_error()); - let metadata = RuntimeMetadataV14 { + let metadata = RuntimeMetadataV15 { types: registry.into(), pallets, extrinsic, ty, + apis: vec![], }; RuntimeMetadataPrefixed::from(metadata) @@ -86,6 +90,7 @@ pub fn generate_metadata_from_storage_entries( calls: None, event: None, error: None, + docs: vec![], }; generate_metadata_from_pallets(vec![pallet]) From 7f3931a22605cd750acd3a155316dc7150262677 Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Tue, 18 Apr 2023 17:14:03 +0300 Subject: [PATCH 12/66] Improve documentation Signed-off-by: Alexandru Vasile --- cli/src/commands/metadata.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cli/src/commands/metadata.rs b/cli/src/commands/metadata.rs index 014d2cf6bc..d79a30ef8f 100644 --- a/cli/src/commands/metadata.rs +++ b/cli/src/commands/metadata.rs @@ -20,6 +20,9 @@ pub struct Opts { format: String, /// Generate a subset of the metadata that contains only the /// types needed to represent the provided pallets. + /// + /// The returned metadata is updated to the latest available version + /// when using the option. #[clap(long, use_value_delimiter = true, value_parser)] pallets: Option>, } From 466330011a0658218ce26bb5a6cca7e59e9b0a57 Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Tue, 18 Apr 2023 17:18:01 +0300 Subject: [PATCH 13/66] force CI Signed-off-by: Alexandru Vasile --- cli/src/commands/metadata.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/cli/src/commands/metadata.rs b/cli/src/commands/metadata.rs index d79a30ef8f..7b987edc74 100644 --- a/cli/src/commands/metadata.rs +++ b/cli/src/commands/metadata.rs @@ -46,7 +46,6 @@ pub async fn run(opts: Opts) -> color_eyre::Result<()> { retain_metadata_pallets(&mut metadata_v15, |pallet_name| { pallets.iter().any(|p| &**p == pallet_name) }); - metadata = metadata_v15.into(); } From 334f7fbdc5112a19f9c48fa04d3a4f7e53b3ff47 Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Mon, 17 Apr 2023 13:50:05 +0300 Subject: [PATCH 14/66] rpc: Fetch metadata at version Signed-off-by: Alexandru Vasile --- subxt/src/client/online_client.rs | 8 ++------ subxt/src/rpc/rpc.rs | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/subxt/src/client/online_client.rs b/subxt/src/client/online_client.rs index 703777f26a..fe2881afb0 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,8 @@ 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()?) + const V15_METADATA_VERSION: u32 = u32::MAX; + rpc.metadata_at_version(V15_METADATA_VERSION).await } /// Create an object which can be used to keep the runtime up to date diff --git a/subxt/src/rpc/rpc.rs b/subxt/src/rpc/rpc.rs index b21b9d4311..099890f009 100644 --- a/subxt/src/rpc/rpc.rs +++ b/subxt/src/rpc/rpc.rs @@ -367,6 +367,21 @@ impl Rpc { 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) + } + /// Create and submit an extrinsic and return a subscription to the events triggered. pub async fn watch_extrinsic( &self, From 15ddaaac9fe45177ecc778c2e5beac9255021f49 Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Mon, 17 Apr 2023 15:33:56 +0300 Subject: [PATCH 15/66] artifacts: Update polkadot.scale from commit 6dc9e84dde2 Signed-off-by: Alexandru Vasile --- artifacts/polkadot_metadata.scale | Bin 356565 -> 403824 bytes .../integration-tests/src/codegen/polkadot.rs | 19969 +++++++++++----- 2 files changed, 13563 insertions(+), 6406 deletions(-) diff --git a/artifacts/polkadot_metadata.scale b/artifacts/polkadot_metadata.scale index b0d3e7de879b563b10e38c65ea021b0e15d015bc..2d8d87a3d27560165e21ee8499a90c0be0d2707a 100644 GIT binary patch delta 95421 zcmeFa4R}=5xi7xowf9T{1eicVCXkQ`B#>Y-BoHuQKmr6o`3MkH6q*c~2^mQ;VP*ov zYDe1ImR4Ko*0XA>x6-SpwMUOwN=IA2=&k40Rx6%U+S=ACJ+&3965O zN-}D*P8Xm3XK!AAC?1$RZqnhrUl$j&3#P4jA+D^DvM zwVqHcE32V-$urcrpjp#=ru$#&o2s+|@(x6z{eiwJGCDM>iwuUMfp|DF;Jm5o4-5nY z@kn%7<z`FI%DB$L-s4JM$_DNS{-`j)*8&YVs2iOripy5 z+5Cc-VGarpwU`IR)VvnFU7@YO+r_lnB)xcg6O~;a>TVfoUaq;ds#TGJSZE+N6wBAt z=i-ddhUVEC3iR1usL5>Ai}3H|`n-h^KKoE#Y6pu)?pSI z^>n~oX*AGHX3X%@E#{Z-@2%!@#uB>2oZwnQcbRQ2KRsl|UDfo2`FU3reaCzp&p$C= zb~VzwW{G<~6`Gg0ucBi7yTbgX+iR2(-7PntqEfRYua>IK*1UGAH9wnIomc@l>WbcQJk%GC#hVQ6Id`hee&_XwG9{XKRbL?7A2YO<-R8IRs>K<%c_y!3 zyzVx=`PJf_+q^ixPQ2wd`|QQl;)Y=8rLDp^UT8WOGRa#xnX>>sLnG#KE6>b$}_(?ewJ90XZ~V* zrD)AFX+o1|%QG*;&*nU{e?pzumS=upLbceQXMTG^t=O4ozCK}|2;`Zi1wQI9|M7<< z=JfsJ&8rJ4=}PnZf-5L!o+_xo^IHXPQG@y0iI?Dc;iQJeRph-Q6yDt%$GYk63&dhO zsA+XLHW-L^_hR(1m`1+Az;LXyClu-;PdgqpZHIaLq;~2uU!CMf#if(iQ?J=GxqW6I z)pSJmga+E8(MVLw(`s6y;dn1FL%7?}2F)K%uA;d4_T-hw-r|{$Ez;+i+tQa`6C3P| zT9cbuo~l-?85#)2whaXK1;TxSU40>Jf`&~4eZ%e1$i8qe6g9u?S-*J2s=&ZNB)%#d z3dBQeBYi=%+_W(gZ#yu^D};;XYuaFb6PgL6I%Jj=UX0%CC|phlK6|dz^zJV(pD4VG zt}_EuW|iMSD>e=C0&VFC#P)0q@UkOsG!z@^i+|L-Ysv~MAKhRYQ}?Hyzc}?HspmCC zUE{9PG$Y^R(QYswD5`4wsNvnBD#*vq{e;m*LCVkHw8zjsfnjL{0Ggo%HH|cWf&G4y zIr-nbW?6A5CTwwWGyaVfFU7xKEjH@c;k+(k^Yb` z&>z7Z`1S{4zW(q)JQVcd--s_T;0ttj^C!P|s57Z}Bq+cvNx=NnmtuO=M#b)!4GLOx6c&^Pk*ValVmejfmf7nzkWo@m^i zTX(8h?#O)G26smTXw)zZrx(wjWOTKrhOHnnWPkU2*TrH(oNsUGw5uiqadt%Ffj(at zZ~3TGnZpC!Sc@@qZ`ZJ|%YtiHosVBKw(|w}F^JIsycmpqN(TMFYO(Gxk6l&2#bZ>D zR(&w^*QyVOc8#dqyFSvrClf%k3XLuWAiI6l^*&?@1^vEl1N@YkU7up~nh#E&YN!wA z77ozo%ty-C>UR|MniE~qk5$gR6gb@MtEi=xV}Dn1GZmCmt1lK0>IpGH+N&fkd>+(W*$ zXkZ<{b3oJcw{zwE$=4H!`r^GI-|jF@37@Kt&-S{U4nd^|8=f_pD9=1JyNmM8S7+Z( z~evSpq_--ahp!)OKh2{=OJKCagR8MnxR<8+pl`NSOmy!$eM zR<_HU$D`!g6^Zm|+I=8k?$(ZifYG$C%NstXZ^2=H$=rsikC5jwtT-TfK3Zdak$98& z$+C*P0U47whP5Yr)e?cushAS>uLq9kF+XbJeUztnlevIeB z`o`jys3jK7De;ndMSbn$U!k>Ev{$$_?KSN+^E35Js?KJRkOh(b1DR=W1hW~9y=lHy zKY!v`jNGfei7Ni2{mHEHZ=0BrReRU`q`!(*AA7*Rl?2f-y`fS7!&WZ{;@?j$xL&x( z%wPCgqHY7ITg+f!Ybc&iMQAV-ok-N=yxznwj20*9QyKi^0YTQ=Kn{z=9UQ^j~G2YjGE2O}{c6_sL|Cc&i6P(K&2)@3Xd_orH0)fWl?pZpj1YqIgH zRKF5qbu71E-Bwrp>z$$<(ZE0qq#F8Hz?5}pU*{OW>jGHzg(E{aeQa1eP%MfhMu+$M zjo2c&x!(`WJ;r@b2h%VG`{8tz5i@T;YZ{Fs<`0X*SRQ6q(-8K5*CMa^dQ&Yne95A< z__u3OwU|hf?$EtgXRip23Vh&eLQ$|D*i1f#>r)jcENn(vjYH24fglGrkxp7U zgr*gmdzW61Rr$u!ho?4BS;x|)yqZ9@fk+MokD4bJ{|ml;re!<+{qu!a6=mj05iWhr z*Ny(+-R2LW+y|Gu1p@y6N;`Tf704s^>(k8x7uSv}Cwh(flNxiy>N&?wUcAROwH$Pi zs3Z-4yz#wSHOaGI)60%s(}t~DYxZ3-m#U84dP$33(Xwq2dovVVH^Aq|zED2Z;i% zZ=}u_4@7r|;yZTMZNsT&*8{>Zryeri1hul`YMV^kvD192alZM_#e0exsbEDeYsCF3 zSOIcuSARH;eig{dk5OsD=u#`q88l-ZYjgXl2s@*D&my80?B?!0>w*s4m^=a4)MsA} zcxtA1LRjwuF;LEFJQlS12_Ura?(jgZ)krvosNx{1Rb;ruurvi z12^VmN}cZMI{cb(Lu*Ez>8%}e2J7!w9qJBq?^fevkA>syeSvO9O>)-9$UA*(Ab>0^ zsy1%o9@t>^VTOEzs<woobKuhHLF1z;r$tfQnE;!3y11W=TR9JiIn^ILs1Bt& zZ58wH$muaqg942;Z~tXozUqB+Sr~Vmzsr~l)i-~$4PHg;fr>17|FGNoK02ZsgRLV0 zrpUnnsMi(;WLvR;u*5z8|5@VLjMx&x&$!74T++eM#zQ@_yutWbhykTx z(OEm~QfEUO#v>!PNq=M?*cHVV@gn6_8Dv&P$(H=h5ZLsDqy08K4F%7-v3HA0b4s-C zQgpsmV(!=_Ea4cp0Zgf??;1PvXh1m1Ki3&90=qYmDDQ#@?n~GQ8*s+fpq1T zm5k6DF*sL1gAr69IIK`jU=WxG%!S|As-D23sc!BWyPNsOL@+67{FL6>R%HOVY6d+> zVYM`c*WDWm4)rlFwk32;sGCm^)!>e?8~opf%Q*8N8tTXUI=~79Hx0$D2G4&qj988T zp@|r8{A6?pF*g$QMTQ`c@Ii#c54%FVAl1qQRH`8K=?>v!{=Wd038rYAmG8X_45`!H z|4E<}F!wjwve~0L;1A;LF6oEFA$^SfA379vyboLqF$-@!b;PPJjYQ0;VS8d5C<@0*gzgd;6od-ZlEtb5Hhr<+~$SP`%0ZJRL~b1 z@IY&^aDfH}VHuf&&-*4lkrM2;65VeeJhQ`m=lKd_Gtt8;G5pg?V>{7t^YE)X&42&t z3}YwJJ?hK8pOqVjoNRyina{YH=t1=*_VWtkPA{r>00lge-s?7?<4w0oR9Z@nLyEk*NiPQlR z$jF+hH!!s0cGlS`T|!3I40XZ7LP36~S^KYL#`D$ycbND5>rCUclbHRh3ge73kT3nJ zT->aiCw}!oy4@^%vD3WcWgjMmpUQq+E$-FL#FOTYFR_v`j#&H9bscu=SJ6ts^1 zW}$JXVFPv5D>cRugPv1gzW>TR;~9fasKmB2HD>Ft1LiNz%r#!;mxo{NGQ+P{iF1be znO8qE?zc0<^)B?M)BMwKD~uamb_M%in`sj%u;Zjkn&7QNB z#xqWd-<&NGtz-^;ucE>S9=1Oa-D9v6o*yz)XPT$iOq?t&^=nPDXZuz~`Um?$2g31T zU%jtuQ%z%Sm$~`-CHZx>e$O2Ie*46X(!ygt^Zgl!!dhLyN~rhYfwQ(SM$v4Pwt=I#+>mw((nh)xT#6oz%QD#&GgxG zmmAwy3VY-yUh~;EFBHHDFaCa(`OLXTM|pp2ly|dq!}yAM^4tt_?wga%;G3I9%OhNd zS@%}8{Oo30U$YG=1xr<8K&^2d<$E?p23S$!Vd1i&K?j2FZ6_!*mO!7m?%&Q*!?C4* zgz&WC*rk8+;m6$b_K(C)GFQE`Rs_hr`JF{#nB=E+(9C1Md`D3F-Ldj_e?#JWI_CcK zht=y({$+kwi1OD3X)i%+0r{V4FeZ#p0d4AnLHuiM(so zlSWOk5NN>Q$S+!mZY!k)Q^KSbQQaWKYy&9I*!i}dRO0PN9UF)GcZH%*8$;9`4|PI! z9B;VoCh}3kZTC~j#AfoY4)2C`Les)@+jBH~TtC3!_Go+Qwtu5p(?%0}4w3W|m5;Yq ztOjUcR#%G+B)>qk5D<_jiI$3kBnt$URon<5w)XY0@`ncsm7S&?#D7M9U7dC#$x8&q z#UYZ93i3~`p(=0=8!$Hm=u=A)5MDt!i(0lB^oE*VaWlzJyJ$5v$bWIsJGI%nq{`V~ zeii~K=~+G%Kyr4NWT1q+@O`s7WrKLJO*HC-PlA)O?X|LBmeg)ZNBY`U&lJ{OCnk`uW3 zBl|mp&;j-4lP8EJVUJ>35%`Ls&{-%?mo9Y-BeXL4n<;c*$s+0+tp-^;mHtq1CF31i zeS?}IUhQU4Qvnq~IAPUZnaHk}8lWKUgd!{y1;>~3&AW}ZLe#|^U^KLQs4oz8lvB)6 z25c3JEdaR)gt;%!7mI-5+5=WIfHGFCsY1IzwqMNr=WG2#F{a>E)iG#OS;NB3*mcbX z6J|58xs}LsUYfsJ8%I~PZrQkQ<0VUd9n8>n1DwpEt!``I(zdF#qiuDiZ(A(n>jDAR z9qP;gOc&T%SULoPvZ9nqou!kPIRnk3&49=cP}>2B4f}?N zWp}tI4DMuoYR>kALeM(*DXC;;lO>}yse8A}$EQ4GhO-KJj*x8KB#J8CzCl~5ij|Rqj5FbWEiMDg^rG=yTf@7d zFYfZ+B2Ruw6x%A%l)6>hMrykEgY|*>E42D#$kFyMnlRg5VWT)CYzd~r_7;s$!5I2*cN3qF#8B`<8G z?s6`loebe4$xIyrLz{mazssyqznR7F=-t>>BmZA(**I$?4Glmco3WR_xb$9d(B zCR#UYJufxUobgV^@nzDph(4S<;5!%5TzPU4RZM!2l(w7=0<;Nb^1VfL^Jtk1o2;EM z5Mcv^m{!n~e10+2jaWLKW~xZ#4ejU5+QjDM2b!sGw7fn!Whqq(8&f9NEu{~G6O>Q4 z(4vaZL9WHyl+QP8Qd?=z#fqaK%yQ(MW%OyPOCDcFU!^J80DY+5*D4bi(*-qPk+N2A z&JLJb_VX<&gKVDzBJCrsv^jV5FSgQ^$s1PEZ6bTYB^%r54P*oX9?&mvN$b)&$F;eBDK#TcpW9SVal#C$Sc0T6a^Ga$)XO2O;1C%n5$ ziCb+8A`8Ax=fZcB(ol6l=n6VsSsMlV_UkZulONwqR|w#qmo`&;{QZo|4wLpEDKiXt zU<*whcbs2(w1){sFf--Xwon70pq|B6JfBd{P2f+tGn)pPUBWsn0KXI&1kqT45gVvc z8LetC6=Rt^Bg`jN!39|b@6IiE_lROokr}Bek*{y18NO$*-m!$hWr8^XI)Q;}23x6B z$(j!OZDICu+77f`zl|=GmtIK~(|i!F9{^=jGdKjDWGAz!V5pKCE+><63NAyzcdnqz zWMCW3v$%+7NVadMd2~{Ka62s%dr5wCJ6%jam+x$+wc4t7-bE3>F%AbDmNmM$gI z13O6LG|?mGXWp4E|Hn?63#K#)rgS=ueEr%^3cC`gDL=~)rV}P*1Hr+->NYISeG!o6 z5ZJae?DLJa)L?8RkCsnfUZ~+<9Tj2znQ3j{wd`bnnP_ch@s_o9zKt;AeR*VC@_z(r zN@=QU$}eM!3TS~0?F`Wp*$JB#Ssx@nSZcX5h}C?C4g<{O!!=sV^Iu8|K;Nf4z!*_}Q#PG+75yQ`TrMZOsU=R6< zotYjv%8BE!y^VaAKyM}r`J)~X>4id0*^Sj!E#yVJY2nnO<}8`kQr?z_cGG1AAYTV| z$9q9{9`(tWcGIe>TQFb=RtiYbp{=uuZXJTj z<%YmDXd^ysD^0sraCsjxprKw!BK+HPYg`@b31Cs?R@^aG#k&K{-jA%fEw^H)E4ei% zGHMR9=-A0Pvd-^v-!XcdXJzV4+48b!r{ctYeF>Q2sB0+#fwQOMVBqU*#W zA+Na^#NQGj>y{Z+VwsS)+)Q)Jy-Hx-A7aUAtbpo3<70EEltmO5=YvRr3b<9sb2rlh z>PjyEDwPraQ2tAxGZ!a)IAi>L@>)BqcEu< z#V=5m{GdtK)Z~=k0g!B}S?RmLw*mjP*LK0?2ZH0JKaqhi(_-<7dO7JVlqa`M+`1I_mE`CX94jG0D#MGDdM z%fRh4JuL&RN`CP;O&P&;-1m7}E$@7kswQSs0oL&ckJ3+b80h=t6OYjaweSW3R`yVn zGbrnH&a^zVJFx!06NJk0GmleA3Zm|=bYFHS3&e73PojRf)F0Es4J^ z32RB{>x5+zDvv!$6*hZZ>>XVgq^(cVKhX?be)1`L0;IuZ-=k+qRzFRvo3q)NyEoOW z!tU*h?5gTU93ne#))Fd2g&p9y&?zB+CYr3n##; z-ca`*7;wblZ>0=i?Y1y1&^F2<(Qdb2lX2I6K)8&a% zSQ?<#8b2w#@|{z(Gewr|{Soyz33mZ#T8pMDk&}K*-*kj6@)tj*qnvB=L6rZ>Pv}{@ zNJ;XR=V=^?ZNluo#4C^el&a_~TMieQ{;mm}iCcuUWXjLzXj%5yY@t|7R2gc?n_r-k zB6Pi}-8N`l#}pwrB>AzQQ{NZ@wHsfcict!QGWpO8^x)j=26=@jF=dhRl>!rKIT>Yl z7#g^eWXX$Q&_}7*Xp)b;L_hRoSA1W+{D;#tFKPUec2Z)y7~8zrYuOch*g_ZnY?`qS z160RVKJ5G<&9&%YfMInzQVIl)B`*}SJoP&T4Ypd=(3c~bYn8oxs-{(y5`R*%Y9H4s zXAICC`QOFCtWu8+&~!sR{c?cj3$0iVUQe}a_>HAsQcFx3-tiO5&;3|#mMOKz_IQM4 zbCYs)O!qH8ZmZ9{QgH+!A;A%N&D+-%>a=5nbX`juArWEXs~1{f_%|wLnR1|H`bu>m zx%FE55hZpqWu?A=66*j_ot=w`I;Tf|Uq?FO>u25!^r%%J6sya41E|Mt03FR_I#8L~ zPi%9|5@}l)7W8l9mXrSLsFkQ%LB@jBbqOkGW%7yZY1%jto!|grM=BpkP+4o8(xjkD zkdn%l*K)D**Kopu8wAB_2qWPpno+Cx5G}A_1KasAU?ZD8L|2P(Byaf;EuN$%XfP0i zTEefj${#77as7mo3c25}~?1v~D66Afq5Lh)91fUXN zuPQKaV~ifo*2-Sr#ybJMYA0DzJk=>Kj5BA*_6r1ki{*n=3A%m0(_xVC@JH_MRR9Sc z7=%nS=wtqbl{FdA^r|k%g9Eg9-d%qcGFHd^56QwmQK>w018qq-qX-M?u$jzN?CtAp z0oJxC^3F5b{x#x3dtd=&XYBAk*mi!cU|rAB!Fn}h-UiBP4M(kItXappw0hqxW-irN ztTdZ>;ZFzB<&w`Gq;i^e%etOAUoXVH`$BN(bBZO$e}sNd72rsA!=W2AIUG&_O;ux; z>UWo4`?;*Vk-XNDZ~X+#NT~gwAcvi3jT&4s)~Ll2*RfL3@*;$08?}U4n{MF|Rf>1E z(*r-d?^*l&tS>cba1lvyaf}?W8`DECL17HnQH3k#OLVhMcHKygE`>7W=WnFY1Ozb1 zTuI(dW3IUK%#mxwm~$j|e2nhKexQ$2kp-TLkJAO#Q^&`tlLFGiE9IGw(?x}9j5T0x zY_R4+wd$i|t-lngMhtPQk_wmYJkR-JzS2}awZI2EL%489;oPQ+>K^TgS1V4ZK^}*o1MCWxxdaU)52IV1ZsULy&;&$*4!E zT9!c90;6?BP5Pmf!OUB|#ePaJYvpWXGv?6ntZG9uclk1EguM-H6uS4|H@9_2 zf)w6NaM!HW$%Io{vIJxY!N7=e%ux-q@eup8SNVW8fS3WB12$}&cI-j6E6=Ge{|<}J z0DLk4m4Z`3l-1G}MTwjbR7zBl)yG{JoJAe6Gm8RiBB1vAdL@&A)-+4TLA> z-bhm*pc~o17(igCy zZyekuPEpLZb7W@B${1tgN$j%9**ns2A#nM@VVW{mDVpu0IlYXn{7^r4`917&V6E8- z!+Y|4J&^w}SCr1Zbu)Z_xp`C$cO6M|&T;|Hngq9|siiDYA^iUa+rjAM9utaaiak z6S-N-<8Etpgbv^nkIn8#f_=2r`u7E_UIhJXAt^=d6sW7!5@)9>Ot0E}I6iVcDm8c2 zxQr2~Y?$o#+4;o#>-{b0y{g&nz12!izqQTOs_;C(7V1|>1j0}DCIhv_dwn1R|L6hG zJ3KZE0&6WVbUor&eLW66K!0tcC%v874o&zBn#3Rxn9=3pe?KV)Ie}v z|JUkI_6qsV1W{Q~=8f4wx`v=GEf95LSjcS!;%afd`fXjiV7cbe$}F^sI8_H>>FqeA zL!%ez@3c@@Z0S-fk2XzP!8$;t*s-ZfL%UJPi4(;TE%IPHdj5{MKhOPSq)j#0bi zwR=U)4WRVdR!3PmffldofbV4t+I*PSYb|Tw=@;1_>kSWD--Xt2NeDvGKwrXop=%AT zLkeG6X+x`7&t{HR%B8K}lG3R;r&|;QTakXP4jc|zRkszP=Cm*_~8@wmRh~WcjkA#)%q(`=yt~OgU?^sG1BL z0-g|7vuoNRVLtrn3UkhfJTOk!Hd)LThlRX$vM8s+^7KZ1>IChu@Dv>A?$6)1(ERGr z=EQA+sxD<=Drigu=DIEQwdxw@ZN_)1@~j2=Mnm~mHX7RPf_zS4Kso=)1^LOD$2j| z!m|HVag=`l@;uudPU+M?7Nkb;4oWUc_0Fc-;1Th zFEF+^wtdSbeGzz8z*x_UYGi0fu+>sS(8g)noms*Fe9jdH9DxJ^!hj%yAzyi$O{Lf`ve%~M(<5EYSw(iU+b(o(tK-hm@)Q)iTVI6N^MhNDuTTll4jx?m7WnV zkA7oTL+(qvprL8^r|qC19>M{LIebtkU)_W+X8YwgWXe*Ex(rDQc@WmG6{egX%6yI4 zENblmg+Af~sz08V7eTCHg{jPx7r|B(%d~la!uiZaSdpjMg6Szfp2aLWx%cW81nq@}tu#knb^-?pkKF{2FS)Tmlzfy~MR3yLquk;Ne zo)q$iU(-e6DIp*IHLVoSi6s37{#?i*E6>29q$#=l4Bf8d_b0DWubAtM4Qs1tf~^5cJ`p0WM; zl25%&Ck^h<7ye8)i_=1$_?BKGe>z!=FZ34e;t-~+tHPR%y)5L8zrgu#ZSsb{(9M*i z_B>fH=aN{M>>+U-!E*ra28}T4!-8|xTe3(OeL`5(%+f{EYx3YS~eIRKNQ(MP82!K3Mg&SeP8mclC|h``uYyQ%aBW5X(=%L9v8e@l&dLD=^Z?TI3i12rF*( zG9LdjRzD!7oe}celf^|TeSD4ddc@art&D!`5tmIn8Dtj6WddkxFFSX6;U1bvsS zSC_3b#nkC#{ec4>O)EERvE97BaBNPafeY=JS#m9<@d8SsiG`F*drR9;#p z{M3>hE)y%?Z<)d}1`OJUDp4`a{oJLJ5$;y*y5u!8MaAg5c#G2wZ!_0sdlCXdS(O&K zfPihSs>rKLZt#gof2F>n8r8dSs4s}k=XCJ&Y*91=HjsFEP^ac~_C%~vZ?ycnWXUYi z_*ZJKSPk_7JL9D%2EqI?CI*d6w-K7R0Bo2&dxvycStYXU@5Zf8ZmANh#rvJ5i|2|G zyXF!xer4N>CUFnnu3hsD1S%jz!;f%~J zgS!ViA&=P|ibA4Td?bA_1<1R9RU3;;1VPMZSl6y-nIvrXb>fd_tXjN*%H_f-k5YC9E}qT z49$gvt`Z9kZ5$Gy;qV24#8-1jReoM%XcO_ltrCk3tq_SkmAKH*ijl}yiDpA9MPi&v zEHSilB*tq++-9P|&?=FfU?tIqYNQIR6gp9h)I=+VUeqHs$x5LcjYv(lQs~Gcq&!v% zJ$VGNBdr8_vIL)|SSfU68B$ZN)Dk11wIW%hk_*rm_GT}(Qs_$?zD=`I=*v2!N~{$6 zvH>Ztl|o-OBUNgp(3fpUO}A3$%XXw@SSfU7CsJir3Z1D7AX#oD0htg|GgWFKIuk~! z!b+ht{kpt(fw)4=7(Os?dA@Y?7>{bUFqe4bxzagDzM37~r5<^1bV#-EmS;xKQ;$3^ zI;(;6)vV~?I`GIdqK{XPJRSN3^~iIf7eM-f96S>`q&j%yY0xLBN1g+HvU+5g>xJr( z0j^I`j|^-bCQc~Eu+@vzBLh~SrXCrpdWm{ukm|S;0eKmodZ~Kcp5W){>X|{Q&rpvH zM!ifuG7R-{^~eC!XR613eymWBd+{i+ABOZyy*7x{TvnDB1OA3N|Mj|tKWrg4_K$W@ zS2$vh4_u?VzJdMPZq%_w>ZmCT!$R<-@_J==ljs&ehzhy9*aTT3qTf7md9jQw5?%)} z$#>SlndPu9CtfPb9cl@#YVDVbHL`WFD3?>;qDAuY#TbA?O#a|PF+tp>o3CG4lhm8V zEh#J~Gr#wQP*Q0n>6vLwM*ImX&t9 zZa#38SAKZCXmTuX^D?MM2wanYS}$TFj+=cO#acOelPE4v!DY2#H*kRl`(uID3&kv> z{%UcjE_*jY&TNssUREC*=**=`>5k+NHi_REIV4o_e|Cs3iE%6J*m<4OgD3;U?Nel z`+Taxb1xk1my>(b8?&@PQJlHphuj&{fa60a(lK>l4?FRkE-j6Vop*=oe-7<|`4dn&d8|X{<7L4v5kbt+{=# z$=`iMRLWNe#HU(Ehi8LQ|8-h0grp`7%$%9ZtCEjL#4pC`z$1eo*81fy21Q9`Fsl42 zDfWuTa;%AMw$bv!LD;aaz)X2rRLozL3opmDF2^&R>JXQvI~rD3Uo<5jhzeat8`;Ut%8~rw0byn&8$KvbyHZ~rz$amQ-J6l?XCD#JTczsw(8okb z7x(M(=#TUw`Su|(XG(^Lp%aHhS!1tAUiwM#QZ6U_xq7+kCUL0`L7-W+9q)t{Z7Qf< zI&k)iN&7^M#?#LEE$@QNV&9t}xEr3I3>1~Ej4jhKiu;uqSvQoVxY1}HV$gMO0pU|Pd6PL*+ zJ}Zm~uw#TwH5!L&oqYE1#By2xc~K$@?+`0xj})JoS!J!vQK4cqB{zLeT$&qNfNhv% z{O^FZ(84&KYaai3ap^?1t$~!8Z8&fB$-w7D)lB=shEZ#W!%^WE#PRbj+6Q%Weowvp z=^bKT{&Ag-vJISk;%8V1zB?f_Ib&rN62&x_tlKQAW8mF=<@PE0>Hm!_YW zRP%G0s=u)TRBkHKxQr7C`_qDT8J`wz%Sbc@G7^jWGZKr3k z)7&sxKUMN& zF8MMNI+Nh2fg7SsaF8=Fw}K2e8s@EgKBXTrtX=Yvd&Ml=H)2I#p)yN^ z9CKc1HyfFp!;QuW0_H|k4FdEqH+!3*;SXz1yB++cA^-hev7XB1+OLW^;!eY?>?@Ur zzKX31x|i{L@;hG@#~qTmGfMU=+B$3+)tEpq{DL!R90zEnB=m5 z6lY1?W61eOAz~{_UUpQ>qKmeQ1#-9ZrI+Ye_zk6t6jp(3?E|u(*e4q5|r8 z2dLWTnPbeb}Q9;C+AKF2|8}j>QsI9 z^-#;T33bVVCn2<6{1RX|YPl}>%58<&*415>Mt?)#03yWNR_OBne-eK2upwXgCrCK0 z-|3T-Ke|03*1OW=#{UV|z_Jy&hyw`68jwBR`9%t=SZHT@Vp7#M>ax@wT|O?WT($UL zz8m&)D^F##iWuqZjgiQukGHbOsi0?hAQ2Ys`-ru&L_1VHd1Wn5tFT z)hFzR)HZ}QgEEXoW4TC9S$5hL`Iap!vk)F!Q)r!K%gNhv%a+%M{Q|G+u0t#Te zWZ;5yClVuCiu4qt$83C%!lwwX7#qTR+O0G#HrfnD?HO{+*KNlf3n;J|eWD9%z|PYL zq|(~g*X6^|vR)@*G0gQKW0)>~J8J}Tt4F*tn0eXtJZezOD#q>Uskyxhjn91W zf=FX!rM<$kV%u;=>FHYd3shii9-D~zpairM=?vW6E(Q{hnXw(K?1It2ex&^fc(`&H zWVH%{!46MA)%eR877U>4Y;2_vFg%nL*jW>o)xq9SqCXbug94W4W)WE(wN_Hj3h?{Z zu`y<5al{tvMadXnL(>~#439t%7_jP5Jc4zdhEi$*QbP|6AT&mI!t#B_+sw9|qm_rA zUMmbXG-P2Lt!}ojHM)C<)m|~}0QR=CiRyhD)V{FHGr7b5llTlaFM=h72xyi=Dc9EB zmq;JBe&780KEMmQ8;(L6j;&Q)vQKeGLtdnoCSovUD)%&xhqAYsJ>`l3VCavsdsRh= zE;v~13h@c=*8bqr(Z zyV!N3ySoG{t!Jpuuas+PRGRywww+cDCYCSXtK%z1QYua;Hw%m6 zj7fQ+r7O#r2rOL;o3}&?!ScS~D0@)isHL9zmH@W}*E_^>OnDC3dNmc9lH2IA5A3d; z6d!^gtlxJ9@CJJ)rM@VfWCbI^CUGiY?K2jvecWesMo}$*4J>04SO@SMZeOEZW4k3B32)Ja=;Not;)KL7f%^<%c|5$TBUMsLBHL1pBFYk7Q56LU zu~MBoEEUG~``WECJ1Jd=CuA@Xw(d~jd51>WTGMfLVX5jAUZhJP=%IC&>Bt^n&126@ zvlrF1p=iXP9-=&Vnb^dP*14x3nF6he-|6Px@AES$i04xIkKYp$<>2>V%?zr~dD9?{ zrxO#a-$y`0kYY~ZiPHUjRQIU$CNbjFCQn29bP5H**j|}VGj3gFlLcT+bG|s}724m` z*=0ZmKntv$$l`dP1jk#M6Y~B^i{<4XBmZtqd&=tO>UOkhlN#yOoMStPh=2`@6`VU{ zGjIY`fl88hy`xVP&lvJ|=k&7VCEpic2AwV6epZ|m&l%=RiE{a&H}y%$e>;hpVA0o+ zQzFEoulyg06_lL%6UbJnDmnZ!;m?EZ*jIij4$#prSN^LIbX3lISqvt+c#8&N!vo!j zEZ(icXTm%-fLpMY9o#8{*0%E3mDWc#1@4bQQgWBG1y$MJXapftaQIod(oWVfzl!r} z`DaF=IDgZ1KW|WTU7PaU#8s(Q#eQRuD{jAhjqTIP}kNt7a{&y7u1Cn%npFAkQE> z2Sc!tuf2?+WWT!%3Q!n&TP1MG7rt_@Qzgz=B{JS+m2kr!A`t6uI}l$vd8luXH8{u> z(Gt&KNn_J!?NL7N&9u6XeO$IaG!OZVk)j(t>tnkb038h#@gPyK z^i?rKFHZGuJlWcsRny~D`plpV0YFynx{y#+9h9l7qNaG_^l|=7r78?__v}Mu)}++ zo94UMc^5QjRSYJG@WR1Eu$N^^{szc<0>g|{Fi{O;tkno7Twfn6G;3Yvn(OPAamYrt zWG9@R`)t!``%Oa#L7w4qWL@In?GLK$gfeTAcUSBR6UGm)9+^t#%TIQw? zc}rdzH2B$Bb&|+r?EOmlqHoBAt(CkFX1gEFkB4^wTi2BQyxTtyCAd4qA z;3Q+*pwaqXFi6+JQ#8;A35)f1nTyu0O});@%S5fclt6`p9t(!nx#SJ6i7K(#CI9|4 z(N?m=HMUXJye7-0Y6GIbGOFtUdRum${L@-pR)IEGxf$ zzkgj!&5BsMS-qd_ni@SE4gEPKxtOW*IrL{7~Ao$!v| z$$0}VEs)9^{+*aBLN58)-{BAryW~^96Bl!u$8O&A*(tu%B!{_dze~d(zWIij0Rey6x&bw@hBoYyi8mlhA4+uv zSuUFHG)EeO;;Xa3uB1UuJ`4RCirJXphBw4akAdrpEg3JP30w*FQevL`;#o0oTH0-m znABH`XoE|>coxB(h1`5jOy#xIb56v@%KFAR@!vDDe&zS7?;;>>=I0t2e^<MI@3F{vvQg0Q@vb|FXEvg)4gWpW*d=LVrm|I{9h0{uuc(;Fh)G z9VbBC|6xp%(>ib_wNE$llAq7lzep$!tgr;tD=e2)kl$#xtDcziKI4(SGkMw z6inVcMF%Y@2sh9GB@8gHR&ryf5p8ndGSo$ zi*HxX)XVr=;}>RHS&H(V=xE8W&D6IU*;rhFJy;N3K z>pw&nlYgw%XX^Y=Qma?1PA{LQNB;LZu>JzQzc6E-JP?san&kH`(C-E`BX#<)H?w=` z)9i%n8}<5yH1EMI1bTcV0zD3R0f8QO$$%f-{-ON1U!R#6<)DLmS6g>57BIAjUDOof zN7&D)fVdpT{$W=tXm^qNm=VbRQJ3SNw-C-VkD^7r5*R06JCW79CsVzH5v6^>*ppWG zo^;8@^Yt1#M0ll5wG>ySJN1+cQE{wJu~WGfD;)iL$|WC}ua|qW9eAE`$uslydEz;j z+}og6j4!i~)pIVnyg_fY-(SGLr<<@G?{Ui`D{uwXI}Q3n`WRmqCR-LkxlQ*0!oERQTTO4sD)Uk;1jQ@G@7-vV3=#zE)S+rjEF?fI9(!1pkmIQK2g z{Rm$8l*{%;UclbSrO&&vypf+zfBpBPHHjB6$GPstS?{#0lOtZ<9wyFzuDf#*>z=)KfA#DPubqa*;T)<6iZys3xVuT*zU&ftLpbv z^McgeXE&6cg0;m9>1DI|SmmsgslgZ?#;08-eYea!dThot7@K9d=-T$W%9Xe%=Tpjs zxb*C3F2siRvdet%_-ylIU!Qrw8JrJUuEMWlA!oP>Yo}cWmQVfy^Tn^1301V(oOQgU zbmQ-twJFQl<5dsg8daCMr`j2|gzMiVuZ2U&`e}VUG znKLPlpKaQE7WlF2QoVAug;w5jQ9GlRE4%w!?E6<&LDT|ADGRf-y73*DWyE(Nm$zKz z@4itk-gcQ2la=G&2AUV|xwQ9i((l%r1i8(DWDS1g7kBHm{QEupHsPM7%|oH6^6Q4o zlB3zjLZxo0gwmdXLoI?M5^#-o+!GKj3uL8Ys`f9xt^nu(w-6%q`aED%tpBH!OHB~7f;cg7Lr$kffGy#X} z2d=@P^}I_y*P(mOmT#6$%^ZQcF%CV7Tm!^kV}AOZGesi?9MmgHQkB*1g70__>@Z+g zfvms1MxXCwN_#%r71={Eul`mg@|e$lt0b>G1W^&je#f^Otyg6kL!QuwlMNZ`9w|+~ zH9zo3)u_F^qh0rM?gt*Jp&I#OAIPL}ZuwrHK0_>X%jx}k6S?H3ew=$Qv;WZxr<0rN z)Opj2$e(;|r5Axz_k`jA`D2fkauuAn#(eM53jACCSjBpBJLgS}ijK-5L*rR>0FS%e z)WU3Hx@xeCE*OHLH`=&V4dy2vE3cdAM$A*LL=k^*fhS_rpwko4vTGb)8i!-#cpb{n#8>YEN*1tsyLnV#>X2k zaF7yd-qvU|FwCAtX*YUdzlGCGscxQrd>U@4`P1Wdo(#4Xqb+rt7e7(W%ev=@S)$x+ ze)5UtrgC>Cw_NES!7W#!B>KZYM!u)otyQ~^H6A(vn`QG4pKQXvHJ|d2uXU#o-k+an zg+Ha)dZKY!M)O)@dOV*vF>gukOoMpCg>*n@i`>-APwBbh))%Eq|MtZE1tTVD31*l} zWlj`|ElC$!|Lvt%bLJ<$?N3;HoU3hhy1lRf_{LDiV;H8^=B6uo!K}lCM6DLI=8kiRkki8n_UMz(d4KN)Xc)fFSWGIeMz6#U}Gu#0!z(ASbZN(aD!bN`y6g|r$V@9EzIQ>TH9cuwZpkrHp{)gMa~cF7yMV@zT1R@`zDow)O6Eog}@zry$)`>T7i6E zqh3;Vo10doSIQb(yBI=vpiBgaVFCfp;Sj0{H^gqUkXLHBKz-9!7LbSIypCR-XMbQI zo}ND&HL<5HZolZWB@6QC9=%GS@@KyVUxE}Y6~4@B@&h>G%J_7vVFkL@v;`r;qVcu3 z`UGxhEFrzbM{;L}4HIePPjM@qyt8_6C~NOs{IG+D(>S|@EWA{vF_5P-9i z5E=pJt324R&znACpf(Q1m~wD%Wx{)fa(IG2-`Z^htQUo+z^>5cxWj`9z!?aYgzGOy zYyb;@Wg0X)Y`iqa_j0Yl`o2jyha1|+Wu35Y&{__+K)bHCXfzUqb0CNa$94ghW_3RG z9`LTv+O0}EIQjq(G>gxMph~$BXlDc8*rRf;f&f(WX?1GdSpiq`VXPJj4)ujP`Jzn= zvn7<^@qJBMr863~KFvvV!C&cM@1jC|5IUpO+?>RL195)Ep&CLCA6PuM8T5oKPWu^D4WWH8)qWJL+8(`u|)R^M z=R?Zw9Kj36BGBgHz}-9=g|?Yb+HG!aTdE30p>5Bl(01lhXxq~TK%q5{7%}8X85Ek~ z2$~jfJR)spx^Rj_yC^Uki55uZ%otiOCFeDdJYM{tBHya#X`vL2k-@EaJsXE$cmNM; zwZMVAaH2Cs7iNm?!UV4LQW2v0oP;jGO`lt7nXoWLV}0XKbv~$rGqNtnG&DQWKemKo z5c`aZ7QuCevuMWtY?^U?Kim=eF?E0?|A1)R>(=(BVC4m2jKHf!3ejqGm$~lH<%JE7 zfN2d6&CoiIee+N=C2YlVv9`j(+6rx~!4=~nxSls#oyT5X!{dYddBaAa<_%%kG9l0l z9MIR>C($}kDb|(9eIaUKaR=RL(Zg_R;nk#93|8Ez$JX_3x*=nU4K-&h zEuIl5=#{N^`uNN&@d2g38?{K0I^|M_ToDer^wGwb6Jwg4uiEwJ8Ka#1c|9+YAzC@e zsAbrVW8dam7UrJ*xKDB`3?`vD#ZI#ptDzlo(@i5s>TDXd0Ib1k%^kRChi?lAs<&Kp z#rrD@`SYRw$WU(1+Kj+;xemjJQ6u)^;nYw^A*Z3EXGc%xWFCnzv)PjxFd9mrGOE9} zc3Wz*o6PIwQj{rP@Agr7z1!2Je|w@V;VED>#I05b)mHn$h2^CV9 z1!c}Uf#15S$o^39*XpZIG5!b~1w0dXDuO)f&U8<~UXDMKg0OkZw`-<2#4%uhk6Ve? z&65vITZ&k4EM6ycIVE1V5IJT^3D*IymXvVa{)E=31qzez^^CK=KGCK>s!l#DzzI+b5%JDea+s{HvEbk7Lhs+|=uou!I||pJ~UHL`t0?H1ol0_9RY$m$JU%21|P0ZM4y8NH_8~ z?J>0HLE8X^VCP`7k7tne&$|nndf4*-krfr>*tt`2r7O5*r#;mI3|gBYZytgP>}%qT z``A6}pCa+Pn*;5Znuj*}DR}ImjR%N=W@GyRebl_G{WfvVeeA-`A9snj+=%JcjF)d; z{&9}B_Tek4X_5JrEAE8_^_DAdw*s);Z2i=jcW?i&cpJLotA3UarDZnkTwp$bb$|Ao zan3A%)ckKdhO)kWSG?yww($cVT~OY!u0W3vt~`z-G|l`)HydvMxf>Sh<|V-^@$X&1 zefYN|bP4|L4E;ci%R}Uu=4Nm6Ry!EXR+xx}f{<;qI0?456Y~%o+72&iNnxP6^}@g! zJ}0f}qH=FZ!(cSDuT$Lv8wxt2TdmBzzh{18Gj*_6qg8;tH#097wBE93AN!6u@o1D^ zZn^|tF^0?BYSK=bU3Cbzzy(xaQ{_}V1!!m>y-oS*Eq8qX2N7~8r0z@cLBtY@TCsk) zmabIAUH)p?gjZ3x0f&?au=zkw@kHw`9$#<>5j%Iwy>}u6EnHAh*9Pi>v*;R*_-sj@ z;Z0`7cDK@6^Z0Im`KX|CqU?OFR~L!Z?c6J+iNJlNxW)y5_pq0IVIFm;ZzJ6P2)DGJ z=W9`v<%G7=jLUeagWWe2VBiU;KmgI?0Iu~xYre_wXAIar=3LGsa99)bR0tGv^`4D- zq4g~3dDsLN=gIo#_3{bD@Le(Tk9xGyJOnS

84zfWlS|9;9*a>dZu62s-nZ`ySBC z^HOn3rcjId?f!e{=&{~`G8Y`R%#X$1wIhprQ!yf}B~>~BVeDCh5{X(bN{;;|{wXTz zU?)D(37*8b^vQCR z4EnpcQOJ>V+GU*VxVM^5$0nS|ueHGVVX8&NH)K1uj@j~c*~3k{fDb^!jh=CiT< z#DB_@bfWQes(Tp#>9PQz+*G^N-K<$)$(ajwAXD;2W`ab)fmT{*rIkiJx|Le0RB5HvS~|6@TWxh$T4_Z~ ztJ|`bwr)#Xc4fD;rIq&gea<;|=1vGmciZ3ovwko$bMJXS&w0-C{#3%BkTOPSqx$N+ zfzRL3bfHCO-g%QQ8XDZ{z>9b8!#nAgVAjkOJ-;^d&*3mM@Y2Q+S+AK&Ri~)NJ*zkM0Z^f1y@OQ(OwT^#+MTvXP zY}uLf`|o)@`svbIj49=PT7J zRyFAyKhEbCMnRNZR4)b>JSX0Old=qLo|k5M$C~? zLPNtGolHjFoqYxwa-G_AI5z|awtS>C=o%GGc5BhVcRrGGKZTFNvU@)6eu8qpyXQvt z6O>uB<2Lsb+1A*BAMSY5Y>+*|iD7Jc!0~rcuG+Z7JVp$bR~c8cx#YrSH0BL-eQa&P z5O3z^4gCAZk^{%?9c!7PcLvzKg-?&(xty7ec_R8-Yuvy;eZ0z?ufG=zTy8GPa~vk7 zV;3GAsKwtO3{3E4XFV`tOu<0@eVyjgJn~;C8~EIPeaw8iWYzJR`JA z!{~t<{vnNDx9*fP`IB> z#jhx>LmchS9;___LFWxD+H*_U*@^%%{T`$+hXKjJYkOAa5Amkr>H1GwYciFej$u#V`gkQ9 zdMFR=`xUkNq0cQJUj<*jE2drrt;pH4*$W$ z)P-89=oxCZuB{1`E*;pnuQm^+3sh@h-DgKW{pWofSj)8B=0fk%&QPy+oXaK+F+^6P z*DEuURSVMJjXgRCHj&y>7mbbf3y?`rt&l4pn8LJ7t?9kdG z)rAVy(hm1_$~qoTMv!te46QQRKw-lXiUkv)@7iC4-~gZ^!*O78ow6B9MJnMa2S_&O z0txbzl4S*Qj7cy_VvaCVlpU!#YO@nUju$Y?k%2n4Ob zh#J0m_WbbrfybU0lR~Jep-1N$TuaX2mUd-2xuD_Y2cqX5-niWHCA)j%qRI$LeF^MR z_<}|lCN=&-SiW4)hzbJLj4EK$!8piZ8WI$udSkH16nKZiUiBcBirV$EZbVU0FZvQ- zlEAS6Pe9e*QjVOm*kG{y^jPgJtsdC_1h!ULk|ZSY22NVC9hiAIe{_~ifYbnqYY{6Xk=T?su=em|6CcA~tDL?i5Avl#($7abw&XEN zPgQ|cP>YaxRN9F%L##``Dr0O>T?JpAgs!SzEi{h~8@S=sV)}@`I(F0$LK0&uRVg>O z=MDV&)gt;B_F9X%BX6MnwaJCrV1(u0-U~)o|1x&w4eWiboF@6oYh&r-#A~;hyYdDa zzh7IvD~|_eci&Di>L1L5Cb=vusM2f-nlI)uHBcX zEGeGK%UV+4S)mg1P#632&Jy74M<0+S?ZuUBaVoFMfMRB;U$|CodZ-o=aMz*>UlD(z=wLxWCV; zU?)XoA6y)c>jJC$ta`JLiEpg8E(@JzEPT`AIY=JRy&4fGbP;pCbwi*Jo4KT;8(H#B z>c`3TR-;q%qTHIN#Od{LHr&EQz+}bcTNxvJ28vWdO+a9H`aHA0^o(9WhA@T11(K)! z8M%NJAqXh24)|qz(kpI*4}ANFpDg4&z)9fX%XZGi)D0e%%tcXHGX)fRXSlD z4YmO3ILv5F3#xeOEt=_cJnwVc?!Nf{NMP!8#k;2x5Mz+x^n@~>uO-6E$ z^Ypi^U16KLy#`8eLsQDTq7P%l|zDNA-16I`xPjqQ7>j7r=Oe$%d73W>sdEOQPUbi-_lS?(ZCz%r^oXzDZ8e26GUt`&ZfN50J+2m_ z9m_GS_)T#Rsj@Y3n>ZJPTPm z5oxH$!*5^)zlnu#srI3Q{A2ce4E#fF~Lu*L`A3rAWg z(6z`C()}T8vVW_r@o1s3-6J0UkoEq8vxQj34*9A`EZAnv8o85N-sLgyj|Tdr@t|j* zV?sC`+iv|T&)n@1i*{PmSN;+w9FT^Dqj1IhB?~XmUkwU9k{N;$mnkdyST9y#k8Jeo zHO5|iG52{4{G$mSV#a>??I}-<@s#+*PHVz&myeclz%$TYR+O&%xYbBE@9hKD{kU?6 z-)FV4=SAW^>(Wbb^OowH_eON|{5dv^P;CCoYUf|dZv2a$flrkerGvYyYHRet^VA*t zV^#N%3nmZITz+gE7WY12MJ_(#funsV?mFX$he$c&hqeT9Xl#M^q{q9 z^c&~tgM3*hy6*U+=P5hx4Sh(CxdwEM2J{AEPKmyMuzofA_&MqmnxA_@*FWj1e}c9m z5SorjoTR4k`xHI$oc0tNr_bHm#Gv~qoVouYt8UEn%t2*^h$6M1YYhS&uYnDpSKRuL z)mY*jF`Q!3FXSY7MgJ(q9zs^fqYpt-Fr5kSZn)WifxLfNZN1m@dIzFYM+@I4t?SL8S1kFYHGg7}mo2Q1Q4%&{ zI1|~bFqQ><*gMWEVh>vr#m_%!&AztUWMzn-yq>}o!dr(7Kr=Njtf9%HgWjR30NR$a z5ncsn1<=nq#Ks6D(ZY$enNfgmCVm#_N&Ws|3t5xYq!xb4nl-va7R5R-W3sAs+GCV^ z2RyvIi#ACFi4}Hqw_LP~32nKJgH8C*4^42m&^Bxk;K>a44hugYwFF>pyniJOT zqbtud@PaBe?zoFatoDk#KVx-`1#sZrZLQ5v=eQoE8XdSQ_!xX+r+US`JJ^`?g2$|{ zn4_ovmEFv6*Y?%X5;b^@2Cw+kerv3#+i$Hj8|4oKcVOaY`>ko#d~ZPP*>8*Q7%$S~38J+~c0h>~6u!hQkgEZ?~$ zLHT_0GuD_?=|TkXlHz$5A}0oE<^bxocy^TJX*ihuUiOmy;hceruqz{TML5%hG(49r z;D8xr&gr36c6!+p+25Il5D5O^LsnrWPImvhO~DybNPP5FtMJO9M-Ik0pXQs`S zig%o^#0{Uau7A(Y^OTT#>sshQ?*5Jw|Mf|$=GxeKu+s&v#;)_MM(RPm8oOPq@t|Cd zsUZG$(`w-7p7YEkBSR;21d9=aH^Mcl3@Aun5x{i|X%k802h@WYvGV4Kgi*vxKnG`4 z{)G7FPg|ED%ymacB-eMu6nT$WH3i7dmUSpu9!nw(%5vNyk66{y!>~1IPonMH!>js| zDhWedH>8fzXkc|;5<%)B^>rP+pwj!ZuxxO#;1R1dRHNTuC^$EUEiQW05~04;6g&VD zN_bO)Djz03^oX^P<%!oHv8MPjbi_}gK3$-0LBqEzKtS!lByeiGAcek#HBE7fLBE% zJS*BJdocX`?rhVI^*UO!8EX^AHdq_QE5|H+2+Qm~b(y z3|iNM37g7lbW92*HDT+_!uhbT=t{DXl(#T9DWJ@(*r8!=Sxv3OB2&b`PO6+)rzD{}th!-hrBA-xXo9k^%x#Oi4vp(ghX1%pFt_9@J?C;W8cK5~9Nt zqEhO4Kn~<(_h=$h`ypj7vrHe?qJax7$P75AQAjlsQV!Wss`hWwlWCMf-`5(WtRUy; zYRI0Dq@Jq%HIuT8Fa6TqQIN9y07%)DU~}a|Byd4sN<`?Th1~CD9p`~4gUxJ1=*Vo1 zR6KdXzznR@3eic|ngd?8A#+aDBYj%+croC7MAz)-KLpLWJd&6>+_0gR>WgJqf_#9) z4ZWSudfDB&wKC^a4?47PPdE0TbJL6UgvImw5f-L3k}v*LXnDnFH(I{bQ{EgIv-fNn zGcGfbD+hAQJ#%)sXH>ao&N+%{^?G&GQm9bXm#|krSgi z1Crw8s}_?)bQ>(w;9if30^h?Q;5oUpUsSJ8Wfm_@RSXva}6 zOXVY?|9aS@RnQAlL=wxIs$h;^+=wm*sp#VW%9 zP6&K!yL;VFLWnQak#apTjQS}n?ng%1 zVgM|r-5Tw{_>i*-x~F59e|S!OL#(awsv4Zx4b2b&!O#rP-H-c+dJH?5W8OdwY;B{^ zFtsD-c)Yb@HMP~;1ED}N+W^E~Z+TfDjxO*8%zMB%o>|pY7N-wMMAqaIk?mQGKbVv( zgW-!t4WK2zk}U`eJ_nNUMdD4W8VhGK8$4cFeFA0>t1aE zc{>dM;wqACBqV*bEnZC|9cAC3{}qJ^y)m+jNE7Qw^sp7!k(Fx-F9d zgr=@1K%+>hfq!gQ=ZUT_uuTTT74M<4Z*1hng9G45P6vGi* z>5;PqH-YmBZc-;QXJ`nIgp61yA5Qg|%y1A5HIiruIR7OYV@4#TAq%*ngRDH-VS#~& z0FqO~`ct%ZSn41&1{S;<>XDAv>}U$U$c%5GW@NRT8nPU!v}k)7kUkyCwjVb5UF1q` z^50NZbWq7y2fz@+xtYeH zIX!nh&Oen?&pE`dy4Qf+t6b2dbSGZ#>^|}9ZflKs(yNT)y65E$th~XS4y3IS=IB%B zxu3@$HI-29wCjF8P1o^J(>UW5@n@R3@aeunWBPfaay32QCr*FMim)nC_JaIa_5$MME~19#`;4W&^yU|=`%V9H z*#qv!l|E7O&(>0Nk0mzzGc;;ZpZNAaTbGWGp1b2*8D`7}_mDB^8(*?^ax)J2c-h)- zcKXDSIJ;lNCr`_dRQzW%c_!1JURx(f6t) z%uPNq{57l6+N2*gy=EOXxA>4(JFK+hE4~j+mbuj@{^^J{Gf-s|JL#gU#Kk`V6f5$# zSSh=v_#HmM*zQZiEv4MFcA#ZSMttWR*6@@kD_SthAZb|^?}C2@AR>Si#meU>vD24{ z@Ulcda&wy5TEwvEJjSfX@mtZp2}8TIjF)aMu#!B_3Xa~TO)7Ts>`~jLC$aWlawoxz zDhjE;5OgSLj9&Jj4=jVspxm3-?PK*MT6Y(~kevjxLrC5YR3`(4ij^K?H$fSG?>TFz zw$z0PQc0BW)lj?71+{x+BU^bWWbC6x@O!@xoWjb)Dm?kr(O$J)!+H#ELg9@5CGr5Vid7N5(Tg@u4@N7gCi9 z^Fm1ko6(LPKI2&$P=)cl58fnW#qeVgwZG^SrN^u%==0TMR*QMir;;Ge|EYBgDYp0h z6hTQ3`NVgBYSoTDbk=I9#TfT9tNO~rJ~qwK*4Exo5xxlw=wV;31~&u^ZXu2;aZtt) z-PPxQW)+OjXD(-kH++=a({XKp(p;SQ8N!@@6Myn3J5}N>oSUCpW8hjyWI=2n?AXcM zfrtm(%WtTLQ_x2_ZIELj1R{Tp^9l=eMmHSwv0BY&YbFFRb_`v_l* z(G09RIWkoPeOz}kiD++R;0L|z&AJM_d0ct~EZET;^#15s*!@w7+>hmyLLRfhL0S%S zS?(>LX9bL8#P1Fwk3qxF0d@d|O+U9LOshl0Z9RsJ+>cHNd5a>A@6fM}<7#0?fDNMb zAhhIiVe`fIpIYMyTuR@v)+}Q!G6z^T5nC5nNO+@ltr_g4GDJxTbxBe-xTJAHL(5}t zAq&idPY(gLr-y*r zlRkj$8Jr*a$7Fs3|LFe53)_Eg(m~z`NC=WqS$h2$KP|85_=N?z&|~X=Vda@Yzu55a z*1^;Ypx7)ZIVLxt?F;xg;*lJODnKVFOb5UzF`uUN!F!%X^JUTsf?@BAMOv~Q=m<~f zl(GOCqf&~d%t+H+T`21rnavLdgd0>AQkc_Zi$vP84XZ=Yq#+*xwYZmo)C|XvxNA*& zcol`K192KfPCF#U>4A73O(o(fz@OwxAn;GRn%3FzBCfSjJzssUF#+D{i*bQ#Bj&~w(Q51|)SN9N!^kfeN zzLA@6?9Nt%Y=qJUErF_K48I3#oqH5I6Jo|UD={Jl4w6n*V_Rd_QYc2oiUt2+O<~32 zj{mUAZ<;p?iCvN5syFI_jB)%OdQ7Y(E{xtNjSvO^(pC$Liisz&BC!pSS7e5*vZRKi z(q>E?>$ZB$EM(@1sc%~!F-Q2tH{Z6Vn+1Mx=51@1S>zXWC#|y41?K_y%SxD{m67Em z1N24bsW6l_c$_~Cue5chS>jK_pXS5tvV}vXj2k*xoH%~UT8tzrwZF4E*~Gy))hG#^ z3QXwafJ;C2d+Q=fjUc}A2VgOLzWxU*F77{VeFiD)X8aLpM4l8Y|7b1GpNu1KmirC- zqoZHqH!A(ob&Yc3iBo^HzI$;s6&Yb0Q|a?CGp75+9zP#1o;w5a>N|h3Dl8jWW{^K? zl&E_L_wNk%`@7z;O6sckjSzi?S%};`D|5WwScv$_v)z%-PHt5RE0N)65Y$_Kj1!B_ zSl3-#oyT&V(dy*j(@0SE39s4Umo9K)YUV9Lq^~( zg5aw*saC@^RpgAgptZFRIi(O?$%Dvt&VUde%rEkTeB#AhsCA@**(yK%#&$i|?jSFm zGH7pIxyBs-JQkw3$vgbwsUR;tYy0pVpmnJjHk?-!51yAJC`#z3%`$L}SlncKrt<058vGevZDFPc)y;Rv9L4yO@`_G8T!4 zk-6xiCt*j0jZ}FBUnHQdP@LFbF6Qs$zJt`wA-{3RX=pUBHmCZQ0=9Khj3i&8z9@BlmMG^_? ziuh!ppOlDds;J=404E^9X~;**Q?rNxU3KSKKp+-)h2O==dalwHXYE$)&u~ zWC77sirpI#5F1PRcj!Hx!>Ss%ib94OYXetC)|?}3FayAl2-5CXHwAGFLF()cW}r6J zx?*sx>O9l})&RTjs#Snm7=Fw)iZX*dIhmIN)Nj0mmx`+|;Um@e8J7)$rf~tyqTqfe zp95(3Q9q-gvzlA`|SCA^*$%w2-(wj;I#jHe8cfdCG$c-UFS zuT0g>N8+^BIP#Oq1ctp30zXtIgL$A(m`JryKb+)gWXA(* z=Qlw$tWx>ZWPQhHNHM-7hKDVP(?diVHIP6#5kVwvt>(!N)5D*1J-z=@ULuzK$?7pD z2gFC;W-xj!=Pg-LLV3V(T`fxgrkwxU@>S9vJ)37#2h#9V4X_)g%H@ZXvN0XstWqrA zi~#<*QEDAxBM!=ATZh6xsq_K1d%Ia^H0Zv@3c2RKbm!&#Wq8%9fen1;A)mOdnz!ie zSV?n!KwNbNPtYfgTo(B56#&XbvY{#IrB`y0)=LB8maF-+;mD>5vIr?VAS_Tmj$_6n zYb$xYNbf*Wwvw;n@_?hP6^mwCV=jUUj>>>Ugy-MNfH-(HpQD{5OUF4f7bJp$(Mnst zhY{^1^Mb?zV(~S6%B{4=9hi4k;8V#=*Kq`KR4mf*Wz~H5)i+y#ZlOjGozZbKmgh-%zLXGLde(-CH1xInI3d4(=NG8g;?tcX_@eI z_fSJt{_@07vxVt(Gk6_OAt@{vwzygZBgi-F-(ljGl3M45WZh6zN*mos*}U%C9WQ|4 zyiRgLGOl>WU^R@N;WBVK<&MHYwIv-j!6x)WKLFi@R8gfQ-;ik?24@);3tHENaS?xx zcrDd}>W4U)WOp}E8`MyW$Acpy@gK5OWS*8cfMr`k>L!Hz?=nJ4{ioG~(N-B6H5^YV zJ2!YhIx0kIyp?e3!AVz@RDP1OKfMm*Scxtupz;V_uGYa>C7e$PEF_C=5Z03u(C-#mpB zX9NP|7%QbEi6d-JE87zwX>z-K69Y4=${@cJ@z}CR;*9{CmLhDJsRa_|4Langd^F%G zhGw7GxM>S|qPSZCjZp#wta45c*kd_Z^61%k|0tRSo_q`CfW+b0PXWd5Mm(|O0hUq$ z#qOr5s(50@Rq5kEGTA6z3n3SfIV#BVNg@?^XSFnCAKpZW2G3M@7uY{*T*HkM0XA3v zaFs`Q#Y?-^cBOFcxp5L@=ofyt%V5wa-hCKDwazM}i6r%c&}Br-Ur&7fLjwRmNF*_;>yoCXv*NwUcDc2NO+n1tab}VUEM0dWB1pjq)hL{eC*7UM z%Evr?(~u+_PFij7F~j!2of!Tq^D;l=!br4Yc#(qyI%=RS*xEuEcoK6FUvxO(BQtrgzfGh<11&Eyv zu=_I7c&CI?1d<^J#Pfh!BsvDXo^~i;?PgVEfyA!CYMucc$v-9w8u$mAqsXc;>|o9a zQi+ALDet?}2`w`ql$1)L?zPeW41H9w8sq9{mLcIX4-4hb#Hj$oT}L=gB|tX}Z}45A zw_ZY83Q{e=^b)zX$gm2yRXYzyXP|1ClO1V>Vf>5OMSvV52#(BfxsNFf2Q0sH{g?#wRDof+X^<%^=cux&fuv*bfUb667v~Dasl|yW=~^NbPeS3 zWb8qzt#g+s?WhCkA6qZGS?FqDp7Yp%lRZpEqVVF$*by29ayM7{i-JZ`P;y#V*3`>D zMT@)1_N=>$Oqsb9MFrTr1gs4RZ$R79n{1YtGsO6fg8ji7SIBR~s^j3(6T=vXmd%o& zQKFiS)yVKjQZwVB{O!~v3xplX2{$GO*<9xr$y93RR)oo4%_wy&8ez*?8Duq?pHvEG zBSgNKw4sw#SE-sRcRQKhAWK_FinQjwo@UG;W5`h+%p|tTX&UQ3ty>Frnx&nJoEfX2 zV2I7#eaYr%QazdHYBm|aT)jO{vsJop=^3k7(_8D;PYP3yoEqF`x#D=HsyS@F&ap(T<9yUH7X^()&QX|#`$Ykb4y=l!$0)L@ekvss zZ6TvPkIl|sZ1)<2_sBPwI+u8lVyA3-P zZKDkxJZ|8MrNLZ{^mY@M9mHkaSdJx>f6SFZ1OKoG+fBTQ=IlYk*^=P~2#auhVy<$j zCT5>a#ldEi3dUUpn^?88so6cn##6aY+S7GG1OLePG-ekCjJ}+@&}9rhS8s5tn=<-y z3T`?Z*fyb6bh0VvnJbA@>4wvnXh!70)%{f&8ib@`6?J_{B%Hw&1E-cPLEwY3^+YTZ zsg&3nWMJ0e!k8^Xp=S~6paQ;)PBAn?()KOEz!1F^w)XY|W4Y3GpPk>^*h;H`&bJRa z;Q9vKr0a3p6Vh1Nn*uo)D0J+|DImg@po{a_L37B51$iR5Gsw1)ibIFNt5tO>5KRGY zFisY4+z3dq3OQQa1r|>kJI*)L>`<_?$PYe5-f&~*kn^l?jrBYeOksurZBZe;Bz6H$ zOO2%brDut0VVkx9Hb}mb&D_2t=wcHMW7m*VQRW)5Ib~-dzw)XkBEC{t8-B#MMMxsD zeta+pOK$ZQ7*Y}u&0R7;Lx`zrx)wYxGVs+5IS1m@3;|0I4mm8<8P0#EE3EMDAlpDN zS~iP-TaSTum>z-%CSQr&1YdiC2L9pX+n{sz4!Hv>6f1W_tbf7nWIWX#?@`XbxxrHauKanpji)~tPCYx1*+1m^v6j6GSZZDG~t8Aub<^b!&2`?c2Bebv&5f7PBe0?mr821?HszL=Y;IV41 zC!QGuh{I<=0@w>tD446Nd9mo~j5K7JQ7_{JrIL7*xwrESr$;KRIDL=dM3tKbMfDBD zH!7+fmO;5Cr~_OY=O|W6;{rBkp-IcqnMRh_B|spmA`h z)tV=hk&?VgZ8!~`PHSe5vBigms+f;ON_DU1p}El2vMQXzst(iz$A*APvBa}5I3cjh zECo(snJgehSry1IjwF3*k&qt?Aruqv951CR)F662oHOHX?&SeY$?2vLRb0cuk)UT` z4uXfWuB)vldO>iE-rhiOS?ck~*#LS(!Q4@`7C@5l=S(H&CW)?!)z8A8+2pOWrca3| zDeYHH0>Oov5#?E;>k0&kCC`Z}7>~EMH!H6X=OJ(1!dO`u3RHygr`%u_QGL_IV+llV zdPp8@*X=`IhpAPu%oAlYjU&#=Xy)CWWID}R+2YI(1F_VV^++=fEOB-eq+{;MIdjWz zpz+dtD%8la!?6u=;3-U}OfgH;VxJR|iBV|loJn8EY~Fn`D{k$Zb`1rDYF@CkY2nhQ z{N{NLH(uW~7byq}rTS;hsXRm!xZNsBy_K_{$Isr+<7z*T4>jcr1)38%ot$)aQmX0J zld2c`Fi!;y{KKiNdCFs)4hCcpos@E}ou>tPj*B0$rEUi*wY#ho$E;A{Eb5;ei z65TO6aE~d#peIbg&M;?UtQd!C@UwZ*w)a5>23I4sZiC(%Zx$};$Lmg}KW7$0axZ?r zl;6rWizPSlk0NrxPjBLnz&^WrHB^X?E#ud)8u7Dbh>WBkef4I3DVrvKdNXfibJG>e z`8~|4>dZ@j?G}EEX|Br?qgV1?Xth7Qk|*%-=aqajq6>=6xA99;bui;9tde(v+T%oj z9y9YEn0xhVX84Wpd-ok?BmbiR`{}%&7Q!I!rP{~ty_t=Cq-TcjhmZ6;3k$smet+%C zOtEi(-gQd8aQcrgXG)$y$=n9n$UI});`b#-5<-t#l@&c>amer}4V zTKHH`;eXux$d~VYtVg`m!b_2+8nK6e^@Xub9}YYTp2gUC;IrC2@CeJHB$Vgl`mrXVo@7!Oc{mY8y7S+T)l{eFAKxR z2c~i0jiEA;nL#gwQUVz%JEOg@=j)Ua1hil)9CZv4W!~3}z6vxQMF@z5!4`z0FXR>? zFQwjaix%WpqU}+-@fPT7;NXrJ1nfW_GsGv`VA4_bjQD07pI-5N-ivuy7`B|Tdkl6k z&u4__?qTw8eVN47@>XR=g}5ZfBkYh^iVq5mw>8E$;xlcn<}*!m6B7;X{A=t`n#K7i z7{V0oejh?49238PAKweu-@TUqmTgRbyo0Aq-zjwJi9&_ZF1Adt!{VB5EZZruqnqE8 zs#&r&PL7DO?*v0EJ#K`tz;$7ArO7C3$j-64sw$jNrNiAT^b#ND8 ze|T-IzY=trB63x6xrI(513ea*z5$+EkjlXoDcnVBs_1lv!SqYh!#K26-D_f`u|nuq zDM(baQ)52xZ z5w|^73&Chn>q(043zAr`8r|EG4YEmlQk?ANSB%^a>z11NP$j~$7BVM<)T~HfmEg5(k^w2TBnO%E zg@?6blp^byA+JZ=m*ki79gN*8zLDgOg+ULXN9%SIEc2~cOz7k9y%iL;no}cWXXH-^ z-N8)YhMfOkfeS#T?SLR2j(`*<7)u9{CTJCmhxC+)yMd(vtq)zJa#I$!^zqx+=JYdt z{0hq);Snb`@Q;`!9&txMuUwNa1L-l08Nm#ZIl3b(AILq>+F9LBB2uiQ=VeQ83#&(2 zO|hfW%~WE$8M`lE1n=OJ&2XLg-XC~@n0p7Glv=u^DLktoeEs5vx~7K3;ikEDH->L% zSiGRbSkA(YtHb@>ec>rE5QIFW~i zO{u6OU@27huu*{>5JrHbhP`#-THgcgjMiX{1fNZ{C_ukzP*@C_Uc`7iJPZB_-JL*8 zU9qb%E;)xptb@+g>gal^Ob4hlx>iP3!6ZAp@YALkG_ev9zk~nl#S}Y9Zaq9-@EtO7`m9wGlD4Gy|OR8<&72my1X=-aDh07eNMvWbgxnqbpC zwjpk~lh=~#!S*}(Bu^bc5SPG1=`Y>Mzi1U1Wr__TE}gl)b8%maUn)~D4Ku{koB3-L z0BhS8{%aNx$@lYFg~lu4rezCmu9Wv)cuC!y2H2+KScy^Jhc)k)-_PHiGFPAMI*Ci5 z;aEHLp&P-(qPZ-8ZYI$R*=J!LwZEvebC>G(+WQzcpjp40Uw!`37nEhhatWM7+j!gqrcoTan=d(k zMG@Z0e{V0x63kpRY3!#_=M-r}BQ!4v!>7({aHUGIOUV{j~=`uw6X69fuE&2r48VLeVhs*eCd( zahbDErT0C=@A2>lJ)oMV?d4&sYPUz+x|b*T9#1?^ytZf~3;^2w7;gveANDx^u({VGKK?lWG&>-s?&EKphnTqZvwRv- ztG0ZWzjyLM#-20S0go2~7sZb==Sv}}wvzy*XT*0u3$u`Ch39j83#hmce-5_072=zp z`t-(+Nebwoq_53YIVmZz=}$_Z^1H0j(@z<)qSnm76R-NXRV(GML`bwX!xA>!Dx(M3uw%RL=$)a7xD@C#x{*K}p+FxxZkNVN zq@IG6DMm%3S*3kL9N7b59wLS4>XNvKF8+jM_Ruj1!BsJOBKt1GodKL(9-$jGhkT?g z^H<@%Sfl)5$gzj6QOsJ=q?m#nQ;oc1Vellc8up^cZ=~n$=Sh7K9LpQwRYP=(VT<5`<{828R>K6i&2cFMnmHMzjmoH5z{Jk_9(z z17vshP=}2RQ*)N62n5(@^)|dZ-Vuu!eJl)NTmlvaxX;6DqP?py3aQLhcaA3S5r;(D zDG{JJp(R}NkYjD>a}qGLgv%&>!unWweYhjqiv}-pCXt9R7=*u*-uo3k* zJI~?DnEtL+8cbGzDl@zxLmd4kIJ`Qq2!4yNq|c6Tfw3ExE_;FB%&bQ5-L&^5;?Wm* z+X#4w6tOZ`{}WT&h)CV(qJQG$mRb07dDO+N2l*tnQl!4k=PV1)Ztn)AM#<|s`YVVu zViKvUm2F4-Jdm1_1d~DjG4=_?G`Y#>eJ+M;P~i2OGc0E3Wzu@0_s6WRtPIOT8Dv9Dsra_4W4STP5ZjhhB!vhC-db za)^K0jCw`#yKt+Dd(+?fF6XSa(>v0biNmS`>S9xXYS~#&Jf-T*obF!6Jhr{g+ov(w za1Ty<9k>o`5~_;J5Af0B=z@xZe}VY3wGW3?zf_?V#he3teCi>+)pYo2f9Zz7UFl?| z>6Iqb@R6*M!cUk)2BRI2LC|K(Yp_#8a`$SI zSm1ghDNKYdH(4d~5S(KrV+p`LL~fzC<)NoQW8ebG5=5^BP_DzF62nD&TEtkßB zWiu7_Q#UaoXQ*`~5s)<)Rp!C6+;dLc7U;il8xYAag8#_JkFKY2(7IyRl++*;dTu)t ziLde>j%9ni`9|qt9dRx} ziOBz{>_xl_tyFhYLP5MEpmHv+D0T_H4VrzXkU_BUkU>Jb;5XY30!z^h`b`DyA>1)k zq<yAzyFP`BSi;l1H1^J~oc@h}gLZLQLas21u`Mc_@k-qHOiOp?1za&Y! z9jTWAlw?drG6#a}Diqp0(lR_agnL@CvnsMxHq0Zz3J{BHE1ZzAh@LeF2v+q+ejZ++ z=yGhabV>)=FDY73!4$2EPCd>x!iEmsV1&Po_IAP?7k46XKq$m8n*h$$A_(M?@jK)Z z2l%c>RRGMO>R?aS#vmI?=&TsM5y**k=q7ddDuM!BEW|>9IW)XFhSX7@;HCMQJfVrp zQ!-Z(948=##WACf5^yu?aBgc%hhqCmNl~UPi2Y#C=Fp%^A!_Y|GzbH3buSyl76>ov z_|r#VRNF)DYs5$O;(!y($D#U7_V!5u295|M!hKy)BtoEYu8~4{UK5AC`wD7-V#!>N zmdM!rPmkWU!=i8Uzb8qA1L4ffY0$gifAiiSUJLc0VJw^duTme=q(2Sg+y8KltP(pk zju~@t$0TDZ6{e~g>^bI40A7te5e_EY9Bo6$LkbIFglBB)uQXtKrT=rL0m*{w z#yB{;s?@+pY1HP*?hUfsFC!=9=RNJ)r7p{FlqMA^6YG`DeyaDzLa)=NVYpiza&b~a zu1>(Hz-0u*;928!nszrVSM7p^8#HFFMgZOJ+eyME8&Bn|#{aDK;YN+du@^q>)H%V$ zT>k0b%I$lkd@U^O3?s7ky=Q3AFEVPP3S=+5n{)P(I%hZe2KYWFQZ(R`a0o#3mjwBP zK$JEESHAJr!A^luk64JA9@bJEVBLJ{;&1$u1Yx-$|Gm8)Z&XQ4(hQ+Ai2s+Ush|6s z0kigJ> z)a}wUYW8MyCg0~Y8((mpEI0N3P3ru;Rr9=TH;i*ixUV@ORhGS1P_fY7@BdO3SASaQ zZ~+^HixsxHuwzRc19tM1LfQ@QuTtm36{m ziX8Psqk>k$J?5GBEq)}6AT#Z5hUFHutq`F?EvakFy4ojYgMBM&WTl3~u|HGG{7vW> z&Pl4Y#et_KrJIFP6@e05{BduAQM$~D0?4vod2QxttZg>d`U;SncGWfxDf|JG9Uf+| z6W-CVC8N*`38p{u^(V>>d(jmC@jZSSf6+W-it(@TWB7K&6xLxr+r+!Mhxwx6&zS73 zVZ4yePkcj-c{Vm2Vo!d`0k5 zf`^=RxHx9A6T?LPYkV%ZePayqvDbJhMFl+Y8pO$)EHV50{2OMGPw*q~TQBj6!$i=7^pUi2n!HF?Z8-Vo`Z@^%V1SMoFX z(XaD~l|SQG1tmlI8z^Q#`1XrMFY`)q=x4A@+-tEj!_xoqGhW65QEw;=eSfG3AC;LUu3+`H_;HGU-JL7Hun33eH>D8bTj`rf6(4%F$ClP z^>O~y;w`>Qj8Id&C&A=jkNhjQb1UL4{fhtCtf~>8{5Aigz29PXUV7A5FjX2M%|c ziu9;I@@vhDVZl)K+m0#AGNv5Qrlarh9t+W!Jpg#7#I)(R|H4PJd1n_knxJEe^*X#? zuJFUCbzbT?c_D}?an{&VzEVS6#q7xxux%x?|Iw;I+_mwhy=K&I&WiFlqRFnw=o?`1 zm;Qulw-4vf`z9M=*a*7>{=H=*?3q?--t`^bP;{dItfI#-9?f#mU~8oGr8OJ4NRqR} zU4l<)Z6|pfaamz-^#~di2`?pyG5L*VYry`NRJ@XTBd62J@GC;uaBC`4Ml<ZeJ1my&9DQG}n1X}~cr-so z$=XQ$Z5s!DSc92RiAyzor+O1Pzf$gF`SuDELFG>5+jk5*js`q^qO-uh)y7zm;o?w% z{pDdN=y8$QKFYrSqH+kjA&S9r(P~tPe;sB2gK7KIcZ`NEAT?8BEI@?jT$HNpSq?Uu zF-Qw~oEQ#rDb)xwq5&m%k3$Pg`L9U`67M8|nQkk>_HZ^X&yx{0#=YU5{>!_%dthO9 zx0Fbw`-|-Fn%wKZ)DZ72wo51$Q)jU~3nn>F7TfQC7tPxhJVoodE5#04s(D( zx3wq6$eM>@;7e5jDJ6+t=LA(IzyrFcJ^{Q}qC}akm2`Lqq@`uju zwm!-YvaqiM;_?oyf}vUzk^^sg5T}gfzK}LSz(fyan=K1uqmWJvIgp4UwvM+ed5ND{ zBySFjAB?we65*S;S5!=}#{fy;=}56^f_<|&*`NOU1bYT)BK{b*@9`d{i?q^zr6E3A zVs}u`m3K<)4^zmQZ4>QB@=g#!s)00pl0A)&un}#lbCP|#MPa3WG09$PnNw|XU8#M& z|0HLV^9)w!pK6GEOYKY9w)9s@?J7obpMEvjUgkYT9WD1?Wr)U0>?(7mKYiyV_9IZ= z`qSYu8<@M#pDr!8f5FTx{&es%`=_S4)t^3D2|$A>)}+hrNxa(L=@;+4+%>(}Qm#?&IFu3%ur`mZ;wtDI+d$VOe<4Y`9Y&JD-2&Gh5Qf&BRuowN)4Dp5Q?8~sUKf2C7$;^ZP^mps*#Vl_tu^ZD3 zamj3ZvSl9jiyLR#%S=;QNv2<#ZO>>mFPn@tC#9Q9vgh(~X*%lIz)m|whdgMDlmLU0*Ihd5Tm zM~Or8Y#-MB^?CM0hR;9Ex36N>E_++LW`TVRGvD%ydl%ZHF`~y8+E1bl1S?vx$o{HD z;8V01pga-Z(A>Pay`4Q2$*(KcF&k=Wh+5?|ciAWW;;|+Io>Ttxyrp)6`FGl^4nsTR zuQkNMo9vP?`3vDH2rnIy9m69d0i|JdHB{#;kmk$m$;`9^;#38joME9i2(`Zep@w=xLh>l&eI#H3?vTKz<5T45bg^s33|L$)w;$pK z0fZl#aEm=B1-o~|9qCOh=%Nio*dO%avCV=2!VMXohhV)W#k*RlOcESi6VwOP744Zo zKKE$3s21=*B9+kxOY92-1ih@|9;rGAq5TGN$1V0}{e^RSyYGl~F=MKk-nhapX8s3l z)_?^p30!N4Pp`BuwGf<4yu8vb^C9>Tgupg51|s|mY;Q}8?G@v0vww*l9M)`y?cFw8 zlqW80wtrtz9+(6Fd$N>g>Vp@~BjJJu&&oi0R*T(W*?VlZG*8^qYTwVR1J@g3a+`e{ z3@7hyvzH^>UO@aLW_Ov>17g8y`%m^>n=Q{vFIZz2GTsoFYl!!?+a;C^{nKuj6VyD@ zZqH#O_Sh}jUXMiO)g>0e9I z|7_G6f=?4+XVC1M)NE=Exd~rLyHd>oA`xw}LpF=7P4J+SPo4_Q3{}ZTr1XX#?SVj*Dl#9s133I8 z`=1F^l{w9~#-0ystB}8x0`$eeHnFG2E=nB?Y?}*?4x&=&++3H$DM=;{1-2ay)Q8B& zJ5UUqMT0=fb$)MnaSQ~fG`JK+q>-62)C&f2hf^&R^J5!-9LEdZQ}Qhc3F)+^bT~v7$acaiLP&&{C>;S} ztMt*83LWYh7LXYZ35L}1m;1rjZb$Uj+TEqZ8fZ0cOsxA5r zDPp=Vh2U332#>*)PJ)_LdH2eF3bz2ZVl5FUA;FS_Z-tRd$Lg!EcDid`pHf?xXjw_u zJm+41SF2XA?Owng2baexJ!Nvb(!hUsoCB|$3@F`iRcR znlapxX*|1_Nc{{3pb1OYGG8l-TGTH0Mv0K7y;e&AYk0?yf>1jxqq9qJY)IjZ&+3bJ z;NXR7LDzKjH)r&OyfpK5PvEUUsDrYv!5k>N6PfoBV>-)#1qfqU6)Be#T1_y4Als!@ z8{(u^%E1Cvw$hc(m9b)F92;WRWIbYr;$8F9W-4IEz@g%cOv47b&WI6XydBwTDD8+i z+{;I%kiSQT@5s&~!O@s{cq;HlfX`ssP6p8LyvPm$mguyonHO*`jw+SMdg3`LayIe1 zMD$~KBu=YsrNARH7D|dFR|$`E;$;k!Qvo~3q0ErTM{Nu(pwolWPe}Ch*LTg=X&8_m zDzo}hawE?IgdQhCpWJ+<=*C5lAlszx#eya=Gc55c0tDhGG>(bPy|EjL1*tMx2<|jd z*Aqv=dli!y!6GPrWP%57Z|_FHwDZr!ayJ=#nc+au)yiAWjjF-g~hE#URpw+TcGgdIIEmJ>;}#tK7xMD{4sqPPkp z`w$9iGEzUsKxDKqXI=D)M2wpe{RLtjsLPy)O_KcQ3!S^N8CQt&Do{wAHTw4kJ;@Dw z0%h{t%1|Ly!C+~7_$GiE4wJh2ToofY#0vERO|^I9phOdJl~z(496jif zdb^-7l>TrUU9X9!aHG15M;g@m$lPg4`>9p@S(ySF1Y(CTvFuO!y0psVHV&S54Pid? zl52nfC@#1*${>{_oJN}3Q_gMNlAV4F#1BpkHhIC)lwjS{?zAn7Zd91TA+B)}avL`= z6L>Sz@&U6eii++AQUpT;2dNGqsxy^cG$jynZ1>67UAeosW|DYRJ4&GeIeo+s1}H+X zflON6fJ~zAqzOd?(oS{R3=IV~QJWmN(`s0? zN>^p1hWIYo#9Ro77P`VoAQ&v~!8M_zHO@|GxJS5&$jr?5W*IprfmlX?7*eq1kcSH7 zu^g%l7Pc*n6buRo>CBUXk-X0U>tJ0Z6)wS}zXwUWC=VOl4_aY3-WFwHf|m^OCoTUZ z+=Uf1$YYaQFV79k_Fcfz0!m*>g{bA0>nYHWJG@fMD=w24Dx#%g7&bbj2U_v3e@SqS z%+(SRsnd|r6!=TM-^Nz+s!gmgB>f~j#GovgZZ!~)3c%hW?CTAVnS+!r6r+|BG{)Q>WXP00BeNT zj*5({&@7fB(>TgTldrqhU($V&G(tD1>|g;H5u2G;&%N(p~Tgw9yMl+S2>{)~RULh;PX*at7atTweHGIhN{h`c_ zL$A2H9_oT*t>;YT{0sap>pNUCyc z0pywlZKu#pcBYWn%gvTJ+_?$>bzd8tdb5d$s`$>9DI|3Ra+7W3{#ACK~ z3hf0^O~SR3#rn}yh_DJYA*l&y2hy_jiQuOC(rie=qMB+{yu^7hwL*)HC=f(!Lo?R1 zS)Ml|6nHyl4|2py*||w0CUrt{@Bt}B$a-!N|3cR!nH|x^9}TxGNkL48MVBJB4at^B zZFb;5A_(7pjx*S3hd@HliD5tFoU+w$7}{XpL&#IKMq|(eQ!D32g83_j$Wk{#rVSt_i{=GW*aL85nm(m_9?O-O43fr$CmqD9Q8eij+$}0>52S|MOv5%^R=s409+{aL zO*2FdV1|tOK{zeRk;ADb1sg1Nv8cD`B4eqTsYwS8a7M!b;RL<_D2>PxeJ514b*{r0 zl#rGqmNt^1QfBwAAxN9dDWfkpbunbd9BBn#sQOWp zmRDC-_q||~G6N+r?$jws;aTbM$dMJpd^QwM{QMpXeQEfNc{2>~mxaIfe7zBu< zJU5B<$TS3skW^2zG_0o3V%2a2lKD0qp>Ot5mK-lErDY9R?d6D!B|!t7TE}{9Q=67C zN2;G8@>thp&jVtAsqwJ?mFv4Tx=*G!#khJ;=S=ncQM$BTyCC z+X4`>NV`!iUQ|?#;>9VDwu(-1le3bU{96oDjbpcp@2qgbEfFL=!aLNI5M8@MAGFK)c9H25O z8FETQGMB9q2;;6LJky!rHQ5t_TR4PxdSA)3q{>Rhp9+)iC!2N`*BlTv=zIQS$=1{@ zY?Q}m9Vr)_8&9zXSVZbg4vEf*I>E?}Owq@{X@zRwUb4EsnQR+DofU6sr7IfQI(h^imvKKq`Ow~jMuoTE0!e2S9Xnk)S?zm6nJ4hBgNzp(t>@a+~<;| z(Z?{Ak@CU`AJK;@!m$W6en8Le{la|I>Jk*93mgLFh?$Gs9d$#Q46}iIJu{ei0!_e@ zsEzQNbXZZt3#ZiJF!lx78I>H=rJMqIPYDYMOl8{Zp7Sle2k{eS9KR~HY><0`-P;n} zAFRL{kRpk6B1E0Zog%D?4NR%<9&(LyCzEMK6B>Df8wg|yi5?E>xkRz_kj)8zQo`5M-lH@oj?G(Xj zl~(|~Wk8BU)~n--M8jGf-|BQ5A{W5HQcbEm0K0s7WjDyoZ`$U7hbnPiU`Dne8gZ-5rJMePD8Na9i){Wg`-7z3M;E3pIeS<@xu0CEMh zm52Z#9)q|##G>dR%>wW=mBK=3Fjr1N@_fVNN6U0bCI^>DDb0ZLj7$WMFS)L5pFJ-BS&*kwODBJQUYIa6n9K8`RUXA{&U zSCJ@!4y9@-VyweSQ}SRyqN0dXfP8tA(3o=C$ZVv%SR_rT6mX!G>A>emI^>3Ts^&?f zimdT+^e!=#_RoW)kl1mokrZ(w2Z8qS*A?h=;_GUHcZxa*Sd!=~wiSpDqzy@#q1VQ+ zfz4NeiIlyysM;-{+aVIR`@C!C**pcEt-d?mKc9a;i5?2{9`VnI)3oj!&DwVx)6!Msb z3r0KSYtn|mn(h;vz|61-v(u5vP?wl14z#?{9rZU9Ux`)-dmvhqyq~-kRVQV$E~`fH z(aWx=NQEPjh$1%iH8%_WQ#hsP==O5j%Bb1gBamFb9(84P;NDpDOw4zh%wqiiqSL1lxkxdabX0kx zf9&6qU#fvqtsy$m^-x;UI&-ACfc@!comXYYPLHO z(Pn0el!{FOSwUtQaK%X0DPtc7K_5a=8sLGNXfJ6y5yl;%W!)j6x?*b(*+UH@bH*y^ zQd8G!Ms@`jNR22$LruwWT)5YWAtX5uG^r3AfYpUxI<7-mnVw|Yq(w+vU5yAg`gYD- zkh(s`uQaU6kDOY$QF9_PI1V8LXc3f8d5T!;j{cv+5CHDusH!ERj(kG-?}LE_DebhP z$XDl@e@6=7vf?oi(#dXQq){YzYc~uh$aG2>ykN*}VD3odBQrpCl=Vjt#2GQQd*X#P zXv7to{AdnKMgd*(Q?u%3HALoV0BM#XOH~>q1XF^!_+ppc6@~iN6oit}NhIjNmaH17 z$!W|b}m4!qeXn;JsYeb#5)koT!?rF`|&py?%>M!TMKvIcFA@m7)uTy zOESol1gxj!JSj(luG0SvA*7Pb_g^FDc}1He4HEPWE$4ZUc0u}Usc|VZkDf(`AOAl( z{Qu~1MTbL{M?871;81aY>iU)PUwOI8i>Rs2NwZY%gg(SQ#@$&YQpll>;Jb7sKspDh zPxc;HVra_$sCn0n08O&k@`}io#;qR-CFNb4eF)`(inu84_>4uGLW#o50q2#tWyk`R zF=tCFuJ^9w<(bNrnaT)qnW5IfkgIXJM)wer5QGk#dygalLkzEC3FJzUV%-4WFHe&a zbEcsDag=-z%qMs#0sE>gftq5FQ;w!V3NI!1?}+`WsG?%vvx_E)M!|fD5OU!qv_z=5 z2}6?=T$GUV;krGZ0%@(}E>wb^g7zS{(YEmVc*akoHbam=3>Sm=>Pgus4HXmB4k4s^ zQo7@COJ8#Jv=)d)NgPd%(9Vr7R|)!0&^tu)w1rbkX4lPYfWlB|b9(w#AxMuLZDbxI zWP!}fU7liHvgSlE@BsXQrE)tvWnJIBOcCS9Io&(K!c@^zxHoz`TxB!eB4+?rLb~ck z;54AOOs!vr=z~#cZJml24ux1NQD?jcdN-1JBk?+(@M8Vb2=V7~sCNAvB6~7HK<*vQ zc(&*U8{6Qs@upl~EdY~B+l;ris#g|W8+BVSgD!=tpghvll(n@+>L@Z;z~Dk zAsSqWMRNRK)dPK7Ut~9FJb$#%w>6g)u)Yw8qZO>qOa7e^~a8%@o0Hs79ygcZ^R;%JjlIu+>7{wnT1L)1i(qlT>!r?!M0i`ImIp)S6>IF1uE8fAN9P51U9$X#Fi*>C@ Mw&!#ZaP?sPKfYoA+W-In delta 56643 zcmeFa3w%`7)i-?h-e)EQ1PCM{6LLGj1QJX_5(0)8kZ@7ZaKBeD8Il8xBr{=VB1FMp ztF2T~@u*v#N)_w1N-K>xT5sS}s?^IPt+urlg;t+OEU2{7iei2Ld!KV=&LrWYeZTkj zeeYL)kvV6deOY_$wbx#I?X}nXJi_7+xu-v`tO0B+BRQHiymoM?rZS{ znhZ)NjV)>QhnpH!go0P<0WZm(B){kiDO#cHJ(Cr$qPUWjY-7(rukkcVuhNuc;td2t zt-cnGsPh$45^U2$zKA~Byo2lH5MF3hlIog25FHVgHr7 zm829Xin~ZDLQ8I?#8^m2B$X=)^(a-wn$79PyVPymO;fU}N$o=5SBi)oMelf?bQ<$w^A@U7zpcuaC_LJ$j|AH&#IC#PxrN0Ur4#p z#?tWbb!_CIiHgEhMNvG;6f`nTnP%)}x#Q~9`J@CWNNZc=3+rnrNt-Pm6q2T2p$8)M zM4hS-ZzR~}Zwj|l;uUbr2cY#vhMM2+9`C%4Fd$cz*~VnGlthd*YB{;yxK}MBHyZo# z?=82w#<4reL;R+wI@DO`${}|d5my;`%=nS3kUVMZa}|(hjF0gAx{>CtAfFl+xc)~rD^ug0&wLc;E84VX@8W$!NlT4#6X*S6*_9PYd^GOq<5+1WFL z7q$nQQI(=C3bwa2Px0%<1B2=ZC@r3%a9cyDJrMD?>PFGv3sA|b!4ojJuV0;M>>m6m zS!aw&A4b+2x1?r~jmD#?6JseUX=`K8kEDGk_B=PevCle1Q9UUs%6jAJ^n!|ws&}p) zZf}WrK!Mk)Q%NK7cxJ6um1_Z!k~}pOQk6zUA&N)<-Cl2`45Z!M{%o zG02Tw7iT<6$Sp?wU0y@W96*Y?MrB?{jGNBOFkT*-+Lve{J*`4 zRs=SnwFM)X7k;pz4$U74Yk^>^KOmSx*touMgwa0ye8P;K!&ej4$Qki1;_6yAVjv-I z%c`NB>JU?OG`-p|8a+InC^lz9Ot78|R)| zBtgB$C@v{0xQ}Gd)Y{wgDr}3ADGTV%0v9IKe1fHTauFW zDEN<}JZ8L6Ql9!aNx8%yXjX_O1~uFgjFcN0rGM!6IG92T@a<8aG>-i~qbs#6laOcl zEiW+4wNb;#?ylBRE|R?)9ODBOS)g}l^0x6}#qaQZcVz|ny|KSC75~0p zSv>G#+?Cyh&vWgCxI zzizzIxSD)s{N?<1a*}`iD$6iBYKti$e27jiqzW;7wcY_K3qcElI6c6i%UCmM1FHFW z(o?A=Bzt~M%`{(l6=v@h$khC(@%n_{;Oos(mf+uiUhu6nXC5y|6frayTmOrwg{O&QJ+s=!I^%+FS5yAe8jEVKbyI#L&wQKMoOi!9l z6#R*C^D3ELGiKycnnQTSpV?63@)^lQ>$+`LEfWZ(`Gl|8NJjADQLL60625X2`X?ykgT4nh%MJYzLEKQPUDdDsJ$ugr=V zWtD6lA&vaO(JVkV@*!31cCdcFo2f&iFIKTu7ghj1tB;z&XVkEK>_p%em=j5y@n-@KbEJC;P+^%XI5-3WLM7%wzLarXC8Q%-s~aSO~KZ-_K3cW zklLv&dXxAz*-TPMd0R-oqCvkL$qv@z<^JhxROfgyeT9ZusfDd7HGfzO`&S0^<`Sgi zrB(L@!g%yWz&kYv8i5fJtwWD!%XK}VL6B38`$)9n62@rfw0RO}DGAMs_(JHbO433>td}W}`bJk` z)OXJp9hLbsDLZLFv-2zcK&~b;iyn%_LsU>Udw~W2X{vRrFQM8J&F<=1)NJf;4A5nm zZ!=kh`Usy~LvMf_!}Djc8H0+521YbbbWS0jNU(@^&SE;q`~6w$r_7HjeryHx@}JIT zgFz-Q%x3qKN29CeuxuA?CH%V!*-5&F@VnE9H>C>wi0BQG;L4RPddN)87XKQ?J9qZuC@AC3IRQ^Qs6ecs!RjUIy7HM z$5P)K#7eIL?W=U3{PmSL33+)2fLB}s+ zIeFU&(WU`}DZYqLQSK)MVtYuJ6)MWZgdez!%|GkR!3MU_&YaS{X8vgddsuwkvxR1i zsGK+%Qi>2F^tpPI?r+1A2fmyAcneZ=eq^0BS`Us?? zD;hxjt70kT*i(huLwW-?ODJx(OA5pU@Zc{%^Mc`H2Vru76SKaXbLv#vbt@A zOygvxn#z<-!1@(r6d`=ewKQXBC5G7qrUAs_wPg@hkunBF^&%TOIP@l(MQ;^gn zzs98>qDm%R>*J^RWf^Nn6eq;iqLe zgY?38FK3tFC%K8ORul2ErHO6nmQ>r!uI!fddNcbqwlRWsNAlNn_7dGi_?;_Q0J{`> z@1baX@Je28YibyS%l+aqaW3l?BMK4+fDI&es zZ`|)^ANAcuQj*s-wR*0o!ArFDE4qiE z>?p#j@Y76K8TMu7oSeN}b@BhXoSlmuWDItY4!V=ct5>s5XZjw(f3cd~>P$k`rWQ8S znS@-=wXn;aNoIvvd`c@j2v`JR=5g{9IyB3gJOv@W$=~M3%(14EveyD|a)4zOr%asU z4~sQ-dccpZ1y&1>vJY%1HkHj;`YPey3$WGcy?okFcv6r>mP4B$E1C}}zj;=BMD3*> z>iM8fYc})A6-sOgnzdkiL~Cx>wMY;QG2Fglg}+GvtYOAS@Yp6*B4rUiGYFw@U6ADx z7Ue+}CUhU+UpA>j`E9q-!SPuFXxA(TTP$9~$|>NJFYDHTN4_b=z)U_dq^9s+ufbA4 z_{lY_7C+-clHiww*bUf53uzHjUWi?bPwng2u;>F}_AJ59T7HRM-Om0lgmQfP1V7JR zg&fy+U=hNm+bmml6)VS=hO5|RW`-8?C!g1^hiF9jZR;5(53k$+>51^GHn4H2aY`XE zx$VUbtO?)Gy_)$U2HTWGQd+U#l=J(qW)t!CzprL@W1r9S*OFBJADyhBRd1)zP~=$B$28py(IOaeC$THEUlMMMbQU0GDZdzk?c9`dZKLT+4P@&(T}1!$i&RttCeb3n<@y z3-d;Q`(2h!dI#&P@39X>10QZ;OL7G#uN*VB*Ul}W-1mKOBoBJd-~B$zqshs9&<(79 zZ1d7fH7rzE-6d*D#O@uq(v~h;I&lmuu@DFs}BCx8(8#Ay?Bc7 zU){)Fpskc|`Hq@Nl_LJ|X7*@VRUHJ+NLZ?q^yXyc%+P0$6z;v9J=OQH&BZGCGau3F z%%fQBFK!P=!5Qk6qw&xEKc+>U$FSJgpP}CHEUxq@32BLM6gfsGC#Ie5jUj(k%Bgd7 z29#5O42aF_;xTEb%W?MKT&QcTw_Efn)T%Atyj(Gxf;YU}&`v&(i!t zRxRLrkteO&x8&7&NAVq3k+GQ{kd*d{%4+C^iY|gc9rCqYqIamumxO=yS9%V=^RG0w zl0eHlDcCHy3P};n-$jWg60r0~gsS5>Aa>9nMoPTu{N#{rZN>iv=Q*G*(BqbX< zBC+wvUM}`cdNV(^mlg29c9v9A9@iriYKZ{l+U3@qiM5`cvHz5a22F-dX z_8u2Wj`M*9fd44r+p<|jDnx&KRf$1zC>x5B0-kaL;7_G|&gV3ZKXQWhLo2gS&@|DN zWjR>co!{b!?%tn`Nsu5u%3(=X{){ASRIbp0m)y^RDzlPoQK^lA4Y_Q%U3pUX>JENR z3wnimKpu9YsIB4)S_J6llSU$h!B+c!cZj)REUowDYjmV_tX-<3~aY%yYML~;7PCWAu2C$qG zXdScVV2e4HyrMl&2oiucex)C}U8qzQB|l!`y#Xv=K$0|&<#-*t4a~yAc&_mSF+v~k z{a@0IJSZy7p~%4N0q8fB-wH+gq;wz zQma*^6cEeg>SYR3vSsFqv8wVoPflTl{O*6!q$~$)ZUrT7g}G4}OHsaqb7gnUgAJ6R!6M7={N^*|%oOFGZi8i2iw`9XTLG0dsU!{I>u+zjyFYWhI!D+zgrzm=i z5UNc=z|oNuue)KF6r{{-2OWUC7FTqtil6orRTI(@b6BG4X>ugyw?x%bQjb`;_|2P{_W~SrF9dVPG@cS;>@f~!v34vE zQ(~+=_7Ti|4duVNoy|{a7filH=@38blns=hcLy5_c`R@T8&-4;CC%|O{F<7%=3)N4 zNC;YUMY#rrTvWM^!WbdFGi9=`r9~c$78I?(*>ZzCSr!K#f=4_QKXX=87cn(QLI-Xh zGp=)le5v|TEZq$mz_psIoWcq_OHNw=W zrp7XjXn@93=ph=#u>|np4_9fLz78i9VMw#ZW!H-O!%&X{NNsJ%AJI`AYHt#iPaam> zSX?$yWNDTLKsXT7Tg!?>g0#FTn?d-YZ?F8M>J&_=6N%Uao8r3FXS|(AeF{4I zCc+%8K}tnc4L6QQ4j#`f9f1J18dUYf|#PpYkbpvSRu$ zHfeXVO#Ip%<zdsYsCiSDGHGS|KLzTjL@@G!5@aK6lZ*U1gp%5PX7<~ zbDFxB_Ec_MvyWvB-bdAWC;L5mT%Jkng=fN1SBG_mw z($fYN)wM@f!5C_lzYRutj65sy6vh)vG;3&tDP#6L7*=6LQk7z}wq?d|^&EAE{W5<= zj_R}9*}o!>Y&LcV8jRU1^XbDTB>Put>MlFSoK?l@9!3sGu)gy5G5(B%y^Opm6I%SE z>8s4x?%zcA%WA%Vd3xM_@J)6rI(An}j(W_lF0(aPJz>A_);yY{-r97TF(iMiYev&OE{V$Mnj*T_ zWgJ>_z514m?2(`Mg^JVzF0xO)%n28%hwLwJ;pKh%i!V~F9(IwvGTVode07f7f@*cU zrY>kY+ufq)i#zh^2Db$Jt&U-IoB4R@l^KF+UcY)FJwT168|TnBu`B--Imh^6=QHsn zt8+>B{sV_Q^z`54hoGZq-VAKeq z>=1=@qSxsBPCkrnw}0moQqpznwJ`fD>ALqi4L`3;|%tn0EHzAcmgbmOSTqZ9}5yA++jli}@2dEdc2WYHYqKr?1V(fttr}nnJfw$sZ1F8)6m#oDtk+6Dqr=uLCbS6o>bqra?3pAct!-?4bNG+|q2QOEl9e z+)mJn?Bnlgk>dAcN!ib@RWy=-3q!jjpG@nTbjPGK_xbi z__MD$awzXC?j&X7^{wY%_&(h_?93==bD|&&Q}|V1hibp}EK>^!w004wD8kri=^DSK zfYee9;rbuck!y|TevnHuneomKGQjEo{)5WQ;soUabpGH)?rW7C27~m%RIg*w%5w`z z3%MyDkRq@q`>u-8Y&>_@dHr0Z(WV?DdE4JQooks7yVWVq9iT6?vRyE?u-yIyf)NeI zT`<(}wUk)!1nIR~I>@#xJaaM4>GNONaSZV1<9>ZJHM8Xw$=G+B{v*7%aMA z4YHy=kZzt}!=Mt}wyXjGOh*~x$4};WYQhp;3g2PWW!mat>nTzLLDVanTvx5hr*^a9 zGG*G_c->~zHOdSk_(-F;&H~#ou?Ju4kF07A`PMdyJ+H52Ep9u=O*&wTwba=mI}N!P z`&a9D(QXwgnX+P8>wIe#3Y`bc_QZuDFe&WyeHM4cCKx+m7|Q|Z2zKuNurNdgeyp8x zldnCjzXGb)8ZlV20yFisCX4Hg)YQN%4NSPfs;g1dyIi**En6l5m@BLiMdLVqY+t!b z;ItX|4+UF+DH{rVQ|@265`!fgn$jMQ$fCX$*-U%D0=~J?s(4Y1P8wG0dRqe&QCH|t zL*Oh}Sl7ZXRR~Z(oe-j8c^gelfy5e`Z*B&;$V*O;v6@!DjcyvR+>_O*t+ur}<^;9@ zg+Aj<{|y3-nA;V*kU5AUtP{8`5rF+~D{fJhV1F&>1j|Wmy)@|(un%iZkiz7)-ReKs z>DpDnbjEkyf=fULAM}h*oJOQvj0g-yB~le9LuQB!c1F3O~%B9fH&hkclmt+YHa7 zO$Sj5nu)U+)Fo%5N!`JAtg=oL!~9*Z0g5nKVlyybE9N2wNsI#wfg8SXbh*#-`0 z?n-cssW#3IfkifBFf|ktlSF3b`@chH_ASIxN{><~2gJ3kym%YUxbhTeP9{*N1|lKY z{pule*kIsNZcWlzE5toTp&IVc^-^YJJ$w$C(sjYZg(TTQimw~3Pilto;{$oqdNQ{J ziKXq4?7=;1ukHHbBRdlJ6nmbiDaf|Q$ytFHY#cyC^$5e}cKw5{M|NaUGR}DMr^Av3 zp<*R!!o|xHBY$VMR}1KR^JmT_#T>G(3m$_JZf#d!C#>il-Ea|cLj!9rRzJ))yCK^{p4|FSAV>JAHvGLC*`^_kg?Slk;CkU<6#QJM) zHEOhay&0>dl_d8NH5%?i>besM!}CleoVdhdwy(_uPZmO=NqVv5SuM?u@mTJQI z+98hCXg=erz2}nMM&r*5oT77CNt^^rGs#RLEQy9p^@?DIm`X6qj>$&$M209(R=Toqfli-h)9Z!Rud0BISs zSW3#`?vxK_U0D3%%v~S`LaI+}XUw&*bge(E%QK+nptwWU45>cQ0SU;Iv2in0PgwAA z*l2QJuf=}5trMvQ#*2H~5~z0SFBeY-0}$8Z!~q^otzm5pl?6s04FdhZO;~hFelNjh z5rPm-_snE}B%%GTZNI#onjAN~YxcflgpOzYhDCI!vFzp4*z=7qr_nlQ-1~B&_}TYz zKAp;pBQF=w>8xw;E8F_;-+YJGQ!Hj*{5I0JLadJIOc}$>E5H1A1N)2c*M^@5vL}hp$f!Uf2v!7raPCAn3>9`|+6mc(B!HsNje@av_UFI!(sC(9j zdgPqJaC5j)n*$zzr5z_@P|0DLflma-QJ7L~On&PxLml%(>=ojRR*iANAI>wjy*;Ay z2==+l=VJVU>c&I~3mX`*KZCLlNh_snFwi4|&-XqFN9@l%}SjLU9Ml?ZFIK|Wa zm=ukd=#x8U31vqkrjK1!_bgTpCo?K)YY(l|Axw(SPwaZ+4+e4eRczj!eVz68C9eB4 zOmO4ww+j<{eA@n@uiY?`*yC9LdS*Ozf70|`I%H}>=P+aNfsy1TWBh^fLSwuBzy-Lu z{mg-BbOAHm@6^*J%$Wbqe7cMoKYnL266GbUtjekwJL>f^))F%xsWfK3JJeDEql&BF z9bvurn7DzSVf^~tDphCj4>57mP~*BoBcL?znsIO_>5=%8Lw?slop}=OrH}ZZ+^Hq% zOp=1jZ?Jxi;4)hgNdv(P#d$ey1p2SA%%J>?Oq=R>uboz+&4hUBH)}Nh>u^qnM_i*5 zwGmG?Zs&_z-Kx^cjOYKSkzNBy>VriTZ?7IM_|{A6Lb8Ub^GG{`%D!CQ1Z^;t=az<> zfZDKDLRfprRO6>ffqVmlP`41;(_(1bO@+N9Nm;{;&pyaax4Tq=d!;MUD|z~7Z2U0u z+;*05F~0$~Bm>QDzGUny3&f39dC^XsPj)b)?eGwapX(2Izx}oWEJXFJVE`W8vio!0 zH|fu&p8atoDc3RMk`J|0_ox3R3CeW>l+8@I5y&*2|1dv!3nR_gL4+d9bsw+0fTbE= zeb|@Y&y0S58J$(&U@_gN-JHK%lKgv3!!hW}2$YB`jEDYmWvAFw#TbsYy$R!H8&o4& zV~o{=!DqUEoZKD~rzO&UNU$Nvf=U)cTO@B@;vT9EWhC4vIZli<#WSRv{Xh;UKjE(* zBr}b+BTMM*%y{|8<>KeOqZM>3GcG@R4&BC#n~!=cw=$1yWM4k3&4(+lvvoZL>c$W| zdG9u{Dr{%Uc4oYFba>*8MFvLm!oosXsxa=feHlYaOy%8zA|lUe7BR>|-)_6uxvjvM;P$L(!%G9-d4{8DwegLO^(@=CWQ=0|_S$X1v6 zBJ}K@=*@k|A83|+iHFoe9kCn-Rr-nsKLA~~lSQvhCJ$2BOO*^Hzcq#(si!*_kED|I zbSL9~O~q~HU5w|y2}AV(g`_`j{AU-Ep_Z&TBnfJoR(*}U8C^*>Mz1d<*(81bT)|VY zea7W)=o3v&9ery!c@mc(IzB8sKnR-_9t$yUFbLKiNK<3H%ua6A`2B6dr0yCYG;VRked_BRPN33<~V z$?#MF(Ft|z>_%Ix(ONC_ZP-x>AT%p!Z^J!f3kFSaL{n1LVd597)KrDW0g}COR0i8F zv$AF#)(-x_#isTmh`m&!M6;=b1OJY-BvfKh%{wPdw!Thp!UakPUE&mahnJMcHZ!op z*j7v~FYa|H7Jv%?-7~avHJ}IvT@WB~y@TYd0@wWeBS~&2)FpsOkiV~`@eMg@Ky)_* zOWd3*RGZMjfsF_$K3=LIX5N(myfvwkNkL>4=w}r=k1bfq3^}55i>45*uibX{j?osL zb1r$McN&YV|LHg#@{%1m5=d?3w3OV!~(8MK!%q-eETWn=M^ zW)-vM#%N3^+;rSh1k(_ z{mdk#N$z)?@60Ac<7bhz(Hlz1;8QWFN6N?)i+&zW?35(^Mw3bt@F(EIDD{rI-n-NL z%$V5Jg2kpGSkltmU~c?UNR{0)%S^%HYRBr`vT{;1{3%8XppY?l!;tsPRlh-=7TNj@ zbz}5c9=V)tmg&p$K7v{(KFtyrPbp;mTR!@? zeDrVmDB=`d{w*JgZN|Ulqkqds|CW!01a0jG{@*VE3;BrcWpSsNd6qUPtA|;DvNU>h z49Q{%27Ge}E?}7!D)NvI*KPc*?XA{%mWB(+La&3XSfiyK0AymZk!yfTNm%sBXV^}m z3fS1mH`rH%6V906p-r6LG>ESuoWZp4%yHzW zlIoC-n`;fw_DD@$%m8Lu)R;)BXs1IzGe;Oft<~YA3a5uYs9M@ud`;4pu|y=p!Ud_} zR)IBBR4vn{w!nr0ei?<`lYJ8oC51vxUiAa|UYEvRD}|dYSXi{J!tox=BV~;kpL1YB z8L@__QouJ~OdfL%)3k)sEln6vJmyfU$CMtXvIHC0ZiiSOh|G(GmQx(t z*;~L^ZaYEf;A2IHnl_vXTJzeFbWFsImBJ{@Y~Z9W?ICn>&Z?h%=JC7U3TLsfvyu) zh0w)^8yClb1d`*)PAJk~t`~p{*qA$nTFaPBkBGLceL{`ZHvu`9BqM-jqGR*c^ z%I~|8%oK&B1LCyJB(?JZvt2=sfh))Z*blQhoRfQ$L(J){pB5M@{y6 zQv`gp7t3~#$ zjb$gz;$~e7zCi^}(ki+F%{NG&-MIQ~9$iYlz?rC|8v+t)6csvA!pGifE*yjI&*W{l5^-MV z#6>BY7TtF%S#dU~sItes${MYTe-Rb)Oe^9#v5+haM8^E9h;Y`IXj2!x=r;1YD#kx^ zE7?p>F#gb1l0PIZP5KgsrKEH+@FgSbVIOO3?93(g(SIUmf(;2tv?1Yx?j=?I91>jg zwI7i6B&AMB2^C}EL`+orCdIYOVbS&5NDEDhH;_YVb#%ZzzyTzL!$#5DM%>{Lr-0%d z=v?9W+RQpVumY|d#yFraO1$Y=V%j5~Vl;B7TFo&WTD0RwWcwL0<{T4gMbr07uz4Uy z0iMnak$kKTrXfD=iL1Oh1dh;0Rb`OM*M-T*f^?Nk zvy2hoQv^3t%p2lO3IYT-R5;!q=Z@XHbNEOSJP*gmj8F#4j1dw||%B z@#n4}1-Ptgdo{&!m#zvYrsrJTi%U=i^Dx{dTxzSmxGlv3n5o9B5+pnd(sERO@Bu7r zrX)(0Dn9l>^0?F7j(_$bxx^j2Seacl7dn!}OO#H|Qf}Jwm_{_X0`JEd=c|0lL!=aw z=X(#4>ckDts}GagiZ+^5WgEfcq*YuLiQhpf%LjSQk{3I@ou%gK)~uq%BS1`mro=qV zDK#k)3-Dqy{WMStoAw5HiGU$|iuie0C2(Gf2nwK0$#-Bqf^&Z1BfNNmLg(KI<0R}3 zU{u&1z3azhZekx!K0-Eh!j7vhqO}HL|1Xb9&3h{GK7`B6qh4I+5eNAIao%YT^PA#U zmakd{D-elw>7h%ljPJI}q|F#?!v`P|CFrNm~6& zKul#EDWZd>G}<^1=yH59EfPTLr=~;R@e`6;2D!a@uD%lY$3ni4wb{rP{xlGRs{5S* zb!l|(PsnEpOJ0=}=;osJ#SrQe$rNo{2Shd6d1a$3#sK+qwUJtR+33n~+6%it zkBIA|g`s}I0ATa(Yv~C46E9>-KSZh4b`InS|8Uk>WZo`pHY{eBR27}GiwyW?fF4W$ zw7RUiarVR&V375H;clD_mQmH+C=#M9_Lv!h=;Nv0$yj}j*p z_@lEI6AL5gUh%IE!plrJg8LMT={p`C>H znwI!`@>+d){4FKq4@TmzY48;0cVw<@TPfpD;VuwN!~&7~RsQxb$k0*o64?>lBZe9@ zmZB7@y*us6FIH9Qv}ZfUK;BP-;cqeg{=)H(S_;pnRzKG7B^jL+NGD3lT;Ezejlm0? za^R&Bu1fI&b6>oSR+aIhxO}OCLsiIM@)`N-@WCx#;5&6HUXtX?d2mLG7ms|A-d5pu zSiYdz8TisyNfT`fm!Na-+RuCi3=8mU-N0hCs}rJ8T!)J|m$Uen}jC15FrXqRrj0hV@r8)Ciz7PysG zGR!x?vH@>i^9`_EgSSlc4X|8?x1r`6VA+JXEb|S(Y{px*`37K0w%|3#d^_LYwd#3Q_HB6W#)OqP!V`>a2lNFrI_o(+(X0`Y91d=!Xg zaDjyk0?TZ$d|V?QQ{`j3cubd%9pZ6_d=#i;8S+u!k$L5#KqAYOj{<{isC?WEC!Pw+ zlFtHnEL%Pb#IYRtD6qzI<>NN-m?s~%=B@-CfoS3c%mPBL5Cm!5`)g z=8UpaO%|~_`J4O5U|zb9^v~R-O5>5Lgylw2c3Jc5@_nRPuy!zw+vu~Zh}V_Qulg17 z+Pr_qugD;}N9DVJMRIHxL;T!#$whqn%Oody^Sh)D0UTZ-=_nv>*}`Qui6WNQlY&{< z2{O1>^tso_REp2yt=RZvu$$CH$LuG5X6Gy(Pe?h0bSRM5b+KQC5%%Zi7Q05nWpaI5sRp;0Vcd|yfsFaVDeCd^_eeUztvzxi zW=WmS-#$W8=sxU6kB~weFwsvhDG~zoT8U+co4Ut&9UPTMzxzH}q&oMH(Z3uf_tMTY z0gdH24m9>UVlOh+G)t3?h7pe_t{}ZsbOdUCYpb>lTOE<#R+aTqpsZVoGht-&5fIO* zF>;Y36c4>Iik?5n5<30&Pe=vryuP>LNlZ)Vw`D*p`dy>-(u;1Lu+SvC-CO=~-SOlc z^ji4zz-39Oj2fit;S`6BbG+k?e}kTIx(uIJMOH^ z`X0c89>gU=d(=-l23?e|g(L0LQVBfVB~;+VhExcR+?OzUr}vz^)6L2Isw$!ZdJ&X~ z4B(SLBN^sVTpAC4M*87w%byU&Od?rnv>P&x6Dzj}mPA(nSOxq*I$wK z~>d+pngv>*TJIUAt&Dx#Uch!Cj}n)vD}tAi4{V@SF^q&#NfC z;o>vbDvY7c{+_PZq@p_*edmnh@F}DDg*~XpcFP<0%IhiOH7b4XjP=PQ>;0;TS2=?o zC;a9NH60YY#|4a)N8fQ##4I|_>(Z!(9|vu@ByB}&`p}u;LXMds`s02S;k{$84Ff2= zAlk2vF^Tdt_}Y(siT2H)Z~$s&jPA&!I-_r@JS~UT40ha#vV6&4z0ROYeY7Ko9wg4= zOK6E4_RQR$M=$Qgb}DvNtP$)p4Be18l%9`RoQ)BA7H6MgcmL{~btUk0FWl!hAciM4 zMDhZkBVug*95UC;p!smt?8j|yWP~0l`jBR}>6TQL7aMO&J7Sa+vqL^mztP(`+*{$(8#dK8XL)}nq6Ss|WGz>o^ zFs2AK{yqUxdo1j^VE*<}ETK21aZtQB3HJ-i`IRMfSAPfAPil7*(~XH{OOofjrN$!L zy7}%>I+7kx`H@muO?SAW!^`N)lcmCFl zq51fY-Zq9Z`56IKhx6yh(v+M-Dx56Gg4!NZ2^0pz4jIdjjHP+>5Zub2M@M(Qj|~v< z3X7j`<+1qlXcxAXR(jQ-`16>Y`19D}`15&V;?LD}@#k?f#B;W+zoLAJ z$~BHpqc=ESsx~=Z#@z0B8M_@Xis%46jH4a7lRHk1stW!TcO6kgf9P>I?iZhukCPKB zzMPQxj;dcGI+F@@hMTw);u0PShVq7L+ON~zF)0ECw2w={pDf{$z$ik)cpz01zUBz#uJkDfp8aDqKgg0j>}^@W03* z@Jh$I6#U5?<3$zYMFz3iM}|6)VX8~PpUf~_WSA~82o(S_h!LQ3TnheVh6N(S0+9iM z5JUzsDs-7k!5=bo9w$DL!zXeG)d6zoB8T6l;7?Z3Dl)W+3__uR3~NM&c9()bnV~~u z=nxr%ngJO$hz!@b6#U5y*NF_*i3~#dfDD^NhRrTz^HM9v7Lj9%$kE@-al6Q|)urH1 zRJN^O`3qf!)&k13Tu4x1$0nKb;{*Ie;{tt6n*Rh`U%P1=ORmmU!JM( zc0os5Mf7)sEaM--$$|@U zu%V@R{SsQtmt9PU=RMvyGdKfQpp#d%2Ueq`86H`B6copX(R(kZM{G?(^r3o+xWk3A z?S787`OP!wGZ4%kn~R7{mZss|xwNnK+%3|xh3MV05QAz^DH(}a2-4}V*$uvC4lOY& zH$y}7_vX--zh32DUO11wYFj2oJ@ctbL;&dl3+UdQPb0(EIJp?x`kfwktX%PzlO?o*D2}D9$ zFxXNiy$#}8E8Jp+(?}IgfEon#NCVbaUBY3@NNWBLO_uKPMXB(97eBBFalY_-auFS# zw%>)&t+J9?ZMBFNK0)bM6m42eClUV65_&Fu)5Vv4i)IcYRS=^Z5SdN{y9|b`BuF>48|gao z=!3g9Qi_e~6W^w70&nDy*}vz%OLg+T`HYa=gZTXK(M9C2neeOc(K33}#XtWZ-A#`2 z-CL-)u(Eu5K->opM8wgBnmldFTyj)+<1Se4kHEJfPSuXN_-EJC8rt8@t2WURI>ybH zZ=xdy!v(j<4zJgOxgB>QVj;PSdJ%>?x{2m5IpHdSj1=Mp2l`jEG zl83kz;!gIW2UqA#X~7U=x|I6x@^Y|t#pSl6f&cOQ2$qfNtk~HpH()Dld57rRA1fvu zfmxeF`7MFlm%Kav@L+zdPpl>$^iW=gu7fByyqgfDgTr*EKT7D!A%x(JL-E1UU^ zH_*)VQ-&-bI-mp=1+W;Bo^LbVyc6NdDSoZ!HJw>xOodD)5K}cf;O?Qw?b8e zwbvs!f&WTzalHlC-emymaE_a_iM;T1E;iTA(?YFnR*Bl_&0;~Q7c-|% zMdmuUfJWHtkD9~m?klG^lGK72l3xMeUf zB}(`c_)KTSJ|cGsor69$B8apd61@Upme<@yQz<(C-P`DzA#t-M0;h>)5Roz?}D6fV{g%2^dBP8 zqPtbwXimC)lR*ZCxg56}5LnubR?l~Aqvb<-nY79hvwzW)AJRsGFb$%&x%`&95x&nS zUy69vJ#_f6UV^BTa#K0p&>~Fev}n^k^ix803t=+w`BnGQv4li_b}wczy7=0C^g+6Z z@U{2TKO%YF1N0!ndvwf?>2pvn#tgs`C^p*nQTkg#{Z_s6enLA)D<`8M-^=*j|M&^b zN8O+7#Qfb(c%PqvMF5Sne@gEbZFWx|@iUr3kUq7GKJAROohD6#H<4)S<1~VT(d(ap z;szN%dWwFGAA8XM_H+91sYdc=PeTw`W5R}@;r;pJ&(J)SMR@RW(f-fUD$($y=jfBD z{)^|Z?<4JIX2cOs;m_`d$akC{+)an$XZwpZEt<6lz*cv-~vDC>r()$&_W1us^w zCO7%oKH$C=0ghQMKk^z)HlKx!#M3VV>(^jr{}&y?KYo$EKgwCUcb9i0zF=%|^Dkbf znLK+ReS>zmqkr8;bD4M;{3=Z5@xaHuMuXoJqVEiHkd_rOeeZwK`!E=nzfL>6PEegN zMFG=!WaKpo?C`pt?C?5Z5bW?eH(&Z|TByB3YW3#IF=Hym;ry&N@?<=*RB93(QZ2&-Dq44*o-z=J}UMoTN2>A zy(fIPoABN4mUrsSs9n7FHxL+2KV1DC&|z`C`ZwS+TiyKb-_RlAH;SAoiPsXgfg6b! z^Z)n_CS5Bc8odWA&QWhbowglA^#)?-+KI3Io+eu_!|4(l-SY-L!cO&-mBW~{Erq<}h19T|G1|YihUAk1LOQJtNND(R8Y$lf{|A`*6U!pmG7DRIj z2t*rI{MGlc_{^cvx8I{H)U(Wbm|m%p?VMz?VbhXj0KNO&WVQ&P2MBAes6yiC3QMRN z9`z~l9pO=Xe8;N15GD$U`Fn0A%j{I{ciUlQlaW^~aa5*|lBz|POZqwyK2_`_WvKXN z2)-)TY9 zajUK^7>ay-NIPq1^#Up^b!9AQz$;CD;a&+|#zNwFr~sn=*eZo!^J;$Eg$ZKkgDFha ze9Q6lS-^tG2n=^8_?ls?;=*3>Dq|<;w0k&MC%&a~X|oeW#S{3rEJS%WgJu`{{3huIdgV2&PL991|ID?S% zmIv3t1#8Wu;JVswq}d5!6FQ)W!7=C#x3a@+2S+z0^fcMMZuF_yFJU6sPK#-9)P;+(P!4yW6}?uoXRfs&$fUSvC3B^QF5p;B?o6Hxy$fUJS_?>Lk zC7+xCeXX)n(AxcOWmk*`#%D26y>j-3WhCkz+zy=VDZ5lfFPyWgH_mw;LfUl?$sL=< z&z_oX@<2Yz93SJ7->8b*p=@ZJ(SDOEVDNYL9C2T795EHDzC@OoPWkgHm=$8Yzpb+J zNj>0_#MJXDh7)Uv6#C7WU!Bd_g!9pF!2DpBvn`u>D@nG+^05A%ndJ$N$9*Shj@w*O z_$S$Hh{sx8`tj#Su=HvuwVxGay2q{Tu~}lp=~<$5Z_Eeeunant@;RT=H2%m5+K;60 zIVWgpYA@L2fgF~bkh#`UXPJQ^dMRSF2#{^!0NA|GsxD)QVoa+$!WEwR6{0v|v+$~vBQG-L$o*%KBi}!R9C@6N%miam_S?{u_reUn zkr?^rsrli*Bu1XD-ft#GS~dRPFGfO*yeW%K#-{t#EGG8epZtTSQ zRax;YINbksQ4ve*nfcmTii(E?Egp3%M{U0MZ&6X~e*do(6^|uwCI@30AUM-8K@IP_ zmE&&ScAVxCH^2Ef9p(|KU%Hhq`D2*~!j3JNFP{~O-$6qWfF8e^%5wR)hO&Ne8+0(A zr9r968&#N}{P6EMrs}q5^LCds?JWb>JS?3;(O8kia3KX%xY&qfQ*$P-VVqf-C^(yK z86Q{x@XZ}qMQQ=bmih_vtPvhPAj2QZW`*cV$_YT9up>IoXP=;HV)wZ$hmA`3mJ(~) z+Fr!EvoQ(hKOg0=BrAVLlC{I(xt{}5W&_!xQX2sqa@laZaxR~H1}F8r4!9>(9hP1mzXj+5`Otk->63)$=9$sWKV***(x2Dd!)C$4Sy@!onv=adfX0-{&6Q;cfb{K<_oTs?yJ}evAwKdTw#)VnXx!2-i<=p!f{%p6pIewwX~Pw*X(0iQ>?3y6^_ysq6`e@ z61p=ksmG!8IOIcj#w8(IcNXuuk7bbY{N?-D2;6V^+kLDAMo`-Q7`^dkh9&p2DTw>c z@4la%o3fP9LMixmn6qRn=4bz)Rhmg>2|q+iRGsABM-0&J5YF9 zAGm+2a|Q}mW+X))co4>&$#Vook`?cx%7Ub5*Td`qlDec9ln9I#F0(MIJ8-fr$s;be zAznd)=}dw@{|L*YrIa6hgq7y{l1TPk(>h#Hd_D43Jjx2Pbb;1oNs7OhcEwN>wp#73 zakSgoqpqJn%7&$t(rn9@6Y;{{z~gTQB%eIWiYBZPt+Xa7?cEFFN;{O-fKd-C#N%C9 z(NNwXY(KmUE9DbLvLgu*jJ^C1JJ^6U4Wh6JBDT_M2k5(#pWMNQ51n7{N6-s|lI?)# z6$zQqIZ&ti3qJlQtbzxB!s=lT_RLRM&47YS5ZSU$gaT7k^+w+3r|cYF`csxgUgFb# z$|_Szrr<`Bb=gXBtJm`zf69hkP&+>uoB@yKrf3IvlhjA!5z+z(Y}zc&AjEk}7!F{X zgdN=s-#R-xpYtQuMmHq!|9Xs7vTKq&d~;OI;(0rnmU`VOkl(qiUFS5!AT~Utwo2g0cbH*)pRAtVA$k(I~Ek>biu2HsJ6LiO6{fNvk0~fZ2vy zecYK<1b7qY69GhpHbXa?p*UqpzH^Nlp|>aTx}9uN&w!&|TtFksV4gm?PBNB9Z4|6VDq!>^8#f@@0AQ2Fb=Vt?9w}v z_~9;g{-j+=@l|hZ6{_8put*g3SR;z$67duORy`@u=_c_NkFz;+PZEFXaje?-efM!T z#Jd+66!8z;m!#lNm;);_(&L#)P^e!ANc_&3$m3(4&8Y7=nJdKr4EC3+`-n%AG4~aZCTE5P_^~9!@ym^V@dP`PM2}-Io@3(%90ccwQ>+zIbAOPR zKhK7Y!=TA-&y|P5dI;SpxH}QZcN&L=Xic3EA@t|ei`8>-TFp*?m+FpIW zRt1BH{vJg6%ZUEx^Xw7=oDbZ??tl#Rz#i62GI_rj*oa|}feI`xC1R&#dU^_2VnI#) zg-MRP3D>kzlboFZdRg~x5j5f1?rPi_QM8cx~K;4GenYSj>oIa>Aj|5{hf1i z0e@^Cs~fuCAqpT+-K@Y$m@luyr34S}_bWDCvnM+ENT9jf(gXA@5w&FU&A(zJ5txfV zh2KoX_lkw(P#m{+KjUBiij}4>^N{NKkcB#IBYKSeGP9b+FSCoO&%-}{6}~K=ewkfF zbq`lxVKe9&58v?>kCVm_?1aRrSqabUz-$EwN-(#fV zmzYaAsk91I;%$uy&W=|hI-^B^vt&qz%(S0=rfe{?&+#bNctpIj0GcbxOLKPNIQ+Uyvf7c-e3X2j1InmlPCP1cmvy>&7LSiiT#?UZuuIO-EI}?yH#{! zn@8E^F}(p-{E;oA+vQ80XyP}2WYz3`Puw$gQgqbYETE=7+y%%ILEme(+DMpmdMNQ)NY)Z*LQ(D2VJT1Z6WST`9F# zN;O!@UQZNGh7tO0pGWw29l`yVs{Nv`e8D_4_0>~=kb4|~2r)5~{f+_OFA#K`DQ|js z!9THkf6Ehv`_ywOJ>a>0z4|mgOP5f11yUTA2F&DO#F**dnc? zj+PFawDJ@#MTs`?dQ7HxkAwa6UeT~T=QKUhd#0=jUs|oX`ozfzXK<_>Vn)}JUS^ZhhmT4NMXb7@ zqM~A@fGxIEK~bqtYXvP&^O)~B9q=_oe+`-;ts6x+8; zv6-fP%}cr10{lhzaJ5NST76ZanWmOwI`9Q@uWk=;OGn=qnDSpXl_`e-*G5yZUTDhu zqbV!C@bVA+HocEDl}C(ZCq0JRNgrd%C*x>4O)$k;dAb)tMPWK?x>Kr%pM06pl!hRt z%K|agbb!zwXXw*SSX=$Am=sT(2+{96C+@VXI*~1CwY0Hu;)zLoyXb zXKN`P2-Z|KPGYrN$ zbOWaD8dILX!AP}h+!oswtJOuWzLiSd`hb|=Gzfsk@Bj@hGR5O#)xP&&bx9;iPXC?J zqkDNxJwoAzP=QXcqNKf%a%5I6&=U5tb z%W><2K^FFt-fD)o)y+^|?A>6JYFk|dREF73#p=$|S`~3DGc|maB=6tu(N=s<1^TXv zkX&0Al3V587l4SSwW*@;dyT13q;nLMGtLJh2SRkRk8<^PH$BVQum#lshtMoAjMAY`G+Zy2<9NX|lf63`2t6x|(Jw zS$9wt_0hMRvLcH{#BaY$!)(i<0poX?V(8dX0MDid8b@58?VEw6d#6dhjx;Y_FJckQ zHW6d)DOAe+(s!F0K8jaP)b>Q4+t&}Mf2^#`rlj};7r9g?L`E^dQ6&m2CU5prQf7jJ zTZQ(T;%0T>M)hMvS4Wt5`rb%+WBmhCAJr|maN;r#QF9k!zjm@or_2aUa!0XY%7r%(I_6jHIponlGUd8Kw7*-n zdZo$Llk3YuL9K_Z8AAO;PkGM}>MO^_QKRuuM+qB;(l7KgrW{yEh5A_#cp;6|&zbUx zLh{F-y-Z!y#E{iP;i&Nraa{z{bKjHsa;(RB)0sbv7U}v0Q!bhbkO+`#-5efCbA)Uk zMa5m5=U{R_JeuO49!=AP6Dpz@p~RJMt89lVKwBryDg;RQmN8T_YUbtfZXH{L?&-LE z5u5fcDBI^_XivINB$m7C9!(TCE}l2X#od7~pA)PP%&iSpZ}EmDM3%_di~$yDSb>h zbhHn?p)orF8=5f=#|U!4b&Ieca&jkrODV53;ja#cs+wvVn;V)|33gD@d8a`;F6(Yyd@PXiE zY4{+Cqkw!Wh&&W?pyqImVL5N+{nNqb^Rcvr*Z1lwyv>Q6T$~X3$~zZZDF{Vwgycy zuA#P8fjku-JY7Al%+kuNuKZnv^&S4M0vVN5*7@uolwrw1Rocqvs_wH@F+h$4)G=sj z!LF4*Sw@L~|H`k+sAo}E`~?&m)istFiam%339fK-*CRy}8S_=AVPp5wOM9@UYq_`0 zpzM@OU#Md+Xj+|{w~ze$3>p$9i+&x{F|VA4=!-15v7Gu?i&ULkEUm@OpDE9lQ-9z= zQfE>U4nt;Ap4Fp(BI}Tq$#KGMZ_hnJmY}>Lz6*$ z8knORbQ?ruoVzWlZH^FM2WHLVK(Hwz>k;+zt(LacEk9KP^Mx6B4rN{$XNe-E*tiJk zR0~}qHWjx7tK%$LP)P%=?dtZOmbTLh;|o_;(ga_g7%{$KNqrZLBUWi-R1KAZEgn%Bk6Ic&cz7&m^LV5g6cWvOteXBFWt~u&Dh%yZXM;b!5Th{0l5a1hoAi$? zIkc9B>1Qn2Tni@pge4!U1xtR`k_T$(fV!>*TVB53om+y+m$u?jI0{S(CPXYHR(O3= zoXi>Zu-S%&yVYI!m)^Bi;I0@8cNKQI>s+}0`-OJCvyw&ilmRLRd^SV2L9Py;kBqy7 z<7CtyHO?Yddd+R=uw+vu>l1 zI=Zjo=6K;Y&_+(AETqIclYU6TqYtpdD5zWRq|9!B8N&z!kP1K>fF8BqNy%5_g`>XL zBYyI{)&g68b|+0#U?X+W&OqGju&REWoU;;B`bb;ewvze{Ecn)o7Jm0d3&Ss}4&?Ph z;b-5wijtOx_mTnylcz9AFh9A788n`E#sI=jRip!p)R`W^APvxwp5G-MD!?&r$+301 zHo^6Iit<~7lx0aIR zyt^q+uZ#THc{laf7e#)2aW|&s7Wc<+y)}}!cr9IRFSA87H2Ipg%&m~~>{@y-R$mdx z(zKb<)W!uRhPm?upnu&r%kG_Uw9=Cd0M5{v53q zMs}<2wC{mzrZ3awnHQ)DlW^sW6vE*zFVY?QB3;hdOIgcT>7qC>&lUc|3}a|LR(Q|Q z<-fgI!0WH?x~+$Wt`&(NoheSxguUsW1MM@#>jzKcT)Xd!QHYhK{YwqPj_WCDUme8t z5dzmcZx$ZyCpZ3}S=Wlg`Or=DC!cz#On!-m>yPNN{3Y6u zxXRgn=ju13Z2pS>hg|#kR|r% z^4WbLM5@P%9UGV%6z+GCe?ntJ)dH7hgyxsezXqLD zx;%q}+HsJ&pMHp=^T2*8f@29o9zQ_Oigf4xgYs+M6SHyg?~);-6_@f;gpX(SzKlj#vH+!CCm_uaD3_h2L5K zS6U`~Q$2b{DeyWFY3mxr#Zzze4Gl|FB?rC*3fv|e-lF{Y7%YKig zzM)rmf>FZI!zPzIcGkgCk(miL+aHlI?=V=hJ>~XS1H98{wa5TNLhir@io;jTX*Exh78a7 z$`=Hi;m9Lmj7G@7Cd3cC)S3-Dbl99N($Sn@L%6b9hr1^Pg%SRu58iu{doG^~hZiak zVQ4`^OKr6Z2M5=b9k%Y1;g+Zi2I@oMkblVOh90bj&kt8g5YCztw!%j;!6JW;uhOk} zm&f}0`vz3{<^~a|2JYn%kFYXVwCkQIdFn&@voZoa^AGx1kbLwb8Y|QON$Y&HuvX7}j*{whMm;#&wpIIbJPt!2@%4v$_O-hd~kDjIyIrj{G!CTR$Mb0gs z&~d|A^cmd`(67gd{+x~oW4Gs|bMhP%KJM99|4V~(oNaOjo~LzSH9gL2|Dgh*AM(hr z|4Y}1$DG`+Xe?q1dSufD=mlDJ`Sb-kK)XFhJ#y98v|8T{!u$q;JWRGf{)P&8zvqM} zJi$8ee?!GWKjm@q1y9r`UrKdnJY>Zl^p!TX1bsF0I*1GLBGHM#U_Bz*&ue zJsz17!#*P$CfU(39HR4{7QAZ=&(ojGbJDtTju`wn*a80}sPf>2q$;5H+iO~SN(mg1 zs7~rQN%40|0w8bn?wwcg0*vz0SMX2u3m&;NmbZvj**lK^rB63xOm`j%pKBAl^L6G_ zL+sK-jMtRE?9R!s)IQan3t_4Kv^%fBG`c9Bhahm})_8uD{ju16B1;pvS!Va-JPsJ* zIg){%oJ%6rYdc@}Vt8Umm!V{yt}pE?UrpwFRbSoGn}5`6je(F>7#&K83|1E_FO}E> zFY4r*IIn|Fl$|A*MQy zrgDoAWdKa_DkI>1ORctponu$BN1z%0=HnK<)$3HGGh=OC=9Ph~_)$H3n>73IG!|P8 z@wu}xgEI}W&Dod5Rfe&`+f8Qo=QMqlSLWvM5F`7DE*IqRSR)%oyX`p~^c1QQQ7Gi* zp`0Lda(RpOlpz?KcGh^WkY8r=Aie$naqnIO_8LvB_r}U&xty!t@0HdyJX;-WuHk1z zoRgWyGlj9)yHdSey4*Z~tK;?=B1U9%n#^)^r)NHc#u8*v0S}+lL-@)AP4y51hGB9E z`Z{8$g5aTg#xw(WN=lKE9SJt72tH7Yu@RYepumK$so>}Gy&;?=a%IwB?js(SBL;J! z9{Z&{+mCz6$^fR3Ukv695X}z@c%r;<2oE9gh&N8oABslU3X|DCU92ac{D8iaA4>Cyy8NYWUBW z3#ao7`dP2czL5{;=e_d$jeM8^SSt|DA4_Q_w=&Tfdc7*jTv z^UHdwDGO(E5$_>UD4g48@0+zXD?QAQOqF{Q!#Xv#i+SeHZJ5er+&XgnTc#hs;I{#CrY7RG{Tk3hO zuCFkiL5p~^(ASvGn@wCN^nj2PoB6(|qa-TC6nV0lZ}&dt@&Mkc^2+z&AZd9EFGi9N z`>?tsjh53F^Jn1W#xLPfdJNdq1wB#=%3WsNxu=yI4euD?{pK5jx=W2ar_VC(CBB_c zPPv`aNVJ<7^2fJxrm{V4znz~q{K|&3oagu4%OWUf(AdEI&ZQ}|!E`=e&I`I3o6SsF z{&P-8jK$WUbCGeitInSqtecB9P&K2rRdsO@9G$x%^upnrL$dceOj9uI+`5i$joODS z-WvIzb$k=%XLu`=v+m)iqxP%hsj}yKzP6iB89%VZHo{nt{kg1N&%e}9n2z^eJ}$b8 zeJpB(w{u3rz%9Lx-_?y%W|kcM0H-UnLB#_+Rz%AOAK)K3r4M54rypg}g30B)=`T`x zHFr{rgu!!Hk$jo9k#p#Rc|i{gVhtO4hJ1Y^C!0!`cn$y9@xF`V3uli#!Os~2YSQ_?<85P~ zRNT)(Y`yitO;lhpOpVIu;Bw?4Sh?z}15K^iNvT``HidGb$PP6t{bn&d)nKI&TD#?x zK8cwhUX$9M#tQ5{Y@Ne*7-GHU^xVZ$bdR{-A}ymvChy{W=YePVsL#z3;cN~)tU-k2?Rw;cwTJ-tL^-4AHxqAM7rqT!{MZQo9g}i6-IC1 z5B#R#f69`>5Ad@15!1lxg#9$Q0j!mb*5e>IT7f9B6V$TX8ZOr!WIyc{do20fK|Z1H zg--ksXPA-Zhz`n6U*`fTUguM2@(*9c5^MXP<0S)t;40k_J=_VfK(@GSH zI>rGtgs>Ctg=736owJ}yo%1$NjP-SH&J|wP&sp-ycX-G045bt;QBEY)tQ6ZSNK1f| zY8a(M5F%a97<+xIYpSrn8p`zq(Q-Wq_?w>~&W*@axeAuPsqs&qrS+DI|WW#wwJnipWRG4_$G$foLj zB5w&(9d1^NP51596*q5ZA*ivNKhjjWiEu}AYY-COPQy9+4yOpKCQ9r>XI`*I-TN+Q z83Lrz?_Ks=&YO~u6+(}*<>X!r-%GWRrwZ?;o@TCMJ5Z26xvm=DI-ep&hn zSJD`Jf-QG_!W;F;wygM+|E-tV@`itL|K(yslsJXPn{8JGY|5B4PR)}Db~7v3)DVuB zU1P5-a#Ks7vY!!_FYD}Bh>XZtx-^oq$d1i(QzARyTkPy`4!H9LcM2Y{)z0>JlwK8F zVXw@_uhCTt!+Ne&_R30(-KP0L*RPV&TsPFiKd3U`wb?5tfjf;*L~slOpM{!3YwVTn G_WuEC)iy)` diff --git a/testing/integration-tests/src/codegen/polkadot.rs b/testing/integration-tests/src/codegen/polkadot.rs index 062e6f1c45..1a359631c0 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", @@ -60,11 +63,106 @@ pub mod api { "Crowdloan", "XcmPallet", ]; - #[doc = r" The statically generated runtime call type."] - pub type Call = runtime_types::polkadot_runtime::RuntimeCall; #[doc = r" The error type returned when there is a runtime issue."] pub type DispatchError = runtime_types::sp_runtime::DispatchError; - pub type Event = runtime_types::polkadot_runtime::RuntimeEvent; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [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 Event { + #[codec(index = 0)] + System(system::Event), + #[codec(index = 1)] + Scheduler(scheduler::Event), + #[codec(index = 10)] + Preimage(preimage::Event), + #[codec(index = 4)] + Indices(indices::Event), + #[codec(index = 5)] + Balances(balances::Event), + #[codec(index = 32)] + TransactionPayment(transaction_payment::Event), + #[codec(index = 7)] + Staking(staking::Event), + #[codec(index = 8)] + Offences(offences::Event), + #[codec(index = 9)] + Session(session::Event), + #[codec(index = 11)] + Grandpa(grandpa::Event), + #[codec(index = 12)] + ImOnline(im_online::Event), + #[codec(index = 14)] + Democracy(democracy::Event), + #[codec(index = 15)] + Council(council::Event), + #[codec(index = 16)] + TechnicalCommittee(technical_committee::Event), + #[codec(index = 17)] + PhragmenElection(phragmen_election::Event), + #[codec(index = 18)] + 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)] + Vesting(vesting::Event), + #[codec(index = 26)] + Utility(utility::Event), + #[codec(index = 28)] + Identity(identity::Event), + #[codec(index = 29)] + Proxy(proxy::Event), + #[codec(index = 30)] + Multisig(multisig::Event), + #[codec(index = 34)] + Bounties(bounties::Event), + #[codec(index = 38)] + ChildBounties(child_bounties::Event), + #[codec(index = 35)] + Tips(tips::Event), + #[codec(index = 36)] + ElectionProviderMultiPhase(election_provider_multi_phase::Event), + #[codec(index = 37)] + VoterList(voter_list::Event), + #[codec(index = 39)] + NominationPools(nomination_pools::Event), + #[codec(index = 40)] + FastUnstake(fast_unstake::Event), + #[codec(index = 53)] + ParaInclusion(para_inclusion::Event), + #[codec(index = 56)] + Paras(paras::Event), + #[codec(index = 59)] + Ump(ump::Event), + #[codec(index = 60)] + Hrmp(hrmp::Event), + #[codec(index = 62)] + ParasDisputes(paras_disputes::Event), + #[codec(index = 70)] + Registrar(registrar::Event), + #[codec(index = 71)] + Slots(slots::Event), + #[codec(index = 72)] + Auctions(auctions::Event), + #[codec(index = 73)] + Crowdloan(crowdloan::Event), + #[codec(index = 99)] + XcmPallet(xcm_pallet::Event), + } impl ::subxt::events::RootEvent for Event { fn root_event( pallet_bytes: &[u8], @@ -200,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, @@ -389,6 +510,1348 @@ 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 fn core(&self) -> Core { + Core + } + pub fn metadata(&self) -> Metadata { + Metadata + } + pub fn block_builder(&self) -> BlockBuilder { + BlockBuilder + } + pub fn nomination_pools_api(&self) -> NominationPoolsApi { + NominationPoolsApi + } + pub fn staking_api(&self) -> StakingApi { + StakingApi + } + pub fn tagged_transaction_queue(&self) -> TaggedTransactionQueue { + TaggedTransactionQueue + } + pub fn offchain_worker_api(&self) -> OffchainWorkerApi { + OffchainWorkerApi + } + pub fn parachain_host(&self) -> ParachainHost { + ParachainHost + } + pub fn beefy_api(&self) -> BeefyApi { + BeefyApi + } + pub fn mmr_api(&self) -> MmrApi { + MmrApi + } + pub fn grandpa_api(&self) -> GrandpaApi { + GrandpaApi + } + pub fn babe_api(&self) -> BabeApi { + BabeApi + } + pub fn authority_discovery_api(&self) -> AuthorityDiscoveryApi { + AuthorityDiscoveryApi + } + pub fn session_keys(&self) -> SessionKeys { + SessionKeys + } + pub fn account_nonce_api(&self) -> AccountNonceApi { + AccountNonceApi + } + pub fn transaction_payment_api(&self) -> TransactionPaymentApi { + TransactionPaymentApi + } + pub fn transaction_payment_call_api(&self) -> TransactionPaymentCallApi { + TransactionPaymentCallApi + } + } + #[doc = " The `Core` runtime api that every Substrate runtime needs to implement."] + pub struct Core; + impl Core { + #[doc = " Returns the version of the runtime."] + pub fn version( + &self, + ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< + runtime_types::sp_version::RuntimeVersion, + > { + let mut result = Vec::new(); + ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( + "Core_version", + result, + [0; 32], + ) + } + #[doc = " Execute the given block."] + pub fn execute_block( + &self, + block : runtime_types :: sp_runtime :: generic :: block :: Block < runtime_types :: sp_runtime :: generic :: header :: Header < :: core :: primitive :: u32 , runtime_types :: sp_runtime :: traits :: BlakeTwo256 > , runtime_types :: sp_runtime :: generic :: unchecked_extrinsic :: UncheckedExtrinsic < :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , () > , runtime_types :: polkadot_runtime :: RuntimeCall , runtime_types :: sp_runtime :: MultiSignature , (runtime_types :: frame_system :: extensions :: check_non_zero_sender :: CheckNonZeroSender , runtime_types :: frame_system :: extensions :: check_spec_version :: CheckSpecVersion , runtime_types :: frame_system :: extensions :: check_tx_version :: CheckTxVersion , runtime_types :: frame_system :: extensions :: check_genesis :: CheckGenesis , runtime_types :: frame_system :: extensions :: check_mortality :: CheckMortality , runtime_types :: frame_system :: extensions :: check_nonce :: CheckNonce , runtime_types :: frame_system :: extensions :: check_weight :: CheckWeight , runtime_types :: pallet_transaction_payment :: ChargeTransactionPayment , runtime_types :: polkadot_runtime_common :: claims :: PrevalidateAttests ,) > >, + ) -> ::subxt::runtime_api::StaticRuntimeApiPayload<()> { + let mut result = Vec::new(); + block.encode_to(&mut result); + ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( + "Core_execute_block", + result, + [0; 32], + ) + } + #[doc = " Initialize a block with the given header."] + pub fn initialize_block( + &self, + header: runtime_types::sp_runtime::generic::header::Header< + ::core::primitive::u32, + runtime_types::sp_runtime::traits::BlakeTwo256, + >, + ) -> ::subxt::runtime_api::StaticRuntimeApiPayload<()> { + let mut result = Vec::new(); + header.encode_to(&mut result); + ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( + "Core_initialize_block", + result, + [0; 32], + ) + } + } + #[doc = " The `Metadata` api trait that returns metadata for the runtime."] + pub struct Metadata; + impl Metadata { + #[doc = " Returns the metadata of a runtime."] + pub fn metadata( + &self, + ) -> ::subxt::runtime_api::StaticRuntimeApiPayload + { + let mut result = Vec::new(); + ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( + "Metadata_metadata", + result, + [0; 32], + ) + } + #[doc = " Returns the metadata at a given version."] + #[doc = ""] + #[doc = " If the given `version` isn't supported, this will return `None`."] + #[doc = " Use [`Self::metadata_versions`] to find out about supported metadata version of the runtime."] + pub fn metadata_at_version( + &self, + version: ::core::primitive::u32, + ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< + ::core::option::Option, + > { + let mut result = Vec::new(); + version.encode_to(&mut result); + ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( + "Metadata_metadata_at_version", + result, + [0; 32], + ) + } + #[doc = " Returns the supported metadata versions."] + #[doc = ""] + #[doc = " This can be used to call `metadata_at_version`."] + pub fn metadata_versions( + &self, + ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< + ::std::vec::Vec<::core::primitive::u32>, + > { + let mut result = Vec::new(); + ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( + "Metadata_metadata_versions", + result, + [0; 32], + ) + } + } + #[doc = " The `BlockBuilder` api trait that provides the required functionality for building a block."] + pub struct BlockBuilder; + impl BlockBuilder { + #[doc = " Apply the given extrinsic."] + #[doc = ""] + #[doc = " Returns an inclusion outcome which specifies if this extrinsic is included in"] + #[doc = " this block or not."] + pub fn apply_extrinsic( + &self, + extrinsic : runtime_types :: sp_runtime :: generic :: unchecked_extrinsic :: UncheckedExtrinsic < :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , () > , runtime_types :: polkadot_runtime :: RuntimeCall , runtime_types :: sp_runtime :: MultiSignature , (runtime_types :: frame_system :: extensions :: check_non_zero_sender :: CheckNonZeroSender , runtime_types :: frame_system :: extensions :: check_spec_version :: CheckSpecVersion , runtime_types :: frame_system :: extensions :: check_tx_version :: CheckTxVersion , runtime_types :: frame_system :: extensions :: check_genesis :: CheckGenesis , runtime_types :: frame_system :: extensions :: check_mortality :: CheckMortality , runtime_types :: frame_system :: extensions :: check_nonce :: CheckNonce , runtime_types :: frame_system :: extensions :: check_weight :: CheckWeight , runtime_types :: pallet_transaction_payment :: ChargeTransactionPayment , runtime_types :: polkadot_runtime_common :: claims :: PrevalidateAttests ,) >, + ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< + ::core::result::Result< + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + runtime_types::sp_runtime::transaction_validity::TransactionValidityError, + >, + > { + let mut result = Vec::new(); + extrinsic.encode_to(&mut result); + ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( + "BlockBuilder_apply_extrinsic", + result, + [0; 32], + ) + } + #[doc = " Finish the current block."] + pub fn finalize_block( + &self, + ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< + runtime_types::sp_runtime::generic::header::Header< + ::core::primitive::u32, + runtime_types::sp_runtime::traits::BlakeTwo256, + >, + > { + let mut result = Vec::new(); + ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( + "BlockBuilder_finalize_block", + result, + [0; 32], + ) + } + #[doc = " Generate inherent extrinsics. The inherent data will vary from chain to chain."] pub fn inherent_extrinsics (& self , inherent : runtime_types :: sp_inherents :: InherentData ,) -> :: subxt :: runtime_api :: StaticRuntimeApiPayload < :: std :: vec :: Vec < runtime_types :: sp_runtime :: generic :: unchecked_extrinsic :: UncheckedExtrinsic < :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , () > , runtime_types :: polkadot_runtime :: RuntimeCall , runtime_types :: sp_runtime :: MultiSignature , (runtime_types :: frame_system :: extensions :: check_non_zero_sender :: CheckNonZeroSender , runtime_types :: frame_system :: extensions :: check_spec_version :: CheckSpecVersion , runtime_types :: frame_system :: extensions :: check_tx_version :: CheckTxVersion , runtime_types :: frame_system :: extensions :: check_genesis :: CheckGenesis , runtime_types :: frame_system :: extensions :: check_mortality :: CheckMortality , runtime_types :: frame_system :: extensions :: check_nonce :: CheckNonce , runtime_types :: frame_system :: extensions :: check_weight :: CheckWeight , runtime_types :: pallet_transaction_payment :: ChargeTransactionPayment , runtime_types :: polkadot_runtime_common :: claims :: PrevalidateAttests ,) > > >{ + let mut result = Vec::new(); + inherent.encode_to(&mut result); + ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( + "BlockBuilder_inherent_extrinsics", + result, + [0; 32], + ) + } + #[doc = " Check that the inherents are valid. The inherent data will vary from chain to chain."] + pub fn check_inherents( + &self, + block : runtime_types :: sp_runtime :: generic :: block :: Block < runtime_types :: sp_runtime :: generic :: header :: Header < :: core :: primitive :: u32 , runtime_types :: sp_runtime :: traits :: BlakeTwo256 > , runtime_types :: sp_runtime :: generic :: unchecked_extrinsic :: UncheckedExtrinsic < :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , () > , runtime_types :: polkadot_runtime :: RuntimeCall , runtime_types :: sp_runtime :: MultiSignature , (runtime_types :: frame_system :: extensions :: check_non_zero_sender :: CheckNonZeroSender , runtime_types :: frame_system :: extensions :: check_spec_version :: CheckSpecVersion , runtime_types :: frame_system :: extensions :: check_tx_version :: CheckTxVersion , runtime_types :: frame_system :: extensions :: check_genesis :: CheckGenesis , runtime_types :: frame_system :: extensions :: check_mortality :: CheckMortality , runtime_types :: frame_system :: extensions :: check_nonce :: CheckNonce , runtime_types :: frame_system :: extensions :: check_weight :: CheckWeight , runtime_types :: pallet_transaction_payment :: ChargeTransactionPayment , runtime_types :: polkadot_runtime_common :: claims :: PrevalidateAttests ,) > >, + data: runtime_types::sp_inherents::InherentData, + ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< + runtime_types::sp_inherents::CheckInherentsResult, + > { + let mut result = Vec::new(); + block.encode_to(&mut result); + data.encode_to(&mut result); + ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( + "BlockBuilder_check_inherents", + result, + [0; 32], + ) + } + } + #[doc = " Runtime api for accessing information about nomination pools."] + pub struct NominationPoolsApi; + impl NominationPoolsApi { + #[doc = " Returns the pending rewards for the member that the AccountId was given for."] + pub fn pending_rewards( + &self, + who: ::subxt::utils::AccountId32, + ) -> ::subxt::runtime_api::StaticRuntimeApiPayload<::core::primitive::u128> + { + let mut result = Vec::new(); + who.encode_to(&mut result); + ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( + "NominationPoolsApi_pending_rewards", + result, + [0; 32], + ) + } + #[doc = " Returns the equivalent balance of `points` for a given pool."] + pub fn points_to_balance( + &self, + pool_id: ::core::primitive::u32, + points: ::core::primitive::u128, + ) -> ::subxt::runtime_api::StaticRuntimeApiPayload<::core::primitive::u128> + { + let mut result = Vec::new(); + pool_id.encode_to(&mut result); + points.encode_to(&mut result); + ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( + "NominationPoolsApi_points_to_balance", + result, + [0; 32], + ) + } + #[doc = " Returns the equivalent points of `new_funds` for a given pool."] + pub fn balance_to_points( + &self, + pool_id: ::core::primitive::u32, + new_funds: ::core::primitive::u128, + ) -> ::subxt::runtime_api::StaticRuntimeApiPayload<::core::primitive::u128> + { + let mut result = Vec::new(); + pool_id.encode_to(&mut result); + new_funds.encode_to(&mut result); + ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( + "NominationPoolsApi_balance_to_points", + result, + [0; 32], + ) + } + } + pub struct StakingApi; + impl StakingApi { + #[doc = " Returns the nominations quota for a nominator with a given balance."] + pub fn nominations_quota( + &self, + balance: ::core::primitive::u128, + ) -> ::subxt::runtime_api::StaticRuntimeApiPayload<::core::primitive::u32> { + let mut result = Vec::new(); + balance.encode_to(&mut result); + ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( + "StakingApi_nominations_quota", + result, + [0; 32], + ) + } + } + #[doc = " The `TaggedTransactionQueue` api trait for interfering with the transaction queue."] + pub struct TaggedTransactionQueue; + impl TaggedTransactionQueue { + #[doc = " Validate the transaction."] + #[doc = ""] + #[doc = " This method is invoked by the transaction pool to learn details about given transaction."] + #[doc = " The implementation should make sure to verify the correctness of the transaction"] + #[doc = " against current state. The given `block_hash` corresponds to the hash of the block"] + #[doc = " that is used as current state."] + #[doc = ""] + #[doc = " Note that this call may be performed by the pool multiple times and transactions"] + #[doc = " might be verified in any possible order."] + pub fn validate_transaction( + &self, + source: runtime_types::sp_runtime::transaction_validity::TransactionSource, + tx : runtime_types :: sp_runtime :: generic :: unchecked_extrinsic :: UncheckedExtrinsic < :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , () > , runtime_types :: polkadot_runtime :: RuntimeCall , runtime_types :: sp_runtime :: MultiSignature , (runtime_types :: frame_system :: extensions :: check_non_zero_sender :: CheckNonZeroSender , runtime_types :: frame_system :: extensions :: check_spec_version :: CheckSpecVersion , runtime_types :: frame_system :: extensions :: check_tx_version :: CheckTxVersion , runtime_types :: frame_system :: extensions :: check_genesis :: CheckGenesis , runtime_types :: frame_system :: extensions :: check_mortality :: CheckMortality , runtime_types :: frame_system :: extensions :: check_nonce :: CheckNonce , runtime_types :: frame_system :: extensions :: check_weight :: CheckWeight , runtime_types :: pallet_transaction_payment :: ChargeTransactionPayment , runtime_types :: polkadot_runtime_common :: claims :: PrevalidateAttests ,) >, + block_hash: ::subxt::utils::H256, + ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< + ::core::result::Result< + runtime_types::sp_runtime::transaction_validity::ValidTransaction, + runtime_types::sp_runtime::transaction_validity::TransactionValidityError, + >, + > { + let mut result = Vec::new(); + source.encode_to(&mut result); + tx.encode_to(&mut result); + block_hash.encode_to(&mut result); + ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( + "TaggedTransactionQueue_validate_transaction", + result, + [0; 32], + ) + } + } + #[doc = " The offchain worker api."] + pub struct OffchainWorkerApi; + impl OffchainWorkerApi { + #[doc = " Starts the off-chain task for given block header."] + pub fn offchain_worker( + &self, + header: runtime_types::sp_runtime::generic::header::Header< + ::core::primitive::u32, + runtime_types::sp_runtime::traits::BlakeTwo256, + >, + ) -> ::subxt::runtime_api::StaticRuntimeApiPayload<()> { + let mut result = Vec::new(); + header.encode_to(&mut result); + ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( + "OffchainWorkerApi_offchain_worker", + result, + [0; 32], + ) + } + } + #[doc = " The API for querying the state of parachains on-chain."] + pub struct ParachainHost; + impl ParachainHost { + #[doc = " Get the current validators."] + pub fn validators( + &self, + ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< + ::std::vec::Vec, + > { + let mut result = Vec::new(); + ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( + "ParachainHost_validators", + result, + [0; 32], + ) + } + #[doc = " Returns the validator groups and rotation info localized based on the hypothetical child"] + #[doc = " of a block whose state this is invoked on. Note that `now` in the `GroupRotationInfo`"] + #[doc = " should be the successor of the number of the block."] + pub fn validator_groups( + &self, + ) -> ::subxt::runtime_api::StaticRuntimeApiPayload<( + ::std::vec::Vec< + ::std::vec::Vec, + >, + runtime_types::polkadot_primitives::v4::GroupRotationInfo<::core::primitive::u32>, + )> { + let mut result = Vec::new(); + ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( + "ParachainHost_validator_groups", + result, + [0; 32], + ) + } + #[doc = " Yields information on all availability cores as relevant to the child block."] + #[doc = " Cores are either free or occupied. Free cores can have paras assigned to them."] + pub fn availability_cores( + &self, + ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< + ::std::vec::Vec< + runtime_types::polkadot_primitives::v4::CoreState< + ::subxt::utils::H256, + ::core::primitive::u32, + >, + >, + > { + let mut result = Vec::new(); + ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( + "ParachainHost_availability_cores", + result, + [0; 32], + ) + } + #[doc = " Yields the persisted validation data for the given `ParaId` along with an assumption that"] + #[doc = " should be used if the para currently occupies a core."] + #[doc = ""] + #[doc = " Returns `None` if either the para is not registered or the assumption is `Freed`"] + #[doc = " and the para already occupies a core."] + pub fn persisted_validation_data( + &self, + para_id: runtime_types::polkadot_parachain::primitives::Id, + assumption: runtime_types::polkadot_primitives::v4::OccupiedCoreAssumption, + ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< + ::core::option::Option< + runtime_types::polkadot_primitives::v4::PersistedValidationData< + ::subxt::utils::H256, + ::core::primitive::u32, + >, + >, + > { + let mut result = Vec::new(); + para_id.encode_to(&mut result); + assumption.encode_to(&mut result); + ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( + "ParachainHost_persisted_validation_data", + result, + [0; 32], + ) + } + #[doc = " Returns the persisted validation data for the given `ParaId` along with the corresponding"] + #[doc = " validation code hash. Instead of accepting assumption about the para, matches the validation"] + #[doc = " data hash against an expected one and yields `None` if they're not equal."] + pub fn assumed_validation_data( + &self, + para_id: runtime_types::polkadot_parachain::primitives::Id, + expected_persisted_validation_data_hash: ::subxt::utils::H256, + ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< + ::core::option::Option<( + runtime_types::polkadot_primitives::v4::PersistedValidationData< + ::subxt::utils::H256, + ::core::primitive::u32, + >, + runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + )>, + > { + let mut result = Vec::new(); + para_id.encode_to(&mut result); + expected_persisted_validation_data_hash.encode_to(&mut result); + ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( + "ParachainHost_assumed_validation_data", + result, + [0; 32], + ) + } + #[doc = " Checks if the given validation outputs pass the acceptance criteria."] + pub fn check_validation_outputs( + &self, + para_id: runtime_types::polkadot_parachain::primitives::Id, + outputs: runtime_types::polkadot_primitives::v4::CandidateCommitments< + ::core::primitive::u32, + >, + ) -> ::subxt::runtime_api::StaticRuntimeApiPayload<::core::primitive::bool> + { + let mut result = Vec::new(); + para_id.encode_to(&mut result); + outputs.encode_to(&mut result); + ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( + "ParachainHost_check_validation_outputs", + result, + [0; 32], + ) + } + #[doc = " Returns the session index expected at a child of the block."] + #[doc = ""] + #[doc = " This can be used to instantiate a `SigningContext`."] + pub fn session_index_for_child( + &self, + ) -> ::subxt::runtime_api::StaticRuntimeApiPayload<::core::primitive::u32> { + let mut result = Vec::new(); + ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( + "ParachainHost_session_index_for_child", + result, + [0; 32], + ) + } + #[doc = " Fetch the validation code used by a para, making the given `OccupiedCoreAssumption`."] + #[doc = ""] + #[doc = " Returns `None` if either the para is not registered or the assumption is `Freed`"] + #[doc = " and the para already occupies a core."] + pub fn validation_code( + &self, + para_id: runtime_types::polkadot_parachain::primitives::Id, + assumption: runtime_types::polkadot_primitives::v4::OccupiedCoreAssumption, + ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< + ::core::option::Option< + runtime_types::polkadot_parachain::primitives::ValidationCode, + >, + > { + let mut result = Vec::new(); + para_id.encode_to(&mut result); + assumption.encode_to(&mut result); + ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( + "ParachainHost_validation_code", + result, + [0; 32], + ) + } + #[doc = " Get the receipt of a candidate pending availability. This returns `Some` for any paras"] + #[doc = " assigned to occupied cores in `availability_cores` and `None` otherwise."] + pub fn candidate_pending_availability( + &self, + para_id: runtime_types::polkadot_parachain::primitives::Id, + ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< + ::core::option::Option< + runtime_types::polkadot_primitives::v4::CommittedCandidateReceipt< + ::subxt::utils::H256, + >, + >, + > { + let mut result = Vec::new(); + para_id.encode_to(&mut result); + ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( + "ParachainHost_candidate_pending_availability", + result, + [0; 32], + ) + } + #[doc = " Get a vector of events concerning candidates that occurred within a block."] + pub fn candidate_events( + &self, + ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< + ::std::vec::Vec< + runtime_types::polkadot_primitives::v4::CandidateEvent<::subxt::utils::H256>, + >, + > { + let mut result = Vec::new(); + ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( + "ParachainHost_candidate_events", + result, + [0; 32], + ) + } + #[doc = " Get all the pending inbound messages in the downward message queue for a para."] + pub fn dmq_contents( + &self, + recipient: runtime_types::polkadot_parachain::primitives::Id, + ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< + ::std::vec::Vec< + runtime_types::polkadot_core_primitives::InboundDownwardMessage< + ::core::primitive::u32, + >, + >, + > { + let mut result = Vec::new(); + recipient.encode_to(&mut result); + ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( + "ParachainHost_dmq_contents", + result, + [0; 32], + ) + } + #[doc = " Get the contents of all channels addressed to the given recipient. Channels that have no"] + #[doc = " messages in them are also included."] + pub fn inbound_hrmp_channels_contents( + &self, + recipient: runtime_types::polkadot_parachain::primitives::Id, + ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< + ::subxt::utils::KeyedVec< + runtime_types::polkadot_parachain::primitives::Id, + ::std::vec::Vec< + runtime_types::polkadot_core_primitives::InboundHrmpMessage< + ::core::primitive::u32, + >, + >, + >, + > { + let mut result = Vec::new(); + recipient.encode_to(&mut result); + ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( + "ParachainHost_inbound_hrmp_channels_contents", + result, + [0; 32], + ) + } + #[doc = " Get the validation code from its hash."] + pub fn validation_code_by_hash( + &self, + hash: runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< + ::core::option::Option< + runtime_types::polkadot_parachain::primitives::ValidationCode, + >, + > { + let mut result = Vec::new(); + hash.encode_to(&mut result); + ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( + "ParachainHost_validation_code_by_hash", + result, + [0; 32], + ) + } + #[doc = " Scrape dispute relevant from on-chain, backing votes and resolved disputes."] + pub fn on_chain_votes( + &self, + ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< + ::core::option::Option< + runtime_types::polkadot_primitives::v4::ScrapedOnChainVotes< + ::subxt::utils::H256, + >, + >, + > { + let mut result = Vec::new(); + ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( + "ParachainHost_on_chain_votes", + result, + [0; 32], + ) + } + #[doc = " Get the session info for the given session, if stored."] + #[doc = ""] + #[doc = " NOTE: This function is only available since parachain host version 2."] + pub fn session_info( + &self, + index: ::core::primitive::u32, + ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< + ::core::option::Option, + > { + let mut result = Vec::new(); + index.encode_to(&mut result); + ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( + "ParachainHost_session_info", + result, + [0; 32], + ) + } + #[doc = " Submits a PVF pre-checking statement into the transaction pool."] + #[doc = ""] + #[doc = " NOTE: This function is only available since parachain host version 2."] + pub fn submit_pvf_check_statement( + &self, + stmt: runtime_types::polkadot_primitives::v4::PvfCheckStatement, + signature: runtime_types::polkadot_primitives::v4::validator_app::Signature, + ) -> ::subxt::runtime_api::StaticRuntimeApiPayload<()> { + let mut result = Vec::new(); + stmt.encode_to(&mut result); + signature.encode_to(&mut result); + ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( + "ParachainHost_submit_pvf_check_statement", + result, + [0; 32], + ) + } + #[doc = " Returns code hashes of PVFs that require pre-checking by validators in the active set."] + #[doc = ""] + #[doc = " NOTE: This function is only available since parachain host version 2."] + pub fn pvfs_require_precheck( + &self, + ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< + ::std::vec::Vec, + > { + let mut result = Vec::new(); + ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( + "ParachainHost_pvfs_require_precheck", + result, + [0; 32], + ) + } + #[doc = " Fetch the hash of the validation code used by a para, making the given `OccupiedCoreAssumption`."] + #[doc = ""] + #[doc = " NOTE: This function is only available since parachain host version 2."] + pub fn validation_code_hash( + &self, + para_id: runtime_types::polkadot_parachain::primitives::Id, + assumption: runtime_types::polkadot_primitives::v4::OccupiedCoreAssumption, + ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< + ::core::option::Option< + runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + >, + > { + let mut result = Vec::new(); + para_id.encode_to(&mut result); + assumption.encode_to(&mut result); + ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( + "ParachainHost_validation_code_hash", + result, + [0; 32], + ) + } + #[doc = " Returns all onchain disputes."] + pub fn disputes( + &self, + ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< + ::std::vec::Vec<( + ::core::primitive::u32, + runtime_types::polkadot_core_primitives::CandidateHash, + runtime_types::polkadot_primitives::v4::DisputeState<::core::primitive::u32>, + )>, + > { + let mut result = Vec::new(); + ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( + "ParachainHost_disputes", + result, + [0; 32], + ) + } + #[doc = " Returns execution parameters for the session."] + pub fn session_executor_params( + &self, + session_index: ::core::primitive::u32, + ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< + ::core::option::Option< + runtime_types::polkadot_primitives::v4::executor_params::ExecutorParams, + >, + > { + let mut result = Vec::new(); + session_index.encode_to(&mut result); + ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( + "ParachainHost_session_executor_params", + result, + [0; 32], + ) + } + } + #[doc = " API necessary for BEEFY voters."] + pub struct BeefyApi; + impl BeefyApi { + #[doc = " Return the block number where BEEFY consensus is enabled/started"] + pub fn beefy_genesis( + &self, + ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< + ::core::option::Option<::core::primitive::u32>, + > { + let mut result = Vec::new(); + ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( + "BeefyApi_beefy_genesis", + result, + [0; 32], + ) + } + #[doc = " Return the current active BEEFY validator set"] + pub fn validator_set( + &self, + ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< + ::core::option::Option< + runtime_types::sp_consensus_beefy::ValidatorSet< + runtime_types::sp_consensus_beefy::crypto::Public, + >, + >, + > { + let mut result = Vec::new(); + ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( + "BeefyApi_validator_set", + result, + [0; 32], + ) + } + #[doc = " Submits an unsigned extrinsic to report an equivocation. The caller"] + #[doc = " must provide the equivocation proof and a key ownership proof"] + #[doc = " (should be obtained using `generate_key_ownership_proof`). The"] + #[doc = " extrinsic will be unsigned and should only be accepted for local"] + #[doc = " authorship (not to be broadcast to the network). This method returns"] + #[doc = " `None` when creation of the extrinsic fails, e.g. if equivocation"] + #[doc = " reporting is disabled for the given runtime (i.e. this method is"] + #[doc = " hardcoded to return `None`). Only useful in an offchain context."] + pub fn submit_report_equivocation_unsigned_extrinsic( + &self, + equivocation_proof: runtime_types::sp_consensus_beefy::EquivocationProof< + ::core::primitive::u32, + runtime_types::sp_consensus_beefy::crypto::Public, + runtime_types::sp_consensus_beefy::crypto::Signature, + >, + key_owner_proof: runtime_types::sp_consensus_beefy::OpaqueKeyOwnershipProof, + ) -> ::subxt::runtime_api::StaticRuntimeApiPayload<::core::option::Option<()>> + { + let mut result = Vec::new(); + equivocation_proof.encode_to(&mut result); + key_owner_proof.encode_to(&mut result); + ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( + "BeefyApi_submit_report_equivocation_unsigned_extrinsic", + result, + [0; 32], + ) + } + #[doc = " Generates a proof of key ownership for the given authority in the"] + #[doc = " given set. An example usage of this module is coupled with the"] + #[doc = " session historical module to prove that a given authority key is"] + #[doc = " tied to a given staking identity during a specific session. Proofs"] + #[doc = " of key ownership are necessary for submitting equivocation reports."] + #[doc = " NOTE: even though the API takes a `set_id` as parameter the current"] + #[doc = " implementations ignores this parameter and instead relies on this"] + #[doc = " method being called at the correct block height, i.e. any point at"] + #[doc = " which the given set id is live on-chain. Future implementations will"] + #[doc = " instead use indexed data through an offchain worker, not requiring"] + #[doc = " older states to be available."] + pub fn generate_key_ownership_proof( + &self, + set_id: ::core::primitive::u64, + authority_id: runtime_types::sp_consensus_beefy::crypto::Public, + ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< + ::core::option::Option, + > { + let mut result = Vec::new(); + set_id.encode_to(&mut result); + authority_id.encode_to(&mut result); + ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( + "BeefyApi_generate_key_ownership_proof", + result, + [0; 32], + ) + } + } + #[doc = " API to interact with MMR pallet."] + pub struct MmrApi; + impl MmrApi { + #[doc = " Return the on-chain MMR root hash."] + pub fn mmr_root( + &self, + ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< + ::core::result::Result< + ::subxt::utils::H256, + runtime_types::sp_mmr_primitives::Error, + >, + > { + let mut result = Vec::new(); + ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( + "MmrApi_mmr_root", + result, + [0; 32], + ) + } + #[doc = " Return the number of MMR blocks in the chain."] + pub fn mmr_leaf_count( + &self, + ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< + ::core::result::Result< + ::core::primitive::u64, + runtime_types::sp_mmr_primitives::Error, + >, + > { + let mut result = Vec::new(); + ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( + "MmrApi_mmr_leaf_count", + result, + [0; 32], + ) + } + #[doc = " Generate MMR proof for a series of block numbers. If `best_known_block_number = Some(n)`,"] + #[doc = " use historical MMR state at given block height `n`. Else, use current MMR state."] + pub fn generate_proof( + &self, + block_numbers: ::std::vec::Vec<::core::primitive::u32>, + best_known_block_number: ::core::option::Option<::core::primitive::u32>, + ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< + ::core::result::Result< + ( + ::std::vec::Vec, + runtime_types::sp_mmr_primitives::Proof<::subxt::utils::H256>, + ), + runtime_types::sp_mmr_primitives::Error, + >, + > { + let mut result = Vec::new(); + block_numbers.encode_to(&mut result); + best_known_block_number.encode_to(&mut result); + ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( + "MmrApi_generate_proof", + result, + [0; 32], + ) + } + #[doc = " Verify MMR proof against on-chain MMR for a batch of leaves."] + #[doc = ""] + #[doc = " Note this function will use on-chain MMR root hash and check if the proof matches the hash."] + #[doc = " Note, the leaves should be sorted such that corresponding leaves and leaf indices have the"] + #[doc = " same position in both the `leaves` vector and the `leaf_indices` vector contained in the [Proof]"] + pub fn verify_proof( + &self, + leaves: ::std::vec::Vec, + proof: runtime_types::sp_mmr_primitives::Proof<::subxt::utils::H256>, + ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< + ::core::result::Result<(), runtime_types::sp_mmr_primitives::Error>, + > { + let mut result = Vec::new(); + leaves.encode_to(&mut result); + proof.encode_to(&mut result); + ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( + "MmrApi_verify_proof", + result, + [0; 32], + ) + } + #[doc = " Verify MMR proof against given root hash for a batch of leaves."] + #[doc = ""] + #[doc = " Note this function does not require any on-chain storage - the"] + #[doc = " proof is verified against given MMR root hash."] + #[doc = ""] + #[doc = " Note, the leaves should be sorted such that corresponding leaves and leaf indices have the"] + #[doc = " same position in both the `leaves` vector and the `leaf_indices` vector contained in the [Proof]"] + pub fn verify_proof_stateless( + &self, + root: ::subxt::utils::H256, + leaves: ::std::vec::Vec, + proof: runtime_types::sp_mmr_primitives::Proof<::subxt::utils::H256>, + ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< + ::core::result::Result<(), runtime_types::sp_mmr_primitives::Error>, + > { + let mut result = Vec::new(); + root.encode_to(&mut result); + leaves.encode_to(&mut result); + proof.encode_to(&mut result); + ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( + "MmrApi_verify_proof_stateless", + result, + [0; 32], + ) + } + } + #[doc = " APIs for integrating the GRANDPA finality gadget into runtimes."] + #[doc = " This should be implemented on the runtime side."] + #[doc = ""] + #[doc = " This is primarily used for negotiating authority-set changes for the"] + #[doc = " gadget. GRANDPA uses a signaling model of changing authority sets:"] + #[doc = " changes should be signaled with a delay of N blocks, and then automatically"] + #[doc = " applied in the runtime after those N blocks have passed."] + #[doc = ""] + #[doc = " The consensus protocol will coordinate the handoff externally."] + pub struct GrandpaApi; + impl GrandpaApi { + #[doc = " Get the current GRANDPA authorities and weights. This should not change except"] + #[doc = " for when changes are scheduled and the corresponding delay has passed."] + #[doc = ""] + #[doc = " When called at block B, it will return the set of authorities that should be"] + #[doc = " used to finalize descendants of this block (B+1, B+2, ...). The block B itself"] + #[doc = " is finalized by the authorities from block B-1."] + pub fn grandpa_authorities( + &self, + ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< + ::std::vec::Vec<( + runtime_types::sp_consensus_grandpa::app::Public, + ::core::primitive::u64, + )>, + > { + let mut result = Vec::new(); + ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( + "GrandpaApi_grandpa_authorities", + result, + [0; 32], + ) + } + #[doc = " Submits an unsigned extrinsic to report an equivocation. The caller"] + #[doc = " must provide the equivocation proof and a key ownership proof"] + #[doc = " (should be obtained using `generate_key_ownership_proof`). The"] + #[doc = " extrinsic will be unsigned and should only be accepted for local"] + #[doc = " authorship (not to be broadcast to the network). This method returns"] + #[doc = " `None` when creation of the extrinsic fails, e.g. if equivocation"] + #[doc = " reporting is disabled for the given runtime (i.e. this method is"] + #[doc = " hardcoded to return `None`). Only useful in an offchain context."] + pub fn submit_report_equivocation_unsigned_extrinsic( + &self, + equivocation_proof: runtime_types::sp_consensus_grandpa::EquivocationProof< + ::subxt::utils::H256, + ::core::primitive::u32, + >, + key_owner_proof: runtime_types::sp_consensus_grandpa::OpaqueKeyOwnershipProof, + ) -> ::subxt::runtime_api::StaticRuntimeApiPayload<::core::option::Option<()>> + { + let mut result = Vec::new(); + equivocation_proof.encode_to(&mut result); + key_owner_proof.encode_to(&mut result); + ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( + "GrandpaApi_submit_report_equivocation_unsigned_extrinsic", + result, + [0; 32], + ) + } + #[doc = " Generates a proof of key ownership for the given authority in the"] + #[doc = " given set. An example usage of this module is coupled with the"] + #[doc = " session historical module to prove that a given authority key is"] + #[doc = " tied to a given staking identity during a specific session. Proofs"] + #[doc = " of key ownership are necessary for submitting equivocation reports."] + #[doc = " NOTE: even though the API takes a `set_id` as parameter the current"] + #[doc = " implementations ignore this parameter and instead rely on this"] + #[doc = " method being called at the correct block height, i.e. any point at"] + #[doc = " which the given set id is live on-chain. Future implementations will"] + #[doc = " instead use indexed data through an offchain worker, not requiring"] + #[doc = " older states to be available."] + pub fn generate_key_ownership_proof( + &self, + set_id: ::core::primitive::u64, + authority_id: runtime_types::sp_consensus_grandpa::app::Public, + ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< + ::core::option::Option< + runtime_types::sp_consensus_grandpa::OpaqueKeyOwnershipProof, + >, + > { + let mut result = Vec::new(); + set_id.encode_to(&mut result); + authority_id.encode_to(&mut result); + ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( + "GrandpaApi_generate_key_ownership_proof", + result, + [0; 32], + ) + } + #[doc = " Get current GRANDPA authority set id."] + pub fn current_set_id( + &self, + ) -> ::subxt::runtime_api::StaticRuntimeApiPayload<::core::primitive::u64> { + let mut result = Vec::new(); + ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( + "GrandpaApi_current_set_id", + result, + [0; 32], + ) + } + } + #[doc = " API necessary for block authorship with BABE."] + pub struct BabeApi; + impl BabeApi { + #[doc = " Return the configuration for BABE."] + pub fn configuration( + &self, + ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< + runtime_types::sp_consensus_babe::BabeConfiguration, + > { + let mut result = Vec::new(); + ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( + "BabeApi_configuration", + result, + [0; 32], + ) + } + #[doc = " Returns the slot that started the current epoch."] + pub fn current_epoch_start( + &self, + ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< + runtime_types::sp_consensus_slots::Slot, + > { + let mut result = Vec::new(); + ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( + "BabeApi_current_epoch_start", + result, + [0; 32], + ) + } + #[doc = " Returns information regarding the current epoch."] + pub fn current_epoch( + &self, + ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< + runtime_types::sp_consensus_babe::Epoch, + > { + let mut result = Vec::new(); + ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( + "BabeApi_current_epoch", + result, + [0; 32], + ) + } + #[doc = " Returns information regarding the next epoch (which was already"] + #[doc = " previously announced)."] + pub fn next_epoch( + &self, + ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< + runtime_types::sp_consensus_babe::Epoch, + > { + let mut result = Vec::new(); + ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( + "BabeApi_next_epoch", + result, + [0; 32], + ) + } + #[doc = " Generates a proof of key ownership for the given authority in the"] + #[doc = " current epoch. An example usage of this module is coupled with the"] + #[doc = " session historical module to prove that a given authority key is"] + #[doc = " tied to a given staking identity during a specific session. Proofs"] + #[doc = " of key ownership are necessary for submitting equivocation reports."] + #[doc = " NOTE: even though the API takes a `slot` as parameter the current"] + #[doc = " implementations ignores this parameter and instead relies on this"] + #[doc = " method being called at the correct block height, i.e. any point at"] + #[doc = " which the epoch for the given slot is live on-chain. Future"] + #[doc = " implementations will instead use indexed data through an offchain"] + #[doc = " worker, not requiring older states to be available."] + pub fn generate_key_ownership_proof( + &self, + slot: runtime_types::sp_consensus_slots::Slot, + authority_id: runtime_types::sp_consensus_babe::app::Public, + ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< + ::core::option::Option, + > { + let mut result = Vec::new(); + slot.encode_to(&mut result); + authority_id.encode_to(&mut result); + ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( + "BabeApi_generate_key_ownership_proof", + result, + [0; 32], + ) + } + #[doc = " Submits an unsigned extrinsic to report an equivocation. The caller"] + #[doc = " must provide the equivocation proof and a key ownership proof"] + #[doc = " (should be obtained using `generate_key_ownership_proof`). The"] + #[doc = " extrinsic will be unsigned and should only be accepted for local"] + #[doc = " authorship (not to be broadcast to the network). This method returns"] + #[doc = " `None` when creation of the extrinsic fails, e.g. if equivocation"] + #[doc = " reporting is disabled for the given runtime (i.e. this method is"] + #[doc = " hardcoded to return `None`). Only useful in an offchain context."] + pub fn submit_report_equivocation_unsigned_extrinsic( + &self, + equivocation_proof: runtime_types::sp_consensus_slots::EquivocationProof< + runtime_types::sp_runtime::generic::header::Header< + ::core::primitive::u32, + runtime_types::sp_runtime::traits::BlakeTwo256, + >, + runtime_types::sp_consensus_babe::app::Public, + >, + key_owner_proof: runtime_types::sp_consensus_babe::OpaqueKeyOwnershipProof, + ) -> ::subxt::runtime_api::StaticRuntimeApiPayload<::core::option::Option<()>> + { + let mut result = Vec::new(); + equivocation_proof.encode_to(&mut result); + key_owner_proof.encode_to(&mut result); + ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( + "BabeApi_submit_report_equivocation_unsigned_extrinsic", + result, + [0; 32], + ) + } + } + #[doc = " The authority discovery api."] + #[doc = ""] + #[doc = " This api is used by the `client/authority-discovery` module to retrieve identifiers"] + #[doc = " of the current and next authority set."] + pub struct AuthorityDiscoveryApi; + impl AuthorityDiscoveryApi { + #[doc = " Retrieve authority identifiers of the current and next authority set."] + pub fn authorities( + &self, + ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< + ::std::vec::Vec, + > { + let mut result = Vec::new(); + ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( + "AuthorityDiscoveryApi_authorities", + result, + [0; 32], + ) + } + } + #[doc = " Session keys runtime api."] + pub struct SessionKeys; + impl SessionKeys { + #[doc = " Generate a set of session keys with optionally using the given seed."] + #[doc = " The keys should be stored within the keystore exposed via runtime"] + #[doc = " externalities."] + #[doc = ""] + #[doc = " The seed needs to be a valid `utf8` string."] + #[doc = ""] + #[doc = " Returns the concatenated SCALE encoded public keys."] + pub fn generate_session_keys( + &self, + seed: ::core::option::Option<::std::vec::Vec<::core::primitive::u8>>, + ) -> ::subxt::runtime_api::StaticRuntimeApiPayload<::std::vec::Vec<::core::primitive::u8>> + { + let mut result = Vec::new(); + seed.encode_to(&mut result); + ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( + "SessionKeys_generate_session_keys", + result, + [0; 32], + ) + } + #[doc = " Decode the given public session keys."] + #[doc = ""] + #[doc = " Returns the list of public raw public keys + key type."] + pub fn decode_session_keys( + &self, + encoded: ::std::vec::Vec<::core::primitive::u8>, + ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< + ::core::option::Option< + ::std::vec::Vec<( + ::std::vec::Vec<::core::primitive::u8>, + runtime_types::sp_core::crypto::KeyTypeId, + )>, + >, + > { + let mut result = Vec::new(); + encoded.encode_to(&mut result); + ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( + "SessionKeys_decode_session_keys", + result, + [0; 32], + ) + } + } + #[doc = " The API to query account nonce (aka transaction index)."] + pub struct AccountNonceApi; + impl AccountNonceApi { + #[doc = " Get current account nonce of given `AccountId`."] + pub fn account_nonce( + &self, + account: ::subxt::utils::AccountId32, + ) -> ::subxt::runtime_api::StaticRuntimeApiPayload<::core::primitive::u32> { + let mut result = Vec::new(); + account.encode_to(&mut result); + ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( + "AccountNonceApi_account_nonce", + result, + [0; 32], + ) + } + } + pub struct TransactionPaymentApi; + impl TransactionPaymentApi { + pub fn query_info( + &self, + uxt : runtime_types :: sp_runtime :: generic :: unchecked_extrinsic :: UncheckedExtrinsic < :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , () > , runtime_types :: polkadot_runtime :: RuntimeCall , runtime_types :: sp_runtime :: MultiSignature , (runtime_types :: frame_system :: extensions :: check_non_zero_sender :: CheckNonZeroSender , runtime_types :: frame_system :: extensions :: check_spec_version :: CheckSpecVersion , runtime_types :: frame_system :: extensions :: check_tx_version :: CheckTxVersion , runtime_types :: frame_system :: extensions :: check_genesis :: CheckGenesis , runtime_types :: frame_system :: extensions :: check_mortality :: CheckMortality , runtime_types :: frame_system :: extensions :: check_nonce :: CheckNonce , runtime_types :: frame_system :: extensions :: check_weight :: CheckWeight , runtime_types :: pallet_transaction_payment :: ChargeTransactionPayment , runtime_types :: polkadot_runtime_common :: claims :: PrevalidateAttests ,) >, + len: ::core::primitive::u32, + ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< + runtime_types::pallet_transaction_payment::types::RuntimeDispatchInfo< + ::core::primitive::u128, + runtime_types::sp_weights::weight_v2::Weight, + >, + > { + let mut result = Vec::new(); + uxt.encode_to(&mut result); + len.encode_to(&mut result); + ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( + "TransactionPaymentApi_query_info", + result, + [0; 32], + ) + } + pub fn query_fee_details( + &self, + uxt : runtime_types :: sp_runtime :: generic :: unchecked_extrinsic :: UncheckedExtrinsic < :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , () > , runtime_types :: polkadot_runtime :: RuntimeCall , runtime_types :: sp_runtime :: MultiSignature , (runtime_types :: frame_system :: extensions :: check_non_zero_sender :: CheckNonZeroSender , runtime_types :: frame_system :: extensions :: check_spec_version :: CheckSpecVersion , runtime_types :: frame_system :: extensions :: check_tx_version :: CheckTxVersion , runtime_types :: frame_system :: extensions :: check_genesis :: CheckGenesis , runtime_types :: frame_system :: extensions :: check_mortality :: CheckMortality , runtime_types :: frame_system :: extensions :: check_nonce :: CheckNonce , runtime_types :: frame_system :: extensions :: check_weight :: CheckWeight , runtime_types :: pallet_transaction_payment :: ChargeTransactionPayment , runtime_types :: polkadot_runtime_common :: claims :: PrevalidateAttests ,) >, + len: ::core::primitive::u32, + ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< + runtime_types::pallet_transaction_payment::types::FeeDetails< + ::core::primitive::u128, + >, + > { + let mut result = Vec::new(); + uxt.encode_to(&mut result); + len.encode_to(&mut result); + ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( + "TransactionPaymentApi_query_fee_details", + result, + [0; 32], + ) + } + pub fn query_weight_to_fee( + &self, + weight: runtime_types::sp_weights::weight_v2::Weight, + ) -> ::subxt::runtime_api::StaticRuntimeApiPayload<::core::primitive::u128> + { + let mut result = Vec::new(); + weight.encode_to(&mut result); + ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( + "TransactionPaymentApi_query_weight_to_fee", + result, + [0; 32], + ) + } + pub fn query_length_to_fee( + &self, + length: ::core::primitive::u32, + ) -> ::subxt::runtime_api::StaticRuntimeApiPayload<::core::primitive::u128> + { + let mut result = Vec::new(); + length.encode_to(&mut result); + ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( + "TransactionPaymentApi_query_length_to_fee", + result, + [0; 32], + ) + } + } + pub struct TransactionPaymentCallApi; + impl TransactionPaymentCallApi { + #[doc = " Query information of a dispatch class, weight, and fee of a given encoded `Call`."] + pub fn query_call_info( + &self, + call: runtime_types::polkadot_runtime::RuntimeCall, + len: ::core::primitive::u32, + ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< + runtime_types::pallet_transaction_payment::types::RuntimeDispatchInfo< + ::core::primitive::u128, + runtime_types::sp_weights::weight_v2::Weight, + >, + > { + let mut result = Vec::new(); + call.encode_to(&mut result); + len.encode_to(&mut result); + ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( + "TransactionPaymentCallApi_query_call_info", + result, + [0; 32], + ) + } + #[doc = " Query fee details of a given encoded `Call`."] + pub fn query_call_fee_details( + &self, + call: runtime_types::polkadot_runtime::RuntimeCall, + len: ::core::primitive::u32, + ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< + runtime_types::pallet_transaction_payment::types::FeeDetails< + ::core::primitive::u128, + >, + > { + let mut result = Vec::new(); + call.encode_to(&mut result); + len.encode_to(&mut result); + ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( + "TransactionPaymentCallApi_query_call_fee_details", + result, + [0; 32], + ) + } + #[doc = " Query the output of the current `WeightToFee` given some input."] + pub fn query_weight_to_fee( + &self, + weight: runtime_types::sp_weights::weight_v2::Weight, + ) -> ::subxt::runtime_api::StaticRuntimeApiPayload<::core::primitive::u128> + { + let mut result = Vec::new(); + weight.encode_to(&mut result); + ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( + "TransactionPaymentCallApi_query_weight_to_fee", + result, + [0; 32], + ) + } + #[doc = " Query the output of the current `LengthToFee` given some input."] + pub fn query_length_to_fee( + &self, + length: ::core::primitive::u32, + ) -> ::subxt::runtime_api::StaticRuntimeApiPayload<::core::primitive::u128> + { + let mut result = Vec::new(); + length.encode_to(&mut result); + ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( + "TransactionPaymentCallApi_query_length_to_fee", + result, + [0; 32], + ) + } + } + } pub struct ConstantsApi; impl ConstantsApi { pub fn system(&self) -> system::constants::ConstantsApi { @@ -412,9 +1875,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 } @@ -433,6 +1893,12 @@ pub mod api { 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 } @@ -471,6 +1937,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 } @@ -549,6 +2018,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 } @@ -662,9 +2140,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 } @@ -695,6 +2170,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 } @@ -789,9 +2273,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, + 249u8, 78u8, 188u8, 5u8, 29u8, 44u8, 55u8, 180u8, 164u8, 85u8, 12u8, 151u8, 222u8, + 121u8, 117u8, 192u8, 79u8, 39u8, 68u8, 212u8, 58u8, 118u8, 65u8, 98u8, 180u8, + 133u8, 156u8, 160u8, 169u8, 246u8, 43u8, 84u8, ] { Err(::subxt::error::MetadataError::IncompatibleMetadata) @@ -814,18 +2298,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] - #[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 { @@ -839,6 +2312,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -851,6 +2325,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -863,6 +2338,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -875,6 +2351,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -890,6 +2367,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -902,6 +2380,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -915,6 +2394,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -922,28 +2402,10 @@ pub mod api { } 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>, @@ -978,16 +2440,8 @@ 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>, @@ -1005,13 +2459,8 @@ 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>, @@ -1114,6 +2563,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 extrinsic completed successfully."] @@ -1131,6 +2581,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 extrinsic failed."] @@ -1149,6 +2600,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 = "`:code` was updated."] @@ -1164,6 +2616,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 account was created."] @@ -1181,6 +2634,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 reaped."] @@ -1198,6 +2652,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 = "On on-chain remark happened."] @@ -1222,7 +2677,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, @@ -1235,9 +2690,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, ], ) } @@ -1248,7 +2704,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, @@ -1259,9 +2715,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, ], ) } @@ -1513,9 +2970,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, ], ) } @@ -1811,6 +3269,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -1827,6 +3286,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -1840,6 +3300,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -1857,6 +3318,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -1869,6 +3331,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -1885,6 +3348,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -1918,10 +3382,9 @@ pub mod api { 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, ], ) } @@ -1965,9 +3428,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, ], ) } @@ -1988,10 +3452,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, @@ -2012,17 +3472,14 @@ pub mod api { 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], @@ -2045,10 +3502,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, ], ) } @@ -2065,6 +3522,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 = "Scheduled some task."] @@ -2083,6 +3541,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 = "Canceled some task."] @@ -2101,6 +3560,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 = "Dispatched some task."] @@ -2120,6 +3580,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 call for the provided hash was not found so the task has been aborted."] @@ -2138,6 +3599,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 task was unable to be renewed since the agenda is full at that block."] @@ -2156,6 +3618,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 task can never be executed since it is overweight."] @@ -2199,7 +3662,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], @@ -2223,9 +3686,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, ], ) } @@ -2234,7 +3698,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], @@ -2256,9 +3720,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, ], ) } @@ -2338,6 +3803,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> { @@ -2370,6 +3839,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -2382,6 +3852,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -2394,6 +3865,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -2406,6 +3878,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -2503,6 +3976,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 preimage has been noted."] @@ -2520,6 +3994,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 preimage has been requested."] @@ -2537,6 +4012,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 preimage has ben cleared."] @@ -2609,7 +4085,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, @@ -2632,7 +4110,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, @@ -2666,6 +4146,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -2687,6 +4168,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -2708,6 +4190,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -2830,7 +4313,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, )>, @@ -2973,7 +4456,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, )>, @@ -3027,7 +4510,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, @@ -3052,7 +4535,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], >, (), @@ -3216,6 +4699,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 { @@ -3291,6 +4805,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -3309,12 +4824,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 = "# "] pub fn set(&self, now: ::core::primitive::u64) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Timestamp", @@ -3418,6 +4932,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -3430,6 +4945,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -3444,6 +4960,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -3456,6 +4973,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -3471,6 +4989,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -3488,14 +5007,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 = "# "] pub fn claim(&self, index: ::core::primitive::u32) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Indices", @@ -3518,16 +5031,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 = "# "] pub fn transfer( &self, new: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, @@ -3554,14 +5059,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 = "# "] pub fn free(&self, index: ::core::primitive::u32) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Indices", @@ -3586,16 +5085,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 = "# "] pub fn force_transfer( &self, new: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, @@ -3624,14 +5115,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 = "# "] pub fn freeze( &self, index: ::core::primitive::u32, @@ -3660,6 +5145,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 account index was assigned."] @@ -3679,6 +5165,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 account index has been freed up (unassigned)."] @@ -3696,6 +5183,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 account index has been frozen to its current account ID."] @@ -3803,9 +5291,10 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 struct TransferAllowDeath { pub dest: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, #[codec(compact)] pub value: ::core::primitive::u128, @@ -3817,14 +5306,15 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 struct SetBalanceDeprecated { pub who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, #[codec(compact)] pub new_free: ::core::primitive::u128, #[codec(compact)] - pub new_reserved: ::core::primitive::u128, + pub old_reserved: ::core::primitive::u128, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -3833,6 +5323,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -3848,6 +5339,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -3862,6 +5354,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -3875,92 +5368,111 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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", + 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", + 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, ()>, @@ -3983,12 +5495,12 @@ 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, ()>, @@ -4020,9 +5532,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)."] pub fn transfer_all( &self, dest: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, @@ -4060,6 +5570,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", + 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", + 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", + 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"] @@ -4073,6 +5645,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 created with some free balance."] @@ -4091,6 +5664,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 removed whose balance was non-zero but below ExistentialDeposit,"] @@ -4110,6 +5684,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 = "Transfer succeeded."] @@ -4129,13 +5704,13 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 balance was set by root."] 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"; @@ -4148,6 +5723,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 reserved (moved from free to reserved)."] @@ -4166,6 +5742,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 unreserved (moved from reserved to free)."] @@ -4184,6 +5761,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 moved from the reserve of the first account to the second account."] @@ -4206,6 +5784,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 deposited (e.g. for transaction fees)."] @@ -4224,6 +5803,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 withdrawn from the account (e.g. for transaction fees)."] @@ -4242,6 +5822,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 removed from the account (e.g. for misbehavior)."] @@ -4253,6 +5834,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; @@ -4279,6 +6030,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"] @@ -4308,7 +6081,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, @@ -4320,9 +6093,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, ], ) } @@ -4354,7 +6128,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, @@ -4364,9 +6138,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, ], ) } @@ -4377,8 +6152,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, @@ -4403,8 +6178,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, @@ -4427,8 +6202,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, >, @@ -4455,8 +6230,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, >, @@ -4476,27 +6251,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, ], ) } @@ -4506,7 +6367,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> { @@ -4547,6 +6415,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, + ], + ) + } } } } @@ -4564,6 +6458,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 transaction fee `actual_fee`, of which `tip` was added to the minimum inclusion fee,"] @@ -4670,86 +6565,10 @@ pub mod api { pub mod authorship { 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 :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[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, @@ -4772,50 +6591,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, - ], - ) - } } } } @@ -4834,6 +6609,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -4850,6 +6626,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -4863,6 +6640,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -4877,6 +6655,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -4889,6 +6668,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -4901,6 +6681,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -4914,6 +6695,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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; @@ -4924,6 +6706,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -4937,6 +6720,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -4949,6 +6733,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -4962,6 +6747,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -4975,6 +6761,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -4987,6 +6774,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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; @@ -4997,6 +6785,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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; @@ -5007,6 +6796,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -5019,6 +6809,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -5032,6 +6823,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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; @@ -5042,6 +6834,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -5055,6 +6848,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -5068,6 +6862,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -5081,6 +6876,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -5094,6 +6890,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -5107,6 +6904,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -5134,6 +6932,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -5146,11 +6945,25 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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"] @@ -5161,15 +6974,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 = "# "] pub fn bond( &self, controller: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, @@ -5205,10 +7016,9 @@ 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, @@ -5234,8 +7044,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."] @@ -5270,10 +7080,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 = "# "] pub fn withdraw_unbonded( &self, num_slashing_spans: ::core::primitive::u32, @@ -5317,11 +7126,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 = "# "] pub fn nominate( &self, targets: ::std::vec::Vec< @@ -5346,11 +7154,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 = "# "] pub fn chill(&self) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Staking", @@ -5370,16 +7177,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 = "# "] pub fn set_payee( &self, payee: runtime_types::pallet_staking::RewardDestination< @@ -5403,16 +7206,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 = "# "] pub fn set_controller( &self, controller: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, @@ -5432,10 +7230,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)"] pub fn set_validator_count( &self, new: ::core::primitive::u32, @@ -5456,9 +7252,8 @@ 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, @@ -5479,9 +7274,8 @@ 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, @@ -5508,11 +7302,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 = "# "] pub fn force_no_eras(&self) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Staking", @@ -5536,11 +7328,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 = "# "] pub fn force_new_era(&self) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Staking", @@ -5618,7 +7408,7 @@ 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( @@ -5647,18 +7437,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)."] pub fn payout_stakers( &self, validator_stash: ::subxt::utils::AccountId32, @@ -5682,11 +7462,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 = "# "] pub fn rebond( &self, value: ::core::primitive::u128, @@ -5879,6 +7657,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", + 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"] @@ -5892,6 +7690,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 era payout has been set; the first balance is the validator-payout; the second is"] @@ -5912,6 +7711,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 nominator has been rewarded by this amount."] @@ -5930,9 +7730,10 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 = "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, @@ -5941,6 +7742,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, @@ -5949,6 +7771,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 old slashing report from a prior era was discarded because it could"] @@ -5967,6 +7790,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 set of stakers was elected."] @@ -5982,6 +7806,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 bonded this amount. \\[stash, amount\\]"] @@ -6003,6 +7828,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 unbonded this amount."] @@ -6021,6 +7847,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 called `withdraw_unbonded` and removed unbonding chunks worth `Balance`"] @@ -6040,6 +7867,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 nominator has been kicked from a validator."] @@ -6058,6 +7886,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 failed. No new era is planned."] @@ -6073,6 +7902,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 stopped participating as either a validator or nominator."] @@ -6090,6 +7920,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 stakers' rewards are getting paid."] @@ -6108,6 +7939,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 validator has set their preferences."] @@ -6119,6 +7951,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; @@ -6190,6 +8040,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>, @@ -6214,6 +8066,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< @@ -6276,6 +8130,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."] @@ -6347,6 +8222,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>, @@ -6372,6 +8249,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< @@ -6394,6 +8273,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>, @@ -6419,6 +8300,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< @@ -6500,6 +8383,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>, @@ -6540,6 +8425,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< @@ -7444,30 +9331,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`)."] @@ -7651,6 +9514,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 = "There is an offence reported of the given `kind` happened at the `session_index` and"] @@ -7858,6 +9722,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -7871,6 +9736,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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; @@ -7882,14 +9748,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."] pub fn set_keys( &self, keys: runtime_types::polkadot_runtime::SessionKeys, @@ -7915,13 +9776,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."] pub fn purge_keys(&self) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Session", @@ -7948,6 +9805,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 session has happened. Note that the argument is the session index, not the"] @@ -8194,11 +10052,12 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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< + runtime_types::sp_consensus_grandpa::EquivocationProof< ::subxt::utils::H256, ::core::primitive::u32, >, @@ -8212,11 +10071,12 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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< + runtime_types::sp_consensus_grandpa::EquivocationProof< ::subxt::utils::H256, ::core::primitive::u32, >, @@ -8230,6 +10090,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -8244,7 +10105,7 @@ 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, >, @@ -8275,7 +10136,7 @@ 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, >, @@ -8341,12 +10202,13 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 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, )>, } @@ -8361,6 +10223,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 authority set has been paused."] @@ -8376,6 +10239,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 authority set has been resumed."] @@ -8501,6 +10365,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, @@ -8529,6 +10399,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, @@ -8572,6 +10448,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, + ], + ) + } } } } @@ -8590,6 +10486,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -8598,15 +10495,11 @@ pub mod api { } 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>, @@ -8640,6 +10533,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 heartbeat was received from `AuthorityId`."] @@ -8657,6 +10551,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 = "At the end of the session, no offence was committed."] @@ -8672,6 +10567,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 = "At the end of the session, at least one validator was found to be offline."] @@ -8730,7 +10626,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, @@ -8901,6 +10797,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -8917,6 +10814,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -8930,6 +10828,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -8946,6 +10845,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -8958,6 +10858,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -8972,6 +10873,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -8986,6 +10888,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -9000,6 +10903,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -9014,6 +10918,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -9026,6 +10931,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -9039,6 +10945,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -9053,6 +10960,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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; @@ -9063,6 +10971,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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; @@ -9073,6 +10982,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -9086,6 +10996,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -9098,6 +11009,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -9111,6 +11023,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -9124,12 +11037,27 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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."] @@ -9633,6 +11561,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", + 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"] @@ -9646,6 +11605,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 motion has been proposed by a public account."] @@ -9664,6 +11624,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 public proposal has been tabled for referendum vote."] @@ -9682,6 +11643,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 external proposal has been tabled."] @@ -9697,6 +11659,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 referendum has begun."] @@ -9716,6 +11679,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 proposal has been approved by referendum."] @@ -9734,6 +11698,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 proposal has been rejected by referendum."] @@ -9752,6 +11717,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 referendum has been cancelled."] @@ -9769,6 +11735,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 delegated their vote to another account."] @@ -9787,6 +11754,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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."] @@ -9804,6 +11772,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 external proposal has been vetoed."] @@ -9823,6 +11792,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 proposal_hash has been blacklisted permanently."] @@ -9840,6 +11810,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 voted in a referendum"] @@ -9860,6 +11831,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 secconded a proposal"] @@ -9879,6 +11851,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 proposal got canceled."] @@ -9889,6 +11862,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; @@ -9921,7 +11952,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, @@ -9953,7 +11984,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, @@ -9983,7 +12014,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, @@ -10230,7 +12261,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, >, ), @@ -10260,7 +12291,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, >, ), @@ -10327,6 +12358,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 { @@ -10531,6 +12621,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -10545,6 +12636,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -10559,6 +12651,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -10575,6 +12668,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -10590,24 +12684,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] - #[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 { @@ -10620,6 +12697,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -10639,7 +12717,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."] @@ -10651,19 +12729,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 = "# "] pub fn set_members( &self, new_members: ::std::vec::Vec<::subxt::utils::AccountId32>, @@ -10690,13 +12760,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`"] pub fn execute( &self, proposal: runtime_types::polkadot_runtime::RuntimeCall, @@ -10710,10 +12778,10 @@ pub mod api { 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, ], ) } @@ -10724,26 +12792,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 = "# "] pub fn propose( &self, threshold: ::core::primitive::u32, @@ -10759,10 +12814,9 @@ pub mod api { 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, ], ) } @@ -10773,14 +12827,8 @@ 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, @@ -10802,61 +12850,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 = ""] @@ -10865,12 +12858,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"] pub fn disapprove_proposal( &self, proposal_hash: ::subxt::utils::H256, @@ -10904,20 +12893,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 = "# "] pub fn close( &self, proposal_hash: ::subxt::utils::H256, @@ -10954,6 +12935,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 motion (given hash) has been proposed (by given account) with a threshold (given"] @@ -10975,6 +12957,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 motion (given hash) has been voted on by given account, leaving"] @@ -10997,6 +12980,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 motion was approved by the required threshold."] @@ -11014,6 +12998,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 motion was not approved by the required threshold."] @@ -11031,6 +13016,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 motion was executed; result will be `Ok` if it returned without error."] @@ -11049,6 +13035,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 single member did some action; result will be `Ok` if it returned without error."] @@ -11067,6 +13054,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 proposal was closed because its threshold was reached or after its duration was up."] @@ -11089,7 +13077,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, (), @@ -11124,10 +13114,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, ], ) } @@ -11146,10 +13135,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, ], ) } @@ -11290,6 +13278,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -11304,6 +13293,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -11318,6 +13308,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -11334,6 +13325,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -11349,24 +13341,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] - #[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 { @@ -11379,6 +13354,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -11398,7 +13374,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."] @@ -11410,19 +13386,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 = "# "] pub fn set_members( &self, new_members: ::std::vec::Vec<::subxt::utils::AccountId32>, @@ -11449,13 +13417,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`"] pub fn execute( &self, proposal: runtime_types::polkadot_runtime::RuntimeCall, @@ -11469,10 +13435,10 @@ pub mod api { 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, ], ) } @@ -11483,26 +13449,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 = "# "] pub fn propose( &self, threshold: ::core::primitive::u32, @@ -11518,10 +13471,9 @@ pub mod api { 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, ], ) } @@ -11532,14 +13484,8 @@ 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, @@ -11561,61 +13507,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 = ""] @@ -11624,12 +13515,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"] pub fn disapprove_proposal( &self, proposal_hash: ::subxt::utils::H256, @@ -11663,20 +13550,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 = "# "] pub fn close( &self, proposal_hash: ::subxt::utils::H256, @@ -11713,6 +13592,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 motion (given hash) has been proposed (by given account) with a threshold (given"] @@ -11734,6 +13614,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 motion (given hash) has been voted on by given account, leaving"] @@ -11756,6 +13637,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 motion was approved by the required threshold."] @@ -11773,6 +13655,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 motion was not approved by the required threshold."] @@ -11790,6 +13673,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 motion was executed; result will be `Ok` if it returned without error."] @@ -11808,6 +13692,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 single member did some action; result will be `Ok` if it returned without error."] @@ -11826,6 +13711,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 proposal was closed because its threshold was reached or after its duration was up."] @@ -11848,7 +13734,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, (), @@ -11883,10 +13771,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, ], ) } @@ -11905,10 +13792,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, ], ) } @@ -12049,6 +13935,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -12063,6 +13950,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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; @@ -12073,6 +13961,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -12086,6 +13975,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -12098,6 +13988,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -12112,6 +14003,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -12139,10 +14031,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 = "# "] pub fn vote( &self, votes: ::std::vec::Vec<::subxt::utils::AccountId32>, @@ -12189,9 +14077,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."] pub fn submit_candidacy( &self, candidate_count: ::core::primitive::u32, @@ -12221,10 +14109,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)"] pub fn renounce_candidacy( &self, renouncing: runtime_types::pallet_elections_phragmen::Renouncing, @@ -12254,10 +14144,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()."] pub fn remove_member( &self, who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, @@ -12286,9 +14174,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."] pub fn clean_defunct_voters( &self, num_voters: ::core::primitive::u32, @@ -12322,6 +14209,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 term with new_members. This indicates that enough candidates existed to run"] @@ -12344,6 +14232,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 = "No (or not enough) candidates existed for this round. This is different from"] @@ -12360,6 +14249,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 = "Internal error happened while trying to perform election."] @@ -12375,6 +14265,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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. This should always be followed by either `NewTerm` or"] @@ -12393,6 +14284,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 = "Someone has renounced their candidacy."] @@ -12410,6 +14302,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 slashed by amount due to failing to obtain a seat as member or"] @@ -12431,6 +14324,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 seat holder was slashed by amount by being forcefully removed from the set."] @@ -12723,9 +14617,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> { @@ -12742,7 +14637,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( @@ -12756,6 +14653,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, + ], + ) + } } } } @@ -12774,6 +14689,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -12786,6 +14702,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -12798,6 +14715,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -12811,6 +14729,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -12823,6 +14742,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -12835,6 +14755,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -12847,6 +14768,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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; @@ -12997,6 +14919,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 member was added; see the transaction for who."] @@ -13012,6 +14935,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 member was removed; see the transaction for who."] @@ -13027,6 +14951,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 = "Two members were swapped; see the transaction for who."] @@ -13042,6 +14967,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 membership was reset; see the transaction for who the new set is."] @@ -13057,6 +14983,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 = "One of the members' keys changed."] @@ -13072,6 +14999,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 = "Phantom member, never used."] @@ -13090,7 +15018,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, @@ -13148,6 +15076,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -13162,6 +15091,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -13175,6 +15105,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -13188,6 +15119,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -13202,6 +15134,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -13214,11 +15147,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)"] pub fn propose_spend( &self, value: ::core::primitive::u128, @@ -13239,11 +15169,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)"] pub fn reject_proposal( &self, proposal_id: ::core::primitive::u32, @@ -13265,11 +15192,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)."] pub fn approve_proposal( &self, proposal_id: ::core::primitive::u32, @@ -13318,10 +15242,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,"] @@ -13356,6 +15278,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 proposal."] @@ -13374,6 +15297,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 ended a spend period and will now allocate funds."] @@ -13391,6 +15315,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 funds have been allocated."] @@ -13410,6 +15335,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 proposal was rejected; funds were slashed."] @@ -13429,6 +15355,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 of our funds have been burnt."] @@ -13447,6 +15374,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 = "Spending has finished; this is the amount that rolls over until next spend."] @@ -13465,6 +15393,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 funds have been deposited."] @@ -13482,6 +15411,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 spend proposal has been approved."] @@ -13494,6 +15424,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; @@ -13572,12 +15521,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, @@ -13709,7 +15679,7 @@ pub mod api { } } } - pub mod claims { + pub mod conviction_voting { use super::root_mod; use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] @@ -13724,12 +15694,15 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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, + 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, @@ -13738,34 +15711,28 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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, - >, + 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 ClaimAttest { - pub dest: ::subxt::utils::AccountId32, - pub ethereum_signature: - runtime_types::polkadot_runtime_common::claims::EcdsaSignature, - pub statement: ::std::vec::Vec<::core::primitive::u8>, + pub struct Undelegate { + pub class: ::core::primitive::u16, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -13774,10 +15741,12 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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>, + pub struct Unlock { + pub class: ::core::primitive::u16, + pub target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -13786,208 +15755,244 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 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", + 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", + 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", + 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", + 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", + 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", + 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( @@ -13997,243 +16002,152 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 = "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, + #[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"; } - impl ::subxt::events::StaticEvent for Claimed { - const PALLET: &'static str = "Claims"; - const EVENT: &'static str = "Claimed"; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + 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 { - pub fn claims( + #[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, - ( - ::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::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, - ( + 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::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, - ], - ) - } - #[doc = " The statement kind that must be signed, if any."] - pub fn signing( - &self, - _0: impl ::std::borrow::Borrow< - runtime_types::polkadot_runtime_common::claims::EthereumAddress, - >, - ) -> ::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(), - )], - [ - 51u8, 184u8, 211u8, 207u8, 13u8, 194u8, 181u8, 153u8, 25u8, 212u8, - 106u8, 189u8, 149u8, 14u8, 19u8, 61u8, 210u8, 109u8, 23u8, 168u8, - 191u8, 74u8, 112u8, 190u8, 242u8, 112u8, 183u8, 17u8, 30u8, 125u8, - 85u8, 107u8, - ], - ) - } - #[doc = " The statement kind that must be signed, if any."] - pub fn signing_root( - &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(), - [ - 51u8, 184u8, 211u8, 207u8, 13u8, 194u8, 181u8, 153u8, 25u8, 212u8, - 106u8, 189u8, 149u8, 14u8, 19u8, 61u8, 210u8, 109u8, 23u8, 168u8, - 191u8, 74u8, 112u8, 190u8, 242u8, 112u8, 183u8, 17u8, 30u8, 125u8, - 85u8, 107u8, - ], - ) - } - #[doc = " Pre-claimed Ethereum accounts, by the Account ID that they are claimed to."] - pub fn preclaims( - &self, - _0: 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(), - )], - [ - 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( - "Claims", - "Preclaims", - Vec::new(), - [ - 149u8, 61u8, 170u8, 170u8, 60u8, 212u8, 29u8, 214u8, 141u8, 136u8, - 207u8, 248u8, 51u8, 135u8, 242u8, 105u8, 121u8, 91u8, 186u8, 30u8, 0u8, - 173u8, 154u8, 133u8, 20u8, 244u8, 58u8, 184u8, 133u8, 214u8, 67u8, - 95u8, + 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, ], ) } @@ -14243,24 +16157,44 @@ pub mod api { use super::runtime_types; pub struct ConstantsApi; impl ConstantsApi { - pub fn prefix( + #[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, - ) -> ::subxt::constants::Address<::std::vec::Vec<::core::primitive::u8>> - { + ) -> ::subxt::constants::Address<::core::primitive::u32> { ::subxt::constants::Address::new_static( - "Claims", - "Prefix", + "ConvictionVoting", + "VoteLockingPeriod", [ - 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, 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 vesting { + pub mod referenda { use super::root_mod; use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] @@ -14275,414 +16209,349 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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; + pub struct Submit { + pub proposal_origin: + ::std::boxed::Box, + pub proposal: runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::polkadot_runtime::RuntimeCall, + >, + 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 VestOther { - pub target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + 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 VestedTransfer { - pub target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - pub schedule: runtime_types::pallet_vesting::vesting_info::VestingInfo< - ::core::primitive::u128, - ::core::primitive::u32, - >, + 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 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, - >, + 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 MergeSchedules { - pub schedule1_index: ::core::primitive::u32, - pub schedule2_index: ::core::primitive::u32, + 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 = "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 = "Propose a referendum on a privileged action."] #[doc = ""] - #[doc = "Emits either `VestingCompleted` or `VestingUpdated`."] + #[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 = "# "] - #[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 { + #[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( - "Vesting", - "vest", - Vest {}, + "Referenda", + "submit", + Submit { + proposal_origin: ::std::boxed::Box::new(proposal_origin), + proposal, + enactment_moment, + }, [ - 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, + 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 = "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 = "Post the Decision Deposit for a referendum."] #[doc = ""] - #[doc = "Emits either `VestingCompleted` or `VestingUpdated`."] + #[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 = "# "] - #[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( + #[doc = "Emits `DecisionDepositPlaced`."] + pub fn place_decision_deposit( &self, - target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - ) -> ::subxt::tx::Payload { + index: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Vesting", - "vest_other", - VestOther { target }, + "Referenda", + "place_decision_deposit", + PlaceDecisionDeposit { index }, [ - 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, + 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 = "Create a vested transfer."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = "Refund the Decision Deposit for a closed referendum back to the depositor."] #[doc = ""] - #[doc = "- `target`: The account receiving the vested funds."] - #[doc = "- `schedule`: The vesting schedule attached to the transfer."] - #[doc = ""] - #[doc = "Emits `VestingCreated`."] + #[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 = "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( + #[doc = "Emits `DecisionDepositRefunded`."] + pub fn refund_decision_deposit( &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 { + index: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Vesting", - "vested_transfer", - VestedTransfer { target, schedule }, + "Referenda", + "refund_decision_deposit", + RefundDecisionDeposit { index }, [ - 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, + 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 = "Force a vested transfer."] + #[doc = "Cancel an ongoing referendum."] #[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 = "- `origin`: must be the `CancelOrigin`."] + #[doc = "- `index`: The index of the referendum to be cancelled."] #[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( + #[doc = "Emits `Cancelled`."] + pub fn cancel( &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 { + index: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Vesting", - "force_vested_transfer", - ForceVestedTransfer { - source, - target, - schedule, - }, + "Referenda", + "cancel", + Cancel { index }, [ - 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, + 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, ], ) } - #[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 = "Cancel an ongoing referendum and slash the deposits."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = "- `origin`: must be the `KillOrigin`."] + #[doc = "- `index`: The index of the referendum to be cancelled."] #[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 { + #[doc = "Emits `Killed` and `DepositSlashed`."] + pub fn kill(&self, 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, - ], - ) - } - } - } - #[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 :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[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, - } - impl ::subxt::events::StaticEvent for VestingUpdated { - const PALLET: &'static str = "Vesting"; - const EVENT: &'static str = "VestingUpdated"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[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(), - )], + "Referenda", + "kill", + Kill { index }, [ - 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, + 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 = " Information regarding the vesting of a given account."] - pub fn vesting_root( + #[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, - ) -> ::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(), + index: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Referenda", + "nudge_referendum", + NudgeReferendum { index }, [ - 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, + 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 = " Storage version of the pallet."] + #[doc = "Advance a track onto its next logical state. Only used internally."] #[doc = ""] - #[doc = " New networks start with latest version, as determined by the genesis build."] - pub fn storage_version( + #[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, - ) -> ::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![], + track: ::core::primitive::u16, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Referenda", + "one_fewer_deciding", + OneFewerDeciding { track }, [ - 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, + 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, ], ) } - } - } - 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( + #[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, - ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::Address::new_static( - "Vesting", - "MinVestedTransfer", + index: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Referenda", + "refund_submission_deposit", + RefundSubmissionDeposit { index }, [ - 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, + 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, ], ) } - pub fn max_vesting_schedules( + #[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, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "Vesting", - "MaxVestingSchedules", + index: ::core::primitive::u32, + maybe_hash: ::core::option::Option<::subxt::utils::H256>, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Referenda", + "set_metadata", + SetMetadata { index, maybe_hash }, [ - 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, + 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 utility { - 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; + #[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, @@ -14690,10 +16559,20 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 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, @@ -14702,36 +16581,18 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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, - )] - #[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 = "The decision deposit has been placed."] + pub struct DecisionDepositPlaced { + pub index: ::core::primitive::u32, + pub who: ::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, - )] - #[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 DecisionDepositPlaced { + const PALLET: &'static str = "Referenda"; + const EVENT: &'static str = "DecisionDepositPlaced"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -14740,177 +16601,19 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 = "The decision deposit has been refunded."] + pub struct DecisionDepositRefunded { + pub index: ::core::primitive::u32, + pub who: ::subxt::utils::AccountId32, + pub amount: ::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 DecisionDepositRefunded { + const PALLET: &'static str = "Referenda"; + const EVENT: &'static str = "DecisionDepositRefunded"; } - } - #[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, @@ -14918,17 +16621,17 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 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, + #[doc = "A deposit has been slashaed."] + pub struct DepositSlashed { + pub who: ::subxt::utils::AccountId32, + pub amount: ::core::primitive::u128, } - impl ::subxt::events::StaticEvent for BatchInterrupted { - const PALLET: &'static str = "Utility"; - const EVENT: &'static str = "BatchInterrupted"; + impl ::subxt::events::StaticEvent for DepositSlashed { + const PALLET: &'static str = "Referenda"; + const EVENT: &'static str = "DepositSlashed"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -14937,60 +16640,58 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 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 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>, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[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 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, :: subxt :: ext :: scale_encode :: EncodeAsType, 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 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"; + pub struct ConfirmStarted { + pub index: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for ConfirmStarted { + const PALLET: &'static str = "Referenda"; + const EVENT: &'static str = "ConfirmStarted"; } #[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 single item within a Batch of dispatches has completed with error."] - pub struct ItemFailed { - pub error: runtime_types::sp_runtime::DispatchError, + pub struct ConfirmAborted { + pub index: ::core::primitive::u32, } - impl ::subxt::events::StaticEvent for ItemFailed { - const PALLET: &'static str = "Utility"; - const EVENT: &'static str = "ItemFailed"; + impl ::subxt::events::StaticEvent for ConfirmAborted { + const PALLET: &'static str = "Referenda"; + const EVENT: &'static str = "ConfirmAborted"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -14999,70 +16700,37 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 call was dispatched."] - pub struct DispatchedAs { - pub result: ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - } - impl ::subxt::events::StaticEvent for DispatchedAs { - const PALLET: &'static str = "Utility"; - const EVENT: &'static str = "DispatchedAs"; + #[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 limit on the number of batched calls."] - pub fn batched_calls_limit( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "Utility", - "batched_calls_limit", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, - ], - ) - } + impl ::subxt::events::StaticEvent for Confirmed { + const PALLET: &'static str = "Referenda"; + const EVENT: &'static str = "Confirmed"; } - } - } - pub mod identity { - use super::root_mod; - use super::runtime_types; - #[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 :: 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 AddRegistrar { - pub account: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + #[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, - )] - #[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, + impl ::subxt::events::StaticEvent for Approved { + const PALLET: &'static str = "Referenda"; + const EVENT: &'static str = "Approved"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -15071,51 +16739,38 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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, - )>, + #[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, - )] - #[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, - )] - #[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, + impl ::subxt::events::StaticEvent for Rejected { + const PALLET: &'static str = "Referenda"; + const EVENT: &'static str = "Rejected"; } #[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, + #[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>, + } + impl ::subxt::events::StaticEvent for TimedOut { + const PALLET: &'static str = "Referenda"; + const EVENT: &'static str = "TimedOut"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -15124,13 +16779,18 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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)] + #[doc = "A referendum has been cancelled."] + pub struct Cancelled { pub index: ::core::primitive::u32, - #[codec(compact)] - pub fee: ::core::primitive::u128, + pub tally: + runtime_types::pallet_conviction_voting::types::Tally<::core::primitive::u128>, + } + impl ::subxt::events::StaticEvent for Cancelled { + const PALLET: &'static str = "Referenda"; + const EVENT: &'static str = "Cancelled"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -15139,12 +16799,18 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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)] + #[doc = "A referendum has been killed."] + pub struct Killed { pub index: ::core::primitive::u32, - pub new: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub tally: + runtime_types::pallet_conviction_voting::types::Tally<::core::primitive::u128>, + } + impl ::subxt::events::StaticEvent for Killed { + const PALLET: &'static str = "Referenda"; + const EVENT: &'static str = "Killed"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -15153,31 +16819,18 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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)] + #[doc = "The submission deposit has been refunded."] + pub struct SubmissionDepositRefunded { pub index: ::core::primitive::u32, - pub fields: runtime_types::pallet_identity::types::BitFlags< - runtime_types::pallet_identity::types::IdentityField, - >, + pub who: ::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, - )] - #[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, + impl ::subxt::events::StaticEvent for SubmissionDepositRefunded { + const PALLET: &'static str = "Referenda"; + const EVENT: &'static str = "SubmissionDepositRefunded"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -15186,23 +16839,17 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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, ()>, + #[doc = "Metadata for a referendum has been set."] + pub struct MetadataSet { + pub index: ::core::primitive::u32, + 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, - )] - #[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, + impl ::subxt::events::StaticEvent for MetadataSet { + const PALLET: &'static str = "Referenda"; + const EVENT: &'static str = "MetadataSet"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -15211,507 +16858,378 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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, + #[doc = "Metadata for a referendum has been cleared."] + pub struct MetadataCleared { + pub index: ::core::primitive::u32, + 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, - )] - #[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 MetadataCleared { + const PALLET: &'static str = "Referenda"; + 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, - )] - #[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 { + #[doc = " The next free referendum index, aka the number of referenda started so far."] + pub fn referendum_count( &self, - account: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Identity", - "add_registrar", - AddRegistrar { account }, + ) -> ::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![], [ - 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, + 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 = "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( + #[doc = " Information concerning any given referendum."] + pub fn referendum_info_for( &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), - }, + _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(), + )], [ - 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, + 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 = "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( + #[doc = " Information concerning any given referendum."] + pub fn referendum_info_for_root( &self, - subs: ::std::vec::Vec<( + ) -> ::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, - runtime_types::pallet_identity::types::Data, - )>, - ) -> ::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, - ], - ) - } - #[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 {}, + (::core::primitive::u32, ::core::primitive::u32), + >, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Referenda", + "ReferendumInfoFor", + Vec::new(), [ - 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, + 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 = "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 = " The sorted list of referenda ready to be decided but not yet being decided, ordered by"] + #[doc = " conviction-weighted approvals."] #[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( + #[doc = " This should be empty if `DecidingCount` is less than `TrackInfo::max_deciding`."] + pub fn track_queue( &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 }, + _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(), + )], [ - 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, + 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 = "Cancel a previous request."] - #[doc = ""] - #[doc = "Payment: A previously reserved deposit is returned on success."] + #[doc = " The sorted list of referenda ready to be decided but not yet being decided, ordered by"] + #[doc = " conviction-weighted approvals."] #[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( + #[doc = " This should be empty if `DecidingCount` is less than `TrackInfo::max_deciding`."] + pub fn track_queue_root( &self, - reg_index: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Identity", - "cancel_request", - CancelRequest { reg_index }, + ) -> ::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(), [ - 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, + 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 = "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."] - #[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( + #[doc = " The number of referenda being decided currently."] + pub fn deciding_count( &self, - index: ::core::primitive::u32, - fee: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Identity", - "set_fee", - SetFee { index, fee }, + _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(), + )], [ - 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, + 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 = "Change the account associated with 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 = "- `new`: the new account ID."] - #[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( + #[doc = " The number of referenda being decided currently."] + pub fn deciding_count_root( &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 }, + ) -> ::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(), [ - 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, + 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 = "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 = " 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 = "# "] - #[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 = " Consider a garbage collection for a metadata of finished referendums to `unrequest` (remove)"] + #[doc = " large preimages."] + pub fn metadata_of( &self, - index: ::core::primitive::u32, - fields: runtime_types::pallet_identity::types::BitFlags< - runtime_types::pallet_identity::types::IdentityField, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Identity", - "set_fields", - SetFields { index, fields }, + _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(), + )], [ - 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, + 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 = "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 = " 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 = "Emits `JudgementGiven` if successful."] - #[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 = " Consider a garbage collection for a metadata of finished referendums to `unrequest` (remove)"] + #[doc = " large preimages."] + pub fn metadata_of_root( &self, - reg_index: ::core::primitive::u32, - target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - judgement: runtime_types::pallet_identity::types::Judgement< - ::core::primitive::u128, - >, - identity: ::subxt::utils::H256, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Identity", - "provide_judgement", - ProvideJudgement { - reg_index, - target, - judgement, - identity, - }, + ) -> ::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(), [ - 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, + 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 = "Remove an account's identity and sub-account information and slash the deposits."] - #[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 = ""] - #[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 = "# "] - #[doc = "- `O(R + S + X)`."] - #[doc = "- One balance-reserve operation."] - #[doc = "- `S + 2` storage mutations."] - #[doc = "- One event."] - #[doc = "# "] - pub fn kill_identity( + } + } + 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, - target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Identity", - "kill_identity", - KillIdentity { target }, + ) -> ::subxt::constants::Address<::core::primitive::u128> { + ::subxt::constants::Address::new_static( + "Referenda", + "SubmissionDeposit", [ - 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, + 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 = "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, - 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", - AddSub { sub, data }, + #[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", [ - 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, + 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 = "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( + #[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, - 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 }, + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "Referenda", + "UndecidingTimeout", [ - 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, + 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 = "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( + #[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, - sub: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Identity", - "remove_sub", - RemoveSub { sub }, + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "Referenda", + "AlarmInterval", [ - 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, + 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 = "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 { - ::subxt::tx::Payload::new_static( - "Identity", - "quit_sub", - QuitSub {}, + #[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", [ - 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, + 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, ], ) } } } - #[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 { + } + pub mod whitelist { + 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 :: Decode, :: subxt :: ext :: codec :: Encode, @@ -15719,33 +17237,11 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 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, - )] - #[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 { - 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"; + pub struct WhitelistCall { + pub call_hash: ::subxt::utils::H256, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -15754,16 +17250,11 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"; + pub struct RemoveWhitelistedCall { + pub call_hash: ::subxt::utils::H256, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -15772,16 +17263,13 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"; + 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, @@ -15790,17 +17278,90 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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, + pub struct DispatchWhitelistedCallWithPreimage { + pub call: ::std::boxed::Box, } - impl ::subxt::events::StaticEvent for JudgementUnrequested { - const PALLET: &'static str = "Identity"; - const EVENT: &'static str = "JudgementUnrequested"; + 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", + 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", + 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", + 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", + 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, @@ -15808,34 +17369,32 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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, + pub struct CallWhitelisted { + pub call_hash: ::subxt::utils::H256, } - impl ::subxt::events::StaticEvent for JudgementGiven { - const PALLET: &'static str = "Identity"; - const EVENT: &'static str = "JudgementGiven"; + impl ::subxt::events::StaticEvent for CallWhitelisted { + const PALLET: &'static str = "Whitelist"; + const EVENT: &'static str = "CallWhitelisted"; } #[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, + pub struct WhitelistedCallRemoved { + pub call_hash: ::subxt::utils::H256, } - impl ::subxt::events::StaticEvent for RegistrarAdded { - const PALLET: &'static str = "Identity"; - const EVENT: &'static str = "RegistrarAdded"; + impl ::subxt::events::StaticEvent for WhitelistedCallRemoved { + const PALLET: &'static str = "Whitelist"; + const EVENT: &'static str = "WhitelistedCallRemoved"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -15844,363 +17403,74 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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, + 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, + >, + >, } - 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, - )] - #[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, - )] - #[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 WhitelistedCallDispatched { + const PALLET: &'static str = "Whitelist"; + const EVENT: &'static str = "WhitelistedCallDispatched"; } } pub mod storage { use super::runtime_types; pub struct StorageApi; impl StorageApi { - #[doc = " Information that is pertinent to identify the entity behind an account."] - #[doc = ""] - #[doc = " TWOX-NOTE: OK ― `AccountId` is a secure hash."] - pub fn identity_of( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_identity::types::Registration<::core::primitive::u128>, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Identity", - "IdentityOf", - 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, - ], - ) - } - #[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 whitelisted_call( &self, + _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_identity::types::Registration<::core::primitive::u128>, (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Identity", - "IdentityOf", - Vec::new(), - [ - 193u8, 195u8, 180u8, 188u8, 129u8, 250u8, 180u8, 219u8, 22u8, 95u8, - 175u8, 170u8, 143u8, 188u8, 80u8, 124u8, 234u8, 228u8, 245u8, 39u8, - 72u8, 153u8, 107u8, 199u8, 23u8, 75u8, 47u8, 247u8, 104u8, 208u8, - 171u8, 82u8, - ], - ) - } - #[doc = " The super-identity of an alternative \"sub\" identity together with its name, within that"] - #[doc = " context. If the account is not some other account's sub-identity, then just `None`."] - pub fn super_of( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ( - ::subxt::utils::AccountId32, - runtime_types::pallet_identity::types::Data, - ), ::subxt::storage::address::Yes, (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( - "Identity", - "SuperOf", + "Whitelist", + "WhitelistedCall", 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, + 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 = " 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( + pub fn whitelisted_call_root( &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - ( - ::subxt::utils::AccountId32, - runtime_types::pallet_identity::types::Data, - ), (), (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Identity", - "SuperOf", - Vec::new(), - [ - 170u8, 249u8, 112u8, 249u8, 75u8, 176u8, 21u8, 29u8, 152u8, 149u8, - 69u8, 113u8, 20u8, 92u8, 113u8, 130u8, 135u8, 62u8, 18u8, 204u8, 166u8, - 193u8, 133u8, 167u8, 248u8, 117u8, 80u8, 137u8, 158u8, 111u8, 100u8, - 137u8, - ], - ) - } - #[doc = " Alternative \"sub\" identities of this account."] - #[doc = ""] - #[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<::subxt::utils::AccountId32>, - ) -> ::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, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Identity", - "SubsOf", - 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, - ], - ) - } - #[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, - ( - ::core::primitive::u128, - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::subxt::utils::AccountId32, - >, - ), (), ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( - "Identity", - "SubsOf", + "Whitelist", + "WhitelistedCall", Vec::new(), [ - 128u8, 15u8, 175u8, 155u8, 216u8, 225u8, 200u8, 169u8, 215u8, 206u8, - 110u8, 22u8, 204u8, 89u8, 212u8, 210u8, 159u8, 169u8, 53u8, 7u8, 44u8, - 164u8, 91u8, 151u8, 7u8, 227u8, 38u8, 230u8, 175u8, 84u8, 6u8, 4u8, - ], - ) - } - #[doc = " The set of registrars. Not expected to get very big as can only be added through a"] - #[doc = " special origin (likely a council motion)."] - #[doc = ""] - #[doc = " The index into this can be cast to `RegistrarIndex` to get a valid value."] - pub fn registrars( - &self, - ) -> ::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, - >, - >, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Identity", - "Registrars", - vec![], - [ - 157u8, 87u8, 39u8, 240u8, 154u8, 54u8, 241u8, 229u8, 76u8, 9u8, 62u8, - 252u8, 40u8, 143u8, 186u8, 182u8, 233u8, 187u8, 251u8, 61u8, 236u8, - 229u8, 19u8, 55u8, 42u8, 36u8, 82u8, 173u8, 215u8, 155u8, 229u8, 111u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - 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( - &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, + 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, ], ) } } } } - pub mod proxy { + pub mod claims { use super::root_mod; use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] @@ -16215,83 +17485,13 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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, - )] - #[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, - )] - #[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, - )] - #[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, - )] - #[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, - )] - #[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, + pub struct Claim { + pub dest: ::subxt::utils::AccountId32, + pub ethereum_signature: + runtime_types::polkadot_runtime_common::claims::EcdsaSignature, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -16300,11 +17500,20 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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, + 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, @@ -16313,11 +17522,14 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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, + 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, @@ -16326,11 +17538,11 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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, + pub struct Attest { + pub statement: ::std::vec::Vec<::core::primitive::u8>, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -16339,340 +17551,209 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 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 struct TransactionApi; impl TransactionApi { - #[doc = "Dispatch the given `call` from an account that the sender is authorised for through"] - #[doc = "`add_proxy`."] + #[doc = "Make a claim to collect your DOTs."] #[doc = ""] - #[doc = "Removes any corresponding announcement(s)."] + #[doc = "The dispatch origin for this call must be _None_."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = "Unsigned Validation:"] + #[doc = "A call to claim is deemed valid if the signature provided matches"] + #[doc = "the expected signed message of:"] #[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 { - ::subxt::tx::Payload::new_static( - "Proxy", - "proxy", - Proxy { - real, - force_proxy_type, - call: ::std::boxed::Box::new(call), - }, - [ - 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, - ], - ) - } - #[doc = "Register a proxy account for the sender that is able to make calls on its behalf."] + #[doc = "> Ethereum Signed Message:"] + #[doc = "> (configured prefix string)(address)"] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = "and `address` matches the `dest` account."] #[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( + #[doc = "- `dest`: The destination account to payout the claim."] + #[doc = "- `ethereum_signature`: The signature of an ethereum signed message"] + #[doc = " matching the format described above."] + #[doc = ""] + #[doc = ""] + #[doc = "The weight of this call is invariant over the input parameters."] + #[doc = "Weight includes logic to validate unsigned `claim` call."] + #[doc = ""] + #[doc = "Total Complexity: O(1)"] + #[doc = ""] + pub fn claim( &self, - delegate: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - proxy_type: runtime_types::polkadot_runtime::ProxyType, - delay: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + dest: ::subxt::utils::AccountId32, + ethereum_signature : runtime_types :: polkadot_runtime_common :: claims :: EcdsaSignature, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Proxy", - "add_proxy", - AddProxy { - delegate, - proxy_type, - delay, + "Claims", + "claim", + Claim { + dest, + ethereum_signature, }, [ - 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, + 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 = "Unregister a proxy account for the sender."] + #[doc = "Mint a new claim to collect DOTs."] #[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 = "- `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 = "- `who`: The Ethereum address allowed to collect this claim."] + #[doc = "- `value`: The number of DOTs that will be claimed."] + #[doc = "- `vesting_schedule`: An optional vesting schedule for these DOTs."] + #[doc = ""] + #[doc = ""] + #[doc = "The weight of this call is invariant over the input parameters."] + #[doc = "We assume worst case that both vesting and statement is being inserted."] + #[doc = ""] + #[doc = "Total Complexity: O(1)"] + #[doc = ""] + pub fn mint_claim( &self, - delegate: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - proxy_type: runtime_types::polkadot_runtime::ProxyType, - delay: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + 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 { ::subxt::tx::Payload::new_static( - "Proxy", - "remove_proxy", - RemoveProxy { - delegate, - proxy_type, - delay, + "Claims", + "mint_claim", + MintClaim { + who, + value, + vesting_schedule, + statement, }, [ - 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, - ], - ) - } - #[doc = "Unregister all proxy accounts for the sender."] - #[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, + 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 = "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 = "Make a claim to collect your DOTs by signing a statement."] #[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 = "The dispatch origin for this call must be _None_."] #[doc = ""] - #[doc = "Fails with `Duplicate` if this has already been called in this transaction, from the"] - #[doc = "same sender, with the same parameters."] + #[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 = "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 = "> Ethereum Signed Message:"] + #[doc = "> (configured prefix string)(address)(statement)"] #[doc = ""] - #[doc = "WARNING: **All access to this account will be lost.** Any funds held in it will be"] - #[doc = "inaccessible."] + #[doc = "and `address` matches the `dest` account; the `statement` must match that which is"] + #[doc = "expected according to your purchase arrangement."] #[doc = ""] - #[doc = "Requires a `Signed` origin, and the sender account must have been created by a call to"] - #[doc = "`pure` with corresponding parameters."] + #[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 = "- `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 = "The weight of this call is invariant over the input parameters."] + #[doc = "Weight includes logic to validate unsigned `claim_attest` call."] #[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( + #[doc = "Total Complexity: O(1)"] + #[doc = ""] + pub fn claim_attest( &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 { + 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( - "Proxy", - "kill_pure", - KillPure { - spawner, - proxy_type, - index, - height, - ext_index, + "Claims", + "claim_attest", + ClaimAttest { + dest, + ethereum_signature, + statement, }, [ - 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 = ""] - #[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", - 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, + 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 = "Remove a given announcement."] + #[doc = "Attest to a statement, needed to finalize the claims process."] #[doc = ""] - #[doc = "May be called by a proxy account to remove a call they previously announced and return"] - #[doc = "the deposit."] + #[doc = "WARNING: Insecure unless your chain includes `PrevalidateAttests` as a `SignedExtension`."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = "Unsigned Validation:"] + #[doc = "A call to attest is deemed valid if the sender has a `Preclaim` registered"] + #[doc = "and provides a `statement` which is expected for the account."] #[doc = ""] #[doc = "Parameters:"] - #[doc = "- `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 = ""] - #[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 = "- `statement`: The identity of the statement which is being attested to in the signature."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] + #[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 = "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 = "Total Complexity: O(1)"] + #[doc = ""] + pub fn attest( &self, - delegate: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - call_hash: ::subxt::utils::H256, - ) -> ::subxt::tx::Payload { + statement: ::std::vec::Vec<::core::primitive::u8>, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Proxy", - "reject_announcement", - RejectAnnouncement { - delegate, - call_hash, - }, + "Claims", + "attest", + Attest { statement }, [ - 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, + 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 = "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( + pub fn move_claim( &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 { + 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( - "Proxy", - "proxy_announced", - ProxyAnnounced { - delegate, - real, - force_proxy_type, - call: ::std::boxed::Box::new(call), + "Claims", + "move_claim", + MoveClaim { + old, + new, + maybe_preclaim, }, [ - 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, + 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_proxy::pallet::Event; + pub type Event = runtime_types::polkadot_runtime_common::claims::pallet::Event; pub mod events { use super::runtime_types; #[derive( @@ -16682,336 +17763,271 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 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, - )] - #[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, + #[doc = "Someone claimed some DOTs."] + pub struct Claimed { pub who: ::subxt::utils::AccountId32, - pub proxy_type: runtime_types::polkadot_runtime::ProxyType, - pub disambiguation_index: ::core::primitive::u16, - } - impl ::subxt::events::StaticEvent for PureCreated { - const PALLET: &'static str = "Proxy"; - const EVENT: &'static str = "PureCreated"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[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, - } - 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, - )] - #[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, - )] - #[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, + pub ethereum_address: + runtime_types::polkadot_runtime_common::claims::EthereumAddress, + pub amount: ::core::primitive::u128, } - impl ::subxt::events::StaticEvent for ProxyRemoved { - const PALLET: &'static str = "Proxy"; - const EVENT: &'static str = "ProxyRemoved"; + 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 = " 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( + 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::sp_core::bounded::bounded_vec::BoundedVec< - runtime_types::pallet_proxy::ProxyDefinition< - ::subxt::utils::AccountId32, - runtime_types::polkadot_runtime::ProxyType, - ::core::primitive::u32, - >, - >, - ::core::primitive::u128, - ), - ::subxt::storage::address::Yes, + ::core::primitive::u128, ::subxt::storage::address::Yes, + (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( - "Proxy", - "Proxies", + "Claims", + "Claims", 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, + 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 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( + pub fn claims_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, - >, - >, - ::core::primitive::u128, - ), + ::core::primitive::u128, + (), (), - ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( - "Proxy", - "Proxies", + "Claims", + "Claims", 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, + 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 announcements made by the proxy (key)."] - pub fn announcements( + 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, ( - 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, + ::core::primitive::u128, + ::core::primitive::u32, ), ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, + (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( - "Proxy", - "Announcements", + "Claims", + "Vesting", 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, + 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 announcements made by the proxy (key)."] - pub fn announcements_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, ( - 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, + ::core::primitive::u128, + ::core::primitive::u32, ), (), - ::subxt::storage::address::Yes, + (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( - "Proxy", - "Announcements", + "Claims", + "Vesting", Vec::new(), [ - 233u8, 38u8, 249u8, 89u8, 103u8, 87u8, 64u8, 52u8, 140u8, 228u8, 110u8, - 37u8, 8u8, 92u8, 48u8, 7u8, 46u8, 99u8, 179u8, 83u8, 232u8, 171u8, - 160u8, 45u8, 37u8, 23u8, 151u8, 198u8, 237u8, 103u8, 217u8, 53u8, + 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, ], ) } - } - } - pub mod constants { - 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 statement kind that must be signed, if any."] + pub fn signing( &self, - ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::Address::new_static( - "Proxy", - "ProxyDepositBase", + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_runtime_common::claims::EthereumAddress, + >, + ) -> ::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(), + )], [ - 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, + 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 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( + #[doc = " The statement kind that must be signed, if any."] + pub fn signing_root( &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::new_static( - "Proxy", - "MaxProxies", + ) -> ::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(), [ - 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, + 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 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", + #[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::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(), + )], [ - 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, + 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 = " 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( + #[doc = " Pre-claimed Ethereum accounts, by the Account ID that they are claimed to."] + pub fn preclaims_root( &self, - ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::Address::new_static( - "Proxy", - "AnnouncementDepositBase", + ) -> ::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(), [ - 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, + 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 = " 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( + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + pub fn prefix( &self, - ) -> ::subxt::constants::Address<::core::primitive::u128> { + ) -> ::subxt::constants::Address<::std::vec::Vec<::core::primitive::u8>> + { ::subxt::constants::Address::new_static( - "Proxy", - "AnnouncementDepositFactor", + "Claims", + "Prefix", [ - 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, 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 multisig { + pub mod vesting { use super::root_mod; use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] @@ -17026,11 +18042,22 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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, + 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, @@ -17039,16 +18066,15 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 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, >, - pub call: ::std::boxed::Box, - pub max_weight: runtime_types::sp_weights::weight_v2::Weight, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -17057,16 +18083,16 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 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, >, - pub call_hash: [::core::primitive::u8; 32usize], - pub max_weight: runtime_types::sp_weights::weight_v2::Weight, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -17075,240 +18101,178 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 MergeSchedules { + pub schedule1_index: ::core::primitive::u32, + pub schedule2_index: ::core::primitive::u32, } pub struct TransactionApi; impl TransactionApi { - #[doc = "Immediately dispatch a multi-signature call using a single approval from the caller."] + #[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 = "## Complexity"] + #[doc = "- `O(1)`."] + 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 = "- `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 = "- `target`: The account whose vested funds should be unlocked. Must have funds still"] + #[doc = "locked under this pallet."] #[doc = ""] - #[doc = "Result is equivalent to the dispatched result."] + #[doc = "Emits either `VestingCompleted` or `VestingUpdated`."] #[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( + #[doc = "## Complexity"] + #[doc = "- `O(1)`."] + pub fn vest_other( &self, - other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, - call: runtime_types::polkadot_runtime::RuntimeCall, - ) -> ::subxt::tx::Payload { + target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Multisig", - "as_multi_threshold_1", - AsMultiThreshold1 { - other_signatories, - call: ::std::boxed::Box::new(call), - }, + "Vesting", + "vest_other", + VestOther { target }, [ - 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, + 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 = "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 = "Create a vested transfer."] #[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 = "- `target`: The account receiving the vested funds."] + #[doc = "- `schedule`: The vesting schedule attached to the transfer."] #[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 = "Emits `VestingCreated`."] #[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 = "NOTE: This will unlock all schedules through the current block."] #[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( + #[doc = "## Complexity"] + #[doc = "- `O(1)`."] + pub fn vested_transfer( &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>, + target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + schedule: runtime_types::pallet_vesting::vesting_info::VestingInfo< + ::core::primitive::u128, + ::core::primitive::u32, >, - call: runtime_types::polkadot_runtime::RuntimeCall, - max_weight: runtime_types::sp_weights::weight_v2::Weight, - ) -> ::subxt::tx::Payload { + ) -> ::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, - }, + "Vesting", + "vested_transfer", + VestedTransfer { target, schedule }, [ - 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, + 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 = "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 = "Force a vested transfer."] #[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 = "The dispatch origin for this call must be _Root_."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] + #[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 = "- `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 = "Emits `VestingCreated`."] #[doc = ""] - #[doc = "NOTE: If this is the final approval, you will want to use `as_multi` instead."] + #[doc = "NOTE: This will unlock all schedules through the current block."] #[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( + #[doc = "## Complexity"] + #[doc = "- `O(1)`."] + pub fn force_vested_transfer( &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>, + 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, >, - call_hash: [::core::primitive::u8; 32usize], - max_weight: runtime_types::sp_weights::weight_v2::Weight, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Multisig", - "approve_as_multi", - ApproveAsMulti { - threshold, - other_signatories, - maybe_timepoint, - call_hash, - max_weight, + "Vesting", + "force_vested_transfer", + ForceVestedTransfer { + source, + target, + schedule, }, [ - 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, + 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 = "Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously"] - #[doc = "for this operation will be unreserved on success."] + #[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 = "The dispatch origin for this call must be _Signed_."] + #[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 = "- `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 = "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 = "# "] - #[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( + #[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, - 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 { + schedule1_index: ::core::primitive::u32, + schedule2_index: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Multisig", - "cancel_as_multi", - CancelAsMulti { - threshold, - other_signatories, - timepoint, - call_hash, + "Vesting", + "merge_schedules", + MergeSchedules { + schedule1_index, + schedule2_index, }, [ - 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, + 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_multisig::pallet::Event; + pub type Event = runtime_types::pallet_vesting::pallet::Event; pub mod events { use super::runtime_types; #[derive( @@ -17318,17 +18282,18 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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], + #[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 NewMultisig { - const PALLET: &'static str = "Multisig"; - const EVENT: &'static str = "NewMultisig"; + impl ::subxt::events::StaticEvent for VestingUpdated { + const PALLET: &'static str = "Vesting"; + const EVENT: &'static str = "VestingUpdated"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -17337,117 +18302,97 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 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 MultisigApproval { - const PALLET: &'static str = "Multisig"; - const EVENT: &'static str = "MultisigApproval"; + #[doc = "An \\[account\\] has become fully vested."] + pub struct VestingCompleted { + pub account: ::subxt::utils::AccountId32, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[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], - 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, - )] - #[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"; + 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 open multisig operations."] - pub fn multisigs( + #[doc = " Information regarding the vesting of a given account."] + pub fn vesting( &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, + runtime_types::bounded_collections::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( - "Multisig", - "Multisigs", - vec![ - ::subxt::storage::address::make_static_storage_map_key(_0.borrow()), - ::subxt::storage::address::make_static_storage_map_key(_1.borrow()), - ], + "Vesting", + "Vesting", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.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, + 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 open multisig operations."] - pub fn multisigs_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::pallet_multisig::Multisig< - ::core::primitive::u32, - ::core::primitive::u128, - ::subxt::utils::AccountId32, + runtime_types::bounded_collections::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( - "Multisig", - "Multisigs", + "Vesting", + "Vesting", 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, + 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, ], ) } @@ -17457,32 +18402,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 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( + #[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( - "Multisig", - "DepositFactor", + "Vesting", + "MinVestedTransfer", [ 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, @@ -17490,13 +18416,12 @@ pub mod api { ], ) } - #[doc = " The maximum amount of signatories allowed in the multisig."] - pub fn max_signatories( + pub fn max_vesting_schedules( &self, ) -> ::subxt::constants::Address<::core::primitive::u32> { ::subxt::constants::Address::new_static( - "Multisig", - "MaxSignatories", + "Vesting", + "MaxVestingSchedules", [ 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, @@ -17508,7 +18433,7 @@ pub mod api { } } } - pub mod bounties { + pub mod utility { use super::root_mod; use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] @@ -17523,54 +18448,11 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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, - )] - #[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, - )] - #[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, - )] - #[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, + pub struct Batch { + pub calls: ::std::vec::Vec, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -17579,11 +18461,12 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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, + pub struct AsDerivative { + pub index: ::core::primitive::u16, + pub call: ::std::boxed::Box, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -17592,12 +18475,11 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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, ()>, + pub struct BatchAll { + pub calls: ::std::vec::Vec, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -17606,11 +18488,12 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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, + pub struct DispatchAs { + pub as_origin: ::std::boxed::Box, + pub call: ::std::boxed::Box, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -17619,11 +18502,11 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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, + pub struct ForceBatch { + pub calls: ::std::vec::Vec, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -17632,283 +18515,211 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 WithWeight { + pub call: ::std::boxed::Box, + pub weight: runtime_types::sp_weights::weight_v2::Weight, } pub struct TransactionApi; impl TransactionApi { - #[doc = "Propose a new bounty."] + #[doc = "Send a batch of dispatch calls."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = "May be called from any origin except `None`."] #[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 = "- `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 = "- `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, - ], - ) - } - #[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 = "If origin is root then the calls are dispatched without checking origin filter. (This"] + #[doc = "includes bypassing `frame_system::Config::BaseCallFilter`)."] #[doc = ""] - #[doc = "May only be called from `T::ApproveOrigin`."] + #[doc = "## Complexity"] + #[doc = "- O(C) where C is the number of calls to be batched."] #[doc = ""] - #[doc = "# "] - #[doc = "- O(1)."] - #[doc = "# "] - pub fn approve_bounty( + #[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, - bounty_id: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + calls: ::std::vec::Vec, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Bounties", - "approve_bounty", - ApproveBounty { bounty_id }, + "Utility", + "batch", + Batch { calls }, [ - 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, + 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 = "Assign a curator to a funded bounty."] + #[doc = "Send a call through an indexed pseudonym of the sender."] #[doc = ""] - #[doc = "May only be called from `T::ApproveOrigin`."] + #[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 = "# "] - #[doc = "- O(1)."] - #[doc = "# "] - pub fn propose_curator( + #[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, - bounty_id: ::core::primitive::u32, - curator: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - fee: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { + index: ::core::primitive::u16, + call: runtime_types::polkadot_runtime::RuntimeCall, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Bounties", - "propose_curator", - ProposeCurator { - bounty_id, - curator, - fee, + "Utility", + "as_derivative", + AsDerivative { + index, + call: ::std::boxed::Box::new(call), }, [ - 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, + 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 = "Unassign curator from a bounty."] - #[doc = ""] - #[doc = "This function can only be called by the `RejectOrigin` a signed origin."] - #[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 = ""] - #[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 = "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 = "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 = "May be called from any origin except `None`."] #[doc = ""] - #[doc = "# "] - #[doc = "- O(1)."] - #[doc = "# "] - pub fn unassign_curator( - &self, - bounty_id: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Bounties", - "unassign_curator", - UnassignCurator { bounty_id }, - [ - 218u8, 241u8, 247u8, 89u8, 95u8, 120u8, 93u8, 18u8, 85u8, 114u8, 158u8, - 254u8, 68u8, 77u8, 230u8, 186u8, 230u8, 201u8, 63u8, 223u8, 28u8, - 173u8, 244u8, 82u8, 113u8, 177u8, 99u8, 27u8, 207u8, 247u8, 207u8, - 213u8, - ], - ) - } - #[doc = "Accept the curator role for a bounty."] - #[doc = "A deposit will be reserved from curator and refund upon successful payout."] + #[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 = "May only be called from the curator."] + #[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 = "- O(1)."] - #[doc = "# "] - pub fn accept_curator( + #[doc = "## Complexity"] + #[doc = "- O(C) where C is the number of calls to be batched."] + pub fn batch_all( &self, - bounty_id: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + calls: ::std::vec::Vec, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Bounties", - "accept_curator", - AcceptCurator { bounty_id }, + "Utility", + "batch_all", + BatchAll { calls }, [ - 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, + 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 = "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 = "Dispatches a function call with a provided origin."] #[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 _Root_."] #[doc = ""] - #[doc = "# "] + #[doc = "## Complexity"] #[doc = "- O(1)."] - #[doc = "# "] - pub fn award_bounty( + pub fn dispatch_as( &self, - bounty_id: ::core::primitive::u32, - beneficiary: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - ) -> ::subxt::tx::Payload { + as_origin: runtime_types::polkadot_runtime::OriginCaller, + call: runtime_types::polkadot_runtime::RuntimeCall, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Bounties", - "award_bounty", - AwardBounty { - bounty_id, - beneficiary, + "Utility", + "dispatch_as", + DispatchAs { + as_origin: ::std::boxed::Box::new(as_origin), + call: ::std::boxed::Box::new(call), }, [ - 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, + 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 = "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 = "Send a batch of dispatch calls."] + #[doc = "Unlike `batch`, it allows errors and won't interrupt."] #[doc = ""] - #[doc = "# "] - #[doc = "- O(1)."] - #[doc = "# "] - pub fn claim_bounty( - &self, - bounty_id: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Bounties", - "claim_bounty", - ClaimBounty { bounty_id }, - [ - 102u8, 95u8, 8u8, 89u8, 4u8, 126u8, 189u8, 28u8, 241u8, 16u8, 125u8, - 218u8, 42u8, 92u8, 177u8, 91u8, 8u8, 235u8, 33u8, 48u8, 64u8, 115u8, - 177u8, 95u8, 242u8, 97u8, 181u8, 50u8, 68u8, 37u8, 59u8, 85u8, - ], - ) - } - #[doc = "Cancel a proposed or active bounty. All the funds will be sent to treasury and"] - #[doc = "the curator deposit will be unreserved if possible."] + #[doc = "May be called from any origin except `None`."] #[doc = ""] - #[doc = "Only `T::RejectOrigin` is able to cancel a bounty."] + #[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 = "- `bounty_id`: Bounty ID to cancel."] + #[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 = "- O(1)."] - #[doc = "# "] - pub fn close_bounty( + #[doc = "## Complexity"] + #[doc = "- O(C) where C is the number of calls to be batched."] + pub fn force_batch( &self, - bounty_id: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + calls: ::std::vec::Vec, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Bounties", - "close_bounty", - CloseBounty { bounty_id }, + "Utility", + "force_batch", + ForceBatch { calls }, [ - 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, + 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 = "Extend the expiry time of an active bounty."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be the curator of this bounty."] + #[doc = "Dispatch a function call with a specified weight."] #[doc = ""] - #[doc = "- `bounty_id`: Bounty ID to extend."] - #[doc = "- `remark`: additional information."] + #[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 = "# "] - #[doc = "- O(1)."] - #[doc = "# "] - pub fn extend_bounty_expiry( + #[doc = "The dispatch origin for this call must be _Root_."] + pub fn with_weight( &self, - bounty_id: ::core::primitive::u32, - remark: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::Payload { + call: runtime_types::polkadot_runtime::RuntimeCall, + weight: runtime_types::sp_weights::weight_v2::Weight, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Bounties", - "extend_bounty_expiry", - ExtendBountyExpiry { bounty_id, remark }, + "Utility", + "with_weight", + WithWeight { + call: ::std::boxed::Box::new(call), + weight, + }, [ - 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, + 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, ], ) } } } #[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 type Event = runtime_types::pallet_utility::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 { + #[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 BountyProposed { - const PALLET: &'static str = "Bounties"; - const EVENT: &'static str = "BountyProposed"; + impl ::subxt::events::StaticEvent for BatchInterrupted { + const PALLET: &'static str = "Utility"; + const EVENT: &'static str = "BatchInterrupted"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -17917,34 +18728,30 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"; + #[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 :: 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"; + #[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, @@ -17953,16 +18760,14 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"; + #[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, @@ -17971,340 +18776,47 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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, - )] - #[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, + #[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 BountyCanceled { - const PALLET: &'static str = "Bounties"; - const EVENT: &'static str = "BountyCanceled"; + impl ::subxt::events::StaticEvent for ItemFailed { + const PALLET: &'static str = "Utility"; + const EVENT: &'static str = "ItemFailed"; } #[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"; + #[doc = "A call was dispatched."] + pub struct DispatchedAs { + pub result: ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, } - } - 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( - &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, - >, - ::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(), - )], - [ - 111u8, 149u8, 33u8, 54u8, 172u8, 143u8, 41u8, 231u8, 184u8, 255u8, - 238u8, 206u8, 87u8, 142u8, 84u8, 10u8, 236u8, 141u8, 190u8, 193u8, - 72u8, 170u8, 19u8, 110u8, 135u8, 136u8, 220u8, 11u8, 99u8, 126u8, - 225u8, 208u8, - ], - ) - } - #[doc = " Bounties that have been made."] - pub fn bounties_root( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_bounties::Bounty< - ::subxt::utils::AccountId32, - ::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, - ], - ) - } + 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 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", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, - ], - ) - } - #[doc = " The curator deposit is calculated as a percentage of the curator fee."] - #[doc = ""] - #[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( - &self, - ) -> ::subxt::constants::Address<::core::option::Option<::core::primitive::u128>> - { - ::subxt::constants::Address::new_static( - "Bounties", - "CuratorDepositMax", - [ - 84u8, 154u8, 218u8, 83u8, 84u8, 189u8, 32u8, 20u8, 120u8, 194u8, 88u8, - 205u8, 109u8, 216u8, 114u8, 193u8, 120u8, 198u8, 154u8, 237u8, 134u8, - 204u8, 102u8, 247u8, 52u8, 103u8, 231u8, 43u8, 243u8, 122u8, 60u8, - 216u8, - ], - ) - } - #[doc = " Minimum amount of funds that should be placed in a deposit for making a proposal."] - pub fn curator_deposit_min( - &self, - ) -> ::subxt::constants::Address<::core::option::Option<::core::primitive::u128>> - { - ::subxt::constants::Address::new_static( - "Bounties", - "CuratorDepositMin", - [ - 84u8, 154u8, 218u8, 83u8, 84u8, 189u8, 32u8, 20u8, 120u8, 194u8, 88u8, - 205u8, 109u8, 216u8, 114u8, 193u8, 120u8, 198u8, 154u8, 237u8, 134u8, - 204u8, 102u8, 247u8, 52u8, 103u8, 231u8, 43u8, 243u8, 122u8, 60u8, - 216u8, - ], - ) - } - #[doc = " Minimum value for a bounty."] - pub fn bounty_value_minimum( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::Address::new_static( - "Bounties", - "BountyValueMinimum", - [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, - 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, - 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, - ], - ) - } - #[doc = " The amount held on deposit per byte within the tip report reason or bounty description."] - pub fn data_deposit_per_byte( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::Address::new_static( - "Bounties", - "DataDepositPerByte", - [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, - 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, - 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, - ], - ) - } - #[doc = " Maximum acceptable reason length."] - #[doc = ""] - #[doc = " Benchmarks depend on this value, be sure to update weights file when changing this value"] - pub fn maximum_reason_length( + #[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( - "Bounties", - "MaximumReasonLength", + "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, @@ -18316,10 +18828,10 @@ pub mod api { } } } - pub mod child_bounties { + pub mod identity { use super::root_mod; use super::runtime_types; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + #[doc = "Identity pallet declaration."] pub mod calls { use super::root_mod; use super::runtime_types; @@ -18331,30 +18843,95 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { + 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, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (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 parent_bounty_id: ::core::primitive::u32, + pub reg_index: ::core::primitive::u32, #[codec(compact)] - pub value: ::core::primitive::u128, - pub description: ::std::vec::Vec<::core::primitive::u8>, + 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 ProposeCurator { - #[codec(compact)] - pub parent_bounty_id: ::core::primitive::u32, + 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 child_bounty_id: ::core::primitive::u32, - pub curator: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub index: ::core::primitive::u32, #[codec(compact)] pub fee: ::core::primitive::u128, } @@ -18365,13 +18942,13 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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, + pub struct SetAccountId { #[codec(compact)] - pub child_bounty_id: ::core::primitive::u32, + pub index: ::core::primitive::u32, + pub new: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -18380,13 +18957,15 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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, + pub struct SetFields { #[codec(compact)] - pub child_bounty_id: ::core::primitive::u32, + pub index: ::core::primitive::u32, + pub fields: runtime_types::pallet_identity::types::BitFlags< + runtime_types::pallet_identity::types::IdentityField, + >, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -18395,14 +18974,16 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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, + pub struct ProvideJudgement { #[codec(compact)] - pub child_bounty_id: ::core::primitive::u32, - pub beneficiary: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + 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, @@ -18411,13 +18992,11 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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, + pub struct KillIdentity { + pub target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -18426,45 +19005,3273 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 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 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 = "Add a registrar to the system."] #[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 = "The dispatch origin for this call must be `T::RegistrarOrigin`."] #[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 = "- `account`: the account of the registrar."] #[doc = ""] - #[doc = "If the call is success, the status of child-bounty is updated to"] - #[doc = "\"Added\"."] + #[doc = "Emits `RegistrarAdded` if successful."] #[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( + #[doc = "## Complexity"] + #[doc = "- `O(R)` where `R` registrar-count (governance-bounded and code-bounded)."] + pub fn add_registrar( &self, - parent_bounty_id: ::core::primitive::u32, - value: ::core::primitive::u128, - description: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::Payload { + account: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "ChildBounties", - "add_child_bounty", - AddChildBounty { + "Identity", + "add_registrar", + 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 = "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 = "## 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, + 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), + }, + [ + 130u8, 89u8, 118u8, 6u8, 134u8, 166u8, 35u8, 192u8, 73u8, 6u8, 171u8, + 20u8, 225u8, 255u8, 152u8, 142u8, 111u8, 8u8, 206u8, 200u8, 64u8, 52u8, + 110u8, 123u8, 42u8, 101u8, 191u8, 242u8, 133u8, 139u8, 154u8, 205u8, + ], + ) + } + #[doc = "Set the sub-accounts of the sender."] + #[doc = ""] + #[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 = "## 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, + subs: ::std::vec::Vec<( + ::subxt::utils::AccountId32, + runtime_types::pallet_identity::types::Data, + )>, + ) -> ::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, + ], + ) + } + #[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 = "## 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", + 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, + 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, + ], + ) + } + #[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 = "## 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, + 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, + ], + ) + } + #[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."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(R)`."] + #[doc = " - where `R` registrar-count (governance-bounded)."] + 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 = ""] + #[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 = "- `new`: the new account ID."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(R)`."] + #[doc = " - where `R` registrar-count (governance-bounded)."] + 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 = ""] + #[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, + index: ::core::primitive::u32, + fields: runtime_types::pallet_identity::types::BitFlags< + runtime_types::pallet_identity::types::IdentityField, + >, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Identity", + "set_fields", + SetFields { index, fields }, + [ + 50u8, 196u8, 179u8, 71u8, 66u8, 65u8, 235u8, 7u8, 51u8, 14u8, 81u8, + 173u8, 201u8, 58u8, 6u8, 151u8, 174u8, 245u8, 102u8, 184u8, 28u8, 84u8, + 125u8, 93u8, 126u8, 134u8, 92u8, 203u8, 200u8, 129u8, 240u8, 252u8, + ], + ) + } + #[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, + reg_index: ::core::primitive::u32, + target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + judgement: runtime_types::pallet_identity::types::Judgement< + ::core::primitive::u128, + >, + identity: ::subxt::utils::H256, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Identity", + "provide_judgement", + ProvideJudgement { + reg_index, + target, + judgement, + identity, + }, + [ + 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 = "Remove an account's identity and sub-account information and slash the deposits."] + #[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 = ""] + #[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, + 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 = ""] + #[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, + 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", + AddSub { sub, data }, + [ + 122u8, 218u8, 25u8, 93u8, 33u8, 176u8, 191u8, 254u8, 223u8, 147u8, + 100u8, 135u8, 86u8, 71u8, 47u8, 163u8, 105u8, 222u8, 162u8, 173u8, + 207u8, 182u8, 130u8, 128u8, 214u8, 242u8, 101u8, 250u8, 242u8, 24u8, + 17u8, 84u8, + ], + ) + } + #[doc = "Alter the associated name of the given sub-account."] + #[doc = ""] + #[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 = ""] + #[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, + sub: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Identity", + "remove_sub", + RemoveSub { sub }, + [ + 106u8, 223u8, 210u8, 67u8, 54u8, 11u8, 144u8, 222u8, 42u8, 46u8, 157u8, + 33u8, 13u8, 245u8, 166u8, 195u8, 227u8, 81u8, 224u8, 149u8, 154u8, + 158u8, 187u8, 203u8, 215u8, 91u8, 43u8, 105u8, 69u8, 213u8, 141u8, + 124u8, + ], + ) + } + #[doc = "Remove the sender as a sub-account."] + #[doc = ""] + #[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", + QuitSub {}, + [ + 62u8, 57u8, 73u8, 72u8, 119u8, 216u8, 250u8, 155u8, 57u8, 169u8, 157u8, + 44u8, 87u8, 51u8, 63u8, 231u8, 77u8, 7u8, 0u8, 119u8, 244u8, 42u8, + 179u8, 51u8, 254u8, 240u8, 55u8, 25u8, 142u8, 38u8, 87u8, 44u8, + ], + ) + } + } + } + #[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; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + 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 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 { + 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, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + 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"; + } + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " Information that is pertinent to identify the entity behind an account."] + #[doc = ""] + #[doc = " TWOX-NOTE: OK ― `AccountId` is a secure hash."] + pub fn identity_of( + &self, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_identity::types::Registration<::core::primitive::u128>, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Identity", + "IdentityOf", + 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, + ], + ) + } + #[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, + runtime_types::pallet_identity::types::Registration<::core::primitive::u128>, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Identity", + "IdentityOf", + Vec::new(), + [ + 193u8, 195u8, 180u8, 188u8, 129u8, 250u8, 180u8, 219u8, 22u8, 95u8, + 175u8, 170u8, 143u8, 188u8, 80u8, 124u8, 234u8, 228u8, 245u8, 39u8, + 72u8, 153u8, 107u8, 199u8, 23u8, 75u8, 47u8, 247u8, 104u8, 208u8, + 171u8, 82u8, + ], + ) + } + #[doc = " The super-identity of an alternative \"sub\" identity together with its name, within that"] + #[doc = " context. If the account is not some other account's sub-identity, then just `None`."] + pub fn super_of( + &self, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ( + ::subxt::utils::AccountId32, + runtime_types::pallet_identity::types::Data, + ), + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Identity", + "SuperOf", + 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, + ], + ) + } + #[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, + ( + ::subxt::utils::AccountId32, + runtime_types::pallet_identity::types::Data, + ), + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Identity", + "SuperOf", + Vec::new(), + [ + 170u8, 249u8, 112u8, 249u8, 75u8, 176u8, 21u8, 29u8, 152u8, 149u8, + 69u8, 113u8, 20u8, 92u8, 113u8, 130u8, 135u8, 62u8, 18u8, 204u8, 166u8, + 193u8, 133u8, 167u8, 248u8, 117u8, 80u8, 137u8, 158u8, 111u8, 100u8, + 137u8, + ], + ) + } + #[doc = " Alternative \"sub\" identities of this account."] + #[doc = ""] + #[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<::subxt::utils::AccountId32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ( + ::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( + "Identity", + "SubsOf", + 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, + ], + ) + } + #[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, + ( + ::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( + "Identity", + "SubsOf", + Vec::new(), + [ + 128u8, 15u8, 175u8, 155u8, 216u8, 225u8, 200u8, 169u8, 215u8, 206u8, + 110u8, 22u8, 204u8, 89u8, 212u8, 210u8, 159u8, 169u8, 53u8, 7u8, 44u8, + 164u8, 91u8, 151u8, 7u8, 227u8, 38u8, 230u8, 175u8, 84u8, 6u8, 4u8, + ], + ) + } + #[doc = " The set of registrars. Not expected to get very big as can only be added through a"] + #[doc = " special origin (likely a council motion)."] + #[doc = ""] + #[doc = " The index into this can be cast to `RegistrarIndex` to get a valid value."] + pub fn registrars( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + 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( + "Identity", + "Registrars", + vec![], + [ + 157u8, 87u8, 39u8, 240u8, 154u8, 54u8, 241u8, 229u8, 76u8, 9u8, 62u8, + 252u8, 40u8, 143u8, 186u8, 182u8, 233u8, 187u8, 251u8, 61u8, 236u8, + 229u8, 19u8, 55u8, 42u8, 36u8, 82u8, 173u8, 215u8, 155u8, 229u8, 111u8, + ], + ) + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + 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( + &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 proxy { + 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 :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (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 = "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 = "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 { + ::subxt::tx::Payload::new_static( + "Proxy", + "proxy", + Proxy { + real, + force_proxy_type, + call: ::std::boxed::Box::new(call), + }, + [ + 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 = "Register a proxy account for the sender that is able to make calls on its behalf."] + #[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, + }, + [ + 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 = "Unregister a proxy account for the sender."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[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( + &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", + "remove_proxy", + RemoveProxy { + delegate, + proxy_type, + delay, + }, + [ + 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 = "Unregister all proxy accounts for the sender."] + #[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, + }, + [ + 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 = "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, + }, + [ + 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", + 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", + 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", + 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", + 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_proxy::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 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, + } + impl ::subxt::events::StaticEvent for PureCreated { + const PALLET: &'static str = "Proxy"; + const EVENT: &'static str = "PureCreated"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + 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 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 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"; + } + } + 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( + &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_proxy::ProxyDefinition< + ::subxt::utils::AccountId32, + runtime_types::polkadot_runtime::ProxyType, + ::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", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], + [ + 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 = " 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::bounded_collections::bounded_vec::BoundedVec< + runtime_types::pallet_proxy::ProxyDefinition< + ::subxt::utils::AccountId32, + runtime_types::polkadot_runtime::ProxyType, + ::core::primitive::u32, + >, + >, + ::core::primitive::u128, + ), + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Proxy", + "Proxies", + Vec::new(), + [ + 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 = " The announcements made by the proxy (key)."] + pub fn announcements( + &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_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( + "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::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( + "Proxy", + "Announcements", + Vec::new(), + [ + 233u8, 38u8, 249u8, 89u8, 103u8, 87u8, 64u8, 52u8, 140u8, 228u8, 110u8, + 37u8, 8u8, 92u8, 48u8, 7u8, 46u8, 99u8, 179u8, 83u8, 232u8, 171u8, + 160u8, 45u8, 37u8, 23u8, 151u8, 198u8, 237u8, 103u8, 217u8, 53u8, + ], + ) + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The base amount of currency needed to reserve for creating a proxy."] + #[doc = ""] + #[doc = " This is held for an additional storage item whose value size is"] + #[doc = " `sizeof(Balance)` bytes and whose key size is `sizeof(AccountId)` bytes."] + pub fn proxy_deposit_base( + &self, + ) -> ::subxt::constants::Address<::core::primitive::u128> { + ::subxt::constants::Address::new_static( + "Proxy", + "ProxyDepositBase", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, + 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) + } + #[doc = " The amount of currency needed per proxy added."] + #[doc = ""] + #[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( + "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::new_static( + "Proxy", + "MaxProxies", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " The maximum amount of time-delayed announcements that are allowed to be pending."] + pub fn max_pending(&self) -> ::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<::core::primitive::u128> { + ::subxt::constants::Address::new_static( + "Proxy", + "AnnouncementDepositBase", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, + 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) + } + #[doc = " The amount of currency needed per announcement made."] + #[doc = ""] + #[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( + "Proxy", + "AnnouncementDepositFactor", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, + 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) + } + } + } + } + pub mod multisig { + use super::root_mod; + 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 :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (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 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 = "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 = "## 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, + 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), + }, + [ + 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 = "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 = "## 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, + 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, + }, + [ + 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 = "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 = "## 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, + 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 = "## 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, + 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"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + 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 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 MultisigApproval { + const PALLET: &'static str = "Multisig"; + const EVENT: &'static str = "MultisigApproval"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + 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 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 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, + ], + ) + } + } + } + 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( + &self, + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "Multisig", + "MaxSignatories", + [ + 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 bounties { + 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 :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (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, + ], + ) + } + #[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::SpendOrigin`."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- O(1)."] + 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, + ], + ) + } + #[doc = "Assign a curator to a funded bounty."] + #[doc = ""] + #[doc = "May only be called from `T::SpendOrigin`."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- O(1)."] + 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, + ], + ) + } + #[doc = "Unassign curator from a bounty."] + #[doc = ""] + #[doc = "This function can only be called by the `RejectOrigin` a signed origin."] + #[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 = ""] + #[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, + bounty_id: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Bounties", + "unassign_curator", + UnassignCurator { bounty_id }, + [ + 218u8, 241u8, 247u8, 89u8, 95u8, 120u8, 93u8, 18u8, 85u8, 114u8, 158u8, + 254u8, 68u8, 77u8, 230u8, 186u8, 230u8, 201u8, 63u8, 223u8, 28u8, + 173u8, 244u8, 82u8, 113u8, 177u8, 99u8, 27u8, 207u8, 247u8, 207u8, + 213u8, + ], + ) + } + #[doc = "Accept the curator role for a bounty."] + #[doc = "A deposit will be reserved from curator and refund upon successful payout."] + #[doc = ""] + #[doc = "May only be called from the curator."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- O(1)."] + pub fn accept_curator( + &self, + bounty_id: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Bounties", + "accept_curator", + AcceptCurator { bounty_id }, + [ + 106u8, 96u8, 22u8, 67u8, 52u8, 109u8, 180u8, 225u8, 122u8, 253u8, + 209u8, 214u8, 132u8, 131u8, 247u8, 131u8, 162u8, 51u8, 144u8, 30u8, + 12u8, 126u8, 50u8, 152u8, 229u8, 119u8, 54u8, 116u8, 112u8, 235u8, + 34u8, 166u8, + ], + ) + } + #[doc = "Award bounty to a beneficiary account. The beneficiary will be able to claim the funds"] + #[doc = "after a delay."] + #[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, + bounty_id: ::core::primitive::u32, + beneficiary: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Bounties", + "award_bounty", + AwardBounty { + bounty_id, + beneficiary, + }, + [ + 203u8, 164u8, 214u8, 242u8, 1u8, 11u8, 217u8, 32u8, 189u8, 136u8, 29u8, + 230u8, 88u8, 17u8, 134u8, 189u8, 15u8, 204u8, 223u8, 20u8, 168u8, + 182u8, 129u8, 48u8, 83u8, 25u8, 125u8, 25u8, 209u8, 155u8, 170u8, 68u8, + ], + ) + } + #[doc = "Claim the payout from an awarded bounty after payout delay."] + #[doc = ""] + #[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, + bounty_id: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Bounties", + "claim_bounty", + ClaimBounty { bounty_id }, + [ + 102u8, 95u8, 8u8, 89u8, 4u8, 126u8, 189u8, 28u8, 241u8, 16u8, 125u8, + 218u8, 42u8, 92u8, 177u8, 91u8, 8u8, 235u8, 33u8, 48u8, 64u8, 115u8, + 177u8, 95u8, 242u8, 97u8, 181u8, 50u8, 68u8, 37u8, 59u8, 85u8, + ], + ) + } + #[doc = "Cancel a proposed or active bounty. All the funds will be sent to treasury and"] + #[doc = "the curator deposit will be unreserved if possible."] + #[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, + bounty_id: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Bounties", + "close_bounty", + CloseBounty { bounty_id }, + [ + 64u8, 113u8, 151u8, 228u8, 90u8, 55u8, 251u8, 63u8, 27u8, 211u8, 119u8, + 229u8, 137u8, 137u8, 183u8, 240u8, 241u8, 146u8, 69u8, 169u8, 124u8, + 220u8, 236u8, 111u8, 98u8, 188u8, 100u8, 52u8, 127u8, 245u8, 244u8, + 92u8, + ], + ) + } + #[doc = "Extend the expiry time of an active bounty."] + #[doc = ""] + #[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, + bounty_id: ::core::primitive::u32, + remark: ::std::vec::Vec<::core::primitive::u8>, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Bounties", + "extend_bounty_expiry", + ExtendBountyExpiry { bounty_id, remark }, + [ + 97u8, 69u8, 157u8, 39u8, 59u8, 72u8, 79u8, 88u8, 104u8, 119u8, 91u8, + 26u8, 73u8, 216u8, 174u8, 95u8, 254u8, 214u8, 63u8, 138u8, 100u8, + 112u8, 185u8, 81u8, 159u8, 247u8, 221u8, 60u8, 87u8, 40u8, 80u8, 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_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( + &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, + >, + ::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(), + )], + [ + 111u8, 149u8, 33u8, 54u8, 172u8, 143u8, 41u8, 231u8, 184u8, 255u8, + 238u8, 206u8, 87u8, 142u8, 84u8, 10u8, 236u8, 141u8, 190u8, 193u8, + 72u8, 170u8, 19u8, 110u8, 135u8, 136u8, 220u8, 11u8, 99u8, 126u8, + 225u8, 208u8, + ], + ) + } + #[doc = " Bounties that have been made."] + pub fn bounties_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_bounties::Bounty< + ::subxt::utils::AccountId32, + ::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::bounded_collections::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::bounded_collections::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::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![], + [ + 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", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " The curator deposit is calculated as a percentage of the curator fee."] + #[doc = ""] + #[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( + &self, + ) -> ::subxt::constants::Address<::core::option::Option<::core::primitive::u128>> + { + ::subxt::constants::Address::new_static( + "Bounties", + "CuratorDepositMax", + [ + 84u8, 154u8, 218u8, 83u8, 84u8, 189u8, 32u8, 20u8, 120u8, 194u8, 88u8, + 205u8, 109u8, 216u8, 114u8, 193u8, 120u8, 198u8, 154u8, 237u8, 134u8, + 204u8, 102u8, 247u8, 52u8, 103u8, 231u8, 43u8, 243u8, 122u8, 60u8, + 216u8, + ], + ) + } + #[doc = " Minimum amount of funds that should be placed in a deposit for making a proposal."] + pub fn curator_deposit_min( + &self, + ) -> ::subxt::constants::Address<::core::option::Option<::core::primitive::u128>> + { + ::subxt::constants::Address::new_static( + "Bounties", + "CuratorDepositMin", + [ + 84u8, 154u8, 218u8, 83u8, 84u8, 189u8, 32u8, 20u8, 120u8, 194u8, 88u8, + 205u8, 109u8, 216u8, 114u8, 193u8, 120u8, 198u8, 154u8, 237u8, 134u8, + 204u8, 102u8, 247u8, 52u8, 103u8, 231u8, 43u8, 243u8, 122u8, 60u8, + 216u8, + ], + ) + } + #[doc = " Minimum value for a bounty."] + pub fn bounty_value_minimum( + &self, + ) -> ::subxt::constants::Address<::core::primitive::u128> { + ::subxt::constants::Address::new_static( + "Bounties", + "BountyValueMinimum", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, + 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) + } + #[doc = " The amount held on deposit per byte within the tip report reason or bounty description."] + pub fn data_deposit_per_byte( + &self, + ) -> ::subxt::constants::Address<::core::primitive::u128> { + ::subxt::constants::Address::new_static( + "Bounties", + "DataDepositPerByte", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, + 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) + } + #[doc = " Maximum acceptable reason length."] + #[doc = ""] + #[doc = " Benchmarks depend on this value, be sure to update weights file when changing this value"] + pub fn maximum_reason_length( + &self, + ) -> ::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 = "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 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 = "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, @@ -18736,6 +22543,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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."] @@ -18754,6 +22562,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 awarded to a beneficiary."] @@ -18773,6 +22582,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 claimed by beneficiary."] @@ -18793,6 +22603,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 cancelled."] @@ -18940,7 +22751,9 @@ 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<::core::primitive::u8>, + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, ::subxt::storage::address::Yes, (), ::subxt::storage::address::Yes, @@ -18964,7 +22777,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, @@ -19081,6 +22896,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -19094,6 +22910,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -19106,6 +22923,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -19121,6 +22939,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -19135,6 +22954,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -19147,6 +22967,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -19167,12 +22988,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 = "# "] pub fn report_awesome( &self, reason: ::std::vec::Vec<::core::primitive::u8>, @@ -19202,12 +23020,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 = "# "] pub fn retract_tip( &self, hash: ::subxt::utils::H256, @@ -19237,15 +23052,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 = "# "] pub fn tip_new( &self, reason: ::std::vec::Vec<::core::primitive::u8>, @@ -19282,16 +23094,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 = "# "] pub fn tip( &self, hash: ::subxt::utils::H256, @@ -19317,13 +23126,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`."] pub fn close_tip( &self, hash: ::subxt::utils::H256, @@ -19347,10 +23153,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)."] pub fn slash_tip( &self, hash: ::subxt::utils::H256, @@ -19379,6 +23183,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 tip suggestion has been opened."] @@ -19396,6 +23201,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 tip suggestion has reached threshold and is closing."] @@ -19413,6 +23219,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 tip suggestion has been closed."] @@ -19432,6 +23239,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 tip suggestion has been retracted."] @@ -19449,6 +23257,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 tip suggestion has been slashed."] @@ -19670,6 +23479,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -19688,6 +23498,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -19701,6 +23512,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -19716,6 +23528,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -19732,6 +23545,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -19888,16 +23702,19 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 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."] 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 { @@ -19911,6 +23728,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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."] @@ -19929,6 +23747,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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."] @@ -19946,6 +23765,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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."] @@ -19964,6 +23784,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 slashed for submitting an invalid signed submission."] @@ -19976,40 +23797,28 @@ pub mod api { const EVENT: &'static str = "Slashed"; } #[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 = "The signed phase of the given round has started."] - pub struct SignedPhaseStarted { - pub round: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for SignedPhaseStarted { - const PALLET: &'static str = "ElectionProviderMultiPhase"; - const EVENT: &'static str = "SignedPhaseStarted"; - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[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 { + #[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, } - impl ::subxt::events::StaticEvent for UnsignedPhaseStarted { + impl ::subxt::events::StaticEvent for PhaseTransitioned { const PALLET: &'static str = "ElectionProviderMultiPhase"; - const EVENT: &'static str = "UnsignedPhaseStarted"; + const EVENT: &'static str = "PhaseTransitioned"; } } pub mod storage { @@ -20094,7 +23903,16 @@ pub mod api { &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_election_provider_multi_phase::RoundSnapshot, + 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, (), (), @@ -20196,7 +24014,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::sp_npos_elections::ElectionScore, ::core::primitive::u32, ::core::primitive::u32, @@ -20609,6 +24427,20 @@ pub mod api { ], ) } + pub fn miner_max_winners( + &self, + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "ElectionProviderMultiPhase", + "MinerMaxWinners", + [ + 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, + ], + ) + } } } } @@ -20627,6 +24459,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -20639,6 +24472,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -20709,6 +24543,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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."] @@ -20728,6 +24563,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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."] @@ -20944,6 +24780,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -20958,6 +24795,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -20971,6 +24809,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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; @@ -20981,6 +24820,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -20995,6 +24835,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -21008,6 +24849,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -21021,6 +24863,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -21028,7 +24871,7 @@ pub mod api { 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 bouncer: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -21037,6 +24880,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -21044,7 +24888,7 @@ pub mod api { 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 bouncer: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, pub pool_id: ::core::primitive::u32, } #[derive( @@ -21054,6 +24898,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -21067,6 +24912,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -21080,6 +24926,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -21093,6 +24940,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -21106,6 +24954,9 @@ pub mod api { 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, @@ -21114,6 +24965,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -21122,7 +24974,7 @@ pub mod api { 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: + pub new_bouncer: runtime_types::pallet_nomination_pools::ConfigOp<::subxt::utils::AccountId32>, } #[derive( @@ -21133,11 +24985,114 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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"] @@ -21173,6 +25128,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."] pub fn bond_extra( &self, extra: runtime_types::pallet_nomination_pools::BondExtra< @@ -21192,11 +25148,13 @@ pub mod api { ) } #[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."] pub fn claim_payout(&self) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "NominationPools", @@ -21218,8 +25176,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."] @@ -21234,9 +25192,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."] pub fn unbond( &self, member_account: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, @@ -21292,7 +25253,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 = ""] @@ -21332,7 +25293,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 = ""] @@ -21343,7 +25304,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, ()>, ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "NominationPools", @@ -21352,12 +25313,13 @@ pub mod api { amount, root, nominator, - state_toggler, + bouncer, }, [ - 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, + 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, ], ) } @@ -21372,7 +25334,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, ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( @@ -21382,13 +25344,13 @@ pub mod api { amount, root, nominator, - state_toggler, + bouncer, pool_id, }, [ - 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, + 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, ], ) } @@ -21425,7 +25387,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`."] pub fn set_state( @@ -21447,8 +25409,8 @@ pub mod api { } #[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."] pub fn set_metadata( &self, pool_id: ::core::primitive::u32, @@ -21475,6 +25437,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`]."] pub fn set_configs( &self, min_join_bond: runtime_types::pallet_nomination_pools::ConfigOp< @@ -21492,6 +25455,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, + >, ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "NominationPools", @@ -21502,11 +25468,13 @@ pub mod api { max_pools, max_members, max_members_per_pool, + global_max_commission, }, [ - 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, + 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, ], ) } @@ -21526,7 +25494,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, >, ) -> ::subxt::tx::Payload { @@ -21537,12 +25505,13 @@ pub mod api { pool_id, new_root, new_nominator, - new_state_toggler, + new_bouncer, }, [ - 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, + 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, ], ) } @@ -21568,6 +25537,177 @@ pub mod api { ], ) } + #[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", + 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", + 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", + 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", + 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", + 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", + 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", + 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, + ], + ) + } } } #[doc = "Events of this pallet."] @@ -21581,6 +25721,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 created."] @@ -21599,6 +25740,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 became bonded in a pool."] @@ -21619,6 +25761,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 payout has been made to a member."] @@ -21638,6 +25781,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 unbonded from their pool."] @@ -21669,6 +25813,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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."] @@ -21695,6 +25840,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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."] @@ -21712,6 +25858,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -21730,6 +25877,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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."] @@ -21750,13 +25898,14 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 bouncer: ::core::option::Option<::subxt::utils::AccountId32>, pub nominator: ::core::option::Option<::subxt::utils::AccountId32>, } impl ::subxt::events::StaticEvent for RolesUpdated { @@ -21770,6 +25919,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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`."] @@ -21788,6 +25938,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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`."] @@ -21800,6 +25951,87 @@ pub mod api { 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, + >, + } + 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; @@ -21921,7 +26153,33 @@ pub mod api { ], ) } + #[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, + runtime_types::sp_arithmetic::per_things::Perbill, + ::subxt::storage::address::Yes, + (), + (), + > { + ::subxt::storage::address::Address::new_static( + "NominationPools", + "GlobalMaxCommission", + vec![], + [ + 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 = " Active members."] + #[doc = ""] + #[doc = " TWOX-NOTE: SAFE since `AccountId` is a secure hash."] pub fn pool_members( &self, _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, @@ -21947,6 +26205,8 @@ pub mod api { ) } #[doc = " Active members."] + #[doc = ""] + #[doc = " TWOX-NOTE: SAFE since `AccountId` is a secure hash."] pub fn pool_members_root( &self, ) -> ::subxt::storage::address::Address< @@ -22008,9 +26268,10 @@ pub mod api { _0.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, + 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, ], ) } @@ -22029,9 +26290,10 @@ pub mod api { "BondedPools", 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, + 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, ], ) } @@ -22057,8 +26319,8 @@ pub mod api { ], ) } - #[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."] + #[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<::core::primitive::u32>, @@ -22076,14 +26338,15 @@ pub mod api { _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, + 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 = " 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."] + #[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< @@ -22098,9 +26361,10 @@ pub mod api { "RewardPools", 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, + 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, ], ) } @@ -22126,8 +26390,8 @@ pub mod api { ], ) } - #[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."] + #[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<::core::primitive::u32>, @@ -22152,8 +26416,8 @@ pub mod api { ], ) } - #[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."] + #[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< @@ -22202,7 +26466,9 @@ 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<::core::primitive::u8>, + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, @@ -22226,7 +26492,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, ::subxt::storage::address::Yes, @@ -22359,6 +26627,53 @@ pub mod api { ], ) } + #[doc = " Map from a pool member account to their opted claim permission."] + pub fn claim_permissions( + &self, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_nomination_pools::ClaimPermission, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "NominationPools", + "ClaimPermissions", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], + [ + 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 = " 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::pallet_nomination_pools::ClaimPermission, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "NominationPools", + "ClaimPermissions", + Vec::new(), + [ + 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, + ], + ) + } } } pub mod constants { @@ -22424,6 +26739,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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; @@ -22434,6 +26750,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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; @@ -22445,10 +26762,11 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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, + pub eras_to_check: ::core::primitive::u32, } pub struct TransactionApi; impl TransactionApi { @@ -22508,18 +26826,16 @@ pub mod api { #[doc = "Dispatch origin must be signed by the [`Config::ControlOrigin`]."] pub fn control( &self, - unchecked_eras_to_check: ::core::primitive::u32, + eras_to_check: ::core::primitive::u32, ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "FastUnstake", "control", - Control { - unchecked_eras_to_check, - }, + Control { 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, + 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, ], ) } @@ -22536,6 +26852,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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."] @@ -22554,6 +26871,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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."] @@ -22572,24 +26890,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] - #[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."] @@ -22605,6 +26906,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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."] @@ -22616,19 +26918,23 @@ pub mod api { const EVENT: &'static str = "BatchChecked"; } #[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 batch was terminated."] + #[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 struct BatchFinished { + pub size: ::core::primitive::u32, + } impl ::subxt::events::StaticEvent for BatchFinished { const PALLET: &'static str = "FastUnstake"; const EVENT: &'static str = "BatchFinished"; @@ -22662,6 +26968,8 @@ pub mod api { #[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( &self, _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, @@ -22688,6 +26996,8 @@ pub mod api { #[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< @@ -22757,6 +27067,25 @@ pub mod api { } } } + pub mod constants { + use super::runtime_types; + 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", + [ + 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; @@ -22778,6 +27107,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -22791,6 +27121,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -22804,6 +27135,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -22817,6 +27149,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -22830,6 +27163,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -22843,6 +27177,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -22856,6 +27191,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -22869,6 +27205,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -22882,6 +27219,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -22895,6 +27233,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -22908,6 +27247,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -22921,6 +27261,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -22933,6 +27274,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -22945,6 +27287,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -22958,6 +27301,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -22971,6 +27315,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -22984,32 +27329,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] - #[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, - )] - #[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 { @@ -23023,6 +27343,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -23036,6 +27357,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -23049,6 +27371,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -23062,6 +27385,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -23075,6 +27399,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -23088,6 +27413,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -23101,6 +27427,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -23113,6 +27440,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -23126,6 +27454,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -23139,6 +27468,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -23152,6 +27482,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -23165,6 +27496,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -23178,6 +27510,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -23191,6 +27524,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -23204,6 +27538,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -23217,6 +27552,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -23230,6 +27566,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -23243,6 +27580,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -23256,6 +27594,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -23269,6 +27608,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -23282,6 +27622,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -23294,6 +27635,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -23306,6 +27648,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -23319,6 +27662,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -23332,6 +27676,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -23344,11 +27689,38 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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."] @@ -23617,38 +27989,6 @@ pub mod api { ], ) } - #[doc = "Set the maximum number of dispute spam slots."] - pub fn set_dispute_max_spam_slots( - &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_dispute_max_spam_slots", - SetDisputeMaxSpamSlots { new }, - [ - 177u8, 58u8, 3u8, 205u8, 145u8, 85u8, 160u8, 162u8, 13u8, 171u8, 124u8, - 54u8, 58u8, 209u8, 88u8, 131u8, 230u8, 248u8, 142u8, 18u8, 121u8, - 129u8, 196u8, 121u8, 25u8, 15u8, 252u8, 229u8, 89u8, 230u8, 14u8, 68u8, - ], - ) - } - #[doc = "Set the dispute conclusion by time out period."] - pub fn set_dispute_conclusion_by_time_out_period( - &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_dispute_conclusion_by_time_out_period", - SetDisputeConclusionByTimeOutPeriod { new }, - [ - 238u8, 102u8, 27u8, 169u8, 68u8, 116u8, 198u8, 64u8, 190u8, 33u8, 36u8, - 98u8, 176u8, 157u8, 123u8, 148u8, 126u8, 85u8, 32u8, 19u8, 49u8, 40u8, - 172u8, 41u8, 195u8, 182u8, 44u8, 255u8, 136u8, 204u8, 250u8, 6u8, - ], - ) - } #[doc = "Set the no show slots, in number of number of consensus slots."] #[doc = "Must be at least 1."] pub fn set_no_show_slots( @@ -24098,6 +28438,40 @@ pub mod api { ], ) } + #[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", + 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", + 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 { @@ -24121,10 +28495,10 @@ pub mod api { "ActiveConfig", vec![], [ - 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, + 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, ], ) } @@ -24140,9 +28514,10 @@ pub mod api { "PendingConfigs", vec![], [ - 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, + 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, ], ) } @@ -24213,7 +28588,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, (), @@ -24236,7 +28611,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, (), @@ -24277,14 +28652,15 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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::v2::CandidateReceipt<::subxt::utils::H256>, + pub runtime_types::polkadot_primitives::v4::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, + 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"; @@ -24297,14 +28673,15 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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::v2::CandidateReceipt<::subxt::utils::H256>, + pub runtime_types::polkadot_primitives::v4::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, + 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"; @@ -24317,13 +28694,14 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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::v2::CandidateReceipt<::subxt::utils::H256>, + pub runtime_types::polkadot_primitives::v4::CandidateReceipt<::subxt::utils::H256>, pub runtime_types::polkadot_parachain::primitives::HeadData, - pub runtime_types::polkadot_primitives::v2::CoreIndex, + pub runtime_types::polkadot_primitives::v4::CoreIndex, ); impl ::subxt::events::StaticEvent for CandidateTimedOut { const PALLET: &'static str = "ParaInclusion"; @@ -24334,7 +28712,7 @@ pub mod api { use super::runtime_types; pub struct StorageApi; impl StorageApi { - #[doc = " The latest bitfield for each validator, referred to by their index in the validator set."] pub fn availability_bitfields (& self , _0 : impl :: std :: borrow :: Borrow < runtime_types :: polkadot_primitives :: v2 :: ValidatorIndex > ,) -> :: subxt :: storage :: address :: Address :: < :: subxt :: storage :: address :: StaticStorageMapKey , runtime_types :: polkadot_runtime_parachains :: inclusion :: AvailabilityBitfieldRecord < :: core :: primitive :: u32 > , :: subxt :: storage :: address :: Yes , () , :: subxt :: storage :: address :: Yes >{ + #[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", @@ -24394,7 +28772,7 @@ pub mod api { _0: impl ::std::borrow::Borrow, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_primitives::v2::CandidateCommitments< + runtime_types::polkadot_primitives::v4::CandidateCommitments< ::core::primitive::u32, >, ::subxt::storage::address::Yes, @@ -24408,10 +28786,9 @@ pub mod api { _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, + 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, ], ) } @@ -24420,7 +28797,7 @@ pub mod api { &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_primitives::v2::CandidateCommitments< + runtime_types::polkadot_primitives::v4::CandidateCommitments< ::core::primitive::u32, >, (), @@ -24432,10 +28809,9 @@ pub mod api { "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, + 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, ], ) } @@ -24457,10 +28833,11 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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< + pub data: runtime_types::polkadot_primitives::v4::InherentData< runtime_types::sp_runtime::generic::header::Header< ::core::primitive::u32, runtime_types::sp_runtime::traits::BlakeTwo256, @@ -24472,7 +28849,7 @@ pub mod api { #[doc = "Enter the paras inherent. This will process bitfields and backed candidates."] pub fn enter( &self, - 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, @@ -24484,9 +28861,10 @@ pub mod api { "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, + 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, ], ) } @@ -24527,7 +28905,7 @@ pub mod api { &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_primitives::v2::ScrapedOnChainVotes< + runtime_types::polkadot_primitives::v4::ScrapedOnChainVotes< ::subxt::utils::H256, >, ::subxt::storage::address::Yes, @@ -24567,7 +28945,7 @@ pub mod api { ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, ::std::vec::Vec< - ::std::vec::Vec, + ::std::vec::Vec, >, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, @@ -24622,7 +29000,7 @@ pub mod api { ::subxt::storage::address::StaticStorageMapKey, ::std::vec::Vec< ::core::option::Option< - runtime_types::polkadot_primitives::v2::CoreOccupied, + runtime_types::polkadot_primitives::v4::CoreOccupied, >, >, ::subxt::storage::address::Yes, @@ -24739,6 +29117,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -24752,6 +29131,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -24765,6 +29145,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -24779,6 +29160,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -24792,6 +29174,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -24804,6 +29187,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -24816,6 +29200,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -24829,11 +29214,12 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 stmt: runtime_types::polkadot_primitives::v4::PvfCheckStatement, + pub signature: runtime_types::polkadot_primitives::v4::validator_app::Signature, } pub struct TransactionApi; impl TransactionApi { @@ -24984,8 +29370,8 @@ pub mod api { #[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, + 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", @@ -25011,6 +29397,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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`"] @@ -25026,6 +29413,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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`"] @@ -25041,6 +29429,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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`"] @@ -25056,6 +29445,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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`"] @@ -25071,6 +29461,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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`"] @@ -25089,6 +29480,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -25108,6 +29500,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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."] @@ -25127,6 +29520,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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."] @@ -25449,7 +29843,7 @@ pub mod api { } #[doc = " Past code of parachains. The parachains themselves may not be registered anymore,"] #[doc = " but we also keep their code on-chain for the same amount of time as outdated code"] - #[doc = " to keep it available for secondary checkers."] + #[doc = " to keep it available for approval checkers."] pub fn past_code_meta( &self, _0: impl ::std::borrow::Borrow, @@ -25478,7 +29872,7 @@ pub mod api { } #[doc = " Past code of parachains. The parachains themselves may not be registered anymore,"] #[doc = " but we also keep their code on-chain for the same amount of time as outdated code"] - #[doc = " to keep it available for secondary checkers."] + #[doc = " to keep it available for approval checkers."] pub fn past_code_meta_root( &self, ) -> ::subxt::storage::address::Address< @@ -25647,7 +30041,7 @@ pub mod api { _0: impl ::std::borrow::Borrow, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_primitives::v2::UpgradeGoAhead, + runtime_types::polkadot_primitives::v4::UpgradeGoAhead, ::subxt::storage::address::Yes, (), ::subxt::storage::address::Yes, @@ -25678,7 +30072,7 @@ pub mod api { &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_primitives::v2::UpgradeGoAhead, + runtime_types::polkadot_primitives::v4::UpgradeGoAhead, (), (), ::subxt::storage::address::Yes, @@ -25708,7 +30102,7 @@ pub mod api { _0: impl ::std::borrow::Borrow, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_primitives::v2::UpgradeRestriction, + runtime_types::polkadot_primitives::v4::UpgradeRestriction, ::subxt::storage::address::Yes, (), ::subxt::storage::address::Yes, @@ -25739,7 +30133,7 @@ pub mod api { &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_primitives::v2::UpgradeRestriction, + runtime_types::polkadot_primitives::v4::UpgradeRestriction, (), (), ::subxt::storage::address::Yes, @@ -26049,6 +30443,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -26276,6 +30671,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -26329,6 +30725,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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."] @@ -26345,6 +30742,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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."] @@ -26361,13 +30759,14 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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, + pub runtime_types::xcm::v3::traits::Outcome, ); impl ::subxt::events::StaticEvent for ExecutedUpward { const PALLET: &'static str = "Ump"; @@ -26380,6 +30779,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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."] @@ -26400,6 +30800,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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."] @@ -26420,6 +30821,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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."] @@ -26445,6 +30847,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -26690,6 +31093,28 @@ pub mod api { ], ) } + #[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( @@ -26731,6 +31156,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -26745,6 +31171,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -26757,6 +31184,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -26769,6 +31197,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -26784,6 +31213,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -26797,6 +31227,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -26809,6 +31240,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -26822,6 +31254,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -27044,6 +31477,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 = "Open HRMP channel requested."] @@ -27065,6 +31499,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 HRMP channel request sent by the receiver was canceled by either party."] @@ -27084,6 +31519,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 = "Open HRMP channel accepted. `[sender, recipient]`"] @@ -27102,6 +31538,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 = "HRMP channel closed. `[by_parachain, channel_id]`"] @@ -27120,6 +31557,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 HRMP channel was opened via Root origin."] @@ -27750,7 +32188,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, (), @@ -27796,7 +32234,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, @@ -27822,7 +32260,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, @@ -27884,6 +32322,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, + ], + ) + } } } } @@ -27902,6 +32385,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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; @@ -27933,6 +32417,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 been initiated. \\[candidate hash, dispute location\\]"] @@ -27951,6 +32436,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 concluded for or against a candidate."] @@ -27963,22 +32449,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, - )] - #[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, @@ -27987,6 +32457,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 concluded with supermajority against a candidate."] @@ -28034,7 +32505,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, @@ -28059,7 +32530,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, @@ -28076,6 +32547,57 @@ pub mod api { ], ) } + #[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< + runtime_types::polkadot_core_primitives::CandidateHash, + >, + ) -> ::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( + "ParasDisputes", + "BackersOnDisputes", + vec![ + ::subxt::storage::address::make_static_storage_map_key(_0.borrow()), + ::subxt::storage::address::make_static_storage_map_key(_1.borrow()), + ], + [ + 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 = " 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, + ::std::vec::Vec, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "ParasDisputes", + "BackersOnDisputes", + Vec::new(), + [ + 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( @@ -28129,61 +32651,6 @@ pub mod api { ], ) } - #[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( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::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( - "ParasDisputes", - "SpamSlots", - vec![::subxt::storage::address::make_static_storage_map_key( - _0.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, - ], - ) - } - #[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( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec<::core::primitive::u32>, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "ParasDisputes", - "SpamSlots", - Vec::new(), - [ - 172u8, 23u8, 120u8, 188u8, 71u8, 248u8, 252u8, 41u8, 132u8, 221u8, - 98u8, 215u8, 33u8, 242u8, 168u8, 196u8, 90u8, 123u8, 190u8, 27u8, - 147u8, 6u8, 196u8, 175u8, 198u8, 216u8, 50u8, 74u8, 138u8, 122u8, - 251u8, 238u8, - ], - ) - } #[doc = " Whether the chain is frozen. Starts as `None`. When this is `Some`,"] #[doc = " the chain will not accept any new parachain blocks for backing or inclusion,"] #[doc = " and its value indicates the last valid block number in the chain."] @@ -28227,6 +32694,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -28241,6 +32709,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -28257,6 +32726,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -28269,6 +32739,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -28282,6 +32753,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -28294,6 +32766,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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; @@ -28304,6 +32777,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -28316,6 +32790,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -28329,6 +32804,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -28565,6 +33041,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Registered { @@ -28582,6 +33059,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Deregistered { @@ -28598,6 +33076,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Reserved { @@ -28789,6 +33268,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -28805,6 +33285,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -28817,6 +33298,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -28907,6 +33389,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 `[lease_period]` is beginning."] @@ -28924,6 +33407,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 won the right to a continuous set of lease periods as a parachain."] @@ -29081,6 +33565,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -29096,6 +33581,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -29117,6 +33603,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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; @@ -29217,6 +33704,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 auction started. Provides its index and the block number where it will begin to"] @@ -29238,6 +33726,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 auction ended. All funds become unreserved."] @@ -29255,6 +33744,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 = "Funds were reserved for a winning bid. First balance is the extra amount reserved."] @@ -29275,6 +33765,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 = "Funds were unreserved since bidder is no longer active. `[bidder, amount]`"] @@ -29293,6 +33784,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 = "Someone attempted to lease the same slot twice for a parachain. The amount is held in reserve"] @@ -29313,6 +33805,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 bid has been accepted as the current winner."] @@ -29334,6 +33827,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 winning offset was chosen for an auction. This will map into the `Winning` storage map."] @@ -29584,6 +34078,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -29606,6 +34101,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -29622,6 +34118,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -29636,6 +34133,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -29649,6 +34147,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -29662,6 +34161,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -29684,6 +34184,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -29697,6 +34198,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -29709,6 +34211,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -29944,6 +34447,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 = "Create a new crowdloaning campaign."] @@ -29961,6 +34465,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 = "Contributed to a crowd sale."] @@ -29980,6 +34485,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 = "Withdrew full balance of a contributor."] @@ -29999,6 +34505,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 loans in a fund have been partially dissolved, i.e. there are some left"] @@ -30017,6 +34524,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 = "All loans in a fund have been refunded."] @@ -30034,6 +34542,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 = "Fund is dissolved."] @@ -30051,6 +34560,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 result of trying to submit a new bid to the Slots pallet."] @@ -30069,6 +34579,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 configuration to a crowdloan has been edited."] @@ -30086,6 +34597,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 memo has been updated."] @@ -30105,6 +34617,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 parachain has been moved to `NewRaise`"] @@ -30309,6 +34822,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -30322,6 +34836,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -30337,6 +34852,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -30352,11 +34868,12 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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, + pub max_weight: runtime_types::sp_weights::weight_v2::Weight, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -30365,11 +34882,12 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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, + ::std::boxed::Box, pub xcm_version: ::core::primitive::u32, } #[derive( @@ -30379,6 +34897,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -30391,6 +34910,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -30403,6 +34923,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -30415,6 +34936,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -30422,7 +34944,7 @@ pub mod api { 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 weight_limit: runtime_types::xcm::v3::WeightLimit, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -30431,6 +34953,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -30438,7 +34961,7 @@ pub mod api { 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 weight_limit: runtime_types::xcm::v3::WeightLimit, } pub struct TransactionApi; impl TransactionApi { @@ -30455,9 +34978,9 @@ pub mod api { 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, ], ) } @@ -30493,9 +35016,9 @@ pub mod api { 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, ], ) } @@ -30532,9 +35055,9 @@ pub mod api { 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, ], ) } @@ -30552,7 +35075,7 @@ pub mod api { pub fn execute( &self, message: runtime_types::xcm::VersionedXcm, - max_weight: ::core::primitive::u64, + max_weight: runtime_types::sp_weights::weight_v2::Weight, ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "XcmPallet", @@ -30562,9 +35085,9 @@ pub mod api { 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, ], ) } @@ -30576,7 +35099,7 @@ 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::new_static( @@ -30587,9 +35110,9 @@ pub mod api { 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, ], ) } @@ -30628,10 +35151,9 @@ pub mod api { 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, ], ) } @@ -30652,9 +35174,9 @@ pub mod api { 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, ], ) } @@ -30682,7 +35204,7 @@ 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, + weight_limit: runtime_types::xcm::v3::WeightLimit, ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "XcmPallet", @@ -30695,10 +35217,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, ], ) } @@ -30725,7 +35246,7 @@ 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, + weight_limit: runtime_types::xcm::v3::WeightLimit, ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "XcmPallet", @@ -30738,10 +35259,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, ], ) } @@ -30758,12 +35279,13 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 = "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"; @@ -30775,15 +35297,16 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 XCM message was sent."] #[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"; @@ -30796,6 +35319,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 = "Query response received which does not match a registered query. This may be because a"] @@ -30804,7 +35328,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 { @@ -30818,6 +35342,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 = "Query response has been received and is ready for taking with `take_response`. There is"] @@ -30826,7 +35351,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"; @@ -30839,6 +35364,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 = "Query response has been received and query is removed. The registered notification has"] @@ -30861,6 +35387,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 = "Query response has been received and query is removed. The registered notification could"] @@ -30886,6 +35413,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 = "Query response has been received and query is removed. There was a general error with"] @@ -30908,6 +35436,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 = "Query response has been received and query is removed. The dispatch was unable to be"] @@ -30931,6 +35460,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 origin location of the response does"] @@ -30939,9 +35469,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"; @@ -30954,6 +35484,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 expected origin location placed in"] @@ -30966,7 +35497,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 { @@ -30981,6 +35512,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 = "Received query response has been read and removed."] @@ -30998,6 +35530,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 placed in an asset trap."] @@ -31005,7 +35538,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 { @@ -31019,14 +35552,18 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 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"; @@ -31039,6 +35576,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 supported version of a location has been changed. This might be through an"] @@ -31046,7 +35584,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 { @@ -31060,6 +35598,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 given location which had a version change subscription was dropped owing to an error"] @@ -31067,9 +35606,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"; @@ -31082,6 +35621,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 given location which had a version change subscription was dropped owing to an error"] @@ -31103,6 +35643,144 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 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"] @@ -31110,7 +35788,7 @@ pub mod api { #[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 { @@ -31162,10 +35840,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, ], ) } @@ -31184,10 +35862,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, ], ) } @@ -31285,9 +35963,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, ], ) } @@ -31306,9 +35985,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, ], ) } @@ -31332,10 +36012,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, ], ) } @@ -31354,10 +36033,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, ], ) } @@ -31371,7 +36049,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, @@ -31386,9 +36064,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, ], ) } @@ -31400,7 +36078,7 @@ pub mod api { ::subxt::storage::address::StaticStorageMapKey, ( ::core::primitive::u64, - ::core::primitive::u64, + runtime_types::sp_weights::weight_v2::Weight, ::core::primitive::u32, ), (), @@ -31412,9 +36090,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, ], ) } @@ -31425,7 +36103,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, )>, @@ -31438,10 +36116,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, ], ) } @@ -31466,11 +36143,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( @@ -31480,6 +36304,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Equivocation<_0, _1, _2> { @@ -31495,6 +36320,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Precommit<_0, _1> { @@ -31508,6 +36334,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Prevote<_0, _1> { @@ -31526,6 +36353,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 DispatchClass { @@ -31543,6 +36371,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct DispatchInfo { @@ -31557,6 +36386,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 Pays { @@ -31572,6 +36402,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct PerDispatchClass<_0> { @@ -31586,6 +36417,22 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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> { @@ -31608,6 +36455,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct WrapperOpaque<_0>( @@ -31624,6 +36472,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 Bounded<_0> { @@ -31633,7 +36482,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, >, ), @@ -31645,6 +36494,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 { @@ -31656,6 +36524,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 BalanceStatus { @@ -31674,6 +36543,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct PalletId(pub [::core::primitive::u8; 8usize]); @@ -31691,6 +36561,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct CheckGenesis; @@ -31704,6 +36575,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct CheckMortality(pub runtime_types::sp_runtime::generic::era::Era); @@ -31717,6 +36589,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct CheckNonZeroSender; @@ -31730,6 +36603,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct CheckNonce(#[codec(compact)] pub ::core::primitive::u32); @@ -31743,6 +36617,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct CheckSpecVersion; @@ -31756,6 +36631,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct CheckTxVersion; @@ -31769,6 +36645,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct CheckWeight; @@ -31783,6 +36660,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct BlockLength { @@ -31797,6 +36675,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct BlockWeights { @@ -31813,6 +36692,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct WeightsPerClass { @@ -31834,57 +36714,39 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 = "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<( @@ -31892,12 +36754,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"] @@ -31906,7 +36768,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>, @@ -31919,6 +36781,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 = "Error for the System pallet"] @@ -31953,6 +36816,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 = "Event for the System pallet."] @@ -31996,6 +36860,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct AccountInfo<_0, _1> { @@ -32012,6 +36877,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct EventRecord<_0, _1> { @@ -32026,6 +36892,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct LastRuntimeUpgradeInfo { @@ -32040,6 +36907,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 Phase { @@ -32051,82 +36919,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, - )] - #[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, - )] - #[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, - )] - #[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 { @@ -32138,6 +36930,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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."] @@ -32196,6 +36989,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -32226,6 +37020,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Bag { @@ -32239,6 +37034,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 ListError { @@ -32258,6 +37054,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Node { @@ -32277,6 +37074,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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."] @@ -32315,6 +37113,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -32330,6 +37129,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -32361,6 +37161,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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."] @@ -32368,57 +37169,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, ()>, @@ -32426,12 +37203,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)] @@ -32452,9 +37229,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, @@ -32467,6 +37242,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, @@ -32475,34 +37280,41 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 = "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, @@ -32511,6 +37323,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -32540,7 +37353,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)."] @@ -32582,81 +37394,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, - )] - #[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, - )] - #[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, - )] - #[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, - )] - #[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, - )] - #[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 { @@ -32670,6 +37545,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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."] @@ -32696,11 +37572,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, @@ -32708,11 +37583,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, @@ -32736,9 +37610,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, @@ -32749,9 +37622,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, @@ -32765,9 +37637,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, @@ -32780,9 +37651,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, @@ -32795,9 +37665,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, @@ -32810,9 +37679,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, @@ -32826,6 +37694,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -32872,6 +37741,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -32916,6 +37786,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Bounty<_0, _1, _2> { @@ -32933,6 +37804,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 BountyStatus<_0, _1> { @@ -32965,6 +37837,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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."] @@ -33173,6 +38046,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -33194,6 +38068,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -33234,6 +38109,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ChildBounty<_0, _1, _2> { @@ -33250,6 +38126,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 ChildBountyStatus<_0, _1> { @@ -33278,6 +38155,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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."] @@ -33290,7 +38168,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."] @@ -33302,19 +38180,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>, @@ -33325,13 +38195,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)] @@ -33345,26 +38213,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, @@ -33380,62 +38235,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."] @@ -33445,12 +38252,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."] @@ -33471,20 +38274,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)] @@ -33501,6 +38296,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -33543,6 +38339,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -33602,6 +38399,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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> { @@ -33619,6 +38417,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Votes<_0, _1> { @@ -33629,6 +38428,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 { @@ -33640,6 +38826,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 { @@ -33668,6 +38855,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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."] @@ -33955,6 +39143,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, @@ -33963,6 +39171,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -34037,6 +39246,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, @@ -34045,6 +39257,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -34118,6 +39331,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 { @@ -34129,6 +39361,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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> { @@ -34142,6 +39375,25 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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> { @@ -34160,6 +39412,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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> { @@ -34176,6 +39429,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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> { @@ -34193,6 +39447,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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> { @@ -34211,6 +39466,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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); @@ -34222,6 +39478,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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); @@ -34232,12 +39489,13 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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> { #[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>, )>, @@ -34263,6 +39521,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 VoteThreshold { @@ -34286,6 +39545,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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."] @@ -34298,6 +39558,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 = "Error of the pallet that can be returned in response to dispatches."] @@ -34352,6 +39613,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -34359,13 +39621,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)] @@ -34393,11 +39657,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 { @@ -34409,6 +39678,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SignedSubmission<_0, _1, _2> { @@ -34426,6 +39696,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 ElectionCompute { @@ -34447,6 +39718,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 Phase<_0> { @@ -34466,6 +39738,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct RawSolution<_0> { @@ -34480,10 +39753,11 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[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>, )>, @@ -34497,17 +39771,12 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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, @@ -34516,6 +39785,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SolutionOrSnapshotSize { @@ -34536,6 +39806,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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."] @@ -34560,10 +39831,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)] @@ -34589,9 +39856,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, @@ -34611,10 +39878,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, }, @@ -34633,10 +39902,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, @@ -34650,9 +39917,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, @@ -34665,6 +39931,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -34728,6 +39995,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -34782,6 +40050,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 Renouncing { @@ -34799,6 +40068,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SeatHolder<_0, _1> { @@ -34813,6 +40083,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Voter<_0, _1> { @@ -34832,6 +40103,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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."] @@ -34870,7 +40142,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( @@ -34880,6 +40152,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -34912,6 +40185,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 events of this pallet."] @@ -34930,23 +40204,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 { @@ -34958,14 +40228,15 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[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, >, } @@ -34982,6 +40253,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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."] @@ -34993,7 +40265,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, >, @@ -35012,7 +40284,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, >, @@ -35044,6 +40316,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -35079,6 +40352,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -35087,7 +40361,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, )>, }, @@ -35106,14 +40380,15 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct StoredPendingChange<_0> { 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>, @@ -35125,6 +40400,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 StoredState<_0> { @@ -35149,6 +40425,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 = "Identity pallet declaration."] @@ -35162,11 +40439,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, ()>, }, @@ -35182,14 +40456,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, @@ -35205,17 +40475,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, @@ -35232,15 +40495,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."] @@ -35260,12 +40519,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, @@ -35284,12 +40541,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."] @@ -35300,11 +40555,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, @@ -35320,11 +40573,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, @@ -35339,11 +40590,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, @@ -35365,13 +40614,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, @@ -35395,12 +40641,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, ()>, }, @@ -35456,6 +40701,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -35522,6 +40768,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -35598,6 +40845,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct BitFlags<_0>( @@ -35611,6 +40859,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 Data { @@ -35698,6 +40947,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 IdentityField { @@ -35725,10 +40975,11 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[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, )>, @@ -35748,6 +40999,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 Judgement<_0> { @@ -35773,6 +41025,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct RegistrarInfo<_0, _1> { @@ -35789,10 +41042,11 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[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>, )>, @@ -35812,20 +41066,17 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 = "# "] - #[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>, @@ -35839,6 +41090,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -35857,6 +41109,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -35893,6 +41146,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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::sr25519::Public); @@ -35903,6 +41157,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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::sr25519::Signature); @@ -35915,15 +41170,16 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[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, >, >, @@ -35935,6 +41191,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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<_0> { @@ -35956,6 +41213,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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."] @@ -35971,14 +41229,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"] @@ -35991,16 +41243,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, @@ -36016,14 +41260,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"] @@ -36037,16 +41275,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, @@ -36063,14 +41293,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( @@ -36080,6 +41304,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -36107,6 +41332,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -36140,6 +41366,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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."] @@ -36205,6 +41432,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -36226,6 +41454,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -36262,6 +41491,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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."] @@ -36277,12 +41507,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, @@ -36314,7 +41540,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"] @@ -36327,12 +41553,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>, @@ -36362,7 +41582,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"] @@ -36373,11 +41593,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>, @@ -36400,7 +41615,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"] @@ -36409,11 +41624,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>, @@ -36429,6 +41639,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -36483,6 +41694,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -36532,13 +41744,14 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Multisig<_0, _1, _2> { 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, @@ -36547,6 +41760,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Timepoint<_0> { @@ -36565,6 +41779,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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."] @@ -36592,6 +41807,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, @@ -36599,11 +41815,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"] @@ -36615,8 +41833,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."] @@ -36631,9 +41849,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, ()>, @@ -36662,7 +41883,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 = ""] @@ -36688,7 +41909,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 = ""] @@ -36699,8 +41920,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"] @@ -36714,8 +41934,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)] @@ -36738,7 +41957,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 { @@ -36748,8 +41967,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>, @@ -36765,6 +41984,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, @@ -36781,6 +42001,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."] @@ -36798,7 +42021,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, >, }, @@ -36811,6 +42034,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, @@ -36819,6 +42121,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 DefensiveError { @@ -36840,6 +42143,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -36916,11 +42220,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, @@ -36929,6 +42254,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 = "Events of this pallet."] @@ -37008,7 +42334,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)] @@ -37024,6 +42350,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( @@ -37033,6 +42388,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 BondExtra<_0> { @@ -37048,14 +42404,36 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[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, @@ -37064,6 +42442,44 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [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 ConfigOp<_0> { @@ -37081,6 +42497,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct PoolMember { @@ -37089,7 +42506,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, >, @@ -37101,13 +42518,14 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct PoolRoles<_0> { 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, @@ -37116,6 +42534,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 PoolState { @@ -37133,6 +42552,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct RewardPool { @@ -37140,6 +42560,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, @@ -37148,14 +42570,16 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[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, @@ -37164,6 +42588,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct UnbondPool { @@ -37182,6 +42607,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 = "Events type."] @@ -37208,6 +42634,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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."] @@ -37247,6 +42674,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -37277,6 +42705,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -37299,6 +42728,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 RequestStatus<_0, _1> { @@ -37326,6 +42756,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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."] @@ -37334,8 +42765,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:"] @@ -37511,6 +42940,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -37547,6 +42977,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -37598,6 +43029,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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> { @@ -37612,6 +43044,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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> { @@ -37620,6 +43053,468 @@ pub mod api { 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 = "- `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( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + 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 = "Referendum is not ongoing."] + NotOngoing, + #[codec(index = 1)] + #[doc = "Referendum's decision deposit is already paid."] + HasDeposit, + #[codec(index = 2)] + #[doc = "The track identifier given was invalid."] + BadTrack, + #[codec(index = 3)] + #[doc = "There are already a full complement of referenda in progress for this track."] + Full, + #[codec(index = 4)] + #[doc = "The queue of the track is empty."] + QueueEmpty, + #[codec(index = 5)] + #[doc = "The referendum index provided is invalid in this context."] + BadReferendum, + #[codec(index = 6)] + #[doc = "There was nothing to do in the advancement."] + NothingToDo, + #[codec(index = 7)] + #[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, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + 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 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 = "The decision deposit has been placed."] + DecisionDepositPlaced { + index: ::core::primitive::u32, + who: ::subxt::utils::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 2)] + #[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 deposit has been slashaed."] + DepositSlashed { + who: ::subxt::utils::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 4)] + #[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, + }, + } + } + 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 { use super::runtime_types; pub mod pallet { @@ -37631,6 +43526,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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."] @@ -37671,10 +43567,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<( @@ -37686,10 +43578,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, @@ -37708,6 +43596,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -37735,6 +43624,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 = "Events type."] @@ -37786,6 +43676,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Scheduled<_0, _1, _2, _3, _4> { @@ -37809,6 +43700,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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."] @@ -37820,14 +43712,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>, @@ -37842,13 +43729,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( @@ -37858,6 +43741,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 = "Error for the session pallet."] @@ -37885,6 +43769,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -37911,6 +43796,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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."] @@ -37924,15 +43810,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, ()>, @@ -37954,10 +43838,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, @@ -37973,8 +43856,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."] @@ -37998,10 +43881,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, }, @@ -38021,11 +43903,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, ()>, @@ -38038,11 +43919,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."] @@ -38051,16 +43931,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, @@ -38073,16 +43949,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, ()>, @@ -38092,10 +43963,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, @@ -38106,9 +43975,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, @@ -38119,9 +43987,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, }, @@ -38136,11 +44003,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"] @@ -38154,11 +44019,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)."] @@ -38189,7 +44052,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 { @@ -38206,18 +44069,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, @@ -38227,11 +44080,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, @@ -38350,6 +44201,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, @@ -38358,6 +44217,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 ConfigOp<_0> { @@ -38375,6 +44235,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -38466,6 +44327,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -38485,21 +44347,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,"] @@ -38508,43 +44378,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, + }, } } } @@ -38557,6 +44432,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SlashingSpans { @@ -38572,6 +44448,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SpanRecord<_0> { @@ -38586,6 +44463,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ActiveEraInfo { @@ -38599,6 +44477,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct EraRewardPoints<_0> { @@ -38612,6 +44491,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Exposure<_0, _1> { @@ -38629,6 +44509,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 Forcing { @@ -38648,6 +44529,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct IndividualExposure<_0, _1> { @@ -38662,10 +44544,11 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[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, @@ -38678,41 +44561,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] - #[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> { @@ -38734,6 +44583,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct StakingLedger { @@ -38742,10 +44592,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, >, } @@ -38756,6 +44606,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct UnappliedSlash<_0, _1> { @@ -38772,6 +44623,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct UnlockChunk<_0> { @@ -38787,6 +44639,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ValidatorPrefs { @@ -38806,6 +44659,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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."] @@ -38821,12 +44675,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, @@ -38845,6 +44698,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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."] @@ -38863,12 +44717,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, ()>, @@ -38887,12 +44738,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."] @@ -38908,15 +44756,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, ()>, @@ -38938,16 +44783,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)] @@ -38963,13 +44805,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."] @@ -38980,10 +44819,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( @@ -38993,6 +44830,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -39023,6 +44861,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -39059,6 +44898,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct OpenTip<_0, _1, _2, _3> { @@ -39082,6 +44922,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -39096,6 +44937,55 @@ pub mod api { }, } } + 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 FeeDetails<_0> { + pub inclusion_fee: ::core::option::Option< + runtime_types::pallet_transaction_payment::types::InclusionFee<_0>, + >, + pub tip: _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 InclusionFee<_0> { + pub base_fee: _0, + pub len_fee: _0, + pub adjusted_weight_fee: _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 RuntimeDispatchInfo<_0, _1> { + pub weight: _1, + pub class: runtime_types::frame_support::dispatch::DispatchClass, + pub partial_fee: _0, + } + } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -39103,6 +44993,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ChargeTransactionPayment(#[codec(compact)] pub ::core::primitive::u128); @@ -39113,6 +45004,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 { @@ -39133,6 +45025,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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."] @@ -39142,11 +45035,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, @@ -39157,11 +45047,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, @@ -39172,11 +45059,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, @@ -39202,10 +45086,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,"] @@ -39223,6 +45105,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 = "Error for the treasury pallet."] @@ -39251,6 +45134,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -39298,6 +45182,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( @@ -39307,6 +45197,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Proposal<_0, _1> { @@ -39327,6 +45218,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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."] @@ -39342,9 +45234,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"] @@ -39384,9 +45275,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, }, @@ -39395,12 +45285,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, @@ -39417,12 +45303,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, @@ -39431,6 +45327,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -39446,6 +45343,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -39491,6 +45389,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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."] @@ -39503,12 +45402,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."] @@ -39520,12 +45415,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, ()>, }, @@ -39541,12 +45432,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< @@ -39567,12 +45454,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, ()>, @@ -39615,6 +45498,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 = "Error for the vesting pallet."] @@ -39643,6 +45527,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -39670,6 +45555,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct VestingInfo<_0, _1> { @@ -39685,6 +45571,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 { @@ -39694,6 +45581,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 { @@ -39705,6 +45680,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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."] @@ -39773,7 +45749,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"] @@ -39784,7 +45760,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)] @@ -39838,7 +45814,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."] @@ -39863,7 +45839,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( @@ -39873,6 +45849,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -39919,6 +45896,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, @@ -39927,6 +45925,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -39935,15 +45934,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"] @@ -39952,7 +45951,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)] @@ -39960,7 +45959,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."] @@ -40012,10 +46011,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)] @@ -40029,7 +46028,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)] @@ -40043,16 +46042,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"] @@ -40060,7 +46062,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)] @@ -40069,9 +46071,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"] @@ -40083,12 +46085,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, ), } @@ -40099,13 +46162,14 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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)] - 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, @@ -40114,12 +46178,15 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 QueryStatus<_0> { #[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, @@ -40142,6 +46209,23 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -40167,6 +46251,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct CandidateHash(pub ::subxt::utils::H256); @@ -40177,6 +46262,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct InboundDownwardMessage<_0> { @@ -40190,6 +46276,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct InboundHrmpMessage<_0> { @@ -40203,6 +46290,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct OutboundHrmpMessage<_0> { @@ -40221,6 +46309,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct HeadData(pub ::std::vec::Vec<::core::primitive::u8>); @@ -40231,6 +46320,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct HrmpChannelId { @@ -40245,6 +46335,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Id(pub ::core::primitive::u32); @@ -40255,6 +46346,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ValidationCode(pub ::std::vec::Vec<::core::primitive::u8>); @@ -40265,6 +46357,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ValidationCodeHash(pub ::subxt::utils::H256); @@ -40272,7 +46365,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; @@ -40283,6 +46376,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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::sr25519::Public); @@ -40296,6 +46390,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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::sr25519::Public); @@ -40306,10 +46401,61 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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::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( @@ -40319,13 +46465,14 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[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>, } @@ -40339,6 +46486,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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::sr25519::Public); @@ -40349,6 +46497,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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::sr25519::Signature); @@ -40360,6 +46509,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct AvailabilityBitfield( @@ -40375,13 +46525,14 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[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, @@ -40395,15 +46546,20 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[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, >, @@ -40418,16 +46574,17 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] 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, @@ -40439,10 +46596,43 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 CandidateEvent<_0> { + #[codec(index = 0)] + CandidateBacked( + runtime_types::polkadot_primitives::v4::CandidateReceipt<_0>, + runtime_types::polkadot_parachain::primitives::HeadData, + runtime_types::polkadot_primitives::v4::CoreIndex, + runtime_types::polkadot_primitives::v4::GroupIndex, + ), + #[codec(index = 1)] + CandidateIncluded( + runtime_types::polkadot_primitives::v4::CandidateReceipt<_0>, + runtime_types::polkadot_parachain::primitives::HeadData, + runtime_types::polkadot_primitives::v4::CoreIndex, + runtime_types::polkadot_primitives::v4::GroupIndex, + ), + #[codec(index = 2)] + CandidateTimedOut( + runtime_types::polkadot_primitives::v4::CandidateReceipt<_0>, + runtime_types::polkadot_parachain::primitives::HeadData, + runtime_types::polkadot_primitives::v4::CoreIndex, + ), + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] #[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( @@ -40452,11 +46642,12 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[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, >, } @@ -40468,6 +46659,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct CoreIndex(pub ::core::primitive::u32); @@ -40478,11 +46670,12 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 CoreOccupied { #[codec(index = 0)] - Parathread(runtime_types::polkadot_primitives::v2::ParathreadEntry), + Parathread(runtime_types::polkadot_primitives::v4::ParathreadEntry), #[codec(index = 1)] Parachain, } @@ -40493,6 +46686,25 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 CoreState<_0, _1> { + #[codec(index = 0)] + Occupied(runtime_types::polkadot_primitives::v4::OccupiedCore<_0, _1>), + #[codec(index = 1)] + Scheduled(runtime_types::polkadot_primitives::v4::ScheduledCore), + #[codec(index = 2)] + Free, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct DisputeState<_0> { @@ -40514,13 +46726,14 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 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, @@ -40529,15 +46742,16 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct DisputeStatementSet { 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( @@ -40548,6 +46762,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct GroupIndex(pub ::core::primitive::u32); @@ -40558,6 +46773,22 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct GroupRotationInfo<_0> { + pub session_start_block: _0, + pub group_rotation_frequency: _0, + pub now: _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 IndexedVec<_0, _1>( @@ -40571,22 +46802,23 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[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, } @@ -40597,6 +46829,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 InvalidDisputeStatementKind { @@ -40610,11 +46843,58 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct OccupiedCore<_0, _1> { + pub next_up_on_available: ::core::option::Option< + runtime_types::polkadot_primitives::v4::ScheduledCore, + >, + pub occupied_since: _1, + pub time_out_at: _1, + pub next_up_on_time_out: ::core::option::Option< + runtime_types::polkadot_primitives::v4::ScheduledCore, + >, + pub availability: ::subxt::utils::bits::DecodedBits< + ::core::primitive::u8, + ::subxt::utils::bits::Lsb0, + >, + pub group_responsible: runtime_types::polkadot_primitives::v4::GroupIndex, + pub candidate_hash: runtime_types::polkadot_core_primitives::CandidateHash, + pub candidate_descriptor: + runtime_types::polkadot_primitives::v4::CandidateDescriptor<_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 OccupiedCoreAssumption { + #[codec(index = 0)] + Included, + #[codec(index = 1)] + TimedOut, + #[codec(index = 2)] + Free, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[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, @@ -40623,10 +46903,11 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[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( @@ -40636,13 +46917,46 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct PersistedValidationData<_0, _1> { + pub parent_head: runtime_types::polkadot_parachain::primitives::HeadData, + pub relay_parent_number: _1, + pub relay_parent_storage_root: _0, + pub max_pov_size: _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 struct PvfCheckStatement { pub accept: ::core::primitive::bool, pub subject: runtime_types::polkadot_parachain::primitives::ValidationCodeHash, pub session_index: ::core::primitive::u32, - pub validator_index: runtime_types::polkadot_primitives::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, @@ -40651,19 +46965,52 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ScheduledCore { + pub para_id: runtime_types::polkadot_parachain::primitives::Id, + pub collator: ::core::option::Option< + runtime_types::polkadot_primitives::v4::collator_app::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 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( @@ -40673,25 +47020,26 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[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, @@ -40707,6 +47055,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 UpgradeGoAhead { @@ -40722,6 +47071,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 UpgradeRestriction { @@ -40735,6 +47085,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 ValidDisputeStatementKind { @@ -40755,6 +47106,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ValidatorIndex(pub ::core::primitive::u32); @@ -40765,18 +47117,85 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 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, @@ -40784,6 +47203,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct NposCompactSolution16 { @@ -40949,28 +47369,11 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 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, @@ -40978,6 +47381,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 ProxyType { @@ -40995,6 +47399,8 @@ pub mod api { CancelProxy, #[codec(index = 7)] Auction, + #[codec(index = 8)] + NominationPools, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -41003,6 +47409,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Runtime; @@ -41013,6 +47420,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 RuntimeCall { @@ -41030,8 +47438,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)] @@ -41052,6 +47458,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)] @@ -41122,6 +47534,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 RuntimeEvent { @@ -41159,6 +47572,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)] @@ -41215,14 +47634,15 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[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, } } @@ -41239,6 +47659,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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."] @@ -41297,6 +47718,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -41330,6 +47752,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -41398,6 +47821,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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."] @@ -41528,6 +47952,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -41559,6 +47984,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -41580,6 +48006,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct EcdsaSignature(pub [::core::primitive::u8; 65usize]); @@ -41590,6 +48017,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct EthereumAddress(pub [::core::primitive::u8; 20usize]); @@ -41600,6 +48028,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct PrevalidateAttests; @@ -41610,6 +48039,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 StatementKind { @@ -41630,6 +48060,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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."] @@ -41753,6 +48184,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -41834,6 +48266,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -41908,6 +48341,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct FundInfo<_0, _1, _2, _3> { @@ -41932,6 +48366,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 LastContribution<_0> { @@ -41954,6 +48389,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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."] @@ -42073,6 +48509,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -42128,6 +48565,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -42155,6 +48593,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ParaInfo<_0, _1> { @@ -42174,6 +48613,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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."] @@ -42216,6 +48656,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -42234,6 +48675,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -42272,162 +48714,12 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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 = "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, @@ -42435,6 +48727,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -42451,6 +48744,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct HostConfiguration<_0> { @@ -42463,6 +48757,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, @@ -42475,6 +48771,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, @@ -42486,8 +48784,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, @@ -42510,6 +48806,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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."] @@ -42524,6 +48821,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -42544,11 +48842,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, @@ -42557,6 +48861,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -42575,10 +48880,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"] @@ -42593,6 +48894,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 DisputeLocation { @@ -42608,6 +48910,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 DisputeResult { @@ -42628,6 +48931,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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."] @@ -42645,6 +48949,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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."] @@ -42745,6 +49050,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -42814,6 +49120,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -42864,6 +49171,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct HrmpChannel { @@ -42883,6 +49191,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct HrmpOpenChannelRequest { @@ -42905,6 +49214,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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."] @@ -42916,6 +49226,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -43018,6 +49329,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -43025,31 +49337,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, ), } } @@ -43060,10 +49372,11 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[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( @@ -43073,12 +49386,13 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[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, @@ -43089,7 +49403,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 { @@ -43103,6 +49417,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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."] @@ -43121,14 +49436,15 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[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, } @@ -43144,6 +49460,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 { @@ -43163,6 +49480,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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."] @@ -43231,9 +49549,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( @@ -43243,6 +49561,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -43295,6 +49614,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -43347,6 +49667,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ParaGenesisArgs { @@ -43362,6 +49683,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 ParaLifecycle { @@ -43387,6 +49709,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ParaPastCodeMeta<_0> { @@ -43402,6 +49725,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct PvfCheckActiveVoteState<_0> { @@ -43426,6 +49750,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 PvfCheckCause<_0> { @@ -43444,6 +49769,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ReplacementTimes<_0> { @@ -43462,6 +49788,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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."] @@ -43469,7 +49796,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, @@ -43484,6 +49811,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -43519,6 +49847,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 AssignmentKind { @@ -43526,7 +49855,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, ), } @@ -43537,13 +49866,14 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[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, @@ -43552,6 +49882,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ParathreadClaimQueue { @@ -43567,10 +49898,11 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[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, } } @@ -43585,6 +49917,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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."] @@ -43602,6 +49935,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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."] @@ -43631,6 +49965,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -43649,6 +49984,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, 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"] @@ -43666,7 +50002,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."] @@ -43714,6 +50050,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, @@ -43722,6 +50069,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct FixedU128(pub ::core::primitive::u128); @@ -43736,6 +50084,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct PerU16(pub ::core::primitive::u16); @@ -43747,6 +50096,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Perbill(pub ::core::primitive::u32); @@ -43758,6 +50108,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Percent(pub ::core::primitive::u8); @@ -43769,10 +50120,29 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[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; @@ -43785,6 +50155,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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::sr25519::Public); @@ -43801,6 +50172,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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::sr25519::Public); @@ -43814,6 +50186,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 NextConfigDescriptor { @@ -43830,6 +50203,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 PreDigest { @@ -43849,6 +50223,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct PrimaryPreDigest { @@ -43864,6 +50239,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SecondaryPlainPreDigest { @@ -43877,6 +50253,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SecondaryVRFPreDigest { @@ -43893,6 +50270,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 AllowedSlots { @@ -43910,12 +50288,266 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct BabeConfiguration { + pub slot_duration: ::core::primitive::u64, + pub epoch_length: ::core::primitive::u64, + pub c: (::core::primitive::u64, ::core::primitive::u64), + pub authorities: ::std::vec::Vec<( + runtime_types::sp_consensus_babe::app::Public, + ::core::primitive::u64, + )>, + pub randomness: [::core::primitive::u8; 32usize], + pub allowed_slots: runtime_types::sp_consensus_babe::AllowedSlots, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct BabeEpochConfiguration { pub c: (::core::primitive::u64, ::core::primitive::u64), pub allowed_slots: runtime_types::sp_consensus_babe::AllowedSlots, } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Epoch { + pub epoch_index: ::core::primitive::u64, + pub start_slot: runtime_types::sp_consensus_slots::Slot, + pub duration: ::core::primitive::u64, + pub authorities: ::std::vec::Vec<( + runtime_types::sp_consensus_babe::app::Public, + ::core::primitive::u64, + )>, + pub randomness: [::core::primitive::u8; 32usize], + pub config: runtime_types::sp_consensus_babe::BabeEpochConfiguration, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct OpaqueKeyOwnershipProof(pub ::std::vec::Vec<::core::primitive::u8>); + } + pub mod sp_consensus_beefy { + use super::runtime_types; + pub mod commitment { + 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 Commitment<_0> { + pub payload: runtime_types::sp_consensus_beefy::payload::Payload, + pub block_number: _0, + pub validator_set_id: ::core::primitive::u64, + } + } + pub mod crypto { + 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::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 struct Signature(pub runtime_types::sp_core::ecdsa::Signature); + } + pub mod payload { + 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 Payload( + pub ::std::vec::Vec<( + [::core::primitive::u8; 2usize], + ::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 EquivocationProof<_0, _1, _2> { + pub first: runtime_types::sp_consensus_beefy::VoteMessage<_0, _1, _2>, + pub second: runtime_types::sp_consensus_beefy::VoteMessage<_0, _1, _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 OpaqueKeyOwnershipProof(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 ValidatorSet<_0> { + pub validators: ::std::vec::Vec<_0>, + pub id: ::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 VoteMessage<_0, _1, _2> { + pub commitment: runtime_types::sp_consensus_beefy::commitment::Commitment<_0>, + pub id: _1, + pub signature: _2, + } + } + 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>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct OpaqueKeyOwnershipProof(pub ::std::vec::Vec<::core::primitive::u8>); } pub mod sp_consensus_slots { use super::runtime_types; @@ -43926,6 +50558,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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> { @@ -43942,54 +50575,13 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Slot(pub ::core::primitive::u64); } 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, - )] - #[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, - )] - #[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, - )] - #[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( @@ -43999,6 +50591,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct KeyTypeId(pub [::core::primitive::u8; 4usize]); @@ -44012,6 +50605,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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; 33usize]); @@ -44022,6 +50616,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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; 65usize]); @@ -44035,6 +50630,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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]); @@ -44045,6 +50641,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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]); @@ -44058,6 +50655,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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>); @@ -44068,6 +50666,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -44085,6 +50684,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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]); @@ -44095,6 +50695,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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]); @@ -44106,6 +50707,18 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct OpaqueMetadata(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 OpaquePeerId(pub ::std::vec::Vec<::core::primitive::u8>); @@ -44116,34 +50729,27 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 { + pub mod sp_inherents { 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, - )] - #[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, - )] - #[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 struct CheckInherentsResult { + pub okay: ::core::primitive::bool, + pub fatal_error: ::core::primitive::bool, + pub errors: runtime_types::sp_inherents::InherentData, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -44152,25 +50758,60 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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> { + pub struct InherentData { + pub data: ::subxt::utils::KeyedVec< + [::core::primitive::u8; 8usize], + ::std::vec::Vec<::core::primitive::u8>, + >, + } + } + pub mod sp_mmr_primitives { + 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 EncodableOpaqueLeaf(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 Error { #[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, - >, - ), + InvalidNumericOp, #[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, - >, - ), + Push, + #[codec(index = 2)] + GetRoot, + #[codec(index = 3)] + Commit, + #[codec(index = 4)] + GenerateProof, + #[codec(index = 5)] + Verify, + #[codec(index = 6)] + LeafNotFound, + #[codec(index = 7)] + PalletNotIncluded, + #[codec(index = 8)] + InvalidLeafIndex, + #[codec(index = 9)] + InvalidBestKnownBlock, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -44179,11 +50820,13 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 struct Proof<_0> { + pub leaf_indices: ::std::vec::Vec<::core::primitive::u64>, + pub leaf_count: ::core::primitive::u64, + pub items: ::std::vec::Vec<_0>, } } pub mod sp_npos_elections { @@ -44195,6 +50838,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ElectionScore { @@ -44209,6 +50853,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Support<_0> { @@ -44220,6 +50865,23 @@ pub mod api { use super::runtime_types; pub mod generic { use super::runtime_types; + pub mod block { + 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 Block<_0, _1> { + pub header: _0, + pub extrinsics: ::std::vec::Vec<_1>, + } + } pub mod digest { use super::runtime_types; #[derive( @@ -44229,6 +50891,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Digest { @@ -44242,6 +50905,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 DigestItem { @@ -44275,6 +50939,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 Era { @@ -44801,6 +51466,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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> { @@ -44823,6 +51489,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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>( @@ -44840,26 +51507,116 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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, - )] - #[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 transaction_validity { + 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 InvalidTransaction { + #[codec(index = 0)] + Call, + #[codec(index = 1)] + Payment, + #[codec(index = 2)] + Future, + #[codec(index = 3)] + Stale, + #[codec(index = 4)] + BadProof, + #[codec(index = 5)] + AncientBirthBlock, + #[codec(index = 6)] + ExhaustsResources, + #[codec(index = 7)] + Custom(::core::primitive::u8), + #[codec(index = 8)] + BadMandatory, + #[codec(index = 9)] + MandatoryValidation, + #[codec(index = 10)] + BadSigner, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [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 TransactionSource { + #[codec(index = 0)] + InBlock, + #[codec(index = 1)] + Local, + #[codec(index = 2)] + External, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [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 TransactionValidityError { + #[codec(index = 0)] + Invalid(runtime_types::sp_runtime::transaction_validity::InvalidTransaction), + #[codec(index = 1)] + Unknown(runtime_types::sp_runtime::transaction_validity::UnknownTransaction), + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [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 UnknownTransaction { + #[codec(index = 0)] + CannotLookup, + #[codec(index = 1)] + NoUnsignedValidator, + #[codec(index = 2)] + Custom(::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 ValidTransaction { + pub priority: ::core::primitive::u64, + pub requires: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, + pub provides: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, + pub longevity: ::core::primitive::u64, + pub propagate: ::core::primitive::bool, + } } #[derive( :: subxt :: ext :: codec :: Decode, @@ -44868,6 +51625,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 { @@ -44888,7 +51646,7 @@ pub mod api { #[codec(index = 7)] Token(runtime_types::sp_runtime::TokenError), #[codec(index = 8)] - Arithmetic(runtime_types::sp_runtime::ArithmeticError), + Arithmetic(runtime_types::sp_arithmetic::ArithmeticError), #[codec(index = 9)] Transactional(runtime_types::sp_runtime::TransactionalError), #[codec(index = 10)] @@ -44905,6 +51663,21 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -44918,6 +51691,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 { @@ -44935,6 +51709,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 { @@ -44952,13 +51727,14 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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, + FundsUnavailable, #[codec(index = 1)] - WouldDie, + OnlyProvider, #[codec(index = 2)] BelowMinimum, #[codec(index = 3)] @@ -44969,6 +51745,10 @@ pub mod api { Frozen, #[codec(index = 6)] Unsupported, + #[codec(index = 7)] + CannotCreateHold, + #[codec(index = 8)] + NotExpendable, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -44977,6 +51757,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 { @@ -44995,6 +51776,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -45014,6 +51796,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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> { @@ -45031,6 +51814,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -45056,6 +51840,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -45065,17 +51850,6 @@ pub mod api { pub proof_size: ::core::primitive::u64, } } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[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, @@ -45083,6 +51857,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 { @@ -45101,13 +51876,14 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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 v0 { + pub mod v2 { use super::runtime_types; pub mod junction { use super::runtime_types; @@ -45118,27 +51894,90 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [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 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 BodyId { + pub enum AssetInstance { #[codec(index = 0)] - Unit, + Undefined, #[codec(index = 1)] - Named( - runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec< - ::core::primitive::u8, - >, - ), + Index(#[codec(compact)] ::core::primitive::u128), #[codec(index = 2)] - Index(#[codec(compact)] ::core::primitive::u32), + Array4([::core::primitive::u8; 4usize]), #[codec(index = 3)] - Executive, + Array8([::core::primitive::u8; 8usize]), #[codec(index = 4)] - Technical, + Array16([::core::primitive::u8; 16usize]), #[codec(index = 5)] - Legislative, + Array32([::core::primitive::u8; 32usize]), #[codec(index = 6)] - Judicial, + Blob(::std::vec::Vec<::core::primitive::u8>), } #[derive( :: subxt :: ext :: codec :: Decode, @@ -45147,38 +51986,96 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 { + pub enum Fungibility { #[codec(index = 0)] - Voice, + Fungible(#[codec(compact)] ::core::primitive::u128), #[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, + 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, @@ -45186,46 +52083,70 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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)] - Parent, + Here, #[codec(index = 1)] - Parachain(#[codec(compact)] ::core::primitive::u32), + X1(runtime_types::xcm::v2::junction::Junction), #[codec(index = 2)] - AccountId32 { - network: runtime_types::xcm::v0::junction::NetworkId, - id: [::core::primitive::u8; 32usize], - }, + X2( + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + ), #[codec(index = 3)] - AccountIndex64 { - network: runtime_types::xcm::v0::junction::NetworkId, - #[codec(compact)] - index: ::core::primitive::u64, - }, + X3( + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + ), #[codec(index = 4)] - AccountKey20 { - network: runtime_types::xcm::v0::junction::NetworkId, - key: [::core::primitive::u8; 20usize], - }, + 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)] - PalletInstance(::core::primitive::u8), + 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)] - GeneralIndex(#[codec(compact)] ::core::primitive::u128), + 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)] - GeneralKey( - runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec< - ::core::primitive::u8, - >, + 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)] - OnlyChild, - #[codec(index = 9)] - Plurality { - id: runtime_types::xcm::v0::junction::BodyId, - part: runtime_types::xcm::v0::junction::BodyPart, - }, + 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, @@ -45234,24 +52155,406 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 { + 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)] - Any, + Overflow, #[codec(index = 1)] - Named( - runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec< - ::core::primitive::u8, - >, - ), + Unimplemented, #[codec(index = 2)] - Polkadot, + UntrustedReserveLocation, #[codec(index = 3)] - Kusama, + 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, } } - pub mod multi_asset { + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [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)] + 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, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [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::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, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [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)] + 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 :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [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 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 v3 { + use super::runtime_types; + pub mod junction { use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, @@ -45260,59 +52563,71 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 { + pub enum BodyId { #[codec(index = 0)] - None, + Unit, #[codec(index = 1)] - All, + Moniker([::core::primitive::u8; 4usize]), #[codec(index = 2)] - AllFungible, + Index(#[codec(compact)] ::core::primitive::u32), #[codec(index = 3)] - AllNonFungible, + Executive, #[codec(index = 4)] - AllAbstractFungible { - id: ::std::vec::Vec<::core::primitive::u8>, - }, + Technical, #[codec(index = 5)] - AllAbstractNonFungible { - class: ::std::vec::Vec<::core::primitive::u8>, - }, + Legislative, #[codec(index = 6)] - AllConcreteFungible { - id: runtime_types::xcm::v0::multi_location::MultiLocation, - }, + Judicial, #[codec(index = 7)] - AllConcreteNonFungible { - class: runtime_types::xcm::v0::multi_location::MultiLocation, - }, + Defense, #[codec(index = 8)] - AbstractFungible { - id: ::std::vec::Vec<::core::primitive::u8>, + 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)] - amount: ::core::primitive::u128, + count: ::core::primitive::u32, }, - #[codec(index = 9)] - AbstractNonFungible { - class: ::std::vec::Vec<::core::primitive::u8>, - instance: runtime_types::xcm::v1::multiasset::AssetInstance, + #[codec(index = 2)] + Fraction { + #[codec(compact)] + nom: ::core::primitive::u32, + #[codec(compact)] + 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, @@ -45320,73 +52635,50 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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, @@ -45394,175 +52686,39 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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, - )] - #[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, - )] - #[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, - )] - #[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, @@ -45571,44 +52727,70 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 { @@ -45620,13 +52802,14 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 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, @@ -45635,6 +52818,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 { @@ -45650,8 +52834,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, @@ -45660,13 +52842,14 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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::v1::multiasset::AssetInstance), + NonFungible(runtime_types::xcm::v3::multiasset::AssetInstance), } #[derive( :: subxt :: ext :: codec :: Decode, @@ -45675,11 +52858,12 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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::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, @@ -45688,13 +52872,14 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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::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, @@ -45703,10 +52888,11 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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, + pub ::std::vec::Vec, ); #[derive( :: subxt :: ext :: codec :: Decode, @@ -45715,6 +52901,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 { @@ -45730,6 +52917,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 { @@ -45737,8 +52925,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, }, } } @@ -45751,249 +52948,14 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] - #[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, - )] - #[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, - )] - #[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, - )] - #[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( @@ -46003,6 +52965,7 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 { @@ -46015,9 +52978,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)] @@ -46051,13 +53014,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, @@ -46066,18 +53057,19 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 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( @@ -46087,39 +53079,41 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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::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)] @@ -46148,73 +53142,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), @@ -46222,11 +53203,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, @@ -46235,22 +53367,31 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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)] 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, @@ -46259,13 +53400,14 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 WeightLimit { #[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, @@ -46274,9 +53416,24 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [codec (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, @@ -46285,13 +53442,14 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 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, @@ -46300,13 +53458,14 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 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, @@ -46315,15 +53474,14 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 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, @@ -46332,15 +53490,14 @@ pub mod api { :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + # [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 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), } } } From 78fafe6ac135e32556f625108f712944ed576336 Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Tue, 18 Apr 2023 16:44:23 +0300 Subject: [PATCH 16/66] codegen: Fetch V15 using the new API Signed-off-by: Alexandru Vasile --- codegen/src/utils/fetch_metadata.rs | 81 ++++++++++++++++++++++++----- 1 file changed, 69 insertions(+), 12 deletions(-) diff --git a/codegen/src/utils/fetch_metadata.rs b/codegen/src/utils/fetch_metadata.rs index c7bc489827..2f0a385e99 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}, @@ -33,14 +34,7 @@ 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() { + let bytes = match url.scheme_str() { Some("http") | Some("https") => fetch_metadata_http(url).await, Some("ws") | Some("wss") => fetch_metadata_ws(url).await, invalid_scheme => { @@ -48,10 +42,73 @@ pub async fn fetch_metadata_hex(url: &Uri) -> Result 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) -> Result { + let bytes = fetch_metadata_bytes(url).await?; + let hex_data = format!("0x{}", hex::encode(bytes)); Ok(hex_data) } +enum ClientType { + WebSocket(jsonrpsee::async_client::Client), + Http(jsonrpsee::http_client::HttpClient), +} + +impl ClientType { + fn request<'life0, 'life1, 'async_trait, R, Params>( + &'life0 self, + method: &'life1 str, + params: Params, + ) -> core::pin::Pin< + Box< + dyn core::future::Future> + core::marker::Send + 'async_trait, + >, + > + where + R: jsonrpsee::core::DeserializeOwned, + Params: jsonrpsee::core::traits::ToRpcParams + Send, + R: 'async_trait, + Params: 'async_trait, + 'life0: 'async_trait, + 'life1: 'async_trait, + Self: 'async_trait, + { + match self { + ClientType::WebSocket(client) => client.request(method, params), + ClientType::Http(client) => client.request(method, params), + } + } +} + +/// Execute runtime API call and return the specified runtime metadata version. +async fn fetch_latest_metadata(client: ClientType) -> Result, FetchMetadataError> { + const V15_METADATA_VERSION: u32 = u32::MAX; + let bytes = V15_METADATA_VERSION.encode(); + + // Runtime API arguments are scale encoded hex encoded. + let version: String = format!("0x{}", hex::encode(&bytes)); + + // Returns a hex(Option). + let raw: String = client + .request( + "state_call", + rpc_params!["Metadata_metadata_at_version", &version], + ) + .await?; + let raw_bytes = hex::decode(raw.trim_start_matches("0x"))?; + + let opaque: Option = Decode::decode(&mut &raw_bytes[..])?; + let bytes = opaque.ok_or(FetchMetadataError::Other( + "Metadata version not found".into(), + ))?; + + Ok(bytes.0) +} -async fn fetch_metadata_ws(url: &Uri) -> Result { +async fn fetch_metadata_ws(url: &Uri) -> Result, FetchMetadataError> { let (sender, receiver) = WsTransportClientBuilder::default() .build(url.to_string().parse::().unwrap()) .await @@ -62,13 +119,13 @@ 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_latest_metadata(ClientType::WebSocket(client)).await } -async fn fetch_metadata_http(url: &Uri) -> Result { +async fn fetch_metadata_http(url: &Uri) -> 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_latest_metadata(ClientType::Http(client)).await } From 561c16da37f1558655b5b7d8323451c587259dcb Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Tue, 18 Apr 2023 16:44:49 +0300 Subject: [PATCH 17/66] codegen: Add runtime API interface Signed-off-by: Alexandru Vasile --- codegen/src/api/mod.rs | 14 ++++ codegen/src/api/runtime_apis.rs | 128 ++++++++++++++++++++++++++++++++ codegen/src/error.rs | 7 ++ 3 files changed, 149 insertions(+) create mode 100644 codegen/src/api/runtime_apis.rs diff --git a/codegen/src/api/mod.rs b/codegen/src/api/mod.rs index 7f9beaaa58..fbd0002ef5 100644 --- a/codegen/src/api/mod.rs +++ b/codegen/src/api/mod.rs @@ -7,6 +7,7 @@ mod calls; mod constants; mod events; +mod runtime_apis; mod storage; use frame_metadata::v15::RuntimeMetadataV15; @@ -389,6 +390,13 @@ 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, + )?; + Ok(quote! { #( #item_mod_attrs )* #[allow(dead_code, unused_imports, non_camel_case_types)] @@ -432,6 +440,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..4b25dba194 --- /dev/null +++ b/codegen/src/api/runtime_apis.rs @@ -0,0 +1,128 @@ +// 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 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, + crate_path: &CratePath, +) -> 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; + + // Parameters are scale encoded into the `result` vector. + const ENCODED_PARAMS: &str = "result"; + let encoded_params = format_ident!("{}", ENCODED_PARAMS); + + let 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 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); + let encoded = quote!(#name.encode_to(&mut #encoded_params)); + (param, encoded) + }).collect(); + + let params = inputs.iter().map(|(param, _)| param); + let encoded = inputs.iter().map(|(_, encoded)| encoded); + + 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(), + )) + }; + + Ok(quote!( + #( #[doc = #docs ] )* + pub fn #method_name(&self, #( #params, )* ) -> #crate_path::runtime_api::StaticRuntimeApiPayload<#output> { + let mut #encoded_params = Vec::new(); + #( #encoded; )* + + #crate_path::runtime_api::StaticRuntimeApiPayload::new_static( + #runtime_fn_name, + #encoded_params, + [#(#call_hash,)*], + ) + } + )) + }).collect::>()?; + + let trait_name = format_ident!("{}", trait_name); + // The structure that identifies the `TraitName` of the runtime call. + let runtime_api = quote!( + #( #[doc = #docs ] )* + pub struct #trait_name; + + impl #trait_name { + #( #methods )* + } + ); + + // A getter for the `RuntimeApi` to get the trait structure. + let trait_getter = quote!( + pub fn #trait_name_snake(&self) -> #trait_name { + #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, +) -> Result { + let apis = &metadata.apis; + + let runtime_fns: Vec<_> = apis + .iter() + .map(|api| generate_runtime_api(metadata, api, type_gen, crate_path)) + .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. From d7141ec7bb3eba6fc17f64959fe73ada246d03de Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Tue, 18 Apr 2023 16:45:55 +0300 Subject: [PATCH 18/66] metadata: Hash runtime API metadata for validation Signed-off-by: Alexandru Vasile --- metadata/src/lib.rs | 2 +- metadata/src/validation.rs | 131 +++++++++++++++++++++++++++++++++++-- 2 files changed, 125 insertions(+), 8 deletions(-) diff --git a/metadata/src/lib.rs b/metadata/src/lib.rs index c173f7e4f7..e6dd6f677f 100644 --- a/metadata/src/lib.rs +++ b/metadata/src/lib.rs @@ -12,7 +12,7 @@ use frame_metadata::{ 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, }; /// Latest runtime metadata version supported by subxt. diff --git a/metadata/src/validation.rs b/metadata/src/validation.rs index cd5bd9a271..ebf2d8c270 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; @@ -243,7 +244,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)?; @@ -267,7 +268,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 @@ -290,7 +291,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; @@ -311,6 +312,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, @@ -390,6 +481,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) } @@ -436,11 +540,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, } From d7652e5417d54a57bbf5fd29fed759856cf08677 Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Tue, 18 Apr 2023 16:47:01 +0300 Subject: [PATCH 19/66] metadata: Extract runtime API metadata wrapper from subxt::Metadata Signed-off-by: Alexandru Vasile --- subxt/src/metadata/metadata_type.rs | 119 +++++++++++++++++++++++++++- 1 file changed, 116 insertions(+), 3 deletions(-) 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(), }), }) } From 21741d8ff465977b942bc3c4a2b93deeef3268d7 Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Tue, 18 Apr 2023 16:47:32 +0300 Subject: [PATCH 20/66] subxt: Adjust hashing cache to reflect root+item keys Signed-off-by: Alexandru Vasile --- subxt/src/metadata/hash_cache.rs | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) 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() ); From bff5b7c230923a3aa1d85bc510cd2c1de3f95ee4 Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Tue, 18 Apr 2023 16:48:05 +0300 Subject: [PATCH 21/66] rpc: Add raw state_call API method Signed-off-by: Alexandru Vasile --- subxt/src/rpc/rpc.rs | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/subxt/src/rpc/rpc.rs b/subxt/src/rpc/rpc.rs index 099890f009..86595c6e42 100644 --- a/subxt/src/rpc/rpc.rs +++ b/subxt/src/rpc/rpc.rs @@ -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,6 +362,17 @@ 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) From 2546520d555896536c21e6b3cac88f62344e28a4 Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Tue, 18 Apr 2023 16:48:23 +0300 Subject: [PATCH 22/66] runtime_api: Add payload with static and dynamic variants Signed-off-by: Alexandru Vasile --- subxt/src/runtime_api/runtime_payload.rs | 185 +++++++++++++++++++++++ 1 file changed, 185 insertions(+) create mode 100644 subxt/src/runtime_api/runtime_payload.rs diff --git a/subxt/src/runtime_api/runtime_payload.rs b/subxt/src/runtime_api/runtime_payload.rs new file mode 100644 index 0000000000..53c03e9488 --- /dev/null +++ b/subxt/src/runtime_api/runtime_payload.rs @@ -0,0 +1,185 @@ +// 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 codec::Decode; +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 target type of the return value. + // Note: `DecodeWithMetadata` bound implied by the `encode_as_fields_to`. + type ReturnType: DecodeWithMetadata; + + /// The runtime API function name. + fn fn_name(&self) -> &str; + + /// Scale encode arguments data to the provided output. + 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 details needed to validate the runtime API call, which + /// include a statically generated validation hash. + fn validation_details(&self) -> Option { + None + } +} + +pub struct ValidationDetails { + /// A hash (this is generated at compile time in our codegen) + /// to compare against the runtime code. + pub hash: [u8; 32], +} + +/// 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 StaticRuntimeApiPayload { + type ReturnType = ReturnTy; + + fn fn_name(&self) -> &str { + &self.fn_name + } + + fn encode_args_to(&self, _metadata: &Metadata, out: &mut Vec) -> Result<(), Error> { + out.extend(self.args_data.clone()); + Ok(()) + } + + fn validation_details(&self) -> Option { + self.validation_hash.map(|hash| ValidationDetails { hash }) + } +} + +impl RuntimeApiPayload for DynamicRuntimeApiPayload { + type ReturnType = DecodedValueThunk; + + 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(()) + } +} + +/// A static runtime API payload. +/// +/// The payload already contains the scale-encoded argument bytes. +/// +/// This is only expected to be used from codegen. +pub type StaticRuntimeApiPayload = Payload, ReturnTy>; + +/// 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, + } + } + + /// 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 + } +} + +impl StaticRuntimeApiPayload { + /// Create a new [`StaticRuntimeApiPayload`] 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: Vec, hash: [u8; 32]) -> Self { + Self { + fn_name: Cow::Borrowed(fn_name), + args_data, + validation_hash: Some(hash), + _marker: std::marker::PhantomData, + } + } +} + +/// 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, + } +} From c1c8fd4efe7e1375d1884c9060fe0f52f7b62b49 Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Tue, 18 Apr 2023 16:48:51 +0300 Subject: [PATCH 23/66] subxt: Allow payloads to call into the runtime Signed-off-by: Alexandru Vasile --- subxt/src/dynamic.rs | 3 ++ subxt/src/runtime_api/mod.rs | 4 ++ subxt/src/runtime_api/runtime_types.rs | 57 +++++++++++++++++++++++++- 3 files changed, 63 insertions(+), 1 deletion(-) 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/runtime_api/mod.rs b/subxt/src/runtime_api/mod.rs index c499d1e3a2..3bf8765eb3 100644 --- a/subxt/src/runtime_api/mod.rs +++ b/subxt/src/runtime_api/mod.rs @@ -5,7 +5,11 @@ //! 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, StaticRuntimeApiPayload, +}; pub use runtime_types::RuntimeApi; diff --git a/subxt/src/runtime_api/runtime_types.rs b/subxt/src/runtime_api/runtime_types.rs index 7bcd3436b9..e54a084298 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(details) = payload.validation_details() { + let runtime_hash = metadata + .runtime_api_hash(fn_metadata.trait_name(), fn_metadata.method_name())?; + + if details.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) + } + } } From 0f8a86db8241fe22048a5caa79d7b6819bb1e216 Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Tue, 18 Apr 2023 16:49:37 +0300 Subject: [PATCH 24/66] examples: Add example to make a runtime API call both static and dynamic Signed-off-by: Alexandru Vasile --- examples/examples/runtime_calls.rs | 58 ++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 examples/examples/runtime_calls.rs diff --git a/examples/examples/runtime_calls.rs b/examples/examples/runtime_calls.rs new file mode 100644 index 0000000000..93310c550b --- /dev/null +++ b/examples/examples/runtime_calls.rs @@ -0,0 +1,58 @@ +// 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 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 call = polkadot::apis().core().version(); + + // Submit the runtime API call. + let version = api.runtime_api().at_latest().await?.call(call).await; + println!("Core_version: {:?}", version); + + // Show the supported metadata versions of the node. + // Calls into `Metadata_metadata_versions` runtime function. + let call = polkadot::apis().metadata().metadata_versions(); + + // Submit the runtime API call. + let versions = api.runtime_api().at_latest().await?.call(call).await?; + println!("Metadata_metadata_versions: {:?}", versions); + + // Dynamic calls. + let call = subxt::dynamic::runtime_api_call( + "Metadata_metadata_versions", + Vec::>::new(), + None, + ); + let versions = api.runtime_api().at_latest().await?.call(call).await?; + println!( + " dynamic Metadata_metadata_versions: {:#?}", + versions.to_value() + ); + + Ok(()) +} From d1229e73e7f0b390e1530a343a3a6a1abf51baf0 Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Tue, 18 Apr 2023 17:21:03 +0300 Subject: [PATCH 25/66] Update polkadot.rs Signed-off-by: Alexandru Vasile --- .../integration-tests/src/codegen/polkadot.rs | 402 +++++++++++++++--- 1 file changed, 335 insertions(+), 67 deletions(-) diff --git a/testing/integration-tests/src/codegen/polkadot.rs b/testing/integration-tests/src/codegen/polkadot.rs index 1a359631c0..f6040be195 100644 --- a/testing/integration-tests/src/codegen/polkadot.rs +++ b/testing/integration-tests/src/codegen/polkadot.rs @@ -584,7 +584,11 @@ pub mod api { ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "Core_version", result, - [0; 32], + [ + 209u8, 59u8, 156u8, 128u8, 14u8, 210u8, 96u8, 63u8, 140u8, 0u8, 65u8, + 211u8, 118u8, 177u8, 9u8, 208u8, 105u8, 124u8, 132u8, 203u8, 157u8, 207u8, + 186u8, 177u8, 91u8, 170u8, 22u8, 224u8, 88u8, 56u8, 56u8, 13u8, + ], ) } #[doc = " Execute the given block."] @@ -597,7 +601,11 @@ pub mod api { ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "Core_execute_block", result, - [0; 32], + [ + 199u8, 164u8, 96u8, 78u8, 188u8, 134u8, 19u8, 247u8, 63u8, 58u8, 93u8, + 227u8, 122u8, 157u8, 93u8, 196u8, 16u8, 7u8, 20u8, 17u8, 178u8, 152u8, + 211u8, 185u8, 56u8, 153u8, 118u8, 241u8, 118u8, 105u8, 85u8, 3u8, + ], ) } #[doc = " Initialize a block with the given header."] @@ -613,7 +621,11 @@ pub mod api { ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "Core_initialize_block", result, - [0; 32], + [ + 45u8, 232u8, 143u8, 132u8, 33u8, 211u8, 71u8, 186u8, 169u8, 91u8, 143u8, + 156u8, 174u8, 156u8, 10u8, 25u8, 203u8, 16u8, 208u8, 226u8, 12u8, 233u8, + 145u8, 228u8, 63u8, 118u8, 66u8, 247u8, 71u8, 48u8, 44u8, 243u8, + ], ) } } @@ -629,7 +641,11 @@ pub mod api { ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "Metadata_metadata", result, - [0; 32], + [ + 158u8, 223u8, 229u8, 177u8, 228u8, 49u8, 24u8, 219u8, 143u8, 82u8, 255u8, + 132u8, 245u8, 210u8, 160u8, 197u8, 218u8, 10u8, 63u8, 165u8, 115u8, 91u8, + 70u8, 151u8, 246u8, 51u8, 18u8, 235u8, 91u8, 143u8, 27u8, 127u8, + ], ) } #[doc = " Returns the metadata at a given version."] @@ -647,7 +663,11 @@ pub mod api { ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "Metadata_metadata_at_version", result, - [0; 32], + [ + 50u8, 164u8, 234u8, 88u8, 65u8, 62u8, 176u8, 66u8, 188u8, 114u8, 205u8, + 29u8, 137u8, 173u8, 194u8, 54u8, 237u8, 48u8, 221u8, 46u8, 166u8, 44u8, + 220u8, 137u8, 97u8, 128u8, 204u8, 137u8, 29u8, 229u8, 31u8, 134u8, + ], ) } #[doc = " Returns the supported metadata versions."] @@ -662,7 +682,11 @@ pub mod api { ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "Metadata_metadata_versions", result, - [0; 32], + [ + 255u8, 234u8, 86u8, 244u8, 238u8, 175u8, 175u8, 54u8, 181u8, 181u8, 23u8, + 185u8, 231u8, 242u8, 153u8, 246u8, 205u8, 142u8, 184u8, 21u8, 240u8, 217u8, + 195u8, 231u8, 32u8, 163u8, 127u8, 3u8, 51u8, 130u8, 68u8, 124u8, + ], ) } } @@ -687,7 +711,11 @@ pub mod api { ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "BlockBuilder_apply_extrinsic", result, - [0; 32], + [ + 151u8, 89u8, 106u8, 151u8, 95u8, 29u8, 10u8, 68u8, 85u8, 149u8, 144u8, + 132u8, 47u8, 46u8, 164u8, 91u8, 225u8, 219u8, 85u8, 120u8, 101u8, 105u8, + 45u8, 79u8, 171u8, 133u8, 121u8, 170u8, 197u8, 248u8, 24u8, 10u8, + ], ) } #[doc = " Finish the current block."] @@ -703,7 +731,11 @@ pub mod api { ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "BlockBuilder_finalize_block", result, - [0; 32], + [ + 78u8, 179u8, 67u8, 170u8, 213u8, 230u8, 122u8, 98u8, 76u8, 244u8, 225u8, + 219u8, 83u8, 115u8, 94u8, 229u8, 93u8, 142u8, 120u8, 172u8, 87u8, 99u8, + 120u8, 41u8, 143u8, 184u8, 71u8, 49u8, 126u8, 55u8, 240u8, 125u8, + ], ) } #[doc = " Generate inherent extrinsics. The inherent data will vary from chain to chain."] pub fn inherent_extrinsics (& self , inherent : runtime_types :: sp_inherents :: InherentData ,) -> :: subxt :: runtime_api :: StaticRuntimeApiPayload < :: std :: vec :: Vec < runtime_types :: sp_runtime :: generic :: unchecked_extrinsic :: UncheckedExtrinsic < :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , () > , runtime_types :: polkadot_runtime :: RuntimeCall , runtime_types :: sp_runtime :: MultiSignature , (runtime_types :: frame_system :: extensions :: check_non_zero_sender :: CheckNonZeroSender , runtime_types :: frame_system :: extensions :: check_spec_version :: CheckSpecVersion , runtime_types :: frame_system :: extensions :: check_tx_version :: CheckTxVersion , runtime_types :: frame_system :: extensions :: check_genesis :: CheckGenesis , runtime_types :: frame_system :: extensions :: check_mortality :: CheckMortality , runtime_types :: frame_system :: extensions :: check_nonce :: CheckNonce , runtime_types :: frame_system :: extensions :: check_weight :: CheckWeight , runtime_types :: pallet_transaction_payment :: ChargeTransactionPayment , runtime_types :: polkadot_runtime_common :: claims :: PrevalidateAttests ,) > > >{ @@ -712,7 +744,11 @@ pub mod api { ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "BlockBuilder_inherent_extrinsics", result, - [0; 32], + [ + 75u8, 86u8, 85u8, 104u8, 125u8, 169u8, 23u8, 92u8, 162u8, 73u8, 65u8, + 223u8, 100u8, 24u8, 201u8, 157u8, 145u8, 208u8, 238u8, 11u8, 255u8, 98u8, + 0u8, 211u8, 189u8, 94u8, 5u8, 123u8, 25u8, 1u8, 88u8, 234u8, + ], ) } #[doc = " Check that the inherents are valid. The inherent data will vary from chain to chain."] @@ -729,7 +765,11 @@ pub mod api { ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "BlockBuilder_check_inherents", result, - [0; 32], + [ + 162u8, 99u8, 46u8, 228u8, 124u8, 158u8, 224u8, 212u8, 90u8, 101u8, 133u8, + 173u8, 82u8, 61u8, 131u8, 131u8, 254u8, 209u8, 17u8, 181u8, 87u8, 190u8, + 80u8, 165u8, 172u8, 179u8, 121u8, 202u8, 126u8, 48u8, 254u8, 112u8, + ], ) } } @@ -747,7 +787,11 @@ pub mod api { ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "NominationPoolsApi_pending_rewards", result, - [0; 32], + [ + 235u8, 64u8, 57u8, 70u8, 111u8, 27u8, 62u8, 236u8, 36u8, 192u8, 103u8, + 89u8, 221u8, 194u8, 46u8, 223u8, 71u8, 249u8, 33u8, 135u8, 43u8, 42u8, + 147u8, 57u8, 130u8, 44u8, 35u8, 132u8, 163u8, 153u8, 201u8, 105u8, + ], ) } #[doc = " Returns the equivalent balance of `points` for a given pool."] @@ -763,7 +807,11 @@ pub mod api { ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "NominationPoolsApi_points_to_balance", result, - [0; 32], + [ + 30u8, 7u8, 5u8, 95u8, 146u8, 43u8, 110u8, 21u8, 148u8, 160u8, 74u8, 92u8, + 168u8, 188u8, 74u8, 41u8, 129u8, 172u8, 138u8, 30u8, 232u8, 214u8, 154u8, + 18u8, 52u8, 87u8, 71u8, 127u8, 141u8, 177u8, 216u8, 158u8, + ], ) } #[doc = " Returns the equivalent points of `new_funds` for a given pool."] @@ -779,7 +827,11 @@ pub mod api { ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "NominationPoolsApi_balance_to_points", result, - [0; 32], + [ + 152u8, 165u8, 227u8, 129u8, 31u8, 108u8, 224u8, 174u8, 74u8, 192u8, 102u8, + 139u8, 17u8, 119u8, 173u8, 220u8, 52u8, 157u8, 125u8, 107u8, 110u8, 236u8, + 9u8, 93u8, 239u8, 3u8, 18u8, 140u8, 203u8, 136u8, 183u8, 215u8, + ], ) } } @@ -795,7 +847,11 @@ pub mod api { ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "StakingApi_nominations_quota", result, - [0; 32], + [ + 181u8, 19u8, 6u8, 134u8, 234u8, 67u8, 127u8, 210u8, 53u8, 38u8, 175u8, + 160u8, 243u8, 71u8, 187u8, 206u8, 178u8, 91u8, 26u8, 115u8, 18u8, 214u8, + 50u8, 208u8, 161u8, 197u8, 81u8, 13u8, 98u8, 53u8, 124u8, 62u8, + ], ) } } @@ -829,7 +885,11 @@ pub mod api { ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "TaggedTransactionQueue_validate_transaction", result, - [0; 32], + [ + 93u8, 180u8, 253u8, 37u8, 212u8, 54u8, 180u8, 214u8, 33u8, 5u8, 113u8, + 181u8, 25u8, 48u8, 153u8, 221u8, 78u8, 6u8, 115u8, 191u8, 72u8, 75u8, + 203u8, 171u8, 129u8, 75u8, 56u8, 60u8, 243u8, 92u8, 173u8, 12u8, + ], ) } } @@ -849,7 +909,11 @@ pub mod api { ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "OffchainWorkerApi_offchain_worker", result, - [0; 32], + [ + 187u8, 145u8, 211u8, 0u8, 200u8, 151u8, 231u8, 42u8, 187u8, 128u8, 157u8, + 64u8, 191u8, 64u8, 31u8, 158u8, 13u8, 159u8, 227u8, 120u8, 155u8, 215u8, + 228u8, 215u8, 44u8, 8u8, 206u8, 116u8, 241u8, 133u8, 2u8, 234u8, + ], ) } } @@ -866,7 +930,11 @@ pub mod api { ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "ParachainHost_validators", result, - [0; 32], + [ + 105u8, 23u8, 110u8, 209u8, 38u8, 112u8, 199u8, 134u8, 145u8, 131u8, 38u8, + 221u8, 254u8, 147u8, 242u8, 149u8, 94u8, 76u8, 197u8, 67u8, 228u8, 113u8, + 196u8, 50u8, 122u8, 1u8, 121u8, 225u8, 163u8, 210u8, 66u8, 68u8, + ], ) } #[doc = " Returns the validator groups and rotation info localized based on the hypothetical child"] @@ -884,7 +952,11 @@ pub mod api { ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "ParachainHost_validator_groups", result, - [0; 32], + [ + 185u8, 206u8, 229u8, 10u8, 93u8, 19u8, 23u8, 44u8, 159u8, 13u8, 235u8, + 236u8, 78u8, 153u8, 144u8, 82u8, 106u8, 248u8, 8u8, 92u8, 250u8, 54u8, + 153u8, 53u8, 183u8, 60u8, 67u8, 216u8, 201u8, 88u8, 217u8, 120u8, + ], ) } #[doc = " Yields information on all availability cores as relevant to the child block."] @@ -903,7 +975,11 @@ pub mod api { ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "ParachainHost_availability_cores", result, - [0; 32], + [ + 107u8, 20u8, 115u8, 26u8, 118u8, 211u8, 207u8, 122u8, 134u8, 174u8, 98u8, + 237u8, 216u8, 175u8, 39u8, 176u8, 211u8, 78u8, 142u8, 29u8, 127u8, 56u8, + 160u8, 249u8, 174u8, 244u8, 146u8, 181u8, 4u8, 166u8, 93u8, 13u8, + ], ) } #[doc = " Yields the persisted validation data for the given `ParaId` along with an assumption that"] @@ -929,7 +1005,11 @@ pub mod api { ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "ParachainHost_persisted_validation_data", result, - [0; 32], + [ + 230u8, 186u8, 57u8, 116u8, 47u8, 20u8, 186u8, 89u8, 108u8, 211u8, 22u8, + 57u8, 124u8, 234u8, 140u8, 3u8, 104u8, 89u8, 89u8, 188u8, 156u8, 130u8, + 146u8, 77u8, 129u8, 66u8, 227u8, 157u8, 4u8, 134u8, 7u8, 237u8, + ], ) } #[doc = " Returns the persisted validation data for the given `ParaId` along with the corresponding"] @@ -954,7 +1034,11 @@ pub mod api { ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "ParachainHost_assumed_validation_data", result, - [0; 32], + [ + 53u8, 137u8, 220u8, 72u8, 155u8, 9u8, 200u8, 207u8, 158u8, 108u8, 204u8, + 15u8, 188u8, 162u8, 129u8, 158u8, 62u8, 200u8, 13u8, 0u8, 217u8, 195u8, + 19u8, 151u8, 187u8, 231u8, 197u8, 235u8, 128u8, 244u8, 51u8, 85u8, + ], ) } #[doc = " Checks if the given validation outputs pass the acceptance criteria."] @@ -972,7 +1056,11 @@ pub mod api { ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "ParachainHost_check_validation_outputs", result, - [0; 32], + [ + 99u8, 191u8, 194u8, 26u8, 245u8, 216u8, 224u8, 232u8, 26u8, 184u8, 120u8, + 64u8, 32u8, 134u8, 215u8, 138u8, 195u8, 30u8, 220u8, 111u8, 119u8, 182u8, + 62u8, 72u8, 5u8, 144u8, 87u8, 157u8, 125u8, 125u8, 237u8, 34u8, + ], ) } #[doc = " Returns the session index expected at a child of the block."] @@ -985,7 +1073,11 @@ pub mod api { ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "ParachainHost_session_index_for_child", result, - [0; 32], + [ + 224u8, 173u8, 95u8, 16u8, 57u8, 180u8, 35u8, 148u8, 243u8, 77u8, 123u8, + 242u8, 212u8, 122u8, 27u8, 32u8, 44u8, 166u8, 66u8, 124u8, 1u8, 190u8, + 93u8, 124u8, 57u8, 127u8, 249u8, 141u8, 173u8, 92u8, 137u8, 165u8, + ], ) } #[doc = " Fetch the validation code used by a para, making the given `OccupiedCoreAssumption`."] @@ -1007,7 +1099,11 @@ pub mod api { ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "ParachainHost_validation_code", result, - [0; 32], + [ + 231u8, 64u8, 145u8, 133u8, 197u8, 196u8, 177u8, 229u8, 152u8, 70u8, 16u8, + 159u8, 65u8, 66u8, 172u8, 58u8, 60u8, 50u8, 232u8, 28u8, 36u8, 211u8, + 161u8, 28u8, 192u8, 153u8, 89u8, 186u8, 9u8, 246u8, 228u8, 84u8, + ], ) } #[doc = " Get the receipt of a candidate pending availability. This returns `Some` for any paras"] @@ -1027,7 +1123,11 @@ pub mod api { ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "ParachainHost_candidate_pending_availability", result, - [0; 32], + [ + 175u8, 68u8, 187u8, 74u8, 138u8, 129u8, 153u8, 251u8, 216u8, 70u8, 251u8, + 151u8, 169u8, 252u8, 31u8, 16u8, 61u8, 242u8, 169u8, 15u8, 123u8, 58u8, + 177u8, 131u8, 6u8, 79u8, 30u8, 105u8, 51u8, 67u8, 19u8, 208u8, + ], ) } #[doc = " Get a vector of events concerning candidates that occurred within a block."] @@ -1042,7 +1142,11 @@ pub mod api { ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "ParachainHost_candidate_events", result, - [0; 32], + [ + 50u8, 177u8, 192u8, 138u8, 139u8, 179u8, 76u8, 167u8, 238u8, 92u8, 255u8, + 249u8, 223u8, 61u8, 112u8, 7u8, 0u8, 6u8, 43u8, 71u8, 209u8, 21u8, 14u8, + 184u8, 19u8, 68u8, 106u8, 193u8, 38u8, 251u8, 19u8, 208u8, + ], ) } #[doc = " Get all the pending inbound messages in the downward message queue for a para."] @@ -1061,7 +1165,11 @@ pub mod api { ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "ParachainHost_dmq_contents", result, - [0; 32], + [ + 34u8, 66u8, 1u8, 92u8, 223u8, 240u8, 222u8, 128u8, 190u8, 242u8, 160u8, + 140u8, 60u8, 57u8, 155u8, 105u8, 10u8, 162u8, 212u8, 72u8, 1u8, 192u8, + 36u8, 26u8, 127u8, 86u8, 8u8, 255u8, 57u8, 210u8, 148u8, 254u8, + ], ) } #[doc = " Get the contents of all channels addressed to the given recipient. Channels that have no"] @@ -1084,7 +1192,11 @@ pub mod api { ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "ParachainHost_inbound_hrmp_channels_contents", result, - [0; 32], + [ + 209u8, 72u8, 244u8, 143u8, 167u8, 234u8, 8u8, 33u8, 80u8, 154u8, 132u8, + 22u8, 62u8, 174u8, 3u8, 89u8, 78u8, 115u8, 119u8, 77u8, 169u8, 80u8, 98u8, + 164u8, 8u8, 8u8, 50u8, 120u8, 58u8, 12u8, 114u8, 57u8, + ], ) } #[doc = " Get the validation code from its hash."] @@ -1101,7 +1213,11 @@ pub mod api { ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "ParachainHost_validation_code_by_hash", result, - [0; 32], + [ + 143u8, 146u8, 97u8, 197u8, 138u8, 122u8, 186u8, 0u8, 86u8, 105u8, 207u8, + 55u8, 53u8, 47u8, 131u8, 101u8, 24u8, 71u8, 204u8, 71u8, 96u8, 100u8, + 252u8, 127u8, 21u8, 248u8, 70u8, 187u8, 111u8, 112u8, 77u8, 208u8, + ], ) } #[doc = " Scrape dispute relevant from on-chain, backing votes and resolved disputes."] @@ -1118,7 +1234,11 @@ pub mod api { ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "ParachainHost_on_chain_votes", result, - [0; 32], + [ + 37u8, 2u8, 32u8, 215u8, 117u8, 137u8, 242u8, 168u8, 57u8, 175u8, 59u8, + 243u8, 132u8, 133u8, 246u8, 37u8, 154u8, 205u8, 191u8, 114u8, 114u8, 167u8, + 104u8, 27u8, 144u8, 56u8, 61u8, 159u8, 9u8, 79u8, 190u8, 239u8, + ], ) } #[doc = " Get the session info for the given session, if stored."] @@ -1135,7 +1255,11 @@ pub mod api { ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "ParachainHost_session_info", result, - [0; 32], + [ + 107u8, 247u8, 186u8, 88u8, 134u8, 234u8, 251u8, 220u8, 134u8, 138u8, 130u8, + 168u8, 253u8, 101u8, 235u8, 126u8, 190u8, 37u8, 77u8, 182u8, 195u8, 100u8, + 63u8, 173u8, 147u8, 98u8, 217u8, 235u8, 220u8, 87u8, 83u8, 198u8, + ], ) } #[doc = " Submits a PVF pre-checking statement into the transaction pool."] @@ -1152,7 +1276,11 @@ pub mod api { ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "ParachainHost_submit_pvf_check_statement", result, - [0; 32], + [ + 228u8, 45u8, 8u8, 229u8, 69u8, 35u8, 3u8, 231u8, 235u8, 184u8, 19u8, 96u8, + 72u8, 62u8, 15u8, 218u8, 27u8, 134u8, 19u8, 179u8, 239u8, 1u8, 207u8, 39u8, + 50u8, 171u8, 59u8, 204u8, 143u8, 247u8, 27u8, 179u8, + ], ) } #[doc = " Returns code hashes of PVFs that require pre-checking by validators in the active set."] @@ -1167,7 +1295,11 @@ pub mod api { ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "ParachainHost_pvfs_require_precheck", result, - [0; 32], + [ + 58u8, 208u8, 110u8, 249u8, 77u8, 56u8, 39u8, 46u8, 196u8, 209u8, 189u8, + 200u8, 147u8, 235u8, 247u8, 235u8, 125u8, 230u8, 11u8, 151u8, 137u8, 118u8, + 110u8, 179u8, 72u8, 53u8, 127u8, 149u8, 252u8, 20u8, 165u8, 239u8, + ], ) } #[doc = " Fetch the hash of the validation code used by a para, making the given `OccupiedCoreAssumption`."] @@ -1188,7 +1320,11 @@ pub mod api { ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "ParachainHost_validation_code_hash", result, - [0; 32], + [ + 232u8, 173u8, 117u8, 125u8, 245u8, 188u8, 20u8, 124u8, 255u8, 219u8, 2u8, + 95u8, 131u8, 3u8, 122u8, 190u8, 240u8, 184u8, 8u8, 239u8, 85u8, 107u8, + 59u8, 105u8, 206u8, 130u8, 65u8, 142u8, 130u8, 193u8, 143u8, 199u8, + ], ) } #[doc = " Returns all onchain disputes."] @@ -1205,7 +1341,11 @@ pub mod api { ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "ParachainHost_disputes", result, - [0; 32], + [ + 90u8, 171u8, 12u8, 104u8, 109u8, 92u8, 149u8, 72u8, 109u8, 39u8, 75u8, + 241u8, 239u8, 78u8, 46u8, 134u8, 139u8, 200u8, 144u8, 213u8, 218u8, 64u8, + 98u8, 102u8, 159u8, 211u8, 154u8, 178u8, 187u8, 146u8, 193u8, 34u8, + ], ) } #[doc = " Returns execution parameters for the session."] @@ -1222,7 +1362,11 @@ pub mod api { ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "ParachainHost_session_executor_params", result, - [0; 32], + [ + 129u8, 198u8, 157u8, 37u8, 138u8, 132u8, 5u8, 183u8, 233u8, 119u8, 99u8, + 173u8, 22u8, 240u8, 182u8, 246u8, 101u8, 3u8, 149u8, 130u8, 107u8, 60u8, + 152u8, 217u8, 86u8, 150u8, 253u8, 170u8, 10u8, 86u8, 183u8, 33u8, + ], ) } } @@ -1239,7 +1383,11 @@ pub mod api { ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "BeefyApi_beefy_genesis", result, - [0; 32], + [ + 80u8, 47u8, 5u8, 126u8, 16u8, 213u8, 203u8, 179u8, 124u8, 14u8, 227u8, + 61u8, 164u8, 158u8, 115u8, 127u8, 132u8, 90u8, 222u8, 87u8, 249u8, 214u8, + 100u8, 13u8, 201u8, 186u8, 229u8, 217u8, 21u8, 152u8, 197u8, 60u8, + ], ) } #[doc = " Return the current active BEEFY validator set"] @@ -1256,7 +1404,11 @@ pub mod api { ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "BeefyApi_validator_set", result, - [0; 32], + [ + 49u8, 44u8, 188u8, 42u8, 35u8, 233u8, 181u8, 44u8, 232u8, 88u8, 1u8, 100u8, + 90u8, 42u8, 139u8, 239u8, 25u8, 44u8, 183u8, 164u8, 161u8, 129u8, 12u8, + 158u8, 41u8, 39u8, 218u8, 43u8, 78u8, 70u8, 156u8, 159u8, + ], ) } #[doc = " Submits an unsigned extrinsic to report an equivocation. The caller"] @@ -1283,7 +1435,11 @@ pub mod api { ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "BeefyApi_submit_report_equivocation_unsigned_extrinsic", result, - [0; 32], + [ + 232u8, 114u8, 155u8, 57u8, 178u8, 76u8, 154u8, 140u8, 49u8, 60u8, 71u8, + 98u8, 167u8, 4u8, 248u8, 159u8, 0u8, 36u8, 119u8, 102u8, 188u8, 10u8, + 137u8, 252u8, 249u8, 124u8, 208u8, 173u8, 252u8, 185u8, 117u8, 35u8, + ], ) } #[doc = " Generates a proof of key ownership for the given authority in the"] @@ -1310,7 +1466,11 @@ pub mod api { ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "BeefyApi_generate_key_ownership_proof", result, - [0; 32], + [ + 219u8, 146u8, 168u8, 108u8, 180u8, 133u8, 182u8, 104u8, 153u8, 14u8, 209u8, + 207u8, 32u8, 226u8, 81u8, 196u8, 243u8, 208u8, 0u8, 94u8, 197u8, 232u8, + 181u8, 251u8, 182u8, 12u8, 245u8, 231u8, 198u8, 76u8, 59u8, 53u8, + ], ) } } @@ -1330,7 +1490,11 @@ pub mod api { ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "MmrApi_mmr_root", result, - [0; 32], + [ + 83u8, 202u8, 15u8, 77u8, 255u8, 136u8, 129u8, 210u8, 154u8, 178u8, 197u8, + 94u8, 231u8, 151u8, 68u8, 172u8, 112u8, 116u8, 30u8, 138u8, 142u8, 166u8, + 16u8, 4u8, 24u8, 204u8, 18u8, 48u8, 43u8, 103u8, 30u8, 96u8, + ], ) } #[doc = " Return the number of MMR blocks in the chain."] @@ -1346,7 +1510,11 @@ pub mod api { ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "MmrApi_mmr_leaf_count", result, - [0; 32], + [ + 81u8, 145u8, 75u8, 170u8, 197u8, 235u8, 92u8, 81u8, 54u8, 16u8, 239u8, + 136u8, 174u8, 255u8, 90u8, 27u8, 24u8, 51u8, 152u8, 130u8, 249u8, 247u8, + 44u8, 173u8, 4u8, 21u8, 72u8, 44u8, 198u8, 145u8, 94u8, 77u8, + ], ) } #[doc = " Generate MMR proof for a series of block numbers. If `best_known_block_number = Some(n)`,"] @@ -1370,7 +1538,11 @@ pub mod api { ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "MmrApi_generate_proof", result, - [0; 32], + [ + 180u8, 123u8, 115u8, 227u8, 101u8, 119u8, 103u8, 230u8, 66u8, 255u8, 15u8, + 197u8, 60u8, 180u8, 27u8, 47u8, 73u8, 121u8, 179u8, 219u8, 161u8, 37u8, + 57u8, 131u8, 104u8, 106u8, 206u8, 230u8, 168u8, 185u8, 206u8, 32u8, + ], ) } #[doc = " Verify MMR proof against on-chain MMR for a batch of leaves."] @@ -1391,7 +1563,11 @@ pub mod api { ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "MmrApi_verify_proof", result, - [0; 32], + [ + 118u8, 13u8, 68u8, 159u8, 27u8, 144u8, 229u8, 72u8, 88u8, 106u8, 193u8, + 86u8, 228u8, 243u8, 28u8, 243u8, 99u8, 241u8, 153u8, 169u8, 121u8, 139u8, + 60u8, 244u8, 153u8, 110u8, 239u8, 149u8, 122u8, 164u8, 53u8, 9u8, + ], ) } #[doc = " Verify MMR proof against given root hash for a batch of leaves."] @@ -1416,7 +1592,11 @@ pub mod api { ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "MmrApi_verify_proof_stateless", result, - [0; 32], + [ + 152u8, 237u8, 225u8, 199u8, 238u8, 151u8, 87u8, 236u8, 210u8, 38u8, 168u8, + 160u8, 166u8, 27u8, 186u8, 227u8, 160u8, 154u8, 120u8, 127u8, 98u8, 247u8, + 111u8, 99u8, 211u8, 236u8, 39u8, 221u8, 250u8, 110u8, 232u8, 0u8, + ], ) } } @@ -1449,7 +1629,11 @@ pub mod api { ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "GrandpaApi_grandpa_authorities", result, - [0; 32], + [ + 78u8, 213u8, 85u8, 178u8, 49u8, 70u8, 10u8, 221u8, 93u8, 91u8, 250u8, 59u8, + 80u8, 141u8, 62u8, 126u8, 55u8, 235u8, 163u8, 12u8, 21u8, 199u8, 240u8, + 209u8, 95u8, 63u8, 65u8, 73u8, 141u8, 42u8, 78u8, 154u8, + ], ) } #[doc = " Submits an unsigned extrinsic to report an equivocation. The caller"] @@ -1475,7 +1659,11 @@ pub mod api { ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "GrandpaApi_submit_report_equivocation_unsigned_extrinsic", result, - [0; 32], + [ + 226u8, 83u8, 137u8, 173u8, 45u8, 138u8, 210u8, 202u8, 113u8, 196u8, 110u8, + 68u8, 31u8, 192u8, 127u8, 100u8, 125u8, 225u8, 30u8, 252u8, 160u8, 109u8, + 251u8, 96u8, 52u8, 214u8, 38u8, 91u8, 158u8, 71u8, 125u8, 220u8, + ], ) } #[doc = " Generates a proof of key ownership for the given authority in the"] @@ -1504,7 +1692,11 @@ pub mod api { ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "GrandpaApi_generate_key_ownership_proof", result, - [0; 32], + [ + 149u8, 80u8, 146u8, 102u8, 63u8, 184u8, 111u8, 153u8, 143u8, 71u8, 109u8, + 162u8, 117u8, 45u8, 139u8, 245u8, 154u8, 252u8, 117u8, 224u8, 10u8, 6u8, + 143u8, 137u8, 58u8, 213u8, 215u8, 110u8, 180u8, 142u8, 234u8, 182u8, + ], ) } #[doc = " Get current GRANDPA authority set id."] @@ -1515,7 +1707,11 @@ pub mod api { ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "GrandpaApi_current_set_id", result, - [0; 32], + [ + 39u8, 245u8, 166u8, 229u8, 239u8, 200u8, 179u8, 64u8, 193u8, 93u8, 41u8, + 40u8, 208u8, 231u8, 75u8, 197u8, 45u8, 119u8, 131u8, 245u8, 84u8, 249u8, + 60u8, 7u8, 180u8, 176u8, 119u8, 130u8, 247u8, 134u8, 211u8, 240u8, + ], ) } } @@ -1532,7 +1728,11 @@ pub mod api { ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "BabeApi_configuration", result, - [0; 32], + [ + 101u8, 27u8, 68u8, 108u8, 36u8, 12u8, 205u8, 58u8, 238u8, 195u8, 171u8, + 167u8, 248u8, 76u8, 92u8, 226u8, 241u8, 192u8, 151u8, 31u8, 6u8, 200u8, + 69u8, 180u8, 107u8, 134u8, 221u8, 99u8, 237u8, 223u8, 50u8, 175u8, + ], ) } #[doc = " Returns the slot that started the current epoch."] @@ -1545,7 +1745,11 @@ pub mod api { ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "BabeApi_current_epoch_start", result, - [0; 32], + [ + 67u8, 178u8, 67u8, 242u8, 228u8, 74u8, 93u8, 166u8, 160u8, 9u8, 109u8, + 174u8, 12u8, 82u8, 239u8, 200u8, 96u8, 54u8, 235u8, 184u8, 159u8, 221u8, + 72u8, 244u8, 83u8, 24u8, 239u8, 24u8, 152u8, 177u8, 211u8, 205u8, + ], ) } #[doc = " Returns information regarding the current epoch."] @@ -1558,7 +1762,11 @@ pub mod api { ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "BabeApi_current_epoch", result, - [0; 32], + [ + 166u8, 104u8, 201u8, 148u8, 149u8, 137u8, 223u8, 165u8, 82u8, 4u8, 130u8, + 58u8, 52u8, 193u8, 201u8, 80u8, 120u8, 212u8, 76u8, 221u8, 11u8, 131u8, + 115u8, 8u8, 9u8, 59u8, 191u8, 165u8, 148u8, 24u8, 194u8, 162u8, + ], ) } #[doc = " Returns information regarding the next epoch (which was already"] @@ -1572,7 +1780,11 @@ pub mod api { ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "BabeApi_next_epoch", result, - [0; 32], + [ + 251u8, 29u8, 230u8, 254u8, 174u8, 38u8, 55u8, 30u8, 93u8, 42u8, 254u8, + 172u8, 183u8, 250u8, 104u8, 211u8, 79u8, 211u8, 55u8, 98u8, 253u8, 73u8, + 137u8, 185u8, 116u8, 94u8, 20u8, 232u8, 224u8, 136u8, 86u8, 182u8, + ], ) } #[doc = " Generates a proof of key ownership for the given authority in the"] @@ -1599,7 +1811,11 @@ pub mod api { ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "BabeApi_generate_key_ownership_proof", result, - [0; 32], + [ + 16u8, 78u8, 1u8, 172u8, 172u8, 253u8, 240u8, 175u8, 90u8, 130u8, 90u8, + 69u8, 249u8, 12u8, 192u8, 134u8, 131u8, 248u8, 186u8, 166u8, 240u8, 182u8, + 177u8, 0u8, 107u8, 151u8, 200u8, 41u8, 157u8, 150u8, 162u8, 244u8, + ], ) } #[doc = " Submits an unsigned extrinsic to report an equivocation. The caller"] @@ -1628,7 +1844,11 @@ pub mod api { ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "BabeApi_submit_report_equivocation_unsigned_extrinsic", result, - [0; 32], + [ + 255u8, 136u8, 248u8, 244u8, 155u8, 51u8, 20u8, 157u8, 93u8, 19u8, 24u8, + 170u8, 72u8, 199u8, 222u8, 111u8, 164u8, 126u8, 159u8, 209u8, 198u8, 37u8, + 113u8, 12u8, 36u8, 117u8, 131u8, 7u8, 130u8, 85u8, 177u8, 109u8, + ], ) } } @@ -1648,7 +1868,11 @@ pub mod api { ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "AuthorityDiscoveryApi_authorities", result, - [0; 32], + [ + 104u8, 50u8, 187u8, 116u8, 97u8, 112u8, 203u8, 212u8, 27u8, 108u8, 253u8, + 8u8, 103u8, 104u8, 63u8, 176u8, 178u8, 179u8, 154u8, 104u8, 167u8, 241u8, + 76u8, 136u8, 102u8, 130u8, 88u8, 115u8, 104u8, 64u8, 224u8, 98u8, + ], ) } } @@ -1672,7 +1896,11 @@ pub mod api { ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "SessionKeys_generate_session_keys", result, - [0; 32], + [ + 238u8, 35u8, 56u8, 56u8, 5u8, 183u8, 237u8, 233u8, 220u8, 77u8, 245u8, + 218u8, 120u8, 21u8, 3u8, 95u8, 106u8, 140u8, 212u8, 37u8, 14u8, 180u8, + 24u8, 11u8, 137u8, 193u8, 111u8, 91u8, 235u8, 127u8, 202u8, 230u8, + ], ) } #[doc = " Decode the given public session keys."] @@ -1694,7 +1922,11 @@ pub mod api { ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "SessionKeys_decode_session_keys", result, - [0; 32], + [ + 134u8, 106u8, 224u8, 190u8, 133u8, 212u8, 253u8, 184u8, 222u8, 76u8, 44u8, + 75u8, 168u8, 18u8, 3u8, 169u8, 32u8, 8u8, 46u8, 5u8, 155u8, 45u8, 149u8, + 144u8, 41u8, 174u8, 130u8, 133u8, 22u8, 150u8, 89u8, 196u8, + ], ) } } @@ -1711,7 +1943,11 @@ pub mod api { ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "AccountNonceApi_account_nonce", result, - [0; 32], + [ + 115u8, 50u8, 18u8, 201u8, 220u8, 171u8, 244u8, 16u8, 58u8, 183u8, 173u8, + 196u8, 253u8, 239u8, 241u8, 100u8, 246u8, 179u8, 50u8, 32u8, 22u8, 245u8, + 109u8, 191u8, 232u8, 76u8, 152u8, 87u8, 156u8, 187u8, 175u8, 202u8, + ], ) } } @@ -1733,7 +1969,11 @@ pub mod api { ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "TransactionPaymentApi_query_info", result, - [0; 32], + [ + 157u8, 139u8, 132u8, 17u8, 44u8, 153u8, 215u8, 139u8, 196u8, 107u8, 225u8, + 39u8, 78u8, 134u8, 147u8, 168u8, 134u8, 89u8, 51u8, 144u8, 101u8, 117u8, + 35u8, 131u8, 108u8, 17u8, 74u8, 1u8, 167u8, 7u8, 165u8, 98u8, + ], ) } pub fn query_fee_details( @@ -1751,7 +1991,11 @@ pub mod api { ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "TransactionPaymentApi_query_fee_details", result, - [0; 32], + [ + 113u8, 100u8, 16u8, 128u8, 108u8, 95u8, 91u8, 255u8, 46u8, 255u8, 52u8, + 225u8, 92u8, 186u8, 175u8, 126u8, 96u8, 25u8, 206u8, 207u8, 16u8, 94u8, + 204u8, 138u8, 227u8, 38u8, 125u8, 14u8, 38u8, 58u8, 84u8, 71u8, + ], ) } pub fn query_weight_to_fee( @@ -1764,7 +2008,11 @@ pub mod api { ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "TransactionPaymentApi_query_weight_to_fee", result, - [0; 32], + [ + 179u8, 108u8, 155u8, 39u8, 134u8, 220u8, 72u8, 45u8, 230u8, 232u8, 150u8, + 146u8, 61u8, 198u8, 145u8, 250u8, 19u8, 157u8, 204u8, 217u8, 111u8, 171u8, + 197u8, 21u8, 75u8, 6u8, 16u8, 26u8, 244u8, 101u8, 134u8, 95u8, + ], ) } pub fn query_length_to_fee( @@ -1777,7 +2025,11 @@ pub mod api { ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "TransactionPaymentApi_query_length_to_fee", result, - [0; 32], + [ + 228u8, 141u8, 164u8, 186u8, 169u8, 249u8, 75u8, 2u8, 160u8, 73u8, 73u8, + 214u8, 141u8, 76u8, 180u8, 222u8, 230u8, 161u8, 131u8, 88u8, 25u8, 192u8, + 77u8, 124u8, 158u8, 113u8, 72u8, 147u8, 13u8, 11u8, 42u8, 30u8, + ], ) } } @@ -1800,7 +2052,11 @@ pub mod api { ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "TransactionPaymentCallApi_query_call_info", result, - [0; 32], + [ + 151u8, 40u8, 199u8, 73u8, 193u8, 248u8, 30u8, 24u8, 71u8, 196u8, 235u8, + 10u8, 211u8, 120u8, 228u8, 29u8, 101u8, 175u8, 200u8, 196u8, 70u8, 44u8, + 112u8, 209u8, 175u8, 246u8, 148u8, 118u8, 84u8, 127u8, 185u8, 163u8, + ], ) } #[doc = " Query fee details of a given encoded `Call`."] @@ -1819,7 +2075,11 @@ pub mod api { ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "TransactionPaymentCallApi_query_call_fee_details", result, - [0; 32], + [ + 56u8, 220u8, 173u8, 0u8, 48u8, 27u8, 228u8, 70u8, 139u8, 236u8, 142u8, + 142u8, 192u8, 147u8, 216u8, 185u8, 152u8, 219u8, 185u8, 189u8, 166u8, + 110u8, 224u8, 32u8, 94u8, 53u8, 248u8, 216u8, 90u8, 152u8, 63u8, 148u8, + ], ) } #[doc = " Query the output of the current `WeightToFee` given some input."] @@ -1833,7 +2093,11 @@ pub mod api { ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "TransactionPaymentCallApi_query_weight_to_fee", result, - [0; 32], + [ + 235u8, 177u8, 255u8, 102u8, 0u8, 237u8, 63u8, 37u8, 144u8, 142u8, 86u8, + 43u8, 82u8, 41u8, 25u8, 149u8, 75u8, 238u8, 118u8, 216u8, 84u8, 241u8, + 54u8, 157u8, 81u8, 246u8, 140u8, 240u8, 210u8, 208u8, 235u8, 172u8, + ], ) } #[doc = " Query the output of the current `LengthToFee` given some input."] @@ -1847,7 +2111,11 @@ pub mod api { ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "TransactionPaymentCallApi_query_length_to_fee", result, - [0; 32], + [ + 188u8, 80u8, 192u8, 251u8, 47u8, 200u8, 60u8, 10u8, 214u8, 47u8, 137u8, + 111u8, 226u8, 163u8, 60u8, 177u8, 190u8, 210u8, 57u8, 89u8, 34u8, 154u8, + 190u8, 244u8, 132u8, 129u8, 212u8, 121u8, 43u8, 190u8, 71u8, 237u8, + ], ) } } From 67d63b3397648b489d011ba9b3fcb72435745845 Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Thu, 20 Apr 2023 19:12:33 +0300 Subject: [PATCH 26/66] codegen: Simplify client fetching Signed-off-by: Alexandru Vasile --- codegen/src/utils/fetch_metadata.rs | 37 ++++------------------------- 1 file changed, 4 insertions(+), 33 deletions(-) diff --git a/codegen/src/utils/fetch_metadata.rs b/codegen/src/utils/fetch_metadata.rs index 2f0a385e99..5940d2855e 100644 --- a/codegen/src/utils/fetch_metadata.rs +++ b/codegen/src/utils/fetch_metadata.rs @@ -52,39 +52,9 @@ pub async fn fetch_metadata_hex(url: &Uri) -> Result let hex_data = format!("0x{}", hex::encode(bytes)); Ok(hex_data) } -enum ClientType { - WebSocket(jsonrpsee::async_client::Client), - Http(jsonrpsee::http_client::HttpClient), -} - -impl ClientType { - fn request<'life0, 'life1, 'async_trait, R, Params>( - &'life0 self, - method: &'life1 str, - params: Params, - ) -> core::pin::Pin< - Box< - dyn core::future::Future> + core::marker::Send + 'async_trait, - >, - > - where - R: jsonrpsee::core::DeserializeOwned, - Params: jsonrpsee::core::traits::ToRpcParams + Send, - R: 'async_trait, - Params: 'async_trait, - 'life0: 'async_trait, - 'life1: 'async_trait, - Self: 'async_trait, - { - match self { - ClientType::WebSocket(client) => client.request(method, params), - ClientType::Http(client) => client.request(method, params), - } - } -} /// Execute runtime API call and return the specified runtime metadata version. -async fn fetch_latest_metadata(client: ClientType) -> Result, FetchMetadataError> { +async fn fetch_latest_metadata(client: impl ClientT) -> Result, FetchMetadataError> { const V15_METADATA_VERSION: u32 = u32::MAX; let bytes = V15_METADATA_VERSION.encode(); @@ -98,6 +68,7 @@ async fn fetch_latest_metadata(client: ClientType) -> Result, FetchMetad rpc_params!["Metadata_metadata_at_version", &version], ) .await?; + let raw_bytes = hex::decode(raw.trim_start_matches("0x"))?; let opaque: Option = Decode::decode(&mut &raw_bytes[..])?; @@ -119,7 +90,7 @@ async fn fetch_metadata_ws(url: &Uri) -> Result, FetchMetadataError> { .max_notifs_per_subscription(4096) .build_with_tokio(sender, receiver); - fetch_latest_metadata(ClientType::WebSocket(client)).await + fetch_latest_metadata(client).await } async fn fetch_metadata_http(url: &Uri) -> Result, FetchMetadataError> { @@ -127,5 +98,5 @@ async fn fetch_metadata_http(url: &Uri) -> Result, FetchMetadataError> { .request_timeout(Duration::from_secs(180)) .build(url.to_string())?; - fetch_latest_metadata(ClientType::Http(client)).await + fetch_latest_metadata(client).await } From 82548ce8b746646a8f844ece841549b91de7da92 Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Thu, 20 Apr 2023 19:36:33 +0300 Subject: [PATCH 27/66] Address feedback and fallback to old API if needed Signed-off-by: Alexandru Vasile --- codegen/src/utils/fetch_metadata.rs | 41 +++++++++++++++++++----- examples/examples/custom_metadata_url.rs | 1 + examples/examples/runtime_calls.rs | 27 ++++++++++++---- subxt/src/runtime_api/runtime_payload.rs | 7 ++-- 4 files changed, 59 insertions(+), 17 deletions(-) diff --git a/codegen/src/utils/fetch_metadata.rs b/codegen/src/utils/fetch_metadata.rs index 5940d2855e..75b4300836 100644 --- a/codegen/src/utils/fetch_metadata.rs +++ b/codegen/src/utils/fetch_metadata.rs @@ -4,6 +4,7 @@ use crate::error::FetchMetadataError; use codec::{Decode, Encode}; +use frame_metadata::{RuntimeMetadata, RuntimeMetadataPrefixed}; use jsonrpsee::{ async_client::ClientBuilder, client_transport::ws::{Uri, WsTransportClientBuilder}, @@ -12,6 +13,7 @@ use jsonrpsee::{ rpc_params, }; use std::time::Duration; +use subxt_metadata::metadata_v14_to_latest; /// Returns the metadata bytes from the provided URL, blocking the current thread. pub fn fetch_metadata_bytes_blocking(url: &Uri) -> Result, FetchMetadataError> { @@ -62,21 +64,44 @@ async fn fetch_latest_metadata(client: impl ClientT) -> Result, FetchMet let version: String = format!("0x{}", hex::encode(&bytes)); // Returns a hex(Option). - let raw: String = client + + let result: Result = client .request( "state_call", rpc_params!["Metadata_metadata_at_version", &version], ) - .await?; + .await; - let raw_bytes = hex::decode(raw.trim_start_matches("0x"))?; + if let Ok(raw) = result { + let raw_bytes = hex::decode(raw.trim_start_matches("0x"))?; + + let opaque: Option = Decode::decode(&mut &raw_bytes[..])?; + let bytes = opaque.ok_or(FetchMetadataError::Other( + "Metadata version not found".into(), + ))?; - let opaque: Option = Decode::decode(&mut &raw_bytes[..])?; - let bytes = opaque.ok_or(FetchMetadataError::Other( - "Metadata version not found".into(), - ))?; + return Ok(bytes.0); + } - Ok(bytes.0) + // The `Metadata_metadata_at_version` RPC failed, fall back to the old `state_getMetadata`. + let raw: String = client.request("state_getMetadata", rpc_params![]).await?; + + let raw_bytes = hex::decode(raw.trim_start_matches("0x"))?; + // Decode the metadata to inspect the RuntimeMetadata variant. + let meta: RuntimeMetadataPrefixed = Decode::decode(&mut &raw_bytes[..])?; + // Update available versions to V15. + let metadata = match meta.1 { + RuntimeMetadata::V14(v14) => metadata_v14_to_latest(v14), + RuntimeMetadata::V15(v15) => v15, + _ => { + return Err(FetchMetadataError::Other( + "Metadata version not found".into(), + )) + } + }; + // Convert back to bytes. + let meta: RuntimeMetadataPrefixed = metadata.into(); + Ok(meta.encode()) } async fn fetch_metadata_ws(url: &Uri) -> Result, FetchMetadataError> { diff --git a/examples/examples/custom_metadata_url.rs b/examples/examples/custom_metadata_url.rs index 7fb1893075..68653ecec2 100644 --- a/examples/examples/custom_metadata_url.rs +++ b/examples/examples/custom_metadata_url.rs @@ -6,6 +6,7 @@ // can provide a URL to that node here. HTTP or WebSocket URLs can be // provided. Note that if the metadata cannot be retrieved from this // node URL at compile time, compilation will fail. + #[subxt::subxt(runtime_metadata_url = "wss://rpc.polkadot.io:443")] pub mod polkadot {} diff --git a/examples/examples/runtime_calls.rs b/examples/examples/runtime_calls.rs index 93310c550b..3157c6b45c 100644 --- a/examples/examples/runtime_calls.rs +++ b/examples/examples/runtime_calls.rs @@ -28,27 +28,42 @@ async fn main() -> Result<(), Box> { // Create a runtime API payload that calls into // `Core_version` function. - let call = polkadot::apis().core().version(); + let runtime_api_call = polkadot::apis().core().version(); // Submit the runtime API call. - let version = api.runtime_api().at_latest().await?.call(call).await; + 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 call = polkadot::apis().metadata().metadata_versions(); + let runtime_api_call = polkadot::apis().metadata().metadata_versions(); // Submit the runtime API call. - let versions = api.runtime_api().at_latest().await?.call(call).await?; + let versions = api + .runtime_api() + .at_latest() + .await? + .call(runtime_api_call) + .await?; println!("Metadata_metadata_versions: {:?}", versions); // Dynamic calls. - let call = subxt::dynamic::runtime_api_call( + let runtime_api_call = subxt::dynamic::runtime_api_call( "Metadata_metadata_versions", Vec::>::new(), None, ); - let versions = api.runtime_api().at_latest().await?.call(call).await?; + let versions = api + .runtime_api() + .at_latest() + .await? + .call(runtime_api_call) + .await?; println!( " dynamic Metadata_metadata_versions: {:#?}", versions.to_value() diff --git a/subxt/src/runtime_api/runtime_payload.rs b/subxt/src/runtime_api/runtime_payload.rs index 53c03e9488..38a83ebe34 100644 --- a/subxt/src/runtime_api/runtime_payload.rs +++ b/subxt/src/runtime_api/runtime_payload.rs @@ -32,14 +32,15 @@ use crate::{metadata::DecodeWithMetadata, Error, Metadata}; /// /// Each argument of the runtime function must be scale-encoded. pub trait RuntimeApiPayload { - /// The target type of the return value. - // Note: `DecodeWithMetadata` bound implied by the `encode_as_fields_to`. + /// 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 arguments data to the provided output. + /// 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 From 9f7d26e315590b81dc7bfaf7e757bf4e959179a4 Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Thu, 20 Apr 2023 19:39:04 +0300 Subject: [PATCH 28/66] runtime_api: Make mutability conditional on input params Signed-off-by: Alexandru Vasile --- codegen/src/api/runtime_apis.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/codegen/src/api/runtime_apis.rs b/codegen/src/api/runtime_apis.rs index 4b25dba194..d71f2c17b4 100644 --- a/codegen/src/api/runtime_apis.rs +++ b/codegen/src/api/runtime_apis.rs @@ -43,6 +43,14 @@ fn generate_runtime_api( (param, encoded) }).collect(); + // The `let [mut] result = Vec::new()` accumulator needs to be + // mutable only if we have inputs to add to it. + let encoded_mut = if inputs.is_empty() { + quote!() + } else { + quote!(mut) + }; + let params = inputs.iter().map(|(param, _)| param); let encoded = inputs.iter().map(|(_, encoded)| encoded); @@ -59,7 +67,7 @@ fn generate_runtime_api( Ok(quote!( #( #[doc = #docs ] )* pub fn #method_name(&self, #( #params, )* ) -> #crate_path::runtime_api::StaticRuntimeApiPayload<#output> { - let mut #encoded_params = Vec::new(); + let #encoded_mut #encoded_params = Vec::new(); #( #encoded; )* #crate_path::runtime_api::StaticRuntimeApiPayload::new_static( From 1b60e89a4194982a378aebc616ea27e005715b83 Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Fri, 21 Apr 2023 11:33:38 +0300 Subject: [PATCH 29/66] Regenerate polkadot.rs Signed-off-by: Alexandru Vasile --- .../integration-tests/src/codegen/polkadot.rs | 132 +++++++++++++----- 1 file changed, 98 insertions(+), 34 deletions(-) diff --git a/testing/integration-tests/src/codegen/polkadot.rs b/testing/integration-tests/src/codegen/polkadot.rs index f6040be195..13be46e064 100644 --- a/testing/integration-tests/src/codegen/polkadot.rs +++ b/testing/integration-tests/src/codegen/polkadot.rs @@ -580,7 +580,7 @@ pub mod api { ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< runtime_types::sp_version::RuntimeVersion, > { - let mut result = Vec::new(); + let result = Vec::new(); ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "Core_version", result, @@ -637,7 +637,7 @@ pub mod api { &self, ) -> ::subxt::runtime_api::StaticRuntimeApiPayload { - let mut result = Vec::new(); + let result = Vec::new(); ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "Metadata_metadata", result, @@ -678,7 +678,7 @@ pub mod api { ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< ::std::vec::Vec<::core::primitive::u32>, > { - let mut result = Vec::new(); + let result = Vec::new(); ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "Metadata_metadata_versions", result, @@ -727,7 +727,7 @@ pub mod api { runtime_types::sp_runtime::traits::BlakeTwo256, >, > { - let mut result = Vec::new(); + let result = Vec::new(); ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "BlockBuilder_finalize_block", result, @@ -926,7 +926,7 @@ pub mod api { ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< ::std::vec::Vec, > { - let mut result = Vec::new(); + let result = Vec::new(); ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "ParachainHost_validators", result, @@ -948,7 +948,7 @@ pub mod api { >, runtime_types::polkadot_primitives::v4::GroupRotationInfo<::core::primitive::u32>, )> { - let mut result = Vec::new(); + let result = Vec::new(); ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "ParachainHost_validator_groups", result, @@ -971,7 +971,7 @@ pub mod api { >, >, > { - let mut result = Vec::new(); + let result = Vec::new(); ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "ParachainHost_availability_cores", result, @@ -1069,7 +1069,7 @@ pub mod api { pub fn session_index_for_child( &self, ) -> ::subxt::runtime_api::StaticRuntimeApiPayload<::core::primitive::u32> { - let mut result = Vec::new(); + let result = Vec::new(); ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "ParachainHost_session_index_for_child", result, @@ -1138,7 +1138,7 @@ pub mod api { runtime_types::polkadot_primitives::v4::CandidateEvent<::subxt::utils::H256>, >, > { - let mut result = Vec::new(); + let result = Vec::new(); ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "ParachainHost_candidate_events", result, @@ -1230,7 +1230,7 @@ pub mod api { >, >, > { - let mut result = Vec::new(); + let result = Vec::new(); ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "ParachainHost_on_chain_votes", result, @@ -1291,7 +1291,7 @@ pub mod api { ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< ::std::vec::Vec, > { - let mut result = Vec::new(); + let result = Vec::new(); ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "ParachainHost_pvfs_require_precheck", result, @@ -1337,7 +1337,7 @@ pub mod api { runtime_types::polkadot_primitives::v4::DisputeState<::core::primitive::u32>, )>, > { - let mut result = Vec::new(); + let result = Vec::new(); ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "ParachainHost_disputes", result, @@ -1379,7 +1379,7 @@ pub mod api { ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< ::core::option::Option<::core::primitive::u32>, > { - let mut result = Vec::new(); + let result = Vec::new(); ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "BeefyApi_beefy_genesis", result, @@ -1400,7 +1400,7 @@ pub mod api { >, >, > { - let mut result = Vec::new(); + let result = Vec::new(); ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "BeefyApi_validator_set", result, @@ -1486,7 +1486,7 @@ pub mod api { runtime_types::sp_mmr_primitives::Error, >, > { - let mut result = Vec::new(); + let result = Vec::new(); ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "MmrApi_mmr_root", result, @@ -1506,7 +1506,7 @@ pub mod api { runtime_types::sp_mmr_primitives::Error, >, > { - let mut result = Vec::new(); + let result = Vec::new(); ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "MmrApi_mmr_leaf_count", result, @@ -1625,7 +1625,7 @@ pub mod api { ::core::primitive::u64, )>, > { - let mut result = Vec::new(); + let result = Vec::new(); ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "GrandpaApi_grandpa_authorities", result, @@ -1703,7 +1703,7 @@ pub mod api { pub fn current_set_id( &self, ) -> ::subxt::runtime_api::StaticRuntimeApiPayload<::core::primitive::u64> { - let mut result = Vec::new(); + let result = Vec::new(); ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "GrandpaApi_current_set_id", result, @@ -1724,7 +1724,7 @@ pub mod api { ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< runtime_types::sp_consensus_babe::BabeConfiguration, > { - let mut result = Vec::new(); + let result = Vec::new(); ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "BabeApi_configuration", result, @@ -1741,7 +1741,7 @@ pub mod api { ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< runtime_types::sp_consensus_slots::Slot, > { - let mut result = Vec::new(); + let result = Vec::new(); ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "BabeApi_current_epoch_start", result, @@ -1758,7 +1758,7 @@ pub mod api { ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< runtime_types::sp_consensus_babe::Epoch, > { - let mut result = Vec::new(); + let result = Vec::new(); ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "BabeApi_current_epoch", result, @@ -1776,7 +1776,7 @@ pub mod api { ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< runtime_types::sp_consensus_babe::Epoch, > { - let mut result = Vec::new(); + let result = Vec::new(); ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "BabeApi_next_epoch", result, @@ -1864,7 +1864,7 @@ pub mod api { ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< ::std::vec::Vec, > { - let mut result = Vec::new(); + let result = Vec::new(); ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( "AuthorityDiscoveryApi_authorities", result, @@ -2155,6 +2155,12 @@ 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 } @@ -2541,9 +2547,9 @@ pub mod api { let runtime_metadata_hash = client.metadata().metadata_hash(&PALLETS); if runtime_metadata_hash != [ - 249u8, 78u8, 188u8, 5u8, 29u8, 44u8, 55u8, 180u8, 164u8, 85u8, 12u8, 151u8, 222u8, - 121u8, 117u8, 192u8, 79u8, 39u8, 68u8, 212u8, 58u8, 118u8, 65u8, 98u8, 180u8, - 133u8, 156u8, 160u8, 169u8, 246u8, 43u8, 84u8, + 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) @@ -4837,10 +4843,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, ], ) } @@ -13530,6 +13535,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; @@ -14187,6 +14214,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; @@ -50497,8 +50546,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, @@ -50527,8 +50575,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( @@ -50945,6 +50992,23 @@ pub mod api { } 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, From ae35fa79c4d974f40ca9e9a8565ba6f1ec749db1 Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Fri, 21 Apr 2023 11:52:53 +0300 Subject: [PATCH 30/66] metadata: Retain only pallets without runtime API info Signed-off-by: Alexandru Vasile --- metadata/src/retain.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/metadata/src/retain.rs b/metadata/src/retain.rs index e0550643c3..5818c20f68 100644 --- a/metadata/src/retain.rs +++ b/metadata/src/retain.rs @@ -211,6 +211,10 @@ where } update_extrinsic_types(&mut metadata.extrinsic, &map_ids); update_type(&mut metadata.ty, &map_ids); + + // The retain pallets method strips the runtime APIs information, + // as it only takes into account working with pallets. + metadata.apis = Default::default(); } #[cfg(test)] From df8e3b2dd3f0e09a79b2f31bbb2e33ba45c837c5 Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Fri, 21 Apr 2023 14:04:59 +0300 Subject: [PATCH 31/66] codegen: Retry via `Metadata_metadata` without conversion Signed-off-by: Alexandru Vasile --- codegen/src/utils/fetch_metadata.rs | 27 ++++++--------------------- 1 file changed, 6 insertions(+), 21 deletions(-) diff --git a/codegen/src/utils/fetch_metadata.rs b/codegen/src/utils/fetch_metadata.rs index 75b4300836..8ee0058667 100644 --- a/codegen/src/utils/fetch_metadata.rs +++ b/codegen/src/utils/fetch_metadata.rs @@ -4,7 +4,6 @@ use crate::error::FetchMetadataError; use codec::{Decode, Encode}; -use frame_metadata::{RuntimeMetadata, RuntimeMetadataPrefixed}; use jsonrpsee::{ async_client::ClientBuilder, client_transport::ws::{Uri, WsTransportClientBuilder}, @@ -13,7 +12,6 @@ use jsonrpsee::{ rpc_params, }; use std::time::Duration; -use subxt_metadata::metadata_v14_to_latest; /// Returns the metadata bytes from the provided URL, blocking the current thread. pub fn fetch_metadata_bytes_blocking(url: &Uri) -> Result, FetchMetadataError> { @@ -64,7 +62,6 @@ async fn fetch_latest_metadata(client: impl ClientT) -> Result, FetchMet let version: String = format!("0x{}", hex::encode(&bytes)); // Returns a hex(Option). - let result: Result = client .request( "state_call", @@ -83,25 +80,13 @@ async fn fetch_latest_metadata(client: impl ClientT) -> Result, FetchMet return Ok(bytes.0); } - // The `Metadata_metadata_at_version` RPC failed, fall back to the old `state_getMetadata`. - let raw: String = client.request("state_getMetadata", rpc_params![]).await?; - + // The `Metadata_metadata_at_version` RPC failed, fall back to the `Metadata_metadata`. + let raw: String = client + .request("state_call", rpc_params!["Metadata_metadata", "0x"]) + .await?; let raw_bytes = hex::decode(raw.trim_start_matches("0x"))?; - // Decode the metadata to inspect the RuntimeMetadata variant. - let meta: RuntimeMetadataPrefixed = Decode::decode(&mut &raw_bytes[..])?; - // Update available versions to V15. - let metadata = match meta.1 { - RuntimeMetadata::V14(v14) => metadata_v14_to_latest(v14), - RuntimeMetadata::V15(v15) => v15, - _ => { - return Err(FetchMetadataError::Other( - "Metadata version not found".into(), - )) - } - }; - // Convert back to bytes. - let meta: RuntimeMetadataPrefixed = metadata.into(); - Ok(meta.encode()) + let bytes: frame_metadata::OpaqueMetadata = Decode::decode(&mut &raw_bytes[..])?; + Ok(bytes.0) } async fn fetch_metadata_ws(url: &Uri) -> Result, FetchMetadataError> { From ce2d6d6ef8c4eb0c3356b803e4dc9a810640450a Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Fri, 21 Apr 2023 14:05:25 +0300 Subject: [PATCH 32/66] payload: Remove `Decode` and change validation fn Signed-off-by: Alexandru Vasile --- subxt/src/runtime_api/runtime_payload.rs | 52 +++++++++++------------- subxt/src/runtime_api/runtime_types.rs | 4 +- 2 files changed, 25 insertions(+), 31 deletions(-) diff --git a/subxt/src/runtime_api/runtime_payload.rs b/subxt/src/runtime_api/runtime_payload.rs index 38a83ebe34..49aef99b42 100644 --- a/subxt/src/runtime_api/runtime_payload.rs +++ b/subxt/src/runtime_api/runtime_payload.rs @@ -2,7 +2,6 @@ // This file is dual-licensed as Apache-2.0 or GPL-3.0. // see LICENSE for license details. -use codec::Decode; use core::marker::PhantomData; use scale_encode::EncodeAsFields; use scale_value::Composite; @@ -51,19 +50,12 @@ pub trait RuntimeApiPayload { Ok(v) } - /// Returns the details needed to validate the runtime API call, which - /// include a statically generated validation hash. - fn validation_details(&self) -> Option { + /// Returns the statically generated validation hash. + fn validation_hash(&self) -> Option<[u8; 32]> { None } } -pub struct ValidationDetails { - /// A hash (this is generated at compile time in our codegen) - /// to compare against the runtime code. - pub hash: [u8; 32], -} - /// A runtime API payload containing the generic argument data /// and interpreting the result of the call as `ReturnTy`. /// @@ -89,8 +81,8 @@ impl RuntimeApiPayload for StaticRuntimeApiPayload Ok(()) } - fn validation_details(&self) -> Option { - self.validation_hash.map(|hash| ValidationDetails { hash }) + fn validation_hash(&self) -> Option<[u8; 32]> { + self.validation_hash } } @@ -121,7 +113,7 @@ pub type StaticRuntimeApiPayload = Payload, ReturnTy>; /// A dynamic runtime API payload. pub type DynamicRuntimeApiPayload = Payload, DecodedValueThunk>; -impl Payload { +impl Payload { /// Create a new [`Payload`]. pub fn new( fn_name: impl Into, @@ -136,6 +128,24 @@ impl Payload { } } + /// Create a new [`StaticRuntimeApiPayload`] 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: Vec, + hash: [u8; 32], + ) -> StaticRuntimeApiPayload { + StaticRuntimeApiPayload { + 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 { @@ -155,22 +165,6 @@ impl Payload { } } -impl StaticRuntimeApiPayload { - /// Create a new [`StaticRuntimeApiPayload`] 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: Vec, hash: [u8; 32]) -> Self { - Self { - fn_name: Cow::Borrowed(fn_name), - args_data, - validation_hash: Some(hash), - _marker: std::marker::PhantomData, - } - } -} - /// Create a new [`DynamicRuntimeApiPayload`]. pub fn dynamic( fn_name: impl Into, diff --git a/subxt/src/runtime_api/runtime_types.rs b/subxt/src/runtime_api/runtime_types.rs index e54a084298..8f9fd5dd21 100644 --- a/subxt/src/runtime_api/runtime_types.rs +++ b/subxt/src/runtime_api/runtime_types.rs @@ -72,11 +72,11 @@ where let return_id = fn_metadata.return_id(); // Validate the runtime API payload hash against the compile hash from codegen. - if let Some(details) = payload.validation_details() { + if let Some(static_hash) = payload.validation_hash() { let runtime_hash = metadata .runtime_api_hash(fn_metadata.trait_name(), fn_metadata.method_name())?; - if details.hash != runtime_hash { + if static_hash != runtime_hash { return Err( crate::metadata::MetadataError::IncompatibleRuntimeApiMetadata( fn_metadata.trait_name().into(), From 26688d35bc90b9b082da036c4cfde53c874ff772 Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Tue, 25 Apr 2023 17:50:50 +0300 Subject: [PATCH 33/66] metadata: Retain runtime API types Signed-off-by: Alexandru Vasile --- metadata/src/retain.rs | 40 +++++++++++++++++++++++++++++++++++----- 1 file changed, 35 insertions(+), 5 deletions(-) diff --git a/metadata/src/retain.rs b/metadata/src/retain.rs index 5818c20f68..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,10 +244,7 @@ where } update_extrinsic_types(&mut metadata.extrinsic, &map_ids); update_type(&mut metadata.ty, &map_ids); - - // The retain pallets method strips the runtime APIs information, - // as it only takes into account working with pallets. - metadata.apis = Default::default(); + update_runtime_api_types(&mut metadata.apis, &map_ids); } #[cfg(test)] From 57790d60a844c1dfa1fd97fe461dc534ac52b005 Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Tue, 25 Apr 2023 17:55:25 +0300 Subject: [PATCH 34/66] codegen: Runtime APIs documentation based on flag Signed-off-by: Alexandru Vasile --- codegen/src/api/mod.rs | 1 + codegen/src/api/runtime_apis.rs | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/codegen/src/api/mod.rs b/codegen/src/api/mod.rs index 03e13a9f7b..2ae1326b78 100644 --- a/codegen/src/api/mod.rs +++ b/codegen/src/api/mod.rs @@ -399,6 +399,7 @@ impl RuntimeGenerator { &type_gen, types_mod_ident, &crate_path, + should_gen_docs, )?; Ok(quote! { diff --git a/codegen/src/api/runtime_apis.rs b/codegen/src/api/runtime_apis.rs index d71f2c17b4..8017d5e035 100644 --- a/codegen/src/api/runtime_apis.rs +++ b/codegen/src/api/runtime_apis.rs @@ -16,6 +16,7 @@ fn generate_runtime_api( api: &RuntimeApiMetadata, type_gen: &TypeGenerator, 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; @@ -33,6 +34,9 @@ fn generate_runtime_api( // 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); @@ -65,7 +69,7 @@ fn generate_runtime_api( }; Ok(quote!( - #( #[doc = #docs ] )* + #docs pub fn #method_name(&self, #( #params, )* ) -> #crate_path::runtime_api::StaticRuntimeApiPayload<#output> { let #encoded_mut #encoded_params = Vec::new(); #( #encoded; )* @@ -106,12 +110,13 @@ pub fn generate_runtime_apis( 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, crate_path)) + .map(|api| generate_runtime_api(metadata, api, type_gen, crate_path, should_gen_docs)) .collect::>()?; let runtime_apis_def = runtime_fns.iter().map(|(apis, _)| apis); From a58fbdceb0a06b6ca124d48c2d9ac7e6f7a22c04 Mon Sep 17 00:00:00 2001 From: Alexandru Vasile <60601340+lexnv@users.noreply.github.com> Date: Tue, 25 Apr 2023 17:56:52 +0300 Subject: [PATCH 35/66] Update examples/examples/custom_metadata_url.rs Co-authored-by: James Wilson --- examples/examples/custom_metadata_url.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/examples/examples/custom_metadata_url.rs b/examples/examples/custom_metadata_url.rs index 68653ecec2..7fb1893075 100644 --- a/examples/examples/custom_metadata_url.rs +++ b/examples/examples/custom_metadata_url.rs @@ -6,7 +6,6 @@ // can provide a URL to that node here. HTTP or WebSocket URLs can be // provided. Note that if the metadata cannot be retrieved from this // node URL at compile time, compilation will fail. - #[subxt::subxt(runtime_metadata_url = "wss://rpc.polkadot.io:443")] pub mod polkadot {} From e355c14eac595fb0586b17e3ca0b678d3d5baf46 Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Tue, 25 Apr 2023 20:02:54 +0300 Subject: [PATCH 36/66] Update artifacts from polkadot-a6cfdb16e9 Signed-off-by: Alexandru Vasile --- artifacts/polkadot_metadata.scale | Bin 403824 -> 404080 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/artifacts/polkadot_metadata.scale b/artifacts/polkadot_metadata.scale index 2d8d87a3d27560165e21ee8499a90c0be0d2707a..d42d495410ded81cd5cc8866f1ef68f43357662f 100644 GIT binary patch delta 9097 zcmcIKdstM}_Isbb_b`t$I*16UASh3T0tFKllN28*Dk>xz>Ij3*6^7Sf;v@4WUiogM zX1em48YU_gDk+_;xP@h9NnI){N=h?IyP{Ij{c*eGZ=Ew^4spNl_t%f_e6!D9d%gDB zYpuQZKHU7s|K=zDx_q0{+Sj~MSFWSwI;mdAt{tQu@Y6vSO*?V>aofpgS%LOQ(U$r?jPiOo^6W8Buh&{@sWrB1IMcW)g8 z%MUSsw{9W-mu_8f?GUp{-CmI9%VNW+p3ftM6M@=f*s{mZpFjxJBSarvCIyxS0ZHLh(S(q^&nQ^^^kRq_1WOHdLyo_LMzBv zCwuifsy+`=etn5u^P*L7Hr=y4-E+?bsnm>sGGWJ@Bd(y0<* zze@$_yY>F0TcZPYnW5x8HW1F9WfQ3Y<9p052?NxfW&Tk49^2c`V4!2>Tl4bD#@}bn zvpTYE6X2Qm(M)sSXLG0-t~Vj#tM9X^)En42Hj4(rx+`o54S}bxuu#}_4t>fKG>oG@ z-q3i3#YOrWT*eGA+=*jfgSOs+k^p>@up8*srnU(+3{eFx91x~qB~nUBl#8HSPhynC zAF%fYjnlZpqEFC;6QJM|cAO?E!ROh>5>4_LN_N4#QdBw94N&WSr*38)-TyQ zmS&J)`>GAB zwZqrnU{K_PxQr26q{LokHB>IulqLz3lo_DeMhC*S@0kGJh6Y>@^V(Pn-3hzf*hp!; z=lHcYG{HuQ`HoGal`cDP*X)cy&7$RQi&l78wA^K&EQwU8GsSMDo9A8MvnlY|_bdc- zAF%tRot~op=X>_(A7t!y$=K_bQRN|HuO=gb`jaYE26n4m%yxV=&!8k-WtSPPfsl5# zgVsWQJ9~uI!~W|m5}PI0*}Xk_5pd%=3-|*l^9Jq~o-`3~S_RdrOatKO8|)UZGtfMk zc%2P`ejT{<8tX`y)xiw(6fEe#t*{ZQJ6Jfaa}l+5u&HVF2JY`lZk*4j$U<+KRp78; z_*&)_OG8h1a0+9tiLwTR5_@2hEw@G-q5iYJ)j$9XYF6II+oX z;bspDH@R^9Ni)7k*gLPbEe3)Q5+~4B1HojX8spGU?7Lx?47C5G(&AM%LZkETjwL0f zg@pyh&O2a&nMTEa_h)u`Vw-^mPqDAI?Uqqs%AMFpYXbl$$!vgBoETZWCkd z)OjNhz75m!8PvivFoAL{!m(=5*hWS2p;#o$jO0`4 zRd_Oz$6-$!xfsbOVYLt%#e-=Zq(t#W*sF@-Vc2^oibo*2hG!VgABX)TuyA~FIKLZJ z{AM_BfcR(xyfT9O1$G)~e7a*>tCQzcY9;ouH0-3zDd| z%@jiw>4(6I$$S|aQ+-!{n9N5|n&KiVT#Q+6>J+}kfJJ&*I{MVr*|@N&FmVodMx?4- z(o6&&lojQbZX);)DbqyoL6En|6eP>V>b<{61C+jLyi77!RU}l!rb?WORYl7@KFVNM zq4_3~uR9%|UFlI}H;y}u9X;Kl=dwV_HKh!Ysqw`p|nfqidB`*c{sB~^0fXdKk^H=Gk+s z&Vu6UIT%X*MWwbe zGvWqJr1O+uN!z#`BkTA|9)-p67c2RLSj69x$H(DbS(1m@Tfl)lw2d#km&eaZ=G*xB zJYWD$Q9Ey|$;(@1*g}c#9fZC^Fgq8=_qb+l}h zwVF3kDb=mcU2B;UX0PF&(liKP%bil1=fLZ0F*B#TI3T8vGHo5EGAUDrkcX%bEPfQX zzASj-Q67uOhmJ@277Xq+n=qkd!J$n&Vx+Z)zP8@_+Fbgo4cF`ScsjqeiO(F6uk|g> zf)r^pi4L`pQdzq|i7b;{_0W3xPCZnn;WrBlS&wfLb~n0JJXg+hX*rDA%;T|Hv6+X- z6&gzmsgy}2?B2{rO55GY7dP`iOFP|icDv>5^^mh$ljDzi?N#Mqx5`DTeE1jMsgtVZ z9YvM>;fu%l>|r%Bx&)Sx1YZabt(EKKdij*xAfJ)X%1v^!j9FmFHuQqrt!TbF*L&So z%tJxjFg*UX6&?AM3LTGox`w!F8xJ=%%2ZA%wi42)$x>e3#-Fxe2GB5yt9Ud9|NbgI zmNm)lJC}b|@i?hjTh?H>{{ZIH^I$u`he$0hZU1%vQ%E&5U=!FX(=loyNLlSHwmVAf z*%&RY>Qt*`thxVlfJddZ^;pwOz1Q>-;-e2*q+KTPpJ#al?0pvNv<`UdSw3`7r%b1%J61Xh9&*etwmM3z+3E$3%CrOMLH-49 z>evi}TL<|p+|*}PW8u&Z&T2j!oBh??-=CUMg8Cx~Gr=y*ahPWrLsTuo%p}YW9C-wbo+y}i1b4MKSbc;KmZIE4M~`3*i-Fc7Jl)j{gwz^- zcz6sdbmyEGXYLjDaVP^diF5NA{Tv?=kYJ|M+&5p73i9%9XLXVQYo6l~QlcC8)#v!Q z;YmFNB=;7O>=KadCK~fRuZ&OWK{UNL(R3G)+Hifc8Mnk#=z5+<7}F3UrJG5*i=A@c z3w!|GkZJB&QdUTqka5%CBn$DiAIWMa_#nFq2}f)_HR!$fPsfamcCq)sGxT;@gBqfU zm=9mp@(AA|Rlia*!AHG?vWY;Ml!4z-9uc*^2dj;}C%qAAkkdw3ew4?0mz%Nvk6d+o zTP>-8BS$ekmcwhu_+Yqslm{6qRAGo$34X_TLO{7W^!JNxx?LsjpKC8Jaqa}$G4u|t z375!rmBU2rb|2$+2mO&qrjgkN`T2HdK6?0Wxc@jGIJ6vfot{Hz=a2;;5RWPNF5A&%~m8>=se9-s;L#YPV)!{jz7GA02VHtHj%u>_a zEHy5()Fa-Vq!5ddbqaB{q!4>2uui#oA9STpNF`8Wp9X)|($wp{8 z!IOQ?_Yk#3l>{LtxsTq>y9LIdTaWIoImQ zDad!&N=mRA%Pw%_+Lw31y)W@WQCE8~Z12sm-NmpS9({?APweP{-q{cu*F%NE!yr)M`IJK3%b0YJD!4HT_*CH|qeLIiX&L(TN=$}6S~M6GB+W3<)3D`D z{s|qRWWB{__QBNs+(&$kuFH!PeGDA?2t#7Z$9ygAR!)D+=WuFJd_L#DQ7rQMeZfod z1hwT0p31Sj`}8aR7#@bQzvhXUL-&5oV`!Z6{@1*o;VtRL%UH%IL*r#kuqn!Sm$^<) zrz`FMj*9P17(D@I5sJ|> z!7QA#S~+1BZ%VXAdB`F@pt#vj=_lr(r$9duh`W1zKaofql^gwpN#Mo(uYTeo3D4#w z1I1k2tKS|dcA;WfgTw-g2jiCpi>L7Fe0HG7pk2zLKv7EZ76}4}h)v9F_*~UywDQFe zv7XW}WkHDWqBKfbI#j%?$2}!#ga|>4#l(n*X@c@Xj2K2oBuUhp^2w>z)%fwNu%N`6 z_khj5e1$V~yce-le{#j=mg{c=I>ODjx$iv%xxv=p9D7Nj)tS8_I2-TRgPkj^PJD9& zFS7;X=QQME%Lzv34YsYeWtTc_Id{=S=!_Qk;QHJV9!bOh|K%pbXLpG>JmDJd7K_m# zR@^OoC6;Q~q*^LOsfrV)by)o7j6vnn;ps7G&rIl-D3)UpyCzXQj+L!ptat!j#yVDv zqDH%6G9_~oBOc?svc(eU9w)}(EmY!oT#kHY+jt?+dtg_R7|luzW$Yrh0Fi>*+uEf+0Jsx5+L@+d#(pV#|P+G1$_q@0)(F*19 zqi8PNg4X7*mgucUn9` z(KFlM6r}<+%04SFTed1=-^Y}McXgHLL=5gyubva%(5uS6CUJpbYFgVY-bXi{`jL1I zY52#&AqAJC3S{QA;{3u%E36KOEpJkR!--Xi=88K-2Rv~er_-g}^C>Qjgs1qH1oZ`~>wTQ_Q3y=e0@t0yTzJ$Q*_(B7epbO$F%yH1&Dl!aFGA9;6gOlNn`C_25 z>MLQCFyC#wD1vZnc;=$G#4zFg`CIWS#WkAn9j;iCa`Zb9AmOUKdqsrdCD-*UVmRs@ za1}!touTjtHQ}bi*?)>`nyJKG!^vS#bhRTmALd>c%UHf#1j=>s3|>zyxFLSV+vC)m zVj8QEx5HC6k;_iFaZ{vhsFJfuwai1OOHCw%Q*Brb*h@~yu`Y~M{49dSrL(L-j*Yy{J==Ch-V&|# zv`il4JS%Tmismm~Zu2-#&9RoLu!dl{2+0@K-XC*03;8!%lB;ks7LKHXerqjn`*=y18J;1!+jLu8c?k9i?Y z5v1sK(=h>U)$2aT1hm4SEAg!~k6&rS4?zz(Y-(MH|LIXX7G zGW;7=jtA)QYdoHz2kSQQHZy+<8UuC1;6R{mAO=!Hpl%xm5TZ^|o($6cAhC8Ap90*R zm5yOLZ#6HlFkLWaEhRKuH;#^|mgPK~!_sXglkuXixNJ$T&9)>5|E0#BSE83oS3BJZ ev=4#WNL>&diO^-@0a=RFt&wOScsNq`p^R8(wIl9G|pYKld>?1sJPdG2+Ec>j5SzvsuyoH<`} z=A1KU=5q5hubZEE8M5s8wn1{Sp~OH-3{tIuT{}##!;gnqDD48jO16kv;f)vB)Jefx za@VcSDahYckk4sA>e9JO^gf{h+Qg>ZoSbz%l=|UBg4QSGy4${ccaMOm7g>tbxL0Wm`&<&gG5gjKDO75ClSI4HBzrsd;0X`8HDt@A;cJJMIa#(j)eNz z5hh7y8OK~9UZ;pfZLeZSD0PR;Z?dUFJ&jH-K7F`&8uwoJg07d?!a?3fI&!JqmY0*A zM~FAVhr!z8Y_#m7@%J?~GFu`iYE0veBt^rVLzlzc)40QFkawD`!bT&9+n3o8YJ*{C*!016BMn`$ zDc_NkJ-uLZB%0O^_A@Nd!c!Pr=8*|1RsI7_rYQlXLHhp5C# ziZnp6krc!1T2^N&(cy=^NGTk6g$)P4SJ-x1ru82jvR6YbHxm3bF{j9WzM9-K3QXzF9hCQaH!(hRHLVG{SW&QCx3}k@940;Q4ph7T#*4&jS5X8Ums3vJlz^sqf-Gwd!0UyMhfykmh+lt**^# z?<1mJ6VYlU9kA#<_C4*?_hsUB7iL!<%Bsq(4`UKxLX4mdyHPB=k9(=y+*j) z$d*wG(eE<{eAS2+f9-vCV6c$slw@0GX5sYvY?-#~bo&fA_&ys6PkzAer!x3_$h_eD z57<0vfr;nYV(JaW=h-Og0~P1lWBo>B1ZrWC^{@|E?jezGqW2b18 zx}=4DDoN3O=VF{dIaZSuCzCjM{YzZenlD)z1`77Kvv^s7H@-wmJRe2f)KwQ*HkT4* z=u-G>DMjA5IDRDD+s-awm<;-wl}c&Iekz}hvGLW{>|Sbzd#<3*J0S83#$J}X`U40w#5!?F!+s4i-oE!h0QTA`I?e{xITOHj5U)gWt0GwA5+Z zGR?FBQjv2p!No31mh`b?vC}MR5-HJEhr?2ru(YdeF2r8Ng`(JbaOf(^2>Oma{u}1y zF6R4P%n$TozF%h^MZL%YjX4f0oXq!ql_aZ~o$Lyum5^|q?W0xj&2{!Dt$~UgEEpTx z4Hg8oKVWw65Awaiy!(M>_8SF3*9~;DCD(B)#@uAT@@ko80=>aTKx`Lovy1WeE@q;& z@MIUpX+3<_#m3TVO%HGIxW(or*2vt;nX5QYrpUr*U7V9`$I!GUif|&45Vpr(r67PtnK8S)4s?3$%`~$N5WCF z*0#t5KctSLtukqKF0AE8_U)K9nR?7F$lYQmG&IYRy*jU8)25u<{JUV%=EVNTPwY*v zcA5Ikb!@d~ESMZgsNdGrIqTNt+4I|>xtk3g+;3JQq+N#Fr`U*5cS-Op?U1SBKx*s| zA{5do!;W>-TV3=s14gf_-}JC6RO*sp^P@CKz4>o8M3TCl3-)c3oPpodXTd$%`r0JY zD?`$4%!X7gy3Il*D$0-X*Cg2lA2-rru!HjZG0VJ9`A%$VBpwmrZgOQ2Q=cqi(oI~- zh$r?WcN6i}AznTv;-itxfm0HnI3v(S8`g&wVSQXA#5BM~LXZ`@NQg_N?TkB2VVamg z6Nxavc;sQW{%Q@Mw`4yw63dXj7wf@A9*pL82R2Iu^NXM6N%Gl79h<6Cr!MI zCb17qJp63rkI0D{O}vSus6{dd$+TRj#mz|rUxgpVB=oMrgR#+8EZI%)TnrnoCRq4h zjw$JDcYcCq!QR0<1lryC5VdJAS16v(npxq|Fg}Pr&9r zFWxN`o8Unq`9e<>GplR8`36c$;Dh13la{KrBltK8PwLA)d^zT_slMEXjn25qmwV81 zZ6*ZFqj->Izlq>!wIwIto||_7W{%<$JrJbTV4-P7azI-njw^KPag{D>RQ0h&rH);~ ztyWT{VdJ>kq(JjjDG-DouV6KIMmOg(8UB8R$?9c4{wl*nF)NUJ!I=R52R!kypCQ+4 z970Kh3H+B}Zh80$Q)F&kb^m8E<9xbY8`ATCEUHIa)DYh;6S`zC+ExD}Q8U3$OMy5c z%vvpQACt`rbgh%T;A8@B(Z8#3i_V5|>P9VULnOb&nB@+_?wOJsv`oPra|c^ApGrO9 z*=SVC8!kul5Xn<#7!K2>qMLa`!c;y73lT&d3ddL8+5P&d{C34SOy#4XWG@FP-+nc#;Y zcd=ZM}C@egT$$XM**XA8&;^;GxzIV<|?fZ7qLS?$Gec1?hx{blxRj*M?nY(xs7& zfVmlbrAN00>oF7jkcSnG-s^Id9c#HzKhNOb8cbBt%`CE-a~O=`u$l;SQd?8D<$rC5eAKpa6_L) zcf=E@52`1kqGEPIycH-;LEqn$&5w@sQMjL;29xahS~Z4&#R(D<;;%S^Zgw^s?92t3 zIs7|G3RK{783uJuE_X;FidI_a1FOpN_)km@({!qLBN4AW#4U7TlrEQ`14d(y1t8}b z1;4)j9IFiQ=U7BWf7Tj2gGwbY66X^2NWmR_p4!TrsIJasz?U>o56b1YrqC=qUaXcKC!;QyzI9{*)cJf^qy;VE;cm%fW z-(TErD2_<~dP=`LYHVcxauO&3VN;WI{-7C02aaK)*%H67| zK*w(uR#J#P35P{475`nr*U@5F`vi}~2A<%7N{PxzyRB#-zo$j>Z=-qg22(Ywjaa;3q9ocz~ zbd01{%?K3=7U<&-@sQN^e!JZ^aJSnKAN{if@s`^23NrJJ7(6?99PLD0?9`;= z@^U%pbRu^`_+ecC`9plH_GEX6j~>yb(D^CZ8?$pB%1+L;W#`$_wI>{n^K}jR3%K_% zrrQaXd@-K)MU_}U^uVD?J`S4?E4i0fFLEZ@ABkEBe&~AMERqPgUCEbvbSpG`LG}iF zu01<{jx8SzEn6VsF!zU&7y0A}i>0sf?v}pVyCbjPsPFEgwH)E66i;1Nn%UceZv)N8 zFr9pTgr~_q2$uXU_|B%oY)7%`3WUdw@&Mm33yn-l-(b%u$h2q7&dJ3~60y$30*v78 zCeVrBb`*182q;xN#n}vp?N$6pNC;|r_r{2vetTmKL%C?QFee-PF^t;?*n5l*!=~yO zX3{8aCOIU!AETIojAEROVw{ZDzr@QTWBbv>4Wx;4(r67g##kZ*-Wr0B^B_4MAyT4+ zBz6Dq*_DBZZUYh_3&U(kui&M9JadAF zyBAyV_7J?~&QY6J0-vA2EhvV+pX4K9)Jg6umuSKeuN3B< z(52^OuXC*L2HPuqL`X+J0i6Q{bUFoeLgg!b`teUAeuxR_I$|r`u@mfZs;m{Q<_haD76&^riRpU3@V5D*Cpldu+ zqRZ9oKk!q6+SIV0u!f=zmH&+C6Wfvh;FBe6lX`eL#plz`fAK1b7ODGsxs@`9u>@Yc z&CA>zMlVjd4PLs9he6V>Jc*XVkze^_R%k3!FaOGODc!3kQE}Cb0XEGd0x-bVSVTUp zP+KhGEs0jD`>oW!6JdyLfv5DL+jx4!6KU0tL{UDS>Ut3kC%8z!e{^T;bJLm zhVO=pXHdBvBLu#gcff^_;?MXFzu8Bm(r)!VA5lQHC-s@5#7-v57l79B$?7koL=mO_ z>cjrRjnY8%vC-l^BOW*l#|wY7+UsHB5gMV!Ob}xz3HoQ9-Oc5Rf zpWiDY@W&oGT&zN)ZU`5i5?dhe)Fk<<6%)mq1}sQ3qLDZe@5rc63Jjhq)?;1y@Ko_f zEH>q7;sG?fZJL-wO?G(>B?-|%Pw{6m#A@iBE~eqrQFIJ0$D!_t5dwDro|z#gv(0h= zd^AIRO3T$lGexPby%Zl7 zZY>d`(a$^+#3Bjb`_dCcH+t~$M6rSjIFl%XsH|R06pJaA_v4eqd9>F*lf+8y7hxJn zJn%Qet%cOt7)NR&hdqx{j`woNTPEH{znZdKbaGtn=v87YTW(5I7p@ZfBrK~htq~jX z>1&})OfzgYq0>AHMeBt(RN90$O;gX>L^j1mPe>QPZu_gE#0jaA3JC{|K@(s<&CNJGE+<_LOHn(B2_97a2;^;LqQvDAiR;yX%< z)nmuS6^WLpe>{oi!lU)OQ{rWe#lO^`8H(YT8l%>I$FRzMLie@UP7k|RW_&P>%F?{~IScg`caaJf2dgQ_e z;fJBCX1*mJrRbU0-xdV|HA;V9V8&@xr=G`<#+S0PCJ}~r?^m0|*R(@@?n7~rVQ6pr zM0|j5JnvKS8q)C3M7HEtj4F^t^K-K{&BhnEYl-bfL{)h(BVNy2lA_b z#`Hs{7>9a$e~+PzvApT;TEa?%#%m&-rl?`pad8+FJwG7W0ZVU)walU56V45B5MP6r z-4s9JlW%;Nn9oX-GWc^Ba@h+vxIjo;};1=g6y7!krlL_~QlEboqsKN_g-c z?&EoU&^Tnm>2Fz0Vyc!B(hMWf&T_gePxOb~VHIw=kQuK=hB8 z9@^mck75pQSFDGD{v?K~5B?;crmRBgfFHZXN32_Eg>yfP-fX8j|35&8stDU#S zgOtYB&NW0L){$+Jf#QyAXNJFGZjRyx2OcEPbHfhIR-=TW4UNDlJuN@o2*c z3CtG5Bvx#xR%0y&iD6QiV>L|1Y_iR2*oXzyRjc70^Er!$PSs>-R{!d5*h%|A<_$4y zXRM_kN9p5Mjp2V&_0(_!{uJH@zxWt-@OBG-8yb8KW8ei}!*GnFdSAmHj2}dut3Ex- z@V&%3oqTfe)~I#`7~HkAz{VQ Date: Tue, 25 Apr 2023 20:03:13 +0300 Subject: [PATCH 37/66] Update polkadot.rs with polkadot-a6cfdb16e9 Signed-off-by: Alexandru Vasile --- .../integration-tests/src/codegen/polkadot.rs | 4159 ++++++++++------- 1 file changed, 2589 insertions(+), 1570 deletions(-) diff --git a/testing/integration-tests/src/codegen/polkadot.rs b/testing/integration-tests/src/codegen/polkadot.rs index 13be46e064..f43481a2e1 100644 --- a/testing/integration-tests/src/codegen/polkadot.rs +++ b/testing/integration-tests/src/codegen/polkadot.rs @@ -519,1604 +519,2623 @@ pub mod api { use subxt::ext::codec::Encode; pub struct RuntimeApi; impl RuntimeApi { - pub fn core(&self) -> Core { - Core + pub fn core(&self) -> core::Core { + core::Core } - pub fn metadata(&self) -> Metadata { - Metadata + pub fn metadata(&self) -> metadata::Metadata { + metadata::Metadata } - pub fn block_builder(&self) -> BlockBuilder { - BlockBuilder + pub fn block_builder(&self) -> block_builder::BlockBuilder { + block_builder::BlockBuilder } - pub fn nomination_pools_api(&self) -> NominationPoolsApi { - NominationPoolsApi + pub fn nomination_pools_api(&self) -> nomination_pools_api::NominationPoolsApi { + nomination_pools_api::NominationPoolsApi } - pub fn staking_api(&self) -> StakingApi { - StakingApi + pub fn staking_api(&self) -> staking_api::StakingApi { + staking_api::StakingApi } - pub fn tagged_transaction_queue(&self) -> TaggedTransactionQueue { - TaggedTransactionQueue + pub fn tagged_transaction_queue( + &self, + ) -> tagged_transaction_queue::TaggedTransactionQueue { + tagged_transaction_queue::TaggedTransactionQueue } - pub fn offchain_worker_api(&self) -> OffchainWorkerApi { - OffchainWorkerApi + pub fn offchain_worker_api(&self) -> offchain_worker_api::OffchainWorkerApi { + offchain_worker_api::OffchainWorkerApi } - pub fn parachain_host(&self) -> ParachainHost { - ParachainHost + pub fn parachain_host(&self) -> parachain_host::ParachainHost { + parachain_host::ParachainHost } - pub fn beefy_api(&self) -> BeefyApi { - BeefyApi + pub fn beefy_api(&self) -> beefy_api::BeefyApi { + beefy_api::BeefyApi } - pub fn mmr_api(&self) -> MmrApi { - MmrApi + pub fn mmr_api(&self) -> mmr_api::MmrApi { + mmr_api::MmrApi } - pub fn grandpa_api(&self) -> GrandpaApi { - GrandpaApi + pub fn grandpa_api(&self) -> grandpa_api::GrandpaApi { + grandpa_api::GrandpaApi } - pub fn babe_api(&self) -> BabeApi { - BabeApi + pub fn babe_api(&self) -> babe_api::BabeApi { + babe_api::BabeApi } - pub fn authority_discovery_api(&self) -> AuthorityDiscoveryApi { - AuthorityDiscoveryApi + pub fn authority_discovery_api( + &self, + ) -> authority_discovery_api::AuthorityDiscoveryApi { + authority_discovery_api::AuthorityDiscoveryApi } - pub fn session_keys(&self) -> SessionKeys { - SessionKeys + pub fn session_keys(&self) -> session_keys::SessionKeys { + session_keys::SessionKeys } - pub fn account_nonce_api(&self) -> AccountNonceApi { - AccountNonceApi + pub fn account_nonce_api(&self) -> account_nonce_api::AccountNonceApi { + account_nonce_api::AccountNonceApi } - pub fn transaction_payment_api(&self) -> TransactionPaymentApi { - TransactionPaymentApi + pub fn transaction_payment_api( + &self, + ) -> transaction_payment_api::TransactionPaymentApi { + transaction_payment_api::TransactionPaymentApi } - pub fn transaction_payment_call_api(&self) -> TransactionPaymentCallApi { - TransactionPaymentCallApi + pub fn transaction_payment_call_api( + &self, + ) -> transaction_payment_call_api::TransactionPaymentCallApi { + transaction_payment_call_api::TransactionPaymentCallApi } } - #[doc = " The `Core` runtime api that every Substrate runtime needs to implement."] - pub struct Core; - impl Core { - #[doc = " Returns the version of the runtime."] - pub fn version( - &self, - ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< - runtime_types::sp_version::RuntimeVersion, - > { - let result = Vec::new(); - ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( - "Core_version", - result, - [ - 209u8, 59u8, 156u8, 128u8, 14u8, 210u8, 96u8, 63u8, 140u8, 0u8, 65u8, - 211u8, 118u8, 177u8, 9u8, 208u8, 105u8, 124u8, 132u8, 203u8, 157u8, 207u8, - 186u8, 177u8, 91u8, 170u8, 22u8, 224u8, 88u8, 56u8, 56u8, 13u8, - ], - ) - } - #[doc = " Execute the given block."] - pub fn execute_block( - &self, - block : runtime_types :: sp_runtime :: generic :: block :: Block < runtime_types :: sp_runtime :: generic :: header :: Header < :: core :: primitive :: u32 , runtime_types :: sp_runtime :: traits :: BlakeTwo256 > , runtime_types :: sp_runtime :: generic :: unchecked_extrinsic :: UncheckedExtrinsic < :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , () > , runtime_types :: polkadot_runtime :: RuntimeCall , runtime_types :: sp_runtime :: MultiSignature , (runtime_types :: frame_system :: extensions :: check_non_zero_sender :: CheckNonZeroSender , runtime_types :: frame_system :: extensions :: check_spec_version :: CheckSpecVersion , runtime_types :: frame_system :: extensions :: check_tx_version :: CheckTxVersion , runtime_types :: frame_system :: extensions :: check_genesis :: CheckGenesis , runtime_types :: frame_system :: extensions :: check_mortality :: CheckMortality , runtime_types :: frame_system :: extensions :: check_nonce :: CheckNonce , runtime_types :: frame_system :: extensions :: check_weight :: CheckWeight , runtime_types :: pallet_transaction_payment :: ChargeTransactionPayment , runtime_types :: polkadot_runtime_common :: claims :: PrevalidateAttests ,) > >, - ) -> ::subxt::runtime_api::StaticRuntimeApiPayload<()> { - let mut result = Vec::new(); - block.encode_to(&mut result); - ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( - "Core_execute_block", - result, - [ - 199u8, 164u8, 96u8, 78u8, 188u8, 134u8, 19u8, 247u8, 63u8, 58u8, 93u8, - 227u8, 122u8, 157u8, 93u8, 196u8, 16u8, 7u8, 20u8, 17u8, 178u8, 152u8, - 211u8, 185u8, 56u8, 153u8, 118u8, 241u8, 118u8, 105u8, 85u8, 3u8, - ], - ) - } - #[doc = " Initialize a block with the given header."] - pub fn initialize_block( - &self, - header: runtime_types::sp_runtime::generic::header::Header< - ::core::primitive::u32, - runtime_types::sp_runtime::traits::BlakeTwo256, - >, - ) -> ::subxt::runtime_api::StaticRuntimeApiPayload<()> { - let mut result = Vec::new(); - header.encode_to(&mut result); - ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( - "Core_initialize_block", - result, - [ - 45u8, 232u8, 143u8, 132u8, 33u8, 211u8, 71u8, 186u8, 169u8, 91u8, 143u8, - 156u8, 174u8, 156u8, 10u8, 25u8, 203u8, 16u8, 208u8, 226u8, 12u8, 233u8, - 145u8, 228u8, 63u8, 118u8, 66u8, 247u8, 71u8, 48u8, 44u8, 243u8, - ], - ) - } - } - #[doc = " The `Metadata` api trait that returns metadata for the runtime."] - pub struct Metadata; - impl Metadata { - #[doc = " Returns the metadata of a runtime."] - pub fn metadata( - &self, - ) -> ::subxt::runtime_api::StaticRuntimeApiPayload - { - let result = Vec::new(); - ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( - "Metadata_metadata", - result, - [ - 158u8, 223u8, 229u8, 177u8, 228u8, 49u8, 24u8, 219u8, 143u8, 82u8, 255u8, - 132u8, 245u8, 210u8, 160u8, 197u8, 218u8, 10u8, 63u8, 165u8, 115u8, 91u8, - 70u8, 151u8, 246u8, 51u8, 18u8, 235u8, 91u8, 143u8, 27u8, 127u8, - ], - ) - } - #[doc = " Returns the metadata at a given version."] - #[doc = ""] - #[doc = " If the given `version` isn't supported, this will return `None`."] - #[doc = " Use [`Self::metadata_versions`] to find out about supported metadata version of the runtime."] - pub fn metadata_at_version( - &self, - version: ::core::primitive::u32, - ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< - ::core::option::Option, - > { - let mut result = Vec::new(); - version.encode_to(&mut result); - ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( - "Metadata_metadata_at_version", - result, - [ - 50u8, 164u8, 234u8, 88u8, 65u8, 62u8, 176u8, 66u8, 188u8, 114u8, 205u8, - 29u8, 137u8, 173u8, 194u8, 54u8, 237u8, 48u8, 221u8, 46u8, 166u8, 44u8, - 220u8, 137u8, 97u8, 128u8, 204u8, 137u8, 29u8, 229u8, 31u8, 134u8, - ], - ) - } - #[doc = " Returns the supported metadata versions."] - #[doc = ""] - #[doc = " This can be used to call `metadata_at_version`."] - pub fn metadata_versions( - &self, - ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< - ::std::vec::Vec<::core::primitive::u32>, - > { - let result = Vec::new(); - ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( - "Metadata_metadata_versions", - result, - [ - 255u8, 234u8, 86u8, 244u8, 238u8, 175u8, 175u8, 54u8, 181u8, 181u8, 23u8, - 185u8, 231u8, 242u8, 153u8, 246u8, 205u8, 142u8, 184u8, 21u8, 240u8, 217u8, - 195u8, 231u8, 32u8, 163u8, 127u8, 3u8, 51u8, 130u8, 68u8, 124u8, - ], - ) - } - } - #[doc = " The `BlockBuilder` api trait that provides the required functionality for building a block."] - pub struct BlockBuilder; - impl BlockBuilder { - #[doc = " Apply the given extrinsic."] - #[doc = ""] - #[doc = " Returns an inclusion outcome which specifies if this extrinsic is included in"] - #[doc = " this block or not."] - pub fn apply_extrinsic( - &self, - extrinsic : runtime_types :: sp_runtime :: generic :: unchecked_extrinsic :: UncheckedExtrinsic < :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , () > , runtime_types :: polkadot_runtime :: RuntimeCall , runtime_types :: sp_runtime :: MultiSignature , (runtime_types :: frame_system :: extensions :: check_non_zero_sender :: CheckNonZeroSender , runtime_types :: frame_system :: extensions :: check_spec_version :: CheckSpecVersion , runtime_types :: frame_system :: extensions :: check_tx_version :: CheckTxVersion , runtime_types :: frame_system :: extensions :: check_genesis :: CheckGenesis , runtime_types :: frame_system :: extensions :: check_mortality :: CheckMortality , runtime_types :: frame_system :: extensions :: check_nonce :: CheckNonce , runtime_types :: frame_system :: extensions :: check_weight :: CheckWeight , runtime_types :: pallet_transaction_payment :: ChargeTransactionPayment , runtime_types :: polkadot_runtime_common :: claims :: PrevalidateAttests ,) >, - ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< - ::core::result::Result< - ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - runtime_types::sp_runtime::transaction_validity::TransactionValidityError, - >, - > { - let mut result = Vec::new(); - extrinsic.encode_to(&mut result); - ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( - "BlockBuilder_apply_extrinsic", - result, - [ - 151u8, 89u8, 106u8, 151u8, 95u8, 29u8, 10u8, 68u8, 85u8, 149u8, 144u8, - 132u8, 47u8, 46u8, 164u8, 91u8, 225u8, 219u8, 85u8, 120u8, 101u8, 105u8, - 45u8, 79u8, 171u8, 133u8, 121u8, 170u8, 197u8, 248u8, 24u8, 10u8, - ], - ) - } - #[doc = " Finish the current block."] - pub fn finalize_block( - &self, - ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< - runtime_types::sp_runtime::generic::header::Header< - ::core::primitive::u32, - runtime_types::sp_runtime::traits::BlakeTwo256, - >, - > { - let result = Vec::new(); - ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( - "BlockBuilder_finalize_block", - result, - [ - 78u8, 179u8, 67u8, 170u8, 213u8, 230u8, 122u8, 98u8, 76u8, 244u8, 225u8, - 219u8, 83u8, 115u8, 94u8, 229u8, 93u8, 142u8, 120u8, 172u8, 87u8, 99u8, - 120u8, 41u8, 143u8, 184u8, 71u8, 49u8, 126u8, 55u8, 240u8, 125u8, - ], - ) - } - #[doc = " Generate inherent extrinsics. The inherent data will vary from chain to chain."] pub fn inherent_extrinsics (& self , inherent : runtime_types :: sp_inherents :: InherentData ,) -> :: subxt :: runtime_api :: StaticRuntimeApiPayload < :: std :: vec :: Vec < runtime_types :: sp_runtime :: generic :: unchecked_extrinsic :: UncheckedExtrinsic < :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , () > , runtime_types :: polkadot_runtime :: RuntimeCall , runtime_types :: sp_runtime :: MultiSignature , (runtime_types :: frame_system :: extensions :: check_non_zero_sender :: CheckNonZeroSender , runtime_types :: frame_system :: extensions :: check_spec_version :: CheckSpecVersion , runtime_types :: frame_system :: extensions :: check_tx_version :: CheckTxVersion , runtime_types :: frame_system :: extensions :: check_genesis :: CheckGenesis , runtime_types :: frame_system :: extensions :: check_mortality :: CheckMortality , runtime_types :: frame_system :: extensions :: check_nonce :: CheckNonce , runtime_types :: frame_system :: extensions :: check_weight :: CheckWeight , runtime_types :: pallet_transaction_payment :: ChargeTransactionPayment , runtime_types :: polkadot_runtime_common :: claims :: PrevalidateAttests ,) > > >{ - let mut result = Vec::new(); - inherent.encode_to(&mut result); - ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( - "BlockBuilder_inherent_extrinsics", - result, - [ - 75u8, 86u8, 85u8, 104u8, 125u8, 169u8, 23u8, 92u8, 162u8, 73u8, 65u8, - 223u8, 100u8, 24u8, 201u8, 157u8, 145u8, 208u8, 238u8, 11u8, 255u8, 98u8, - 0u8, 211u8, 189u8, 94u8, 5u8, 123u8, 25u8, 1u8, 88u8, 234u8, - ], - ) - } - #[doc = " Check that the inherents are valid. The inherent data will vary from chain to chain."] - pub fn check_inherents( - &self, - block : runtime_types :: sp_runtime :: generic :: block :: Block < runtime_types :: sp_runtime :: generic :: header :: Header < :: core :: primitive :: u32 , runtime_types :: sp_runtime :: traits :: BlakeTwo256 > , runtime_types :: sp_runtime :: generic :: unchecked_extrinsic :: UncheckedExtrinsic < :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , () > , runtime_types :: polkadot_runtime :: RuntimeCall , runtime_types :: sp_runtime :: MultiSignature , (runtime_types :: frame_system :: extensions :: check_non_zero_sender :: CheckNonZeroSender , runtime_types :: frame_system :: extensions :: check_spec_version :: CheckSpecVersion , runtime_types :: frame_system :: extensions :: check_tx_version :: CheckTxVersion , runtime_types :: frame_system :: extensions :: check_genesis :: CheckGenesis , runtime_types :: frame_system :: extensions :: check_mortality :: CheckMortality , runtime_types :: frame_system :: extensions :: check_nonce :: CheckNonce , runtime_types :: frame_system :: extensions :: check_weight :: CheckWeight , runtime_types :: pallet_transaction_payment :: ChargeTransactionPayment , runtime_types :: polkadot_runtime_common :: claims :: PrevalidateAttests ,) > >, - data: runtime_types::sp_inherents::InherentData, - ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< - runtime_types::sp_inherents::CheckInherentsResult, - > { - let mut result = Vec::new(); - block.encode_to(&mut result); - data.encode_to(&mut result); - ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( - "BlockBuilder_check_inherents", - result, - [ - 162u8, 99u8, 46u8, 228u8, 124u8, 158u8, 224u8, 212u8, 90u8, 101u8, 133u8, - 173u8, 82u8, 61u8, 131u8, 131u8, 254u8, 209u8, 17u8, 181u8, 87u8, 190u8, - 80u8, 165u8, 172u8, 179u8, 121u8, 202u8, 126u8, 48u8, 254u8, 112u8, - ], - ) - } - } - #[doc = " Runtime api for accessing information about nomination pools."] - pub struct NominationPoolsApi; - impl NominationPoolsApi { - #[doc = " Returns the pending rewards for the member that the AccountId was given for."] - pub fn pending_rewards( - &self, - who: ::subxt::utils::AccountId32, - ) -> ::subxt::runtime_api::StaticRuntimeApiPayload<::core::primitive::u128> - { - let mut result = Vec::new(); - who.encode_to(&mut result); - ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( - "NominationPoolsApi_pending_rewards", - result, - [ - 235u8, 64u8, 57u8, 70u8, 111u8, 27u8, 62u8, 236u8, 36u8, 192u8, 103u8, - 89u8, 221u8, 194u8, 46u8, 223u8, 71u8, 249u8, 33u8, 135u8, 43u8, 42u8, - 147u8, 57u8, 130u8, 44u8, 35u8, 132u8, 163u8, 153u8, 201u8, 105u8, - ], - ) - } - #[doc = " Returns the equivalent balance of `points` for a given pool."] - pub fn points_to_balance( - &self, - pool_id: ::core::primitive::u32, - points: ::core::primitive::u128, - ) -> ::subxt::runtime_api::StaticRuntimeApiPayload<::core::primitive::u128> - { - let mut result = Vec::new(); - pool_id.encode_to(&mut result); - points.encode_to(&mut result); - ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( - "NominationPoolsApi_points_to_balance", - result, - [ - 30u8, 7u8, 5u8, 95u8, 146u8, 43u8, 110u8, 21u8, 148u8, 160u8, 74u8, 92u8, - 168u8, 188u8, 74u8, 41u8, 129u8, 172u8, 138u8, 30u8, 232u8, 214u8, 154u8, - 18u8, 52u8, 87u8, 71u8, 127u8, 141u8, 177u8, 216u8, 158u8, - ], - ) - } - #[doc = " Returns the equivalent points of `new_funds` for a given pool."] - pub fn balance_to_points( - &self, - pool_id: ::core::primitive::u32, - new_funds: ::core::primitive::u128, - ) -> ::subxt::runtime_api::StaticRuntimeApiPayload<::core::primitive::u128> - { - let mut result = Vec::new(); - pool_id.encode_to(&mut result); - new_funds.encode_to(&mut result); - ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( - "NominationPoolsApi_balance_to_points", - result, - [ - 152u8, 165u8, 227u8, 129u8, 31u8, 108u8, 224u8, 174u8, 74u8, 192u8, 102u8, - 139u8, 17u8, 119u8, 173u8, 220u8, 52u8, 157u8, 125u8, 107u8, 110u8, 236u8, - 9u8, 93u8, 239u8, 3u8, 18u8, 140u8, 203u8, 136u8, 183u8, 215u8, - ], - ) - } - } - pub struct StakingApi; - impl StakingApi { - #[doc = " Returns the nominations quota for a nominator with a given balance."] - pub fn nominations_quota( - &self, - balance: ::core::primitive::u128, - ) -> ::subxt::runtime_api::StaticRuntimeApiPayload<::core::primitive::u32> { - let mut result = Vec::new(); - balance.encode_to(&mut result); - ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( - "StakingApi_nominations_quota", - result, - [ - 181u8, 19u8, 6u8, 134u8, 234u8, 67u8, 127u8, 210u8, 53u8, 38u8, 175u8, - 160u8, 243u8, 71u8, 187u8, 206u8, 178u8, 91u8, 26u8, 115u8, 18u8, 214u8, - 50u8, 208u8, 161u8, 197u8, 81u8, 13u8, 98u8, 53u8, 124u8, 62u8, - ], - ) - } - } - #[doc = " The `TaggedTransactionQueue` api trait for interfering with the transaction queue."] - pub struct TaggedTransactionQueue; - impl TaggedTransactionQueue { - #[doc = " Validate the transaction."] - #[doc = ""] - #[doc = " This method is invoked by the transaction pool to learn details about given transaction."] - #[doc = " The implementation should make sure to verify the correctness of the transaction"] - #[doc = " against current state. The given `block_hash` corresponds to the hash of the block"] - #[doc = " that is used as current state."] - #[doc = ""] - #[doc = " Note that this call may be performed by the pool multiple times and transactions"] - #[doc = " might be verified in any possible order."] - pub fn validate_transaction( - &self, - source: runtime_types::sp_runtime::transaction_validity::TransactionSource, - tx : runtime_types :: sp_runtime :: generic :: unchecked_extrinsic :: UncheckedExtrinsic < :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , () > , runtime_types :: polkadot_runtime :: RuntimeCall , runtime_types :: sp_runtime :: MultiSignature , (runtime_types :: frame_system :: extensions :: check_non_zero_sender :: CheckNonZeroSender , runtime_types :: frame_system :: extensions :: check_spec_version :: CheckSpecVersion , runtime_types :: frame_system :: extensions :: check_tx_version :: CheckTxVersion , runtime_types :: frame_system :: extensions :: check_genesis :: CheckGenesis , runtime_types :: frame_system :: extensions :: check_mortality :: CheckMortality , runtime_types :: frame_system :: extensions :: check_nonce :: CheckNonce , runtime_types :: frame_system :: extensions :: check_weight :: CheckWeight , runtime_types :: pallet_transaction_payment :: ChargeTransactionPayment , runtime_types :: polkadot_runtime_common :: claims :: PrevalidateAttests ,) >, - block_hash: ::subxt::utils::H256, - ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< - ::core::result::Result< - runtime_types::sp_runtime::transaction_validity::ValidTransaction, - runtime_types::sp_runtime::transaction_validity::TransactionValidityError, - >, - > { - let mut result = Vec::new(); - source.encode_to(&mut result); - tx.encode_to(&mut result); - block_hash.encode_to(&mut result); - ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( - "TaggedTransactionQueue_validate_transaction", - result, - [ - 93u8, 180u8, 253u8, 37u8, 212u8, 54u8, 180u8, 214u8, 33u8, 5u8, 113u8, - 181u8, 25u8, 48u8, 153u8, 221u8, 78u8, 6u8, 115u8, 191u8, 72u8, 75u8, - 203u8, 171u8, 129u8, 75u8, 56u8, 60u8, 243u8, 92u8, 173u8, 12u8, - ], - ) - } - } - #[doc = " The offchain worker api."] - pub struct OffchainWorkerApi; - impl OffchainWorkerApi { - #[doc = " Starts the off-chain task for given block header."] - pub fn offchain_worker( - &self, - header: runtime_types::sp_runtime::generic::header::Header< - ::core::primitive::u32, - runtime_types::sp_runtime::traits::BlakeTwo256, - >, - ) -> ::subxt::runtime_api::StaticRuntimeApiPayload<()> { - let mut result = Vec::new(); - header.encode_to(&mut result); - ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( - "OffchainWorkerApi_offchain_worker", - result, - [ - 187u8, 145u8, 211u8, 0u8, 200u8, 151u8, 231u8, 42u8, 187u8, 128u8, 157u8, - 64u8, 191u8, 64u8, 31u8, 158u8, 13u8, 159u8, 227u8, 120u8, 155u8, 215u8, - 228u8, 215u8, 44u8, 8u8, 206u8, 116u8, 241u8, 133u8, 2u8, 234u8, - ], - ) - } - } - #[doc = " The API for querying the state of parachains on-chain."] - pub struct ParachainHost; - impl ParachainHost { - #[doc = " Get the current validators."] - pub fn validators( - &self, - ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< - ::std::vec::Vec, - > { - let result = Vec::new(); - ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( - "ParachainHost_validators", - result, - [ - 105u8, 23u8, 110u8, 209u8, 38u8, 112u8, 199u8, 134u8, 145u8, 131u8, 38u8, - 221u8, 254u8, 147u8, 242u8, 149u8, 94u8, 76u8, 197u8, 67u8, 228u8, 113u8, - 196u8, 50u8, 122u8, 1u8, 121u8, 225u8, 163u8, 210u8, 66u8, 68u8, - ], - ) - } - #[doc = " Returns the validator groups and rotation info localized based on the hypothetical child"] - #[doc = " of a block whose state this is invoked on. Note that `now` in the `GroupRotationInfo`"] - #[doc = " should be the successor of the number of the block."] - pub fn validator_groups( - &self, - ) -> ::subxt::runtime_api::StaticRuntimeApiPayload<( - ::std::vec::Vec< - ::std::vec::Vec, - >, - runtime_types::polkadot_primitives::v4::GroupRotationInfo<::core::primitive::u32>, - )> { - let result = Vec::new(); - ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( - "ParachainHost_validator_groups", - result, - [ - 185u8, 206u8, 229u8, 10u8, 93u8, 19u8, 23u8, 44u8, 159u8, 13u8, 235u8, - 236u8, 78u8, 153u8, 144u8, 82u8, 106u8, 248u8, 8u8, 92u8, 250u8, 54u8, - 153u8, 53u8, 183u8, 60u8, 67u8, 216u8, 201u8, 88u8, 217u8, 120u8, - ], - ) - } - #[doc = " Yields information on all availability cores as relevant to the child block."] - #[doc = " Cores are either free or occupied. Free cores can have paras assigned to them."] - pub fn availability_cores( - &self, - ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< - ::std::vec::Vec< - runtime_types::polkadot_primitives::v4::CoreState< - ::subxt::utils::H256, - ::core::primitive::u32, - >, - >, - > { - let result = Vec::new(); - ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( - "ParachainHost_availability_cores", - result, - [ - 107u8, 20u8, 115u8, 26u8, 118u8, 211u8, 207u8, 122u8, 134u8, 174u8, 98u8, - 237u8, 216u8, 175u8, 39u8, 176u8, 211u8, 78u8, 142u8, 29u8, 127u8, 56u8, - 160u8, 249u8, 174u8, 244u8, 146u8, 181u8, 4u8, 166u8, 93u8, 13u8, - ], - ) - } - #[doc = " Yields the persisted validation data for the given `ParaId` along with an assumption that"] - #[doc = " should be used if the para currently occupies a core."] - #[doc = ""] - #[doc = " Returns `None` if either the para is not registered or the assumption is `Freed`"] - #[doc = " and the para already occupies a core."] - pub fn persisted_validation_data( - &self, - para_id: runtime_types::polkadot_parachain::primitives::Id, - assumption: runtime_types::polkadot_primitives::v4::OccupiedCoreAssumption, - ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< - ::core::option::Option< - runtime_types::polkadot_primitives::v4::PersistedValidationData< - ::subxt::utils::H256, + pub mod core { + use super::root_mod; + use super::runtime_types; + #[doc = " The `Core` runtime api that every Substrate runtime needs to implement."] + pub struct Core; + impl Core { + #[doc = " Returns the version of the runtime."] + pub fn version( + &self, + ) -> ::subxt::runtime_api::Payload< + inputs::Version, + runtime_types::sp_version::RuntimeVersion, + > { + ::subxt::runtime_api::Payload::new_static( + "Core_version", + inputs::Version {}, + [ + 209u8, 59u8, 156u8, 128u8, 14u8, 210u8, 96u8, 63u8, 140u8, 0u8, 65u8, + 211u8, 118u8, 177u8, 9u8, 208u8, 105u8, 124u8, 132u8, 203u8, 157u8, + 207u8, 186u8, 177u8, 91u8, 170u8, 22u8, 224u8, 88u8, 56u8, 56u8, 13u8, + ], + ) + } + #[doc = " Execute the given block."] + pub fn execute_block( + &self, + block : runtime_types :: sp_runtime :: generic :: block :: Block < runtime_types :: sp_runtime :: generic :: header :: Header < :: core :: primitive :: u32 , runtime_types :: sp_runtime :: traits :: BlakeTwo256 > , runtime_types :: sp_runtime :: generic :: unchecked_extrinsic :: UncheckedExtrinsic < :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , () > , runtime_types :: polkadot_runtime :: RuntimeCall , runtime_types :: sp_runtime :: MultiSignature , (runtime_types :: frame_system :: extensions :: check_non_zero_sender :: CheckNonZeroSender , runtime_types :: frame_system :: extensions :: check_spec_version :: CheckSpecVersion , runtime_types :: frame_system :: extensions :: check_tx_version :: CheckTxVersion , runtime_types :: frame_system :: extensions :: check_genesis :: CheckGenesis , runtime_types :: frame_system :: extensions :: check_mortality :: CheckMortality , runtime_types :: frame_system :: extensions :: check_nonce :: CheckNonce , runtime_types :: frame_system :: extensions :: check_weight :: CheckWeight , runtime_types :: pallet_transaction_payment :: ChargeTransactionPayment , runtime_types :: polkadot_runtime_common :: claims :: PrevalidateAttests ,) > >, + ) -> ::subxt::runtime_api::Payload { + ::subxt::runtime_api::Payload::new_static( + "Core_execute_block", + inputs::ExecuteBlock { block }, + [ + 199u8, 164u8, 96u8, 78u8, 188u8, 134u8, 19u8, 247u8, 63u8, 58u8, 93u8, + 227u8, 122u8, 157u8, 93u8, 196u8, 16u8, 7u8, 20u8, 17u8, 178u8, 152u8, + 211u8, 185u8, 56u8, 153u8, 118u8, 241u8, 118u8, 105u8, 85u8, 3u8, + ], + ) + } + #[doc = " Initialize a block with the given header."] + pub fn initialize_block( + &self, + header: runtime_types::sp_runtime::generic::header::Header< ::core::primitive::u32, + runtime_types::sp_runtime::traits::BlakeTwo256, >, - >, - > { - let mut result = Vec::new(); - para_id.encode_to(&mut result); - assumption.encode_to(&mut result); - ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( - "ParachainHost_persisted_validation_data", - result, - [ - 230u8, 186u8, 57u8, 116u8, 47u8, 20u8, 186u8, 89u8, 108u8, 211u8, 22u8, - 57u8, 124u8, 234u8, 140u8, 3u8, 104u8, 89u8, 89u8, 188u8, 156u8, 130u8, - 146u8, 77u8, 129u8, 66u8, 227u8, 157u8, 4u8, 134u8, 7u8, 237u8, - ], - ) - } - #[doc = " Returns the persisted validation data for the given `ParaId` along with the corresponding"] - #[doc = " validation code hash. Instead of accepting assumption about the para, matches the validation"] - #[doc = " data hash against an expected one and yields `None` if they're not equal."] - pub fn assumed_validation_data( - &self, - para_id: runtime_types::polkadot_parachain::primitives::Id, - expected_persisted_validation_data_hash: ::subxt::utils::H256, - ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< - ::core::option::Option<( - runtime_types::polkadot_primitives::v4::PersistedValidationData< - ::subxt::utils::H256, + ) -> ::subxt::runtime_api::Payload { + ::subxt::runtime_api::Payload::new_static( + "Core_initialize_block", + inputs::InitializeBlock { header }, + [ + 45u8, 232u8, 143u8, 132u8, 33u8, 211u8, 71u8, 186u8, 169u8, 91u8, + 143u8, 156u8, 174u8, 156u8, 10u8, 25u8, 203u8, 16u8, 208u8, 226u8, + 12u8, 233u8, 145u8, 228u8, 63u8, 118u8, 66u8, 247u8, 71u8, 48u8, 44u8, + 243u8, + ], + ) + } + } + pub mod inputs { + use super::root_mod; + 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 Version {} + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ExecuteBlock { pub block : runtime_types :: sp_runtime :: generic :: block :: Block < runtime_types :: sp_runtime :: generic :: header :: Header < :: core :: primitive :: u32 , runtime_types :: sp_runtime :: traits :: BlakeTwo256 > , runtime_types :: sp_runtime :: generic :: unchecked_extrinsic :: UncheckedExtrinsic < :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , () > , runtime_types :: polkadot_runtime :: RuntimeCall , runtime_types :: sp_runtime :: MultiSignature , (runtime_types :: frame_system :: extensions :: check_non_zero_sender :: CheckNonZeroSender , runtime_types :: frame_system :: extensions :: check_spec_version :: CheckSpecVersion , runtime_types :: frame_system :: extensions :: check_tx_version :: CheckTxVersion , runtime_types :: frame_system :: extensions :: check_genesis :: CheckGenesis , runtime_types :: frame_system :: extensions :: check_mortality :: CheckMortality , runtime_types :: frame_system :: extensions :: check_nonce :: CheckNonce , runtime_types :: frame_system :: extensions :: check_weight :: CheckWeight , runtime_types :: pallet_transaction_payment :: ChargeTransactionPayment , runtime_types :: polkadot_runtime_common :: claims :: PrevalidateAttests ,) > > , } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct InitializeBlock { + pub header: runtime_types::sp_runtime::generic::header::Header< ::core::primitive::u32, + runtime_types::sp_runtime::traits::BlakeTwo256, >, - runtime_types::polkadot_parachain::primitives::ValidationCodeHash, - )>, - > { - let mut result = Vec::new(); - para_id.encode_to(&mut result); - expected_persisted_validation_data_hash.encode_to(&mut result); - ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( - "ParachainHost_assumed_validation_data", - result, - [ - 53u8, 137u8, 220u8, 72u8, 155u8, 9u8, 200u8, 207u8, 158u8, 108u8, 204u8, - 15u8, 188u8, 162u8, 129u8, 158u8, 62u8, 200u8, 13u8, 0u8, 217u8, 195u8, - 19u8, 151u8, 187u8, 231u8, 197u8, 235u8, 128u8, 244u8, 51u8, 85u8, - ], - ) - } - #[doc = " Checks if the given validation outputs pass the acceptance criteria."] - pub fn check_validation_outputs( - &self, - para_id: runtime_types::polkadot_parachain::primitives::Id, - outputs: runtime_types::polkadot_primitives::v4::CandidateCommitments< - ::core::primitive::u32, - >, - ) -> ::subxt::runtime_api::StaticRuntimeApiPayload<::core::primitive::bool> - { - let mut result = Vec::new(); - para_id.encode_to(&mut result); - outputs.encode_to(&mut result); - ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( - "ParachainHost_check_validation_outputs", - result, - [ - 99u8, 191u8, 194u8, 26u8, 245u8, 216u8, 224u8, 232u8, 26u8, 184u8, 120u8, - 64u8, 32u8, 134u8, 215u8, 138u8, 195u8, 30u8, 220u8, 111u8, 119u8, 182u8, - 62u8, 72u8, 5u8, 144u8, 87u8, 157u8, 125u8, 125u8, 237u8, 34u8, - ], - ) - } - #[doc = " Returns the session index expected at a child of the block."] - #[doc = ""] - #[doc = " This can be used to instantiate a `SigningContext`."] - pub fn session_index_for_child( - &self, - ) -> ::subxt::runtime_api::StaticRuntimeApiPayload<::core::primitive::u32> { - let result = Vec::new(); - ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( - "ParachainHost_session_index_for_child", - result, - [ - 224u8, 173u8, 95u8, 16u8, 57u8, 180u8, 35u8, 148u8, 243u8, 77u8, 123u8, - 242u8, 212u8, 122u8, 27u8, 32u8, 44u8, 166u8, 66u8, 124u8, 1u8, 190u8, - 93u8, 124u8, 57u8, 127u8, 249u8, 141u8, 173u8, 92u8, 137u8, 165u8, - ], - ) - } - #[doc = " Fetch the validation code used by a para, making the given `OccupiedCoreAssumption`."] - #[doc = ""] - #[doc = " Returns `None` if either the para is not registered or the assumption is `Freed`"] - #[doc = " and the para already occupies a core."] - pub fn validation_code( - &self, - para_id: runtime_types::polkadot_parachain::primitives::Id, - assumption: runtime_types::polkadot_primitives::v4::OccupiedCoreAssumption, - ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< - ::core::option::Option< - runtime_types::polkadot_parachain::primitives::ValidationCode, - >, - > { - let mut result = Vec::new(); - para_id.encode_to(&mut result); - assumption.encode_to(&mut result); - ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( - "ParachainHost_validation_code", - result, - [ - 231u8, 64u8, 145u8, 133u8, 197u8, 196u8, 177u8, 229u8, 152u8, 70u8, 16u8, - 159u8, 65u8, 66u8, 172u8, 58u8, 60u8, 50u8, 232u8, 28u8, 36u8, 211u8, - 161u8, 28u8, 192u8, 153u8, 89u8, 186u8, 9u8, 246u8, 228u8, 84u8, - ], - ) - } - #[doc = " Get the receipt of a candidate pending availability. This returns `Some` for any paras"] - #[doc = " assigned to occupied cores in `availability_cores` and `None` otherwise."] - pub fn candidate_pending_availability( - &self, - para_id: runtime_types::polkadot_parachain::primitives::Id, - ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< - ::core::option::Option< - runtime_types::polkadot_primitives::v4::CommittedCandidateReceipt< - ::subxt::utils::H256, + } + } + } + pub mod metadata { + use super::root_mod; + use super::runtime_types; + #[doc = " The `Metadata` api trait that returns metadata for the runtime."] + pub struct Metadata; + impl Metadata { + #[doc = " Returns the metadata of a runtime."] + pub fn metadata( + &self, + ) -> ::subxt::runtime_api::Payload< + inputs::Metadata, + runtime_types::sp_core::OpaqueMetadata, + > { + ::subxt::runtime_api::Payload::new_static( + "Metadata_metadata", + inputs::Metadata {}, + [ + 158u8, 223u8, 229u8, 177u8, 228u8, 49u8, 24u8, 219u8, 143u8, 82u8, + 255u8, 132u8, 245u8, 210u8, 160u8, 197u8, 218u8, 10u8, 63u8, 165u8, + 115u8, 91u8, 70u8, 151u8, 246u8, 51u8, 18u8, 235u8, 91u8, 143u8, 27u8, + 127u8, + ], + ) + } + #[doc = " Returns the metadata at a given version."] + #[doc = ""] + #[doc = " If the given `version` isn't supported, this will return `None`."] + #[doc = " Use [`Self::metadata_versions`] to find out about supported metadata version of the runtime."] + pub fn metadata_at_version( + &self, + version: ::core::primitive::u32, + ) -> ::subxt::runtime_api::Payload< + inputs::MetadataAtVersion, + ::core::option::Option, + > { + ::subxt::runtime_api::Payload::new_static( + "Metadata_metadata_at_version", + inputs::MetadataAtVersion { version }, + [ + 50u8, 164u8, 234u8, 88u8, 65u8, 62u8, 176u8, 66u8, 188u8, 114u8, 205u8, + 29u8, 137u8, 173u8, 194u8, 54u8, 237u8, 48u8, 221u8, 46u8, 166u8, 44u8, + 220u8, 137u8, 97u8, 128u8, 204u8, 137u8, 29u8, 229u8, 31u8, 134u8, + ], + ) + } + #[doc = " Returns the supported metadata versions."] + #[doc = ""] + #[doc = " This can be used to call `metadata_at_version`."] + pub fn metadata_versions( + &self, + ) -> ::subxt::runtime_api::Payload< + inputs::MetadataVersions, + ::std::vec::Vec<::core::primitive::u32>, + > { + ::subxt::runtime_api::Payload::new_static( + "Metadata_metadata_versions", + inputs::MetadataVersions {}, + [ + 255u8, 234u8, 86u8, 244u8, 238u8, 175u8, 175u8, 54u8, 181u8, 181u8, + 23u8, 185u8, 231u8, 242u8, 153u8, 246u8, 205u8, 142u8, 184u8, 21u8, + 240u8, 217u8, 195u8, 231u8, 32u8, 163u8, 127u8, 3u8, 51u8, 130u8, 68u8, + 124u8, + ], + ) + } + } + pub mod inputs { + use super::root_mod; + 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 Metadata {} + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct MetadataAtVersion { + pub 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 MetadataVersions {} + } + } + pub mod block_builder { + use super::root_mod; + use super::runtime_types; + #[doc = " The `BlockBuilder` api trait that provides the required functionality for building a block."] + pub struct BlockBuilder; + impl BlockBuilder { + #[doc = " Apply the given extrinsic."] + #[doc = ""] + #[doc = " Returns an inclusion outcome which specifies if this extrinsic is included in"] + #[doc = " this block or not."] + pub fn apply_extrinsic( + &self, + extrinsic : runtime_types :: sp_runtime :: generic :: unchecked_extrinsic :: UncheckedExtrinsic < :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , () > , runtime_types :: polkadot_runtime :: RuntimeCall , runtime_types :: sp_runtime :: MultiSignature , (runtime_types :: frame_system :: extensions :: check_non_zero_sender :: CheckNonZeroSender , runtime_types :: frame_system :: extensions :: check_spec_version :: CheckSpecVersion , runtime_types :: frame_system :: extensions :: check_tx_version :: CheckTxVersion , runtime_types :: frame_system :: extensions :: check_genesis :: CheckGenesis , runtime_types :: frame_system :: extensions :: check_mortality :: CheckMortality , runtime_types :: frame_system :: extensions :: check_nonce :: CheckNonce , runtime_types :: frame_system :: extensions :: check_weight :: CheckWeight , runtime_types :: pallet_transaction_payment :: ChargeTransactionPayment , runtime_types :: polkadot_runtime_common :: claims :: PrevalidateAttests ,) >, + ) -> ::subxt::runtime_api::Payload< + inputs::ApplyExtrinsic, + ::core::result::Result< + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + runtime_types::sp_runtime::transaction_validity::TransactionValidityError, >, - >, - > { - let mut result = Vec::new(); - para_id.encode_to(&mut result); - ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( - "ParachainHost_candidate_pending_availability", - result, - [ - 175u8, 68u8, 187u8, 74u8, 138u8, 129u8, 153u8, 251u8, 216u8, 70u8, 251u8, - 151u8, 169u8, 252u8, 31u8, 16u8, 61u8, 242u8, 169u8, 15u8, 123u8, 58u8, - 177u8, 131u8, 6u8, 79u8, 30u8, 105u8, 51u8, 67u8, 19u8, 208u8, - ], - ) - } - #[doc = " Get a vector of events concerning candidates that occurred within a block."] - pub fn candidate_events( - &self, - ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< - ::std::vec::Vec< - runtime_types::polkadot_primitives::v4::CandidateEvent<::subxt::utils::H256>, - >, - > { - let result = Vec::new(); - ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( - "ParachainHost_candidate_events", - result, - [ - 50u8, 177u8, 192u8, 138u8, 139u8, 179u8, 76u8, 167u8, 238u8, 92u8, 255u8, - 249u8, 223u8, 61u8, 112u8, 7u8, 0u8, 6u8, 43u8, 71u8, 209u8, 21u8, 14u8, - 184u8, 19u8, 68u8, 106u8, 193u8, 38u8, 251u8, 19u8, 208u8, - ], - ) - } - #[doc = " Get all the pending inbound messages in the downward message queue for a para."] - pub fn dmq_contents( - &self, - recipient: runtime_types::polkadot_parachain::primitives::Id, - ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< - ::std::vec::Vec< - runtime_types::polkadot_core_primitives::InboundDownwardMessage< + > { + ::subxt::runtime_api::Payload::new_static( + "BlockBuilder_apply_extrinsic", + inputs::ApplyExtrinsic { extrinsic }, + [ + 151u8, 89u8, 106u8, 151u8, 95u8, 29u8, 10u8, 68u8, 85u8, 149u8, 144u8, + 132u8, 47u8, 46u8, 164u8, 91u8, 225u8, 219u8, 85u8, 120u8, 101u8, + 105u8, 45u8, 79u8, 171u8, 133u8, 121u8, 170u8, 197u8, 248u8, 24u8, + 10u8, + ], + ) + } + #[doc = " Finish the current block."] + pub fn finalize_block( + &self, + ) -> ::subxt::runtime_api::Payload< + inputs::FinalizeBlock, + runtime_types::sp_runtime::generic::header::Header< ::core::primitive::u32, + runtime_types::sp_runtime::traits::BlakeTwo256, >, - >, - > { - let mut result = Vec::new(); - recipient.encode_to(&mut result); - ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( - "ParachainHost_dmq_contents", - result, - [ - 34u8, 66u8, 1u8, 92u8, 223u8, 240u8, 222u8, 128u8, 190u8, 242u8, 160u8, - 140u8, 60u8, 57u8, 155u8, 105u8, 10u8, 162u8, 212u8, 72u8, 1u8, 192u8, - 36u8, 26u8, 127u8, 86u8, 8u8, 255u8, 57u8, 210u8, 148u8, 254u8, - ], - ) - } - #[doc = " Get the contents of all channels addressed to the given recipient. Channels that have no"] - #[doc = " messages in them are also included."] - pub fn inbound_hrmp_channels_contents( - &self, - recipient: runtime_types::polkadot_parachain::primitives::Id, - ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< - ::subxt::utils::KeyedVec< - runtime_types::polkadot_parachain::primitives::Id, - ::std::vec::Vec< - runtime_types::polkadot_core_primitives::InboundHrmpMessage< - ::core::primitive::u32, - >, - >, - >, - > { - let mut result = Vec::new(); - recipient.encode_to(&mut result); - ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( - "ParachainHost_inbound_hrmp_channels_contents", - result, - [ - 209u8, 72u8, 244u8, 143u8, 167u8, 234u8, 8u8, 33u8, 80u8, 154u8, 132u8, - 22u8, 62u8, 174u8, 3u8, 89u8, 78u8, 115u8, 119u8, 77u8, 169u8, 80u8, 98u8, - 164u8, 8u8, 8u8, 50u8, 120u8, 58u8, 12u8, 114u8, 57u8, - ], - ) - } - #[doc = " Get the validation code from its hash."] - pub fn validation_code_by_hash( - &self, - hash: runtime_types::polkadot_parachain::primitives::ValidationCodeHash, - ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< - ::core::option::Option< - runtime_types::polkadot_parachain::primitives::ValidationCode, - >, - > { - let mut result = Vec::new(); - hash.encode_to(&mut result); - ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( - "ParachainHost_validation_code_by_hash", - result, - [ - 143u8, 146u8, 97u8, 197u8, 138u8, 122u8, 186u8, 0u8, 86u8, 105u8, 207u8, - 55u8, 53u8, 47u8, 131u8, 101u8, 24u8, 71u8, 204u8, 71u8, 96u8, 100u8, - 252u8, 127u8, 21u8, 248u8, 70u8, 187u8, 111u8, 112u8, 77u8, 208u8, - ], - ) - } - #[doc = " Scrape dispute relevant from on-chain, backing votes and resolved disputes."] - pub fn on_chain_votes( - &self, - ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< - ::core::option::Option< - runtime_types::polkadot_primitives::v4::ScrapedOnChainVotes< - ::subxt::utils::H256, - >, - >, - > { - let result = Vec::new(); - ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( - "ParachainHost_on_chain_votes", - result, - [ - 37u8, 2u8, 32u8, 215u8, 117u8, 137u8, 242u8, 168u8, 57u8, 175u8, 59u8, - 243u8, 132u8, 133u8, 246u8, 37u8, 154u8, 205u8, 191u8, 114u8, 114u8, 167u8, - 104u8, 27u8, 144u8, 56u8, 61u8, 159u8, 9u8, 79u8, 190u8, 239u8, - ], - ) - } - #[doc = " Get the session info for the given session, if stored."] - #[doc = ""] - #[doc = " NOTE: This function is only available since parachain host version 2."] - pub fn session_info( - &self, - index: ::core::primitive::u32, - ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< - ::core::option::Option, - > { - let mut result = Vec::new(); - index.encode_to(&mut result); - ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( - "ParachainHost_session_info", - result, - [ - 107u8, 247u8, 186u8, 88u8, 134u8, 234u8, 251u8, 220u8, 134u8, 138u8, 130u8, - 168u8, 253u8, 101u8, 235u8, 126u8, 190u8, 37u8, 77u8, 182u8, 195u8, 100u8, - 63u8, 173u8, 147u8, 98u8, 217u8, 235u8, 220u8, 87u8, 83u8, 198u8, - ], - ) - } - #[doc = " Submits a PVF pre-checking statement into the transaction pool."] - #[doc = ""] - #[doc = " NOTE: This function is only available since parachain host version 2."] - pub fn submit_pvf_check_statement( - &self, - stmt: runtime_types::polkadot_primitives::v4::PvfCheckStatement, - signature: runtime_types::polkadot_primitives::v4::validator_app::Signature, - ) -> ::subxt::runtime_api::StaticRuntimeApiPayload<()> { - let mut result = Vec::new(); - stmt.encode_to(&mut result); - signature.encode_to(&mut result); - ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( - "ParachainHost_submit_pvf_check_statement", - result, - [ - 228u8, 45u8, 8u8, 229u8, 69u8, 35u8, 3u8, 231u8, 235u8, 184u8, 19u8, 96u8, - 72u8, 62u8, 15u8, 218u8, 27u8, 134u8, 19u8, 179u8, 239u8, 1u8, 207u8, 39u8, - 50u8, 171u8, 59u8, 204u8, 143u8, 247u8, 27u8, 179u8, - ], - ) - } - #[doc = " Returns code hashes of PVFs that require pre-checking by validators in the active set."] - #[doc = ""] - #[doc = " NOTE: This function is only available since parachain host version 2."] - pub fn pvfs_require_precheck( - &self, - ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< - ::std::vec::Vec, - > { - let result = Vec::new(); - ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( - "ParachainHost_pvfs_require_precheck", - result, - [ - 58u8, 208u8, 110u8, 249u8, 77u8, 56u8, 39u8, 46u8, 196u8, 209u8, 189u8, - 200u8, 147u8, 235u8, 247u8, 235u8, 125u8, 230u8, 11u8, 151u8, 137u8, 118u8, - 110u8, 179u8, 72u8, 53u8, 127u8, 149u8, 252u8, 20u8, 165u8, 239u8, - ], - ) - } - #[doc = " Fetch the hash of the validation code used by a para, making the given `OccupiedCoreAssumption`."] - #[doc = ""] - #[doc = " NOTE: This function is only available since parachain host version 2."] - pub fn validation_code_hash( - &self, - para_id: runtime_types::polkadot_parachain::primitives::Id, - assumption: runtime_types::polkadot_primitives::v4::OccupiedCoreAssumption, - ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< - ::core::option::Option< - runtime_types::polkadot_parachain::primitives::ValidationCodeHash, - >, - > { - let mut result = Vec::new(); - para_id.encode_to(&mut result); - assumption.encode_to(&mut result); - ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( - "ParachainHost_validation_code_hash", - result, - [ - 232u8, 173u8, 117u8, 125u8, 245u8, 188u8, 20u8, 124u8, 255u8, 219u8, 2u8, - 95u8, 131u8, 3u8, 122u8, 190u8, 240u8, 184u8, 8u8, 239u8, 85u8, 107u8, - 59u8, 105u8, 206u8, 130u8, 65u8, 142u8, 130u8, 193u8, 143u8, 199u8, - ], - ) - } - #[doc = " Returns all onchain disputes."] - pub fn disputes( - &self, - ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< - ::std::vec::Vec<( - ::core::primitive::u32, - runtime_types::polkadot_core_primitives::CandidateHash, - runtime_types::polkadot_primitives::v4::DisputeState<::core::primitive::u32>, - )>, - > { - let result = Vec::new(); - ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( - "ParachainHost_disputes", - result, - [ - 90u8, 171u8, 12u8, 104u8, 109u8, 92u8, 149u8, 72u8, 109u8, 39u8, 75u8, - 241u8, 239u8, 78u8, 46u8, 134u8, 139u8, 200u8, 144u8, 213u8, 218u8, 64u8, - 98u8, 102u8, 159u8, 211u8, 154u8, 178u8, 187u8, 146u8, 193u8, 34u8, - ], - ) - } - #[doc = " Returns execution parameters for the session."] - pub fn session_executor_params( - &self, - session_index: ::core::primitive::u32, - ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< - ::core::option::Option< - runtime_types::polkadot_primitives::v4::executor_params::ExecutorParams, - >, - > { - let mut result = Vec::new(); - session_index.encode_to(&mut result); - ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( - "ParachainHost_session_executor_params", - result, - [ - 129u8, 198u8, 157u8, 37u8, 138u8, 132u8, 5u8, 183u8, 233u8, 119u8, 99u8, - 173u8, 22u8, 240u8, 182u8, 246u8, 101u8, 3u8, 149u8, 130u8, 107u8, 60u8, - 152u8, 217u8, 86u8, 150u8, 253u8, 170u8, 10u8, 86u8, 183u8, 33u8, - ], - ) - } - } - #[doc = " API necessary for BEEFY voters."] - pub struct BeefyApi; - impl BeefyApi { - #[doc = " Return the block number where BEEFY consensus is enabled/started"] - pub fn beefy_genesis( - &self, - ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< - ::core::option::Option<::core::primitive::u32>, - > { - let result = Vec::new(); - ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( - "BeefyApi_beefy_genesis", - result, - [ - 80u8, 47u8, 5u8, 126u8, 16u8, 213u8, 203u8, 179u8, 124u8, 14u8, 227u8, - 61u8, 164u8, 158u8, 115u8, 127u8, 132u8, 90u8, 222u8, 87u8, 249u8, 214u8, - 100u8, 13u8, 201u8, 186u8, 229u8, 217u8, 21u8, 152u8, 197u8, 60u8, - ], - ) - } - #[doc = " Return the current active BEEFY validator set"] - pub fn validator_set( - &self, - ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< - ::core::option::Option< - runtime_types::sp_consensus_beefy::ValidatorSet< - runtime_types::sp_consensus_beefy::crypto::Public, - >, - >, - > { - let result = Vec::new(); - ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( - "BeefyApi_validator_set", - result, - [ - 49u8, 44u8, 188u8, 42u8, 35u8, 233u8, 181u8, 44u8, 232u8, 88u8, 1u8, 100u8, - 90u8, 42u8, 139u8, 239u8, 25u8, 44u8, 183u8, 164u8, 161u8, 129u8, 12u8, - 158u8, 41u8, 39u8, 218u8, 43u8, 78u8, 70u8, 156u8, 159u8, - ], - ) - } - #[doc = " Submits an unsigned extrinsic to report an equivocation. The caller"] - #[doc = " must provide the equivocation proof and a key ownership proof"] - #[doc = " (should be obtained using `generate_key_ownership_proof`). The"] - #[doc = " extrinsic will be unsigned and should only be accepted for local"] - #[doc = " authorship (not to be broadcast to the network). This method returns"] - #[doc = " `None` when creation of the extrinsic fails, e.g. if equivocation"] - #[doc = " reporting is disabled for the given runtime (i.e. this method is"] - #[doc = " hardcoded to return `None`). Only useful in an offchain context."] - pub fn submit_report_equivocation_unsigned_extrinsic( - &self, - equivocation_proof: runtime_types::sp_consensus_beefy::EquivocationProof< - ::core::primitive::u32, - runtime_types::sp_consensus_beefy::crypto::Public, - runtime_types::sp_consensus_beefy::crypto::Signature, - >, - key_owner_proof: runtime_types::sp_consensus_beefy::OpaqueKeyOwnershipProof, - ) -> ::subxt::runtime_api::StaticRuntimeApiPayload<::core::option::Option<()>> - { - let mut result = Vec::new(); - equivocation_proof.encode_to(&mut result); - key_owner_proof.encode_to(&mut result); - ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( - "BeefyApi_submit_report_equivocation_unsigned_extrinsic", - result, - [ - 232u8, 114u8, 155u8, 57u8, 178u8, 76u8, 154u8, 140u8, 49u8, 60u8, 71u8, - 98u8, 167u8, 4u8, 248u8, 159u8, 0u8, 36u8, 119u8, 102u8, 188u8, 10u8, - 137u8, 252u8, 249u8, 124u8, 208u8, 173u8, 252u8, 185u8, 117u8, 35u8, - ], - ) - } - #[doc = " Generates a proof of key ownership for the given authority in the"] - #[doc = " given set. An example usage of this module is coupled with the"] - #[doc = " session historical module to prove that a given authority key is"] - #[doc = " tied to a given staking identity during a specific session. Proofs"] - #[doc = " of key ownership are necessary for submitting equivocation reports."] - #[doc = " NOTE: even though the API takes a `set_id` as parameter the current"] - #[doc = " implementations ignores this parameter and instead relies on this"] - #[doc = " method being called at the correct block height, i.e. any point at"] - #[doc = " which the given set id is live on-chain. Future implementations will"] - #[doc = " instead use indexed data through an offchain worker, not requiring"] - #[doc = " older states to be available."] - pub fn generate_key_ownership_proof( - &self, - set_id: ::core::primitive::u64, - authority_id: runtime_types::sp_consensus_beefy::crypto::Public, - ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< - ::core::option::Option, - > { - let mut result = Vec::new(); - set_id.encode_to(&mut result); - authority_id.encode_to(&mut result); - ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( - "BeefyApi_generate_key_ownership_proof", - result, - [ - 219u8, 146u8, 168u8, 108u8, 180u8, 133u8, 182u8, 104u8, 153u8, 14u8, 209u8, - 207u8, 32u8, 226u8, 81u8, 196u8, 243u8, 208u8, 0u8, 94u8, 197u8, 232u8, - 181u8, 251u8, 182u8, 12u8, 245u8, 231u8, 198u8, 76u8, 59u8, 53u8, - ], - ) - } - } - #[doc = " API to interact with MMR pallet."] - pub struct MmrApi; - impl MmrApi { - #[doc = " Return the on-chain MMR root hash."] - pub fn mmr_root( - &self, - ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< - ::core::result::Result< - ::subxt::utils::H256, - runtime_types::sp_mmr_primitives::Error, - >, - > { - let result = Vec::new(); - ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( - "MmrApi_mmr_root", - result, - [ - 83u8, 202u8, 15u8, 77u8, 255u8, 136u8, 129u8, 210u8, 154u8, 178u8, 197u8, - 94u8, 231u8, 151u8, 68u8, 172u8, 112u8, 116u8, 30u8, 138u8, 142u8, 166u8, - 16u8, 4u8, 24u8, 204u8, 18u8, 48u8, 43u8, 103u8, 30u8, 96u8, - ], - ) - } - #[doc = " Return the number of MMR blocks in the chain."] - pub fn mmr_leaf_count( - &self, - ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< - ::core::result::Result< - ::core::primitive::u64, - runtime_types::sp_mmr_primitives::Error, - >, - > { - let result = Vec::new(); - ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( - "MmrApi_mmr_leaf_count", - result, - [ - 81u8, 145u8, 75u8, 170u8, 197u8, 235u8, 92u8, 81u8, 54u8, 16u8, 239u8, - 136u8, 174u8, 255u8, 90u8, 27u8, 24u8, 51u8, 152u8, 130u8, 249u8, 247u8, - 44u8, 173u8, 4u8, 21u8, 72u8, 44u8, 198u8, 145u8, 94u8, 77u8, - ], - ) - } - #[doc = " Generate MMR proof for a series of block numbers. If `best_known_block_number = Some(n)`,"] - #[doc = " use historical MMR state at given block height `n`. Else, use current MMR state."] - pub fn generate_proof( - &self, - block_numbers: ::std::vec::Vec<::core::primitive::u32>, - best_known_block_number: ::core::option::Option<::core::primitive::u32>, - ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< - ::core::result::Result< - ( - ::std::vec::Vec, - runtime_types::sp_mmr_primitives::Proof<::subxt::utils::H256>, - ), - runtime_types::sp_mmr_primitives::Error, - >, - > { - let mut result = Vec::new(); - block_numbers.encode_to(&mut result); - best_known_block_number.encode_to(&mut result); - ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( - "MmrApi_generate_proof", - result, - [ - 180u8, 123u8, 115u8, 227u8, 101u8, 119u8, 103u8, 230u8, 66u8, 255u8, 15u8, - 197u8, 60u8, 180u8, 27u8, 47u8, 73u8, 121u8, 179u8, 219u8, 161u8, 37u8, - 57u8, 131u8, 104u8, 106u8, 206u8, 230u8, 168u8, 185u8, 206u8, 32u8, - ], - ) - } - #[doc = " Verify MMR proof against on-chain MMR for a batch of leaves."] - #[doc = ""] - #[doc = " Note this function will use on-chain MMR root hash and check if the proof matches the hash."] - #[doc = " Note, the leaves should be sorted such that corresponding leaves and leaf indices have the"] - #[doc = " same position in both the `leaves` vector and the `leaf_indices` vector contained in the [Proof]"] - pub fn verify_proof( - &self, - leaves: ::std::vec::Vec, - proof: runtime_types::sp_mmr_primitives::Proof<::subxt::utils::H256>, - ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< - ::core::result::Result<(), runtime_types::sp_mmr_primitives::Error>, - > { - let mut result = Vec::new(); - leaves.encode_to(&mut result); - proof.encode_to(&mut result); - ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( - "MmrApi_verify_proof", - result, - [ - 118u8, 13u8, 68u8, 159u8, 27u8, 144u8, 229u8, 72u8, 88u8, 106u8, 193u8, - 86u8, 228u8, 243u8, 28u8, 243u8, 99u8, 241u8, 153u8, 169u8, 121u8, 139u8, - 60u8, 244u8, 153u8, 110u8, 239u8, 149u8, 122u8, 164u8, 53u8, 9u8, - ], - ) - } - #[doc = " Verify MMR proof against given root hash for a batch of leaves."] - #[doc = ""] - #[doc = " Note this function does not require any on-chain storage - the"] - #[doc = " proof is verified against given MMR root hash."] - #[doc = ""] - #[doc = " Note, the leaves should be sorted such that corresponding leaves and leaf indices have the"] - #[doc = " same position in both the `leaves` vector and the `leaf_indices` vector contained in the [Proof]"] - pub fn verify_proof_stateless( - &self, - root: ::subxt::utils::H256, - leaves: ::std::vec::Vec, - proof: runtime_types::sp_mmr_primitives::Proof<::subxt::utils::H256>, - ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< - ::core::result::Result<(), runtime_types::sp_mmr_primitives::Error>, - > { - let mut result = Vec::new(); - root.encode_to(&mut result); - leaves.encode_to(&mut result); - proof.encode_to(&mut result); - ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( - "MmrApi_verify_proof_stateless", - result, - [ - 152u8, 237u8, 225u8, 199u8, 238u8, 151u8, 87u8, 236u8, 210u8, 38u8, 168u8, - 160u8, 166u8, 27u8, 186u8, 227u8, 160u8, 154u8, 120u8, 127u8, 98u8, 247u8, - 111u8, 99u8, 211u8, 236u8, 39u8, 221u8, 250u8, 110u8, 232u8, 0u8, - ], - ) - } - } - #[doc = " APIs for integrating the GRANDPA finality gadget into runtimes."] - #[doc = " This should be implemented on the runtime side."] - #[doc = ""] - #[doc = " This is primarily used for negotiating authority-set changes for the"] - #[doc = " gadget. GRANDPA uses a signaling model of changing authority sets:"] - #[doc = " changes should be signaled with a delay of N blocks, and then automatically"] - #[doc = " applied in the runtime after those N blocks have passed."] - #[doc = ""] - #[doc = " The consensus protocol will coordinate the handoff externally."] - pub struct GrandpaApi; - impl GrandpaApi { - #[doc = " Get the current GRANDPA authorities and weights. This should not change except"] - #[doc = " for when changes are scheduled and the corresponding delay has passed."] - #[doc = ""] - #[doc = " When called at block B, it will return the set of authorities that should be"] - #[doc = " used to finalize descendants of this block (B+1, B+2, ...). The block B itself"] - #[doc = " is finalized by the authorities from block B-1."] - pub fn grandpa_authorities( - &self, - ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< - ::std::vec::Vec<( - runtime_types::sp_consensus_grandpa::app::Public, - ::core::primitive::u64, - )>, - > { - let result = Vec::new(); - ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( - "GrandpaApi_grandpa_authorities", - result, - [ - 78u8, 213u8, 85u8, 178u8, 49u8, 70u8, 10u8, 221u8, 93u8, 91u8, 250u8, 59u8, - 80u8, 141u8, 62u8, 126u8, 55u8, 235u8, 163u8, 12u8, 21u8, 199u8, 240u8, - 209u8, 95u8, 63u8, 65u8, 73u8, 141u8, 42u8, 78u8, 154u8, - ], - ) - } - #[doc = " Submits an unsigned extrinsic to report an equivocation. The caller"] - #[doc = " must provide the equivocation proof and a key ownership proof"] - #[doc = " (should be obtained using `generate_key_ownership_proof`). The"] - #[doc = " extrinsic will be unsigned and should only be accepted for local"] - #[doc = " authorship (not to be broadcast to the network). This method returns"] - #[doc = " `None` when creation of the extrinsic fails, e.g. if equivocation"] - #[doc = " reporting is disabled for the given runtime (i.e. this method is"] - #[doc = " hardcoded to return `None`). Only useful in an offchain context."] - pub fn submit_report_equivocation_unsigned_extrinsic( - &self, - equivocation_proof: runtime_types::sp_consensus_grandpa::EquivocationProof< - ::subxt::utils::H256, - ::core::primitive::u32, - >, - key_owner_proof: runtime_types::sp_consensus_grandpa::OpaqueKeyOwnershipProof, - ) -> ::subxt::runtime_api::StaticRuntimeApiPayload<::core::option::Option<()>> - { - let mut result = Vec::new(); - equivocation_proof.encode_to(&mut result); - key_owner_proof.encode_to(&mut result); - ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( - "GrandpaApi_submit_report_equivocation_unsigned_extrinsic", - result, - [ - 226u8, 83u8, 137u8, 173u8, 45u8, 138u8, 210u8, 202u8, 113u8, 196u8, 110u8, - 68u8, 31u8, 192u8, 127u8, 100u8, 125u8, 225u8, 30u8, 252u8, 160u8, 109u8, - 251u8, 96u8, 52u8, 214u8, 38u8, 91u8, 158u8, 71u8, 125u8, 220u8, - ], - ) - } - #[doc = " Generates a proof of key ownership for the given authority in the"] - #[doc = " given set. An example usage of this module is coupled with the"] - #[doc = " session historical module to prove that a given authority key is"] - #[doc = " tied to a given staking identity during a specific session. Proofs"] - #[doc = " of key ownership are necessary for submitting equivocation reports."] - #[doc = " NOTE: even though the API takes a `set_id` as parameter the current"] - #[doc = " implementations ignore this parameter and instead rely on this"] - #[doc = " method being called at the correct block height, i.e. any point at"] - #[doc = " which the given set id is live on-chain. Future implementations will"] - #[doc = " instead use indexed data through an offchain worker, not requiring"] - #[doc = " older states to be available."] - pub fn generate_key_ownership_proof( - &self, - set_id: ::core::primitive::u64, - authority_id: runtime_types::sp_consensus_grandpa::app::Public, - ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< - ::core::option::Option< - runtime_types::sp_consensus_grandpa::OpaqueKeyOwnershipProof, - >, - > { - let mut result = Vec::new(); - set_id.encode_to(&mut result); - authority_id.encode_to(&mut result); - ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( - "GrandpaApi_generate_key_ownership_proof", - result, - [ - 149u8, 80u8, 146u8, 102u8, 63u8, 184u8, 111u8, 153u8, 143u8, 71u8, 109u8, - 162u8, 117u8, 45u8, 139u8, 245u8, 154u8, 252u8, 117u8, 224u8, 10u8, 6u8, - 143u8, 137u8, 58u8, 213u8, 215u8, 110u8, 180u8, 142u8, 234u8, 182u8, - ], - ) - } - #[doc = " Get current GRANDPA authority set id."] - pub fn current_set_id( - &self, - ) -> ::subxt::runtime_api::StaticRuntimeApiPayload<::core::primitive::u64> { - let result = Vec::new(); - ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( - "GrandpaApi_current_set_id", - result, - [ - 39u8, 245u8, 166u8, 229u8, 239u8, 200u8, 179u8, 64u8, 193u8, 93u8, 41u8, - 40u8, 208u8, 231u8, 75u8, 197u8, 45u8, 119u8, 131u8, 245u8, 84u8, 249u8, - 60u8, 7u8, 180u8, 176u8, 119u8, 130u8, 247u8, 134u8, 211u8, 240u8, - ], - ) - } - } - #[doc = " API necessary for block authorship with BABE."] - pub struct BabeApi; - impl BabeApi { - #[doc = " Return the configuration for BABE."] - pub fn configuration( - &self, - ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< - runtime_types::sp_consensus_babe::BabeConfiguration, - > { - let result = Vec::new(); - ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( - "BabeApi_configuration", - result, - [ - 101u8, 27u8, 68u8, 108u8, 36u8, 12u8, 205u8, 58u8, 238u8, 195u8, 171u8, - 167u8, 248u8, 76u8, 92u8, 226u8, 241u8, 192u8, 151u8, 31u8, 6u8, 200u8, - 69u8, 180u8, 107u8, 134u8, 221u8, 99u8, 237u8, 223u8, 50u8, 175u8, - ], - ) - } - #[doc = " Returns the slot that started the current epoch."] - pub fn current_epoch_start( - &self, - ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< - runtime_types::sp_consensus_slots::Slot, - > { - let result = Vec::new(); - ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( - "BabeApi_current_epoch_start", - result, - [ - 67u8, 178u8, 67u8, 242u8, 228u8, 74u8, 93u8, 166u8, 160u8, 9u8, 109u8, - 174u8, 12u8, 82u8, 239u8, 200u8, 96u8, 54u8, 235u8, 184u8, 159u8, 221u8, - 72u8, 244u8, 83u8, 24u8, 239u8, 24u8, 152u8, 177u8, 211u8, 205u8, - ], - ) - } - #[doc = " Returns information regarding the current epoch."] - pub fn current_epoch( - &self, - ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< - runtime_types::sp_consensus_babe::Epoch, - > { - let result = Vec::new(); - ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( - "BabeApi_current_epoch", - result, - [ - 166u8, 104u8, 201u8, 148u8, 149u8, 137u8, 223u8, 165u8, 82u8, 4u8, 130u8, - 58u8, 52u8, 193u8, 201u8, 80u8, 120u8, 212u8, 76u8, 221u8, 11u8, 131u8, - 115u8, 8u8, 9u8, 59u8, 191u8, 165u8, 148u8, 24u8, 194u8, 162u8, - ], - ) - } - #[doc = " Returns information regarding the next epoch (which was already"] - #[doc = " previously announced)."] - pub fn next_epoch( - &self, - ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< - runtime_types::sp_consensus_babe::Epoch, - > { - let result = Vec::new(); - ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( - "BabeApi_next_epoch", - result, - [ - 251u8, 29u8, 230u8, 254u8, 174u8, 38u8, 55u8, 30u8, 93u8, 42u8, 254u8, - 172u8, 183u8, 250u8, 104u8, 211u8, 79u8, 211u8, 55u8, 98u8, 253u8, 73u8, - 137u8, 185u8, 116u8, 94u8, 20u8, 232u8, 224u8, 136u8, 86u8, 182u8, - ], - ) - } - #[doc = " Generates a proof of key ownership for the given authority in the"] - #[doc = " current epoch. An example usage of this module is coupled with the"] - #[doc = " session historical module to prove that a given authority key is"] - #[doc = " tied to a given staking identity during a specific session. Proofs"] - #[doc = " of key ownership are necessary for submitting equivocation reports."] - #[doc = " NOTE: even though the API takes a `slot` as parameter the current"] - #[doc = " implementations ignores this parameter and instead relies on this"] - #[doc = " method being called at the correct block height, i.e. any point at"] - #[doc = " which the epoch for the given slot is live on-chain. Future"] - #[doc = " implementations will instead use indexed data through an offchain"] - #[doc = " worker, not requiring older states to be available."] - pub fn generate_key_ownership_proof( - &self, - slot: runtime_types::sp_consensus_slots::Slot, - authority_id: runtime_types::sp_consensus_babe::app::Public, - ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< - ::core::option::Option, - > { - let mut result = Vec::new(); - slot.encode_to(&mut result); - authority_id.encode_to(&mut result); - ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( - "BabeApi_generate_key_ownership_proof", - result, - [ - 16u8, 78u8, 1u8, 172u8, 172u8, 253u8, 240u8, 175u8, 90u8, 130u8, 90u8, - 69u8, 249u8, 12u8, 192u8, 134u8, 131u8, 248u8, 186u8, 166u8, 240u8, 182u8, - 177u8, 0u8, 107u8, 151u8, 200u8, 41u8, 157u8, 150u8, 162u8, 244u8, - ], - ) - } - #[doc = " Submits an unsigned extrinsic to report an equivocation. The caller"] - #[doc = " must provide the equivocation proof and a key ownership proof"] - #[doc = " (should be obtained using `generate_key_ownership_proof`). The"] - #[doc = " extrinsic will be unsigned and should only be accepted for local"] - #[doc = " authorship (not to be broadcast to the network). This method returns"] - #[doc = " `None` when creation of the extrinsic fails, e.g. if equivocation"] - #[doc = " reporting is disabled for the given runtime (i.e. this method is"] - #[doc = " hardcoded to return `None`). Only useful in an offchain context."] - pub fn submit_report_equivocation_unsigned_extrinsic( - &self, - equivocation_proof: runtime_types::sp_consensus_slots::EquivocationProof< - runtime_types::sp_runtime::generic::header::Header< + > { + ::subxt::runtime_api::Payload::new_static( + "BlockBuilder_finalize_block", + inputs::FinalizeBlock {}, + [ + 78u8, 179u8, 67u8, 170u8, 213u8, 230u8, 122u8, 98u8, 76u8, 244u8, + 225u8, 219u8, 83u8, 115u8, 94u8, 229u8, 93u8, 142u8, 120u8, 172u8, + 87u8, 99u8, 120u8, 41u8, 143u8, 184u8, 71u8, 49u8, 126u8, 55u8, 240u8, + 125u8, + ], + ) + } + #[doc = " Generate inherent extrinsics. The inherent data will vary from chain to chain."] pub fn inherent_extrinsics (& self , inherent : runtime_types :: sp_inherents :: InherentData ,) -> :: subxt :: runtime_api :: Payload < inputs :: InherentExtrinsics , :: std :: vec :: Vec < runtime_types :: sp_runtime :: generic :: unchecked_extrinsic :: UncheckedExtrinsic < :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , () > , runtime_types :: polkadot_runtime :: RuntimeCall , runtime_types :: sp_runtime :: MultiSignature , (runtime_types :: frame_system :: extensions :: check_non_zero_sender :: CheckNonZeroSender , runtime_types :: frame_system :: extensions :: check_spec_version :: CheckSpecVersion , runtime_types :: frame_system :: extensions :: check_tx_version :: CheckTxVersion , runtime_types :: frame_system :: extensions :: check_genesis :: CheckGenesis , runtime_types :: frame_system :: extensions :: check_mortality :: CheckMortality , runtime_types :: frame_system :: extensions :: check_nonce :: CheckNonce , runtime_types :: frame_system :: extensions :: check_weight :: CheckWeight , runtime_types :: pallet_transaction_payment :: ChargeTransactionPayment , runtime_types :: polkadot_runtime_common :: claims :: PrevalidateAttests ,) > > >{ + ::subxt::runtime_api::Payload::new_static( + "BlockBuilder_inherent_extrinsics", + inputs::InherentExtrinsics { inherent }, + [ + 75u8, 86u8, 85u8, 104u8, 125u8, 169u8, 23u8, 92u8, 162u8, 73u8, 65u8, + 223u8, 100u8, 24u8, 201u8, 157u8, 145u8, 208u8, 238u8, 11u8, 255u8, + 98u8, 0u8, 211u8, 189u8, 94u8, 5u8, 123u8, 25u8, 1u8, 88u8, 234u8, + ], + ) + } + #[doc = " Check that the inherents are valid. The inherent data will vary from chain to chain."] + pub fn check_inherents( + &self, + block : runtime_types :: sp_runtime :: generic :: block :: Block < runtime_types :: sp_runtime :: generic :: header :: Header < :: core :: primitive :: u32 , runtime_types :: sp_runtime :: traits :: BlakeTwo256 > , runtime_types :: sp_runtime :: generic :: unchecked_extrinsic :: UncheckedExtrinsic < :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , () > , runtime_types :: polkadot_runtime :: RuntimeCall , runtime_types :: sp_runtime :: MultiSignature , (runtime_types :: frame_system :: extensions :: check_non_zero_sender :: CheckNonZeroSender , runtime_types :: frame_system :: extensions :: check_spec_version :: CheckSpecVersion , runtime_types :: frame_system :: extensions :: check_tx_version :: CheckTxVersion , runtime_types :: frame_system :: extensions :: check_genesis :: CheckGenesis , runtime_types :: frame_system :: extensions :: check_mortality :: CheckMortality , runtime_types :: frame_system :: extensions :: check_nonce :: CheckNonce , runtime_types :: frame_system :: extensions :: check_weight :: CheckWeight , runtime_types :: pallet_transaction_payment :: ChargeTransactionPayment , runtime_types :: polkadot_runtime_common :: claims :: PrevalidateAttests ,) > >, + data: runtime_types::sp_inherents::InherentData, + ) -> ::subxt::runtime_api::Payload< + inputs::CheckInherents, + runtime_types::sp_inherents::CheckInherentsResult, + > { + ::subxt::runtime_api::Payload::new_static( + "BlockBuilder_check_inherents", + inputs::CheckInherents { block, data }, + [ + 162u8, 99u8, 46u8, 228u8, 124u8, 158u8, 224u8, 212u8, 90u8, 101u8, + 133u8, 173u8, 82u8, 61u8, 131u8, 131u8, 254u8, 209u8, 17u8, 181u8, + 87u8, 190u8, 80u8, 165u8, 172u8, 179u8, 121u8, 202u8, 126u8, 48u8, + 254u8, 112u8, + ], + ) + } + } + pub mod inputs { + use super::root_mod; + 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 ApplyExtrinsic { pub extrinsic : runtime_types :: sp_runtime :: generic :: unchecked_extrinsic :: UncheckedExtrinsic < :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , () > , runtime_types :: polkadot_runtime :: RuntimeCall , runtime_types :: sp_runtime :: MultiSignature , (runtime_types :: frame_system :: extensions :: check_non_zero_sender :: CheckNonZeroSender , runtime_types :: frame_system :: extensions :: check_spec_version :: CheckSpecVersion , runtime_types :: frame_system :: extensions :: check_tx_version :: CheckTxVersion , runtime_types :: frame_system :: extensions :: check_genesis :: CheckGenesis , runtime_types :: frame_system :: extensions :: check_mortality :: CheckMortality , runtime_types :: frame_system :: extensions :: check_nonce :: CheckNonce , runtime_types :: frame_system :: extensions :: check_weight :: CheckWeight , runtime_types :: pallet_transaction_payment :: ChargeTransactionPayment , runtime_types :: polkadot_runtime_common :: claims :: PrevalidateAttests ,) > , } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct FinalizeBlock {} + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct InherentExtrinsics { + pub inherent: runtime_types::sp_inherents::InherentData, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct CheckInherents { pub block : runtime_types :: sp_runtime :: generic :: block :: Block < runtime_types :: sp_runtime :: generic :: header :: Header < :: core :: primitive :: u32 , runtime_types :: sp_runtime :: traits :: BlakeTwo256 > , runtime_types :: sp_runtime :: generic :: unchecked_extrinsic :: UncheckedExtrinsic < :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , () > , runtime_types :: polkadot_runtime :: RuntimeCall , runtime_types :: sp_runtime :: MultiSignature , (runtime_types :: frame_system :: extensions :: check_non_zero_sender :: CheckNonZeroSender , runtime_types :: frame_system :: extensions :: check_spec_version :: CheckSpecVersion , runtime_types :: frame_system :: extensions :: check_tx_version :: CheckTxVersion , runtime_types :: frame_system :: extensions :: check_genesis :: CheckGenesis , runtime_types :: frame_system :: extensions :: check_mortality :: CheckMortality , runtime_types :: frame_system :: extensions :: check_nonce :: CheckNonce , runtime_types :: frame_system :: extensions :: check_weight :: CheckWeight , runtime_types :: pallet_transaction_payment :: ChargeTransactionPayment , runtime_types :: polkadot_runtime_common :: claims :: PrevalidateAttests ,) > > , pub data : runtime_types :: sp_inherents :: InherentData , } + } + } + pub mod nomination_pools_api { + use super::root_mod; + use super::runtime_types; + #[doc = " Runtime api for accessing information about nomination pools."] + pub struct NominationPoolsApi; + impl NominationPoolsApi { + #[doc = " Returns the pending rewards for the member that the AccountId was given for."] + pub fn pending_rewards( + &self, + who: ::subxt::utils::AccountId32, + ) -> ::subxt::runtime_api::Payload + { + ::subxt::runtime_api::Payload::new_static( + "NominationPoolsApi_pending_rewards", + inputs::PendingRewards { who }, + [ + 235u8, 64u8, 57u8, 70u8, 111u8, 27u8, 62u8, 236u8, 36u8, 192u8, 103u8, + 89u8, 221u8, 194u8, 46u8, 223u8, 71u8, 249u8, 33u8, 135u8, 43u8, 42u8, + 147u8, 57u8, 130u8, 44u8, 35u8, 132u8, 163u8, 153u8, 201u8, 105u8, + ], + ) + } + #[doc = " Returns the equivalent balance of `points` for a given pool."] + pub fn points_to_balance( + &self, + pool_id: ::core::primitive::u32, + points: ::core::primitive::u128, + ) -> ::subxt::runtime_api::Payload + { + ::subxt::runtime_api::Payload::new_static( + "NominationPoolsApi_points_to_balance", + inputs::PointsToBalance { pool_id, points }, + [ + 30u8, 7u8, 5u8, 95u8, 146u8, 43u8, 110u8, 21u8, 148u8, 160u8, 74u8, + 92u8, 168u8, 188u8, 74u8, 41u8, 129u8, 172u8, 138u8, 30u8, 232u8, + 214u8, 154u8, 18u8, 52u8, 87u8, 71u8, 127u8, 141u8, 177u8, 216u8, + 158u8, + ], + ) + } + #[doc = " Returns the equivalent points of `new_funds` for a given pool."] + pub fn balance_to_points( + &self, + pool_id: ::core::primitive::u32, + new_funds: ::core::primitive::u128, + ) -> ::subxt::runtime_api::Payload + { + ::subxt::runtime_api::Payload::new_static( + "NominationPoolsApi_balance_to_points", + inputs::BalanceToPoints { pool_id, new_funds }, + [ + 152u8, 165u8, 227u8, 129u8, 31u8, 108u8, 224u8, 174u8, 74u8, 192u8, + 102u8, 139u8, 17u8, 119u8, 173u8, 220u8, 52u8, 157u8, 125u8, 107u8, + 110u8, 236u8, 9u8, 93u8, 239u8, 3u8, 18u8, 140u8, 203u8, 136u8, 183u8, + 215u8, + ], + ) + } + } + pub mod inputs { + use super::root_mod; + 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 PendingRewards { + pub who: ::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 PointsToBalance { + pub pool_id: ::core::primitive::u32, + pub 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 BalanceToPoints { + pub pool_id: ::core::primitive::u32, + pub new_funds: ::core::primitive::u128, + } + } + } + pub mod staking_api { + use super::root_mod; + use super::runtime_types; + pub struct StakingApi; + impl StakingApi { + #[doc = " Returns the nominations quota for a nominator with a given balance."] + pub fn nominations_quota( + &self, + balance: ::core::primitive::u128, + ) -> ::subxt::runtime_api::Payload + { + ::subxt::runtime_api::Payload::new_static( + "StakingApi_nominations_quota", + inputs::NominationsQuota { balance }, + [ + 181u8, 19u8, 6u8, 134u8, 234u8, 67u8, 127u8, 210u8, 53u8, 38u8, 175u8, + 160u8, 243u8, 71u8, 187u8, 206u8, 178u8, 91u8, 26u8, 115u8, 18u8, + 214u8, 50u8, 208u8, 161u8, 197u8, 81u8, 13u8, 98u8, 53u8, 124u8, 62u8, + ], + ) + } + } + pub mod inputs { + use super::root_mod; + 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 NominationsQuota { + pub balance: ::core::primitive::u128, + } + } + } + pub mod tagged_transaction_queue { + use super::root_mod; + use super::runtime_types; + #[doc = " The `TaggedTransactionQueue` api trait for interfering with the transaction queue."] + pub struct TaggedTransactionQueue; + impl TaggedTransactionQueue { + #[doc = " Validate the transaction."] + #[doc = ""] + #[doc = " This method is invoked by the transaction pool to learn details about given transaction."] + #[doc = " The implementation should make sure to verify the correctness of the transaction"] + #[doc = " against current state. The given `block_hash` corresponds to the hash of the block"] + #[doc = " that is used as current state."] + #[doc = ""] + #[doc = " Note that this call may be performed by the pool multiple times and transactions"] + #[doc = " might be verified in any possible order."] + pub fn validate_transaction( + &self, + source: runtime_types::sp_runtime::transaction_validity::TransactionSource, + tx : runtime_types :: sp_runtime :: generic :: unchecked_extrinsic :: UncheckedExtrinsic < :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , () > , runtime_types :: polkadot_runtime :: RuntimeCall , runtime_types :: sp_runtime :: MultiSignature , (runtime_types :: frame_system :: extensions :: check_non_zero_sender :: CheckNonZeroSender , runtime_types :: frame_system :: extensions :: check_spec_version :: CheckSpecVersion , runtime_types :: frame_system :: extensions :: check_tx_version :: CheckTxVersion , runtime_types :: frame_system :: extensions :: check_genesis :: CheckGenesis , runtime_types :: frame_system :: extensions :: check_mortality :: CheckMortality , runtime_types :: frame_system :: extensions :: check_nonce :: CheckNonce , runtime_types :: frame_system :: extensions :: check_weight :: CheckWeight , runtime_types :: pallet_transaction_payment :: ChargeTransactionPayment , runtime_types :: polkadot_runtime_common :: claims :: PrevalidateAttests ,) >, + block_hash: ::subxt::utils::H256, + ) -> ::subxt::runtime_api::Payload< + inputs::ValidateTransaction, + ::core::result::Result< + runtime_types::sp_runtime::transaction_validity::ValidTransaction, + runtime_types::sp_runtime::transaction_validity::TransactionValidityError, + >, + > { + ::subxt::runtime_api::Payload::new_static( + "TaggedTransactionQueue_validate_transaction", + inputs::ValidateTransaction { + source, + tx, + block_hash, + }, + [ + 93u8, 180u8, 253u8, 37u8, 212u8, 54u8, 180u8, 214u8, 33u8, 5u8, 113u8, + 181u8, 25u8, 48u8, 153u8, 221u8, 78u8, 6u8, 115u8, 191u8, 72u8, 75u8, + 203u8, 171u8, 129u8, 75u8, 56u8, 60u8, 243u8, 92u8, 173u8, 12u8, + ], + ) + } + } + pub mod inputs { + use super::root_mod; + 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 ValidateTransaction { pub source : runtime_types :: sp_runtime :: transaction_validity :: TransactionSource , pub tx : runtime_types :: sp_runtime :: generic :: unchecked_extrinsic :: UncheckedExtrinsic < :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , () > , runtime_types :: polkadot_runtime :: RuntimeCall , runtime_types :: sp_runtime :: MultiSignature , (runtime_types :: frame_system :: extensions :: check_non_zero_sender :: CheckNonZeroSender , runtime_types :: frame_system :: extensions :: check_spec_version :: CheckSpecVersion , runtime_types :: frame_system :: extensions :: check_tx_version :: CheckTxVersion , runtime_types :: frame_system :: extensions :: check_genesis :: CheckGenesis , runtime_types :: frame_system :: extensions :: check_mortality :: CheckMortality , runtime_types :: frame_system :: extensions :: check_nonce :: CheckNonce , runtime_types :: frame_system :: extensions :: check_weight :: CheckWeight , runtime_types :: pallet_transaction_payment :: ChargeTransactionPayment , runtime_types :: polkadot_runtime_common :: claims :: PrevalidateAttests ,) > , pub block_hash : :: subxt :: utils :: H256 , } + } + } + pub mod offchain_worker_api { + use super::root_mod; + use super::runtime_types; + #[doc = " The offchain worker api."] + pub struct OffchainWorkerApi; + impl OffchainWorkerApi { + #[doc = " Starts the off-chain task for given block header."] + pub fn offchain_worker( + &self, + header: runtime_types::sp_runtime::generic::header::Header< ::core::primitive::u32, runtime_types::sp_runtime::traits::BlakeTwo256, >, - runtime_types::sp_consensus_babe::app::Public, - >, - key_owner_proof: runtime_types::sp_consensus_babe::OpaqueKeyOwnershipProof, - ) -> ::subxt::runtime_api::StaticRuntimeApiPayload<::core::option::Option<()>> - { - let mut result = Vec::new(); - equivocation_proof.encode_to(&mut result); - key_owner_proof.encode_to(&mut result); - ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( - "BabeApi_submit_report_equivocation_unsigned_extrinsic", - result, - [ - 255u8, 136u8, 248u8, 244u8, 155u8, 51u8, 20u8, 157u8, 93u8, 19u8, 24u8, - 170u8, 72u8, 199u8, 222u8, 111u8, 164u8, 126u8, 159u8, 209u8, 198u8, 37u8, - 113u8, 12u8, 36u8, 117u8, 131u8, 7u8, 130u8, 85u8, 177u8, 109u8, - ], - ) - } - } - #[doc = " The authority discovery api."] - #[doc = ""] - #[doc = " This api is used by the `client/authority-discovery` module to retrieve identifiers"] - #[doc = " of the current and next authority set."] - pub struct AuthorityDiscoveryApi; - impl AuthorityDiscoveryApi { - #[doc = " Retrieve authority identifiers of the current and next authority set."] - pub fn authorities( - &self, - ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< - ::std::vec::Vec, - > { - let result = Vec::new(); - ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( - "AuthorityDiscoveryApi_authorities", - result, - [ - 104u8, 50u8, 187u8, 116u8, 97u8, 112u8, 203u8, 212u8, 27u8, 108u8, 253u8, - 8u8, 103u8, 104u8, 63u8, 176u8, 178u8, 179u8, 154u8, 104u8, 167u8, 241u8, - 76u8, 136u8, 102u8, 130u8, 88u8, 115u8, 104u8, 64u8, 224u8, 98u8, - ], - ) - } - } - #[doc = " Session keys runtime api."] - pub struct SessionKeys; - impl SessionKeys { - #[doc = " Generate a set of session keys with optionally using the given seed."] - #[doc = " The keys should be stored within the keystore exposed via runtime"] - #[doc = " externalities."] - #[doc = ""] - #[doc = " The seed needs to be a valid `utf8` string."] - #[doc = ""] - #[doc = " Returns the concatenated SCALE encoded public keys."] - pub fn generate_session_keys( - &self, - seed: ::core::option::Option<::std::vec::Vec<::core::primitive::u8>>, - ) -> ::subxt::runtime_api::StaticRuntimeApiPayload<::std::vec::Vec<::core::primitive::u8>> - { - let mut result = Vec::new(); - seed.encode_to(&mut result); - ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( - "SessionKeys_generate_session_keys", - result, - [ - 238u8, 35u8, 56u8, 56u8, 5u8, 183u8, 237u8, 233u8, 220u8, 77u8, 245u8, - 218u8, 120u8, 21u8, 3u8, 95u8, 106u8, 140u8, 212u8, 37u8, 14u8, 180u8, - 24u8, 11u8, 137u8, 193u8, 111u8, 91u8, 235u8, 127u8, 202u8, 230u8, - ], - ) - } - #[doc = " Decode the given public session keys."] - #[doc = ""] - #[doc = " Returns the list of public raw public keys + key type."] - pub fn decode_session_keys( - &self, - encoded: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< - ::core::option::Option< - ::std::vec::Vec<( - ::std::vec::Vec<::core::primitive::u8>, - runtime_types::sp_core::crypto::KeyTypeId, - )>, - >, - > { - let mut result = Vec::new(); - encoded.encode_to(&mut result); - ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( - "SessionKeys_decode_session_keys", - result, - [ - 134u8, 106u8, 224u8, 190u8, 133u8, 212u8, 253u8, 184u8, 222u8, 76u8, 44u8, - 75u8, 168u8, 18u8, 3u8, 169u8, 32u8, 8u8, 46u8, 5u8, 155u8, 45u8, 149u8, - 144u8, 41u8, 174u8, 130u8, 133u8, 22u8, 150u8, 89u8, 196u8, - ], - ) - } - } - #[doc = " The API to query account nonce (aka transaction index)."] - pub struct AccountNonceApi; - impl AccountNonceApi { - #[doc = " Get current account nonce of given `AccountId`."] - pub fn account_nonce( - &self, - account: ::subxt::utils::AccountId32, - ) -> ::subxt::runtime_api::StaticRuntimeApiPayload<::core::primitive::u32> { - let mut result = Vec::new(); - account.encode_to(&mut result); - ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( - "AccountNonceApi_account_nonce", - result, - [ - 115u8, 50u8, 18u8, 201u8, 220u8, 171u8, 244u8, 16u8, 58u8, 183u8, 173u8, - 196u8, 253u8, 239u8, 241u8, 100u8, 246u8, 179u8, 50u8, 32u8, 22u8, 245u8, - 109u8, 191u8, 232u8, 76u8, 152u8, 87u8, 156u8, 187u8, 175u8, 202u8, - ], - ) - } - } - pub struct TransactionPaymentApi; - impl TransactionPaymentApi { - pub fn query_info( - &self, - uxt : runtime_types :: sp_runtime :: generic :: unchecked_extrinsic :: UncheckedExtrinsic < :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , () > , runtime_types :: polkadot_runtime :: RuntimeCall , runtime_types :: sp_runtime :: MultiSignature , (runtime_types :: frame_system :: extensions :: check_non_zero_sender :: CheckNonZeroSender , runtime_types :: frame_system :: extensions :: check_spec_version :: CheckSpecVersion , runtime_types :: frame_system :: extensions :: check_tx_version :: CheckTxVersion , runtime_types :: frame_system :: extensions :: check_genesis :: CheckGenesis , runtime_types :: frame_system :: extensions :: check_mortality :: CheckMortality , runtime_types :: frame_system :: extensions :: check_nonce :: CheckNonce , runtime_types :: frame_system :: extensions :: check_weight :: CheckWeight , runtime_types :: pallet_transaction_payment :: ChargeTransactionPayment , runtime_types :: polkadot_runtime_common :: claims :: PrevalidateAttests ,) >, - len: ::core::primitive::u32, - ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< - runtime_types::pallet_transaction_payment::types::RuntimeDispatchInfo< - ::core::primitive::u128, - runtime_types::sp_weights::weight_v2::Weight, - >, - > { - let mut result = Vec::new(); - uxt.encode_to(&mut result); - len.encode_to(&mut result); - ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( - "TransactionPaymentApi_query_info", - result, - [ - 157u8, 139u8, 132u8, 17u8, 44u8, 153u8, 215u8, 139u8, 196u8, 107u8, 225u8, - 39u8, 78u8, 134u8, 147u8, 168u8, 134u8, 89u8, 51u8, 144u8, 101u8, 117u8, - 35u8, 131u8, 108u8, 17u8, 74u8, 1u8, 167u8, 7u8, 165u8, 98u8, - ], - ) - } - pub fn query_fee_details( - &self, - uxt : runtime_types :: sp_runtime :: generic :: unchecked_extrinsic :: UncheckedExtrinsic < :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , () > , runtime_types :: polkadot_runtime :: RuntimeCall , runtime_types :: sp_runtime :: MultiSignature , (runtime_types :: frame_system :: extensions :: check_non_zero_sender :: CheckNonZeroSender , runtime_types :: frame_system :: extensions :: check_spec_version :: CheckSpecVersion , runtime_types :: frame_system :: extensions :: check_tx_version :: CheckTxVersion , runtime_types :: frame_system :: extensions :: check_genesis :: CheckGenesis , runtime_types :: frame_system :: extensions :: check_mortality :: CheckMortality , runtime_types :: frame_system :: extensions :: check_nonce :: CheckNonce , runtime_types :: frame_system :: extensions :: check_weight :: CheckWeight , runtime_types :: pallet_transaction_payment :: ChargeTransactionPayment , runtime_types :: polkadot_runtime_common :: claims :: PrevalidateAttests ,) >, - len: ::core::primitive::u32, - ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< - runtime_types::pallet_transaction_payment::types::FeeDetails< - ::core::primitive::u128, - >, - > { - let mut result = Vec::new(); - uxt.encode_to(&mut result); - len.encode_to(&mut result); - ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( - "TransactionPaymentApi_query_fee_details", - result, - [ - 113u8, 100u8, 16u8, 128u8, 108u8, 95u8, 91u8, 255u8, 46u8, 255u8, 52u8, - 225u8, 92u8, 186u8, 175u8, 126u8, 96u8, 25u8, 206u8, 207u8, 16u8, 94u8, - 204u8, 138u8, 227u8, 38u8, 125u8, 14u8, 38u8, 58u8, 84u8, 71u8, - ], - ) - } - pub fn query_weight_to_fee( - &self, - weight: runtime_types::sp_weights::weight_v2::Weight, - ) -> ::subxt::runtime_api::StaticRuntimeApiPayload<::core::primitive::u128> - { - let mut result = Vec::new(); - weight.encode_to(&mut result); - ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( - "TransactionPaymentApi_query_weight_to_fee", - result, - [ - 179u8, 108u8, 155u8, 39u8, 134u8, 220u8, 72u8, 45u8, 230u8, 232u8, 150u8, - 146u8, 61u8, 198u8, 145u8, 250u8, 19u8, 157u8, 204u8, 217u8, 111u8, 171u8, - 197u8, 21u8, 75u8, 6u8, 16u8, 26u8, 244u8, 101u8, 134u8, 95u8, - ], - ) - } - pub fn query_length_to_fee( - &self, - length: ::core::primitive::u32, - ) -> ::subxt::runtime_api::StaticRuntimeApiPayload<::core::primitive::u128> - { - let mut result = Vec::new(); - length.encode_to(&mut result); - ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( - "TransactionPaymentApi_query_length_to_fee", - result, - [ - 228u8, 141u8, 164u8, 186u8, 169u8, 249u8, 75u8, 2u8, 160u8, 73u8, 73u8, - 214u8, 141u8, 76u8, 180u8, 222u8, 230u8, 161u8, 131u8, 88u8, 25u8, 192u8, - 77u8, 124u8, 158u8, 113u8, 72u8, 147u8, 13u8, 11u8, 42u8, 30u8, - ], - ) - } - } - pub struct TransactionPaymentCallApi; - impl TransactionPaymentCallApi { - #[doc = " Query information of a dispatch class, weight, and fee of a given encoded `Call`."] - pub fn query_call_info( - &self, - call: runtime_types::polkadot_runtime::RuntimeCall, - len: ::core::primitive::u32, - ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< - runtime_types::pallet_transaction_payment::types::RuntimeDispatchInfo< - ::core::primitive::u128, - runtime_types::sp_weights::weight_v2::Weight, - >, - > { - let mut result = Vec::new(); - call.encode_to(&mut result); - len.encode_to(&mut result); - ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( - "TransactionPaymentCallApi_query_call_info", - result, - [ - 151u8, 40u8, 199u8, 73u8, 193u8, 248u8, 30u8, 24u8, 71u8, 196u8, 235u8, - 10u8, 211u8, 120u8, 228u8, 29u8, 101u8, 175u8, 200u8, 196u8, 70u8, 44u8, - 112u8, 209u8, 175u8, 246u8, 148u8, 118u8, 84u8, 127u8, 185u8, 163u8, - ], - ) - } - #[doc = " Query fee details of a given encoded `Call`."] - pub fn query_call_fee_details( - &self, - call: runtime_types::polkadot_runtime::RuntimeCall, - len: ::core::primitive::u32, - ) -> ::subxt::runtime_api::StaticRuntimeApiPayload< - runtime_types::pallet_transaction_payment::types::FeeDetails< - ::core::primitive::u128, - >, - > { - let mut result = Vec::new(); - call.encode_to(&mut result); - len.encode_to(&mut result); - ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( - "TransactionPaymentCallApi_query_call_fee_details", - result, - [ - 56u8, 220u8, 173u8, 0u8, 48u8, 27u8, 228u8, 70u8, 139u8, 236u8, 142u8, - 142u8, 192u8, 147u8, 216u8, 185u8, 152u8, 219u8, 185u8, 189u8, 166u8, - 110u8, 224u8, 32u8, 94u8, 53u8, 248u8, 216u8, 90u8, 152u8, 63u8, 148u8, - ], - ) - } - #[doc = " Query the output of the current `WeightToFee` given some input."] - pub fn query_weight_to_fee( - &self, - weight: runtime_types::sp_weights::weight_v2::Weight, - ) -> ::subxt::runtime_api::StaticRuntimeApiPayload<::core::primitive::u128> - { - let mut result = Vec::new(); - weight.encode_to(&mut result); - ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( - "TransactionPaymentCallApi_query_weight_to_fee", - result, - [ - 235u8, 177u8, 255u8, 102u8, 0u8, 237u8, 63u8, 37u8, 144u8, 142u8, 86u8, - 43u8, 82u8, 41u8, 25u8, 149u8, 75u8, 238u8, 118u8, 216u8, 84u8, 241u8, - 54u8, 157u8, 81u8, 246u8, 140u8, 240u8, 210u8, 208u8, 235u8, 172u8, - ], - ) - } - #[doc = " Query the output of the current `LengthToFee` given some input."] - pub fn query_length_to_fee( - &self, - length: ::core::primitive::u32, - ) -> ::subxt::runtime_api::StaticRuntimeApiPayload<::core::primitive::u128> - { - let mut result = Vec::new(); - length.encode_to(&mut result); - ::subxt::runtime_api::StaticRuntimeApiPayload::new_static( - "TransactionPaymentCallApi_query_length_to_fee", - result, - [ - 188u8, 80u8, 192u8, 251u8, 47u8, 200u8, 60u8, 10u8, 214u8, 47u8, 137u8, - 111u8, 226u8, 163u8, 60u8, 177u8, 190u8, 210u8, 57u8, 89u8, 34u8, 154u8, - 190u8, 244u8, 132u8, 129u8, 212u8, 121u8, 43u8, 190u8, 71u8, 237u8, - ], - ) + ) -> ::subxt::runtime_api::Payload { + ::subxt::runtime_api::Payload::new_static( + "OffchainWorkerApi_offchain_worker", + inputs::OffchainWorker { header }, + [ + 187u8, 145u8, 211u8, 0u8, 200u8, 151u8, 231u8, 42u8, 187u8, 128u8, + 157u8, 64u8, 191u8, 64u8, 31u8, 158u8, 13u8, 159u8, 227u8, 120u8, + 155u8, 215u8, 228u8, 215u8, 44u8, 8u8, 206u8, 116u8, 241u8, 133u8, 2u8, + 234u8, + ], + ) + } + } + pub mod inputs { + use super::root_mod; + 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 OffchainWorker { + pub header: runtime_types::sp_runtime::generic::header::Header< + ::core::primitive::u32, + runtime_types::sp_runtime::traits::BlakeTwo256, + >, + } + } + } + pub mod parachain_host { + use super::root_mod; + use super::runtime_types; + #[doc = " The API for querying the state of parachains on-chain."] + pub struct ParachainHost; + impl ParachainHost { + #[doc = " Get the current validators."] + pub fn validators( + &self, + ) -> ::subxt::runtime_api::Payload< + inputs::Validators, + ::std::vec::Vec, + > { + ::subxt::runtime_api::Payload::new_static( + "ParachainHost_validators", + inputs::Validators {}, + [ + 105u8, 23u8, 110u8, 209u8, 38u8, 112u8, 199u8, 134u8, 145u8, 131u8, + 38u8, 221u8, 254u8, 147u8, 242u8, 149u8, 94u8, 76u8, 197u8, 67u8, + 228u8, 113u8, 196u8, 50u8, 122u8, 1u8, 121u8, 225u8, 163u8, 210u8, + 66u8, 68u8, + ], + ) + } + #[doc = " Returns the validator groups and rotation info localized based on the hypothetical child"] + #[doc = " of a block whose state this is invoked on. Note that `now` in the `GroupRotationInfo`"] + #[doc = " should be the successor of the number of the block."] + pub fn validator_groups( + &self, + ) -> ::subxt::runtime_api::Payload< + inputs::ValidatorGroups, + ( + ::std::vec::Vec< + ::std::vec::Vec, + >, + runtime_types::polkadot_primitives::v4::GroupRotationInfo< + ::core::primitive::u32, + >, + ), + > { + ::subxt::runtime_api::Payload::new_static( + "ParachainHost_validator_groups", + inputs::ValidatorGroups {}, + [ + 185u8, 206u8, 229u8, 10u8, 93u8, 19u8, 23u8, 44u8, 159u8, 13u8, 235u8, + 236u8, 78u8, 153u8, 144u8, 82u8, 106u8, 248u8, 8u8, 92u8, 250u8, 54u8, + 153u8, 53u8, 183u8, 60u8, 67u8, 216u8, 201u8, 88u8, 217u8, 120u8, + ], + ) + } + #[doc = " Yields information on all availability cores as relevant to the child block."] + #[doc = " Cores are either free or occupied. Free cores can have paras assigned to them."] + pub fn availability_cores( + &self, + ) -> ::subxt::runtime_api::Payload< + inputs::AvailabilityCores, + ::std::vec::Vec< + runtime_types::polkadot_primitives::v4::CoreState< + ::subxt::utils::H256, + ::core::primitive::u32, + >, + >, + > { + ::subxt::runtime_api::Payload::new_static( + "ParachainHost_availability_cores", + inputs::AvailabilityCores {}, + [ + 107u8, 20u8, 115u8, 26u8, 118u8, 211u8, 207u8, 122u8, 134u8, 174u8, + 98u8, 237u8, 216u8, 175u8, 39u8, 176u8, 211u8, 78u8, 142u8, 29u8, + 127u8, 56u8, 160u8, 249u8, 174u8, 244u8, 146u8, 181u8, 4u8, 166u8, + 93u8, 13u8, + ], + ) + } + #[doc = " Yields the persisted validation data for the given `ParaId` along with an assumption that"] + #[doc = " should be used if the para currently occupies a core."] + #[doc = ""] + #[doc = " Returns `None` if either the para is not registered or the assumption is `Freed`"] + #[doc = " and the para already occupies a core."] + pub fn persisted_validation_data( + &self, + para_id: runtime_types::polkadot_parachain::primitives::Id, + assumption: runtime_types::polkadot_primitives::v4::OccupiedCoreAssumption, + ) -> ::subxt::runtime_api::Payload< + inputs::PersistedValidationData, + ::core::option::Option< + runtime_types::polkadot_primitives::v4::PersistedValidationData< + ::subxt::utils::H256, + ::core::primitive::u32, + >, + >, + > { + ::subxt::runtime_api::Payload::new_static( + "ParachainHost_persisted_validation_data", + inputs::PersistedValidationData { + para_id, + assumption, + }, + [ + 230u8, 186u8, 57u8, 116u8, 47u8, 20u8, 186u8, 89u8, 108u8, 211u8, 22u8, + 57u8, 124u8, 234u8, 140u8, 3u8, 104u8, 89u8, 89u8, 188u8, 156u8, 130u8, + 146u8, 77u8, 129u8, 66u8, 227u8, 157u8, 4u8, 134u8, 7u8, 237u8, + ], + ) + } + #[doc = " Returns the persisted validation data for the given `ParaId` along with the corresponding"] + #[doc = " validation code hash. Instead of accepting assumption about the para, matches the validation"] + #[doc = " data hash against an expected one and yields `None` if they're not equal."] + pub fn assumed_validation_data( + &self, + para_id: runtime_types::polkadot_parachain::primitives::Id, + expected_persisted_validation_data_hash: ::subxt::utils::H256, + ) -> ::subxt::runtime_api::Payload< + inputs::AssumedValidationData, + ::core::option::Option<( + runtime_types::polkadot_primitives::v4::PersistedValidationData< + ::subxt::utils::H256, + ::core::primitive::u32, + >, + runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + )>, + > { + ::subxt::runtime_api::Payload::new_static( + "ParachainHost_assumed_validation_data", + inputs::AssumedValidationData { + para_id, + expected_persisted_validation_data_hash, + }, + [ + 53u8, 137u8, 220u8, 72u8, 155u8, 9u8, 200u8, 207u8, 158u8, 108u8, + 204u8, 15u8, 188u8, 162u8, 129u8, 158u8, 62u8, 200u8, 13u8, 0u8, 217u8, + 195u8, 19u8, 151u8, 187u8, 231u8, 197u8, 235u8, 128u8, 244u8, 51u8, + 85u8, + ], + ) + } + #[doc = " Checks if the given validation outputs pass the acceptance criteria."] + pub fn check_validation_outputs( + &self, + para_id: runtime_types::polkadot_parachain::primitives::Id, + outputs: runtime_types::polkadot_primitives::v4::CandidateCommitments< + ::core::primitive::u32, + >, + ) -> ::subxt::runtime_api::Payload< + inputs::CheckValidationOutputs, + ::core::primitive::bool, + > { + ::subxt::runtime_api::Payload::new_static( + "ParachainHost_check_validation_outputs", + inputs::CheckValidationOutputs { para_id, outputs }, + [ + 99u8, 191u8, 194u8, 26u8, 245u8, 216u8, 224u8, 232u8, 26u8, 184u8, + 120u8, 64u8, 32u8, 134u8, 215u8, 138u8, 195u8, 30u8, 220u8, 111u8, + 119u8, 182u8, 62u8, 72u8, 5u8, 144u8, 87u8, 157u8, 125u8, 125u8, 237u8, + 34u8, + ], + ) + } + #[doc = " Returns the session index expected at a child of the block."] + #[doc = ""] + #[doc = " This can be used to instantiate a `SigningContext`."] + pub fn session_index_for_child( + &self, + ) -> ::subxt::runtime_api::Payload< + inputs::SessionIndexForChild, + ::core::primitive::u32, + > { + ::subxt::runtime_api::Payload::new_static( + "ParachainHost_session_index_for_child", + inputs::SessionIndexForChild {}, + [ + 224u8, 173u8, 95u8, 16u8, 57u8, 180u8, 35u8, 148u8, 243u8, 77u8, 123u8, + 242u8, 212u8, 122u8, 27u8, 32u8, 44u8, 166u8, 66u8, 124u8, 1u8, 190u8, + 93u8, 124u8, 57u8, 127u8, 249u8, 141u8, 173u8, 92u8, 137u8, 165u8, + ], + ) + } + #[doc = " Fetch the validation code used by a para, making the given `OccupiedCoreAssumption`."] + #[doc = ""] + #[doc = " Returns `None` if either the para is not registered or the assumption is `Freed`"] + #[doc = " and the para already occupies a core."] + pub fn validation_code( + &self, + para_id: runtime_types::polkadot_parachain::primitives::Id, + assumption: runtime_types::polkadot_primitives::v4::OccupiedCoreAssumption, + ) -> ::subxt::runtime_api::Payload< + inputs::ValidationCode, + ::core::option::Option< + runtime_types::polkadot_parachain::primitives::ValidationCode, + >, + > { + ::subxt::runtime_api::Payload::new_static( + "ParachainHost_validation_code", + inputs::ValidationCode { + para_id, + assumption, + }, + [ + 231u8, 64u8, 145u8, 133u8, 197u8, 196u8, 177u8, 229u8, 152u8, 70u8, + 16u8, 159u8, 65u8, 66u8, 172u8, 58u8, 60u8, 50u8, 232u8, 28u8, 36u8, + 211u8, 161u8, 28u8, 192u8, 153u8, 89u8, 186u8, 9u8, 246u8, 228u8, 84u8, + ], + ) + } + #[doc = " Get the receipt of a candidate pending availability. This returns `Some` for any paras"] + #[doc = " assigned to occupied cores in `availability_cores` and `None` otherwise."] + pub fn candidate_pending_availability( + &self, + para_id: runtime_types::polkadot_parachain::primitives::Id, + ) -> ::subxt::runtime_api::Payload< + inputs::CandidatePendingAvailability, + ::core::option::Option< + runtime_types::polkadot_primitives::v4::CommittedCandidateReceipt< + ::subxt::utils::H256, + >, + >, + > { + ::subxt::runtime_api::Payload::new_static( + "ParachainHost_candidate_pending_availability", + inputs::CandidatePendingAvailability { para_id }, + [ + 175u8, 68u8, 187u8, 74u8, 138u8, 129u8, 153u8, 251u8, 216u8, 70u8, + 251u8, 151u8, 169u8, 252u8, 31u8, 16u8, 61u8, 242u8, 169u8, 15u8, + 123u8, 58u8, 177u8, 131u8, 6u8, 79u8, 30u8, 105u8, 51u8, 67u8, 19u8, + 208u8, + ], + ) + } + #[doc = " Get a vector of events concerning candidates that occurred within a block."] + pub fn candidate_events( + &self, + ) -> ::subxt::runtime_api::Payload< + inputs::CandidateEvents, + ::std::vec::Vec< + runtime_types::polkadot_primitives::v4::CandidateEvent< + ::subxt::utils::H256, + >, + >, + > { + ::subxt::runtime_api::Payload::new_static( + "ParachainHost_candidate_events", + inputs::CandidateEvents {}, + [ + 50u8, 177u8, 192u8, 138u8, 139u8, 179u8, 76u8, 167u8, 238u8, 92u8, + 255u8, 249u8, 223u8, 61u8, 112u8, 7u8, 0u8, 6u8, 43u8, 71u8, 209u8, + 21u8, 14u8, 184u8, 19u8, 68u8, 106u8, 193u8, 38u8, 251u8, 19u8, 208u8, + ], + ) + } + #[doc = " Get all the pending inbound messages in the downward message queue for a para."] + pub fn dmq_contents( + &self, + recipient: runtime_types::polkadot_parachain::primitives::Id, + ) -> ::subxt::runtime_api::Payload< + inputs::DmqContents, + ::std::vec::Vec< + runtime_types::polkadot_core_primitives::InboundDownwardMessage< + ::core::primitive::u32, + >, + >, + > { + ::subxt::runtime_api::Payload::new_static( + "ParachainHost_dmq_contents", + inputs::DmqContents { recipient }, + [ + 34u8, 66u8, 1u8, 92u8, 223u8, 240u8, 222u8, 128u8, 190u8, 242u8, 160u8, + 140u8, 60u8, 57u8, 155u8, 105u8, 10u8, 162u8, 212u8, 72u8, 1u8, 192u8, + 36u8, 26u8, 127u8, 86u8, 8u8, 255u8, 57u8, 210u8, 148u8, 254u8, + ], + ) + } + #[doc = " Get the contents of all channels addressed to the given recipient. Channels that have no"] + #[doc = " messages in them are also included."] + pub fn inbound_hrmp_channels_contents( + &self, + recipient: runtime_types::polkadot_parachain::primitives::Id, + ) -> ::subxt::runtime_api::Payload< + inputs::InboundHrmpChannelsContents, + ::subxt::utils::KeyedVec< + runtime_types::polkadot_parachain::primitives::Id, + ::std::vec::Vec< + runtime_types::polkadot_core_primitives::InboundHrmpMessage< + ::core::primitive::u32, + >, + >, + >, + > { + ::subxt::runtime_api::Payload::new_static( + "ParachainHost_inbound_hrmp_channels_contents", + inputs::InboundHrmpChannelsContents { recipient }, + [ + 209u8, 72u8, 244u8, 143u8, 167u8, 234u8, 8u8, 33u8, 80u8, 154u8, 132u8, + 22u8, 62u8, 174u8, 3u8, 89u8, 78u8, 115u8, 119u8, 77u8, 169u8, 80u8, + 98u8, 164u8, 8u8, 8u8, 50u8, 120u8, 58u8, 12u8, 114u8, 57u8, + ], + ) + } + #[doc = " Get the validation code from its hash."] + pub fn validation_code_by_hash( + &self, + hash: runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + ) -> ::subxt::runtime_api::Payload< + inputs::ValidationCodeByHash, + ::core::option::Option< + runtime_types::polkadot_parachain::primitives::ValidationCode, + >, + > { + ::subxt::runtime_api::Payload::new_static( + "ParachainHost_validation_code_by_hash", + inputs::ValidationCodeByHash { hash }, + [ + 143u8, 146u8, 97u8, 197u8, 138u8, 122u8, 186u8, 0u8, 86u8, 105u8, + 207u8, 55u8, 53u8, 47u8, 131u8, 101u8, 24u8, 71u8, 204u8, 71u8, 96u8, + 100u8, 252u8, 127u8, 21u8, 248u8, 70u8, 187u8, 111u8, 112u8, 77u8, + 208u8, + ], + ) + } + #[doc = " Scrape dispute relevant from on-chain, backing votes and resolved disputes."] + pub fn on_chain_votes( + &self, + ) -> ::subxt::runtime_api::Payload< + inputs::OnChainVotes, + ::core::option::Option< + runtime_types::polkadot_primitives::v4::ScrapedOnChainVotes< + ::subxt::utils::H256, + >, + >, + > { + ::subxt::runtime_api::Payload::new_static( + "ParachainHost_on_chain_votes", + inputs::OnChainVotes {}, + [ + 37u8, 2u8, 32u8, 215u8, 117u8, 137u8, 242u8, 168u8, 57u8, 175u8, 59u8, + 243u8, 132u8, 133u8, 246u8, 37u8, 154u8, 205u8, 191u8, 114u8, 114u8, + 167u8, 104u8, 27u8, 144u8, 56u8, 61u8, 159u8, 9u8, 79u8, 190u8, 239u8, + ], + ) + } + #[doc = " Get the session info for the given session, if stored."] + #[doc = ""] + #[doc = " NOTE: This function is only available since parachain host version 2."] + pub fn session_info( + &self, + index: ::core::primitive::u32, + ) -> ::subxt::runtime_api::Payload< + inputs::SessionInfo, + ::core::option::Option, + > { + ::subxt::runtime_api::Payload::new_static( + "ParachainHost_session_info", + inputs::SessionInfo { index }, + [ + 107u8, 247u8, 186u8, 88u8, 134u8, 234u8, 251u8, 220u8, 134u8, 138u8, + 130u8, 168u8, 253u8, 101u8, 235u8, 126u8, 190u8, 37u8, 77u8, 182u8, + 195u8, 100u8, 63u8, 173u8, 147u8, 98u8, 217u8, 235u8, 220u8, 87u8, + 83u8, 198u8, + ], + ) + } + #[doc = " Submits a PVF pre-checking statement into the transaction pool."] + #[doc = ""] + #[doc = " NOTE: This function is only available since parachain host version 2."] + pub fn submit_pvf_check_statement( + &self, + stmt: runtime_types::polkadot_primitives::v4::PvfCheckStatement, + signature: runtime_types::polkadot_primitives::v4::validator_app::Signature, + ) -> ::subxt::runtime_api::Payload + { + ::subxt::runtime_api::Payload::new_static( + "ParachainHost_submit_pvf_check_statement", + inputs::SubmitPvfCheckStatement { stmt, signature }, + [ + 228u8, 45u8, 8u8, 229u8, 69u8, 35u8, 3u8, 231u8, 235u8, 184u8, 19u8, + 96u8, 72u8, 62u8, 15u8, 218u8, 27u8, 134u8, 19u8, 179u8, 239u8, 1u8, + 207u8, 39u8, 50u8, 171u8, 59u8, 204u8, 143u8, 247u8, 27u8, 179u8, + ], + ) + } + #[doc = " Returns code hashes of PVFs that require pre-checking by validators in the active set."] + #[doc = ""] + #[doc = " NOTE: This function is only available since parachain host version 2."] + pub fn pvfs_require_precheck( + &self, + ) -> ::subxt::runtime_api::Payload< + inputs::PvfsRequirePrecheck, + ::std::vec::Vec< + runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + >, + > { + ::subxt::runtime_api::Payload::new_static( + "ParachainHost_pvfs_require_precheck", + inputs::PvfsRequirePrecheck {}, + [ + 58u8, 208u8, 110u8, 249u8, 77u8, 56u8, 39u8, 46u8, 196u8, 209u8, 189u8, + 200u8, 147u8, 235u8, 247u8, 235u8, 125u8, 230u8, 11u8, 151u8, 137u8, + 118u8, 110u8, 179u8, 72u8, 53u8, 127u8, 149u8, 252u8, 20u8, 165u8, + 239u8, + ], + ) + } + #[doc = " Fetch the hash of the validation code used by a para, making the given `OccupiedCoreAssumption`."] + #[doc = ""] + #[doc = " NOTE: This function is only available since parachain host version 2."] + pub fn validation_code_hash( + &self, + para_id: runtime_types::polkadot_parachain::primitives::Id, + assumption: runtime_types::polkadot_primitives::v4::OccupiedCoreAssumption, + ) -> ::subxt::runtime_api::Payload< + inputs::ValidationCodeHash, + ::core::option::Option< + runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + >, + > { + ::subxt::runtime_api::Payload::new_static( + "ParachainHost_validation_code_hash", + inputs::ValidationCodeHash { + para_id, + assumption, + }, + [ + 232u8, 173u8, 117u8, 125u8, 245u8, 188u8, 20u8, 124u8, 255u8, 219u8, + 2u8, 95u8, 131u8, 3u8, 122u8, 190u8, 240u8, 184u8, 8u8, 239u8, 85u8, + 107u8, 59u8, 105u8, 206u8, 130u8, 65u8, 142u8, 130u8, 193u8, 143u8, + 199u8, + ], + ) + } + #[doc = " Returns all onchain disputes."] + pub fn disputes( + &self, + ) -> ::subxt::runtime_api::Payload< + inputs::Disputes, + ::std::vec::Vec<( + ::core::primitive::u32, + runtime_types::polkadot_core_primitives::CandidateHash, + runtime_types::polkadot_primitives::v4::DisputeState< + ::core::primitive::u32, + >, + )>, + > { + ::subxt::runtime_api::Payload::new_static( + "ParachainHost_disputes", + inputs::Disputes {}, + [ + 90u8, 171u8, 12u8, 104u8, 109u8, 92u8, 149u8, 72u8, 109u8, 39u8, 75u8, + 241u8, 239u8, 78u8, 46u8, 134u8, 139u8, 200u8, 144u8, 213u8, 218u8, + 64u8, 98u8, 102u8, 159u8, 211u8, 154u8, 178u8, 187u8, 146u8, 193u8, + 34u8, + ], + ) + } + #[doc = " Returns execution parameters for the session."] + pub fn session_executor_params( + &self, + session_index: ::core::primitive::u32, + ) -> ::subxt::runtime_api::Payload< + inputs::SessionExecutorParams, + ::core::option::Option< + runtime_types::polkadot_primitives::v4::executor_params::ExecutorParams, + >, + > { + ::subxt::runtime_api::Payload::new_static( + "ParachainHost_session_executor_params", + inputs::SessionExecutorParams { session_index }, + [ + 129u8, 198u8, 157u8, 37u8, 138u8, 132u8, 5u8, 183u8, 233u8, 119u8, + 99u8, 173u8, 22u8, 240u8, 182u8, 246u8, 101u8, 3u8, 149u8, 130u8, + 107u8, 60u8, 152u8, 217u8, 86u8, 150u8, 253u8, 170u8, 10u8, 86u8, + 183u8, 33u8, + ], + ) + } + } + pub mod inputs { + use super::root_mod; + 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 Validators {} + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ValidatorGroups {} + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct AvailabilityCores {} + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct PersistedValidationData { + pub para_id: runtime_types::polkadot_parachain::primitives::Id, + pub assumption: runtime_types::polkadot_primitives::v4::OccupiedCoreAssumption, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct AssumedValidationData { + pub para_id: runtime_types::polkadot_parachain::primitives::Id, + pub expected_persisted_validation_data_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 CheckValidationOutputs { + pub para_id: runtime_types::polkadot_parachain::primitives::Id, + pub outputs: runtime_types::polkadot_primitives::v4::CandidateCommitments< + ::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 SessionIndexForChild {} + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ValidationCode { + pub para_id: runtime_types::polkadot_parachain::primitives::Id, + pub assumption: runtime_types::polkadot_primitives::v4::OccupiedCoreAssumption, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct CandidatePendingAvailability { + pub para_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 CandidateEvents {} + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct DmqContents { + pub recipient: 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 InboundHrmpChannelsContents { + pub recipient: 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 ValidationCodeByHash { + pub 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 OnChainVotes {} + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SessionInfo { + 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 SubmitPvfCheckStatement { + pub stmt: runtime_types::polkadot_primitives::v4::PvfCheckStatement, + pub signature: runtime_types::polkadot_primitives::v4::validator_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 PvfsRequirePrecheck {} + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ValidationCodeHash { + pub para_id: runtime_types::polkadot_parachain::primitives::Id, + pub assumption: runtime_types::polkadot_primitives::v4::OccupiedCoreAssumption, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Disputes {} + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SessionExecutorParams { + pub session_index: ::core::primitive::u32, + } + } + } + pub mod beefy_api { + use super::root_mod; + use super::runtime_types; + #[doc = " API necessary for BEEFY voters."] + pub struct BeefyApi; + impl BeefyApi { + #[doc = " Return the block number where BEEFY consensus is enabled/started"] + pub fn beefy_genesis( + &self, + ) -> ::subxt::runtime_api::Payload< + inputs::BeefyGenesis, + ::core::option::Option<::core::primitive::u32>, + > { + ::subxt::runtime_api::Payload::new_static( + "BeefyApi_beefy_genesis", + inputs::BeefyGenesis {}, + [ + 80u8, 47u8, 5u8, 126u8, 16u8, 213u8, 203u8, 179u8, 124u8, 14u8, 227u8, + 61u8, 164u8, 158u8, 115u8, 127u8, 132u8, 90u8, 222u8, 87u8, 249u8, + 214u8, 100u8, 13u8, 201u8, 186u8, 229u8, 217u8, 21u8, 152u8, 197u8, + 60u8, + ], + ) + } + #[doc = " Return the current active BEEFY validator set"] + pub fn validator_set( + &self, + ) -> ::subxt::runtime_api::Payload< + inputs::ValidatorSet, + ::core::option::Option< + runtime_types::sp_consensus_beefy::ValidatorSet< + runtime_types::sp_consensus_beefy::crypto::Public, + >, + >, + > { + ::subxt::runtime_api::Payload::new_static( + "BeefyApi_validator_set", + inputs::ValidatorSet {}, + [ + 49u8, 44u8, 188u8, 42u8, 35u8, 233u8, 181u8, 44u8, 232u8, 88u8, 1u8, + 100u8, 90u8, 42u8, 139u8, 239u8, 25u8, 44u8, 183u8, 164u8, 161u8, + 129u8, 12u8, 158u8, 41u8, 39u8, 218u8, 43u8, 78u8, 70u8, 156u8, 159u8, + ], + ) + } + #[doc = " Submits an unsigned extrinsic to report an equivocation. The caller"] + #[doc = " must provide the equivocation proof and a key ownership proof"] + #[doc = " (should be obtained using `generate_key_ownership_proof`). The"] + #[doc = " extrinsic will be unsigned and should only be accepted for local"] + #[doc = " authorship (not to be broadcast to the network). This method returns"] + #[doc = " `None` when creation of the extrinsic fails, e.g. if equivocation"] + #[doc = " reporting is disabled for the given runtime (i.e. this method is"] + #[doc = " hardcoded to return `None`). Only useful in an offchain context."] + pub fn submit_report_equivocation_unsigned_extrinsic( + &self, + equivocation_proof: runtime_types::sp_consensus_beefy::EquivocationProof< + ::core::primitive::u32, + runtime_types::sp_consensus_beefy::crypto::Public, + runtime_types::sp_consensus_beefy::crypto::Signature, + >, + key_owner_proof: runtime_types::sp_consensus_beefy::OpaqueKeyOwnershipProof, + ) -> ::subxt::runtime_api::Payload< + inputs::SubmitReportEquivocationUnsignedExtrinsic, + ::core::option::Option<()>, + > { + ::subxt::runtime_api::Payload::new_static( + "BeefyApi_submit_report_equivocation_unsigned_extrinsic", + inputs::SubmitReportEquivocationUnsignedExtrinsic { + equivocation_proof, + key_owner_proof, + }, + [ + 232u8, 114u8, 155u8, 57u8, 178u8, 76u8, 154u8, 140u8, 49u8, 60u8, 71u8, + 98u8, 167u8, 4u8, 248u8, 159u8, 0u8, 36u8, 119u8, 102u8, 188u8, 10u8, + 137u8, 252u8, 249u8, 124u8, 208u8, 173u8, 252u8, 185u8, 117u8, 35u8, + ], + ) + } + #[doc = " Generates a proof of key ownership for the given authority in the"] + #[doc = " given set. An example usage of this module is coupled with the"] + #[doc = " session historical module to prove that a given authority key is"] + #[doc = " tied to a given staking identity during a specific session. Proofs"] + #[doc = " of key ownership are necessary for submitting equivocation reports."] + #[doc = " NOTE: even though the API takes a `set_id` as parameter the current"] + #[doc = " implementations ignores this parameter and instead relies on this"] + #[doc = " method being called at the correct block height, i.e. any point at"] + #[doc = " which the given set id is live on-chain. Future implementations will"] + #[doc = " instead use indexed data through an offchain worker, not requiring"] + #[doc = " older states to be available."] + pub fn generate_key_ownership_proof( + &self, + set_id: ::core::primitive::u64, + authority_id: runtime_types::sp_consensus_beefy::crypto::Public, + ) -> ::subxt::runtime_api::Payload< + inputs::GenerateKeyOwnershipProof, + ::core::option::Option< + runtime_types::sp_consensus_beefy::OpaqueKeyOwnershipProof, + >, + > { + ::subxt::runtime_api::Payload::new_static( + "BeefyApi_generate_key_ownership_proof", + inputs::GenerateKeyOwnershipProof { + set_id, + authority_id, + }, + [ + 219u8, 146u8, 168u8, 108u8, 180u8, 133u8, 182u8, 104u8, 153u8, 14u8, + 209u8, 207u8, 32u8, 226u8, 81u8, 196u8, 243u8, 208u8, 0u8, 94u8, 197u8, + 232u8, 181u8, 251u8, 182u8, 12u8, 245u8, 231u8, 198u8, 76u8, 59u8, + 53u8, + ], + ) + } + } + pub mod inputs { + use super::root_mod; + 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 BeefyGenesis {} + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ValidatorSet {} + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SubmitReportEquivocationUnsignedExtrinsic { + pub equivocation_proof: runtime_types::sp_consensus_beefy::EquivocationProof< + ::core::primitive::u32, + runtime_types::sp_consensus_beefy::crypto::Public, + runtime_types::sp_consensus_beefy::crypto::Signature, + >, + pub key_owner_proof: runtime_types::sp_consensus_beefy::OpaqueKeyOwnershipProof, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct GenerateKeyOwnershipProof { + pub set_id: ::core::primitive::u64, + pub authority_id: runtime_types::sp_consensus_beefy::crypto::Public, + } + } + } + pub mod mmr_api { + use super::root_mod; + use super::runtime_types; + #[doc = " API to interact with MMR pallet."] + pub struct MmrApi; + impl MmrApi { + #[doc = " Return the on-chain MMR root hash."] + pub fn mmr_root( + &self, + ) -> ::subxt::runtime_api::Payload< + inputs::MmrRoot, + ::core::result::Result< + ::subxt::utils::H256, + runtime_types::sp_mmr_primitives::Error, + >, + > { + ::subxt::runtime_api::Payload::new_static( + "MmrApi_mmr_root", + inputs::MmrRoot {}, + [ + 83u8, 202u8, 15u8, 77u8, 255u8, 136u8, 129u8, 210u8, 154u8, 178u8, + 197u8, 94u8, 231u8, 151u8, 68u8, 172u8, 112u8, 116u8, 30u8, 138u8, + 142u8, 166u8, 16u8, 4u8, 24u8, 204u8, 18u8, 48u8, 43u8, 103u8, 30u8, + 96u8, + ], + ) + } + #[doc = " Return the number of MMR blocks in the chain."] + pub fn mmr_leaf_count( + &self, + ) -> ::subxt::runtime_api::Payload< + inputs::MmrLeafCount, + ::core::result::Result< + ::core::primitive::u64, + runtime_types::sp_mmr_primitives::Error, + >, + > { + ::subxt::runtime_api::Payload::new_static( + "MmrApi_mmr_leaf_count", + inputs::MmrLeafCount {}, + [ + 81u8, 145u8, 75u8, 170u8, 197u8, 235u8, 92u8, 81u8, 54u8, 16u8, 239u8, + 136u8, 174u8, 255u8, 90u8, 27u8, 24u8, 51u8, 152u8, 130u8, 249u8, + 247u8, 44u8, 173u8, 4u8, 21u8, 72u8, 44u8, 198u8, 145u8, 94u8, 77u8, + ], + ) + } + #[doc = " Generate MMR proof for a series of block numbers. If `best_known_block_number = Some(n)`,"] + #[doc = " use historical MMR state at given block height `n`. Else, use current MMR state."] + pub fn generate_proof( + &self, + block_numbers: ::std::vec::Vec<::core::primitive::u32>, + best_known_block_number: ::core::option::Option<::core::primitive::u32>, + ) -> ::subxt::runtime_api::Payload< + inputs::GenerateProof, + ::core::result::Result< + ( + ::std::vec::Vec, + runtime_types::sp_mmr_primitives::Proof<::subxt::utils::H256>, + ), + runtime_types::sp_mmr_primitives::Error, + >, + > { + ::subxt::runtime_api::Payload::new_static( + "MmrApi_generate_proof", + inputs::GenerateProof { + block_numbers, + best_known_block_number, + }, + [ + 180u8, 123u8, 115u8, 227u8, 101u8, 119u8, 103u8, 230u8, 66u8, 255u8, + 15u8, 197u8, 60u8, 180u8, 27u8, 47u8, 73u8, 121u8, 179u8, 219u8, 161u8, + 37u8, 57u8, 131u8, 104u8, 106u8, 206u8, 230u8, 168u8, 185u8, 206u8, + 32u8, + ], + ) + } + #[doc = " Verify MMR proof against on-chain MMR for a batch of leaves."] + #[doc = ""] + #[doc = " Note this function will use on-chain MMR root hash and check if the proof matches the hash."] + #[doc = " Note, the leaves should be sorted such that corresponding leaves and leaf indices have the"] + #[doc = " same position in both the `leaves` vector and the `leaf_indices` vector contained in the [Proof]"] + pub fn verify_proof( + &self, + leaves: ::std::vec::Vec, + proof: runtime_types::sp_mmr_primitives::Proof<::subxt::utils::H256>, + ) -> ::subxt::runtime_api::Payload< + inputs::VerifyProof, + ::core::result::Result<(), runtime_types::sp_mmr_primitives::Error>, + > { + ::subxt::runtime_api::Payload::new_static( + "MmrApi_verify_proof", + inputs::VerifyProof { leaves, proof }, + [ + 118u8, 13u8, 68u8, 159u8, 27u8, 144u8, 229u8, 72u8, 88u8, 106u8, 193u8, + 86u8, 228u8, 243u8, 28u8, 243u8, 99u8, 241u8, 153u8, 169u8, 121u8, + 139u8, 60u8, 244u8, 153u8, 110u8, 239u8, 149u8, 122u8, 164u8, 53u8, + 9u8, + ], + ) + } + #[doc = " Verify MMR proof against given root hash for a batch of leaves."] + #[doc = ""] + #[doc = " Note this function does not require any on-chain storage - the"] + #[doc = " proof is verified against given MMR root hash."] + #[doc = ""] + #[doc = " Note, the leaves should be sorted such that corresponding leaves and leaf indices have the"] + #[doc = " same position in both the `leaves` vector and the `leaf_indices` vector contained in the [Proof]"] + pub fn verify_proof_stateless( + &self, + root: ::subxt::utils::H256, + leaves: ::std::vec::Vec, + proof: runtime_types::sp_mmr_primitives::Proof<::subxt::utils::H256>, + ) -> ::subxt::runtime_api::Payload< + inputs::VerifyProofStateless, + ::core::result::Result<(), runtime_types::sp_mmr_primitives::Error>, + > { + ::subxt::runtime_api::Payload::new_static( + "MmrApi_verify_proof_stateless", + inputs::VerifyProofStateless { + root, + leaves, + proof, + }, + [ + 152u8, 237u8, 225u8, 199u8, 238u8, 151u8, 87u8, 236u8, 210u8, 38u8, + 168u8, 160u8, 166u8, 27u8, 186u8, 227u8, 160u8, 154u8, 120u8, 127u8, + 98u8, 247u8, 111u8, 99u8, 211u8, 236u8, 39u8, 221u8, 250u8, 110u8, + 232u8, 0u8, + ], + ) + } + } + pub mod inputs { + use super::root_mod; + 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 MmrRoot {} + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct MmrLeafCount {} + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct GenerateProof { + pub block_numbers: ::std::vec::Vec<::core::primitive::u32>, + pub best_known_block_number: ::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 VerifyProof { + pub leaves: + ::std::vec::Vec, + pub proof: runtime_types::sp_mmr_primitives::Proof<::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 VerifyProofStateless { + pub root: ::subxt::utils::H256, + pub leaves: + ::std::vec::Vec, + pub proof: runtime_types::sp_mmr_primitives::Proof<::subxt::utils::H256>, + } + } + } + pub mod grandpa_api { + use super::root_mod; + use super::runtime_types; + #[doc = " APIs for integrating the GRANDPA finality gadget into runtimes."] + #[doc = " This should be implemented on the runtime side."] + #[doc = ""] + #[doc = " This is primarily used for negotiating authority-set changes for the"] + #[doc = " gadget. GRANDPA uses a signaling model of changing authority sets:"] + #[doc = " changes should be signaled with a delay of N blocks, and then automatically"] + #[doc = " applied in the runtime after those N blocks have passed."] + #[doc = ""] + #[doc = " The consensus protocol will coordinate the handoff externally."] + pub struct GrandpaApi; + impl GrandpaApi { + #[doc = " Get the current GRANDPA authorities and weights. This should not change except"] + #[doc = " for when changes are scheduled and the corresponding delay has passed."] + #[doc = ""] + #[doc = " When called at block B, it will return the set of authorities that should be"] + #[doc = " used to finalize descendants of this block (B+1, B+2, ...). The block B itself"] + #[doc = " is finalized by the authorities from block B-1."] + pub fn grandpa_authorities( + &self, + ) -> ::subxt::runtime_api::Payload< + inputs::GrandpaAuthorities, + ::std::vec::Vec<( + runtime_types::sp_consensus_grandpa::app::Public, + ::core::primitive::u64, + )>, + > { + ::subxt::runtime_api::Payload::new_static( + "GrandpaApi_grandpa_authorities", + inputs::GrandpaAuthorities {}, + [ + 78u8, 213u8, 85u8, 178u8, 49u8, 70u8, 10u8, 221u8, 93u8, 91u8, 250u8, + 59u8, 80u8, 141u8, 62u8, 126u8, 55u8, 235u8, 163u8, 12u8, 21u8, 199u8, + 240u8, 209u8, 95u8, 63u8, 65u8, 73u8, 141u8, 42u8, 78u8, 154u8, + ], + ) + } + #[doc = " Submits an unsigned extrinsic to report an equivocation. The caller"] + #[doc = " must provide the equivocation proof and a key ownership proof"] + #[doc = " (should be obtained using `generate_key_ownership_proof`). The"] + #[doc = " extrinsic will be unsigned and should only be accepted for local"] + #[doc = " authorship (not to be broadcast to the network). This method returns"] + #[doc = " `None` when creation of the extrinsic fails, e.g. if equivocation"] + #[doc = " reporting is disabled for the given runtime (i.e. this method is"] + #[doc = " hardcoded to return `None`). Only useful in an offchain context."] + pub fn submit_report_equivocation_unsigned_extrinsic( + &self, + equivocation_proof: runtime_types::sp_consensus_grandpa::EquivocationProof< + ::subxt::utils::H256, + ::core::primitive::u32, + >, + key_owner_proof: runtime_types::sp_consensus_grandpa::OpaqueKeyOwnershipProof, + ) -> ::subxt::runtime_api::Payload< + inputs::SubmitReportEquivocationUnsignedExtrinsic, + ::core::option::Option<()>, + > { + ::subxt::runtime_api::Payload::new_static( + "GrandpaApi_submit_report_equivocation_unsigned_extrinsic", + inputs::SubmitReportEquivocationUnsignedExtrinsic { + equivocation_proof, + key_owner_proof, + }, + [ + 226u8, 83u8, 137u8, 173u8, 45u8, 138u8, 210u8, 202u8, 113u8, 196u8, + 110u8, 68u8, 31u8, 192u8, 127u8, 100u8, 125u8, 225u8, 30u8, 252u8, + 160u8, 109u8, 251u8, 96u8, 52u8, 214u8, 38u8, 91u8, 158u8, 71u8, 125u8, + 220u8, + ], + ) + } + #[doc = " Generates a proof of key ownership for the given authority in the"] + #[doc = " given set. An example usage of this module is coupled with the"] + #[doc = " session historical module to prove that a given authority key is"] + #[doc = " tied to a given staking identity during a specific session. Proofs"] + #[doc = " of key ownership are necessary for submitting equivocation reports."] + #[doc = " NOTE: even though the API takes a `set_id` as parameter the current"] + #[doc = " implementations ignore this parameter and instead rely on this"] + #[doc = " method being called at the correct block height, i.e. any point at"] + #[doc = " which the given set id is live on-chain. Future implementations will"] + #[doc = " instead use indexed data through an offchain worker, not requiring"] + #[doc = " older states to be available."] + pub fn generate_key_ownership_proof( + &self, + set_id: ::core::primitive::u64, + authority_id: runtime_types::sp_consensus_grandpa::app::Public, + ) -> ::subxt::runtime_api::Payload< + inputs::GenerateKeyOwnershipProof, + ::core::option::Option< + runtime_types::sp_consensus_grandpa::OpaqueKeyOwnershipProof, + >, + > { + ::subxt::runtime_api::Payload::new_static( + "GrandpaApi_generate_key_ownership_proof", + inputs::GenerateKeyOwnershipProof { + set_id, + authority_id, + }, + [ + 149u8, 80u8, 146u8, 102u8, 63u8, 184u8, 111u8, 153u8, 143u8, 71u8, + 109u8, 162u8, 117u8, 45u8, 139u8, 245u8, 154u8, 252u8, 117u8, 224u8, + 10u8, 6u8, 143u8, 137u8, 58u8, 213u8, 215u8, 110u8, 180u8, 142u8, + 234u8, 182u8, + ], + ) + } + #[doc = " Get current GRANDPA authority set id."] + pub fn current_set_id( + &self, + ) -> ::subxt::runtime_api::Payload + { + ::subxt::runtime_api::Payload::new_static( + "GrandpaApi_current_set_id", + inputs::CurrentSetId {}, + [ + 39u8, 245u8, 166u8, 229u8, 239u8, 200u8, 179u8, 64u8, 193u8, 93u8, + 41u8, 40u8, 208u8, 231u8, 75u8, 197u8, 45u8, 119u8, 131u8, 245u8, 84u8, + 249u8, 60u8, 7u8, 180u8, 176u8, 119u8, 130u8, 247u8, 134u8, 211u8, + 240u8, + ], + ) + } + } + pub mod inputs { + use super::root_mod; + 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 GrandpaAuthorities {} + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SubmitReportEquivocationUnsignedExtrinsic { + pub equivocation_proof: runtime_types::sp_consensus_grandpa::EquivocationProof< + ::subxt::utils::H256, + ::core::primitive::u32, + >, + pub key_owner_proof: + runtime_types::sp_consensus_grandpa::OpaqueKeyOwnershipProof, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct GenerateKeyOwnershipProof { + pub set_id: ::core::primitive::u64, + pub authority_id: runtime_types::sp_consensus_grandpa::app::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 CurrentSetId {} + } + } + pub mod babe_api { + use super::root_mod; + use super::runtime_types; + #[doc = " API necessary for block authorship with BABE."] + pub struct BabeApi; + impl BabeApi { + #[doc = " Return the configuration for BABE."] + pub fn configuration( + &self, + ) -> ::subxt::runtime_api::Payload< + inputs::Configuration, + runtime_types::sp_consensus_babe::BabeConfiguration, + > { + ::subxt::runtime_api::Payload::new_static( + "BabeApi_configuration", + inputs::Configuration {}, + [ + 101u8, 27u8, 68u8, 108u8, 36u8, 12u8, 205u8, 58u8, 238u8, 195u8, 171u8, + 167u8, 248u8, 76u8, 92u8, 226u8, 241u8, 192u8, 151u8, 31u8, 6u8, 200u8, + 69u8, 180u8, 107u8, 134u8, 221u8, 99u8, 237u8, 223u8, 50u8, 175u8, + ], + ) + } + #[doc = " Returns the slot that started the current epoch."] + pub fn current_epoch_start( + &self, + ) -> ::subxt::runtime_api::Payload< + inputs::CurrentEpochStart, + runtime_types::sp_consensus_slots::Slot, + > { + ::subxt::runtime_api::Payload::new_static( + "BabeApi_current_epoch_start", + inputs::CurrentEpochStart {}, + [ + 67u8, 178u8, 67u8, 242u8, 228u8, 74u8, 93u8, 166u8, 160u8, 9u8, 109u8, + 174u8, 12u8, 82u8, 239u8, 200u8, 96u8, 54u8, 235u8, 184u8, 159u8, + 221u8, 72u8, 244u8, 83u8, 24u8, 239u8, 24u8, 152u8, 177u8, 211u8, + 205u8, + ], + ) + } + #[doc = " Returns information regarding the current epoch."] + pub fn current_epoch( + &self, + ) -> ::subxt::runtime_api::Payload< + inputs::CurrentEpoch, + runtime_types::sp_consensus_babe::Epoch, + > { + ::subxt::runtime_api::Payload::new_static( + "BabeApi_current_epoch", + inputs::CurrentEpoch {}, + [ + 166u8, 104u8, 201u8, 148u8, 149u8, 137u8, 223u8, 165u8, 82u8, 4u8, + 130u8, 58u8, 52u8, 193u8, 201u8, 80u8, 120u8, 212u8, 76u8, 221u8, 11u8, + 131u8, 115u8, 8u8, 9u8, 59u8, 191u8, 165u8, 148u8, 24u8, 194u8, 162u8, + ], + ) + } + #[doc = " Returns information regarding the next epoch (which was already"] + #[doc = " previously announced)."] + pub fn next_epoch( + &self, + ) -> ::subxt::runtime_api::Payload< + inputs::NextEpoch, + runtime_types::sp_consensus_babe::Epoch, + > { + ::subxt::runtime_api::Payload::new_static( + "BabeApi_next_epoch", + inputs::NextEpoch {}, + [ + 251u8, 29u8, 230u8, 254u8, 174u8, 38u8, 55u8, 30u8, 93u8, 42u8, 254u8, + 172u8, 183u8, 250u8, 104u8, 211u8, 79u8, 211u8, 55u8, 98u8, 253u8, + 73u8, 137u8, 185u8, 116u8, 94u8, 20u8, 232u8, 224u8, 136u8, 86u8, + 182u8, + ], + ) + } + #[doc = " Generates a proof of key ownership for the given authority in the"] + #[doc = " current epoch. An example usage of this module is coupled with the"] + #[doc = " session historical module to prove that a given authority key is"] + #[doc = " tied to a given staking identity during a specific session. Proofs"] + #[doc = " of key ownership are necessary for submitting equivocation reports."] + #[doc = " NOTE: even though the API takes a `slot` as parameter the current"] + #[doc = " implementations ignores this parameter and instead relies on this"] + #[doc = " method being called at the correct block height, i.e. any point at"] + #[doc = " which the epoch for the given slot is live on-chain. Future"] + #[doc = " implementations will instead use indexed data through an offchain"] + #[doc = " worker, not requiring older states to be available."] + pub fn generate_key_ownership_proof( + &self, + slot: runtime_types::sp_consensus_slots::Slot, + authority_id: runtime_types::sp_consensus_babe::app::Public, + ) -> ::subxt::runtime_api::Payload< + inputs::GenerateKeyOwnershipProof, + ::core::option::Option< + runtime_types::sp_consensus_babe::OpaqueKeyOwnershipProof, + >, + > { + ::subxt::runtime_api::Payload::new_static( + "BabeApi_generate_key_ownership_proof", + inputs::GenerateKeyOwnershipProof { slot, authority_id }, + [ + 16u8, 78u8, 1u8, 172u8, 172u8, 253u8, 240u8, 175u8, 90u8, 130u8, 90u8, + 69u8, 249u8, 12u8, 192u8, 134u8, 131u8, 248u8, 186u8, 166u8, 240u8, + 182u8, 177u8, 0u8, 107u8, 151u8, 200u8, 41u8, 157u8, 150u8, 162u8, + 244u8, + ], + ) + } + #[doc = " Submits an unsigned extrinsic to report an equivocation. The caller"] + #[doc = " must provide the equivocation proof and a key ownership proof"] + #[doc = " (should be obtained using `generate_key_ownership_proof`). The"] + #[doc = " extrinsic will be unsigned and should only be accepted for local"] + #[doc = " authorship (not to be broadcast to the network). This method returns"] + #[doc = " `None` when creation of the extrinsic fails, e.g. if equivocation"] + #[doc = " reporting is disabled for the given runtime (i.e. this method is"] + #[doc = " hardcoded to return `None`). Only useful in an offchain context."] + pub fn submit_report_equivocation_unsigned_extrinsic( + &self, + equivocation_proof: runtime_types::sp_consensus_slots::EquivocationProof< + runtime_types::sp_runtime::generic::header::Header< + ::core::primitive::u32, + runtime_types::sp_runtime::traits::BlakeTwo256, + >, + runtime_types::sp_consensus_babe::app::Public, + >, + key_owner_proof: runtime_types::sp_consensus_babe::OpaqueKeyOwnershipProof, + ) -> ::subxt::runtime_api::Payload< + inputs::SubmitReportEquivocationUnsignedExtrinsic, + ::core::option::Option<()>, + > { + ::subxt::runtime_api::Payload::new_static( + "BabeApi_submit_report_equivocation_unsigned_extrinsic", + inputs::SubmitReportEquivocationUnsignedExtrinsic { + equivocation_proof, + key_owner_proof, + }, + [ + 255u8, 136u8, 248u8, 244u8, 155u8, 51u8, 20u8, 157u8, 93u8, 19u8, 24u8, + 170u8, 72u8, 199u8, 222u8, 111u8, 164u8, 126u8, 159u8, 209u8, 198u8, + 37u8, 113u8, 12u8, 36u8, 117u8, 131u8, 7u8, 130u8, 85u8, 177u8, 109u8, + ], + ) + } + } + pub mod inputs { + use super::root_mod; + 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 Configuration {} + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct CurrentEpochStart {} + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct CurrentEpoch {} + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct NextEpoch {} + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct GenerateKeyOwnershipProof { + pub slot: runtime_types::sp_consensus_slots::Slot, + pub authority_id: runtime_types::sp_consensus_babe::app::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 SubmitReportEquivocationUnsignedExtrinsic { + pub equivocation_proof: runtime_types::sp_consensus_slots::EquivocationProof< + runtime_types::sp_runtime::generic::header::Header< + ::core::primitive::u32, + runtime_types::sp_runtime::traits::BlakeTwo256, + >, + runtime_types::sp_consensus_babe::app::Public, + >, + pub key_owner_proof: runtime_types::sp_consensus_babe::OpaqueKeyOwnershipProof, + } + } + } + pub mod authority_discovery_api { + use super::root_mod; + use super::runtime_types; + #[doc = " The authority discovery api."] + #[doc = ""] + #[doc = " This api is used by the `client/authority-discovery` module to retrieve identifiers"] + #[doc = " of the current and next authority set."] + pub struct AuthorityDiscoveryApi; + impl AuthorityDiscoveryApi { + #[doc = " Retrieve authority identifiers of the current and next authority set."] + pub fn authorities( + &self, + ) -> ::subxt::runtime_api::Payload< + inputs::Authorities, + ::std::vec::Vec, + > { + ::subxt::runtime_api::Payload::new_static( + "AuthorityDiscoveryApi_authorities", + inputs::Authorities {}, + [ + 104u8, 50u8, 187u8, 116u8, 97u8, 112u8, 203u8, 212u8, 27u8, 108u8, + 253u8, 8u8, 103u8, 104u8, 63u8, 176u8, 178u8, 179u8, 154u8, 104u8, + 167u8, 241u8, 76u8, 136u8, 102u8, 130u8, 88u8, 115u8, 104u8, 64u8, + 224u8, 98u8, + ], + ) + } + } + pub mod inputs { + use super::root_mod; + 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 Authorities {} + } + } + pub mod session_keys { + use super::root_mod; + use super::runtime_types; + #[doc = " Session keys runtime api."] + pub struct SessionKeys; + impl SessionKeys { + #[doc = " Generate a set of session keys with optionally using the given seed."] + #[doc = " The keys should be stored within the keystore exposed via runtime"] + #[doc = " externalities."] + #[doc = ""] + #[doc = " The seed needs to be a valid `utf8` string."] + #[doc = ""] + #[doc = " Returns the concatenated SCALE encoded public keys."] + pub fn generate_session_keys( + &self, + seed: ::core::option::Option<::std::vec::Vec<::core::primitive::u8>>, + ) -> ::subxt::runtime_api::Payload< + inputs::GenerateSessionKeys, + ::std::vec::Vec<::core::primitive::u8>, + > { + ::subxt::runtime_api::Payload::new_static( + "SessionKeys_generate_session_keys", + inputs::GenerateSessionKeys { seed }, + [ + 238u8, 35u8, 56u8, 56u8, 5u8, 183u8, 237u8, 233u8, 220u8, 77u8, 245u8, + 218u8, 120u8, 21u8, 3u8, 95u8, 106u8, 140u8, 212u8, 37u8, 14u8, 180u8, + 24u8, 11u8, 137u8, 193u8, 111u8, 91u8, 235u8, 127u8, 202u8, 230u8, + ], + ) + } + #[doc = " Decode the given public session keys."] + #[doc = ""] + #[doc = " Returns the list of public raw public keys + key type."] + pub fn decode_session_keys( + &self, + encoded: ::std::vec::Vec<::core::primitive::u8>, + ) -> ::subxt::runtime_api::Payload< + inputs::DecodeSessionKeys, + ::core::option::Option< + ::std::vec::Vec<( + ::std::vec::Vec<::core::primitive::u8>, + runtime_types::sp_core::crypto::KeyTypeId, + )>, + >, + > { + ::subxt::runtime_api::Payload::new_static( + "SessionKeys_decode_session_keys", + inputs::DecodeSessionKeys { encoded }, + [ + 134u8, 106u8, 224u8, 190u8, 133u8, 212u8, 253u8, 184u8, 222u8, 76u8, + 44u8, 75u8, 168u8, 18u8, 3u8, 169u8, 32u8, 8u8, 46u8, 5u8, 155u8, 45u8, + 149u8, 144u8, 41u8, 174u8, 130u8, 133u8, 22u8, 150u8, 89u8, 196u8, + ], + ) + } + } + pub mod inputs { + use super::root_mod; + 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 GenerateSessionKeys { + pub seed: ::core::option::Option<::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 DecodeSessionKeys { + pub encoded: ::std::vec::Vec<::core::primitive::u8>, + } + } + } + pub mod account_nonce_api { + use super::root_mod; + use super::runtime_types; + #[doc = " The API to query account nonce (aka transaction index)."] + pub struct AccountNonceApi; + impl AccountNonceApi { + #[doc = " Get current account nonce of given `AccountId`."] + pub fn account_nonce( + &self, + account: ::subxt::utils::AccountId32, + ) -> ::subxt::runtime_api::Payload + { + ::subxt::runtime_api::Payload::new_static( + "AccountNonceApi_account_nonce", + inputs::AccountNonce { account }, + [ + 115u8, 50u8, 18u8, 201u8, 220u8, 171u8, 244u8, 16u8, 58u8, 183u8, + 173u8, 196u8, 253u8, 239u8, 241u8, 100u8, 246u8, 179u8, 50u8, 32u8, + 22u8, 245u8, 109u8, 191u8, 232u8, 76u8, 152u8, 87u8, 156u8, 187u8, + 175u8, 202u8, + ], + ) + } + } + pub mod inputs { + use super::root_mod; + 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 AccountNonce { + pub account: ::subxt::utils::AccountId32, + } + } + } + pub mod transaction_payment_api { + use super::root_mod; + use super::runtime_types; + pub struct TransactionPaymentApi; + impl TransactionPaymentApi { + pub fn query_info( + &self, + uxt : runtime_types :: sp_runtime :: generic :: unchecked_extrinsic :: UncheckedExtrinsic < :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , () > , runtime_types :: polkadot_runtime :: RuntimeCall , runtime_types :: sp_runtime :: MultiSignature , (runtime_types :: frame_system :: extensions :: check_non_zero_sender :: CheckNonZeroSender , runtime_types :: frame_system :: extensions :: check_spec_version :: CheckSpecVersion , runtime_types :: frame_system :: extensions :: check_tx_version :: CheckTxVersion , runtime_types :: frame_system :: extensions :: check_genesis :: CheckGenesis , runtime_types :: frame_system :: extensions :: check_mortality :: CheckMortality , runtime_types :: frame_system :: extensions :: check_nonce :: CheckNonce , runtime_types :: frame_system :: extensions :: check_weight :: CheckWeight , runtime_types :: pallet_transaction_payment :: ChargeTransactionPayment , runtime_types :: polkadot_runtime_common :: claims :: PrevalidateAttests ,) >, + len: ::core::primitive::u32, + ) -> ::subxt::runtime_api::Payload< + inputs::QueryInfo, + runtime_types::pallet_transaction_payment::types::RuntimeDispatchInfo< + ::core::primitive::u128, + runtime_types::sp_weights::weight_v2::Weight, + >, + > { + ::subxt::runtime_api::Payload::new_static( + "TransactionPaymentApi_query_info", + inputs::QueryInfo { uxt, len }, + [ + 157u8, 139u8, 132u8, 17u8, 44u8, 153u8, 215u8, 139u8, 196u8, 107u8, + 225u8, 39u8, 78u8, 134u8, 147u8, 168u8, 134u8, 89u8, 51u8, 144u8, + 101u8, 117u8, 35u8, 131u8, 108u8, 17u8, 74u8, 1u8, 167u8, 7u8, 165u8, + 98u8, + ], + ) + } + pub fn query_fee_details( + &self, + uxt : runtime_types :: sp_runtime :: generic :: unchecked_extrinsic :: UncheckedExtrinsic < :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , () > , runtime_types :: polkadot_runtime :: RuntimeCall , runtime_types :: sp_runtime :: MultiSignature , (runtime_types :: frame_system :: extensions :: check_non_zero_sender :: CheckNonZeroSender , runtime_types :: frame_system :: extensions :: check_spec_version :: CheckSpecVersion , runtime_types :: frame_system :: extensions :: check_tx_version :: CheckTxVersion , runtime_types :: frame_system :: extensions :: check_genesis :: CheckGenesis , runtime_types :: frame_system :: extensions :: check_mortality :: CheckMortality , runtime_types :: frame_system :: extensions :: check_nonce :: CheckNonce , runtime_types :: frame_system :: extensions :: check_weight :: CheckWeight , runtime_types :: pallet_transaction_payment :: ChargeTransactionPayment , runtime_types :: polkadot_runtime_common :: claims :: PrevalidateAttests ,) >, + len: ::core::primitive::u32, + ) -> ::subxt::runtime_api::Payload< + inputs::QueryFeeDetails, + runtime_types::pallet_transaction_payment::types::FeeDetails< + ::core::primitive::u128, + >, + > { + ::subxt::runtime_api::Payload::new_static( + "TransactionPaymentApi_query_fee_details", + inputs::QueryFeeDetails { uxt, len }, + [ + 113u8, 100u8, 16u8, 128u8, 108u8, 95u8, 91u8, 255u8, 46u8, 255u8, 52u8, + 225u8, 92u8, 186u8, 175u8, 126u8, 96u8, 25u8, 206u8, 207u8, 16u8, 94u8, + 204u8, 138u8, 227u8, 38u8, 125u8, 14u8, 38u8, 58u8, 84u8, 71u8, + ], + ) + } + pub fn query_weight_to_fee( + &self, + weight: runtime_types::sp_weights::weight_v2::Weight, + ) -> ::subxt::runtime_api::Payload + { + ::subxt::runtime_api::Payload::new_static( + "TransactionPaymentApi_query_weight_to_fee", + inputs::QueryWeightToFee { weight }, + [ + 179u8, 108u8, 155u8, 39u8, 134u8, 220u8, 72u8, 45u8, 230u8, 232u8, + 150u8, 146u8, 61u8, 198u8, 145u8, 250u8, 19u8, 157u8, 204u8, 217u8, + 111u8, 171u8, 197u8, 21u8, 75u8, 6u8, 16u8, 26u8, 244u8, 101u8, 134u8, + 95u8, + ], + ) + } + pub fn query_length_to_fee( + &self, + length: ::core::primitive::u32, + ) -> ::subxt::runtime_api::Payload + { + ::subxt::runtime_api::Payload::new_static( + "TransactionPaymentApi_query_length_to_fee", + inputs::QueryLengthToFee { length }, + [ + 228u8, 141u8, 164u8, 186u8, 169u8, 249u8, 75u8, 2u8, 160u8, 73u8, 73u8, + 214u8, 141u8, 76u8, 180u8, 222u8, 230u8, 161u8, 131u8, 88u8, 25u8, + 192u8, 77u8, 124u8, 158u8, 113u8, 72u8, 147u8, 13u8, 11u8, 42u8, 30u8, + ], + ) + } + } + pub mod inputs { + use super::root_mod; + 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 QueryInfo { pub uxt : runtime_types :: sp_runtime :: generic :: unchecked_extrinsic :: UncheckedExtrinsic < :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , () > , runtime_types :: polkadot_runtime :: RuntimeCall , runtime_types :: sp_runtime :: MultiSignature , (runtime_types :: frame_system :: extensions :: check_non_zero_sender :: CheckNonZeroSender , runtime_types :: frame_system :: extensions :: check_spec_version :: CheckSpecVersion , runtime_types :: frame_system :: extensions :: check_tx_version :: CheckTxVersion , runtime_types :: frame_system :: extensions :: check_genesis :: CheckGenesis , runtime_types :: frame_system :: extensions :: check_mortality :: CheckMortality , runtime_types :: frame_system :: extensions :: check_nonce :: CheckNonce , runtime_types :: frame_system :: extensions :: check_weight :: CheckWeight , runtime_types :: pallet_transaction_payment :: ChargeTransactionPayment , runtime_types :: polkadot_runtime_common :: claims :: PrevalidateAttests ,) > , pub len : :: 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 QueryFeeDetails { pub uxt : runtime_types :: sp_runtime :: generic :: unchecked_extrinsic :: UncheckedExtrinsic < :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , () > , runtime_types :: polkadot_runtime :: RuntimeCall , runtime_types :: sp_runtime :: MultiSignature , (runtime_types :: frame_system :: extensions :: check_non_zero_sender :: CheckNonZeroSender , runtime_types :: frame_system :: extensions :: check_spec_version :: CheckSpecVersion , runtime_types :: frame_system :: extensions :: check_tx_version :: CheckTxVersion , runtime_types :: frame_system :: extensions :: check_genesis :: CheckGenesis , runtime_types :: frame_system :: extensions :: check_mortality :: CheckMortality , runtime_types :: frame_system :: extensions :: check_nonce :: CheckNonce , runtime_types :: frame_system :: extensions :: check_weight :: CheckWeight , runtime_types :: pallet_transaction_payment :: ChargeTransactionPayment , runtime_types :: polkadot_runtime_common :: claims :: PrevalidateAttests ,) > , pub len : :: 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 QueryWeightToFee { + pub 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 QueryLengthToFee { + pub length: ::core::primitive::u32, + } + } + } + pub mod transaction_payment_call_api { + use super::root_mod; + use super::runtime_types; + pub struct TransactionPaymentCallApi; + impl TransactionPaymentCallApi { + #[doc = " Query information of a dispatch class, weight, and fee of a given encoded `Call`."] + pub fn query_call_info( + &self, + call: runtime_types::polkadot_runtime::RuntimeCall, + len: ::core::primitive::u32, + ) -> ::subxt::runtime_api::Payload< + inputs::QueryCallInfo, + runtime_types::pallet_transaction_payment::types::RuntimeDispatchInfo< + ::core::primitive::u128, + runtime_types::sp_weights::weight_v2::Weight, + >, + > { + ::subxt::runtime_api::Payload::new_static( + "TransactionPaymentCallApi_query_call_info", + inputs::QueryCallInfo { call, len }, + [ + 151u8, 40u8, 199u8, 73u8, 193u8, 248u8, 30u8, 24u8, 71u8, 196u8, 235u8, + 10u8, 211u8, 120u8, 228u8, 29u8, 101u8, 175u8, 200u8, 196u8, 70u8, + 44u8, 112u8, 209u8, 175u8, 246u8, 148u8, 118u8, 84u8, 127u8, 185u8, + 163u8, + ], + ) + } + #[doc = " Query fee details of a given encoded `Call`."] + pub fn query_call_fee_details( + &self, + call: runtime_types::polkadot_runtime::RuntimeCall, + len: ::core::primitive::u32, + ) -> ::subxt::runtime_api::Payload< + inputs::QueryCallFeeDetails, + runtime_types::pallet_transaction_payment::types::FeeDetails< + ::core::primitive::u128, + >, + > { + ::subxt::runtime_api::Payload::new_static( + "TransactionPaymentCallApi_query_call_fee_details", + inputs::QueryCallFeeDetails { call, len }, + [ + 56u8, 220u8, 173u8, 0u8, 48u8, 27u8, 228u8, 70u8, 139u8, 236u8, 142u8, + 142u8, 192u8, 147u8, 216u8, 185u8, 152u8, 219u8, 185u8, 189u8, 166u8, + 110u8, 224u8, 32u8, 94u8, 53u8, 248u8, 216u8, 90u8, 152u8, 63u8, 148u8, + ], + ) + } + #[doc = " Query the output of the current `WeightToFee` given some input."] + pub fn query_weight_to_fee( + &self, + weight: runtime_types::sp_weights::weight_v2::Weight, + ) -> ::subxt::runtime_api::Payload + { + ::subxt::runtime_api::Payload::new_static( + "TransactionPaymentCallApi_query_weight_to_fee", + inputs::QueryWeightToFee { weight }, + [ + 235u8, 177u8, 255u8, 102u8, 0u8, 237u8, 63u8, 37u8, 144u8, 142u8, 86u8, + 43u8, 82u8, 41u8, 25u8, 149u8, 75u8, 238u8, 118u8, 216u8, 84u8, 241u8, + 54u8, 157u8, 81u8, 246u8, 140u8, 240u8, 210u8, 208u8, 235u8, 172u8, + ], + ) + } + #[doc = " Query the output of the current `LengthToFee` given some input."] + pub fn query_length_to_fee( + &self, + length: ::core::primitive::u32, + ) -> ::subxt::runtime_api::Payload + { + ::subxt::runtime_api::Payload::new_static( + "TransactionPaymentCallApi_query_length_to_fee", + inputs::QueryLengthToFee { length }, + [ + 188u8, 80u8, 192u8, 251u8, 47u8, 200u8, 60u8, 10u8, 214u8, 47u8, 137u8, + 111u8, 226u8, 163u8, 60u8, 177u8, 190u8, 210u8, 57u8, 89u8, 34u8, + 154u8, 190u8, 244u8, 132u8, 129u8, 212u8, 121u8, 43u8, 190u8, 71u8, + 237u8, + ], + ) + } + } + pub mod inputs { + use super::root_mod; + 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 QueryCallInfo { + pub call: runtime_types::polkadot_runtime::RuntimeCall, + pub len: ::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 QueryCallFeeDetails { + pub call: runtime_types::polkadot_runtime::RuntimeCall, + pub len: ::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 QueryWeightToFee { + pub 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 QueryLengthToFee { + pub length: ::core::primitive::u32, + } } } } From 5754c09a8a27e1d9adda4dada81fb5cd2e2d17c2 Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Tue, 25 Apr 2023 20:03:51 +0300 Subject: [PATCH 38/66] codegen: Generate input structures for runtime API Signed-off-by: Alexandru Vasile --- codegen/src/api/runtime_apis.rs | 89 +++++++++++++++++++++------------ 1 file changed, 57 insertions(+), 32 deletions(-) diff --git a/codegen/src/api/runtime_apis.rs b/codegen/src/api/runtime_apis.rs index 8017d5e035..b9329c4faf 100644 --- a/codegen/src/api/runtime_apis.rs +++ b/codegen/src/api/runtime_apis.rs @@ -5,6 +5,7 @@ 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}; @@ -15,6 +16,7 @@ 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> { @@ -24,11 +26,7 @@ fn generate_runtime_api( let trait_name_snake = format_ident!("{}", api.name.to_snake_case()); let docs = &api.docs; - // Parameters are scale encoded into the `result` vector. - const ENCODED_PARAMS: &str = "result"; - let encoded_params = format_ident!("{}", ENCODED_PARAMS); - - let methods: Vec<_> = api.methods.iter().map(|method| { + let structs_and_methods: Vec<_> = api.methods.iter().map(|method| { let method_name = format_ident!("{}", method.name); // Runtime function name is `TraitName_MethodName`. @@ -43,20 +41,24 @@ fn generate_runtime_api( let ty = type_gen.resolve_type_path(input.ty.id); let param = quote!(#name: #ty); - let encoded = quote!(#name.encode_to(&mut #encoded_params)); - (param, encoded) + (param, name) }).collect(); - // The `let [mut] result = Vec::new()` accumulator needs to be - // mutable only if we have inputs to add to it. - let encoded_mut = if inputs.is_empty() { - quote!() - } else { - quote!(mut) - }; - let params = inputs.iter().map(|(param, _)| param); - let encoded = inputs.iter().map(|(_, encoded)| encoded); + 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); @@ -68,36 +70,50 @@ fn generate_runtime_api( )) }; - Ok(quote!( + let method = quote!( #docs - pub fn #method_name(&self, #( #params, )* ) -> #crate_path::runtime_api::StaticRuntimeApiPayload<#output> { - let #encoded_mut #encoded_params = Vec::new(); - #( #encoded; )* - - #crate_path::runtime_api::StaticRuntimeApiPayload::new_static( + pub fn #method_name(&self, #( #params, )* ) -> #crate_path::runtime_api::Payload { + #crate_path::runtime_api::Payload::new_static( #runtime_fn_name, - #encoded_params, + inputs::#struct_name { #( #param_names, )* }, [#(#call_hash,)*], ) } - )) + ); + + Ok((struct_input, method)) }).collect::>()?; let trait_name = format_ident!("{}", trait_name); - // The structure that identifies the `TraitName` of the runtime call. + + let structs = structs_and_methods.iter().map(|(struct_, _)| struct_); + let methods = structs_and_methods.iter().map(|(_, method)| method); + let runtime_api = quote!( - #( #[doc = #docs ] )* - pub struct #trait_name; + pub mod #trait_name_snake { + use super::root_mod; + use super::#types_mod_ident; - impl #trait_name { - #( #methods )* + #( #[doc = #docs ] )* + pub struct #trait_name; + + impl #trait_name { + #( #methods )* + } + + pub mod inputs { + use super::root_mod; + 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 { - #trait_name + pub fn #trait_name_snake(&self) -> #trait_name_snake::#trait_name { + #trait_name_snake::#trait_name } ); @@ -116,7 +132,16 @@ pub fn generate_runtime_apis( let runtime_fns: Vec<_> = apis .iter() - .map(|api| generate_runtime_api(metadata, api, type_gen, crate_path, should_gen_docs)) + .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); From 719a004274a6550327018a2b8ca4b555e7998539 Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Tue, 25 Apr 2023 20:04:19 +0300 Subject: [PATCH 39/66] runtime_api: Remove the static paylaod and use single impl Signed-off-by: Alexandru Vasile --- subxt/src/runtime_api/mod.rs | 4 +-- subxt/src/runtime_api/runtime_payload.rs | 40 +++++++----------------- 2 files changed, 12 insertions(+), 32 deletions(-) diff --git a/subxt/src/runtime_api/mod.rs b/subxt/src/runtime_api/mod.rs index 3bf8765eb3..49a17a4dd7 100644 --- a/subxt/src/runtime_api/mod.rs +++ b/subxt/src/runtime_api/mod.rs @@ -9,7 +9,5 @@ mod runtime_payload; mod runtime_types; pub use runtime_client::RuntimeApiClient; -pub use runtime_payload::{ - dynamic, DynamicRuntimeApiPayload, Payload, RuntimeApiPayload, StaticRuntimeApiPayload, -}; +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 index 49aef99b42..7636ea6a02 100644 --- a/subxt/src/runtime_api/runtime_payload.rs +++ b/subxt/src/runtime_api/runtime_payload.rs @@ -69,30 +69,15 @@ pub struct Payload { _marker: PhantomData, } -impl RuntimeApiPayload for StaticRuntimeApiPayload { +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> { - out.extend(self.args_data.clone()); - Ok(()) - } - - fn validation_hash(&self) -> Option<[u8; 32]> { - self.validation_hash - } -} - -impl RuntimeApiPayload for DynamicRuntimeApiPayload { - type ReturnType = DecodedValueThunk; - - 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)?; @@ -101,14 +86,11 @@ impl RuntimeApiPayload for DynamicRuntimeApiPayload { Ok(()) } -} -/// A static runtime API payload. -/// -/// The payload already contains the scale-encoded argument bytes. -/// -/// This is only expected to be used from codegen. -pub type StaticRuntimeApiPayload = Payload, ReturnTy>; + fn validation_hash(&self) -> Option<[u8; 32]> { + self.validation_hash + } +} /// A dynamic runtime API payload. pub type DynamicRuntimeApiPayload = Payload, DecodedValueThunk>; @@ -128,17 +110,17 @@ impl Payload { } } - /// Create a new [`StaticRuntimeApiPayload`] using static function name + /// 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: Vec, + args_data: ArgsData, hash: [u8; 32], - ) -> StaticRuntimeApiPayload { - StaticRuntimeApiPayload { + ) -> Payload { + Payload { fn_name: Cow::Borrowed(fn_name), args_data, validation_hash: Some(hash), From c8b3fee939d67450679c8666b2e5950bdceb5dcc Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Tue, 25 Apr 2023 20:04:53 +0300 Subject: [PATCH 40/66] examples: Fetch account nonce Signed-off-by: Alexandru Vasile --- examples/examples/runtime_calls.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/examples/examples/runtime_calls.rs b/examples/examples/runtime_calls.rs index 3157c6b45c..f2d52766fd 100644 --- a/examples/examples/runtime_calls.rs +++ b/examples/examples/runtime_calls.rs @@ -10,6 +10,7 @@ //! polkadot --dev --tmp //! ``` +use sp_keyring::AccountKeyring; use subxt::dynamic::Value; use subxt::{config::PolkadotConfig, OnlineClient}; @@ -52,6 +53,20 @@ async fn main() -> Result<(), Box> { .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", From cd9d1e68016321b7626945a31ef969ecfa6fe0d0 Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Tue, 25 Apr 2023 20:05:46 +0300 Subject: [PATCH 41/66] testing: Adjust build script to fetch latest metadata Signed-off-by: Alexandru Vasile --- testing/test-runtime/Cargo.toml | 3 +++ testing/test-runtime/build.rs | 20 ++++++++++++++++---- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/testing/test-runtime/Cargo.toml b/testing/test-runtime/Cargo.toml index 652a76e9cb..11a85f0fea 100644 --- a/testing/test-runtime/Cargo.toml +++ b/testing/test-runtime/Cargo.toml @@ -6,11 +6,14 @@ publish = false [dependencies] subxt = { path = "../../subxt" } +codec = { package = "parity-scale-codec", version = "3.0.0", features = ["derive", "full"] } [build-dependencies] +codec = { package = "parity-scale-codec", version = "3.0.0", features = ["derive", "full"] } substrate-runner = { path = "../substrate-runner" } impl-serde = "0.4.0" serde = "1.0.160" tokio = { version = "1.27", features = ["macros", "rt-multi-thread"] } which = "4.4.0" jsonrpsee = { version = "0.16.0", features = ["async-client", "client-ws-transport"] } +hex = "0.4.3" diff --git a/testing/test-runtime/build.rs b/testing/test-runtime/build.rs index 8b584d2185..2c4a03f2a1 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,17 +37,28 @@ 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 = { + #[derive(codec::Decode)] + pub struct Bytes(pub Vec); + 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(); From df24528deb36a86638bcf685b07d78dca0648ba2 Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Tue, 25 Apr 2023 20:07:09 +0300 Subject: [PATCH 42/66] testing: Check account nonce from runtime API Signed-off-by: Alexandru Vasile --- testing/integration-tests/src/lib.rs | 2 + .../integration-tests/src/runtime_api/mod.rs | 37 +++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 testing/integration-tests/src/runtime_api/mod.rs 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..c6ad5b0cc2 --- /dev/null +++ b/testing/integration-tests/src/runtime_api/mod.rs @@ -0,0 +1,37 @@ +// 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(); + + // 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(()) +} From ff6efca5b0464c079287e38c460e4269280bc118 Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Tue, 25 Apr 2023 20:07:23 +0300 Subject: [PATCH 43/66] Update cargo.lock Signed-off-by: Alexandru Vasile --- Cargo.lock | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Cargo.lock b/Cargo.lock index 5fdcbb10db..e62790ac68 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3658,8 +3658,10 @@ dependencies = [ name = "test-runtime" version = "0.28.0" dependencies = [ + "hex", "impl-serde", "jsonrpsee", + "parity-scale-codec", "serde", "substrate-runner", "subxt", From 7bd91ff82e4c8ce09c524d52edf3c409d2ebc4ae Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Wed, 26 Apr 2023 13:23:12 +0300 Subject: [PATCH 44/66] codegen: Fix doc generation for runtime types Signed-off-by: Alexandru Vasile --- codegen/src/api/runtime_apis.rs | 5 ++++- .../src/codegen/codegen_documentation.rs | 8 ++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/codegen/src/api/runtime_apis.rs b/codegen/src/api/runtime_apis.rs index b9329c4faf..df7c4da15d 100644 --- a/codegen/src/api/runtime_apis.rs +++ b/codegen/src/api/runtime_apis.rs @@ -25,6 +25,9 @@ fn generate_runtime_api( // 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); @@ -94,7 +97,7 @@ fn generate_runtime_api( use super::root_mod; use super::#types_mod_ident; - #( #[doc = #docs ] )* + #docs pub struct #trait_name; impl #trait_name { diff --git a/testing/integration-tests/src/codegen/codegen_documentation.rs b/testing/integration-tests/src/codegen/codegen_documentation.rs index 0319711db6..9ef10e89d8 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 } From ee9e679f525473a56ececa76cce26247dde58f41 Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Thu, 27 Apr 2023 17:53:38 +0300 Subject: [PATCH 45/66] codegen: Rename `inputs` runtime calls module to `types` Signed-off-by: Alexandru Vasile --- codegen/src/api/runtime_apis.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/codegen/src/api/runtime_apis.rs b/codegen/src/api/runtime_apis.rs index df7c4da15d..3b96ad4397 100644 --- a/codegen/src/api/runtime_apis.rs +++ b/codegen/src/api/runtime_apis.rs @@ -75,10 +75,10 @@ fn generate_runtime_api( let method = quote!( #docs - pub fn #method_name(&self, #( #params, )* ) -> #crate_path::runtime_api::Payload { + pub fn #method_name(&self, #( #params, )* ) -> #crate_path::runtime_api::Payload { #crate_path::runtime_api::Payload::new_static( #runtime_fn_name, - inputs::#struct_name { #( #param_names, )* }, + types::#struct_name { #( #param_names, )* }, [#(#call_hash,)*], ) } @@ -104,8 +104,7 @@ fn generate_runtime_api( #( #methods )* } - pub mod inputs { - use super::root_mod; + pub mod types { use super::#types_mod_ident; #( #structs )* From 834e3ad1e340c166d27672cead76ae9ad2adc0ae Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Thu, 27 Apr 2023 17:55:11 +0300 Subject: [PATCH 46/66] codegen: Generate Calls structs inside the types module Signed-off-by: Alexandru Vasile --- codegen/src/api/calls.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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; From 3866c6b89839b8b758582bc8d1b05b45ec8b23e3 Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Thu, 27 Apr 2023 18:07:41 +0300 Subject: [PATCH 47/66] testing: Check Alice account nonce before submitting the tx Signed-off-by: Alexandru Vasile --- testing/integration-tests/src/runtime_api/mod.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/testing/integration-tests/src/runtime_api/mod.rs b/testing/integration-tests/src/runtime_api/mod.rs index c6ad5b0cc2..43ad07e179 100644 --- a/testing/integration-tests/src/runtime_api/mod.rs +++ b/testing/integration-tests/src/runtime_api/mod.rs @@ -14,6 +14,18 @@ async fn account_nonce() -> Result<(), subxt::Error> { 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); + 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() From 69f5322c3c735ccf9873d125472040558156b141 Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Thu, 27 Apr 2023 18:38:19 +0300 Subject: [PATCH 48/66] cli: Add metadata version option flag supporting v14 and unstable Signed-off-by: Alexandru Vasile --- cli/src/commands/codegen.rs | 15 ++++++++++++++- cli/src/commands/compatibility.rs | 14 ++++++++++++++ cli/src/commands/metadata.rs | 14 ++++++++++++++ cli/src/utils.rs | 29 +++++++++++++++++++++++++++++ 4 files changed, 71 insertions(+), 1 deletion(-) diff --git a/cli/src/commands/codegen.rs b/cli/src/commands/codegen.rs index eb2b10f33d..054ac39446 100644 --- a/cli/src/commands/codegen.rs +++ b/cli/src/commands/codegen.rs @@ -2,7 +2,7 @@ // This file is dual-licensed as Apache-2.0 or GPL-3.0. // see LICENSE for license details. -use crate::utils::FileOrUrl; +use crate::utils::{FileOrUrl, MetadataVersion}; use clap::Parser as ClapParser; use color_eyre::eyre; use subxt_codegen::{DerivesRegistry, TypeSubstitutes, TypeSubstitutionError}; @@ -16,6 +16,19 @@ use subxt_codegen::{DerivesRegistry, TypeSubstitutes, TypeSubstitutionError}; pub struct Opts { #[command(flatten)] file_or_url: FileOrUrl, + /// 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", default_value = "14")] + version: MetadataVersion, /// Additional derives #[clap(long = "derive")] derives: Vec, diff --git a/cli/src/commands/compatibility.rs b/cli/src/commands/compatibility.rs index 3b0e2cdd44..3a8adb6d44 100644 --- a/cli/src/commands/compatibility.rs +++ b/cli/src/commands/compatibility.rs @@ -2,6 +2,7 @@ // This file is dual-licensed as Apache-2.0 or GPL-3.0. // see LICENSE for license details. +use crate::utils::MetadataVersion; use clap::Parser as ClapParser; use codec::Decode; use color_eyre::eyre::{self, WrapErr}; @@ -25,6 +26,19 @@ 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 14. + #[clap(long = "version", default_value = "14")] + version: MetadataVersion, } pub async fn run(opts: Opts) -> color_eyre::Result<()> { diff --git a/cli/src/commands/metadata.rs b/cli/src/commands/metadata.rs index 00537778af..e983207f0e 100644 --- a/cli/src/commands/metadata.rs +++ b/cli/src/commands/metadata.rs @@ -3,6 +3,7 @@ // see LICENSE for license details. use crate::utils::FileOrUrl; +use crate::utils::MetadataVersion; use clap::Parser as ClapParser; use codec::{Decode, Encode}; use color_eyre::eyre; @@ -25,6 +26,19 @@ pub struct Opts { /// when using the option. #[clap(long, use_value_delimiter = true, value_parser)] pallets: 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", default_value = "14")] + version: MetadataVersion, } pub async fn run(opts: Opts) -> color_eyre::Result<()> { diff --git a/cli/src/utils.rs b/cli/src/utils.rs index c5af8c9cd8..37ca437305 100644 --- a/cli/src/utils.rs +++ b/cli/src/utils.rs @@ -43,3 +43,32 @@ impl FileOrUrl { } } } + +/// The metadata version to fetch from the node. +#[derive(Debug, Clone, Copy, PartialEq)] +pub struct MetadataVersion { + version: u32, +} + +impl std::str::FromStr for MetadataVersion { + type Err = String; + + fn from_str(input: &str) -> Result { + const SUPPORTED_VERSIONS: &[u32] = &[14]; + + match input { + "unstable" => Ok(MetadataVersion { version: u32::MAX }), + version => { + let num: u32 = version + .parse() + .map_err(|_| format!("Invalid metadata version specified {:?}. Subxt supports the following versions {:?}", version, SUPPORTED_VERSIONS))?; + + if !SUPPORTED_VERSIONS.iter().any(|&value| value == num) { + return Err(format!("Invalid metadata version specified {:?}. Subxt supports the following versions {:?}", version, SUPPORTED_VERSIONS)); + } + + Ok(MetadataVersion { version: num }) + } + } + } +} From 014b758b21a5d3ddcc080b221f1c5b0705181683 Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Thu, 27 Apr 2023 19:28:05 +0300 Subject: [PATCH 49/66] cli: Specify version to fetch Signed-off-by: Alexandru Vasile --- cli/src/commands/codegen.rs | 15 +--- cli/src/commands/compatibility.rs | 25 +++++-- cli/src/utils.rs | 53 +++++++++++-- codegen/src/api/mod.rs | 8 +- codegen/src/utils/fetch_metadata.rs | 112 +++++++++++++++++++--------- codegen/src/utils/mod.rs | 2 +- 6 files changed, 147 insertions(+), 68 deletions(-) diff --git a/cli/src/commands/codegen.rs b/cli/src/commands/codegen.rs index 054ac39446..eb2b10f33d 100644 --- a/cli/src/commands/codegen.rs +++ b/cli/src/commands/codegen.rs @@ -2,7 +2,7 @@ // This file is dual-licensed as Apache-2.0 or GPL-3.0. // see LICENSE for license details. -use crate::utils::{FileOrUrl, MetadataVersion}; +use crate::utils::FileOrUrl; use clap::Parser as ClapParser; use color_eyre::eyre; use subxt_codegen::{DerivesRegistry, TypeSubstitutes, TypeSubstitutionError}; @@ -16,19 +16,6 @@ use subxt_codegen::{DerivesRegistry, TypeSubstitutes, TypeSubstitutionError}; pub struct Opts { #[command(flatten)] file_or_url: FileOrUrl, - /// 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", default_value = "14")] - version: MetadataVersion, /// Additional derives #[clap(long = "derive")] derives: Vec, diff --git a/cli/src/commands/compatibility.rs b/cli/src/commands/compatibility.rs index 3a8adb6d44..9d5f1b1533 100644 --- a/cli/src/commands/compatibility.rs +++ b/cli/src/commands/compatibility.rs @@ -43,12 +43,18 @@ pub struct Opts { 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 { @@ -58,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) => { @@ -87,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:?}",); @@ -110,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.into()).await?; let metadata = ::decode(&mut &bytes[..])?; if metadata.0 != META_RESERVED { diff --git a/cli/src/utils.rs b/cli/src/utils.rs index 37ca437305..03f5ebd3d9 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 as CodegenMetadataVersion, Uri}; /// The source of the metadata. #[derive(Debug, Args)] @@ -16,29 +16,58 @@ 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.map(Into::into).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.map(Into::into).unwrap_or_default(), + ) + .await?) } } } @@ -72,3 +101,13 @@ impl std::str::FromStr for MetadataVersion { } } } + +impl From for CodegenMetadataVersion { + fn from(input: MetadataVersion) -> CodegenMetadataVersion { + match input.version { + 14 => CodegenMetadataVersion::V14, + u32::MAX => CodegenMetadataVersion::Unstable, + _ => panic!("MetadataVersion and CodegenMetadataVersion are not in sync!"), + } + } +} diff --git a/codegen/src/api/mod.rs b/codegen/src/api/mod.rs index 2ae1326b78..8f2a75944b 100644 --- a/codegen/src/api/mod.rs +++ b/codegen/src/api/mod.rs @@ -18,7 +18,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 +95,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::V14)?, + }; generate_runtime_api_from_bytes( item_mod, diff --git a/codegen/src/utils/fetch_metadata.rs b/codegen/src/utils/fetch_metadata.rs index 8ee0058667..e5f0b653a7 100644 --- a/codegen/src/utils/fetch_metadata.rs +++ b/codegen/src/utils/fetch_metadata.rs @@ -13,14 +13,34 @@ use jsonrpsee::{ }; use std::time::Duration; +/// The metadata version that is fetched from the node. +pub enum MetadataVersion { + /// Version 14. + V14, + /// Latest unstable version of the metadata. + Unstable, +} + +impl Default for MetadataVersion { + fn default() -> Self { + MetadataVersion::V14 + } +} + /// 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 @@ -33,10 +53,13 @@ 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> { +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).await, - Some("ws") | Some("wss") => fetch_metadata_ws(url).await, + 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())) @@ -47,49 +70,63 @@ pub async fn fetch_metadata_bytes(url: &Uri) -> Result, FetchMetadataErr } /// Returns the raw, 0x prefixed metadata hex from the provided URL. -pub async fn fetch_metadata_hex(url: &Uri) -> Result { - let bytes = fetch_metadata_bytes(url).await?; +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) } /// Execute runtime API call and return the specified runtime metadata version. -async fn fetch_latest_metadata(client: impl ClientT) -> Result, FetchMetadataError> { - const V15_METADATA_VERSION: u32 = u32::MAX; - let bytes = V15_METADATA_VERSION.encode(); +async fn fetch_metadata( + client: impl ClientT, + version: MetadataVersion, +) -> Result, FetchMetadataError> { + const UNSTABLE_METADATA_VERSION: u32 = u32::MAX; + const LATEST_STABLE_VERSION: u32 = 14; + + let version_num = match version { + MetadataVersion::V14 => 14, + MetadataVersion::Unstable => UNSTABLE_METADATA_VERSION, + }; + + // Fetch the latest stable version with `Metadata_metadata` API. + if version_num == LATEST_STABLE_VERSION { + let raw: String = client + .request("state_call", rpc_params!["Metadata_metadata", "0x"]) + .await?; + let raw_bytes = hex::decode(raw.trim_start_matches("0x"))?; + let bytes: frame_metadata::OpaqueMetadata = Decode::decode(&mut &raw_bytes[..])?; + return Ok(bytes.0); + } - // Runtime API arguments are scale encoded hex encoded. + // Other versions (including unstable) are fetched with `Metadata_metadata_at_version`. + let bytes = version_num.encode(); let version: String = format!("0x{}", hex::encode(&bytes)); - // Returns a hex(Option). - let result: Result = client + let raw: String = client .request( "state_call", rpc_params!["Metadata_metadata_at_version", &version], ) - .await; + .await?; - if let Ok(raw) = result { - let raw_bytes = hex::decode(raw.trim_start_matches("0x"))?; + let raw_bytes = hex::decode(raw.trim_start_matches("0x"))?; - let opaque: Option = Decode::decode(&mut &raw_bytes[..])?; - let bytes = opaque.ok_or(FetchMetadataError::Other( - "Metadata version not found".into(), - ))?; + let opaque: Option = Decode::decode(&mut &raw_bytes[..])?; + let bytes = opaque.ok_or(FetchMetadataError::Other( + "Metadata version not found".into(), + ))?; - return Ok(bytes.0); - } - - // The `Metadata_metadata_at_version` RPC failed, fall back to the `Metadata_metadata`. - let raw: String = client - .request("state_call", rpc_params!["Metadata_metadata", "0x"]) - .await?; - let raw_bytes = hex::decode(raw.trim_start_matches("0x"))?; - let bytes: frame_metadata::OpaqueMetadata = Decode::decode(&mut &raw_bytes[..])?; - Ok(bytes.0) + return Ok(bytes.0); } -async fn fetch_metadata_ws(url: &Uri) -> Result, FetchMetadataError> { +async fn fetch_metadata_ws( + url: &Uri, + version: MetadataVersion, +) -> Result, FetchMetadataError> { let (sender, receiver) = WsTransportClientBuilder::default() .build(url.to_string().parse::().unwrap()) .await @@ -100,13 +137,16 @@ async fn fetch_metadata_ws(url: &Uri) -> Result, FetchMetadataError> { .max_notifs_per_subscription(4096) .build_with_tokio(sender, receiver); - fetch_latest_metadata(client).await + fetch_metadata(client, version).await } -async fn fetch_metadata_http(url: &Uri) -> Result, FetchMetadataError> { +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())?; - fetch_latest_metadata(client).await + fetch_metadata(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, }; From 334ee4c6ff4ffc6e3473111a87853a189fb2eafd Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Fri, 28 Apr 2023 11:43:30 +0300 Subject: [PATCH 50/66] subxt: Fallback to fetching latest stable metadata Signed-off-by: Alexandru Vasile --- codegen/src/utils/fetch_metadata.rs | 10 +++------- subxt/src/client/online_client.rs | 7 ++++++- subxt/src/rpc/rpc.rs | 17 +++++++++++++++++ .../integration-tests/src/runtime_api/mod.rs | 2 +- 4 files changed, 27 insertions(+), 9 deletions(-) diff --git a/codegen/src/utils/fetch_metadata.rs b/codegen/src/utils/fetch_metadata.rs index e5f0b653a7..046c32c9bf 100644 --- a/codegen/src/utils/fetch_metadata.rs +++ b/codegen/src/utils/fetch_metadata.rs @@ -14,19 +14,15 @@ use jsonrpsee::{ use std::time::Duration; /// The metadata version that is fetched from the node. +#[derive(Default)] pub enum MetadataVersion { /// Version 14. + #[default] V14, /// Latest unstable version of the metadata. Unstable, } -impl Default for MetadataVersion { - fn default() -> Self { - MetadataVersion::V14 - } -} - /// Returns the metadata bytes from the provided URL, blocking the current thread. pub fn fetch_metadata_bytes_blocking( url: &Uri, @@ -120,7 +116,7 @@ async fn fetch_metadata( "Metadata version not found".into(), ))?; - return Ok(bytes.0); + Ok(bytes.0) } async fn fetch_metadata_ws( diff --git a/subxt/src/client/online_client.rs b/subxt/src/client/online_client.rs index fe2881afb0..262da499ed 100644 --- a/subxt/src/client/online_client.rs +++ b/subxt/src/client/online_client.rs @@ -135,7 +135,12 @@ impl OnlineClient { /// Fetch the metadata from substrate using the runtime API. async fn fetch_metadata(rpc: &Rpc) -> Result { const V15_METADATA_VERSION: u32 = u32::MAX; - rpc.metadata_at_version(V15_METADATA_VERSION).await + // Try to fetch the latest unstable metadata, if that fails fall back to + // fetching the latest stable metadata. + match rpc.metadata_at_version(V15_METADATA_VERSION).await { + Ok(bytes) => Ok(bytes), + Err(_) => rpc.state_call_metadata().await, + } } /// Create an object which can be used to keep the runtime up to date diff --git a/subxt/src/rpc/rpc.rs b/subxt/src/rpc/rpc.rs index 86595c6e42..6fb0e40ac9 100644 --- a/subxt/src/rpc/rpc.rs +++ b/subxt/src/rpc/rpc.rs @@ -393,6 +393,23 @@ impl Rpc { 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 state_call_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/testing/integration-tests/src/runtime_api/mod.rs b/testing/integration-tests/src/runtime_api/mod.rs index 43ad07e179..c70b1fdfd2 100644 --- a/testing/integration-tests/src/runtime_api/mod.rs +++ b/testing/integration-tests/src/runtime_api/mod.rs @@ -17,7 +17,7 @@ async fn account_nonce() -> Result<(), subxt::Error> { // Check Alice nonce is starting from 0. let runtime_api_call = node_runtime::apis() .account_nonce_api() - .account_nonce(alice); + .account_nonce(alice.clone()); let nonce = api .runtime_api() .at_latest() From dc3433c28adabedc6b89916b34d3fba0d8ed5729 Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Fri, 28 Apr 2023 12:56:30 +0300 Subject: [PATCH 51/66] subxt: Add unstable-metadata feature to fetch the latest Signed-off-by: Alexandru Vasile --- subxt/Cargo.toml | 6 ++++++ subxt/src/client/online_client.rs | 18 ++++++++++++------ testing/integration-tests/Cargo.toml | 2 +- 3 files changed, 19 insertions(+), 7 deletions(-) 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 262da499ed..9cf14a291d 100644 --- a/subxt/src/client/online_client.rs +++ b/subxt/src/client/online_client.rs @@ -134,13 +134,19 @@ impl OnlineClient { /// Fetch the metadata from substrate using the runtime API. async fn fetch_metadata(rpc: &Rpc) -> Result { - const V15_METADATA_VERSION: u32 = u32::MAX; - // Try to fetch the latest unstable metadata, if that fails fall back to - // fetching the latest stable metadata. - match rpc.metadata_at_version(V15_METADATA_VERSION).await { - Ok(bytes) => Ok(bytes), - Err(_) => rpc.state_call_metadata().await, + #[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.state_call_metadata().await, + } } + + #[cfg(not(feature = "unstable-metadata"))] + rpc.state_call_metadata().await } /// Create an object which can be used to keep the runtime up to date 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 } From 2d8e68db93ccbce7f07b2cb042d3d52fed11cd6f Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Tue, 2 May 2023 19:09:04 +0300 Subject: [PATCH 52/66] RuntimeVersion with Latest and Version(u32) Signed-off-by: Alexandru Vasile --- cli/src/utils.rs | 12 +++--------- codegen/src/api/mod.rs | 2 +- codegen/src/utils/fetch_metadata.rs | 28 ++++++++++++++-------------- subxt/src/client/online_client.rs | 6 +++--- subxt/src/rpc/rpc.rs | 6 +++--- 5 files changed, 24 insertions(+), 30 deletions(-) diff --git a/cli/src/utils.rs b/cli/src/utils.rs index 03f5ebd3d9..fd38954761 100644 --- a/cli/src/utils.rs +++ b/cli/src/utils.rs @@ -83,18 +83,12 @@ impl std::str::FromStr for MetadataVersion { type Err = String; fn from_str(input: &str) -> Result { - const SUPPORTED_VERSIONS: &[u32] = &[14]; - match input { "unstable" => Ok(MetadataVersion { version: u32::MAX }), version => { let num: u32 = version .parse() - .map_err(|_| format!("Invalid metadata version specified {:?}. Subxt supports the following versions {:?}", version, SUPPORTED_VERSIONS))?; - - if !SUPPORTED_VERSIONS.iter().any(|&value| value == num) { - return Err(format!("Invalid metadata version specified {:?}. Subxt supports the following versions {:?}", version, SUPPORTED_VERSIONS)); - } + .map_err(|_| format!("Invalid metadata version specified {:?}", version))?; Ok(MetadataVersion { version: num }) } @@ -105,9 +99,9 @@ impl std::str::FromStr for MetadataVersion { impl From for CodegenMetadataVersion { fn from(input: MetadataVersion) -> CodegenMetadataVersion { match input.version { - 14 => CodegenMetadataVersion::V14, u32::MAX => CodegenMetadataVersion::Unstable, - _ => panic!("MetadataVersion and CodegenMetadataVersion are not in sync!"), + 14 => CodegenMetadataVersion::Latest, + v => CodegenMetadataVersion::Version(v), } } } diff --git a/codegen/src/api/mod.rs b/codegen/src/api/mod.rs index 8f2a75944b..0ad2413728 100644 --- a/codegen/src/api/mod.rs +++ b/codegen/src/api/mod.rs @@ -98,7 +98,7 @@ pub fn generate_runtime_api_from_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::V14)?, + Err(_) => fetch_metadata_bytes_blocking(url, MetadataVersion::Latest)?, }; generate_runtime_api_from_bytes( diff --git a/codegen/src/utils/fetch_metadata.rs b/codegen/src/utils/fetch_metadata.rs index 046c32c9bf..a367503a04 100644 --- a/codegen/src/utils/fetch_metadata.rs +++ b/codegen/src/utils/fetch_metadata.rs @@ -16,9 +16,11 @@ use std::time::Duration; /// The metadata version that is fetched from the node. #[derive(Default)] pub enum MetadataVersion { - /// Version 14. + /// Latest stable version of the metadata. #[default] - V14, + Latest, + /// Fetch a specified version of the metadata. + Version(u32), /// Latest unstable version of the metadata. Unstable, } @@ -81,23 +83,21 @@ async fn fetch_metadata( version: MetadataVersion, ) -> Result, FetchMetadataError> { const UNSTABLE_METADATA_VERSION: u32 = u32::MAX; - const LATEST_STABLE_VERSION: u32 = 14; let version_num = match version { - MetadataVersion::V14 => 14, + MetadataVersion::Latest => { + // Fetch latest stable metadata of a node via `Metadata_metadata`. + let raw: String = client + .request("state_call", rpc_params!["Metadata_metadata", "0x"]) + .await?; + let raw_bytes = hex::decode(raw.trim_start_matches("0x"))?; + let bytes: frame_metadata::OpaqueMetadata = Decode::decode(&mut &raw_bytes[..])?; + return Ok(bytes.0); + } + MetadataVersion::Version(version) => version, MetadataVersion::Unstable => UNSTABLE_METADATA_VERSION, }; - // Fetch the latest stable version with `Metadata_metadata` API. - if version_num == LATEST_STABLE_VERSION { - let raw: String = client - .request("state_call", rpc_params!["Metadata_metadata", "0x"]) - .await?; - let raw_bytes = hex::decode(raw.trim_start_matches("0x"))?; - let bytes: frame_metadata::OpaqueMetadata = Decode::decode(&mut &raw_bytes[..])?; - return Ok(bytes.0); - } - // Other versions (including unstable) are fetched with `Metadata_metadata_at_version`. let bytes = version_num.encode(); let version: String = format!("0x{}", hex::encode(&bytes)); diff --git a/subxt/src/client/online_client.rs b/subxt/src/client/online_client.rs index 9cf14a291d..44f68635fc 100644 --- a/subxt/src/client/online_client.rs +++ b/subxt/src/client/online_client.rs @@ -141,12 +141,12 @@ impl OnlineClient { const V15_METADATA_VERSION: u32 = u32::MAX; match rpc.metadata_at_version(V15_METADATA_VERSION).await { Ok(bytes) => Ok(bytes), - Err(_) => rpc.state_call_metadata().await, + Err(_) => rpc.metadata().await, } } #[cfg(not(feature = "unstable-metadata"))] - rpc.state_call_metadata().await + rpc.metadata().await } /// Create an object which can be used to keep the runtime up to date @@ -390,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/rpc/rpc.rs b/subxt/src/rpc/rpc.rs index 6fb0e40ac9..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]) @@ -400,7 +400,7 @@ impl Rpc { /// /// This returns the same output as [`Self::metadata`], but calls directly /// into the runtime. - pub async fn state_call_metadata(&self) -> Result { + pub async fn metadata(&self) -> Result { let bytes: frame_metadata::OpaqueMetadata = self.state_call("Metadata_metadata", None, None).await?; From 4273fb7b0f03a86fe946b1acfef7dae56c361579 Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Tue, 2 May 2023 19:11:15 +0300 Subject: [PATCH 53/66] Update polkadot.rs Signed-off-by: Alexandru Vasile --- .../integration-tests/src/codegen/polkadot.rs | 19915 +++++++--------- 1 file changed, 8440 insertions(+), 11475 deletions(-) diff --git a/testing/integration-tests/src/codegen/polkadot.rs b/testing/integration-tests/src/codegen/polkadot.rs index f43481a2e1..8d83d6eab7 100644 --- a/testing/integration-tests/src/codegen/polkadot.rs +++ b/testing/integration-tests/src/codegen/polkadot.rs @@ -518,127 +518,454 @@ pub mod api { use super::runtime_types; use subxt::ext::codec::Encode; pub struct RuntimeApi; - impl RuntimeApi { - pub fn core(&self) -> core::Core { - core::Core - } - pub fn metadata(&self) -> metadata::Metadata { - metadata::Metadata - } - pub fn block_builder(&self) -> block_builder::BlockBuilder { - block_builder::BlockBuilder - } - pub fn nomination_pools_api(&self) -> nomination_pools_api::NominationPoolsApi { - nomination_pools_api::NominationPoolsApi - } - pub fn staking_api(&self) -> staking_api::StakingApi { - staking_api::StakingApi - } - pub fn tagged_transaction_queue( - &self, - ) -> tagged_transaction_queue::TaggedTransactionQueue { - tagged_transaction_queue::TaggedTransactionQueue - } - pub fn offchain_worker_api(&self) -> offchain_worker_api::OffchainWorkerApi { - offchain_worker_api::OffchainWorkerApi - } - pub fn parachain_host(&self) -> parachain_host::ParachainHost { - parachain_host::ParachainHost - } - pub fn beefy_api(&self) -> beefy_api::BeefyApi { - beefy_api::BeefyApi - } - pub fn mmr_api(&self) -> mmr_api::MmrApi { - mmr_api::MmrApi - } - pub fn grandpa_api(&self) -> grandpa_api::GrandpaApi { - grandpa_api::GrandpaApi - } - pub fn babe_api(&self) -> babe_api::BabeApi { - babe_api::BabeApi - } - pub fn authority_discovery_api( - &self, - ) -> authority_discovery_api::AuthorityDiscoveryApi { - authority_discovery_api::AuthorityDiscoveryApi - } - pub fn session_keys(&self) -> session_keys::SessionKeys { - session_keys::SessionKeys - } - pub fn account_nonce_api(&self) -> account_nonce_api::AccountNonceApi { - account_nonce_api::AccountNonceApi - } - pub fn transaction_payment_api( - &self, - ) -> transaction_payment_api::TransactionPaymentApi { - transaction_payment_api::TransactionPaymentApi - } - pub fn transaction_payment_call_api( - &self, - ) -> transaction_payment_call_api::TransactionPaymentCallApi { - transaction_payment_call_api::TransactionPaymentCallApi - } + impl RuntimeApi {} + } + pub struct ConstantsApi; + impl ConstantsApi { + pub fn system(&self) -> system::constants::ConstantsApi { + system::constants::ConstantsApi + } + pub fn scheduler(&self) -> scheduler::constants::ConstantsApi { + scheduler::constants::ConstantsApi + } + pub fn babe(&self) -> babe::constants::ConstantsApi { + babe::constants::ConstantsApi + } + pub fn timestamp(&self) -> timestamp::constants::ConstantsApi { + timestamp::constants::ConstantsApi + } + pub fn indices(&self) -> indices::constants::ConstantsApi { + indices::constants::ConstantsApi + } + pub fn balances(&self) -> balances::constants::ConstantsApi { + balances::constants::ConstantsApi + } + pub fn transaction_payment(&self) -> transaction_payment::constants::ConstantsApi { + transaction_payment::constants::ConstantsApi + } + pub fn staking(&self) -> staking::constants::ConstantsApi { + staking::constants::ConstantsApi + } + pub fn grandpa(&self) -> grandpa::constants::ConstantsApi { + grandpa::constants::ConstantsApi + } + pub fn im_online(&self) -> im_online::constants::ConstantsApi { + im_online::constants::ConstantsApi + } + pub fn democracy(&self) -> democracy::constants::ConstantsApi { + democracy::constants::ConstantsApi + } + pub fn 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 + } + pub fn vesting(&self) -> vesting::constants::ConstantsApi { + vesting::constants::ConstantsApi + } + pub fn utility(&self) -> utility::constants::ConstantsApi { + utility::constants::ConstantsApi + } + pub fn identity(&self) -> identity::constants::ConstantsApi { + identity::constants::ConstantsApi + } + pub fn proxy(&self) -> proxy::constants::ConstantsApi { + proxy::constants::ConstantsApi + } + pub fn multisig(&self) -> multisig::constants::ConstantsApi { + multisig::constants::ConstantsApi + } + pub fn bounties(&self) -> bounties::constants::ConstantsApi { + bounties::constants::ConstantsApi + } + pub fn child_bounties(&self) -> child_bounties::constants::ConstantsApi { + child_bounties::constants::ConstantsApi + } + pub fn tips(&self) -> tips::constants::ConstantsApi { + tips::constants::ConstantsApi + } + pub fn election_provider_multi_phase( + &self, + ) -> election_provider_multi_phase::constants::ConstantsApi { + election_provider_multi_phase::constants::ConstantsApi + } + pub fn voter_list(&self) -> voter_list::constants::ConstantsApi { + voter_list::constants::ConstantsApi + } + 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 + } + pub fn registrar(&self) -> registrar::constants::ConstantsApi { + registrar::constants::ConstantsApi + } + pub fn slots(&self) -> slots::constants::ConstantsApi { + slots::constants::ConstantsApi + } + pub fn auctions(&self) -> auctions::constants::ConstantsApi { + auctions::constants::ConstantsApi + } + pub fn crowdloan(&self) -> crowdloan::constants::ConstantsApi { + crowdloan::constants::ConstantsApi + } + } + pub struct StorageApi; + impl StorageApi { + pub fn system(&self) -> system::storage::StorageApi { + system::storage::StorageApi + } + pub fn scheduler(&self) -> scheduler::storage::StorageApi { + scheduler::storage::StorageApi + } + pub fn preimage(&self) -> preimage::storage::StorageApi { + preimage::storage::StorageApi + } + pub fn babe(&self) -> babe::storage::StorageApi { + babe::storage::StorageApi + } + pub fn timestamp(&self) -> timestamp::storage::StorageApi { + timestamp::storage::StorageApi + } + pub fn indices(&self) -> indices::storage::StorageApi { + indices::storage::StorageApi + } + pub fn balances(&self) -> balances::storage::StorageApi { + balances::storage::StorageApi + } + pub fn transaction_payment(&self) -> transaction_payment::storage::StorageApi { + transaction_payment::storage::StorageApi + } + pub fn authorship(&self) -> authorship::storage::StorageApi { + authorship::storage::StorageApi + } + pub fn staking(&self) -> staking::storage::StorageApi { + staking::storage::StorageApi + } + pub fn offences(&self) -> offences::storage::StorageApi { + offences::storage::StorageApi + } + pub fn session(&self) -> session::storage::StorageApi { + session::storage::StorageApi + } + pub fn grandpa(&self) -> grandpa::storage::StorageApi { + grandpa::storage::StorageApi + } + pub fn im_online(&self) -> im_online::storage::StorageApi { + im_online::storage::StorageApi + } + pub fn democracy(&self) -> democracy::storage::StorageApi { + democracy::storage::StorageApi + } + pub fn council(&self) -> council::storage::StorageApi { + council::storage::StorageApi + } + pub fn technical_committee(&self) -> technical_committee::storage::StorageApi { + technical_committee::storage::StorageApi + } + pub fn phragmen_election(&self) -> phragmen_election::storage::StorageApi { + phragmen_election::storage::StorageApi + } + pub fn technical_membership(&self) -> technical_membership::storage::StorageApi { + technical_membership::storage::StorageApi + } + 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 + } + pub fn vesting(&self) -> vesting::storage::StorageApi { + vesting::storage::StorageApi + } + pub fn identity(&self) -> identity::storage::StorageApi { + identity::storage::StorageApi + } + pub fn proxy(&self) -> proxy::storage::StorageApi { + proxy::storage::StorageApi + } + pub fn multisig(&self) -> multisig::storage::StorageApi { + multisig::storage::StorageApi + } + pub fn bounties(&self) -> bounties::storage::StorageApi { + bounties::storage::StorageApi + } + pub fn child_bounties(&self) -> child_bounties::storage::StorageApi { + child_bounties::storage::StorageApi + } + pub fn tips(&self) -> tips::storage::StorageApi { + tips::storage::StorageApi + } + pub fn election_provider_multi_phase( + &self, + ) -> election_provider_multi_phase::storage::StorageApi { + election_provider_multi_phase::storage::StorageApi + } + pub fn voter_list(&self) -> voter_list::storage::StorageApi { + voter_list::storage::StorageApi + } + pub fn nomination_pools(&self) -> nomination_pools::storage::StorageApi { + nomination_pools::storage::StorageApi + } + pub fn fast_unstake(&self) -> fast_unstake::storage::StorageApi { + fast_unstake::storage::StorageApi + } + pub fn configuration(&self) -> configuration::storage::StorageApi { + configuration::storage::StorageApi + } + pub fn paras_shared(&self) -> paras_shared::storage::StorageApi { + paras_shared::storage::StorageApi + } + pub fn para_inclusion(&self) -> para_inclusion::storage::StorageApi { + para_inclusion::storage::StorageApi + } + pub fn para_inherent(&self) -> para_inherent::storage::StorageApi { + para_inherent::storage::StorageApi + } + pub fn para_scheduler(&self) -> para_scheduler::storage::StorageApi { + para_scheduler::storage::StorageApi + } + pub fn paras(&self) -> paras::storage::StorageApi { + paras::storage::StorageApi + } + pub fn initializer(&self) -> initializer::storage::StorageApi { + initializer::storage::StorageApi + } + pub fn dmp(&self) -> dmp::storage::StorageApi { + dmp::storage::StorageApi + } + pub fn ump(&self) -> ump::storage::StorageApi { + ump::storage::StorageApi + } + pub fn hrmp(&self) -> hrmp::storage::StorageApi { + hrmp::storage::StorageApi + } + pub fn para_session_info(&self) -> para_session_info::storage::StorageApi { + para_session_info::storage::StorageApi + } + pub fn paras_disputes(&self) -> paras_disputes::storage::StorageApi { + paras_disputes::storage::StorageApi + } + pub fn registrar(&self) -> registrar::storage::StorageApi { + registrar::storage::StorageApi + } + pub fn slots(&self) -> slots::storage::StorageApi { + slots::storage::StorageApi + } + pub fn auctions(&self) -> auctions::storage::StorageApi { + auctions::storage::StorageApi + } + pub fn crowdloan(&self) -> crowdloan::storage::StorageApi { + crowdloan::storage::StorageApi + } + pub fn xcm_pallet(&self) -> xcm_pallet::storage::StorageApi { + xcm_pallet::storage::StorageApi + } + } + pub struct TransactionApi; + impl TransactionApi { + pub fn system(&self) -> system::calls::TransactionApi { + system::calls::TransactionApi + } + pub fn scheduler(&self) -> scheduler::calls::TransactionApi { + scheduler::calls::TransactionApi + } + pub fn preimage(&self) -> preimage::calls::TransactionApi { + preimage::calls::TransactionApi + } + pub fn babe(&self) -> babe::calls::TransactionApi { + babe::calls::TransactionApi + } + pub fn timestamp(&self) -> timestamp::calls::TransactionApi { + timestamp::calls::TransactionApi + } + pub fn indices(&self) -> indices::calls::TransactionApi { + indices::calls::TransactionApi + } + pub fn balances(&self) -> balances::calls::TransactionApi { + balances::calls::TransactionApi + } + pub fn staking(&self) -> staking::calls::TransactionApi { + staking::calls::TransactionApi + } + pub fn session(&self) -> session::calls::TransactionApi { + session::calls::TransactionApi + } + pub fn grandpa(&self) -> grandpa::calls::TransactionApi { + grandpa::calls::TransactionApi + } + pub fn im_online(&self) -> im_online::calls::TransactionApi { + im_online::calls::TransactionApi + } + pub fn democracy(&self) -> democracy::calls::TransactionApi { + democracy::calls::TransactionApi + } + pub fn council(&self) -> council::calls::TransactionApi { + council::calls::TransactionApi + } + pub fn technical_committee(&self) -> technical_committee::calls::TransactionApi { + technical_committee::calls::TransactionApi + } + pub fn phragmen_election(&self) -> phragmen_election::calls::TransactionApi { + phragmen_election::calls::TransactionApi + } + pub fn technical_membership(&self) -> technical_membership::calls::TransactionApi { + technical_membership::calls::TransactionApi + } + 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 + } + pub fn vesting(&self) -> vesting::calls::TransactionApi { + vesting::calls::TransactionApi + } + pub fn utility(&self) -> utility::calls::TransactionApi { + utility::calls::TransactionApi + } + pub fn identity(&self) -> identity::calls::TransactionApi { + identity::calls::TransactionApi + } + pub fn proxy(&self) -> proxy::calls::TransactionApi { + proxy::calls::TransactionApi + } + pub fn multisig(&self) -> multisig::calls::TransactionApi { + multisig::calls::TransactionApi + } + pub fn bounties(&self) -> bounties::calls::TransactionApi { + bounties::calls::TransactionApi + } + pub fn child_bounties(&self) -> child_bounties::calls::TransactionApi { + child_bounties::calls::TransactionApi + } + pub fn tips(&self) -> tips::calls::TransactionApi { + tips::calls::TransactionApi + } + pub fn election_provider_multi_phase( + &self, + ) -> election_provider_multi_phase::calls::TransactionApi { + election_provider_multi_phase::calls::TransactionApi + } + pub fn voter_list(&self) -> voter_list::calls::TransactionApi { + voter_list::calls::TransactionApi + } + pub fn nomination_pools(&self) -> nomination_pools::calls::TransactionApi { + nomination_pools::calls::TransactionApi + } + pub fn fast_unstake(&self) -> fast_unstake::calls::TransactionApi { + fast_unstake::calls::TransactionApi + } + pub fn configuration(&self) -> configuration::calls::TransactionApi { + configuration::calls::TransactionApi + } + pub fn paras_shared(&self) -> paras_shared::calls::TransactionApi { + paras_shared::calls::TransactionApi + } + pub fn para_inclusion(&self) -> para_inclusion::calls::TransactionApi { + para_inclusion::calls::TransactionApi + } + pub fn para_inherent(&self) -> para_inherent::calls::TransactionApi { + para_inherent::calls::TransactionApi + } + pub fn paras(&self) -> paras::calls::TransactionApi { + paras::calls::TransactionApi + } + pub fn initializer(&self) -> initializer::calls::TransactionApi { + initializer::calls::TransactionApi + } + pub fn dmp(&self) -> dmp::calls::TransactionApi { + dmp::calls::TransactionApi + } + pub fn ump(&self) -> ump::calls::TransactionApi { + ump::calls::TransactionApi + } + pub fn hrmp(&self) -> hrmp::calls::TransactionApi { + hrmp::calls::TransactionApi + } + pub fn paras_disputes(&self) -> paras_disputes::calls::TransactionApi { + paras_disputes::calls::TransactionApi + } + pub fn registrar(&self) -> registrar::calls::TransactionApi { + registrar::calls::TransactionApi + } + pub fn slots(&self) -> slots::calls::TransactionApi { + slots::calls::TransactionApi + } + pub fn auctions(&self) -> auctions::calls::TransactionApi { + auctions::calls::TransactionApi + } + pub fn crowdloan(&self) -> crowdloan::calls::TransactionApi { + crowdloan::calls::TransactionApi + } + pub fn xcm_pallet(&self) -> xcm_pallet::calls::TransactionApi { + xcm_pallet::calls::TransactionApi + } + } + #[doc = r" check whether the Client you are using is aligned with the statically generated codegen."] + pub fn validate_codegen>( + client: &C, + ) -> Result<(), ::subxt::error::MetadataError> { + let runtime_metadata_hash = client.metadata().metadata_hash(&PALLETS); + if runtime_metadata_hash + != [ + 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) + } else { + Ok(()) } - pub mod core { + } + pub mod system { + 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; - #[doc = " The `Core` runtime api that every Substrate runtime needs to implement."] - pub struct Core; - impl Core { - #[doc = " Returns the version of the runtime."] - pub fn version( - &self, - ) -> ::subxt::runtime_api::Payload< - inputs::Version, - runtime_types::sp_version::RuntimeVersion, - > { - ::subxt::runtime_api::Payload::new_static( - "Core_version", - inputs::Version {}, - [ - 209u8, 59u8, 156u8, 128u8, 14u8, 210u8, 96u8, 63u8, 140u8, 0u8, 65u8, - 211u8, 118u8, 177u8, 9u8, 208u8, 105u8, 124u8, 132u8, 203u8, 157u8, - 207u8, 186u8, 177u8, 91u8, 170u8, 22u8, 224u8, 88u8, 56u8, 56u8, 13u8, - ], - ) - } - #[doc = " Execute the given block."] - pub fn execute_block( - &self, - block : runtime_types :: sp_runtime :: generic :: block :: Block < runtime_types :: sp_runtime :: generic :: header :: Header < :: core :: primitive :: u32 , runtime_types :: sp_runtime :: traits :: BlakeTwo256 > , runtime_types :: sp_runtime :: generic :: unchecked_extrinsic :: UncheckedExtrinsic < :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , () > , runtime_types :: polkadot_runtime :: RuntimeCall , runtime_types :: sp_runtime :: MultiSignature , (runtime_types :: frame_system :: extensions :: check_non_zero_sender :: CheckNonZeroSender , runtime_types :: frame_system :: extensions :: check_spec_version :: CheckSpecVersion , runtime_types :: frame_system :: extensions :: check_tx_version :: CheckTxVersion , runtime_types :: frame_system :: extensions :: check_genesis :: CheckGenesis , runtime_types :: frame_system :: extensions :: check_mortality :: CheckMortality , runtime_types :: frame_system :: extensions :: check_nonce :: CheckNonce , runtime_types :: frame_system :: extensions :: check_weight :: CheckWeight , runtime_types :: pallet_transaction_payment :: ChargeTransactionPayment , runtime_types :: polkadot_runtime_common :: claims :: PrevalidateAttests ,) > >, - ) -> ::subxt::runtime_api::Payload { - ::subxt::runtime_api::Payload::new_static( - "Core_execute_block", - inputs::ExecuteBlock { block }, - [ - 199u8, 164u8, 96u8, 78u8, 188u8, 134u8, 19u8, 247u8, 63u8, 58u8, 93u8, - 227u8, 122u8, 157u8, 93u8, 196u8, 16u8, 7u8, 20u8, 17u8, 178u8, 152u8, - 211u8, 185u8, 56u8, 153u8, 118u8, 241u8, 118u8, 105u8, 85u8, 3u8, - ], - ) - } - #[doc = " Initialize a block with the given header."] - pub fn initialize_block( - &self, - header: runtime_types::sp_runtime::generic::header::Header< - ::core::primitive::u32, - runtime_types::sp_runtime::traits::BlakeTwo256, - >, - ) -> ::subxt::runtime_api::Payload { - ::subxt::runtime_api::Payload::new_static( - "Core_initialize_block", - inputs::InitializeBlock { header }, - [ - 45u8, 232u8, 143u8, 132u8, 33u8, 211u8, 71u8, 186u8, 169u8, 91u8, - 143u8, 156u8, 174u8, 156u8, 10u8, 25u8, 203u8, 16u8, 208u8, 226u8, - 12u8, 233u8, 145u8, 228u8, 63u8, 118u8, 66u8, 247u8, 71u8, 48u8, 44u8, - 243u8, - ], - ) - } - } - pub mod inputs { - use super::root_mod; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod types { use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, @@ -650,8 +977,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 Version {} + 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, @@ -661,7 +991,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 ExecuteBlock { pub block : runtime_types :: sp_runtime :: generic :: block :: Block < runtime_types :: sp_runtime :: generic :: header :: Header < :: core :: primitive :: u32 , runtime_types :: sp_runtime :: traits :: BlakeTwo256 > , runtime_types :: sp_runtime :: generic :: unchecked_extrinsic :: UncheckedExtrinsic < :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , () > , runtime_types :: polkadot_runtime :: RuntimeCall , runtime_types :: sp_runtime :: MultiSignature , (runtime_types :: frame_system :: extensions :: check_non_zero_sender :: CheckNonZeroSender , runtime_types :: frame_system :: extensions :: check_spec_version :: CheckSpecVersion , runtime_types :: frame_system :: extensions :: check_tx_version :: CheckTxVersion , runtime_types :: frame_system :: extensions :: check_genesis :: CheckGenesis , runtime_types :: frame_system :: extensions :: check_mortality :: CheckMortality , runtime_types :: frame_system :: extensions :: check_nonce :: CheckNonce , runtime_types :: frame_system :: extensions :: check_weight :: CheckWeight , runtime_types :: pallet_transaction_payment :: ChargeTransactionPayment , runtime_types :: polkadot_runtime_common :: claims :: PrevalidateAttests ,) > > , } + pub struct SetHeapPages { + pub pages: ::core::primitive::u64, + } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -672,83 +1004,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 InitializeBlock { - pub header: runtime_types::sp_runtime::generic::header::Header< - ::core::primitive::u32, - runtime_types::sp_runtime::traits::BlakeTwo256, - >, + pub struct SetCode { + pub code: ::std::vec::Vec<::core::primitive::u8>, } - } - } - pub mod metadata { - use super::root_mod; - use super::runtime_types; - #[doc = " The `Metadata` api trait that returns metadata for the runtime."] - pub struct Metadata; - impl Metadata { - #[doc = " Returns the metadata of a runtime."] - pub fn metadata( - &self, - ) -> ::subxt::runtime_api::Payload< - inputs::Metadata, - runtime_types::sp_core::OpaqueMetadata, - > { - ::subxt::runtime_api::Payload::new_static( - "Metadata_metadata", - inputs::Metadata {}, - [ - 158u8, 223u8, 229u8, 177u8, 228u8, 49u8, 24u8, 219u8, 143u8, 82u8, - 255u8, 132u8, 245u8, 210u8, 160u8, 197u8, 218u8, 10u8, 63u8, 165u8, - 115u8, 91u8, 70u8, 151u8, 246u8, 51u8, 18u8, 235u8, 91u8, 143u8, 27u8, - 127u8, - ], - ) + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (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>, } - #[doc = " Returns the metadata at a given version."] - #[doc = ""] - #[doc = " If the given `version` isn't supported, this will return `None`."] - #[doc = " Use [`Self::metadata_versions`] to find out about supported metadata version of the runtime."] - pub fn metadata_at_version( - &self, - version: ::core::primitive::u32, - ) -> ::subxt::runtime_api::Payload< - inputs::MetadataAtVersion, - ::core::option::Option, - > { - ::subxt::runtime_api::Payload::new_static( - "Metadata_metadata_at_version", - inputs::MetadataAtVersion { version }, - [ - 50u8, 164u8, 234u8, 88u8, 65u8, 62u8, 176u8, 66u8, 188u8, 114u8, 205u8, - 29u8, 137u8, 173u8, 194u8, 54u8, 237u8, 48u8, 221u8, 46u8, 166u8, 44u8, - 220u8, 137u8, 97u8, 128u8, 204u8, 137u8, 29u8, 229u8, 31u8, 134u8, - ], - ) - } - #[doc = " Returns the supported metadata versions."] - #[doc = ""] - #[doc = " This can be used to call `metadata_at_version`."] - pub fn metadata_versions( - &self, - ) -> ::subxt::runtime_api::Payload< - inputs::MetadataVersions, - ::std::vec::Vec<::core::primitive::u32>, - > { - ::subxt::runtime_api::Payload::new_static( - "Metadata_metadata_versions", - inputs::MetadataVersions {}, - [ - 255u8, 234u8, 86u8, 244u8, 238u8, 175u8, 175u8, 54u8, 181u8, 181u8, - 23u8, 185u8, 231u8, 242u8, 153u8, 246u8, 205u8, 142u8, 184u8, 21u8, - 240u8, 217u8, 195u8, 231u8, 32u8, 163u8, 127u8, 3u8, 51u8, 130u8, 68u8, - 124u8, - ], - ) + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (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>, + )>, } - } - pub mod inputs { - use super::root_mod; - use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -759,7 +1046,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 Metadata {} + pub struct KillStorage { + pub keys: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, + } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -770,8 +1059,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 MetadataAtVersion { - pub version: ::core::primitive::u32, + pub struct KillPrefix { + pub prefix: ::std::vec::Vec<::core::primitive::u8>, + pub subkeys: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -783,870 +1073,873 @@ 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 MetadataVersions {} + pub struct RemarkWithEvent { + pub remark: ::std::vec::Vec<::core::primitive::u8>, + } } - } - pub mod block_builder { - use super::root_mod; - use super::runtime_types; - #[doc = " The `BlockBuilder` api trait that provides the required functionality for building a block."] - pub struct BlockBuilder; - impl BlockBuilder { - #[doc = " Apply the given extrinsic."] - #[doc = ""] - #[doc = " Returns an inclusion outcome which specifies if this extrinsic is included in"] - #[doc = " this block or not."] - pub fn apply_extrinsic( - &self, - extrinsic : runtime_types :: sp_runtime :: generic :: unchecked_extrinsic :: UncheckedExtrinsic < :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , () > , runtime_types :: polkadot_runtime :: RuntimeCall , runtime_types :: sp_runtime :: MultiSignature , (runtime_types :: frame_system :: extensions :: check_non_zero_sender :: CheckNonZeroSender , runtime_types :: frame_system :: extensions :: check_spec_version :: CheckSpecVersion , runtime_types :: frame_system :: extensions :: check_tx_version :: CheckTxVersion , runtime_types :: frame_system :: extensions :: check_genesis :: CheckGenesis , runtime_types :: frame_system :: extensions :: check_mortality :: CheckMortality , runtime_types :: frame_system :: extensions :: check_nonce :: CheckNonce , runtime_types :: frame_system :: extensions :: check_weight :: CheckWeight , runtime_types :: pallet_transaction_payment :: ChargeTransactionPayment , runtime_types :: polkadot_runtime_common :: claims :: PrevalidateAttests ,) >, - ) -> ::subxt::runtime_api::Payload< - inputs::ApplyExtrinsic, - ::core::result::Result< - ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - runtime_types::sp_runtime::transaction_validity::TransactionValidityError, - >, - > { - ::subxt::runtime_api::Payload::new_static( - "BlockBuilder_apply_extrinsic", - inputs::ApplyExtrinsic { extrinsic }, + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Make some on-chain remark."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(1)`"] + pub fn remark( + &self, + remark: ::std::vec::Vec<::core::primitive::u8>, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "System", + "remark", + types::Remark { remark }, [ - 151u8, 89u8, 106u8, 151u8, 95u8, 29u8, 10u8, 68u8, 85u8, 149u8, 144u8, - 132u8, 47u8, 46u8, 164u8, 91u8, 225u8, 219u8, 85u8, 120u8, 101u8, - 105u8, 45u8, 79u8, 171u8, 133u8, 121u8, 170u8, 197u8, 248u8, 24u8, - 10u8, + 101u8, 80u8, 195u8, 226u8, 224u8, 247u8, 60u8, 128u8, 3u8, 101u8, 51u8, + 147u8, 96u8, 126u8, 76u8, 230u8, 194u8, 227u8, 191u8, 73u8, 160u8, + 146u8, 87u8, 147u8, 243u8, 28u8, 228u8, 116u8, 224u8, 181u8, 129u8, + 160u8, ], ) } - #[doc = " Finish the current block."] - pub fn finalize_block( + #[doc = "Set the number of pages in the WebAssembly environment's heap."] + pub fn set_heap_pages( &self, - ) -> ::subxt::runtime_api::Payload< - inputs::FinalizeBlock, - runtime_types::sp_runtime::generic::header::Header< - ::core::primitive::u32, - runtime_types::sp_runtime::traits::BlakeTwo256, - >, - > { - ::subxt::runtime_api::Payload::new_static( - "BlockBuilder_finalize_block", - inputs::FinalizeBlock {}, + pages: ::core::primitive::u64, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "System", + "set_heap_pages", + types::SetHeapPages { pages }, [ - 78u8, 179u8, 67u8, 170u8, 213u8, 230u8, 122u8, 98u8, 76u8, 244u8, - 225u8, 219u8, 83u8, 115u8, 94u8, 229u8, 93u8, 142u8, 120u8, 172u8, - 87u8, 99u8, 120u8, 41u8, 143u8, 184u8, 71u8, 49u8, 126u8, 55u8, 240u8, - 125u8, + 43u8, 103u8, 128u8, 49u8, 156u8, 136u8, 11u8, 204u8, 80u8, 6u8, 244u8, + 86u8, 171u8, 44u8, 140u8, 225u8, 142u8, 198u8, 43u8, 87u8, 26u8, 45u8, + 125u8, 222u8, 165u8, 254u8, 172u8, 158u8, 39u8, 178u8, 86u8, 87u8, ], ) } - #[doc = " Generate inherent extrinsics. The inherent data will vary from chain to chain."] pub fn inherent_extrinsics (& self , inherent : runtime_types :: sp_inherents :: InherentData ,) -> :: subxt :: runtime_api :: Payload < inputs :: InherentExtrinsics , :: std :: vec :: Vec < runtime_types :: sp_runtime :: generic :: unchecked_extrinsic :: UncheckedExtrinsic < :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , () > , runtime_types :: polkadot_runtime :: RuntimeCall , runtime_types :: sp_runtime :: MultiSignature , (runtime_types :: frame_system :: extensions :: check_non_zero_sender :: CheckNonZeroSender , runtime_types :: frame_system :: extensions :: check_spec_version :: CheckSpecVersion , runtime_types :: frame_system :: extensions :: check_tx_version :: CheckTxVersion , runtime_types :: frame_system :: extensions :: check_genesis :: CheckGenesis , runtime_types :: frame_system :: extensions :: check_mortality :: CheckMortality , runtime_types :: frame_system :: extensions :: check_nonce :: CheckNonce , runtime_types :: frame_system :: extensions :: check_weight :: CheckWeight , runtime_types :: pallet_transaction_payment :: ChargeTransactionPayment , runtime_types :: polkadot_runtime_common :: claims :: PrevalidateAttests ,) > > >{ - ::subxt::runtime_api::Payload::new_static( - "BlockBuilder_inherent_extrinsics", - inputs::InherentExtrinsics { inherent }, + #[doc = "Set the new runtime code."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(C + S)` where `C` length of `code` and `S` complexity of `can_set_code`"] + pub fn set_code( + &self, + code: ::std::vec::Vec<::core::primitive::u8>, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "System", + "set_code", + types::SetCode { code }, [ - 75u8, 86u8, 85u8, 104u8, 125u8, 169u8, 23u8, 92u8, 162u8, 73u8, 65u8, - 223u8, 100u8, 24u8, 201u8, 157u8, 145u8, 208u8, 238u8, 11u8, 255u8, - 98u8, 0u8, 211u8, 189u8, 94u8, 5u8, 123u8, 25u8, 1u8, 88u8, 234u8, + 27u8, 104u8, 244u8, 205u8, 188u8, 254u8, 121u8, 13u8, 106u8, 120u8, + 244u8, 108u8, 97u8, 84u8, 100u8, 68u8, 26u8, 69u8, 93u8, 128u8, 107u8, + 4u8, 3u8, 142u8, 13u8, 134u8, 196u8, 62u8, 113u8, 181u8, 14u8, 40u8, ], ) } - #[doc = " Check that the inherents are valid. The inherent data will vary from chain to chain."] - pub fn check_inherents( + #[doc = "Set the new runtime code without doing any checks of the given `code`."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(C)` where `C` length of `code`"] + pub fn set_code_without_checks( &self, - block : runtime_types :: sp_runtime :: generic :: block :: Block < runtime_types :: sp_runtime :: generic :: header :: Header < :: core :: primitive :: u32 , runtime_types :: sp_runtime :: traits :: BlakeTwo256 > , runtime_types :: sp_runtime :: generic :: unchecked_extrinsic :: UncheckedExtrinsic < :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , () > , runtime_types :: polkadot_runtime :: RuntimeCall , runtime_types :: sp_runtime :: MultiSignature , (runtime_types :: frame_system :: extensions :: check_non_zero_sender :: CheckNonZeroSender , runtime_types :: frame_system :: extensions :: check_spec_version :: CheckSpecVersion , runtime_types :: frame_system :: extensions :: check_tx_version :: CheckTxVersion , runtime_types :: frame_system :: extensions :: check_genesis :: CheckGenesis , runtime_types :: frame_system :: extensions :: check_mortality :: CheckMortality , runtime_types :: frame_system :: extensions :: check_nonce :: CheckNonce , runtime_types :: frame_system :: extensions :: check_weight :: CheckWeight , runtime_types :: pallet_transaction_payment :: ChargeTransactionPayment , runtime_types :: polkadot_runtime_common :: claims :: PrevalidateAttests ,) > >, - data: runtime_types::sp_inherents::InherentData, - ) -> ::subxt::runtime_api::Payload< - inputs::CheckInherents, - runtime_types::sp_inherents::CheckInherentsResult, - > { - ::subxt::runtime_api::Payload::new_static( - "BlockBuilder_check_inherents", - inputs::CheckInherents { block, data }, + code: ::std::vec::Vec<::core::primitive::u8>, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "System", + "set_code_without_checks", + types::SetCodeWithoutChecks { code }, [ - 162u8, 99u8, 46u8, 228u8, 124u8, 158u8, 224u8, 212u8, 90u8, 101u8, - 133u8, 173u8, 82u8, 61u8, 131u8, 131u8, 254u8, 209u8, 17u8, 181u8, - 87u8, 190u8, 80u8, 165u8, 172u8, 179u8, 121u8, 202u8, 126u8, 48u8, - 254u8, 112u8, + 102u8, 160u8, 125u8, 235u8, 30u8, 23u8, 45u8, 239u8, 112u8, 148u8, + 159u8, 158u8, 42u8, 93u8, 206u8, 94u8, 80u8, 250u8, 66u8, 195u8, 60u8, + 40u8, 142u8, 169u8, 183u8, 80u8, 80u8, 96u8, 3u8, 231u8, 99u8, 216u8, ], ) } - } - pub mod inputs { - use super::root_mod; - 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 ApplyExtrinsic { pub extrinsic : runtime_types :: sp_runtime :: generic :: unchecked_extrinsic :: UncheckedExtrinsic < :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , () > , runtime_types :: polkadot_runtime :: RuntimeCall , runtime_types :: sp_runtime :: MultiSignature , (runtime_types :: frame_system :: extensions :: check_non_zero_sender :: CheckNonZeroSender , runtime_types :: frame_system :: extensions :: check_spec_version :: CheckSpecVersion , runtime_types :: frame_system :: extensions :: check_tx_version :: CheckTxVersion , runtime_types :: frame_system :: extensions :: check_genesis :: CheckGenesis , runtime_types :: frame_system :: extensions :: check_mortality :: CheckMortality , runtime_types :: frame_system :: extensions :: check_nonce :: CheckNonce , runtime_types :: frame_system :: extensions :: check_weight :: CheckWeight , runtime_types :: pallet_transaction_payment :: ChargeTransactionPayment , runtime_types :: polkadot_runtime_common :: claims :: PrevalidateAttests ,) > , } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct FinalizeBlock {} - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct InherentExtrinsics { - pub inherent: runtime_types::sp_inherents::InherentData, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CheckInherents { pub block : runtime_types :: sp_runtime :: generic :: block :: Block < runtime_types :: sp_runtime :: generic :: header :: Header < :: core :: primitive :: u32 , runtime_types :: sp_runtime :: traits :: BlakeTwo256 > , runtime_types :: sp_runtime :: generic :: unchecked_extrinsic :: UncheckedExtrinsic < :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , () > , runtime_types :: polkadot_runtime :: RuntimeCall , runtime_types :: sp_runtime :: MultiSignature , (runtime_types :: frame_system :: extensions :: check_non_zero_sender :: CheckNonZeroSender , runtime_types :: frame_system :: extensions :: check_spec_version :: CheckSpecVersion , runtime_types :: frame_system :: extensions :: check_tx_version :: CheckTxVersion , runtime_types :: frame_system :: extensions :: check_genesis :: CheckGenesis , runtime_types :: frame_system :: extensions :: check_mortality :: CheckMortality , runtime_types :: frame_system :: extensions :: check_nonce :: CheckNonce , runtime_types :: frame_system :: extensions :: check_weight :: CheckWeight , runtime_types :: pallet_transaction_payment :: ChargeTransactionPayment , runtime_types :: polkadot_runtime_common :: claims :: PrevalidateAttests ,) > > , pub data : runtime_types :: sp_inherents :: InherentData , } - } - } - pub mod nomination_pools_api { - use super::root_mod; - use super::runtime_types; - #[doc = " Runtime api for accessing information about nomination pools."] - pub struct NominationPoolsApi; - impl NominationPoolsApi { - #[doc = " Returns the pending rewards for the member that the AccountId was given for."] - pub fn pending_rewards( + #[doc = "Set some items of storage."] + pub fn set_storage( &self, - who: ::subxt::utils::AccountId32, - ) -> ::subxt::runtime_api::Payload - { - ::subxt::runtime_api::Payload::new_static( - "NominationPoolsApi_pending_rewards", - inputs::PendingRewards { who }, + items: ::std::vec::Vec<( + ::std::vec::Vec<::core::primitive::u8>, + ::std::vec::Vec<::core::primitive::u8>, + )>, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "System", + "set_storage", + types::SetStorage { items }, [ - 235u8, 64u8, 57u8, 70u8, 111u8, 27u8, 62u8, 236u8, 36u8, 192u8, 103u8, - 89u8, 221u8, 194u8, 46u8, 223u8, 71u8, 249u8, 33u8, 135u8, 43u8, 42u8, - 147u8, 57u8, 130u8, 44u8, 35u8, 132u8, 163u8, 153u8, 201u8, 105u8, + 74u8, 43u8, 106u8, 255u8, 50u8, 151u8, 192u8, 155u8, 14u8, 90u8, 19u8, + 45u8, 165u8, 16u8, 235u8, 242u8, 21u8, 131u8, 33u8, 172u8, 119u8, 78u8, + 140u8, 10u8, 107u8, 202u8, 122u8, 235u8, 181u8, 191u8, 22u8, 116u8, ], ) } - #[doc = " Returns the equivalent balance of `points` for a given pool."] - pub fn points_to_balance( + #[doc = "Kill some items from storage."] + pub fn kill_storage( &self, - pool_id: ::core::primitive::u32, - points: ::core::primitive::u128, - ) -> ::subxt::runtime_api::Payload - { - ::subxt::runtime_api::Payload::new_static( - "NominationPoolsApi_points_to_balance", - inputs::PointsToBalance { pool_id, points }, + keys: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "System", + "kill_storage", + types::KillStorage { keys }, [ - 30u8, 7u8, 5u8, 95u8, 146u8, 43u8, 110u8, 21u8, 148u8, 160u8, 74u8, - 92u8, 168u8, 188u8, 74u8, 41u8, 129u8, 172u8, 138u8, 30u8, 232u8, - 214u8, 154u8, 18u8, 52u8, 87u8, 71u8, 127u8, 141u8, 177u8, 216u8, - 158u8, + 174u8, 174u8, 13u8, 174u8, 75u8, 138u8, 128u8, 235u8, 222u8, 216u8, + 85u8, 18u8, 198u8, 1u8, 138u8, 70u8, 19u8, 108u8, 209u8, 41u8, 228u8, + 67u8, 130u8, 230u8, 160u8, 207u8, 11u8, 180u8, 139u8, 242u8, 41u8, + 15u8, ], ) } - #[doc = " Returns the equivalent points of `new_funds` for a given pool."] - pub fn balance_to_points( + #[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"] + #[doc = "the prefix we are removing to accurately calculate the weight of this function."] + pub fn kill_prefix( &self, - pool_id: ::core::primitive::u32, - new_funds: ::core::primitive::u128, - ) -> ::subxt::runtime_api::Payload - { - ::subxt::runtime_api::Payload::new_static( - "NominationPoolsApi_balance_to_points", - inputs::BalanceToPoints { pool_id, new_funds }, + prefix: ::std::vec::Vec<::core::primitive::u8>, + subkeys: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "System", + "kill_prefix", + types::KillPrefix { prefix, subkeys }, [ - 152u8, 165u8, 227u8, 129u8, 31u8, 108u8, 224u8, 174u8, 74u8, 192u8, - 102u8, 139u8, 17u8, 119u8, 173u8, 220u8, 52u8, 157u8, 125u8, 107u8, - 110u8, 236u8, 9u8, 93u8, 239u8, 3u8, 18u8, 140u8, 203u8, 136u8, 183u8, - 215u8, + 203u8, 116u8, 217u8, 42u8, 154u8, 215u8, 77u8, 217u8, 13u8, 22u8, + 193u8, 2u8, 128u8, 115u8, 179u8, 115u8, 187u8, 218u8, 129u8, 34u8, + 80u8, 4u8, 173u8, 120u8, 92u8, 35u8, 237u8, 112u8, 201u8, 207u8, 200u8, + 48u8, ], ) } - } - pub mod inputs { - use super::root_mod; - 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 PendingRewards { - pub who: ::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 PointsToBalance { - pub pool_id: ::core::primitive::u32, - pub 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 BalanceToPoints { - pub pool_id: ::core::primitive::u32, - pub new_funds: ::core::primitive::u128, - } - } - } - pub mod staking_api { - use super::root_mod; - use super::runtime_types; - pub struct StakingApi; - impl StakingApi { - #[doc = " Returns the nominations quota for a nominator with a given balance."] - pub fn nominations_quota( + #[doc = "Make some on-chain remark and emit event."] + pub fn remark_with_event( &self, - balance: ::core::primitive::u128, - ) -> ::subxt::runtime_api::Payload - { - ::subxt::runtime_api::Payload::new_static( - "StakingApi_nominations_quota", - inputs::NominationsQuota { balance }, + remark: ::std::vec::Vec<::core::primitive::u8>, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "System", + "remark_with_event", + types::RemarkWithEvent { remark }, [ - 181u8, 19u8, 6u8, 134u8, 234u8, 67u8, 127u8, 210u8, 53u8, 38u8, 175u8, - 160u8, 243u8, 71u8, 187u8, 206u8, 178u8, 91u8, 26u8, 115u8, 18u8, - 214u8, 50u8, 208u8, 161u8, 197u8, 81u8, 13u8, 98u8, 53u8, 124u8, 62u8, + 123u8, 225u8, 180u8, 179u8, 144u8, 74u8, 27u8, 85u8, 101u8, 75u8, + 134u8, 44u8, 181u8, 25u8, 183u8, 158u8, 14u8, 213u8, 56u8, 225u8, + 136u8, 88u8, 26u8, 114u8, 178u8, 43u8, 176u8, 43u8, 240u8, 84u8, 116u8, + 46u8, ], ) } } - pub mod inputs { - use super::root_mod; - 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 NominationsQuota { - pub balance: ::core::primitive::u128, - } - } } - pub mod tagged_transaction_queue { - use super::root_mod; + #[doc = "Event for the System pallet."] + pub type Event = runtime_types::frame_system::pallet::Event; + pub mod events { use super::runtime_types; - #[doc = " The `TaggedTransactionQueue` api trait for interfering with the transaction queue."] - pub struct TaggedTransactionQueue; - impl TaggedTransactionQueue { - #[doc = " Validate the transaction."] - #[doc = ""] - #[doc = " This method is invoked by the transaction pool to learn details about given transaction."] - #[doc = " The implementation should make sure to verify the correctness of the transaction"] - #[doc = " against current state. The given `block_hash` corresponds to the hash of the block"] - #[doc = " that is used as current state."] - #[doc = ""] - #[doc = " Note that this call may be performed by the pool multiple times and transactions"] - #[doc = " might be verified in any possible order."] - pub fn validate_transaction( - &self, - source: runtime_types::sp_runtime::transaction_validity::TransactionSource, - tx : runtime_types :: sp_runtime :: generic :: unchecked_extrinsic :: UncheckedExtrinsic < :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , () > , runtime_types :: polkadot_runtime :: RuntimeCall , runtime_types :: sp_runtime :: MultiSignature , (runtime_types :: frame_system :: extensions :: check_non_zero_sender :: CheckNonZeroSender , runtime_types :: frame_system :: extensions :: check_spec_version :: CheckSpecVersion , runtime_types :: frame_system :: extensions :: check_tx_version :: CheckTxVersion , runtime_types :: frame_system :: extensions :: check_genesis :: CheckGenesis , runtime_types :: frame_system :: extensions :: check_mortality :: CheckMortality , runtime_types :: frame_system :: extensions :: check_nonce :: CheckNonce , runtime_types :: frame_system :: extensions :: check_weight :: CheckWeight , runtime_types :: pallet_transaction_payment :: ChargeTransactionPayment , runtime_types :: polkadot_runtime_common :: claims :: PrevalidateAttests ,) >, - block_hash: ::subxt::utils::H256, - ) -> ::subxt::runtime_api::Payload< - inputs::ValidateTransaction, - ::core::result::Result< - runtime_types::sp_runtime::transaction_validity::ValidTransaction, - runtime_types::sp_runtime::transaction_validity::TransactionValidityError, - >, - > { - ::subxt::runtime_api::Payload::new_static( - "TaggedTransactionQueue_validate_transaction", - inputs::ValidateTransaction { - source, - tx, - block_hash, - }, - [ - 93u8, 180u8, 253u8, 37u8, 212u8, 54u8, 180u8, 214u8, 33u8, 5u8, 113u8, - 181u8, 25u8, 48u8, 153u8, 221u8, 78u8, 6u8, 115u8, 191u8, 72u8, 75u8, - 203u8, 171u8, 129u8, 75u8, 56u8, 60u8, 243u8, 92u8, 173u8, 12u8, - ], - ) - } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + 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 extrinsic completed successfully."] + pub struct ExtrinsicSuccess { + pub dispatch_info: runtime_types::frame_support::dispatch::DispatchInfo, } - pub mod inputs { - use super::root_mod; - 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 ValidateTransaction { pub source : runtime_types :: sp_runtime :: transaction_validity :: TransactionSource , pub tx : runtime_types :: sp_runtime :: generic :: unchecked_extrinsic :: UncheckedExtrinsic < :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , () > , runtime_types :: polkadot_runtime :: RuntimeCall , runtime_types :: sp_runtime :: MultiSignature , (runtime_types :: frame_system :: extensions :: check_non_zero_sender :: CheckNonZeroSender , runtime_types :: frame_system :: extensions :: check_spec_version :: CheckSpecVersion , runtime_types :: frame_system :: extensions :: check_tx_version :: CheckTxVersion , runtime_types :: frame_system :: extensions :: check_genesis :: CheckGenesis , runtime_types :: frame_system :: extensions :: check_mortality :: CheckMortality , runtime_types :: frame_system :: extensions :: check_nonce :: CheckNonce , runtime_types :: frame_system :: extensions :: check_weight :: CheckWeight , runtime_types :: pallet_transaction_payment :: ChargeTransactionPayment , runtime_types :: polkadot_runtime_common :: claims :: PrevalidateAttests ,) > , pub block_hash : :: subxt :: utils :: H256 , } + impl ::subxt::events::StaticEvent for ExtrinsicSuccess { + const PALLET: &'static str = "System"; + const EVENT: &'static str = "ExtrinsicSuccess"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + 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 extrinsic failed."] + pub struct ExtrinsicFailed { + pub dispatch_error: runtime_types::sp_runtime::DispatchError, + pub dispatch_info: runtime_types::frame_support::dispatch::DispatchInfo, + } + impl ::subxt::events::StaticEvent for ExtrinsicFailed { + const PALLET: &'static str = "System"; + const EVENT: &'static str = "ExtrinsicFailed"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + 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 = "`:code` was updated."] + pub struct CodeUpdated; + impl ::subxt::events::StaticEvent for CodeUpdated { + const PALLET: &'static str = "System"; + const EVENT: &'static str = "CodeUpdated"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + 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 account was created."] + pub struct NewAccount { + pub account: ::subxt::utils::AccountId32, + } + impl ::subxt::events::StaticEvent for NewAccount { + const PALLET: &'static str = "System"; + const EVENT: &'static str = "NewAccount"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + 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 reaped."] + pub struct KilledAccount { + pub account: ::subxt::utils::AccountId32, + } + impl ::subxt::events::StaticEvent for KilledAccount { + const PALLET: &'static str = "System"; + const EVENT: &'static str = "KilledAccount"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + 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 = "On on-chain remark happened."] + pub struct Remarked { + pub sender: ::subxt::utils::AccountId32, + pub hash: ::subxt::utils::H256, + } + impl ::subxt::events::StaticEvent for Remarked { + const PALLET: &'static str = "System"; + const EVENT: &'static str = "Remarked"; } } - pub mod offchain_worker_api { - use super::root_mod; + pub mod storage { use super::runtime_types; - #[doc = " The offchain worker api."] - pub struct OffchainWorkerApi; - impl OffchainWorkerApi { - #[doc = " Starts the off-chain task for given block header."] - pub fn offchain_worker( + pub struct StorageApi; + impl StorageApi { + #[doc = " The full account information for a particular account ID."] + pub fn account( &self, - header: runtime_types::sp_runtime::generic::header::Header< + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::frame_system::AccountInfo< ::core::primitive::u32, - runtime_types::sp_runtime::traits::BlakeTwo256, + runtime_types::pallet_balances::types::AccountData<::core::primitive::u128>, >, - ) -> ::subxt::runtime_api::Payload { - ::subxt::runtime_api::Payload::new_static( - "OffchainWorkerApi_offchain_worker", - inputs::OffchainWorker { header }, - [ - 187u8, 145u8, 211u8, 0u8, 200u8, 151u8, 231u8, 42u8, 187u8, 128u8, - 157u8, 64u8, 191u8, 64u8, 31u8, 158u8, 13u8, 159u8, 227u8, 120u8, - 155u8, 215u8, 228u8, 215u8, 44u8, 8u8, 206u8, 116u8, 241u8, 133u8, 2u8, - 234u8, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "System", + "Account", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], + [ + 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, ], ) } - } - pub mod inputs { - use super::root_mod; - 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 OffchainWorker { - pub header: runtime_types::sp_runtime::generic::header::Header< + #[doc = " The full account information for a particular account ID."] + pub fn account_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::frame_system::AccountInfo< ::core::primitive::u32, - runtime_types::sp_runtime::traits::BlakeTwo256, + runtime_types::pallet_balances::types::AccountData<::core::primitive::u128>, >, - } - } - } - pub mod parachain_host { - use super::root_mod; - use super::runtime_types; - #[doc = " The API for querying the state of parachains on-chain."] - pub struct ParachainHost; - impl ParachainHost { - #[doc = " Get the current validators."] - pub fn validators( - &self, - ) -> ::subxt::runtime_api::Payload< - inputs::Validators, - ::std::vec::Vec, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::runtime_api::Payload::new_static( - "ParachainHost_validators", - inputs::Validators {}, + ::subxt::storage::address::Address::new_static( + "System", + "Account", + Vec::new(), [ - 105u8, 23u8, 110u8, 209u8, 38u8, 112u8, 199u8, 134u8, 145u8, 131u8, - 38u8, 221u8, 254u8, 147u8, 242u8, 149u8, 94u8, 76u8, 197u8, 67u8, - 228u8, 113u8, 196u8, 50u8, 122u8, 1u8, 121u8, 225u8, 163u8, 210u8, - 66u8, 68u8, + 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, ], ) } - #[doc = " Returns the validator groups and rotation info localized based on the hypothetical child"] - #[doc = " of a block whose state this is invoked on. Note that `now` in the `GroupRotationInfo`"] - #[doc = " should be the successor of the number of the block."] - pub fn validator_groups( + #[doc = " Total extrinsics count for the current block."] + pub fn extrinsic_count( &self, - ) -> ::subxt::runtime_api::Payload< - inputs::ValidatorGroups, - ( - ::std::vec::Vec< - ::std::vec::Vec, - >, - runtime_types::polkadot_primitives::v4::GroupRotationInfo< - ::core::primitive::u32, - >, - ), + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + ::subxt::storage::address::Yes, + (), + (), > { - ::subxt::runtime_api::Payload::new_static( - "ParachainHost_validator_groups", - inputs::ValidatorGroups {}, + ::subxt::storage::address::Address::new_static( + "System", + "ExtrinsicCount", + vec![], [ - 185u8, 206u8, 229u8, 10u8, 93u8, 19u8, 23u8, 44u8, 159u8, 13u8, 235u8, - 236u8, 78u8, 153u8, 144u8, 82u8, 106u8, 248u8, 8u8, 92u8, 250u8, 54u8, - 153u8, 53u8, 183u8, 60u8, 67u8, 216u8, 201u8, 88u8, 217u8, 120u8, + 223u8, 60u8, 201u8, 120u8, 36u8, 44u8, 180u8, 210u8, 242u8, 53u8, + 222u8, 154u8, 123u8, 176u8, 249u8, 8u8, 225u8, 28u8, 232u8, 4u8, 136u8, + 41u8, 151u8, 82u8, 189u8, 149u8, 49u8, 166u8, 139u8, 9u8, 163u8, 231u8, ], ) } - #[doc = " Yields information on all availability cores as relevant to the child block."] - #[doc = " Cores are either free or occupied. Free cores can have paras assigned to them."] - pub fn availability_cores( + #[doc = " The current weight for the block."] + pub fn block_weight( &self, - ) -> ::subxt::runtime_api::Payload< - inputs::AvailabilityCores, - ::std::vec::Vec< - runtime_types::polkadot_primitives::v4::CoreState< - ::subxt::utils::H256, - ::core::primitive::u32, - >, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::frame_support::dispatch::PerDispatchClass< + runtime_types::sp_weights::weight_v2::Weight, >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), > { - ::subxt::runtime_api::Payload::new_static( - "ParachainHost_availability_cores", - inputs::AvailabilityCores {}, + ::subxt::storage::address::Address::new_static( + "System", + "BlockWeight", + vec![], [ - 107u8, 20u8, 115u8, 26u8, 118u8, 211u8, 207u8, 122u8, 134u8, 174u8, - 98u8, 237u8, 216u8, 175u8, 39u8, 176u8, 211u8, 78u8, 142u8, 29u8, - 127u8, 56u8, 160u8, 249u8, 174u8, 244u8, 146u8, 181u8, 4u8, 166u8, - 93u8, 13u8, + 120u8, 67u8, 71u8, 163u8, 36u8, 202u8, 52u8, 106u8, 143u8, 155u8, + 144u8, 87u8, 142u8, 241u8, 232u8, 183u8, 56u8, 235u8, 27u8, 237u8, + 20u8, 202u8, 33u8, 85u8, 189u8, 0u8, 28u8, 52u8, 198u8, 40u8, 219u8, + 54u8, ], ) } - #[doc = " Yields the persisted validation data for the given `ParaId` along with an assumption that"] - #[doc = " should be used if the para currently occupies a core."] - #[doc = ""] - #[doc = " Returns `None` if either the para is not registered or the assumption is `Freed`"] - #[doc = " and the para already occupies a core."] - pub fn persisted_validation_data( + #[doc = " Total length (in bytes) for all extrinsics put together, for the current block."] + pub fn all_extrinsics_len( &self, - para_id: runtime_types::polkadot_parachain::primitives::Id, - assumption: runtime_types::polkadot_primitives::v4::OccupiedCoreAssumption, - ) -> ::subxt::runtime_api::Payload< - inputs::PersistedValidationData, - ::core::option::Option< - runtime_types::polkadot_primitives::v4::PersistedValidationData< - ::subxt::utils::H256, - ::core::primitive::u32, - >, - >, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + ::subxt::storage::address::Yes, + (), + (), > { - ::subxt::runtime_api::Payload::new_static( - "ParachainHost_persisted_validation_data", - inputs::PersistedValidationData { - para_id, - assumption, - }, + ::subxt::storage::address::Address::new_static( + "System", + "AllExtrinsicsLen", + vec![], [ - 230u8, 186u8, 57u8, 116u8, 47u8, 20u8, 186u8, 89u8, 108u8, 211u8, 22u8, - 57u8, 124u8, 234u8, 140u8, 3u8, 104u8, 89u8, 89u8, 188u8, 156u8, 130u8, - 146u8, 77u8, 129u8, 66u8, 227u8, 157u8, 4u8, 134u8, 7u8, 237u8, + 202u8, 145u8, 209u8, 225u8, 40u8, 220u8, 174u8, 74u8, 93u8, 164u8, + 254u8, 248u8, 254u8, 192u8, 32u8, 117u8, 96u8, 149u8, 53u8, 145u8, + 219u8, 64u8, 234u8, 18u8, 217u8, 200u8, 203u8, 141u8, 145u8, 28u8, + 134u8, 60u8, ], ) } - #[doc = " Returns the persisted validation data for the given `ParaId` along with the corresponding"] - #[doc = " validation code hash. Instead of accepting assumption about the para, matches the validation"] - #[doc = " data hash against an expected one and yields `None` if they're not equal."] - pub fn assumed_validation_data( + #[doc = " Map of block numbers to block hashes."] + pub fn block_hash( &self, - para_id: runtime_types::polkadot_parachain::primitives::Id, - expected_persisted_validation_data_hash: ::subxt::utils::H256, - ) -> ::subxt::runtime_api::Payload< - inputs::AssumedValidationData, - ::core::option::Option<( - runtime_types::polkadot_primitives::v4::PersistedValidationData< - ::subxt::utils::H256, - ::core::primitive::u32, - >, - runtime_types::polkadot_parachain::primitives::ValidationCodeHash, - )>, + _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::Yes, > { - ::subxt::runtime_api::Payload::new_static( - "ParachainHost_assumed_validation_data", - inputs::AssumedValidationData { - para_id, - expected_persisted_validation_data_hash, - }, + ::subxt::storage::address::Address::new_static( + "System", + "BlockHash", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], [ - 53u8, 137u8, 220u8, 72u8, 155u8, 9u8, 200u8, 207u8, 158u8, 108u8, - 204u8, 15u8, 188u8, 162u8, 129u8, 158u8, 62u8, 200u8, 13u8, 0u8, 217u8, - 195u8, 19u8, 151u8, 187u8, 231u8, 197u8, 235u8, 128u8, 244u8, 51u8, - 85u8, + 50u8, 112u8, 176u8, 239u8, 175u8, 18u8, 205u8, 20u8, 241u8, 195u8, + 21u8, 228u8, 186u8, 57u8, 200u8, 25u8, 38u8, 44u8, 106u8, 20u8, 168u8, + 80u8, 76u8, 235u8, 12u8, 51u8, 137u8, 149u8, 200u8, 4u8, 220u8, 237u8, ], ) } - #[doc = " Checks if the given validation outputs pass the acceptance criteria."] - pub fn check_validation_outputs( + #[doc = " Map of block numbers to block hashes."] + pub fn block_hash_root( &self, - para_id: runtime_types::polkadot_parachain::primitives::Id, - outputs: runtime_types::polkadot_primitives::v4::CandidateCommitments< - ::core::primitive::u32, - >, - ) -> ::subxt::runtime_api::Payload< - inputs::CheckValidationOutputs, - ::core::primitive::bool, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::subxt::utils::H256, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::runtime_api::Payload::new_static( - "ParachainHost_check_validation_outputs", - inputs::CheckValidationOutputs { para_id, outputs }, + ::subxt::storage::address::Address::new_static( + "System", + "BlockHash", + Vec::new(), [ - 99u8, 191u8, 194u8, 26u8, 245u8, 216u8, 224u8, 232u8, 26u8, 184u8, - 120u8, 64u8, 32u8, 134u8, 215u8, 138u8, 195u8, 30u8, 220u8, 111u8, - 119u8, 182u8, 62u8, 72u8, 5u8, 144u8, 87u8, 157u8, 125u8, 125u8, 237u8, - 34u8, + 50u8, 112u8, 176u8, 239u8, 175u8, 18u8, 205u8, 20u8, 241u8, 195u8, + 21u8, 228u8, 186u8, 57u8, 200u8, 25u8, 38u8, 44u8, 106u8, 20u8, 168u8, + 80u8, 76u8, 235u8, 12u8, 51u8, 137u8, 149u8, 200u8, 4u8, 220u8, 237u8, ], ) } - #[doc = " Returns the session index expected at a child of the block."] - #[doc = ""] - #[doc = " This can be used to instantiate a `SigningContext`."] - pub fn session_index_for_child( + #[doc = " Extrinsics data for the current block (maps an extrinsic's index to its data)."] + pub fn extrinsic_data( &self, - ) -> ::subxt::runtime_api::Payload< - inputs::SessionIndexForChild, - ::core::primitive::u32, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec<::core::primitive::u8>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::runtime_api::Payload::new_static( - "ParachainHost_session_index_for_child", - inputs::SessionIndexForChild {}, + ::subxt::storage::address::Address::new_static( + "System", + "ExtrinsicData", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], [ - 224u8, 173u8, 95u8, 16u8, 57u8, 180u8, 35u8, 148u8, 243u8, 77u8, 123u8, - 242u8, 212u8, 122u8, 27u8, 32u8, 44u8, 166u8, 66u8, 124u8, 1u8, 190u8, - 93u8, 124u8, 57u8, 127u8, 249u8, 141u8, 173u8, 92u8, 137u8, 165u8, + 210u8, 224u8, 211u8, 186u8, 118u8, 210u8, 185u8, 194u8, 238u8, 211u8, + 254u8, 73u8, 67u8, 184u8, 31u8, 229u8, 168u8, 125u8, 98u8, 23u8, 241u8, + 59u8, 49u8, 86u8, 126u8, 9u8, 114u8, 163u8, 160u8, 62u8, 50u8, 67u8, ], ) } - #[doc = " Fetch the validation code used by a para, making the given `OccupiedCoreAssumption`."] - #[doc = ""] - #[doc = " Returns `None` if either the para is not registered or the assumption is `Freed`"] - #[doc = " and the para already occupies a core."] - pub fn validation_code( + #[doc = " Extrinsics data for the current block (maps an extrinsic's index to its data)."] + pub fn extrinsic_data_root( &self, - para_id: runtime_types::polkadot_parachain::primitives::Id, - assumption: runtime_types::polkadot_primitives::v4::OccupiedCoreAssumption, - ) -> ::subxt::runtime_api::Payload< - inputs::ValidationCode, - ::core::option::Option< - runtime_types::polkadot_parachain::primitives::ValidationCode, - >, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec<::core::primitive::u8>, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::runtime_api::Payload::new_static( - "ParachainHost_validation_code", - inputs::ValidationCode { - para_id, - assumption, - }, + ::subxt::storage::address::Address::new_static( + "System", + "ExtrinsicData", + Vec::new(), [ - 231u8, 64u8, 145u8, 133u8, 197u8, 196u8, 177u8, 229u8, 152u8, 70u8, - 16u8, 159u8, 65u8, 66u8, 172u8, 58u8, 60u8, 50u8, 232u8, 28u8, 36u8, - 211u8, 161u8, 28u8, 192u8, 153u8, 89u8, 186u8, 9u8, 246u8, 228u8, 84u8, + 210u8, 224u8, 211u8, 186u8, 118u8, 210u8, 185u8, 194u8, 238u8, 211u8, + 254u8, 73u8, 67u8, 184u8, 31u8, 229u8, 168u8, 125u8, 98u8, 23u8, 241u8, + 59u8, 49u8, 86u8, 126u8, 9u8, 114u8, 163u8, 160u8, 62u8, 50u8, 67u8, ], ) } - #[doc = " Get the receipt of a candidate pending availability. This returns `Some` for any paras"] - #[doc = " assigned to occupied cores in `availability_cores` and `None` otherwise."] - pub fn candidate_pending_availability( + #[doc = " The current block number being processed. Set by `execute_block`."] + pub fn number( &self, - para_id: runtime_types::polkadot_parachain::primitives::Id, - ) -> ::subxt::runtime_api::Payload< - inputs::CandidatePendingAvailability, - ::core::option::Option< - runtime_types::polkadot_primitives::v4::CommittedCandidateReceipt< - ::subxt::utils::H256, - >, - >, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), > { - ::subxt::runtime_api::Payload::new_static( - "ParachainHost_candidate_pending_availability", - inputs::CandidatePendingAvailability { para_id }, + ::subxt::storage::address::Address::new_static( + "System", + "Number", + vec![], [ - 175u8, 68u8, 187u8, 74u8, 138u8, 129u8, 153u8, 251u8, 216u8, 70u8, - 251u8, 151u8, 169u8, 252u8, 31u8, 16u8, 61u8, 242u8, 169u8, 15u8, - 123u8, 58u8, 177u8, 131u8, 6u8, 79u8, 30u8, 105u8, 51u8, 67u8, 19u8, - 208u8, + 228u8, 96u8, 102u8, 190u8, 252u8, 130u8, 239u8, 172u8, 126u8, 235u8, + 246u8, 139u8, 208u8, 15u8, 88u8, 245u8, 141u8, 232u8, 43u8, 204u8, + 36u8, 87u8, 211u8, 141u8, 187u8, 68u8, 236u8, 70u8, 193u8, 235u8, + 164u8, 191u8, ], ) } - #[doc = " Get a vector of events concerning candidates that occurred within a block."] - pub fn candidate_events( + #[doc = " Hash of the previous block."] + pub fn parent_hash( &self, - ) -> ::subxt::runtime_api::Payload< - inputs::CandidateEvents, - ::std::vec::Vec< - runtime_types::polkadot_primitives::v4::CandidateEvent< - ::subxt::utils::H256, - >, - >, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::subxt::utils::H256, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), > { - ::subxt::runtime_api::Payload::new_static( - "ParachainHost_candidate_events", - inputs::CandidateEvents {}, + ::subxt::storage::address::Address::new_static( + "System", + "ParentHash", + vec![], [ - 50u8, 177u8, 192u8, 138u8, 139u8, 179u8, 76u8, 167u8, 238u8, 92u8, - 255u8, 249u8, 223u8, 61u8, 112u8, 7u8, 0u8, 6u8, 43u8, 71u8, 209u8, - 21u8, 14u8, 184u8, 19u8, 68u8, 106u8, 193u8, 38u8, 251u8, 19u8, 208u8, + 232u8, 206u8, 177u8, 119u8, 38u8, 57u8, 233u8, 50u8, 225u8, 49u8, + 169u8, 176u8, 210u8, 51u8, 231u8, 176u8, 234u8, 186u8, 188u8, 112u8, + 15u8, 152u8, 195u8, 232u8, 201u8, 97u8, 208u8, 249u8, 9u8, 163u8, 69u8, + 36u8, ], ) } - #[doc = " Get all the pending inbound messages in the downward message queue for a para."] - pub fn dmq_contents( + #[doc = " Digest of the current block, also part of the block header."] + pub fn digest( &self, - recipient: runtime_types::polkadot_parachain::primitives::Id, - ) -> ::subxt::runtime_api::Payload< - inputs::DmqContents, - ::std::vec::Vec< - runtime_types::polkadot_core_primitives::InboundDownwardMessage< - ::core::primitive::u32, - >, - >, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::sp_runtime::generic::digest::Digest, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), > { - ::subxt::runtime_api::Payload::new_static( - "ParachainHost_dmq_contents", - inputs::DmqContents { recipient }, + ::subxt::storage::address::Address::new_static( + "System", + "Digest", + vec![], [ - 34u8, 66u8, 1u8, 92u8, 223u8, 240u8, 222u8, 128u8, 190u8, 242u8, 160u8, - 140u8, 60u8, 57u8, 155u8, 105u8, 10u8, 162u8, 212u8, 72u8, 1u8, 192u8, - 36u8, 26u8, 127u8, 86u8, 8u8, 255u8, 57u8, 210u8, 148u8, 254u8, + 83u8, 141u8, 200u8, 132u8, 182u8, 55u8, 197u8, 122u8, 13u8, 159u8, + 31u8, 42u8, 60u8, 191u8, 89u8, 221u8, 242u8, 47u8, 199u8, 213u8, 48u8, + 216u8, 131u8, 168u8, 245u8, 82u8, 56u8, 190u8, 62u8, 69u8, 96u8, 37u8, ], ) } - #[doc = " Get the contents of all channels addressed to the given recipient. Channels that have no"] - #[doc = " messages in them are also included."] - pub fn inbound_hrmp_channels_contents( + #[doc = " Events deposited for the current block."] + #[doc = ""] + #[doc = " NOTE: The item is unbound and should therefore never be read on chain."] + #[doc = " It could otherwise inflate the PoV size of a block."] + #[doc = ""] + #[doc = " Events have a large in-memory size. Box the events to not go out-of-memory"] + #[doc = " just in case someone still reads them from within the runtime."] + pub fn events( &self, - recipient: runtime_types::polkadot_parachain::primitives::Id, - ) -> ::subxt::runtime_api::Payload< - inputs::InboundHrmpChannelsContents, - ::subxt::utils::KeyedVec< - runtime_types::polkadot_parachain::primitives::Id, - ::std::vec::Vec< - runtime_types::polkadot_core_primitives::InboundHrmpMessage< - ::core::primitive::u32, - >, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec< + runtime_types::frame_system::EventRecord< + runtime_types::polkadot_runtime::RuntimeEvent, + ::subxt::utils::H256, >, >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), > { - ::subxt::runtime_api::Payload::new_static( - "ParachainHost_inbound_hrmp_channels_contents", - inputs::InboundHrmpChannelsContents { recipient }, + ::subxt::storage::address::Address::new_static( + "System", + "Events", + vec![], [ - 209u8, 72u8, 244u8, 143u8, 167u8, 234u8, 8u8, 33u8, 80u8, 154u8, 132u8, - 22u8, 62u8, 174u8, 3u8, 89u8, 78u8, 115u8, 119u8, 77u8, 169u8, 80u8, - 98u8, 164u8, 8u8, 8u8, 50u8, 120u8, 58u8, 12u8, 114u8, 57u8, + 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, ], ) } - #[doc = " Get the validation code from its hash."] - pub fn validation_code_by_hash( + #[doc = " The number of events in the `Events` list."] + pub fn event_count( &self, - hash: runtime_types::polkadot_parachain::primitives::ValidationCodeHash, - ) -> ::subxt::runtime_api::Payload< - inputs::ValidationCodeByHash, - ::core::option::Option< - runtime_types::polkadot_parachain::primitives::ValidationCode, - >, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), > { - ::subxt::runtime_api::Payload::new_static( - "ParachainHost_validation_code_by_hash", - inputs::ValidationCodeByHash { hash }, + ::subxt::storage::address::Address::new_static( + "System", + "EventCount", + vec![], [ - 143u8, 146u8, 97u8, 197u8, 138u8, 122u8, 186u8, 0u8, 86u8, 105u8, - 207u8, 55u8, 53u8, 47u8, 131u8, 101u8, 24u8, 71u8, 204u8, 71u8, 96u8, - 100u8, 252u8, 127u8, 21u8, 248u8, 70u8, 187u8, 111u8, 112u8, 77u8, - 208u8, + 236u8, 93u8, 90u8, 177u8, 250u8, 211u8, 138u8, 187u8, 26u8, 208u8, + 203u8, 113u8, 221u8, 233u8, 227u8, 9u8, 249u8, 25u8, 202u8, 185u8, + 161u8, 144u8, 167u8, 104u8, 127u8, 187u8, 38u8, 18u8, 52u8, 61u8, 66u8, + 112u8, ], ) } - #[doc = " Scrape dispute relevant from on-chain, backing votes and resolved disputes."] - pub fn on_chain_votes( + #[doc = " Mapping between a topic (represented by T::Hash) and a vector of indexes"] + #[doc = " of events in the `>` list."] + #[doc = ""] + #[doc = " All topic vectors have deterministic storage locations depending on the topic. This"] + #[doc = " allows light-clients to leverage the changes trie storage tracking mechanism and"] + #[doc = " in case of changes fetch the list of events of interest."] + #[doc = ""] + #[doc = " The value has the type `(T::BlockNumber, EventIndex)` because if we used only just"] + #[doc = " the `EventIndex` then in case if the topic has the same contents on the next block"] + #[doc = " no notification will be triggered thus the event might be lost."] + pub fn event_topics( &self, - ) -> ::subxt::runtime_api::Payload< - inputs::OnChainVotes, - ::core::option::Option< - runtime_types::polkadot_primitives::v4::ScrapedOnChainVotes< - ::subxt::utils::H256, - >, - >, + _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, + ) -> ::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::Yes, > { - ::subxt::runtime_api::Payload::new_static( - "ParachainHost_on_chain_votes", - inputs::OnChainVotes {}, + ::subxt::storage::address::Address::new_static( + "System", + "EventTopics", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], [ - 37u8, 2u8, 32u8, 215u8, 117u8, 137u8, 242u8, 168u8, 57u8, 175u8, 59u8, - 243u8, 132u8, 133u8, 246u8, 37u8, 154u8, 205u8, 191u8, 114u8, 114u8, - 167u8, 104u8, 27u8, 144u8, 56u8, 61u8, 159u8, 9u8, 79u8, 190u8, 239u8, + 205u8, 90u8, 142u8, 190u8, 176u8, 37u8, 94u8, 82u8, 98u8, 1u8, 129u8, + 63u8, 246u8, 101u8, 130u8, 58u8, 216u8, 16u8, 139u8, 196u8, 154u8, + 111u8, 110u8, 178u8, 24u8, 44u8, 183u8, 176u8, 232u8, 82u8, 223u8, + 38u8, ], ) } - #[doc = " Get the session info for the given session, if stored."] + #[doc = " Mapping between a topic (represented by T::Hash) and a vector of indexes"] + #[doc = " of events in the `>` list."] + #[doc = ""] + #[doc = " All topic vectors have deterministic storage locations depending on the topic. This"] + #[doc = " allows light-clients to leverage the changes trie storage tracking mechanism and"] + #[doc = " in case of changes fetch the list of events of interest."] #[doc = ""] - #[doc = " NOTE: This function is only available since parachain host version 2."] - pub fn session_info( + #[doc = " The value has the type `(T::BlockNumber, EventIndex)` because if we used only just"] + #[doc = " the `EventIndex` then in case if the topic has the same contents on the next block"] + #[doc = " no notification will be triggered thus the event might be lost."] + pub fn event_topics_root( &self, - index: ::core::primitive::u32, - ) -> ::subxt::runtime_api::Payload< - inputs::SessionInfo, - ::core::option::Option, + ) -> ::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::runtime_api::Payload::new_static( - "ParachainHost_session_info", - inputs::SessionInfo { index }, + ::subxt::storage::address::Address::new_static( + "System", + "EventTopics", + Vec::new(), [ - 107u8, 247u8, 186u8, 88u8, 134u8, 234u8, 251u8, 220u8, 134u8, 138u8, - 130u8, 168u8, 253u8, 101u8, 235u8, 126u8, 190u8, 37u8, 77u8, 182u8, - 195u8, 100u8, 63u8, 173u8, 147u8, 98u8, 217u8, 235u8, 220u8, 87u8, - 83u8, 198u8, + 205u8, 90u8, 142u8, 190u8, 176u8, 37u8, 94u8, 82u8, 98u8, 1u8, 129u8, + 63u8, 246u8, 101u8, 130u8, 58u8, 216u8, 16u8, 139u8, 196u8, 154u8, + 111u8, 110u8, 178u8, 24u8, 44u8, 183u8, 176u8, 232u8, 82u8, 223u8, + 38u8, ], ) } - #[doc = " Submits a PVF pre-checking statement into the transaction pool."] - #[doc = ""] - #[doc = " NOTE: This function is only available since parachain host version 2."] - pub fn submit_pvf_check_statement( + #[doc = " Stores the `spec_version` and `spec_name` of when the last runtime upgrade happened."] + pub fn last_runtime_upgrade( &self, - stmt: runtime_types::polkadot_primitives::v4::PvfCheckStatement, - signature: runtime_types::polkadot_primitives::v4::validator_app::Signature, - ) -> ::subxt::runtime_api::Payload - { - ::subxt::runtime_api::Payload::new_static( - "ParachainHost_submit_pvf_check_statement", - inputs::SubmitPvfCheckStatement { stmt, signature }, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::frame_system::LastRuntimeUpgradeInfo, + ::subxt::storage::address::Yes, + (), + (), + > { + ::subxt::storage::address::Address::new_static( + "System", + "LastRuntimeUpgrade", + vec![], [ - 228u8, 45u8, 8u8, 229u8, 69u8, 35u8, 3u8, 231u8, 235u8, 184u8, 19u8, - 96u8, 72u8, 62u8, 15u8, 218u8, 27u8, 134u8, 19u8, 179u8, 239u8, 1u8, - 207u8, 39u8, 50u8, 171u8, 59u8, 204u8, 143u8, 247u8, 27u8, 179u8, + 52u8, 37u8, 117u8, 111u8, 57u8, 130u8, 196u8, 14u8, 99u8, 77u8, 91u8, + 126u8, 178u8, 249u8, 78u8, 34u8, 9u8, 194u8, 92u8, 105u8, 113u8, 81u8, + 185u8, 127u8, 245u8, 184u8, 60u8, 29u8, 234u8, 182u8, 96u8, 196u8, ], ) } - #[doc = " Returns code hashes of PVFs that require pre-checking by validators in the active set."] - #[doc = ""] - #[doc = " NOTE: This function is only available since parachain host version 2."] - pub fn pvfs_require_precheck( + #[doc = " True if we have upgraded so that `type RefCount` is `u32`. False (default) if not."] + pub fn upgraded_to_u32_ref_count( &self, - ) -> ::subxt::runtime_api::Payload< - inputs::PvfsRequirePrecheck, - ::std::vec::Vec< - runtime_types::polkadot_parachain::primitives::ValidationCodeHash, - >, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::bool, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), > { - ::subxt::runtime_api::Payload::new_static( - "ParachainHost_pvfs_require_precheck", - inputs::PvfsRequirePrecheck {}, + ::subxt::storage::address::Address::new_static( + "System", + "UpgradedToU32RefCount", + vec![], [ - 58u8, 208u8, 110u8, 249u8, 77u8, 56u8, 39u8, 46u8, 196u8, 209u8, 189u8, - 200u8, 147u8, 235u8, 247u8, 235u8, 125u8, 230u8, 11u8, 151u8, 137u8, - 118u8, 110u8, 179u8, 72u8, 53u8, 127u8, 149u8, 252u8, 20u8, 165u8, - 239u8, + 171u8, 88u8, 244u8, 92u8, 122u8, 67u8, 27u8, 18u8, 59u8, 175u8, 175u8, + 178u8, 20u8, 150u8, 213u8, 59u8, 222u8, 141u8, 32u8, 107u8, 3u8, 114u8, + 83u8, 250u8, 180u8, 233u8, 152u8, 54u8, 187u8, 99u8, 131u8, 204u8, ], ) } - #[doc = " Fetch the hash of the validation code used by a para, making the given `OccupiedCoreAssumption`."] - #[doc = ""] - #[doc = " NOTE: This function is only available since parachain host version 2."] - pub fn validation_code_hash( + #[doc = " True if we have upgraded so that AccountInfo contains three types of `RefCount`. False"] + #[doc = " (default) if not."] + pub fn upgraded_to_triple_ref_count( &self, - para_id: runtime_types::polkadot_parachain::primitives::Id, - assumption: runtime_types::polkadot_primitives::v4::OccupiedCoreAssumption, - ) -> ::subxt::runtime_api::Payload< - inputs::ValidationCodeHash, - ::core::option::Option< - runtime_types::polkadot_parachain::primitives::ValidationCodeHash, - >, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::bool, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), > { - ::subxt::runtime_api::Payload::new_static( - "ParachainHost_validation_code_hash", - inputs::ValidationCodeHash { - para_id, - assumption, - }, + ::subxt::storage::address::Address::new_static( + "System", + "UpgradedToTripleRefCount", + vec![], [ - 232u8, 173u8, 117u8, 125u8, 245u8, 188u8, 20u8, 124u8, 255u8, 219u8, - 2u8, 95u8, 131u8, 3u8, 122u8, 190u8, 240u8, 184u8, 8u8, 239u8, 85u8, - 107u8, 59u8, 105u8, 206u8, 130u8, 65u8, 142u8, 130u8, 193u8, 143u8, - 199u8, + 90u8, 33u8, 56u8, 86u8, 90u8, 101u8, 89u8, 133u8, 203u8, 56u8, 201u8, + 210u8, 244u8, 232u8, 150u8, 18u8, 51u8, 105u8, 14u8, 230u8, 103u8, + 155u8, 246u8, 99u8, 53u8, 207u8, 225u8, 128u8, 186u8, 76u8, 40u8, + 185u8, ], ) } - #[doc = " Returns all onchain disputes."] - pub fn disputes( + #[doc = " The execution phase of the block."] + pub fn execution_phase( &self, - ) -> ::subxt::runtime_api::Payload< - inputs::Disputes, - ::std::vec::Vec<( - ::core::primitive::u32, - runtime_types::polkadot_core_primitives::CandidateHash, - runtime_types::polkadot_primitives::v4::DisputeState< - ::core::primitive::u32, - >, - )>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::frame_system::Phase, + ::subxt::storage::address::Yes, + (), + (), > { - ::subxt::runtime_api::Payload::new_static( - "ParachainHost_disputes", - inputs::Disputes {}, + ::subxt::storage::address::Address::new_static( + "System", + "ExecutionPhase", + vec![], [ - 90u8, 171u8, 12u8, 104u8, 109u8, 92u8, 149u8, 72u8, 109u8, 39u8, 75u8, - 241u8, 239u8, 78u8, 46u8, 134u8, 139u8, 200u8, 144u8, 213u8, 218u8, - 64u8, 98u8, 102u8, 159u8, 211u8, 154u8, 178u8, 187u8, 146u8, 193u8, - 34u8, + 230u8, 183u8, 221u8, 135u8, 226u8, 223u8, 55u8, 104u8, 138u8, 224u8, + 103u8, 156u8, 222u8, 99u8, 203u8, 199u8, 164u8, 168u8, 193u8, 133u8, + 201u8, 155u8, 63u8, 95u8, 17u8, 206u8, 165u8, 123u8, 161u8, 33u8, + 172u8, 93u8, ], ) } - #[doc = " Returns execution parameters for the session."] - pub fn session_executor_params( + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " Block & extrinsics weights: base values and limits."] + pub fn block_weights( &self, - session_index: ::core::primitive::u32, - ) -> ::subxt::runtime_api::Payload< - inputs::SessionExecutorParams, - ::core::option::Option< - runtime_types::polkadot_primitives::v4::executor_params::ExecutorParams, - >, - > { - ::subxt::runtime_api::Payload::new_static( - "ParachainHost_session_executor_params", - inputs::SessionExecutorParams { session_index }, + ) -> ::subxt::constants::Address + { + ::subxt::constants::Address::new_static( + "System", + "BlockWeights", + [ + 118u8, 253u8, 239u8, 217u8, 145u8, 115u8, 85u8, 86u8, 172u8, 248u8, + 139u8, 32u8, 158u8, 126u8, 172u8, 188u8, 197u8, 105u8, 145u8, 235u8, + 171u8, 50u8, 31u8, 225u8, 167u8, 187u8, 241u8, 87u8, 6u8, 17u8, 234u8, + 185u8, + ], + ) + } + #[doc = " The maximum length of a block (in bytes)."] + pub fn block_length( + &self, + ) -> ::subxt::constants::Address + { + ::subxt::constants::Address::new_static( + "System", + "BlockLength", + [ + 116u8, 184u8, 225u8, 228u8, 207u8, 203u8, 4u8, 220u8, 234u8, 198u8, + 150u8, 108u8, 205u8, 87u8, 194u8, 131u8, 229u8, 51u8, 140u8, 4u8, 47u8, + 12u8, 200u8, 144u8, 153u8, 62u8, 51u8, 39u8, 138u8, 205u8, 203u8, + 236u8, + ], + ) + } + #[doc = " Maximum number of block number to block hash mappings to keep (oldest pruned first)."] + pub fn block_hash_count( + &self, + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "System", + "BlockHashCount", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " The weight of runtime database operations the runtime can invoke."] + pub fn db_weight( + &self, + ) -> ::subxt::constants::Address + { + ::subxt::constants::Address::new_static( + "System", + "DbWeight", + [ + 124u8, 162u8, 190u8, 149u8, 49u8, 177u8, 162u8, 231u8, 62u8, 167u8, + 199u8, 181u8, 43u8, 232u8, 185u8, 116u8, 195u8, 51u8, 233u8, 223u8, + 20u8, 129u8, 246u8, 13u8, 65u8, 180u8, 64u8, 9u8, 157u8, 59u8, 245u8, + 118u8, + ], + ) + } + #[doc = " Get the chain's current version."] + pub fn version( + &self, + ) -> ::subxt::constants::Address + { + ::subxt::constants::Address::new_static( + "System", + "Version", + [ + 93u8, 98u8, 57u8, 243u8, 229u8, 8u8, 234u8, 231u8, 72u8, 230u8, 139u8, + 47u8, 63u8, 181u8, 17u8, 2u8, 220u8, 231u8, 104u8, 237u8, 185u8, 143u8, + 165u8, 253u8, 188u8, 76u8, 147u8, 12u8, 170u8, 26u8, 74u8, 200u8, + ], + ) + } + #[doc = " The designated SS58 prefix of this chain."] + #[doc = ""] + #[doc = " This replaces the \"ss58Format\" property declared in the chain spec. Reason is"] + #[doc = " that the runtime should know about the prefix in order to make use of it as"] + #[doc = " an identifier of the chain."] + pub fn ss58_prefix(&self) -> ::subxt::constants::Address<::core::primitive::u16> { + ::subxt::constants::Address::new_static( + "System", + "SS58Prefix", [ - 129u8, 198u8, 157u8, 37u8, 138u8, 132u8, 5u8, 183u8, 233u8, 119u8, - 99u8, 173u8, 22u8, 240u8, 182u8, 246u8, 101u8, 3u8, 149u8, 130u8, - 107u8, 60u8, 152u8, 217u8, 86u8, 150u8, 253u8, 170u8, 10u8, 86u8, - 183u8, 33u8, + 116u8, 33u8, 2u8, 170u8, 181u8, 147u8, 171u8, 169u8, 167u8, 227u8, + 41u8, 144u8, 11u8, 236u8, 82u8, 100u8, 74u8, 60u8, 184u8, 72u8, 169u8, + 90u8, 208u8, 135u8, 15u8, 117u8, 10u8, 123u8, 128u8, 193u8, 29u8, 70u8, ], ) } } - pub mod inputs { - use super::root_mod; + } + } + pub mod scheduler { + 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 :: Decode, @@ -1658,56 +1951,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 Validators {} - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ValidatorGroups {} - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AvailabilityCores {} - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct PersistedValidationData { - pub para_id: runtime_types::polkadot_parachain::primitives::Id, - pub assumption: runtime_types::polkadot_primitives::v4::OccupiedCoreAssumption, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AssumedValidationData { - pub para_id: runtime_types::polkadot_parachain::primitives::Id, - pub expected_persisted_validation_data_hash: ::subxt::utils::H256, + 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, @@ -1719,11 +1968,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 CheckValidationOutputs { - pub para_id: runtime_types::polkadot_parachain::primitives::Id, - pub outputs: runtime_types::polkadot_primitives::v4::CandidateCommitments< - ::core::primitive::u32, - >, + pub struct Cancel { + pub when: ::core::primitive::u32, + pub index: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -1735,20 +1982,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 SessionIndexForChild {} - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ValidationCode { - pub para_id: runtime_types::polkadot_parachain::primitives::Id, - pub assumption: runtime_types::polkadot_primitives::v4::OccupiedCoreAssumption, + 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, @@ -1760,8 +2000,8 @@ 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 CandidatePendingAvailability { - pub para_id: runtime_types::polkadot_parachain::primitives::Id, + pub struct CancelNamed { + pub id: [::core::primitive::u8; 32usize], } #[derive( :: subxt :: ext :: codec :: Decode, @@ -1773,19 +2013,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 CandidateEvents {} - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct DmqContents { - pub recipient: runtime_types::polkadot_parachain::primitives::Id, + 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, @@ -1797,615 +2030,489 @@ 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 InboundHrmpChannelsContents { - pub recipient: 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 ValidationCodeByHash { - pub 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 OnChainVotes {} - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SessionInfo { - 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 SubmitPvfCheckStatement { - pub stmt: runtime_types::polkadot_primitives::v4::PvfCheckStatement, - pub signature: runtime_types::polkadot_primitives::v4::validator_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 PvfsRequirePrecheck {} - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ValidationCodeHash { - pub para_id: runtime_types::polkadot_parachain::primitives::Id, - pub assumption: runtime_types::polkadot_primitives::v4::OccupiedCoreAssumption, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Disputes {} - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SessionExecutorParams { - pub session_index: ::core::primitive::u32, + 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 beefy_api { - use super::root_mod; - use super::runtime_types; - #[doc = " API necessary for BEEFY voters."] - pub struct BeefyApi; - impl BeefyApi { - #[doc = " Return the block number where BEEFY consensus is enabled/started"] - pub fn beefy_genesis( - &self, - ) -> ::subxt::runtime_api::Payload< - inputs::BeefyGenesis, - ::core::option::Option<::core::primitive::u32>, - > { - ::subxt::runtime_api::Payload::new_static( - "BeefyApi_beefy_genesis", - inputs::BeefyGenesis {}, + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Anonymously schedule a task."] + pub fn schedule( + &self, + when: ::core::primitive::u32, + maybe_periodic: ::core::option::Option<( + ::core::primitive::u32, + ::core::primitive::u32, + )>, + priority: ::core::primitive::u8, + call: runtime_types::polkadot_runtime::RuntimeCall, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Scheduler", + "schedule", + types::Schedule { + when, + maybe_periodic, + priority, + call: ::std::boxed::Box::new(call), + }, [ - 80u8, 47u8, 5u8, 126u8, 16u8, 213u8, 203u8, 179u8, 124u8, 14u8, 227u8, - 61u8, 164u8, 158u8, 115u8, 127u8, 132u8, 90u8, 222u8, 87u8, 249u8, - 214u8, 100u8, 13u8, 201u8, 186u8, 229u8, 217u8, 21u8, 152u8, 197u8, - 60u8, + 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, ], ) } - #[doc = " Return the current active BEEFY validator set"] - pub fn validator_set( + #[doc = "Cancel an anonymously scheduled task."] + pub fn cancel( &self, - ) -> ::subxt::runtime_api::Payload< - inputs::ValidatorSet, - ::core::option::Option< - runtime_types::sp_consensus_beefy::ValidatorSet< - runtime_types::sp_consensus_beefy::crypto::Public, - >, - >, - > { - ::subxt::runtime_api::Payload::new_static( - "BeefyApi_validator_set", - inputs::ValidatorSet {}, + when: ::core::primitive::u32, + index: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Scheduler", + "cancel", + types::Cancel { when, index }, [ - 49u8, 44u8, 188u8, 42u8, 35u8, 233u8, 181u8, 44u8, 232u8, 88u8, 1u8, - 100u8, 90u8, 42u8, 139u8, 239u8, 25u8, 44u8, 183u8, 164u8, 161u8, - 129u8, 12u8, 158u8, 41u8, 39u8, 218u8, 43u8, 78u8, 70u8, 156u8, 159u8, + 81u8, 251u8, 234u8, 17u8, 214u8, 75u8, 19u8, 59u8, 19u8, 30u8, 89u8, + 74u8, 6u8, 216u8, 238u8, 165u8, 7u8, 19u8, 153u8, 253u8, 161u8, 103u8, + 178u8, 227u8, 152u8, 180u8, 80u8, 156u8, 82u8, 126u8, 132u8, 120u8, ], ) } - #[doc = " Submits an unsigned extrinsic to report an equivocation. The caller"] - #[doc = " must provide the equivocation proof and a key ownership proof"] - #[doc = " (should be obtained using `generate_key_ownership_proof`). The"] - #[doc = " extrinsic will be unsigned and should only be accepted for local"] - #[doc = " authorship (not to be broadcast to the network). This method returns"] - #[doc = " `None` when creation of the extrinsic fails, e.g. if equivocation"] - #[doc = " reporting is disabled for the given runtime (i.e. this method is"] - #[doc = " hardcoded to return `None`). Only useful in an offchain context."] - pub fn submit_report_equivocation_unsigned_extrinsic( + #[doc = "Schedule a named task."] + pub fn schedule_named( &self, - equivocation_proof: runtime_types::sp_consensus_beefy::EquivocationProof< + id: [::core::primitive::u8; 32usize], + when: ::core::primitive::u32, + maybe_periodic: ::core::option::Option<( ::core::primitive::u32, - runtime_types::sp_consensus_beefy::crypto::Public, - runtime_types::sp_consensus_beefy::crypto::Signature, - >, - key_owner_proof: runtime_types::sp_consensus_beefy::OpaqueKeyOwnershipProof, - ) -> ::subxt::runtime_api::Payload< - inputs::SubmitReportEquivocationUnsignedExtrinsic, - ::core::option::Option<()>, - > { - ::subxt::runtime_api::Payload::new_static( - "BeefyApi_submit_report_equivocation_unsigned_extrinsic", - inputs::SubmitReportEquivocationUnsignedExtrinsic { - equivocation_proof, - key_owner_proof, + ::core::primitive::u32, + )>, + priority: ::core::primitive::u8, + call: runtime_types::polkadot_runtime::RuntimeCall, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Scheduler", + "schedule_named", + types::ScheduleNamed { + id, + when, + maybe_periodic, + priority, + call: ::std::boxed::Box::new(call), }, [ - 232u8, 114u8, 155u8, 57u8, 178u8, 76u8, 154u8, 140u8, 49u8, 60u8, 71u8, - 98u8, 167u8, 4u8, 248u8, 159u8, 0u8, 36u8, 119u8, 102u8, 188u8, 10u8, - 137u8, 252u8, 249u8, 124u8, 208u8, 173u8, 252u8, 185u8, 117u8, 35u8, - ], - ) - } - #[doc = " Generates a proof of key ownership for the given authority in the"] - #[doc = " given set. An example usage of this module is coupled with the"] - #[doc = " session historical module to prove that a given authority key is"] - #[doc = " tied to a given staking identity during a specific session. Proofs"] - #[doc = " of key ownership are necessary for submitting equivocation reports."] - #[doc = " NOTE: even though the API takes a `set_id` as parameter the current"] - #[doc = " implementations ignores this parameter and instead relies on this"] - #[doc = " method being called at the correct block height, i.e. any point at"] - #[doc = " which the given set id is live on-chain. Future implementations will"] - #[doc = " instead use indexed data through an offchain worker, not requiring"] - #[doc = " older states to be available."] - pub fn generate_key_ownership_proof( - &self, - set_id: ::core::primitive::u64, - authority_id: runtime_types::sp_consensus_beefy::crypto::Public, - ) -> ::subxt::runtime_api::Payload< - inputs::GenerateKeyOwnershipProof, - ::core::option::Option< - runtime_types::sp_consensus_beefy::OpaqueKeyOwnershipProof, - >, - > { - ::subxt::runtime_api::Payload::new_static( - "BeefyApi_generate_key_ownership_proof", - inputs::GenerateKeyOwnershipProof { - set_id, - authority_id, - }, + 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, + ], + ) + } + #[doc = "Cancel a named scheduled task."] + pub fn cancel_named( + &self, + id: [::core::primitive::u8; 32usize], + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Scheduler", + "cancel_named", + types::CancelNamed { id }, [ - 219u8, 146u8, 168u8, 108u8, 180u8, 133u8, 182u8, 104u8, 153u8, 14u8, - 209u8, 207u8, 32u8, 226u8, 81u8, 196u8, 243u8, 208u8, 0u8, 94u8, 197u8, - 232u8, 181u8, 251u8, 182u8, 12u8, 245u8, 231u8, 198u8, 76u8, 59u8, - 53u8, + 51u8, 3u8, 140u8, 50u8, 214u8, 211u8, 50u8, 4u8, 19u8, 43u8, 230u8, + 114u8, 18u8, 108u8, 138u8, 67u8, 99u8, 24u8, 255u8, 11u8, 246u8, 37u8, + 192u8, 207u8, 90u8, 157u8, 171u8, 93u8, 233u8, 189u8, 64u8, 180u8, ], ) } - } - pub mod inputs { - use super::root_mod; - 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 BeefyGenesis {} - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ValidatorSet {} - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SubmitReportEquivocationUnsignedExtrinsic { - pub equivocation_proof: runtime_types::sp_consensus_beefy::EquivocationProof< + #[doc = "Anonymously schedule a task after a delay."] + pub fn schedule_after( + &self, + after: ::core::primitive::u32, + maybe_periodic: ::core::option::Option<( ::core::primitive::u32, - runtime_types::sp_consensus_beefy::crypto::Public, - runtime_types::sp_consensus_beefy::crypto::Signature, - >, - pub key_owner_proof: runtime_types::sp_consensus_beefy::OpaqueKeyOwnershipProof, + ::core::primitive::u32, + )>, + priority: ::core::primitive::u8, + call: runtime_types::polkadot_runtime::RuntimeCall, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Scheduler", + "schedule_after", + types::ScheduleAfter { + after, + maybe_periodic, + priority, + call: ::std::boxed::Box::new(call), + }, + [ + 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, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct GenerateKeyOwnershipProof { - pub set_id: ::core::primitive::u64, - pub authority_id: runtime_types::sp_consensus_beefy::crypto::Public, + #[doc = "Schedule a named task after a delay."] + pub fn schedule_named_after( + &self, + id: [::core::primitive::u8; 32usize], + after: ::core::primitive::u32, + maybe_periodic: ::core::option::Option<( + ::core::primitive::u32, + ::core::primitive::u32, + )>, + priority: ::core::primitive::u8, + call: runtime_types::polkadot_runtime::RuntimeCall, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Scheduler", + "schedule_named_after", + types::ScheduleNamedAfter { + id, + after, + maybe_periodic, + priority, + call: ::std::boxed::Box::new(call), + }, + [ + 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, + ], + ) } } } - pub mod mmr_api { - use super::root_mod; + #[doc = "Events type."] + pub type Event = runtime_types::pallet_scheduler::pallet::Event; + pub mod events { use super::runtime_types; - #[doc = " API to interact with MMR pallet."] - pub struct MmrApi; - impl MmrApi { - #[doc = " Return the on-chain MMR root hash."] - pub fn mmr_root( - &self, - ) -> ::subxt::runtime_api::Payload< - inputs::MmrRoot, - ::core::result::Result< - ::subxt::utils::H256, - runtime_types::sp_mmr_primitives::Error, - >, + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + 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 = "Scheduled some task."] + pub struct Scheduled { + pub when: ::core::primitive::u32, + pub index: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for Scheduled { + const PALLET: &'static str = "Scheduler"; + const EVENT: &'static str = "Scheduled"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + 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 = "Canceled some task."] + pub struct Canceled { + pub when: ::core::primitive::u32, + pub index: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for Canceled { + const PALLET: &'static str = "Scheduler"; + const EVENT: &'static str = "Canceled"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + 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 = "Dispatched some task."] + pub struct Dispatched { + pub task: (::core::primitive::u32, ::core::primitive::u32), + pub id: ::core::option::Option<[::core::primitive::u8; 32usize]>, + pub result: ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + } + impl ::subxt::events::StaticEvent for Dispatched { + const PALLET: &'static str = "Scheduler"; + const EVENT: &'static str = "Dispatched"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + 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 call for the provided hash was not found so the task has been aborted."] + pub struct CallUnavailable { + pub task: (::core::primitive::u32, ::core::primitive::u32), + pub id: ::core::option::Option<[::core::primitive::u8; 32usize]>, + } + impl ::subxt::events::StaticEvent for CallUnavailable { + const PALLET: &'static str = "Scheduler"; + const EVENT: &'static str = "CallUnavailable"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + 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 task was unable to be renewed since the agenda is full at that block."] + pub struct PeriodicFailed { + pub task: (::core::primitive::u32, ::core::primitive::u32), + pub id: ::core::option::Option<[::core::primitive::u8; 32usize]>, + } + impl ::subxt::events::StaticEvent for PeriodicFailed { + const PALLET: &'static str = "Scheduler"; + const EVENT: &'static str = "PeriodicFailed"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + 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 task can never be executed since it is overweight."] + pub struct PermanentlyOverweight { + pub task: (::core::primitive::u32, ::core::primitive::u32), + pub id: ::core::option::Option<[::core::primitive::u8; 32usize]>, + } + impl ::subxt::events::StaticEvent for PermanentlyOverweight { + const PALLET: &'static str = "Scheduler"; + const EVENT: &'static str = "PermanentlyOverweight"; + } + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + pub fn incomplete_since( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + ::subxt::storage::address::Yes, + (), + (), > { - ::subxt::runtime_api::Payload::new_static( - "MmrApi_mmr_root", - inputs::MmrRoot {}, + ::subxt::storage::address::Address::new_static( + "Scheduler", + "IncompleteSince", + vec![], [ - 83u8, 202u8, 15u8, 77u8, 255u8, 136u8, 129u8, 210u8, 154u8, 178u8, - 197u8, 94u8, 231u8, 151u8, 68u8, 172u8, 112u8, 116u8, 30u8, 138u8, - 142u8, 166u8, 16u8, 4u8, 24u8, 204u8, 18u8, 48u8, 43u8, 103u8, 30u8, - 96u8, + 149u8, 66u8, 239u8, 67u8, 235u8, 219u8, 101u8, 182u8, 145u8, 56u8, + 252u8, 150u8, 253u8, 221u8, 125u8, 57u8, 38u8, 152u8, 153u8, 31u8, + 92u8, 238u8, 66u8, 246u8, 104u8, 163u8, 94u8, 73u8, 222u8, 168u8, + 193u8, 227u8, ], ) } - #[doc = " Return the number of MMR blocks in the chain."] - pub fn mmr_leaf_count( + #[doc = " Items to be executed, indexed by the block number that they should be executed on."] + pub fn agenda( &self, - ) -> ::subxt::runtime_api::Payload< - inputs::MmrLeafCount, - ::core::result::Result< - ::core::primitive::u64, - runtime_types::sp_mmr_primitives::Error, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::option::Option< + runtime_types::pallet_scheduler::Scheduled< + [::core::primitive::u8; 32usize], + runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::polkadot_runtime::RuntimeCall, + >, + ::core::primitive::u32, + runtime_types::polkadot_runtime::OriginCaller, + ::subxt::utils::AccountId32, + >, + >, >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::runtime_api::Payload::new_static( - "MmrApi_mmr_leaf_count", - inputs::MmrLeafCount {}, + ::subxt::storage::address::Address::new_static( + "Scheduler", + "Agenda", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], [ - 81u8, 145u8, 75u8, 170u8, 197u8, 235u8, 92u8, 81u8, 54u8, 16u8, 239u8, - 136u8, 174u8, 255u8, 90u8, 27u8, 24u8, 51u8, 152u8, 130u8, 249u8, - 247u8, 44u8, 173u8, 4u8, 21u8, 72u8, 44u8, 198u8, 145u8, 94u8, 77u8, + 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, ], ) } - #[doc = " Generate MMR proof for a series of block numbers. If `best_known_block_number = Some(n)`,"] - #[doc = " use historical MMR state at given block height `n`. Else, use current MMR state."] - pub fn generate_proof( + #[doc = " Items to be executed, indexed by the block number that they should be executed on."] + pub fn agenda_root( &self, - block_numbers: ::std::vec::Vec<::core::primitive::u32>, - best_known_block_number: ::core::option::Option<::core::primitive::u32>, - ) -> ::subxt::runtime_api::Payload< - inputs::GenerateProof, - ::core::result::Result< - ( - ::std::vec::Vec, - runtime_types::sp_mmr_primitives::Proof<::subxt::utils::H256>, - ), - runtime_types::sp_mmr_primitives::Error, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::option::Option< + runtime_types::pallet_scheduler::Scheduled< + [::core::primitive::u8; 32usize], + runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::polkadot_runtime::RuntimeCall, + >, + ::core::primitive::u32, + runtime_types::polkadot_runtime::OriginCaller, + ::subxt::utils::AccountId32, + >, + >, >, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::runtime_api::Payload::new_static( - "MmrApi_generate_proof", - inputs::GenerateProof { - block_numbers, - best_known_block_number, - }, + ::subxt::storage::address::Address::new_static( + "Scheduler", + "Agenda", + Vec::new(), [ - 180u8, 123u8, 115u8, 227u8, 101u8, 119u8, 103u8, 230u8, 66u8, 255u8, - 15u8, 197u8, 60u8, 180u8, 27u8, 47u8, 73u8, 121u8, 179u8, 219u8, 161u8, - 37u8, 57u8, 131u8, 104u8, 106u8, 206u8, 230u8, 168u8, 185u8, 206u8, - 32u8, + 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, ], ) } - #[doc = " Verify MMR proof against on-chain MMR for a batch of leaves."] + #[doc = " Lookup from a name to the block number and index of the task."] #[doc = ""] - #[doc = " Note this function will use on-chain MMR root hash and check if the proof matches the hash."] - #[doc = " Note, the leaves should be sorted such that corresponding leaves and leaf indices have the"] - #[doc = " same position in both the `leaves` vector and the `leaf_indices` vector contained in the [Proof]"] - pub fn verify_proof( + #[doc = " For v3 -> v4 the previously unbounded identities are Blake2-256 hashed to form the v4"] + #[doc = " identities."] + pub fn lookup( &self, - leaves: ::std::vec::Vec, - proof: runtime_types::sp_mmr_primitives::Proof<::subxt::utils::H256>, - ) -> ::subxt::runtime_api::Payload< - inputs::VerifyProof, - ::core::result::Result<(), runtime_types::sp_mmr_primitives::Error>, + _0: impl ::std::borrow::Borrow<[::core::primitive::u8; 32usize]>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + (::core::primitive::u32, ::core::primitive::u32), + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, > { - ::subxt::runtime_api::Payload::new_static( - "MmrApi_verify_proof", - inputs::VerifyProof { leaves, proof }, + ::subxt::storage::address::Address::new_static( + "Scheduler", + "Lookup", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], [ - 118u8, 13u8, 68u8, 159u8, 27u8, 144u8, 229u8, 72u8, 88u8, 106u8, 193u8, - 86u8, 228u8, 243u8, 28u8, 243u8, 99u8, 241u8, 153u8, 169u8, 121u8, - 139u8, 60u8, 244u8, 153u8, 110u8, 239u8, 149u8, 122u8, 164u8, 53u8, - 9u8, + 82u8, 20u8, 178u8, 101u8, 108u8, 198u8, 71u8, 99u8, 16u8, 175u8, 15u8, + 187u8, 229u8, 243u8, 140u8, 200u8, 99u8, 77u8, 248u8, 178u8, 45u8, + 121u8, 193u8, 67u8, 165u8, 43u8, 234u8, 211u8, 158u8, 250u8, 103u8, + 243u8, ], ) } - #[doc = " Verify MMR proof against given root hash for a batch of leaves."] - #[doc = ""] - #[doc = " Note this function does not require any on-chain storage - the"] - #[doc = " proof is verified against given MMR root hash."] + #[doc = " Lookup from a name to the block number and index of the task."] #[doc = ""] - #[doc = " Note, the leaves should be sorted such that corresponding leaves and leaf indices have the"] - #[doc = " same position in both the `leaves` vector and the `leaf_indices` vector contained in the [Proof]"] - pub fn verify_proof_stateless( + #[doc = " For v3 -> v4 the previously unbounded identities are Blake2-256 hashed to form the v4"] + #[doc = " identities."] + pub fn lookup_root( &self, - root: ::subxt::utils::H256, - leaves: ::std::vec::Vec, - proof: runtime_types::sp_mmr_primitives::Proof<::subxt::utils::H256>, - ) -> ::subxt::runtime_api::Payload< - inputs::VerifyProofStateless, - ::core::result::Result<(), runtime_types::sp_mmr_primitives::Error>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + (::core::primitive::u32, ::core::primitive::u32), + (), + (), + ::subxt::storage::address::Yes, > { - ::subxt::runtime_api::Payload::new_static( - "MmrApi_verify_proof_stateless", - inputs::VerifyProofStateless { - root, - leaves, - proof, - }, + ::subxt::storage::address::Address::new_static( + "Scheduler", + "Lookup", + Vec::new(), [ - 152u8, 237u8, 225u8, 199u8, 238u8, 151u8, 87u8, 236u8, 210u8, 38u8, - 168u8, 160u8, 166u8, 27u8, 186u8, 227u8, 160u8, 154u8, 120u8, 127u8, - 98u8, 247u8, 111u8, 99u8, 211u8, 236u8, 39u8, 221u8, 250u8, 110u8, - 232u8, 0u8, + 82u8, 20u8, 178u8, 101u8, 108u8, 198u8, 71u8, 99u8, 16u8, 175u8, 15u8, + 187u8, 229u8, 243u8, 140u8, 200u8, 99u8, 77u8, 248u8, 178u8, 45u8, + 121u8, 193u8, 67u8, 165u8, 43u8, 234u8, 211u8, 158u8, 250u8, 103u8, + 243u8, ], ) } } - pub mod inputs { - use super::root_mod; - 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 MmrRoot {} - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct MmrLeafCount {} - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct GenerateProof { - pub block_numbers: ::std::vec::Vec<::core::primitive::u32>, - pub best_known_block_number: ::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 VerifyProof { - pub leaves: - ::std::vec::Vec, - pub proof: runtime_types::sp_mmr_primitives::Proof<::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 VerifyProofStateless { - pub root: ::subxt::utils::H256, - pub leaves: - ::std::vec::Vec, - pub proof: runtime_types::sp_mmr_primitives::Proof<::subxt::utils::H256>, - } - } } - pub mod grandpa_api { - use super::root_mod; + pub mod constants { use super::runtime_types; - #[doc = " APIs for integrating the GRANDPA finality gadget into runtimes."] - #[doc = " This should be implemented on the runtime side."] - #[doc = ""] - #[doc = " This is primarily used for negotiating authority-set changes for the"] - #[doc = " gadget. GRANDPA uses a signaling model of changing authority sets:"] - #[doc = " changes should be signaled with a delay of N blocks, and then automatically"] - #[doc = " applied in the runtime after those N blocks have passed."] - #[doc = ""] - #[doc = " The consensus protocol will coordinate the handoff externally."] - pub struct GrandpaApi; - impl GrandpaApi { - #[doc = " Get the current GRANDPA authorities and weights. This should not change except"] - #[doc = " for when changes are scheduled and the corresponding delay has passed."] - #[doc = ""] - #[doc = " When called at block B, it will return the set of authorities that should be"] - #[doc = " used to finalize descendants of this block (B+1, B+2, ...). The block B itself"] - #[doc = " is finalized by the authorities from block B-1."] - pub fn grandpa_authorities( - &self, - ) -> ::subxt::runtime_api::Payload< - inputs::GrandpaAuthorities, - ::std::vec::Vec<( - runtime_types::sp_consensus_grandpa::app::Public, - ::core::primitive::u64, - )>, - > { - ::subxt::runtime_api::Payload::new_static( - "GrandpaApi_grandpa_authorities", - inputs::GrandpaAuthorities {}, - [ - 78u8, 213u8, 85u8, 178u8, 49u8, 70u8, 10u8, 221u8, 93u8, 91u8, 250u8, - 59u8, 80u8, 141u8, 62u8, 126u8, 55u8, 235u8, 163u8, 12u8, 21u8, 199u8, - 240u8, 209u8, 95u8, 63u8, 65u8, 73u8, 141u8, 42u8, 78u8, 154u8, - ], - ) - } - #[doc = " Submits an unsigned extrinsic to report an equivocation. The caller"] - #[doc = " must provide the equivocation proof and a key ownership proof"] - #[doc = " (should be obtained using `generate_key_ownership_proof`). The"] - #[doc = " extrinsic will be unsigned and should only be accepted for local"] - #[doc = " authorship (not to be broadcast to the network). This method returns"] - #[doc = " `None` when creation of the extrinsic fails, e.g. if equivocation"] - #[doc = " reporting is disabled for the given runtime (i.e. this method is"] - #[doc = " hardcoded to return `None`). Only useful in an offchain context."] - pub fn submit_report_equivocation_unsigned_extrinsic( + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The maximum weight that may be scheduled per block for any dispatchables."] + pub fn maximum_weight( &self, - equivocation_proof: runtime_types::sp_consensus_grandpa::EquivocationProof< - ::subxt::utils::H256, - ::core::primitive::u32, - >, - key_owner_proof: runtime_types::sp_consensus_grandpa::OpaqueKeyOwnershipProof, - ) -> ::subxt::runtime_api::Payload< - inputs::SubmitReportEquivocationUnsignedExtrinsic, - ::core::option::Option<()>, - > { - ::subxt::runtime_api::Payload::new_static( - "GrandpaApi_submit_report_equivocation_unsigned_extrinsic", - inputs::SubmitReportEquivocationUnsignedExtrinsic { - equivocation_proof, - key_owner_proof, - }, - [ - 226u8, 83u8, 137u8, 173u8, 45u8, 138u8, 210u8, 202u8, 113u8, 196u8, - 110u8, 68u8, 31u8, 192u8, 127u8, 100u8, 125u8, 225u8, 30u8, 252u8, - 160u8, 109u8, 251u8, 96u8, 52u8, 214u8, 38u8, 91u8, 158u8, 71u8, 125u8, - 220u8, - ], - ) - } - #[doc = " Generates a proof of key ownership for the given authority in the"] - #[doc = " given set. An example usage of this module is coupled with the"] - #[doc = " session historical module to prove that a given authority key is"] - #[doc = " tied to a given staking identity during a specific session. Proofs"] - #[doc = " of key ownership are necessary for submitting equivocation reports."] - #[doc = " NOTE: even though the API takes a `set_id` as parameter the current"] - #[doc = " implementations ignore this parameter and instead rely on this"] - #[doc = " method being called at the correct block height, i.e. any point at"] - #[doc = " which the given set id is live on-chain. Future implementations will"] - #[doc = " instead use indexed data through an offchain worker, not requiring"] - #[doc = " older states to be available."] - pub fn generate_key_ownership_proof( - &self, - set_id: ::core::primitive::u64, - authority_id: runtime_types::sp_consensus_grandpa::app::Public, - ) -> ::subxt::runtime_api::Payload< - inputs::GenerateKeyOwnershipProof, - ::core::option::Option< - runtime_types::sp_consensus_grandpa::OpaqueKeyOwnershipProof, - >, - > { - ::subxt::runtime_api::Payload::new_static( - "GrandpaApi_generate_key_ownership_proof", - inputs::GenerateKeyOwnershipProof { - set_id, - authority_id, - }, + ) -> ::subxt::constants::Address + { + ::subxt::constants::Address::new_static( + "Scheduler", + "MaximumWeight", [ - 149u8, 80u8, 146u8, 102u8, 63u8, 184u8, 111u8, 153u8, 143u8, 71u8, - 109u8, 162u8, 117u8, 45u8, 139u8, 245u8, 154u8, 252u8, 117u8, 224u8, - 10u8, 6u8, 143u8, 137u8, 58u8, 213u8, 215u8, 110u8, 180u8, 142u8, - 234u8, 182u8, + 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 = " Get current GRANDPA authority set id."] - pub fn current_set_id( + #[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::runtime_api::Payload - { - ::subxt::runtime_api::Payload::new_static( - "GrandpaApi_current_set_id", - inputs::CurrentSetId {}, + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "Scheduler", + "MaxScheduledPerBlock", [ - 39u8, 245u8, 166u8, 229u8, 239u8, 200u8, 179u8, 64u8, 193u8, 93u8, - 41u8, 40u8, 208u8, 231u8, 75u8, 197u8, 45u8, 119u8, 131u8, 245u8, 84u8, - 249u8, 60u8, 7u8, 180u8, 176u8, 119u8, 130u8, 247u8, 134u8, 211u8, - 240u8, + 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 inputs { - use super::root_mod; + } + } + pub mod preimage { + 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 :: Decode, @@ -2417,7 +2524,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 GrandpaAuthorities {} + pub struct NotePreimage { + pub bytes: ::std::vec::Vec<::core::primitive::u8>, + } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -2428,13 +2537,8 @@ 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 SubmitReportEquivocationUnsignedExtrinsic { - pub equivocation_proof: runtime_types::sp_consensus_grandpa::EquivocationProof< - ::subxt::utils::H256, - ::core::primitive::u32, - >, - pub key_owner_proof: - runtime_types::sp_consensus_grandpa::OpaqueKeyOwnershipProof, + pub struct UnnotePreimage { + pub hash: ::subxt::utils::H256, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -2446,9 +2550,8 @@ 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 GenerateKeyOwnershipProof { - pub set_id: ::core::primitive::u64, - pub authority_id: runtime_types::sp_consensus_grandpa::app::Public, + pub struct RequestPreimage { + pub hash: ::subxt::utils::H256, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -2460,339 +2563,266 @@ 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 CurrentSetId {} + pub struct UnrequestPreimage { + pub hash: ::subxt::utils::H256, + } } - } - pub mod babe_api { - use super::root_mod; - use super::runtime_types; - #[doc = " API necessary for block authorship with BABE."] - pub struct BabeApi; - impl BabeApi { - #[doc = " Return the configuration for BABE."] - pub fn configuration( + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Register a preimage on-chain."] + #[doc = ""] + #[doc = "If the preimage was previously requested, no fees or deposits are taken for providing"] + #[doc = "the preimage. Otherwise, a deposit is taken proportional to the size of the preimage."] + pub fn note_preimage( &self, - ) -> ::subxt::runtime_api::Payload< - inputs::Configuration, - runtime_types::sp_consensus_babe::BabeConfiguration, - > { - ::subxt::runtime_api::Payload::new_static( - "BabeApi_configuration", - inputs::Configuration {}, + bytes: ::std::vec::Vec<::core::primitive::u8>, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Preimage", + "note_preimage", + types::NotePreimage { bytes }, [ - 101u8, 27u8, 68u8, 108u8, 36u8, 12u8, 205u8, 58u8, 238u8, 195u8, 171u8, - 167u8, 248u8, 76u8, 92u8, 226u8, 241u8, 192u8, 151u8, 31u8, 6u8, 200u8, - 69u8, 180u8, 107u8, 134u8, 221u8, 99u8, 237u8, 223u8, 50u8, 175u8, + 77u8, 48u8, 104u8, 3u8, 254u8, 65u8, 106u8, 95u8, 204u8, 89u8, 149u8, + 29u8, 144u8, 188u8, 99u8, 23u8, 146u8, 142u8, 35u8, 17u8, 125u8, 130u8, + 31u8, 206u8, 106u8, 83u8, 163u8, 192u8, 81u8, 23u8, 232u8, 230u8, ], ) } - #[doc = " Returns the slot that started the current epoch."] - pub fn current_epoch_start( + #[doc = "Clear an unrequested preimage from the runtime storage."] + #[doc = ""] + #[doc = "If `len` is provided, then it will be a much cheaper operation."] + #[doc = ""] + #[doc = "- `hash`: The hash of the preimage to be removed from the store."] + #[doc = "- `len`: The length of the preimage of `hash`."] + pub fn unnote_preimage( &self, - ) -> ::subxt::runtime_api::Payload< - inputs::CurrentEpochStart, - runtime_types::sp_consensus_slots::Slot, - > { - ::subxt::runtime_api::Payload::new_static( - "BabeApi_current_epoch_start", - inputs::CurrentEpochStart {}, + hash: ::subxt::utils::H256, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Preimage", + "unnote_preimage", + types::UnnotePreimage { hash }, [ - 67u8, 178u8, 67u8, 242u8, 228u8, 74u8, 93u8, 166u8, 160u8, 9u8, 109u8, - 174u8, 12u8, 82u8, 239u8, 200u8, 96u8, 54u8, 235u8, 184u8, 159u8, - 221u8, 72u8, 244u8, 83u8, 24u8, 239u8, 24u8, 152u8, 177u8, 211u8, - 205u8, + 211u8, 204u8, 205u8, 58u8, 33u8, 179u8, 68u8, 74u8, 149u8, 138u8, + 213u8, 45u8, 140u8, 27u8, 106u8, 81u8, 68u8, 212u8, 147u8, 116u8, 27u8, + 130u8, 84u8, 34u8, 231u8, 197u8, 135u8, 8u8, 19u8, 242u8, 207u8, 17u8, ], ) } - #[doc = " Returns information regarding the current epoch."] - pub fn current_epoch( + #[doc = "Request a preimage be uploaded to the chain without paying any fees or deposits."] + #[doc = ""] + #[doc = "If the preimage requests has already been provided on-chain, we unreserve any deposit"] + #[doc = "a user may have paid, and take the control of the preimage out of their hands."] + pub fn request_preimage( &self, - ) -> ::subxt::runtime_api::Payload< - inputs::CurrentEpoch, - runtime_types::sp_consensus_babe::Epoch, - > { - ::subxt::runtime_api::Payload::new_static( - "BabeApi_current_epoch", - inputs::CurrentEpoch {}, + hash: ::subxt::utils::H256, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Preimage", + "request_preimage", + types::RequestPreimage { hash }, [ - 166u8, 104u8, 201u8, 148u8, 149u8, 137u8, 223u8, 165u8, 82u8, 4u8, - 130u8, 58u8, 52u8, 193u8, 201u8, 80u8, 120u8, 212u8, 76u8, 221u8, 11u8, - 131u8, 115u8, 8u8, 9u8, 59u8, 191u8, 165u8, 148u8, 24u8, 194u8, 162u8, + 195u8, 26u8, 146u8, 255u8, 79u8, 43u8, 73u8, 60u8, 115u8, 78u8, 99u8, + 197u8, 137u8, 95u8, 139u8, 141u8, 79u8, 213u8, 170u8, 169u8, 127u8, + 30u8, 236u8, 65u8, 38u8, 16u8, 118u8, 228u8, 141u8, 83u8, 162u8, 233u8, ], ) } - #[doc = " Returns information regarding the next epoch (which was already"] - #[doc = " previously announced)."] - pub fn next_epoch( + #[doc = "Clear a previously made request for a preimage."] + #[doc = ""] + #[doc = "NOTE: THIS MUST NOT BE CALLED ON `hash` MORE TIMES THAN `request_preimage`."] + pub fn unrequest_preimage( &self, - ) -> ::subxt::runtime_api::Payload< - inputs::NextEpoch, - runtime_types::sp_consensus_babe::Epoch, - > { - ::subxt::runtime_api::Payload::new_static( - "BabeApi_next_epoch", - inputs::NextEpoch {}, + hash: ::subxt::utils::H256, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Preimage", + "unrequest_preimage", + types::UnrequestPreimage { hash }, [ - 251u8, 29u8, 230u8, 254u8, 174u8, 38u8, 55u8, 30u8, 93u8, 42u8, 254u8, - 172u8, 183u8, 250u8, 104u8, 211u8, 79u8, 211u8, 55u8, 98u8, 253u8, - 73u8, 137u8, 185u8, 116u8, 94u8, 20u8, 232u8, 224u8, 136u8, 86u8, - 182u8, + 143u8, 225u8, 239u8, 44u8, 237u8, 83u8, 18u8, 105u8, 101u8, 68u8, + 111u8, 116u8, 66u8, 212u8, 63u8, 190u8, 38u8, 32u8, 105u8, 152u8, 69u8, + 177u8, 193u8, 15u8, 60u8, 26u8, 95u8, 130u8, 11u8, 113u8, 187u8, 108u8, ], ) } - #[doc = " Generates a proof of key ownership for the given authority in the"] - #[doc = " current epoch. An example usage of this module is coupled with the"] - #[doc = " session historical module to prove that a given authority key is"] - #[doc = " tied to a given staking identity during a specific session. Proofs"] - #[doc = " of key ownership are necessary for submitting equivocation reports."] - #[doc = " NOTE: even though the API takes a `slot` as parameter the current"] - #[doc = " implementations ignores this parameter and instead relies on this"] - #[doc = " method being called at the correct block height, i.e. any point at"] - #[doc = " which the epoch for the given slot is live on-chain. Future"] - #[doc = " implementations will instead use indexed data through an offchain"] - #[doc = " worker, not requiring older states to be available."] - pub fn generate_key_ownership_proof( + } + } + #[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_preimage::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 preimage has been noted."] + pub struct Noted { + pub hash: ::subxt::utils::H256, + } + impl ::subxt::events::StaticEvent for Noted { + const PALLET: &'static str = "Preimage"; + const EVENT: &'static str = "Noted"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + 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 preimage has been requested."] + pub struct Requested { + pub hash: ::subxt::utils::H256, + } + impl ::subxt::events::StaticEvent for Requested { + const PALLET: &'static str = "Preimage"; + const EVENT: &'static str = "Requested"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + 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 preimage has ben cleared."] + pub struct Cleared { + pub hash: ::subxt::utils::H256, + } + impl ::subxt::events::StaticEvent for Cleared { + const PALLET: &'static str = "Preimage"; + const EVENT: &'static str = "Cleared"; + } + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " The request status of a given hash."] + pub fn status_for( &self, - slot: runtime_types::sp_consensus_slots::Slot, - authority_id: runtime_types::sp_consensus_babe::app::Public, - ) -> ::subxt::runtime_api::Payload< - inputs::GenerateKeyOwnershipProof, - ::core::option::Option< - runtime_types::sp_consensus_babe::OpaqueKeyOwnershipProof, + _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_preimage::RequestStatus< + ::subxt::utils::AccountId32, + ::core::primitive::u128, >, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, > { - ::subxt::runtime_api::Payload::new_static( - "BabeApi_generate_key_ownership_proof", - inputs::GenerateKeyOwnershipProof { slot, authority_id }, + ::subxt::storage::address::Address::new_static( + "Preimage", + "StatusFor", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], [ - 16u8, 78u8, 1u8, 172u8, 172u8, 253u8, 240u8, 175u8, 90u8, 130u8, 90u8, - 69u8, 249u8, 12u8, 192u8, 134u8, 131u8, 248u8, 186u8, 166u8, 240u8, - 182u8, 177u8, 0u8, 107u8, 151u8, 200u8, 41u8, 157u8, 150u8, 162u8, - 244u8, + 103u8, 208u8, 88u8, 167u8, 244u8, 198u8, 129u8, 134u8, 182u8, 80u8, + 71u8, 192u8, 73u8, 92u8, 190u8, 15u8, 20u8, 132u8, 37u8, 108u8, 88u8, + 233u8, 18u8, 145u8, 9u8, 235u8, 5u8, 132u8, 42u8, 17u8, 227u8, 56u8, ], ) } - #[doc = " Submits an unsigned extrinsic to report an equivocation. The caller"] - #[doc = " must provide the equivocation proof and a key ownership proof"] - #[doc = " (should be obtained using `generate_key_ownership_proof`). The"] - #[doc = " extrinsic will be unsigned and should only be accepted for local"] - #[doc = " authorship (not to be broadcast to the network). This method returns"] - #[doc = " `None` when creation of the extrinsic fails, e.g. if equivocation"] - #[doc = " reporting is disabled for the given runtime (i.e. this method is"] - #[doc = " hardcoded to return `None`). Only useful in an offchain context."] - pub fn submit_report_equivocation_unsigned_extrinsic( + #[doc = " The request status of a given hash."] + pub fn status_for_root( &self, - equivocation_proof: runtime_types::sp_consensus_slots::EquivocationProof< - runtime_types::sp_runtime::generic::header::Header< - ::core::primitive::u32, - runtime_types::sp_runtime::traits::BlakeTwo256, - >, - runtime_types::sp_consensus_babe::app::Public, - >, - key_owner_proof: runtime_types::sp_consensus_babe::OpaqueKeyOwnershipProof, - ) -> ::subxt::runtime_api::Payload< - inputs::SubmitReportEquivocationUnsignedExtrinsic, - ::core::option::Option<()>, - > { - ::subxt::runtime_api::Payload::new_static( - "BabeApi_submit_report_equivocation_unsigned_extrinsic", - inputs::SubmitReportEquivocationUnsignedExtrinsic { - equivocation_proof, - key_owner_proof, - }, - [ - 255u8, 136u8, 248u8, 244u8, 155u8, 51u8, 20u8, 157u8, 93u8, 19u8, 24u8, - 170u8, 72u8, 199u8, 222u8, 111u8, 164u8, 126u8, 159u8, 209u8, 198u8, - 37u8, 113u8, 12u8, 36u8, 117u8, 131u8, 7u8, 130u8, 85u8, 177u8, 109u8, - ], - ) - } - } - pub mod inputs { - use super::root_mod; - 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 Configuration {} - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CurrentEpochStart {} - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CurrentEpoch {} - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct NextEpoch {} - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct GenerateKeyOwnershipProof { - pub slot: runtime_types::sp_consensus_slots::Slot, - pub authority_id: runtime_types::sp_consensus_babe::app::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 SubmitReportEquivocationUnsignedExtrinsic { - pub equivocation_proof: runtime_types::sp_consensus_slots::EquivocationProof< - runtime_types::sp_runtime::generic::header::Header< - ::core::primitive::u32, - runtime_types::sp_runtime::traits::BlakeTwo256, - >, - runtime_types::sp_consensus_babe::app::Public, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_preimage::RequestStatus< + ::subxt::utils::AccountId32, + ::core::primitive::u128, >, - pub key_owner_proof: runtime_types::sp_consensus_babe::OpaqueKeyOwnershipProof, - } - } - } - pub mod authority_discovery_api { - use super::root_mod; - use super::runtime_types; - #[doc = " The authority discovery api."] - #[doc = ""] - #[doc = " This api is used by the `client/authority-discovery` module to retrieve identifiers"] - #[doc = " of the current and next authority set."] - pub struct AuthorityDiscoveryApi; - impl AuthorityDiscoveryApi { - #[doc = " Retrieve authority identifiers of the current and next authority set."] - pub fn authorities( - &self, - ) -> ::subxt::runtime_api::Payload< - inputs::Authorities, - ::std::vec::Vec, + (), + (), + ::subxt::storage::address::Yes, > { - ::subxt::runtime_api::Payload::new_static( - "AuthorityDiscoveryApi_authorities", - inputs::Authorities {}, + ::subxt::storage::address::Address::new_static( + "Preimage", + "StatusFor", + Vec::new(), [ - 104u8, 50u8, 187u8, 116u8, 97u8, 112u8, 203u8, 212u8, 27u8, 108u8, - 253u8, 8u8, 103u8, 104u8, 63u8, 176u8, 178u8, 179u8, 154u8, 104u8, - 167u8, 241u8, 76u8, 136u8, 102u8, 130u8, 88u8, 115u8, 104u8, 64u8, - 224u8, 98u8, + 103u8, 208u8, 88u8, 167u8, 244u8, 198u8, 129u8, 134u8, 182u8, 80u8, + 71u8, 192u8, 73u8, 92u8, 190u8, 15u8, 20u8, 132u8, 37u8, 108u8, 88u8, + 233u8, 18u8, 145u8, 9u8, 235u8, 5u8, 132u8, 42u8, 17u8, 227u8, 56u8, ], ) } - } - pub mod inputs { - use super::root_mod; - 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 Authorities {} - } - } - pub mod session_keys { - use super::root_mod; - use super::runtime_types; - #[doc = " Session keys runtime api."] - pub struct SessionKeys; - impl SessionKeys { - #[doc = " Generate a set of session keys with optionally using the given seed."] - #[doc = " The keys should be stored within the keystore exposed via runtime"] - #[doc = " externalities."] - #[doc = ""] - #[doc = " The seed needs to be a valid `utf8` string."] - #[doc = ""] - #[doc = " Returns the concatenated SCALE encoded public keys."] - pub fn generate_session_keys( + pub fn preimage_for( &self, - seed: ::core::option::Option<::std::vec::Vec<::core::primitive::u8>>, - ) -> ::subxt::runtime_api::Payload< - inputs::GenerateSessionKeys, - ::std::vec::Vec<::core::primitive::u8>, + _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, + _1: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, > { - ::subxt::runtime_api::Payload::new_static( - "SessionKeys_generate_session_keys", - inputs::GenerateSessionKeys { seed }, + ::subxt::storage::address::Address::new_static( + "Preimage", + "PreimageFor", + vec![ + ::subxt::storage::address::make_static_storage_map_key(_0.borrow()), + ::subxt::storage::address::make_static_storage_map_key(_1.borrow()), + ], [ - 238u8, 35u8, 56u8, 56u8, 5u8, 183u8, 237u8, 233u8, 220u8, 77u8, 245u8, - 218u8, 120u8, 21u8, 3u8, 95u8, 106u8, 140u8, 212u8, 37u8, 14u8, 180u8, - 24u8, 11u8, 137u8, 193u8, 111u8, 91u8, 235u8, 127u8, 202u8, 230u8, + 96u8, 74u8, 30u8, 112u8, 120u8, 41u8, 52u8, 187u8, 252u8, 68u8, 42u8, + 5u8, 61u8, 228u8, 250u8, 192u8, 224u8, 61u8, 53u8, 222u8, 95u8, 148u8, + 6u8, 53u8, 43u8, 152u8, 88u8, 58u8, 185u8, 234u8, 131u8, 124u8, ], ) } - #[doc = " Decode the given public session keys."] - #[doc = ""] - #[doc = " Returns the list of public raw public keys + key type."] - pub fn decode_session_keys( + pub fn preimage_for_root( &self, - encoded: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::runtime_api::Payload< - inputs::DecodeSessionKeys, - ::core::option::Option< - ::std::vec::Vec<( - ::std::vec::Vec<::core::primitive::u8>, - runtime_types::sp_core::crypto::KeyTypeId, - )>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, >, + (), + (), + ::subxt::storage::address::Yes, > { - ::subxt::runtime_api::Payload::new_static( - "SessionKeys_decode_session_keys", - inputs::DecodeSessionKeys { encoded }, + ::subxt::storage::address::Address::new_static( + "Preimage", + "PreimageFor", + Vec::new(), [ - 134u8, 106u8, 224u8, 190u8, 133u8, 212u8, 253u8, 184u8, 222u8, 76u8, - 44u8, 75u8, 168u8, 18u8, 3u8, 169u8, 32u8, 8u8, 46u8, 5u8, 155u8, 45u8, - 149u8, 144u8, 41u8, 174u8, 130u8, 133u8, 22u8, 150u8, 89u8, 196u8, + 96u8, 74u8, 30u8, 112u8, 120u8, 41u8, 52u8, 187u8, 252u8, 68u8, 42u8, + 5u8, 61u8, 228u8, 250u8, 192u8, 224u8, 61u8, 53u8, 222u8, 95u8, 148u8, + 6u8, 53u8, 43u8, 152u8, 88u8, 58u8, 185u8, 234u8, 131u8, 124u8, ], ) } } - pub mod inputs { - use super::root_mod; + } + } + pub mod babe { + 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 :: Decode, @@ -2804,8 +2834,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 GenerateSessionKeys { - pub seed: ::core::option::Option<::std::vec::Vec<::core::primitive::u8>>, + 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, + >, + >, + pub key_owner_proof: runtime_types::sp_session::MembershipProof, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -2817,38 +2856,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 DecodeSessionKeys { - pub encoded: ::std::vec::Vec<::core::primitive::u8>, - } - } - } - pub mod account_nonce_api { - use super::root_mod; - use super::runtime_types; - #[doc = " The API to query account nonce (aka transaction index)."] - pub struct AccountNonceApi; - impl AccountNonceApi { - #[doc = " Get current account nonce of given `AccountId`."] - pub fn account_nonce( - &self, - account: ::subxt::utils::AccountId32, - ) -> ::subxt::runtime_api::Payload - { - ::subxt::runtime_api::Payload::new_static( - "AccountNonceApi_account_nonce", - inputs::AccountNonce { account }, - [ - 115u8, 50u8, 18u8, 201u8, 220u8, 171u8, 244u8, 16u8, 58u8, 183u8, - 173u8, 196u8, 253u8, 239u8, 241u8, 100u8, 246u8, 179u8, 50u8, 32u8, - 22u8, 245u8, 109u8, 191u8, 232u8, 76u8, 152u8, 87u8, 156u8, 187u8, - 175u8, 202u8, - ], - ) + 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, + >, + >, + pub key_owner_proof: runtime_types::sp_session::MembershipProof, } - } - pub mod inputs { - use super::root_mod; - use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -2859,3137 +2878,511 @@ 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 AccountNonce { - pub account: ::subxt::utils::AccountId32, + pub struct PlanConfigChange { + pub config: runtime_types::sp_consensus_babe::digests::NextConfigDescriptor, } } - } - pub mod transaction_payment_api { - use super::root_mod; - use super::runtime_types; - pub struct TransactionPaymentApi; - impl TransactionPaymentApi { - pub fn query_info( + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Report authority equivocation/misbehavior. This method will verify"] + #[doc = "the equivocation proof and validate the given key ownership proof"] + #[doc = "against the extracted offender. If both are valid, the offence will"] + #[doc = "be reported."] + pub fn report_equivocation( &self, - uxt : runtime_types :: sp_runtime :: generic :: unchecked_extrinsic :: UncheckedExtrinsic < :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , () > , runtime_types :: polkadot_runtime :: RuntimeCall , runtime_types :: sp_runtime :: MultiSignature , (runtime_types :: frame_system :: extensions :: check_non_zero_sender :: CheckNonZeroSender , runtime_types :: frame_system :: extensions :: check_spec_version :: CheckSpecVersion , runtime_types :: frame_system :: extensions :: check_tx_version :: CheckTxVersion , runtime_types :: frame_system :: extensions :: check_genesis :: CheckGenesis , runtime_types :: frame_system :: extensions :: check_mortality :: CheckMortality , runtime_types :: frame_system :: extensions :: check_nonce :: CheckNonce , runtime_types :: frame_system :: extensions :: check_weight :: CheckWeight , runtime_types :: pallet_transaction_payment :: ChargeTransactionPayment , runtime_types :: polkadot_runtime_common :: claims :: PrevalidateAttests ,) >, - len: ::core::primitive::u32, - ) -> ::subxt::runtime_api::Payload< - inputs::QueryInfo, - runtime_types::pallet_transaction_payment::types::RuntimeDispatchInfo< - ::core::primitive::u128, - runtime_types::sp_weights::weight_v2::Weight, + equivocation_proof: runtime_types::sp_consensus_slots::EquivocationProof< + runtime_types::sp_runtime::generic::header::Header< + ::core::primitive::u32, + runtime_types::sp_runtime::traits::BlakeTwo256, + >, + runtime_types::sp_consensus_babe::app::Public, >, - > { - ::subxt::runtime_api::Payload::new_static( - "TransactionPaymentApi_query_info", - inputs::QueryInfo { uxt, len }, + key_owner_proof: runtime_types::sp_session::MembershipProof, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Babe", + "report_equivocation", + types::ReportEquivocation { + equivocation_proof: ::std::boxed::Box::new(equivocation_proof), + key_owner_proof, + }, [ - 157u8, 139u8, 132u8, 17u8, 44u8, 153u8, 215u8, 139u8, 196u8, 107u8, - 225u8, 39u8, 78u8, 134u8, 147u8, 168u8, 134u8, 89u8, 51u8, 144u8, - 101u8, 117u8, 35u8, 131u8, 108u8, 17u8, 74u8, 1u8, 167u8, 7u8, 165u8, - 98u8, + 177u8, 237u8, 107u8, 138u8, 237u8, 233u8, 30u8, 195u8, 112u8, 176u8, + 185u8, 113u8, 157u8, 221u8, 134u8, 151u8, 62u8, 151u8, 64u8, 164u8, + 254u8, 112u8, 2u8, 94u8, 175u8, 79u8, 160u8, 3u8, 72u8, 145u8, 244u8, + 137u8, ], ) } - pub fn query_fee_details( + #[doc = "Report authority equivocation/misbehavior. This method will verify"] + #[doc = "the equivocation proof and validate the given key ownership proof"] + #[doc = "against the extracted offender. If both are valid, the offence will"] + #[doc = "be reported."] + #[doc = "This extrinsic must be called unsigned and it is expected that only"] + #[doc = "block authors will call it (validated in `ValidateUnsigned`), as such"] + #[doc = "if the block author is defined it will be defined as the equivocation"] + #[doc = "reporter."] + pub fn report_equivocation_unsigned( &self, - uxt : runtime_types :: sp_runtime :: generic :: unchecked_extrinsic :: UncheckedExtrinsic < :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , () > , runtime_types :: polkadot_runtime :: RuntimeCall , runtime_types :: sp_runtime :: MultiSignature , (runtime_types :: frame_system :: extensions :: check_non_zero_sender :: CheckNonZeroSender , runtime_types :: frame_system :: extensions :: check_spec_version :: CheckSpecVersion , runtime_types :: frame_system :: extensions :: check_tx_version :: CheckTxVersion , runtime_types :: frame_system :: extensions :: check_genesis :: CheckGenesis , runtime_types :: frame_system :: extensions :: check_mortality :: CheckMortality , runtime_types :: frame_system :: extensions :: check_nonce :: CheckNonce , runtime_types :: frame_system :: extensions :: check_weight :: CheckWeight , runtime_types :: pallet_transaction_payment :: ChargeTransactionPayment , runtime_types :: polkadot_runtime_common :: claims :: PrevalidateAttests ,) >, - len: ::core::primitive::u32, - ) -> ::subxt::runtime_api::Payload< - inputs::QueryFeeDetails, - runtime_types::pallet_transaction_payment::types::FeeDetails< - ::core::primitive::u128, + equivocation_proof: runtime_types::sp_consensus_slots::EquivocationProof< + runtime_types::sp_runtime::generic::header::Header< + ::core::primitive::u32, + runtime_types::sp_runtime::traits::BlakeTwo256, + >, + runtime_types::sp_consensus_babe::app::Public, >, - > { - ::subxt::runtime_api::Payload::new_static( - "TransactionPaymentApi_query_fee_details", - inputs::QueryFeeDetails { uxt, len }, - [ - 113u8, 100u8, 16u8, 128u8, 108u8, 95u8, 91u8, 255u8, 46u8, 255u8, 52u8, - 225u8, 92u8, 186u8, 175u8, 126u8, 96u8, 25u8, 206u8, 207u8, 16u8, 94u8, - 204u8, 138u8, 227u8, 38u8, 125u8, 14u8, 38u8, 58u8, 84u8, 71u8, + key_owner_proof: runtime_types::sp_session::MembershipProof, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Babe", + "report_equivocation_unsigned", + types::ReportEquivocationUnsigned { + equivocation_proof: ::std::boxed::Box::new(equivocation_proof), + key_owner_proof, + }, + [ + 56u8, 103u8, 238u8, 118u8, 61u8, 192u8, 222u8, 87u8, 254u8, 24u8, + 138u8, 219u8, 210u8, 85u8, 201u8, 147u8, 128u8, 49u8, 199u8, 144u8, + 46u8, 158u8, 163u8, 31u8, 101u8, 224u8, 72u8, 98u8, 68u8, 120u8, 215u8, + 19u8, ], ) } - pub fn query_weight_to_fee( + #[doc = "Plan an epoch config change. The epoch config change is recorded and will be enacted on"] + #[doc = "the next call to `enact_epoch_change`. The config will be activated one epoch after."] + #[doc = "Multiple calls to this method will replace any existing planned config change that had"] + #[doc = "not been enacted yet."] + pub fn plan_config_change( &self, - weight: runtime_types::sp_weights::weight_v2::Weight, - ) -> ::subxt::runtime_api::Payload - { - ::subxt::runtime_api::Payload::new_static( - "TransactionPaymentApi_query_weight_to_fee", - inputs::QueryWeightToFee { weight }, + config: runtime_types::sp_consensus_babe::digests::NextConfigDescriptor, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Babe", + "plan_config_change", + types::PlanConfigChange { config }, [ - 179u8, 108u8, 155u8, 39u8, 134u8, 220u8, 72u8, 45u8, 230u8, 232u8, - 150u8, 146u8, 61u8, 198u8, 145u8, 250u8, 19u8, 157u8, 204u8, 217u8, - 111u8, 171u8, 197u8, 21u8, 75u8, 6u8, 16u8, 26u8, 244u8, 101u8, 134u8, - 95u8, + 229u8, 157u8, 41u8, 58u8, 56u8, 4u8, 52u8, 107u8, 104u8, 20u8, 42u8, + 110u8, 1u8, 17u8, 45u8, 196u8, 30u8, 135u8, 63u8, 46u8, 40u8, 137u8, + 209u8, 37u8, 24u8, 108u8, 251u8, 189u8, 77u8, 208u8, 74u8, 32u8, ], ) } - pub fn query_length_to_fee( + } + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " Current epoch index."] + pub fn epoch_index( &self, - length: ::core::primitive::u32, - ) -> ::subxt::runtime_api::Payload - { - ::subxt::runtime_api::Payload::new_static( - "TransactionPaymentApi_query_length_to_fee", - inputs::QueryLengthToFee { length }, + ) -> ::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( + "Babe", + "EpochIndex", + vec![], [ - 228u8, 141u8, 164u8, 186u8, 169u8, 249u8, 75u8, 2u8, 160u8, 73u8, 73u8, - 214u8, 141u8, 76u8, 180u8, 222u8, 230u8, 161u8, 131u8, 88u8, 25u8, - 192u8, 77u8, 124u8, 158u8, 113u8, 72u8, 147u8, 13u8, 11u8, 42u8, 30u8, + 51u8, 27u8, 91u8, 156u8, 118u8, 99u8, 46u8, 219u8, 190u8, 147u8, 205u8, + 23u8, 106u8, 169u8, 121u8, 218u8, 208u8, 235u8, 135u8, 127u8, 243u8, + 41u8, 55u8, 243u8, 235u8, 122u8, 57u8, 86u8, 37u8, 90u8, 208u8, 71u8, ], ) } - } - pub mod inputs { - use super::root_mod; - 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 QueryInfo { pub uxt : runtime_types :: sp_runtime :: generic :: unchecked_extrinsic :: UncheckedExtrinsic < :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , () > , runtime_types :: polkadot_runtime :: RuntimeCall , runtime_types :: sp_runtime :: MultiSignature , (runtime_types :: frame_system :: extensions :: check_non_zero_sender :: CheckNonZeroSender , runtime_types :: frame_system :: extensions :: check_spec_version :: CheckSpecVersion , runtime_types :: frame_system :: extensions :: check_tx_version :: CheckTxVersion , runtime_types :: frame_system :: extensions :: check_genesis :: CheckGenesis , runtime_types :: frame_system :: extensions :: check_mortality :: CheckMortality , runtime_types :: frame_system :: extensions :: check_nonce :: CheckNonce , runtime_types :: frame_system :: extensions :: check_weight :: CheckWeight , runtime_types :: pallet_transaction_payment :: ChargeTransactionPayment , runtime_types :: polkadot_runtime_common :: claims :: PrevalidateAttests ,) > , pub len : :: 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 QueryFeeDetails { pub uxt : runtime_types :: sp_runtime :: generic :: unchecked_extrinsic :: UncheckedExtrinsic < :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , () > , runtime_types :: polkadot_runtime :: RuntimeCall , runtime_types :: sp_runtime :: MultiSignature , (runtime_types :: frame_system :: extensions :: check_non_zero_sender :: CheckNonZeroSender , runtime_types :: frame_system :: extensions :: check_spec_version :: CheckSpecVersion , runtime_types :: frame_system :: extensions :: check_tx_version :: CheckTxVersion , runtime_types :: frame_system :: extensions :: check_genesis :: CheckGenesis , runtime_types :: frame_system :: extensions :: check_mortality :: CheckMortality , runtime_types :: frame_system :: extensions :: check_nonce :: CheckNonce , runtime_types :: frame_system :: extensions :: check_weight :: CheckWeight , runtime_types :: pallet_transaction_payment :: ChargeTransactionPayment , runtime_types :: polkadot_runtime_common :: claims :: PrevalidateAttests ,) > , pub len : :: 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 QueryWeightToFee { - pub weight: runtime_types::sp_weights::weight_v2::Weight, + #[doc = " Current epoch authorities."] + pub fn authorities( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec<( + runtime_types::sp_consensus_babe::app::Public, + ::core::primitive::u64, + )>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "Babe", + "Authorities", + vec![], + [ + 61u8, 8u8, 133u8, 111u8, 169u8, 120u8, 0u8, 213u8, 31u8, 159u8, 204u8, + 212u8, 18u8, 205u8, 93u8, 84u8, 140u8, 108u8, 136u8, 209u8, 234u8, + 107u8, 145u8, 9u8, 204u8, 224u8, 105u8, 9u8, 238u8, 241u8, 65u8, 30u8, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct QueryLengthToFee { - pub length: ::core::primitive::u32, + #[doc = " The slot at which the first epoch actually started. This is 0"] + #[doc = " until the first block of the chain."] + pub fn genesis_slot( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::sp_consensus_slots::Slot, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "Babe", + "GenesisSlot", + vec![], + [ + 234u8, 127u8, 243u8, 100u8, 124u8, 160u8, 66u8, 248u8, 48u8, 218u8, + 61u8, 52u8, 54u8, 142u8, 158u8, 77u8, 32u8, 63u8, 156u8, 39u8, 94u8, + 255u8, 192u8, 238u8, 170u8, 118u8, 58u8, 42u8, 199u8, 61u8, 199u8, + 77u8, + ], + ) } - } - } - pub mod transaction_payment_call_api { - use super::root_mod; - use super::runtime_types; - pub struct TransactionPaymentCallApi; - impl TransactionPaymentCallApi { - #[doc = " Query information of a dispatch class, weight, and fee of a given encoded `Call`."] - pub fn query_call_info( + #[doc = " Current slot number."] + pub fn current_slot( &self, - call: runtime_types::polkadot_runtime::RuntimeCall, - len: ::core::primitive::u32, - ) -> ::subxt::runtime_api::Payload< - inputs::QueryCallInfo, - runtime_types::pallet_transaction_payment::types::RuntimeDispatchInfo< - ::core::primitive::u128, - runtime_types::sp_weights::weight_v2::Weight, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::sp_consensus_slots::Slot, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "Babe", + "CurrentSlot", + vec![], + [ + 139u8, 237u8, 185u8, 137u8, 251u8, 179u8, 69u8, 167u8, 133u8, 168u8, + 204u8, 64u8, 178u8, 123u8, 92u8, 250u8, 119u8, 190u8, 208u8, 178u8, + 208u8, 176u8, 124u8, 187u8, 74u8, 165u8, 33u8, 78u8, 161u8, 206u8, 8u8, + 108u8, + ], + ) + } + #[doc = " The epoch randomness for the *current* epoch."] + #[doc = ""] + #[doc = " # Security"] + #[doc = ""] + #[doc = " This MUST NOT be used for gambling, as it can be influenced by a"] + #[doc = " malicious validator in the short term. It MAY be used in many"] + #[doc = " cryptographic protocols, however, so long as one remembers that this"] + #[doc = " (like everything else on-chain) it is public. For example, it can be"] + #[doc = " used where a number is needed that cannot have been chosen by an"] + #[doc = " adversary, for purposes such as public-coin zero-knowledge proofs."] + pub fn randomness( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + [::core::primitive::u8; 32usize], + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "Babe", + "Randomness", + vec![], + [ + 191u8, 197u8, 25u8, 164u8, 104u8, 248u8, 247u8, 193u8, 244u8, 60u8, + 181u8, 195u8, 248u8, 90u8, 41u8, 199u8, 82u8, 123u8, 72u8, 126u8, 18u8, + 17u8, 128u8, 215u8, 34u8, 251u8, 227u8, 70u8, 166u8, 10u8, 104u8, + 140u8, + ], + ) + } + #[doc = " Pending epoch configuration change that will be applied when the next epoch is enacted."] + pub fn pending_epoch_config_change( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::sp_consensus_babe::digests::NextConfigDescriptor, + ::subxt::storage::address::Yes, + (), + (), + > { + ::subxt::storage::address::Address::new_static( + "Babe", + "PendingEpochConfigChange", + vec![], + [ + 4u8, 201u8, 0u8, 204u8, 47u8, 246u8, 4u8, 185u8, 163u8, 242u8, 242u8, + 152u8, 29u8, 222u8, 71u8, 127u8, 49u8, 203u8, 206u8, 180u8, 244u8, + 50u8, 80u8, 49u8, 199u8, 97u8, 3u8, 170u8, 156u8, 139u8, 106u8, 113u8, + ], + ) + } + #[doc = " Next epoch randomness."] + pub fn next_randomness( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + [::core::primitive::u8; 32usize], + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "Babe", + "NextRandomness", + vec![], + [ + 185u8, 98u8, 45u8, 109u8, 253u8, 38u8, 238u8, 221u8, 240u8, 29u8, 38u8, + 107u8, 118u8, 117u8, 131u8, 115u8, 21u8, 255u8, 203u8, 81u8, 243u8, + 251u8, 91u8, 60u8, 163u8, 202u8, 125u8, 193u8, 173u8, 234u8, 166u8, + 92u8, + ], + ) + } + #[doc = " Next epoch authorities."] + pub fn next_authorities( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec<( + runtime_types::sp_consensus_babe::app::Public, + ::core::primitive::u64, + )>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "Babe", + "NextAuthorities", + vec![], + [ + 201u8, 193u8, 164u8, 18u8, 155u8, 253u8, 124u8, 163u8, 143u8, 73u8, + 212u8, 20u8, 241u8, 108u8, 110u8, 5u8, 171u8, 66u8, 224u8, 208u8, 10u8, + 65u8, 148u8, 164u8, 1u8, 12u8, 216u8, 83u8, 20u8, 226u8, 254u8, 183u8, + ], + ) + } + #[doc = " Randomness under construction."] + #[doc = ""] + #[doc = " We make a trade-off between storage accesses and list length."] + #[doc = " We store the under-construction randomness in segments of up to"] + #[doc = " `UNDER_CONSTRUCTION_SEGMENT_LENGTH`."] + #[doc = ""] + #[doc = " Once a segment reaches this length, we begin the next one."] + #[doc = " We reset all segments and return to `0` at the beginning of every"] + #[doc = " epoch."] + pub fn segment_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( + "Babe", + "SegmentIndex", + vec![], + [ + 128u8, 45u8, 87u8, 58u8, 174u8, 152u8, 241u8, 156u8, 56u8, 192u8, 19u8, + 45u8, 75u8, 160u8, 35u8, 253u8, 145u8, 11u8, 178u8, 81u8, 114u8, 117u8, + 112u8, 107u8, 163u8, 208u8, 240u8, 151u8, 102u8, 176u8, 246u8, 5u8, + ], + ) + } + #[doc = " TWOX-NOTE: `SegmentIndex` is an increasing integer, so this is okay."] + pub fn under_construction( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::bounded_collections::bounded_vec::BoundedVec< + [::core::primitive::u8; 32usize], >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::runtime_api::Payload::new_static( - "TransactionPaymentCallApi_query_call_info", - inputs::QueryCallInfo { call, len }, + ::subxt::storage::address::Address::new_static( + "Babe", + "UnderConstruction", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], [ - 151u8, 40u8, 199u8, 73u8, 193u8, 248u8, 30u8, 24u8, 71u8, 196u8, 235u8, - 10u8, 211u8, 120u8, 228u8, 29u8, 101u8, 175u8, 200u8, 196u8, 70u8, - 44u8, 112u8, 209u8, 175u8, 246u8, 148u8, 118u8, 84u8, 127u8, 185u8, - 163u8, + 180u8, 4u8, 149u8, 245u8, 231u8, 92u8, 99u8, 170u8, 254u8, 172u8, + 182u8, 3u8, 152u8, 156u8, 132u8, 196u8, 140u8, 97u8, 7u8, 84u8, 220u8, + 89u8, 195u8, 177u8, 235u8, 51u8, 98u8, 144u8, 73u8, 238u8, 59u8, 164u8, ], ) } - #[doc = " Query fee details of a given encoded `Call`."] - pub fn query_call_fee_details( + #[doc = " TWOX-NOTE: `SegmentIndex` is an increasing integer, so this is okay."] + pub fn under_construction_root( &self, - call: runtime_types::polkadot_runtime::RuntimeCall, - len: ::core::primitive::u32, - ) -> ::subxt::runtime_api::Payload< - inputs::QueryCallFeeDetails, - runtime_types::pallet_transaction_payment::types::FeeDetails< - ::core::primitive::u128, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::bounded_collections::bounded_vec::BoundedVec< + [::core::primitive::u8; 32usize], >, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::runtime_api::Payload::new_static( - "TransactionPaymentCallApi_query_call_fee_details", - inputs::QueryCallFeeDetails { call, len }, + ::subxt::storage::address::Address::new_static( + "Babe", + "UnderConstruction", + Vec::new(), [ - 56u8, 220u8, 173u8, 0u8, 48u8, 27u8, 228u8, 70u8, 139u8, 236u8, 142u8, - 142u8, 192u8, 147u8, 216u8, 185u8, 152u8, 219u8, 185u8, 189u8, 166u8, - 110u8, 224u8, 32u8, 94u8, 53u8, 248u8, 216u8, 90u8, 152u8, 63u8, 148u8, + 180u8, 4u8, 149u8, 245u8, 231u8, 92u8, 99u8, 170u8, 254u8, 172u8, + 182u8, 3u8, 152u8, 156u8, 132u8, 196u8, 140u8, 97u8, 7u8, 84u8, 220u8, + 89u8, 195u8, 177u8, 235u8, 51u8, 98u8, 144u8, 73u8, 238u8, 59u8, 164u8, ], ) } - #[doc = " Query the output of the current `WeightToFee` given some input."] - pub fn query_weight_to_fee( + #[doc = " Temporary value (cleared at block finalization) which is `Some`"] + #[doc = " if per-block initialization has already been called for current block."] + pub fn initialized( &self, - weight: runtime_types::sp_weights::weight_v2::Weight, - ) -> ::subxt::runtime_api::Payload - { - ::subxt::runtime_api::Payload::new_static( - "TransactionPaymentCallApi_query_weight_to_fee", - inputs::QueryWeightToFee { weight }, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::option::Option, + ::subxt::storage::address::Yes, + (), + (), + > { + ::subxt::storage::address::Address::new_static( + "Babe", + "Initialized", + vec![], [ - 235u8, 177u8, 255u8, 102u8, 0u8, 237u8, 63u8, 37u8, 144u8, 142u8, 86u8, - 43u8, 82u8, 41u8, 25u8, 149u8, 75u8, 238u8, 118u8, 216u8, 84u8, 241u8, - 54u8, 157u8, 81u8, 246u8, 140u8, 240u8, 210u8, 208u8, 235u8, 172u8, + 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, ], ) } - #[doc = " Query the output of the current `LengthToFee` given some input."] - pub fn query_length_to_fee( + #[doc = " This field should always be populated during block processing unless"] + #[doc = " secondary plain slots are enabled (which don't contain a VRF output)."] + #[doc = ""] + #[doc = " It is set in `on_finalize`, before it will contain the value from the last block."] + pub fn author_vrf_randomness( &self, - length: ::core::primitive::u32, - ) -> ::subxt::runtime_api::Payload - { - ::subxt::runtime_api::Payload::new_static( - "TransactionPaymentCallApi_query_length_to_fee", - inputs::QueryLengthToFee { length }, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::option::Option<[::core::primitive::u8; 32usize]>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "Babe", + "AuthorVrfRandomness", + vec![], [ - 188u8, 80u8, 192u8, 251u8, 47u8, 200u8, 60u8, 10u8, 214u8, 47u8, 137u8, - 111u8, 226u8, 163u8, 60u8, 177u8, 190u8, 210u8, 57u8, 89u8, 34u8, - 154u8, 190u8, 244u8, 132u8, 129u8, 212u8, 121u8, 43u8, 190u8, 71u8, - 237u8, + 66u8, 235u8, 74u8, 252u8, 222u8, 135u8, 19u8, 28u8, 74u8, 191u8, 170u8, + 197u8, 207u8, 127u8, 77u8, 121u8, 138u8, 138u8, 110u8, 187u8, 34u8, + 14u8, 230u8, 43u8, 241u8, 241u8, 63u8, 163u8, 53u8, 179u8, 250u8, + 247u8, ], ) } - } - pub mod inputs { - use super::root_mod; - 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 QueryCallInfo { - pub call: runtime_types::polkadot_runtime::RuntimeCall, - pub len: ::core::primitive::u32, + #[doc = " The block numbers when the last and current epoch have started, respectively `N-1` and"] + #[doc = " `N`."] + #[doc = " NOTE: We track this is in order to annotate the block number when a given pool of"] + #[doc = " entropy was fixed (i.e. it was known to chain observers). Since epochs are defined in"] + #[doc = " slots, which may be skipped, the block numbers may not line up with the slot numbers."] + pub fn epoch_start( + &self, + ) -> ::subxt::storage::address::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( + "Babe", + "EpochStart", + vec![], + [ + 196u8, 39u8, 241u8, 20u8, 150u8, 180u8, 136u8, 4u8, 195u8, 205u8, + 218u8, 10u8, 130u8, 131u8, 168u8, 243u8, 207u8, 249u8, 58u8, 195u8, + 177u8, 119u8, 110u8, 243u8, 241u8, 3u8, 245u8, 56u8, 157u8, 5u8, 68u8, + 60u8, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct QueryCallFeeDetails { - pub call: runtime_types::polkadot_runtime::RuntimeCall, - pub len: ::core::primitive::u32, + #[doc = " How late the current block is compared to its parent."] + #[doc = ""] + #[doc = " This entry is populated as part of block execution and is cleaned up"] + #[doc = " on block finalization. Querying this storage entry outside of block"] + #[doc = " execution context should always yield zero."] + pub fn lateness( + &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( + "Babe", + "Lateness", + vec![], + [ + 229u8, 230u8, 224u8, 89u8, 49u8, 213u8, 198u8, 236u8, 144u8, 56u8, + 193u8, 234u8, 62u8, 242u8, 191u8, 199u8, 105u8, 131u8, 74u8, 63u8, + 75u8, 1u8, 210u8, 49u8, 3u8, 128u8, 18u8, 77u8, 219u8, 146u8, 60u8, + 88u8, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct QueryWeightToFee { - pub weight: runtime_types::sp_weights::weight_v2::Weight, + #[doc = " The configuration for the current epoch. Should never be `None` as it is initialized in"] + #[doc = " genesis."] + pub fn epoch_config( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::sp_consensus_babe::BabeEpochConfiguration, + ::subxt::storage::address::Yes, + (), + (), + > { + ::subxt::storage::address::Address::new_static( + "Babe", + "EpochConfig", + vec![], + [ + 41u8, 118u8, 141u8, 244u8, 72u8, 17u8, 125u8, 203u8, 43u8, 153u8, + 203u8, 119u8, 117u8, 223u8, 123u8, 133u8, 73u8, 235u8, 130u8, 21u8, + 160u8, 167u8, 16u8, 173u8, 177u8, 35u8, 117u8, 97u8, 149u8, 49u8, + 220u8, 24u8, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct QueryLengthToFee { - pub length: ::core::primitive::u32, - } - } - } - } - pub struct ConstantsApi; - impl ConstantsApi { - pub fn system(&self) -> system::constants::ConstantsApi { - system::constants::ConstantsApi - } - pub fn scheduler(&self) -> scheduler::constants::ConstantsApi { - scheduler::constants::ConstantsApi - } - pub fn babe(&self) -> babe::constants::ConstantsApi { - babe::constants::ConstantsApi - } - pub fn timestamp(&self) -> timestamp::constants::ConstantsApi { - timestamp::constants::ConstantsApi - } - pub fn indices(&self) -> indices::constants::ConstantsApi { - indices::constants::ConstantsApi - } - pub fn balances(&self) -> balances::constants::ConstantsApi { - balances::constants::ConstantsApi - } - pub fn transaction_payment(&self) -> transaction_payment::constants::ConstantsApi { - transaction_payment::constants::ConstantsApi - } - pub fn staking(&self) -> staking::constants::ConstantsApi { - staking::constants::ConstantsApi - } - pub fn grandpa(&self) -> grandpa::constants::ConstantsApi { - grandpa::constants::ConstantsApi - } - pub fn im_online(&self) -> im_online::constants::ConstantsApi { - im_online::constants::ConstantsApi - } - pub fn democracy(&self) -> democracy::constants::ConstantsApi { - democracy::constants::ConstantsApi - } - pub fn 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 - } - pub fn vesting(&self) -> vesting::constants::ConstantsApi { - vesting::constants::ConstantsApi - } - pub fn utility(&self) -> utility::constants::ConstantsApi { - utility::constants::ConstantsApi - } - pub fn identity(&self) -> identity::constants::ConstantsApi { - identity::constants::ConstantsApi - } - pub fn proxy(&self) -> proxy::constants::ConstantsApi { - proxy::constants::ConstantsApi - } - pub fn multisig(&self) -> multisig::constants::ConstantsApi { - multisig::constants::ConstantsApi - } - pub fn bounties(&self) -> bounties::constants::ConstantsApi { - bounties::constants::ConstantsApi - } - pub fn child_bounties(&self) -> child_bounties::constants::ConstantsApi { - child_bounties::constants::ConstantsApi - } - pub fn tips(&self) -> tips::constants::ConstantsApi { - tips::constants::ConstantsApi - } - pub fn election_provider_multi_phase( - &self, - ) -> election_provider_multi_phase::constants::ConstantsApi { - election_provider_multi_phase::constants::ConstantsApi - } - pub fn voter_list(&self) -> voter_list::constants::ConstantsApi { - voter_list::constants::ConstantsApi - } - 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 - } - pub fn registrar(&self) -> registrar::constants::ConstantsApi { - registrar::constants::ConstantsApi - } - pub fn slots(&self) -> slots::constants::ConstantsApi { - slots::constants::ConstantsApi - } - pub fn auctions(&self) -> auctions::constants::ConstantsApi { - auctions::constants::ConstantsApi - } - pub fn crowdloan(&self) -> crowdloan::constants::ConstantsApi { - crowdloan::constants::ConstantsApi - } - } - pub struct StorageApi; - impl StorageApi { - pub fn system(&self) -> system::storage::StorageApi { - system::storage::StorageApi - } - pub fn scheduler(&self) -> scheduler::storage::StorageApi { - scheduler::storage::StorageApi - } - pub fn preimage(&self) -> preimage::storage::StorageApi { - preimage::storage::StorageApi - } - pub fn babe(&self) -> babe::storage::StorageApi { - babe::storage::StorageApi - } - pub fn timestamp(&self) -> timestamp::storage::StorageApi { - timestamp::storage::StorageApi - } - pub fn indices(&self) -> indices::storage::StorageApi { - indices::storage::StorageApi - } - pub fn balances(&self) -> balances::storage::StorageApi { - balances::storage::StorageApi - } - pub fn transaction_payment(&self) -> transaction_payment::storage::StorageApi { - transaction_payment::storage::StorageApi - } - pub fn authorship(&self) -> authorship::storage::StorageApi { - authorship::storage::StorageApi - } - pub fn staking(&self) -> staking::storage::StorageApi { - staking::storage::StorageApi - } - pub fn offences(&self) -> offences::storage::StorageApi { - offences::storage::StorageApi - } - pub fn session(&self) -> session::storage::StorageApi { - session::storage::StorageApi - } - pub fn grandpa(&self) -> grandpa::storage::StorageApi { - grandpa::storage::StorageApi - } - pub fn im_online(&self) -> im_online::storage::StorageApi { - im_online::storage::StorageApi - } - pub fn democracy(&self) -> democracy::storage::StorageApi { - democracy::storage::StorageApi - } - pub fn council(&self) -> council::storage::StorageApi { - council::storage::StorageApi - } - pub fn technical_committee(&self) -> technical_committee::storage::StorageApi { - technical_committee::storage::StorageApi - } - pub fn phragmen_election(&self) -> phragmen_election::storage::StorageApi { - phragmen_election::storage::StorageApi - } - pub fn technical_membership(&self) -> technical_membership::storage::StorageApi { - technical_membership::storage::StorageApi - } - 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 - } - pub fn vesting(&self) -> vesting::storage::StorageApi { - vesting::storage::StorageApi - } - pub fn identity(&self) -> identity::storage::StorageApi { - identity::storage::StorageApi - } - pub fn proxy(&self) -> proxy::storage::StorageApi { - proxy::storage::StorageApi - } - pub fn multisig(&self) -> multisig::storage::StorageApi { - multisig::storage::StorageApi - } - pub fn bounties(&self) -> bounties::storage::StorageApi { - bounties::storage::StorageApi - } - pub fn child_bounties(&self) -> child_bounties::storage::StorageApi { - child_bounties::storage::StorageApi - } - pub fn tips(&self) -> tips::storage::StorageApi { - tips::storage::StorageApi - } - pub fn election_provider_multi_phase( - &self, - ) -> election_provider_multi_phase::storage::StorageApi { - election_provider_multi_phase::storage::StorageApi - } - pub fn voter_list(&self) -> voter_list::storage::StorageApi { - voter_list::storage::StorageApi - } - pub fn nomination_pools(&self) -> nomination_pools::storage::StorageApi { - nomination_pools::storage::StorageApi - } - pub fn fast_unstake(&self) -> fast_unstake::storage::StorageApi { - fast_unstake::storage::StorageApi - } - pub fn configuration(&self) -> configuration::storage::StorageApi { - configuration::storage::StorageApi - } - pub fn paras_shared(&self) -> paras_shared::storage::StorageApi { - paras_shared::storage::StorageApi - } - pub fn para_inclusion(&self) -> para_inclusion::storage::StorageApi { - para_inclusion::storage::StorageApi - } - pub fn para_inherent(&self) -> para_inherent::storage::StorageApi { - para_inherent::storage::StorageApi - } - pub fn para_scheduler(&self) -> para_scheduler::storage::StorageApi { - para_scheduler::storage::StorageApi - } - pub fn paras(&self) -> paras::storage::StorageApi { - paras::storage::StorageApi - } - pub fn initializer(&self) -> initializer::storage::StorageApi { - initializer::storage::StorageApi - } - pub fn dmp(&self) -> dmp::storage::StorageApi { - dmp::storage::StorageApi - } - pub fn ump(&self) -> ump::storage::StorageApi { - ump::storage::StorageApi - } - pub fn hrmp(&self) -> hrmp::storage::StorageApi { - hrmp::storage::StorageApi - } - pub fn para_session_info(&self) -> para_session_info::storage::StorageApi { - para_session_info::storage::StorageApi - } - pub fn paras_disputes(&self) -> paras_disputes::storage::StorageApi { - paras_disputes::storage::StorageApi - } - pub fn registrar(&self) -> registrar::storage::StorageApi { - registrar::storage::StorageApi - } - pub fn slots(&self) -> slots::storage::StorageApi { - slots::storage::StorageApi - } - pub fn auctions(&self) -> auctions::storage::StorageApi { - auctions::storage::StorageApi - } - pub fn crowdloan(&self) -> crowdloan::storage::StorageApi { - crowdloan::storage::StorageApi - } - pub fn xcm_pallet(&self) -> xcm_pallet::storage::StorageApi { - xcm_pallet::storage::StorageApi - } - } - pub struct TransactionApi; - impl TransactionApi { - pub fn system(&self) -> system::calls::TransactionApi { - system::calls::TransactionApi - } - pub fn scheduler(&self) -> scheduler::calls::TransactionApi { - scheduler::calls::TransactionApi - } - pub fn preimage(&self) -> preimage::calls::TransactionApi { - preimage::calls::TransactionApi - } - pub fn babe(&self) -> babe::calls::TransactionApi { - babe::calls::TransactionApi - } - pub fn timestamp(&self) -> timestamp::calls::TransactionApi { - timestamp::calls::TransactionApi - } - pub fn indices(&self) -> indices::calls::TransactionApi { - indices::calls::TransactionApi - } - pub fn balances(&self) -> balances::calls::TransactionApi { - balances::calls::TransactionApi - } - pub fn staking(&self) -> staking::calls::TransactionApi { - staking::calls::TransactionApi - } - pub fn session(&self) -> session::calls::TransactionApi { - session::calls::TransactionApi - } - pub fn grandpa(&self) -> grandpa::calls::TransactionApi { - grandpa::calls::TransactionApi - } - pub fn im_online(&self) -> im_online::calls::TransactionApi { - im_online::calls::TransactionApi - } - pub fn democracy(&self) -> democracy::calls::TransactionApi { - democracy::calls::TransactionApi - } - pub fn council(&self) -> council::calls::TransactionApi { - council::calls::TransactionApi - } - pub fn technical_committee(&self) -> technical_committee::calls::TransactionApi { - technical_committee::calls::TransactionApi - } - pub fn phragmen_election(&self) -> phragmen_election::calls::TransactionApi { - phragmen_election::calls::TransactionApi - } - pub fn technical_membership(&self) -> technical_membership::calls::TransactionApi { - technical_membership::calls::TransactionApi - } - 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 - } - pub fn vesting(&self) -> vesting::calls::TransactionApi { - vesting::calls::TransactionApi - } - pub fn utility(&self) -> utility::calls::TransactionApi { - utility::calls::TransactionApi - } - pub fn identity(&self) -> identity::calls::TransactionApi { - identity::calls::TransactionApi - } - pub fn proxy(&self) -> proxy::calls::TransactionApi { - proxy::calls::TransactionApi - } - pub fn multisig(&self) -> multisig::calls::TransactionApi { - multisig::calls::TransactionApi - } - pub fn bounties(&self) -> bounties::calls::TransactionApi { - bounties::calls::TransactionApi - } - pub fn child_bounties(&self) -> child_bounties::calls::TransactionApi { - child_bounties::calls::TransactionApi - } - pub fn tips(&self) -> tips::calls::TransactionApi { - tips::calls::TransactionApi - } - pub fn election_provider_multi_phase( - &self, - ) -> election_provider_multi_phase::calls::TransactionApi { - election_provider_multi_phase::calls::TransactionApi - } - pub fn voter_list(&self) -> voter_list::calls::TransactionApi { - voter_list::calls::TransactionApi - } - pub fn nomination_pools(&self) -> nomination_pools::calls::TransactionApi { - nomination_pools::calls::TransactionApi - } - pub fn fast_unstake(&self) -> fast_unstake::calls::TransactionApi { - fast_unstake::calls::TransactionApi - } - pub fn configuration(&self) -> configuration::calls::TransactionApi { - configuration::calls::TransactionApi - } - pub fn paras_shared(&self) -> paras_shared::calls::TransactionApi { - paras_shared::calls::TransactionApi - } - pub fn para_inclusion(&self) -> para_inclusion::calls::TransactionApi { - para_inclusion::calls::TransactionApi - } - pub fn para_inherent(&self) -> para_inherent::calls::TransactionApi { - para_inherent::calls::TransactionApi - } - pub fn paras(&self) -> paras::calls::TransactionApi { - paras::calls::TransactionApi - } - pub fn initializer(&self) -> initializer::calls::TransactionApi { - initializer::calls::TransactionApi - } - pub fn dmp(&self) -> dmp::calls::TransactionApi { - dmp::calls::TransactionApi - } - pub fn ump(&self) -> ump::calls::TransactionApi { - ump::calls::TransactionApi - } - pub fn hrmp(&self) -> hrmp::calls::TransactionApi { - hrmp::calls::TransactionApi - } - pub fn paras_disputes(&self) -> paras_disputes::calls::TransactionApi { - paras_disputes::calls::TransactionApi - } - pub fn registrar(&self) -> registrar::calls::TransactionApi { - registrar::calls::TransactionApi - } - pub fn slots(&self) -> slots::calls::TransactionApi { - slots::calls::TransactionApi - } - pub fn auctions(&self) -> auctions::calls::TransactionApi { - auctions::calls::TransactionApi - } - pub fn crowdloan(&self) -> crowdloan::calls::TransactionApi { - crowdloan::calls::TransactionApi - } - pub fn xcm_pallet(&self) -> xcm_pallet::calls::TransactionApi { - xcm_pallet::calls::TransactionApi - } - } - #[doc = r" check whether the Client you are using is aligned with the statically generated codegen."] - pub fn validate_codegen>( - client: &C, - ) -> Result<(), ::subxt::error::MetadataError> { - let runtime_metadata_hash = client.metadata().metadata_hash(&PALLETS); - if runtime_metadata_hash - != [ - 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) - } else { - Ok(()) - } - } - pub mod system { - 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 :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (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 = "Make some on-chain remark."] - #[doc = ""] - #[doc = "## Complexity"] - #[doc = "- `O(1)`"] - pub fn remark( - &self, - remark: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "System", - "remark", - Remark { remark }, - [ - 101u8, 80u8, 195u8, 226u8, 224u8, 247u8, 60u8, 128u8, 3u8, 101u8, 51u8, - 147u8, 96u8, 126u8, 76u8, 230u8, 194u8, 227u8, 191u8, 73u8, 160u8, - 146u8, 87u8, 147u8, 243u8, 28u8, 228u8, 116u8, 224u8, 181u8, 129u8, - 160u8, - ], - ) - } - #[doc = "Set the number of pages in the WebAssembly environment's heap."] - pub fn set_heap_pages( - &self, - pages: ::core::primitive::u64, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "System", - "set_heap_pages", - SetHeapPages { pages }, - [ - 43u8, 103u8, 128u8, 49u8, 156u8, 136u8, 11u8, 204u8, 80u8, 6u8, 244u8, - 86u8, 171u8, 44u8, 140u8, 225u8, 142u8, 198u8, 43u8, 87u8, 26u8, 45u8, - 125u8, 222u8, 165u8, 254u8, 172u8, 158u8, 39u8, 178u8, 86u8, 87u8, - ], - ) - } - #[doc = "Set the new runtime code."] - #[doc = ""] - #[doc = "## Complexity"] - #[doc = "- `O(C + S)` where `C` length of `code` and `S` complexity of `can_set_code`"] - pub fn set_code( - &self, - code: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "System", - "set_code", - SetCode { code }, - [ - 27u8, 104u8, 244u8, 205u8, 188u8, 254u8, 121u8, 13u8, 106u8, 120u8, - 244u8, 108u8, 97u8, 84u8, 100u8, 68u8, 26u8, 69u8, 93u8, 128u8, 107u8, - 4u8, 3u8, 142u8, 13u8, 134u8, 196u8, 62u8, 113u8, 181u8, 14u8, 40u8, - ], - ) - } - #[doc = "Set the new runtime code without doing any checks of the given `code`."] - #[doc = ""] - #[doc = "## Complexity"] - #[doc = "- `O(C)` where `C` length of `code`"] - pub fn set_code_without_checks( - &self, - code: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "System", - "set_code_without_checks", - SetCodeWithoutChecks { code }, - [ - 102u8, 160u8, 125u8, 235u8, 30u8, 23u8, 45u8, 239u8, 112u8, 148u8, - 159u8, 158u8, 42u8, 93u8, 206u8, 94u8, 80u8, 250u8, 66u8, 195u8, 60u8, - 40u8, 142u8, 169u8, 183u8, 80u8, 80u8, 96u8, 3u8, 231u8, 99u8, 216u8, - ], - ) - } - #[doc = "Set some items of storage."] - pub fn set_storage( - &self, - items: ::std::vec::Vec<( - ::std::vec::Vec<::core::primitive::u8>, - ::std::vec::Vec<::core::primitive::u8>, - )>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "System", - "set_storage", - SetStorage { items }, - [ - 74u8, 43u8, 106u8, 255u8, 50u8, 151u8, 192u8, 155u8, 14u8, 90u8, 19u8, - 45u8, 165u8, 16u8, 235u8, 242u8, 21u8, 131u8, 33u8, 172u8, 119u8, 78u8, - 140u8, 10u8, 107u8, 202u8, 122u8, 235u8, 181u8, 191u8, 22u8, 116u8, - ], - ) - } - #[doc = "Kill some items from storage."] - pub fn kill_storage( - &self, - keys: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "System", - "kill_storage", - KillStorage { keys }, - [ - 174u8, 174u8, 13u8, 174u8, 75u8, 138u8, 128u8, 235u8, 222u8, 216u8, - 85u8, 18u8, 198u8, 1u8, 138u8, 70u8, 19u8, 108u8, 209u8, 41u8, 228u8, - 67u8, 130u8, 230u8, 160u8, 207u8, 11u8, 180u8, 139u8, 242u8, 41u8, - 15u8, - ], - ) - } - #[doc = "Kill all storage items with a key that starts with the given prefix."] - #[doc = ""] - #[doc = "**NOTE:** We rely on the Root origin to provide us the number of subkeys under"] - #[doc = "the prefix we are removing to accurately calculate the weight of this function."] - pub fn kill_prefix( - &self, - prefix: ::std::vec::Vec<::core::primitive::u8>, - subkeys: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "System", - "kill_prefix", - KillPrefix { prefix, subkeys }, - [ - 203u8, 116u8, 217u8, 42u8, 154u8, 215u8, 77u8, 217u8, 13u8, 22u8, - 193u8, 2u8, 128u8, 115u8, 179u8, 115u8, 187u8, 218u8, 129u8, 34u8, - 80u8, 4u8, 173u8, 120u8, 92u8, 35u8, 237u8, 112u8, 201u8, 207u8, 200u8, - 48u8, - ], - ) - } - #[doc = "Make some on-chain remark and emit event."] - pub fn remark_with_event( - &self, - remark: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "System", - "remark_with_event", - RemarkWithEvent { remark }, - [ - 123u8, 225u8, 180u8, 179u8, 144u8, 74u8, 27u8, 85u8, 101u8, 75u8, - 134u8, 44u8, 181u8, 25u8, 183u8, 158u8, 14u8, 213u8, 56u8, 225u8, - 136u8, 88u8, 26u8, 114u8, 178u8, 43u8, 176u8, 43u8, 240u8, 84u8, 116u8, - 46u8, - ], - ) - } - } - } - #[doc = "Event for the System pallet."] - pub type Event = runtime_types::frame_system::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 = "An extrinsic completed successfully."] - pub struct ExtrinsicSuccess { - pub dispatch_info: runtime_types::frame_support::dispatch::DispatchInfo, - } - impl ::subxt::events::StaticEvent for ExtrinsicSuccess { - const PALLET: &'static str = "System"; - const EVENT: &'static str = "ExtrinsicSuccess"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - 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 extrinsic failed."] - pub struct ExtrinsicFailed { - pub dispatch_error: runtime_types::sp_runtime::DispatchError, - pub dispatch_info: runtime_types::frame_support::dispatch::DispatchInfo, - } - impl ::subxt::events::StaticEvent for ExtrinsicFailed { - const PALLET: &'static str = "System"; - const EVENT: &'static str = "ExtrinsicFailed"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - 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 = "`:code` was updated."] - pub struct CodeUpdated; - impl ::subxt::events::StaticEvent for CodeUpdated { - const PALLET: &'static str = "System"; - const EVENT: &'static str = "CodeUpdated"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - 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 account was created."] - pub struct NewAccount { - pub account: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for NewAccount { - const PALLET: &'static str = "System"; - const EVENT: &'static str = "NewAccount"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - 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 reaped."] - pub struct KilledAccount { - pub account: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for KilledAccount { - const PALLET: &'static str = "System"; - const EVENT: &'static str = "KilledAccount"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - 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 = "On on-chain remark happened."] - pub struct Remarked { - pub sender: ::subxt::utils::AccountId32, - pub hash: ::subxt::utils::H256, - } - impl ::subxt::events::StaticEvent for Remarked { - const PALLET: &'static str = "System"; - const EVENT: &'static str = "Remarked"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " The full account information for a particular account ID."] - pub fn account( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::frame_system::AccountInfo< - ::core::primitive::u32, - runtime_types::pallet_balances::types::AccountData<::core::primitive::u128>, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "System", - "Account", - vec![::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - )], - [ - 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, - ], - ) - } - #[doc = " The full account information for a particular account ID."] - pub fn account_root( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::frame_system::AccountInfo< - ::core::primitive::u32, - runtime_types::pallet_balances::types::AccountData<::core::primitive::u128>, - >, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "System", - "Account", - Vec::new(), - [ - 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, - ], - ) - } - #[doc = " Total extrinsics count for the current block."] - pub fn extrinsic_count( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "System", - "ExtrinsicCount", - vec![], - [ - 223u8, 60u8, 201u8, 120u8, 36u8, 44u8, 180u8, 210u8, 242u8, 53u8, - 222u8, 154u8, 123u8, 176u8, 249u8, 8u8, 225u8, 28u8, 232u8, 4u8, 136u8, - 41u8, 151u8, 82u8, 189u8, 149u8, 49u8, 166u8, 139u8, 9u8, 163u8, 231u8, - ], - ) - } - #[doc = " The current weight for the block."] - pub fn block_weight( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::frame_support::dispatch::PerDispatchClass< - runtime_types::sp_weights::weight_v2::Weight, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "System", - "BlockWeight", - vec![], - [ - 120u8, 67u8, 71u8, 163u8, 36u8, 202u8, 52u8, 106u8, 143u8, 155u8, - 144u8, 87u8, 142u8, 241u8, 232u8, 183u8, 56u8, 235u8, 27u8, 237u8, - 20u8, 202u8, 33u8, 85u8, 189u8, 0u8, 28u8, 52u8, 198u8, 40u8, 219u8, - 54u8, - ], - ) - } - #[doc = " Total length (in bytes) for all extrinsics put together, for the current block."] - pub fn all_extrinsics_len( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "System", - "AllExtrinsicsLen", - vec![], - [ - 202u8, 145u8, 209u8, 225u8, 40u8, 220u8, 174u8, 74u8, 93u8, 164u8, - 254u8, 248u8, 254u8, 192u8, 32u8, 117u8, 96u8, 149u8, 53u8, 145u8, - 219u8, 64u8, 234u8, 18u8, 217u8, 200u8, 203u8, 141u8, 145u8, 28u8, - 134u8, 60u8, - ], - ) - } - #[doc = " Map of block numbers to block hashes."] - pub fn block_hash( - &self, - _0: 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::Yes, - > { - ::subxt::storage::address::Address::new_static( - "System", - "BlockHash", - vec![::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - )], - [ - 50u8, 112u8, 176u8, 239u8, 175u8, 18u8, 205u8, 20u8, 241u8, 195u8, - 21u8, 228u8, 186u8, 57u8, 200u8, 25u8, 38u8, 44u8, 106u8, 20u8, 168u8, - 80u8, 76u8, 235u8, 12u8, 51u8, 137u8, 149u8, 200u8, 4u8, 220u8, 237u8, - ], - ) - } - #[doc = " Map of block numbers to block hashes."] - pub fn block_hash_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( - "System", - "BlockHash", - Vec::new(), - [ - 50u8, 112u8, 176u8, 239u8, 175u8, 18u8, 205u8, 20u8, 241u8, 195u8, - 21u8, 228u8, 186u8, 57u8, 200u8, 25u8, 38u8, 44u8, 106u8, 20u8, 168u8, - 80u8, 76u8, 235u8, 12u8, 51u8, 137u8, 149u8, 200u8, 4u8, 220u8, 237u8, - ], - ) - } - #[doc = " Extrinsics data for the current block (maps an extrinsic's index to its data)."] - pub fn extrinsic_data( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec<::core::primitive::u8>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "System", - "ExtrinsicData", - vec![::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - )], - [ - 210u8, 224u8, 211u8, 186u8, 118u8, 210u8, 185u8, 194u8, 238u8, 211u8, - 254u8, 73u8, 67u8, 184u8, 31u8, 229u8, 168u8, 125u8, 98u8, 23u8, 241u8, - 59u8, 49u8, 86u8, 126u8, 9u8, 114u8, 163u8, 160u8, 62u8, 50u8, 67u8, - ], - ) - } - #[doc = " Extrinsics data for the current block (maps an extrinsic's index to its data)."] - pub fn extrinsic_data_root( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec<::core::primitive::u8>, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "System", - "ExtrinsicData", - Vec::new(), - [ - 210u8, 224u8, 211u8, 186u8, 118u8, 210u8, 185u8, 194u8, 238u8, 211u8, - 254u8, 73u8, 67u8, 184u8, 31u8, 229u8, 168u8, 125u8, 98u8, 23u8, 241u8, - 59u8, 49u8, 86u8, 126u8, 9u8, 114u8, 163u8, 160u8, 62u8, 50u8, 67u8, - ], - ) - } - #[doc = " The current block number being processed. Set by `execute_block`."] - pub fn number( - &self, - ) -> ::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( - "System", - "Number", - vec![], - [ - 228u8, 96u8, 102u8, 190u8, 252u8, 130u8, 239u8, 172u8, 126u8, 235u8, - 246u8, 139u8, 208u8, 15u8, 88u8, 245u8, 141u8, 232u8, 43u8, 204u8, - 36u8, 87u8, 211u8, 141u8, 187u8, 68u8, 236u8, 70u8, 193u8, 235u8, - 164u8, 191u8, - ], - ) - } - #[doc = " Hash of the previous block."] - pub fn parent_hash( - &self, - ) -> ::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( - "System", - "ParentHash", - vec![], - [ - 232u8, 206u8, 177u8, 119u8, 38u8, 57u8, 233u8, 50u8, 225u8, 49u8, - 169u8, 176u8, 210u8, 51u8, 231u8, 176u8, 234u8, 186u8, 188u8, 112u8, - 15u8, 152u8, 195u8, 232u8, 201u8, 97u8, 208u8, 249u8, 9u8, 163u8, 69u8, - 36u8, - ], - ) - } - #[doc = " Digest of the current block, also part of the block header."] - pub fn digest( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::sp_runtime::generic::digest::Digest, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "System", - "Digest", - vec![], - [ - 83u8, 141u8, 200u8, 132u8, 182u8, 55u8, 197u8, 122u8, 13u8, 159u8, - 31u8, 42u8, 60u8, 191u8, 89u8, 221u8, 242u8, 47u8, 199u8, 213u8, 48u8, - 216u8, 131u8, 168u8, 245u8, 82u8, 56u8, 190u8, 62u8, 69u8, 96u8, 37u8, - ], - ) - } - #[doc = " Events deposited for the current block."] - #[doc = ""] - #[doc = " NOTE: The item is unbound and should therefore never be read on chain."] - #[doc = " It could otherwise inflate the PoV size of a block."] - #[doc = ""] - #[doc = " Events have a large in-memory size. Box the events to not go out-of-memory"] - #[doc = " just in case someone still reads them from within the runtime."] - pub fn events( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec< - runtime_types::frame_system::EventRecord< - runtime_types::polkadot_runtime::RuntimeEvent, - ::subxt::utils::H256, - >, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "System", - "Events", - vec![], - [ - 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, - ], - ) - } - #[doc = " The number of events in the `Events` list."] - pub fn event_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( - "System", - "EventCount", - vec![], - [ - 236u8, 93u8, 90u8, 177u8, 250u8, 211u8, 138u8, 187u8, 26u8, 208u8, - 203u8, 113u8, 221u8, 233u8, 227u8, 9u8, 249u8, 25u8, 202u8, 185u8, - 161u8, 144u8, 167u8, 104u8, 127u8, 187u8, 38u8, 18u8, 52u8, 61u8, 66u8, - 112u8, - ], - ) - } - #[doc = " Mapping between a topic (represented by T::Hash) and a vector of indexes"] - #[doc = " of events in the `>` list."] - #[doc = ""] - #[doc = " All topic vectors have deterministic storage locations depending on the topic. This"] - #[doc = " allows light-clients to leverage the changes trie storage tracking mechanism and"] - #[doc = " in case of changes fetch the list of events of interest."] - #[doc = ""] - #[doc = " The value has the type `(T::BlockNumber, EventIndex)` because if we used only just"] - #[doc = " the `EventIndex` then in case if the topic has the same contents on the next block"] - #[doc = " no notification will be triggered thus the event might be lost."] - pub fn event_topics( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, - ) -> ::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::Yes, - > { - ::subxt::storage::address::Address::new_static( - "System", - "EventTopics", - vec![::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - )], - [ - 205u8, 90u8, 142u8, 190u8, 176u8, 37u8, 94u8, 82u8, 98u8, 1u8, 129u8, - 63u8, 246u8, 101u8, 130u8, 58u8, 216u8, 16u8, 139u8, 196u8, 154u8, - 111u8, 110u8, 178u8, 24u8, 44u8, 183u8, 176u8, 232u8, 82u8, 223u8, - 38u8, - ], - ) - } - #[doc = " Mapping between a topic (represented by T::Hash) and a vector of indexes"] - #[doc = " of events in the `>` list."] - #[doc = ""] - #[doc = " All topic vectors have deterministic storage locations depending on the topic. This"] - #[doc = " allows light-clients to leverage the changes trie storage tracking mechanism and"] - #[doc = " in case of changes fetch the list of events of interest."] - #[doc = ""] - #[doc = " The value has the type `(T::BlockNumber, EventIndex)` because if we used only just"] - #[doc = " the `EventIndex` then in case if the topic has the same contents on the next block"] - #[doc = " no notification will be triggered thus the event might be lost."] - pub fn event_topics_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::Yes, - > { - ::subxt::storage::address::Address::new_static( - "System", - "EventTopics", - Vec::new(), - [ - 205u8, 90u8, 142u8, 190u8, 176u8, 37u8, 94u8, 82u8, 98u8, 1u8, 129u8, - 63u8, 246u8, 101u8, 130u8, 58u8, 216u8, 16u8, 139u8, 196u8, 154u8, - 111u8, 110u8, 178u8, 24u8, 44u8, 183u8, 176u8, 232u8, 82u8, 223u8, - 38u8, - ], - ) - } - #[doc = " Stores the `spec_version` and `spec_name` of when the last runtime upgrade happened."] - pub fn last_runtime_upgrade( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::frame_system::LastRuntimeUpgradeInfo, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "System", - "LastRuntimeUpgrade", - vec![], - [ - 52u8, 37u8, 117u8, 111u8, 57u8, 130u8, 196u8, 14u8, 99u8, 77u8, 91u8, - 126u8, 178u8, 249u8, 78u8, 34u8, 9u8, 194u8, 92u8, 105u8, 113u8, 81u8, - 185u8, 127u8, 245u8, 184u8, 60u8, 29u8, 234u8, 182u8, 96u8, 196u8, - ], - ) - } - #[doc = " True if we have upgraded so that `type RefCount` is `u32`. False (default) if not."] - pub fn upgraded_to_u32_ref_count( - &self, - ) -> ::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( - "System", - "UpgradedToU32RefCount", - vec![], - [ - 171u8, 88u8, 244u8, 92u8, 122u8, 67u8, 27u8, 18u8, 59u8, 175u8, 175u8, - 178u8, 20u8, 150u8, 213u8, 59u8, 222u8, 141u8, 32u8, 107u8, 3u8, 114u8, - 83u8, 250u8, 180u8, 233u8, 152u8, 54u8, 187u8, 99u8, 131u8, 204u8, - ], - ) - } - #[doc = " True if we have upgraded so that AccountInfo contains three types of `RefCount`. False"] - #[doc = " (default) if not."] - pub fn upgraded_to_triple_ref_count( - &self, - ) -> ::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( - "System", - "UpgradedToTripleRefCount", - vec![], - [ - 90u8, 33u8, 56u8, 86u8, 90u8, 101u8, 89u8, 133u8, 203u8, 56u8, 201u8, - 210u8, 244u8, 232u8, 150u8, 18u8, 51u8, 105u8, 14u8, 230u8, 103u8, - 155u8, 246u8, 99u8, 53u8, 207u8, 225u8, 128u8, 186u8, 76u8, 40u8, - 185u8, - ], - ) - } - #[doc = " The execution phase of the block."] - pub fn execution_phase( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::frame_system::Phase, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "System", - "ExecutionPhase", - vec![], - [ - 230u8, 183u8, 221u8, 135u8, 226u8, 223u8, 55u8, 104u8, 138u8, 224u8, - 103u8, 156u8, 222u8, 99u8, 203u8, 199u8, 164u8, 168u8, 193u8, 133u8, - 201u8, 155u8, 63u8, 95u8, 17u8, 206u8, 165u8, 123u8, 161u8, 33u8, - 172u8, 93u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " Block & extrinsics weights: base values and limits."] - pub fn block_weights( - &self, - ) -> ::subxt::constants::Address - { - ::subxt::constants::Address::new_static( - "System", - "BlockWeights", - [ - 118u8, 253u8, 239u8, 217u8, 145u8, 115u8, 85u8, 86u8, 172u8, 248u8, - 139u8, 32u8, 158u8, 126u8, 172u8, 188u8, 197u8, 105u8, 145u8, 235u8, - 171u8, 50u8, 31u8, 225u8, 167u8, 187u8, 241u8, 87u8, 6u8, 17u8, 234u8, - 185u8, - ], - ) - } - #[doc = " The maximum length of a block (in bytes)."] - pub fn block_length( - &self, - ) -> ::subxt::constants::Address - { - ::subxt::constants::Address::new_static( - "System", - "BlockLength", - [ - 116u8, 184u8, 225u8, 228u8, 207u8, 203u8, 4u8, 220u8, 234u8, 198u8, - 150u8, 108u8, 205u8, 87u8, 194u8, 131u8, 229u8, 51u8, 140u8, 4u8, 47u8, - 12u8, 200u8, 144u8, 153u8, 62u8, 51u8, 39u8, 138u8, 205u8, 203u8, - 236u8, - ], - ) - } - #[doc = " Maximum number of block number to block hash mappings to keep (oldest pruned first)."] - pub fn block_hash_count( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "System", - "BlockHashCount", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, - ], - ) - } - #[doc = " The weight of runtime database operations the runtime can invoke."] - pub fn db_weight( - &self, - ) -> ::subxt::constants::Address - { - ::subxt::constants::Address::new_static( - "System", - "DbWeight", - [ - 124u8, 162u8, 190u8, 149u8, 49u8, 177u8, 162u8, 231u8, 62u8, 167u8, - 199u8, 181u8, 43u8, 232u8, 185u8, 116u8, 195u8, 51u8, 233u8, 223u8, - 20u8, 129u8, 246u8, 13u8, 65u8, 180u8, 64u8, 9u8, 157u8, 59u8, 245u8, - 118u8, - ], - ) - } - #[doc = " Get the chain's current version."] - pub fn version( - &self, - ) -> ::subxt::constants::Address - { - ::subxt::constants::Address::new_static( - "System", - "Version", - [ - 93u8, 98u8, 57u8, 243u8, 229u8, 8u8, 234u8, 231u8, 72u8, 230u8, 139u8, - 47u8, 63u8, 181u8, 17u8, 2u8, 220u8, 231u8, 104u8, 237u8, 185u8, 143u8, - 165u8, 253u8, 188u8, 76u8, 147u8, 12u8, 170u8, 26u8, 74u8, 200u8, - ], - ) - } - #[doc = " The designated SS58 prefix of this chain."] - #[doc = ""] - #[doc = " This replaces the \"ss58Format\" property declared in the chain spec. Reason is"] - #[doc = " that the runtime should know about the prefix in order to make use of it as"] - #[doc = " an identifier of the chain."] - pub fn ss58_prefix(&self) -> ::subxt::constants::Address<::core::primitive::u16> { - ::subxt::constants::Address::new_static( - "System", - "SS58Prefix", - [ - 116u8, 33u8, 2u8, 170u8, 181u8, 147u8, 171u8, 169u8, 167u8, 227u8, - 41u8, 144u8, 11u8, 236u8, 82u8, 100u8, 74u8, 60u8, 184u8, 72u8, 169u8, - 90u8, 208u8, 135u8, 15u8, 117u8, 10u8, 123u8, 128u8, 193u8, 29u8, 70u8, - ], - ) - } - } - } - } - pub mod scheduler { - use super::root_mod; - 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 :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (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 { - #[doc = "Anonymously schedule a task."] - pub fn schedule( - &self, - when: ::core::primitive::u32, - maybe_periodic: ::core::option::Option<( - ::core::primitive::u32, - ::core::primitive::u32, - )>, - priority: ::core::primitive::u8, - call: runtime_types::polkadot_runtime::RuntimeCall, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Scheduler", - "schedule", - Schedule { - when, - maybe_periodic, - priority, - call: ::std::boxed::Box::new(call), - }, - [ - 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, - ], - ) - } - #[doc = "Cancel an anonymously scheduled task."] - pub fn cancel( - &self, - when: ::core::primitive::u32, - index: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Scheduler", - "cancel", - Cancel { when, index }, - [ - 81u8, 251u8, 234u8, 17u8, 214u8, 75u8, 19u8, 59u8, 19u8, 30u8, 89u8, - 74u8, 6u8, 216u8, 238u8, 165u8, 7u8, 19u8, 153u8, 253u8, 161u8, 103u8, - 178u8, 227u8, 152u8, 180u8, 80u8, 156u8, 82u8, 126u8, 132u8, 120u8, - ], - ) - } - #[doc = "Schedule a named task."] - pub fn schedule_named( - &self, - id: [::core::primitive::u8; 32usize], - when: ::core::primitive::u32, - maybe_periodic: ::core::option::Option<( - ::core::primitive::u32, - ::core::primitive::u32, - )>, - priority: ::core::primitive::u8, - call: runtime_types::polkadot_runtime::RuntimeCall, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Scheduler", - "schedule_named", - ScheduleNamed { - id, - when, - maybe_periodic, - priority, - call: ::std::boxed::Box::new(call), - }, - [ - 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, - ], - ) - } - #[doc = "Cancel a named scheduled task."] - pub fn cancel_named( - &self, - id: [::core::primitive::u8; 32usize], - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Scheduler", - "cancel_named", - CancelNamed { id }, - [ - 51u8, 3u8, 140u8, 50u8, 214u8, 211u8, 50u8, 4u8, 19u8, 43u8, 230u8, - 114u8, 18u8, 108u8, 138u8, 67u8, 99u8, 24u8, 255u8, 11u8, 246u8, 37u8, - 192u8, 207u8, 90u8, 157u8, 171u8, 93u8, 233u8, 189u8, 64u8, 180u8, - ], - ) - } - #[doc = "Anonymously schedule a task after a delay."] - pub fn schedule_after( - &self, - after: ::core::primitive::u32, - maybe_periodic: ::core::option::Option<( - ::core::primitive::u32, - ::core::primitive::u32, - )>, - priority: ::core::primitive::u8, - call: runtime_types::polkadot_runtime::RuntimeCall, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Scheduler", - "schedule_after", - ScheduleAfter { - after, - maybe_periodic, - priority, - call: ::std::boxed::Box::new(call), - }, - [ - 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."] - pub fn schedule_named_after( - &self, - id: [::core::primitive::u8; 32usize], - after: ::core::primitive::u32, - maybe_periodic: ::core::option::Option<( - ::core::primitive::u32, - ::core::primitive::u32, - )>, - priority: ::core::primitive::u8, - call: runtime_types::polkadot_runtime::RuntimeCall, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Scheduler", - "schedule_named_after", - ScheduleNamedAfter { - id, - after, - maybe_periodic, - priority, - call: ::std::boxed::Box::new(call), - }, - [ - 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, - ], - ) - } - } - } - #[doc = "Events type."] - pub type Event = runtime_types::pallet_scheduler::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 = "Scheduled some task."] - pub struct Scheduled { - pub when: ::core::primitive::u32, - pub index: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for Scheduled { - const PALLET: &'static str = "Scheduler"; - const EVENT: &'static str = "Scheduled"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - 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 = "Canceled some task."] - pub struct Canceled { - pub when: ::core::primitive::u32, - pub index: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for Canceled { - const PALLET: &'static str = "Scheduler"; - const EVENT: &'static str = "Canceled"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - 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 = "Dispatched some task."] - pub struct Dispatched { - pub task: (::core::primitive::u32, ::core::primitive::u32), - pub id: ::core::option::Option<[::core::primitive::u8; 32usize]>, - pub result: ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - } - impl ::subxt::events::StaticEvent for Dispatched { - const PALLET: &'static str = "Scheduler"; - const EVENT: &'static str = "Dispatched"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - 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 call for the provided hash was not found so the task has been aborted."] - pub struct CallUnavailable { - pub task: (::core::primitive::u32, ::core::primitive::u32), - pub id: ::core::option::Option<[::core::primitive::u8; 32usize]>, - } - impl ::subxt::events::StaticEvent for CallUnavailable { - const PALLET: &'static str = "Scheduler"; - const EVENT: &'static str = "CallUnavailable"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - 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 task was unable to be renewed since the agenda is full at that block."] - pub struct PeriodicFailed { - pub task: (::core::primitive::u32, ::core::primitive::u32), - pub id: ::core::option::Option<[::core::primitive::u8; 32usize]>, - } - impl ::subxt::events::StaticEvent for PeriodicFailed { - const PALLET: &'static str = "Scheduler"; - const EVENT: &'static str = "PeriodicFailed"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - 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 task can never be executed since it is overweight."] - pub struct PermanentlyOverweight { - pub task: (::core::primitive::u32, ::core::primitive::u32), - pub id: ::core::option::Option<[::core::primitive::u8; 32usize]>, - } - impl ::subxt::events::StaticEvent for PermanentlyOverweight { - const PALLET: &'static str = "Scheduler"; - const EVENT: &'static str = "PermanentlyOverweight"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - pub fn incomplete_since( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "Scheduler", - "IncompleteSince", - vec![], - [ - 149u8, 66u8, 239u8, 67u8, 235u8, 219u8, 101u8, 182u8, 145u8, 56u8, - 252u8, 150u8, 253u8, 221u8, 125u8, 57u8, 38u8, 152u8, 153u8, 31u8, - 92u8, 238u8, 66u8, 246u8, 104u8, 163u8, 94u8, 73u8, 222u8, 168u8, - 193u8, 227u8, - ], - ) - } - #[doc = " Items to be executed, indexed by the block number that they should be executed on."] - pub fn agenda( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::bounded_collections::bounded_vec::BoundedVec< - ::core::option::Option< - runtime_types::pallet_scheduler::Scheduled< - [::core::primitive::u8; 32usize], - runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::polkadot_runtime::RuntimeCall, - >, - ::core::primitive::u32, - runtime_types::polkadot_runtime::OriginCaller, - ::subxt::utils::AccountId32, - >, - >, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Scheduler", - "Agenda", - vec![::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - )], - [ - 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, - ], - ) - } - #[doc = " Items to be executed, indexed by the block number that they should be executed on."] - pub fn agenda_root( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::bounded_collections::bounded_vec::BoundedVec< - ::core::option::Option< - runtime_types::pallet_scheduler::Scheduled< - [::core::primitive::u8; 32usize], - runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::polkadot_runtime::RuntimeCall, - >, - ::core::primitive::u32, - runtime_types::polkadot_runtime::OriginCaller, - ::subxt::utils::AccountId32, - >, - >, - >, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Scheduler", - "Agenda", - Vec::new(), - [ - 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, - ], - ) - } - #[doc = " Lookup from a name to the block number and index of the task."] - #[doc = ""] - #[doc = " For v3 -> v4 the previously unbounded identities are Blake2-256 hashed to form the v4"] - #[doc = " identities."] - pub fn lookup( - &self, - _0: impl ::std::borrow::Borrow<[::core::primitive::u8; 32usize]>, - ) -> ::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( - "Scheduler", - "Lookup", - vec![::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - )], - [ - 82u8, 20u8, 178u8, 101u8, 108u8, 198u8, 71u8, 99u8, 16u8, 175u8, 15u8, - 187u8, 229u8, 243u8, 140u8, 200u8, 99u8, 77u8, 248u8, 178u8, 45u8, - 121u8, 193u8, 67u8, 165u8, 43u8, 234u8, 211u8, 158u8, 250u8, 103u8, - 243u8, - ], - ) - } - #[doc = " Lookup from a name to the block number and index of the task."] - #[doc = ""] - #[doc = " For v3 -> v4 the previously unbounded identities are Blake2-256 hashed to form the v4"] - #[doc = " identities."] - pub fn lookup_root( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - (::core::primitive::u32, ::core::primitive::u32), - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Scheduler", - "Lookup", - Vec::new(), - [ - 82u8, 20u8, 178u8, 101u8, 108u8, 198u8, 71u8, 99u8, 16u8, 175u8, 15u8, - 187u8, 229u8, 243u8, 140u8, 200u8, 99u8, 77u8, 248u8, 178u8, 45u8, - 121u8, 193u8, 67u8, 165u8, 43u8, 234u8, 211u8, 158u8, 250u8, 103u8, - 243u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " The maximum weight that may be scheduled per block for any dispatchables."] - pub fn maximum_weight( - &self, - ) -> ::subxt::constants::Address - { - ::subxt::constants::Address::new_static( - "Scheduler", - "MaximumWeight", - [ - 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 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> { - ::subxt::constants::Address::new_static( - "Scheduler", - "MaxScheduledPerBlock", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, - ], - ) - } - } - } - } - pub mod preimage { - use super::root_mod; - 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 :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (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 { - #[doc = "Register a preimage on-chain."] - #[doc = ""] - #[doc = "If the preimage was previously requested, no fees or deposits are taken for providing"] - #[doc = "the preimage. Otherwise, a deposit is taken proportional to the size of the preimage."] - pub fn note_preimage( - &self, - bytes: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Preimage", - "note_preimage", - NotePreimage { bytes }, - [ - 77u8, 48u8, 104u8, 3u8, 254u8, 65u8, 106u8, 95u8, 204u8, 89u8, 149u8, - 29u8, 144u8, 188u8, 99u8, 23u8, 146u8, 142u8, 35u8, 17u8, 125u8, 130u8, - 31u8, 206u8, 106u8, 83u8, 163u8, 192u8, 81u8, 23u8, 232u8, 230u8, - ], - ) - } - #[doc = "Clear an unrequested preimage from the runtime storage."] - #[doc = ""] - #[doc = "If `len` is provided, then it will be a much cheaper operation."] - #[doc = ""] - #[doc = "- `hash`: The hash of the preimage to be removed from the store."] - #[doc = "- `len`: The length of the preimage of `hash`."] - pub fn unnote_preimage( - &self, - hash: ::subxt::utils::H256, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Preimage", - "unnote_preimage", - UnnotePreimage { hash }, - [ - 211u8, 204u8, 205u8, 58u8, 33u8, 179u8, 68u8, 74u8, 149u8, 138u8, - 213u8, 45u8, 140u8, 27u8, 106u8, 81u8, 68u8, 212u8, 147u8, 116u8, 27u8, - 130u8, 84u8, 34u8, 231u8, 197u8, 135u8, 8u8, 19u8, 242u8, 207u8, 17u8, - ], - ) - } - #[doc = "Request a preimage be uploaded to the chain without paying any fees or deposits."] - #[doc = ""] - #[doc = "If the preimage requests has already been provided on-chain, we unreserve any deposit"] - #[doc = "a user may have paid, and take the control of the preimage out of their hands."] - pub fn request_preimage( - &self, - hash: ::subxt::utils::H256, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Preimage", - "request_preimage", - RequestPreimage { hash }, - [ - 195u8, 26u8, 146u8, 255u8, 79u8, 43u8, 73u8, 60u8, 115u8, 78u8, 99u8, - 197u8, 137u8, 95u8, 139u8, 141u8, 79u8, 213u8, 170u8, 169u8, 127u8, - 30u8, 236u8, 65u8, 38u8, 16u8, 118u8, 228u8, 141u8, 83u8, 162u8, 233u8, - ], - ) - } - #[doc = "Clear a previously made request for a preimage."] - #[doc = ""] - #[doc = "NOTE: THIS MUST NOT BE CALLED ON `hash` MORE TIMES THAN `request_preimage`."] - pub fn unrequest_preimage( - &self, - hash: ::subxt::utils::H256, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Preimage", - "unrequest_preimage", - UnrequestPreimage { hash }, - [ - 143u8, 225u8, 239u8, 44u8, 237u8, 83u8, 18u8, 105u8, 101u8, 68u8, - 111u8, 116u8, 66u8, 212u8, 63u8, 190u8, 38u8, 32u8, 105u8, 152u8, 69u8, - 177u8, 193u8, 15u8, 60u8, 26u8, 95u8, 130u8, 11u8, 113u8, 187u8, 108u8, - ], - ) - } - } - } - #[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_preimage::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 preimage has been noted."] - pub struct Noted { - pub hash: ::subxt::utils::H256, - } - impl ::subxt::events::StaticEvent for Noted { - const PALLET: &'static str = "Preimage"; - const EVENT: &'static str = "Noted"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - 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 preimage has been requested."] - pub struct Requested { - pub hash: ::subxt::utils::H256, - } - impl ::subxt::events::StaticEvent for Requested { - const PALLET: &'static str = "Preimage"; - const EVENT: &'static str = "Requested"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - 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 preimage has ben cleared."] - pub struct Cleared { - pub hash: ::subxt::utils::H256, - } - impl ::subxt::events::StaticEvent for Cleared { - const PALLET: &'static str = "Preimage"; - const EVENT: &'static str = "Cleared"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " The request status of a given hash."] - pub fn status_for( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_preimage::RequestStatus< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - >, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Preimage", - "StatusFor", - vec![::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - )], - [ - 103u8, 208u8, 88u8, 167u8, 244u8, 198u8, 129u8, 134u8, 182u8, 80u8, - 71u8, 192u8, 73u8, 92u8, 190u8, 15u8, 20u8, 132u8, 37u8, 108u8, 88u8, - 233u8, 18u8, 145u8, 9u8, 235u8, 5u8, 132u8, 42u8, 17u8, 227u8, 56u8, - ], - ) - } - #[doc = " The request status of a given hash."] - pub fn status_for_root( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_preimage::RequestStatus< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Preimage", - "StatusFor", - Vec::new(), - [ - 103u8, 208u8, 88u8, 167u8, 244u8, 198u8, 129u8, 134u8, 182u8, 80u8, - 71u8, 192u8, 73u8, 92u8, 190u8, 15u8, 20u8, 132u8, 37u8, 108u8, 88u8, - 233u8, 18u8, 145u8, 9u8, 235u8, 5u8, 132u8, 42u8, 17u8, 227u8, 56u8, - ], - ) - } - pub fn preimage_for( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, - _1: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::bounded_collections::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Preimage", - "PreimageFor", - vec![ - ::subxt::storage::address::make_static_storage_map_key(_0.borrow()), - ::subxt::storage::address::make_static_storage_map_key(_1.borrow()), - ], - [ - 96u8, 74u8, 30u8, 112u8, 120u8, 41u8, 52u8, 187u8, 252u8, 68u8, 42u8, - 5u8, 61u8, 228u8, 250u8, 192u8, 224u8, 61u8, 53u8, 222u8, 95u8, 148u8, - 6u8, 53u8, 43u8, 152u8, 88u8, 58u8, 185u8, 234u8, 131u8, 124u8, - ], - ) - } - pub fn preimage_for_root( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::bounded_collections::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Preimage", - "PreimageFor", - Vec::new(), - [ - 96u8, 74u8, 30u8, 112u8, 120u8, 41u8, 52u8, 187u8, 252u8, 68u8, 42u8, - 5u8, 61u8, 228u8, 250u8, 192u8, 224u8, 61u8, 53u8, 222u8, 95u8, 148u8, - 6u8, 53u8, 43u8, 152u8, 88u8, 58u8, 185u8, 234u8, 131u8, 124u8, - ], - ) - } - } - } - } - pub mod babe { - 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 :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (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, - >, - >, - 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, - >, - >, - 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 { - #[doc = "Report authority equivocation/misbehavior. This method will verify"] - #[doc = "the equivocation proof and validate the given key ownership proof"] - #[doc = "against the extracted offender. If both are valid, the offence will"] - #[doc = "be reported."] - pub fn report_equivocation( - &self, - equivocation_proof: runtime_types::sp_consensus_slots::EquivocationProof< - runtime_types::sp_runtime::generic::header::Header< - ::core::primitive::u32, - runtime_types::sp_runtime::traits::BlakeTwo256, - >, - runtime_types::sp_consensus_babe::app::Public, - >, - key_owner_proof: runtime_types::sp_session::MembershipProof, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Babe", - "report_equivocation", - ReportEquivocation { - equivocation_proof: ::std::boxed::Box::new(equivocation_proof), - key_owner_proof, - }, - [ - 177u8, 237u8, 107u8, 138u8, 237u8, 233u8, 30u8, 195u8, 112u8, 176u8, - 185u8, 113u8, 157u8, 221u8, 134u8, 151u8, 62u8, 151u8, 64u8, 164u8, - 254u8, 112u8, 2u8, 94u8, 175u8, 79u8, 160u8, 3u8, 72u8, 145u8, 244u8, - 137u8, - ], - ) - } - #[doc = "Report authority equivocation/misbehavior. This method will verify"] - #[doc = "the equivocation proof and validate the given key ownership proof"] - #[doc = "against the extracted offender. If both are valid, the offence will"] - #[doc = "be reported."] - #[doc = "This extrinsic must be called unsigned and it is expected that only"] - #[doc = "block authors will call it (validated in `ValidateUnsigned`), as such"] - #[doc = "if the block author is defined it will be defined as the equivocation"] - #[doc = "reporter."] - pub fn report_equivocation_unsigned( - &self, - equivocation_proof: runtime_types::sp_consensus_slots::EquivocationProof< - runtime_types::sp_runtime::generic::header::Header< - ::core::primitive::u32, - runtime_types::sp_runtime::traits::BlakeTwo256, - >, - runtime_types::sp_consensus_babe::app::Public, - >, - key_owner_proof: runtime_types::sp_session::MembershipProof, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Babe", - "report_equivocation_unsigned", - ReportEquivocationUnsigned { - equivocation_proof: ::std::boxed::Box::new(equivocation_proof), - key_owner_proof, - }, - [ - 56u8, 103u8, 238u8, 118u8, 61u8, 192u8, 222u8, 87u8, 254u8, 24u8, - 138u8, 219u8, 210u8, 85u8, 201u8, 147u8, 128u8, 49u8, 199u8, 144u8, - 46u8, 158u8, 163u8, 31u8, 101u8, 224u8, 72u8, 98u8, 68u8, 120u8, 215u8, - 19u8, - ], - ) - } - #[doc = "Plan an epoch config change. The epoch config change is recorded and will be enacted on"] - #[doc = "the next call to `enact_epoch_change`. The config will be activated one epoch after."] - #[doc = "Multiple calls to this method will replace any existing planned config change that had"] - #[doc = "not been enacted yet."] - pub fn plan_config_change( - &self, - config: runtime_types::sp_consensus_babe::digests::NextConfigDescriptor, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Babe", - "plan_config_change", - PlanConfigChange { config }, - [ - 229u8, 157u8, 41u8, 58u8, 56u8, 4u8, 52u8, 107u8, 104u8, 20u8, 42u8, - 110u8, 1u8, 17u8, 45u8, 196u8, 30u8, 135u8, 63u8, 46u8, 40u8, 137u8, - 209u8, 37u8, 24u8, 108u8, 251u8, 189u8, 77u8, 208u8, 74u8, 32u8, - ], - ) - } - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " Current epoch index."] - pub fn epoch_index( - &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( - "Babe", - "EpochIndex", - vec![], - [ - 51u8, 27u8, 91u8, 156u8, 118u8, 99u8, 46u8, 219u8, 190u8, 147u8, 205u8, - 23u8, 106u8, 169u8, 121u8, 218u8, 208u8, 235u8, 135u8, 127u8, 243u8, - 41u8, 55u8, 243u8, 235u8, 122u8, 57u8, 86u8, 37u8, 90u8, 208u8, 71u8, - ], - ) - } - #[doc = " Current epoch authorities."] - pub fn authorities( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec<( - runtime_types::sp_consensus_babe::app::Public, - ::core::primitive::u64, - )>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Babe", - "Authorities", - vec![], - [ - 61u8, 8u8, 133u8, 111u8, 169u8, 120u8, 0u8, 213u8, 31u8, 159u8, 204u8, - 212u8, 18u8, 205u8, 93u8, 84u8, 140u8, 108u8, 136u8, 209u8, 234u8, - 107u8, 145u8, 9u8, 204u8, 224u8, 105u8, 9u8, 238u8, 241u8, 65u8, 30u8, - ], - ) - } - #[doc = " The slot at which the first epoch actually started. This is 0"] - #[doc = " until the first block of the chain."] - pub fn genesis_slot( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::sp_consensus_slots::Slot, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Babe", - "GenesisSlot", - vec![], - [ - 234u8, 127u8, 243u8, 100u8, 124u8, 160u8, 66u8, 248u8, 48u8, 218u8, - 61u8, 52u8, 54u8, 142u8, 158u8, 77u8, 32u8, 63u8, 156u8, 39u8, 94u8, - 255u8, 192u8, 238u8, 170u8, 118u8, 58u8, 42u8, 199u8, 61u8, 199u8, - 77u8, - ], - ) - } - #[doc = " Current slot number."] - pub fn current_slot( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::sp_consensus_slots::Slot, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Babe", - "CurrentSlot", - vec![], - [ - 139u8, 237u8, 185u8, 137u8, 251u8, 179u8, 69u8, 167u8, 133u8, 168u8, - 204u8, 64u8, 178u8, 123u8, 92u8, 250u8, 119u8, 190u8, 208u8, 178u8, - 208u8, 176u8, 124u8, 187u8, 74u8, 165u8, 33u8, 78u8, 161u8, 206u8, 8u8, - 108u8, - ], - ) - } - #[doc = " The epoch randomness for the *current* epoch."] - #[doc = ""] - #[doc = " # Security"] - #[doc = ""] - #[doc = " This MUST NOT be used for gambling, as it can be influenced by a"] - #[doc = " malicious validator in the short term. It MAY be used in many"] - #[doc = " cryptographic protocols, however, so long as one remembers that this"] - #[doc = " (like everything else on-chain) it is public. For example, it can be"] - #[doc = " used where a number is needed that cannot have been chosen by an"] - #[doc = " adversary, for purposes such as public-coin zero-knowledge proofs."] - pub fn randomness( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - [::core::primitive::u8; 32usize], - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Babe", - "Randomness", - vec![], - [ - 191u8, 197u8, 25u8, 164u8, 104u8, 248u8, 247u8, 193u8, 244u8, 60u8, - 181u8, 195u8, 248u8, 90u8, 41u8, 199u8, 82u8, 123u8, 72u8, 126u8, 18u8, - 17u8, 128u8, 215u8, 34u8, 251u8, 227u8, 70u8, 166u8, 10u8, 104u8, - 140u8, - ], - ) - } - #[doc = " Pending epoch configuration change that will be applied when the next epoch is enacted."] - pub fn pending_epoch_config_change( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::sp_consensus_babe::digests::NextConfigDescriptor, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "Babe", - "PendingEpochConfigChange", - vec![], - [ - 4u8, 201u8, 0u8, 204u8, 47u8, 246u8, 4u8, 185u8, 163u8, 242u8, 242u8, - 152u8, 29u8, 222u8, 71u8, 127u8, 49u8, 203u8, 206u8, 180u8, 244u8, - 50u8, 80u8, 49u8, 199u8, 97u8, 3u8, 170u8, 156u8, 139u8, 106u8, 113u8, - ], - ) - } - #[doc = " Next epoch randomness."] - pub fn next_randomness( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - [::core::primitive::u8; 32usize], - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Babe", - "NextRandomness", - vec![], - [ - 185u8, 98u8, 45u8, 109u8, 253u8, 38u8, 238u8, 221u8, 240u8, 29u8, 38u8, - 107u8, 118u8, 117u8, 131u8, 115u8, 21u8, 255u8, 203u8, 81u8, 243u8, - 251u8, 91u8, 60u8, 163u8, 202u8, 125u8, 193u8, 173u8, 234u8, 166u8, - 92u8, - ], - ) - } - #[doc = " Next epoch authorities."] - pub fn next_authorities( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec<( - runtime_types::sp_consensus_babe::app::Public, - ::core::primitive::u64, - )>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Babe", - "NextAuthorities", - vec![], - [ - 201u8, 193u8, 164u8, 18u8, 155u8, 253u8, 124u8, 163u8, 143u8, 73u8, - 212u8, 20u8, 241u8, 108u8, 110u8, 5u8, 171u8, 66u8, 224u8, 208u8, 10u8, - 65u8, 148u8, 164u8, 1u8, 12u8, 216u8, 83u8, 20u8, 226u8, 254u8, 183u8, - ], - ) - } - #[doc = " Randomness under construction."] - #[doc = ""] - #[doc = " We make a trade-off between storage accesses and list length."] - #[doc = " We store the under-construction randomness in segments of up to"] - #[doc = " `UNDER_CONSTRUCTION_SEGMENT_LENGTH`."] - #[doc = ""] - #[doc = " Once a segment reaches this length, we begin the next one."] - #[doc = " We reset all segments and return to `0` at the beginning of every"] - #[doc = " epoch."] - pub fn segment_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( - "Babe", - "SegmentIndex", - vec![], - [ - 128u8, 45u8, 87u8, 58u8, 174u8, 152u8, 241u8, 156u8, 56u8, 192u8, 19u8, - 45u8, 75u8, 160u8, 35u8, 253u8, 145u8, 11u8, 178u8, 81u8, 114u8, 117u8, - 112u8, 107u8, 163u8, 208u8, 240u8, 151u8, 102u8, 176u8, 246u8, 5u8, - ], - ) - } - #[doc = " TWOX-NOTE: `SegmentIndex` is an increasing integer, so this is okay."] - pub fn under_construction( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::bounded_collections::bounded_vec::BoundedVec< - [::core::primitive::u8; 32usize], - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Babe", - "UnderConstruction", - vec![::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - )], - [ - 180u8, 4u8, 149u8, 245u8, 231u8, 92u8, 99u8, 170u8, 254u8, 172u8, - 182u8, 3u8, 152u8, 156u8, 132u8, 196u8, 140u8, 97u8, 7u8, 84u8, 220u8, - 89u8, 195u8, 177u8, 235u8, 51u8, 98u8, 144u8, 73u8, 238u8, 59u8, 164u8, - ], - ) - } - #[doc = " TWOX-NOTE: `SegmentIndex` is an increasing integer, so this is okay."] - pub fn under_construction_root( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::bounded_collections::bounded_vec::BoundedVec< - [::core::primitive::u8; 32usize], - >, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Babe", - "UnderConstruction", - Vec::new(), - [ - 180u8, 4u8, 149u8, 245u8, 231u8, 92u8, 99u8, 170u8, 254u8, 172u8, - 182u8, 3u8, 152u8, 156u8, 132u8, 196u8, 140u8, 97u8, 7u8, 84u8, 220u8, - 89u8, 195u8, 177u8, 235u8, 51u8, 98u8, 144u8, 73u8, 238u8, 59u8, 164u8, - ], - ) - } - #[doc = " Temporary value (cleared at block finalization) which is `Some`"] - #[doc = " if per-block initialization has already been called for current block."] - pub fn initialized( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::option::Option, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "Babe", - "Initialized", - vec![], - [ - 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, - ], - ) - } - #[doc = " This field should always be populated during block processing unless"] - #[doc = " secondary plain slots are enabled (which don't contain a VRF output)."] - #[doc = ""] - #[doc = " It is set in `on_finalize`, before it will contain the value from the last block."] - pub fn author_vrf_randomness( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::option::Option<[::core::primitive::u8; 32usize]>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Babe", - "AuthorVrfRandomness", - vec![], - [ - 66u8, 235u8, 74u8, 252u8, 222u8, 135u8, 19u8, 28u8, 74u8, 191u8, 170u8, - 197u8, 207u8, 127u8, 77u8, 121u8, 138u8, 138u8, 110u8, 187u8, 34u8, - 14u8, 230u8, 43u8, 241u8, 241u8, 63u8, 163u8, 53u8, 179u8, 250u8, - 247u8, - ], - ) - } - #[doc = " The block numbers when the last and current epoch have started, respectively `N-1` and"] - #[doc = " `N`."] - #[doc = " NOTE: We track this is in order to annotate the block number when a given pool of"] - #[doc = " entropy was fixed (i.e. it was known to chain observers). Since epochs are defined in"] - #[doc = " slots, which may be skipped, the block numbers may not line up with the slot numbers."] - pub fn epoch_start( - &self, - ) -> ::subxt::storage::address::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( - "Babe", - "EpochStart", - vec![], - [ - 196u8, 39u8, 241u8, 20u8, 150u8, 180u8, 136u8, 4u8, 195u8, 205u8, - 218u8, 10u8, 130u8, 131u8, 168u8, 243u8, 207u8, 249u8, 58u8, 195u8, - 177u8, 119u8, 110u8, 243u8, 241u8, 3u8, 245u8, 56u8, 157u8, 5u8, 68u8, - 60u8, - ], - ) - } - #[doc = " How late the current block is compared to its parent."] - #[doc = ""] - #[doc = " This entry is populated as part of block execution and is cleaned up"] - #[doc = " on block finalization. Querying this storage entry outside of block"] - #[doc = " execution context should always yield zero."] - pub fn lateness( - &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( - "Babe", - "Lateness", - vec![], - [ - 229u8, 230u8, 224u8, 89u8, 49u8, 213u8, 198u8, 236u8, 144u8, 56u8, - 193u8, 234u8, 62u8, 242u8, 191u8, 199u8, 105u8, 131u8, 74u8, 63u8, - 75u8, 1u8, 210u8, 49u8, 3u8, 128u8, 18u8, 77u8, 219u8, 146u8, 60u8, - 88u8, - ], - ) - } - #[doc = " The configuration for the current epoch. Should never be `None` as it is initialized in"] - #[doc = " genesis."] - pub fn epoch_config( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::sp_consensus_babe::BabeEpochConfiguration, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "Babe", - "EpochConfig", - vec![], - [ - 41u8, 118u8, 141u8, 244u8, 72u8, 17u8, 125u8, 203u8, 43u8, 153u8, - 203u8, 119u8, 117u8, 223u8, 123u8, 133u8, 73u8, 235u8, 130u8, 21u8, - 160u8, 167u8, 16u8, 173u8, 177u8, 35u8, 117u8, 97u8, 149u8, 49u8, - 220u8, 24u8, - ], - ) - } - #[doc = " The configuration for the next epoch, `None` if the config will not change"] - #[doc = " (you can fallback to `EpochConfig` instead in that case)."] - pub fn next_epoch_config( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::sp_consensus_babe::BabeEpochConfiguration, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "Babe", - "NextEpochConfig", - vec![], - [ - 111u8, 182u8, 144u8, 180u8, 92u8, 146u8, 102u8, 249u8, 196u8, 229u8, - 226u8, 30u8, 25u8, 198u8, 133u8, 9u8, 136u8, 95u8, 11u8, 151u8, 139u8, - 156u8, 105u8, 228u8, 181u8, 12u8, 175u8, 148u8, 174u8, 33u8, 233u8, - 228u8, - ], - ) + #[doc = " The configuration for the next epoch, `None` if the config will not change"] + #[doc = " (you can fallback to `EpochConfig` instead in that case)."] + pub fn next_epoch_config( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::sp_consensus_babe::BabeEpochConfiguration, + ::subxt::storage::address::Yes, + (), + (), + > { + ::subxt::storage::address::Address::new_static( + "Babe", + "NextEpochConfig", + vec![], + [ + 111u8, 182u8, 144u8, 180u8, 92u8, 146u8, 102u8, 249u8, 196u8, 229u8, + 226u8, 30u8, 25u8, 198u8, 133u8, 9u8, 136u8, 95u8, 11u8, 151u8, 139u8, + 156u8, 105u8, 228u8, 181u8, 12u8, 175u8, 148u8, 174u8, 33u8, 233u8, + 228u8, + ], + ) } #[doc = " A list of the last 100 skipped epochs and the corresponding session index"] #[doc = " when the epoch was skipped."] @@ -6090,19 +3483,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 { @@ -6121,11 +3517,11 @@ pub mod api { #[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)`."] - 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, @@ -6216,76 +3612,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 { @@ -6301,11 +3700,14 @@ pub mod api { #[doc = ""] #[doc = "## Complexity"] #[doc = "- `O(1)`."] - 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, @@ -6329,11 +3731,11 @@ pub mod api { &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, @@ -6353,11 +3755,14 @@ pub mod api { #[doc = ""] #[doc = "## Complexity"] #[doc = "- `O(1)`."] - 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, @@ -6384,11 +3789,11 @@ pub mod api { 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, @@ -6412,11 +3817,11 @@ pub mod api { 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, @@ -6576,139 +3981,142 @@ 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 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 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 { @@ -6723,11 +4131,11 @@ pub mod api { &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_allow_death", - TransferAllowDeath { dest, value }, + types::TransferAllowDeath { dest, value }, [ 234u8, 130u8, 149u8, 36u8, 235u8, 112u8, 159u8, 189u8, 104u8, 148u8, 108u8, 230u8, 25u8, 198u8, 71u8, 158u8, 112u8, 3u8, 162u8, 25u8, 145u8, @@ -6746,11 +4154,11 @@ pub mod api { who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, new_free: ::core::primitive::u128, old_reserved: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Balances", "set_balance_deprecated", - SetBalanceDeprecated { + types::SetBalanceDeprecated { who, new_free, old_reserved, @@ -6770,11 +4178,11 @@ pub mod api { 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, @@ -6797,11 +4205,11 @@ pub mod api { &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, @@ -6829,11 +4237,11 @@ pub mod api { &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, @@ -6849,11 +4257,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, @@ -6873,11 +4281,11 @@ pub mod api { pub fn upgrade_accounts( &self, who: ::std::vec::Vec<::subxt::utils::AccountId32>, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Balances", "upgrade_accounts", - UpgradeAccounts { who }, + 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, @@ -6892,11 +4300,11 @@ pub mod api { &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 }, + types::Transfer { dest, value }, [ 111u8, 222u8, 32u8, 56u8, 171u8, 77u8, 252u8, 29u8, 194u8, 155u8, 200u8, 192u8, 198u8, 81u8, 23u8, 115u8, 236u8, 91u8, 218u8, 114u8, @@ -6912,11 +4320,11 @@ pub mod api { &self, who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, new_free: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Balances", "force_set_balance", - ForceSetBalance { who, new_free }, + 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, @@ -7726,523 +5134,23 @@ pub mod api { "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, - ], - ) - } - } - } - } - pub mod transaction_payment { - use super::root_mod; - use super::runtime_types; - #[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_transaction_payment::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 transaction fee `actual_fee`, of which `tip` was added to the minimum inclusion fee,"] - #[doc = "has been paid by `who`."] - pub struct TransactionFeePaid { - pub who: ::subxt::utils::AccountId32, - pub actual_fee: ::core::primitive::u128, - pub tip: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for TransactionFeePaid { - const PALLET: &'static str = "TransactionPayment"; - const EVENT: &'static str = "TransactionFeePaid"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - pub fn next_fee_multiplier( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::sp_arithmetic::fixed_point::FixedU128, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "TransactionPayment", - "NextFeeMultiplier", - vec![], - [ - 210u8, 0u8, 206u8, 165u8, 183u8, 10u8, 206u8, 52u8, 14u8, 90u8, 218u8, - 197u8, 189u8, 125u8, 113u8, 216u8, 52u8, 161u8, 45u8, 24u8, 245u8, - 237u8, 121u8, 41u8, 106u8, 29u8, 45u8, 129u8, 250u8, 203u8, 206u8, - 180u8, - ], - ) - } - pub fn storage_version( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_transaction_payment::Releases, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "TransactionPayment", - "StorageVersion", - vec![], - [ - 219u8, 243u8, 82u8, 176u8, 65u8, 5u8, 132u8, 114u8, 8u8, 82u8, 176u8, - 200u8, 97u8, 150u8, 177u8, 164u8, 166u8, 11u8, 34u8, 12u8, 12u8, 198u8, - 58u8, 191u8, 186u8, 221u8, 221u8, 119u8, 181u8, 253u8, 154u8, 228u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " A fee mulitplier for `Operational` extrinsics to compute \"virtual tip\" to boost their"] - #[doc = " `priority`"] - #[doc = ""] - #[doc = " This value is multipled by the `final_fee` to obtain a \"virtual tip\" that is later"] - #[doc = " added to a tip component in regular `priority` calculations."] - #[doc = " It means that a `Normal` transaction can front-run a similarly-sized `Operational`"] - #[doc = " extrinsic (with no tip), by including a tip value greater than the virtual tip."] - #[doc = ""] - #[doc = " ```rust,ignore"] - #[doc = " // For `Normal`"] - #[doc = " let priority = priority_calc(tip);"] - #[doc = ""] - #[doc = " // For `Operational`"] - #[doc = " let virtual_tip = (inclusion_fee + tip) * OperationalFeeMultiplier;"] - #[doc = " let priority = priority_calc(tip + virtual_tip);"] - #[doc = " ```"] - #[doc = ""] - #[doc = " Note that since we use `final_fee` the multiplier applies also to the regular `tip`"] - #[doc = " sent with the transaction. So, not only does the transaction get a priority bump based"] - #[doc = " on the `inclusion_fee`, but we also amplify the impact of tips applied to `Operational`"] - #[doc = " transactions."] - pub fn operational_fee_multiplier( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u8> { - ::subxt::constants::Address::new_static( - "TransactionPayment", - "OperationalFeeMultiplier", - [ - 141u8, 130u8, 11u8, 35u8, 226u8, 114u8, 92u8, 179u8, 168u8, 110u8, - 28u8, 91u8, 221u8, 64u8, 4u8, 148u8, 201u8, 193u8, 185u8, 66u8, 226u8, - 114u8, 97u8, 79u8, 62u8, 212u8, 202u8, 114u8, 237u8, 228u8, 183u8, - 165u8, - ], - ) - } - } - } - } - pub mod authorship { - use super::root_mod; - use super::runtime_types; - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " Author of current block."] - pub fn author( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::subxt::utils::AccountId32, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "Authorship", - "Author", - vec![], - [ - 149u8, 42u8, 33u8, 147u8, 190u8, 207u8, 174u8, 227u8, 190u8, 110u8, - 25u8, 131u8, 5u8, 167u8, 237u8, 188u8, 188u8, 33u8, 177u8, 126u8, - 181u8, 49u8, 126u8, 118u8, 46u8, 128u8, 154u8, 95u8, 15u8, 91u8, 103u8, - 113u8, - ], - ) - } - } - } - } - pub mod staking { - 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 :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (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, + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } } + } + } + pub mod transaction_payment { + use super::root_mod; + use super::runtime_types; + #[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_transaction_payment::pallet::Event; + pub mod events { + use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -8253,8 +5161,519 @@ 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 SetMinCommission { - pub new: runtime_types::sp_arithmetic::per_things::Perbill, + #[doc = "A transaction fee `actual_fee`, of which `tip` was added to the minimum inclusion fee,"] + #[doc = "has been paid by `who`."] + pub struct TransactionFeePaid { + pub who: ::subxt::utils::AccountId32, + pub actual_fee: ::core::primitive::u128, + pub tip: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for TransactionFeePaid { + const PALLET: &'static str = "TransactionPayment"; + const EVENT: &'static str = "TransactionFeePaid"; + } + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + pub fn next_fee_multiplier( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::sp_arithmetic::fixed_point::FixedU128, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "TransactionPayment", + "NextFeeMultiplier", + vec![], + [ + 210u8, 0u8, 206u8, 165u8, 183u8, 10u8, 206u8, 52u8, 14u8, 90u8, 218u8, + 197u8, 189u8, 125u8, 113u8, 216u8, 52u8, 161u8, 45u8, 24u8, 245u8, + 237u8, 121u8, 41u8, 106u8, 29u8, 45u8, 129u8, 250u8, 203u8, 206u8, + 180u8, + ], + ) + } + pub fn storage_version( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_transaction_payment::Releases, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "TransactionPayment", + "StorageVersion", + vec![], + [ + 219u8, 243u8, 82u8, 176u8, 65u8, 5u8, 132u8, 114u8, 8u8, 82u8, 176u8, + 200u8, 97u8, 150u8, 177u8, 164u8, 166u8, 11u8, 34u8, 12u8, 12u8, 198u8, + 58u8, 191u8, 186u8, 221u8, 221u8, 119u8, 181u8, 253u8, 154u8, 228u8, + ], + ) + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " A fee mulitplier for `Operational` extrinsics to compute \"virtual tip\" to boost their"] + #[doc = " `priority`"] + #[doc = ""] + #[doc = " This value is multipled by the `final_fee` to obtain a \"virtual tip\" that is later"] + #[doc = " added to a tip component in regular `priority` calculations."] + #[doc = " It means that a `Normal` transaction can front-run a similarly-sized `Operational`"] + #[doc = " extrinsic (with no tip), by including a tip value greater than the virtual tip."] + #[doc = ""] + #[doc = " ```rust,ignore"] + #[doc = " // For `Normal`"] + #[doc = " let priority = priority_calc(tip);"] + #[doc = ""] + #[doc = " // For `Operational`"] + #[doc = " let virtual_tip = (inclusion_fee + tip) * OperationalFeeMultiplier;"] + #[doc = " let priority = priority_calc(tip + virtual_tip);"] + #[doc = " ```"] + #[doc = ""] + #[doc = " Note that since we use `final_fee` the multiplier applies also to the regular `tip`"] + #[doc = " sent with the transaction. So, not only does the transaction get a priority bump based"] + #[doc = " on the `inclusion_fee`, but we also amplify the impact of tips applied to `Operational`"] + #[doc = " transactions."] + pub fn operational_fee_multiplier( + &self, + ) -> ::subxt::constants::Address<::core::primitive::u8> { + ::subxt::constants::Address::new_static( + "TransactionPayment", + "OperationalFeeMultiplier", + [ + 141u8, 130u8, 11u8, 35u8, 226u8, 114u8, 92u8, 179u8, 168u8, 110u8, + 28u8, 91u8, 221u8, 64u8, 4u8, 148u8, 201u8, 193u8, 185u8, 66u8, 226u8, + 114u8, 97u8, 79u8, 62u8, 212u8, 202u8, 114u8, 237u8, 228u8, 183u8, + 165u8, + ], + ) + } + } + } + } + pub mod authorship { + use super::root_mod; + use super::runtime_types; + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " Author of current block."] + pub fn author( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::subxt::utils::AccountId32, + ::subxt::storage::address::Yes, + (), + (), + > { + ::subxt::storage::address::Address::new_static( + "Authorship", + "Author", + vec![], + [ + 149u8, 42u8, 33u8, 147u8, 190u8, 207u8, 174u8, 227u8, 190u8, 110u8, + 25u8, 131u8, 5u8, 167u8, 237u8, 188u8, 188u8, 33u8, 177u8, 126u8, + 181u8, 49u8, 126u8, 118u8, 46u8, 128u8, 154u8, 95u8, 15u8, 91u8, 103u8, + 113u8, + ], + ) + } + } + } + } + pub mod staking { + 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 :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (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, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (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 { @@ -8280,11 +5699,11 @@ pub mod api { payee: runtime_types::pallet_staking::RewardDestination< ::subxt::utils::AccountId32, >, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Staking", "bond", - Bond { + types::Bond { controller, value, payee, @@ -8314,11 +5733,11 @@ pub mod api { 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, @@ -8348,11 +5767,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, @@ -8378,11 +5797,11 @@ pub mod api { 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, @@ -8399,11 +5818,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, @@ -8427,11 +5846,11 @@ pub mod api { 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, @@ -8450,11 +5869,11 @@ pub mod api { #[doc = "- Independent of the arguments. Insignificant complexity."] #[doc = "- Contains one read."] #[doc = "- Writes are limited to the `origin` account key."] - 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, @@ -8480,11 +5899,11 @@ pub mod api { 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, @@ -8506,11 +5925,11 @@ pub mod api { 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, @@ -8527,11 +5946,11 @@ pub mod api { 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, @@ -8549,11 +5968,11 @@ pub mod api { 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, @@ -8571,11 +5990,11 @@ pub mod api { 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, @@ -8597,11 +6016,11 @@ pub mod api { #[doc = "## Complexity"] #[doc = "- No arguments."] #[doc = "- Weight: O(1)"] - 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, @@ -8623,11 +6042,11 @@ pub mod api { #[doc = "## Complexity"] #[doc = "- No arguments."] #[doc = "- Weight: O(1)"] - 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, @@ -8641,11 +6060,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, @@ -8660,11 +6079,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, }, @@ -8685,11 +6104,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, @@ -8707,11 +6128,11 @@ pub mod api { &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, @@ -8735,11 +6156,11 @@ pub mod api { &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, }, @@ -8760,11 +6181,11 @@ pub mod api { 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, @@ -8789,11 +6210,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, }, @@ -8821,11 +6242,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, @@ -8870,11 +6291,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, @@ -8918,11 +6339,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, @@ -8936,11 +6357,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, @@ -8956,11 +6377,11 @@ pub mod api { pub fn set_min_commission( &self, new: runtime_types::sp_arithmetic::per_things::Perbill, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Staking", "set_min_commission", - SetMinCommission { new }, + types::SetMinCommission { new }, [ 62u8, 139u8, 175u8, 245u8, 212u8, 113u8, 117u8, 130u8, 191u8, 173u8, 78u8, 97u8, 19u8, 104u8, 185u8, 207u8, 201u8, 14u8, 200u8, 208u8, @@ -11007,31 +8428,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`."] @@ -11047,11 +8471,11 @@ pub mod api { &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, @@ -11071,11 +8495,11 @@ pub mod api { #[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 { + 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, @@ -11337,57 +8761,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_consensus_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_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_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 { @@ -11402,11 +8829,11 @@ pub mod api { ::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, }, @@ -11433,11 +8860,11 @@ pub mod api { ::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, }, @@ -11465,11 +8892,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, }, @@ -11771,19 +9198,23 @@ 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 { @@ -11796,11 +9227,11 @@ pub mod api { &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, }, @@ -11992,364 +9423,367 @@ pub mod api { ], ) } - #[doc = " For each session index, we keep a mapping of `ValidatorId` to the"] - #[doc = " number of blocks authored by the given authority."] - pub fn authored_blocks( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - _1: 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::Yes, - > { - ::subxt::storage::address::Address::new_static( - "ImOnline", - "AuthoredBlocks", - vec![ - ::subxt::storage::address::make_static_storage_map_key(_0.borrow()), - ::subxt::storage::address::make_static_storage_map_key(_1.borrow()), - ], - [ - 50u8, 4u8, 242u8, 240u8, 247u8, 184u8, 114u8, 245u8, 233u8, 170u8, - 24u8, 197u8, 18u8, 245u8, 8u8, 28u8, 33u8, 115u8, 166u8, 245u8, 221u8, - 223u8, 56u8, 144u8, 33u8, 139u8, 10u8, 227u8, 228u8, 223u8, 103u8, - 151u8, - ], - ) + #[doc = " For each session index, we keep a mapping of `ValidatorId` to the"] + #[doc = " number of blocks authored by the given authority."] + pub fn authored_blocks( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + _1: 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::Yes, + > { + ::subxt::storage::address::Address::new_static( + "ImOnline", + "AuthoredBlocks", + vec![ + ::subxt::storage::address::make_static_storage_map_key(_0.borrow()), + ::subxt::storage::address::make_static_storage_map_key(_1.borrow()), + ], + [ + 50u8, 4u8, 242u8, 240u8, 247u8, 184u8, 114u8, 245u8, 233u8, 170u8, + 24u8, 197u8, 18u8, 245u8, 8u8, 28u8, 33u8, 115u8, 166u8, 245u8, 221u8, + 223u8, 56u8, 144u8, 33u8, 139u8, 10u8, 227u8, 228u8, 223u8, 103u8, + 151u8, + ], + ) + } + #[doc = " For each session index, we keep a mapping of `ValidatorId` to the"] + #[doc = " number of blocks authored by the given authority."] + pub fn authored_blocks_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( + "ImOnline", + "AuthoredBlocks", + Vec::new(), + [ + 50u8, 4u8, 242u8, 240u8, 247u8, 184u8, 114u8, 245u8, 233u8, 170u8, + 24u8, 197u8, 18u8, 245u8, 8u8, 28u8, 33u8, 115u8, 166u8, 245u8, 221u8, + 223u8, 56u8, 144u8, 33u8, 139u8, 10u8, 227u8, 228u8, 223u8, 103u8, + 151u8, + ], + ) + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " A configuration for base priority of unsigned transactions."] + #[doc = ""] + #[doc = " This is exposed so that it can be tuned for particular runtime, when"] + #[doc = " multiple pallets send unsigned transactions."] + pub fn unsigned_priority( + &self, + ) -> ::subxt::constants::Address<::core::primitive::u64> { + ::subxt::constants::Address::new_static( + "ImOnline", + "UnsignedPriority", + [ + 128u8, 214u8, 205u8, 242u8, 181u8, 142u8, 124u8, 231u8, 190u8, 146u8, + 59u8, 226u8, 157u8, 101u8, 103u8, 117u8, 249u8, 65u8, 18u8, 191u8, + 103u8, 119u8, 53u8, 85u8, 81u8, 96u8, 220u8, 42u8, 184u8, 239u8, 42u8, + 246u8, + ], + ) + } + } + } + } + pub mod authority_discovery { + use super::root_mod; + use super::runtime_types; + } + pub mod democracy { + 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 :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (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>, } - #[doc = " For each session index, we keep a mapping of `ValidatorId` to the"] - #[doc = " number of blocks authored by the given authority."] - pub fn authored_blocks_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( - "ImOnline", - "AuthoredBlocks", - Vec::new(), - [ - 50u8, 4u8, 242u8, 240u8, 247u8, 184u8, 114u8, 245u8, 233u8, 170u8, - 24u8, 197u8, 18u8, 245u8, 8u8, 28u8, 33u8, 115u8, 166u8, 245u8, 221u8, - 223u8, 56u8, 144u8, 33u8, 139u8, 10u8, 227u8, 228u8, 223u8, 103u8, - 151u8, - ], - ) + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (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 mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " A configuration for base priority of unsigned transactions."] - #[doc = ""] - #[doc = " This is exposed so that it can be tuned for particular runtime, when"] - #[doc = " multiple pallets send unsigned transactions."] - pub fn unsigned_priority( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u64> { - ::subxt::constants::Address::new_static( - "ImOnline", - "UnsignedPriority", - [ - 128u8, 214u8, 205u8, 242u8, 181u8, 142u8, 124u8, 231u8, 190u8, 146u8, - 59u8, 226u8, 157u8, 101u8, 103u8, 117u8, 249u8, 65u8, 18u8, 191u8, - 103u8, 119u8, 53u8, 85u8, 81u8, 96u8, 220u8, 42u8, 184u8, 239u8, 42u8, - 246u8, - ], - ) + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (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 mod authority_discovery { - use super::root_mod; - use super::runtime_types; - } - pub mod democracy { - 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 :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (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, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (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."] @@ -12367,11 +9801,11 @@ pub mod api { runtime_types::polkadot_runtime::RuntimeCall, >, value: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Democracy", "propose", - Propose { proposal, value }, + 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, @@ -12388,11 +9822,11 @@ pub mod api { pub fn second( &self, proposal: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Democracy", "second", - Second { proposal }, + 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, @@ -12413,11 +9847,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, @@ -12436,11 +9870,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, @@ -12460,11 +9894,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, @@ -12488,11 +9922,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, @@ -12517,11 +9951,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, @@ -12550,11 +9984,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, @@ -12578,11 +10012,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, @@ -12601,11 +10035,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, @@ -12639,11 +10073,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, @@ -12668,11 +10102,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, @@ -12686,11 +10120,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, @@ -12709,11 +10145,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, @@ -12751,11 +10187,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, @@ -12783,11 +10219,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, @@ -12814,11 +10250,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, }, @@ -12840,11 +10276,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, @@ -12872,11 +10308,11 @@ pub mod api { &self, owner: runtime_types::pallet_democracy::types::MetadataOwner, maybe_hash: ::core::option::Option<::subxt::utils::H256>, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Democracy", "set_metadata", - SetMetadata { owner, maybe_hash }, + 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, @@ -13906,99 +11342,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 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 { @@ -14031,11 +11470,11 @@ pub mod api { 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, @@ -14061,11 +11500,11 @@ pub mod api { &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, }, @@ -14096,11 +11535,11 @@ pub mod api { 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, @@ -14126,11 +11565,11 @@ pub mod api { 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, @@ -14155,11 +11594,11 @@ pub mod api { 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, @@ -14197,11 +11636,11 @@ pub mod api { 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, @@ -14585,99 +12024,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 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 { @@ -14710,11 +12152,11 @@ pub mod api { 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, @@ -14740,11 +12182,11 @@ pub mod api { &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, }, @@ -14775,11 +12217,11 @@ pub mod api { 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, @@ -14805,11 +12247,11 @@ pub mod api { 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, @@ -14834,11 +12276,11 @@ pub mod api { 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, @@ -14876,11 +12318,11 @@ pub mod api { 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, @@ -15264,87 +12706,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 { @@ -15371,11 +12816,11 @@ pub mod api { &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, @@ -15389,11 +12834,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, @@ -15419,11 +12864,11 @@ pub mod api { 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, @@ -15454,11 +12899,11 @@ pub mod api { 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, @@ -15487,11 +12932,11 @@ pub mod api { 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, @@ -15516,11 +12961,11 @@ pub mod api { &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, }, @@ -16018,96 +13463,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."] @@ -16116,11 +13564,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, @@ -16135,11 +13583,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, @@ -16156,11 +13604,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, @@ -16176,11 +13624,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, @@ -16196,11 +13644,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, @@ -16215,11 +13663,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, @@ -16230,11 +13678,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, @@ -16405,77 +13853,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 { @@ -16489,11 +13940,11 @@ pub mod api { &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, @@ -16510,11 +13961,11 @@ pub mod api { 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, @@ -16533,11 +13984,11 @@ pub mod api { 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, @@ -16557,11 +14008,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, }, @@ -16588,11 +14039,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, @@ -17023,95 +14474,98 @@ 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 { - #[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 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 { @@ -17130,11 +14584,11 @@ pub mod api { vote: runtime_types::pallet_conviction_voting::vote::AccountVote< ::core::primitive::u128, >, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "ConvictionVoting", "vote", - Vote { poll_index, vote }, + types::Vote { poll_index, vote }, [ 255u8, 8u8, 191u8, 166u8, 7u8, 48u8, 227u8, 0u8, 34u8, 109u8, 3u8, 172u8, 168u8, 37u8, 220u8, 229u8, 88u8, 61u8, 117u8, 212u8, 131u8, @@ -17171,11 +14625,11 @@ pub mod api { 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 { ::subxt::tx::Payload::new_static( "ConvictionVoting", "delegate", - Delegate { + types::Delegate { class, to, conviction, @@ -17206,11 +14660,11 @@ pub mod api { pub fn undelegate( &self, class: ::core::primitive::u16, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "ConvictionVoting", "undelegate", - Undelegate { class }, + types::Undelegate { class }, [ 0u8, 244u8, 151u8, 108u8, 96u8, 240u8, 126u8, 247u8, 29u8, 33u8, 25u8, 34u8, 253u8, 207u8, 107u8, 227u8, 139u8, 64u8, 184u8, 112u8, 246u8, @@ -17231,11 +14685,11 @@ pub mod api { &self, class: ::core::primitive::u16, target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "ConvictionVoting", "unlock", - Unlock { class, target }, + types::Unlock { class, target }, [ 130u8, 244u8, 207u8, 112u8, 194u8, 4u8, 121u8, 4u8, 59u8, 75u8, 168u8, 246u8, 210u8, 249u8, 247u8, 242u8, 252u8, 28u8, 190u8, 93u8, 11u8, 8u8, @@ -17276,11 +14730,11 @@ pub mod api { &self, class: ::core::option::Option<::core::primitive::u16>, index: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "ConvictionVoting", "remove_vote", - RemoveVote { class, index }, + types::RemoveVote { class, index }, [ 151u8, 255u8, 135u8, 195u8, 137u8, 27u8, 116u8, 193u8, 245u8, 78u8, 38u8, 130u8, 233u8, 28u8, 235u8, 50u8, 144u8, 191u8, 39u8, 68u8, 17u8, @@ -17309,11 +14763,11 @@ pub mod api { target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, class: ::core::primitive::u16, index: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "ConvictionVoting", "remove_other_vote", - RemoveOtherVote { + types::RemoveOtherVote { target, class, index, @@ -17538,137 +14992,141 @@ 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 Submit { - pub proposal_origin: - ::std::boxed::Box, - pub proposal: runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::polkadot_runtime::RuntimeCall, - >, - 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 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, + >, + 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 { @@ -17690,11 +15148,11 @@ pub mod api { enactment_moment: runtime_types::frame_support::traits::schedule::DispatchTime< ::core::primitive::u32, >, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Referenda", "submit", - Submit { + types::Submit { proposal_origin: ::std::boxed::Box::new(proposal_origin), proposal, enactment_moment, @@ -17717,11 +15175,11 @@ pub mod api { pub fn place_decision_deposit( &self, index: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Referenda", "place_decision_deposit", - PlaceDecisionDeposit { index }, + types::PlaceDecisionDeposit { index }, [ 118u8, 227u8, 8u8, 55u8, 41u8, 171u8, 244u8, 40u8, 164u8, 232u8, 119u8, 129u8, 139u8, 123u8, 77u8, 70u8, 219u8, 236u8, 145u8, 159u8, 84u8, @@ -17739,11 +15197,11 @@ pub mod api { pub fn refund_decision_deposit( &self, index: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Referenda", "refund_decision_deposit", - RefundDecisionDeposit { index }, + types::RefundDecisionDeposit { index }, [ 120u8, 116u8, 89u8, 51u8, 255u8, 76u8, 150u8, 74u8, 54u8, 93u8, 19u8, 64u8, 13u8, 177u8, 144u8, 93u8, 132u8, 150u8, 244u8, 48u8, 202u8, @@ -17761,11 +15219,11 @@ pub mod api { pub fn cancel( &self, index: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Referenda", "cancel", - Cancel { index }, + types::Cancel { index }, [ 247u8, 55u8, 146u8, 211u8, 168u8, 140u8, 248u8, 217u8, 218u8, 235u8, 25u8, 39u8, 47u8, 132u8, 134u8, 18u8, 239u8, 70u8, 223u8, 50u8, 245u8, @@ -17779,11 +15237,14 @@ pub mod api { #[doc = "- `index`: The index of the referendum to be cancelled."] #[doc = ""] #[doc = "Emits `Killed` and `DepositSlashed`."] - pub fn kill(&self, index: ::core::primitive::u32) -> ::subxt::tx::Payload { + pub fn kill( + &self, + index: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Referenda", "kill", - Kill { index }, + types::Kill { index }, [ 98u8, 109u8, 143u8, 42u8, 24u8, 80u8, 39u8, 243u8, 249u8, 141u8, 104u8, 195u8, 29u8, 93u8, 149u8, 37u8, 27u8, 130u8, 84u8, 178u8, 246u8, 26u8, @@ -17798,11 +15259,11 @@ pub mod api { pub fn nudge_referendum( &self, index: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Referenda", "nudge_referendum", - NudgeReferendum { index }, + types::NudgeReferendum { index }, [ 60u8, 221u8, 153u8, 136u8, 107u8, 209u8, 59u8, 178u8, 208u8, 170u8, 10u8, 225u8, 213u8, 170u8, 228u8, 64u8, 204u8, 166u8, 7u8, 230u8, @@ -17823,11 +15284,11 @@ pub mod api { pub fn one_fewer_deciding( &self, track: ::core::primitive::u16, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Referenda", "one_fewer_deciding", - OneFewerDeciding { track }, + types::OneFewerDeciding { track }, [ 239u8, 43u8, 70u8, 73u8, 77u8, 28u8, 75u8, 62u8, 29u8, 67u8, 110u8, 120u8, 234u8, 236u8, 126u8, 99u8, 46u8, 183u8, 169u8, 16u8, 143u8, @@ -17846,11 +15307,11 @@ pub mod api { pub fn refund_submission_deposit( &self, index: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Referenda", "refund_submission_deposit", - RefundSubmissionDeposit { index }, + types::RefundSubmissionDeposit { index }, [ 101u8, 147u8, 237u8, 27u8, 220u8, 116u8, 73u8, 131u8, 191u8, 92u8, 134u8, 31u8, 175u8, 172u8, 129u8, 225u8, 91u8, 33u8, 23u8, 132u8, 89u8, @@ -17869,11 +15330,11 @@ pub mod api { &self, index: ::core::primitive::u32, maybe_hash: ::core::option::Option<::subxt::utils::H256>, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Referenda", "set_metadata", - SetMetadata { index, maybe_hash }, + 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, @@ -18566,70 +16027,73 @@ 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 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, + 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, + } } pub struct TransactionApi; impl TransactionApi { pub fn whitelist_call( &self, call_hash: ::subxt::utils::H256, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Whitelist", "whitelist_call", - WhitelistCall { call_hash }, + 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, @@ -18640,11 +16104,11 @@ pub mod api { pub fn remove_whitelisted_call( &self, call_hash: ::subxt::utils::H256, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Whitelist", "remove_whitelisted_call", - RemoveWhitelistedCall { call_hash }, + 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, @@ -18657,11 +16121,11 @@ pub mod api { 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 { ::subxt::tx::Payload::new_static( "Whitelist", "dispatch_whitelisted_call", - DispatchWhitelistedCall { + types::DispatchWhitelistedCall { call_hash, call_encoded_len, call_weight_witness, @@ -18677,11 +16141,12 @@ pub mod api { pub fn dispatch_whitelisted_call_with_preimage( &self, call: runtime_types::polkadot_runtime::RuntimeCall, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload + { ::subxt::tx::Payload::new_static( "Whitelist", "dispatch_whitelisted_call_with_preimage", - DispatchWhitelistedCallWithPreimage { + types::DispatchWhitelistedCallWithPreimage { call: ::std::boxed::Box::new(call), }, [ @@ -18814,86 +16279,89 @@ 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 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 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 struct TransactionApi; impl TransactionApi { @@ -18925,11 +16393,11 @@ pub mod api { &self, dest: ::subxt::utils::AccountId32, ethereum_signature : runtime_types :: polkadot_runtime_common :: claims :: EcdsaSignature, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Claims", "claim", - Claim { + types::Claim { dest, ethereum_signature, }, @@ -18967,11 +16435,11 @@ pub mod api { statement: ::core::option::Option< runtime_types::polkadot_runtime_common::claims::StatementKind, >, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Claims", "mint_claim", - MintClaim { + types::MintClaim { who, value, vesting_schedule, @@ -19015,11 +16483,11 @@ pub mod api { 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 { ::subxt::tx::Payload::new_static( "Claims", "claim_attest", - ClaimAttest { + types::ClaimAttest { dest, ethereum_signature, statement, @@ -19052,11 +16520,11 @@ pub mod api { pub fn attest( &self, statement: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Claims", "attest", - Attest { statement }, + types::Attest { statement }, [ 8u8, 218u8, 97u8, 237u8, 185u8, 61u8, 55u8, 4u8, 134u8, 18u8, 244u8, 226u8, 40u8, 97u8, 222u8, 246u8, 221u8, 74u8, 253u8, 22u8, 52u8, 223u8, @@ -19069,11 +16537,11 @@ pub mod api { old: runtime_types::polkadot_runtime_common::claims::EthereumAddress, new: runtime_types::polkadot_runtime_common::claims::EthereumAddress, maybe_preclaim: ::core::option::Option<::subxt::utils::AccountId32>, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Claims", "move_claim", - MoveClaim { + types::MoveClaim { old, new, maybe_preclaim, @@ -19371,78 +16839,81 @@ 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 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 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 { @@ -19455,11 +16926,11 @@ pub mod api { #[doc = ""] #[doc = "## Complexity"] #[doc = "- `O(1)`."] - pub fn vest(&self) -> ::subxt::tx::Payload { + pub fn vest(&self) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Vesting", "vest", - Vest {}, + types::Vest {}, [ 123u8, 54u8, 10u8, 208u8, 154u8, 24u8, 39u8, 166u8, 64u8, 27u8, 74u8, 29u8, 243u8, 97u8, 155u8, 5u8, 130u8, 155u8, 65u8, 181u8, 196u8, 125u8, @@ -19481,11 +16952,11 @@ pub mod api { pub fn vest_other( &self, target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Vesting", "vest_other", - VestOther { target }, + types::VestOther { target }, [ 164u8, 19u8, 93u8, 81u8, 235u8, 101u8, 18u8, 52u8, 187u8, 81u8, 243u8, 216u8, 116u8, 84u8, 188u8, 135u8, 1u8, 241u8, 128u8, 90u8, 117u8, @@ -19514,11 +16985,11 @@ pub mod api { ::core::primitive::u128, ::core::primitive::u32, >, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Vesting", "vested_transfer", - VestedTransfer { target, schedule }, + types::VestedTransfer { target, schedule }, [ 135u8, 172u8, 56u8, 97u8, 45u8, 141u8, 93u8, 173u8, 111u8, 252u8, 75u8, 246u8, 92u8, 181u8, 138u8, 87u8, 145u8, 174u8, 71u8, 108u8, 126u8, @@ -19549,11 +17020,11 @@ pub mod api { ::core::primitive::u128, ::core::primitive::u32, >, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Vesting", "force_vested_transfer", - ForceVestedTransfer { + types::ForceVestedTransfer { source, target, schedule, @@ -19590,11 +17061,11 @@ pub mod api { &self, schedule1_index: ::core::primitive::u32, schedule2_index: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Vesting", "merge_schedules", - MergeSchedules { + types::MergeSchedules { schedule1_index, schedule2_index, }, @@ -19777,86 +17248,89 @@ 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 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 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 { @@ -19881,11 +17355,11 @@ pub mod api { pub fn batch( &self, calls: ::std::vec::Vec, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Utility", "batch", - Batch { calls }, + types::Batch { calls }, [ 12u8, 135u8, 86u8, 65u8, 103u8, 75u8, 121u8, 211u8, 245u8, 38u8, 169u8, 197u8, 234u8, 144u8, 84u8, 134u8, 129u8, 181u8, 119u8, 60u8, 213u8, @@ -19910,11 +17384,11 @@ pub mod api { &self, index: ::core::primitive::u16, call: runtime_types::polkadot_runtime::RuntimeCall, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Utility", "as_derivative", - AsDerivative { + types::AsDerivative { index, call: ::std::boxed::Box::new(call), }, @@ -19941,11 +17415,11 @@ pub mod api { pub fn batch_all( &self, calls: ::std::vec::Vec, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Utility", "batch_all", - BatchAll { calls }, + types::BatchAll { calls }, [ 126u8, 64u8, 7u8, 172u8, 174u8, 142u8, 40u8, 181u8, 203u8, 6u8, 157u8, 178u8, 112u8, 250u8, 152u8, 101u8, 16u8, 93u8, 4u8, 39u8, 14u8, 180u8, @@ -19963,11 +17437,11 @@ pub mod api { &self, as_origin: runtime_types::polkadot_runtime::OriginCaller, call: runtime_types::polkadot_runtime::RuntimeCall, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Utility", "dispatch_as", - DispatchAs { + types::DispatchAs { as_origin: ::std::boxed::Box::new(as_origin), call: ::std::boxed::Box::new(call), }, @@ -19994,11 +17468,11 @@ pub mod api { pub fn force_batch( &self, calls: ::std::vec::Vec, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Utility", "force_batch", - ForceBatch { calls }, + 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, @@ -20016,11 +17490,11 @@ pub mod api { &self, call: runtime_types::polkadot_runtime::RuntimeCall, weight: runtime_types::sp_weights::weight_v2::Weight, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Utility", "with_weight", - WithWeight { + types::WithWeight { call: ::std::boxed::Box::new(call), weight, }, @@ -20172,220 +17646,224 @@ 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 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, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (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, ()>, + 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, ()>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (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, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (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; } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (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."] @@ -20401,11 +17879,11 @@ pub mod api { pub fn add_registrar( &self, account: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Identity", "add_registrar", - AddRegistrar { account }, + types::AddRegistrar { account }, [ 157u8, 232u8, 252u8, 190u8, 203u8, 233u8, 127u8, 63u8, 111u8, 16u8, 118u8, 200u8, 31u8, 234u8, 144u8, 111u8, 161u8, 224u8, 217u8, 86u8, @@ -20432,11 +17910,11 @@ pub mod api { pub fn set_identity( &self, info: runtime_types::pallet_identity::types::IdentityInfo, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Identity", "set_identity", - SetIdentity { + types::SetIdentity { info: ::std::boxed::Box::new(info), }, [ @@ -20466,11 +17944,11 @@ pub mod api { ::subxt::utils::AccountId32, runtime_types::pallet_identity::types::Data, )>, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Identity", "set_subs", - SetSubs { subs }, + types::SetSubs { subs }, [ 177u8, 219u8, 84u8, 183u8, 5u8, 32u8, 192u8, 82u8, 174u8, 68u8, 198u8, 224u8, 56u8, 85u8, 134u8, 171u8, 30u8, 132u8, 140u8, 236u8, 117u8, @@ -20493,11 +17971,11 @@ pub mod api { #[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 { + pub fn clear_identity(&self) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Identity", "clear_identity", - ClearIdentity {}, + types::ClearIdentity {}, [ 75u8, 44u8, 74u8, 122u8, 149u8, 202u8, 114u8, 230u8, 0u8, 255u8, 140u8, 122u8, 14u8, 196u8, 205u8, 249u8, 220u8, 94u8, 216u8, 34u8, 63u8, 14u8, @@ -20530,11 +18008,11 @@ pub mod api { &self, reg_index: ::core::primitive::u32, max_fee: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Identity", "request_judgement", - RequestJudgement { reg_index, max_fee }, + types::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, @@ -20560,11 +18038,11 @@ pub mod api { pub fn cancel_request( &self, reg_index: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Identity", "cancel_request", - CancelRequest { reg_index }, + types::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, @@ -20587,11 +18065,11 @@ pub mod api { &self, index: ::core::primitive::u32, fee: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Identity", "set_fee", - SetFee { index, fee }, + types::SetFee { index, fee }, [ 21u8, 157u8, 123u8, 182u8, 160u8, 190u8, 117u8, 37u8, 136u8, 133u8, 104u8, 234u8, 31u8, 145u8, 115u8, 154u8, 125u8, 40u8, 2u8, 87u8, 118u8, @@ -20614,11 +18092,11 @@ pub mod api { &self, index: ::core::primitive::u32, new: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Identity", "set_account_id", - SetAccountId { index, new }, + types::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, @@ -20643,11 +18121,11 @@ pub mod api { fields: runtime_types::pallet_identity::types::BitFlags< runtime_types::pallet_identity::types::IdentityField, >, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Identity", "set_fields", - SetFields { index, fields }, + types::SetFields { index, fields }, [ 50u8, 196u8, 179u8, 71u8, 66u8, 65u8, 235u8, 7u8, 51u8, 14u8, 81u8, 173u8, 201u8, 58u8, 6u8, 151u8, 174u8, 245u8, 102u8, 184u8, 28u8, 84u8, @@ -20680,11 +18158,11 @@ pub mod api { ::core::primitive::u128, >, identity: ::subxt::utils::H256, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Identity", "provide_judgement", - ProvideJudgement { + types::ProvideJudgement { reg_index, target, judgement, @@ -20718,11 +18196,11 @@ pub mod api { pub fn kill_identity( &self, target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Identity", "kill_identity", - KillIdentity { target }, + types::KillIdentity { target }, [ 76u8, 13u8, 158u8, 219u8, 221u8, 0u8, 151u8, 241u8, 137u8, 136u8, 179u8, 194u8, 188u8, 230u8, 56u8, 16u8, 254u8, 28u8, 127u8, 216u8, @@ -20742,11 +18220,11 @@ pub mod api { &self, sub: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, data: runtime_types::pallet_identity::types::Data, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Identity", "add_sub", - AddSub { sub, data }, + types::AddSub { sub, data }, [ 122u8, 218u8, 25u8, 93u8, 33u8, 176u8, 191u8, 254u8, 223u8, 147u8, 100u8, 135u8, 86u8, 71u8, 47u8, 163u8, 105u8, 222u8, 162u8, 173u8, @@ -20763,11 +18241,11 @@ pub mod api { &self, sub: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, data: runtime_types::pallet_identity::types::Data, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Identity", "rename_sub", - RenameSub { sub, data }, + types::RenameSub { sub, data }, [ 166u8, 167u8, 49u8, 114u8, 199u8, 168u8, 187u8, 221u8, 100u8, 85u8, 147u8, 211u8, 157u8, 31u8, 109u8, 135u8, 194u8, 135u8, 15u8, 89u8, @@ -20786,11 +18264,11 @@ pub mod api { pub fn remove_sub( &self, sub: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Identity", "remove_sub", - RemoveSub { sub }, + types::RemoveSub { sub }, [ 106u8, 223u8, 210u8, 67u8, 54u8, 11u8, 144u8, 222u8, 42u8, 46u8, 157u8, 33u8, 13u8, 245u8, 166u8, 195u8, 227u8, 81u8, 224u8, 149u8, 154u8, @@ -20809,11 +18287,11 @@ pub mod api { #[doc = ""] #[doc = "NOTE: This should not normally be used, but is provided in the case that the non-"] #[doc = "controller of an account is maliciously registered as a sub-account."] - pub fn quit_sub(&self) -> ::subxt::tx::Payload { + pub fn quit_sub(&self) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Identity", "quit_sub", - QuitSub {}, + types::QuitSub {}, [ 62u8, 57u8, 73u8, 72u8, 119u8, 216u8, 250u8, 155u8, 57u8, 169u8, 157u8, 44u8, 87u8, 51u8, 63u8, 231u8, 77u8, 7u8, 0u8, 119u8, 244u8, 42u8, @@ -21333,155 +18811,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 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 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 { @@ -21501,11 +18982,11 @@ pub mod api { runtime_types::polkadot_runtime::ProxyType, >, call: runtime_types::polkadot_runtime::RuntimeCall, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Proxy", "proxy", - Proxy { + types::Proxy { real, force_proxy_type, call: ::std::boxed::Box::new(call), @@ -21532,11 +19013,11 @@ pub mod api { delegate: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, proxy_type: runtime_types::polkadot_runtime::ProxyType, delay: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Proxy", "add_proxy", - AddProxy { + types::AddProxy { delegate, proxy_type, delay, @@ -21560,11 +19041,11 @@ pub mod api { delegate: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, proxy_type: runtime_types::polkadot_runtime::ProxyType, delay: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Proxy", "remove_proxy", - RemoveProxy { + types::RemoveProxy { delegate, proxy_type, delay, @@ -21582,11 +19063,11 @@ pub mod api { #[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 { + pub fn remove_proxies(&self) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Proxy", "remove_proxies", - RemoveProxies {}, + types::RemoveProxies {}, [ 15u8, 237u8, 27u8, 166u8, 254u8, 218u8, 92u8, 5u8, 213u8, 239u8, 99u8, 59u8, 1u8, 26u8, 73u8, 252u8, 81u8, 94u8, 214u8, 227u8, 169u8, 58u8, @@ -21617,11 +19098,11 @@ pub mod api { proxy_type: runtime_types::polkadot_runtime::ProxyType, delay: ::core::primitive::u32, index: ::core::primitive::u16, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Proxy", "create_pure", - CreatePure { + types::CreatePure { proxy_type, delay, index, @@ -21656,11 +19137,11 @@ pub mod api { index: ::core::primitive::u16, height: ::core::primitive::u32, ext_index: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Proxy", "kill_pure", - KillPure { + types::KillPure { spawner, proxy_type, index, @@ -21694,11 +19175,11 @@ pub mod api { &self, real: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, call_hash: ::subxt::utils::H256, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Proxy", "announce", - Announce { real, call_hash }, + 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, @@ -21721,11 +19202,11 @@ pub mod api { &self, real: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, call_hash: ::subxt::utils::H256, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Proxy", "remove_announcement", - RemoveAnnouncement { real, call_hash }, + 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, @@ -21748,11 +19229,11 @@ pub mod api { &self, delegate: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, call_hash: ::subxt::utils::H256, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Proxy", "reject_announcement", - RejectAnnouncement { + types::RejectAnnouncement { delegate, call_hash, }, @@ -21783,11 +19264,11 @@ pub mod api { runtime_types::polkadot_runtime::ProxyType, >, call: runtime_types::polkadot_runtime::RuntimeCall, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Proxy", "proxy_announced", - ProxyAnnounced { + types::ProxyAnnounced { delegate, real, force_proxy_type, @@ -22155,73 +19636,77 @@ 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 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 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 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 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 { @@ -22241,11 +19726,11 @@ pub mod api { &self, other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, call: runtime_types::polkadot_runtime::RuntimeCall, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Multisig", "as_multi_threshold_1", - AsMultiThreshold1 { + types::AsMultiThreshold1 { other_signatories, call: ::std::boxed::Box::new(call), }, @@ -22304,11 +19789,11 @@ pub mod api { >, call: runtime_types::polkadot_runtime::RuntimeCall, max_weight: runtime_types::sp_weights::weight_v2::Weight, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Multisig", "as_multi", - AsMulti { + types::AsMulti { threshold, other_signatories, maybe_timepoint, @@ -22362,11 +19847,11 @@ pub mod api { >, call_hash: [::core::primitive::u8; 32usize], max_weight: runtime_types::sp_weights::weight_v2::Weight, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Multisig", "approve_as_multi", - ApproveAsMulti { + types::ApproveAsMulti { threshold, other_signatories, maybe_timepoint, @@ -22408,11 +19893,11 @@ pub mod api { 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 { ::subxt::tx::Payload::new_static( "Multisig", "cancel_as_multi", - CancelAsMulti { + types::CancelAsMulti { threshold, other_signatories, timepoint, @@ -22640,137 +20125,140 @@ 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 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 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>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (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 { @@ -22790,11 +20278,11 @@ pub mod api { &self, value: ::core::primitive::u128, description: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Bounties", "propose_bounty", - ProposeBounty { value, description }, + types::ProposeBounty { value, description }, [ 99u8, 160u8, 94u8, 74u8, 105u8, 161u8, 123u8, 239u8, 241u8, 117u8, 97u8, 99u8, 84u8, 101u8, 87u8, 3u8, 88u8, 175u8, 75u8, 59u8, 114u8, @@ -22813,11 +20301,11 @@ pub mod api { pub fn approve_bounty( &self, bounty_id: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Bounties", "approve_bounty", - ApproveBounty { bounty_id }, + types::ApproveBounty { bounty_id }, [ 82u8, 228u8, 232u8, 103u8, 198u8, 173u8, 190u8, 148u8, 159u8, 86u8, 48u8, 4u8, 32u8, 169u8, 1u8, 129u8, 96u8, 145u8, 235u8, 68u8, 48u8, @@ -22836,11 +20324,11 @@ pub mod api { bounty_id: ::core::primitive::u32, curator: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, fee: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Bounties", "propose_curator", - ProposeCurator { + types::ProposeCurator { bounty_id, curator, fee, @@ -22873,11 +20361,11 @@ pub mod api { pub fn unassign_curator( &self, bounty_id: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Bounties", "unassign_curator", - UnassignCurator { bounty_id }, + types::UnassignCurator { bounty_id }, [ 218u8, 241u8, 247u8, 89u8, 95u8, 120u8, 93u8, 18u8, 85u8, 114u8, 158u8, 254u8, 68u8, 77u8, 230u8, 186u8, 230u8, 201u8, 63u8, 223u8, 28u8, @@ -22896,11 +20384,11 @@ pub mod api { pub fn accept_curator( &self, bounty_id: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Bounties", "accept_curator", - AcceptCurator { bounty_id }, + types::AcceptCurator { bounty_id }, [ 106u8, 96u8, 22u8, 67u8, 52u8, 109u8, 180u8, 225u8, 122u8, 253u8, 209u8, 214u8, 132u8, 131u8, 247u8, 131u8, 162u8, 51u8, 144u8, 30u8, @@ -22923,11 +20411,11 @@ pub mod api { &self, bounty_id: ::core::primitive::u32, beneficiary: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Bounties", "award_bounty", - AwardBounty { + types::AwardBounty { bounty_id, beneficiary, }, @@ -22949,11 +20437,11 @@ pub mod api { pub fn claim_bounty( &self, bounty_id: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Bounties", "claim_bounty", - ClaimBounty { bounty_id }, + types::ClaimBounty { bounty_id }, [ 102u8, 95u8, 8u8, 89u8, 4u8, 126u8, 189u8, 28u8, 241u8, 16u8, 125u8, 218u8, 42u8, 92u8, 177u8, 91u8, 8u8, 235u8, 33u8, 48u8, 64u8, 115u8, @@ -22973,11 +20461,11 @@ pub mod api { pub fn close_bounty( &self, bounty_id: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Bounties", "close_bounty", - CloseBounty { bounty_id }, + types::CloseBounty { bounty_id }, [ 64u8, 113u8, 151u8, 228u8, 90u8, 55u8, 251u8, 63u8, 27u8, 211u8, 119u8, 229u8, 137u8, 137u8, 183u8, 240u8, 241u8, 146u8, 69u8, 169u8, 124u8, @@ -22999,11 +20487,11 @@ pub mod api { &self, bounty_id: ::core::primitive::u32, remark: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Bounties", "extend_bounty_expiry", - ExtendBountyExpiry { bounty_id, remark }, + types::ExtendBountyExpiry { bounty_id, remark }, [ 97u8, 69u8, 157u8, 39u8, 59u8, 72u8, 79u8, 88u8, 104u8, 119u8, 91u8, 26u8, 73u8, 216u8, 174u8, 95u8, 254u8, 214u8, 63u8, 138u8, 100u8, @@ -23460,122 +20948,125 @@ 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 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 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 { @@ -23603,11 +21094,11 @@ pub mod api { parent_bounty_id: ::core::primitive::u32, value: ::core::primitive::u128, description: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "ChildBounties", "add_child_bounty", - AddChildBounty { + types::AddChildBounty { parent_bounty_id, value, description, @@ -23640,11 +21131,11 @@ pub mod api { child_bounty_id: ::core::primitive::u32, curator: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, fee: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "ChildBounties", "propose_curator", - ProposeCurator { + types::ProposeCurator { parent_bounty_id, child_bounty_id, curator, @@ -23680,11 +21171,11 @@ pub mod api { &self, parent_bounty_id: ::core::primitive::u32, child_bounty_id: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "ChildBounties", "accept_curator", - AcceptCurator { + types::AcceptCurator { parent_bounty_id, child_bounty_id, }, @@ -23734,11 +21225,11 @@ pub mod api { &self, parent_bounty_id: ::core::primitive::u32, child_bounty_id: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "ChildBounties", "unassign_curator", - UnassignCurator { + types::UnassignCurator { parent_bounty_id, child_bounty_id, }, @@ -23772,11 +21263,11 @@ pub mod api { 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 { ::subxt::tx::Payload::new_static( "ChildBounties", "award_child_bounty", - AwardChildBounty { + types::AwardChildBounty { parent_bounty_id, child_bounty_id, beneficiary, @@ -23809,11 +21300,11 @@ pub mod api { &self, parent_bounty_id: ::core::primitive::u32, child_bounty_id: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "ChildBounties", "claim_child_bounty", - ClaimChildBounty { + types::ClaimChildBounty { parent_bounty_id, child_bounty_id, }, @@ -23851,11 +21342,11 @@ pub mod api { &self, parent_bounty_id: ::core::primitive::u32, child_bounty_id: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "ChildBounties", "close_child_bounty", - CloseChildBounty { + types::CloseChildBounty { parent_bounty_id, child_bounty_id, }, @@ -24225,89 +21716,92 @@ 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 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 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 struct TransactionApi; impl TransactionApi { @@ -24331,11 +21825,11 @@ pub mod api { &self, reason: ::std::vec::Vec<::core::primitive::u8>, who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Tips", "report_awesome", - ReportAwesome { reason, who }, + types::ReportAwesome { reason, who }, [ 126u8, 68u8, 2u8, 54u8, 195u8, 15u8, 43u8, 27u8, 183u8, 254u8, 157u8, 163u8, 252u8, 14u8, 207u8, 251u8, 215u8, 111u8, 98u8, 209u8, 150u8, @@ -24362,11 +21856,11 @@ pub mod api { pub fn retract_tip( &self, hash: ::subxt::utils::H256, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Tips", "retract_tip", - RetractTip { hash }, + types::RetractTip { hash }, [ 137u8, 42u8, 229u8, 188u8, 157u8, 195u8, 184u8, 176u8, 64u8, 142u8, 67u8, 175u8, 185u8, 207u8, 214u8, 71u8, 165u8, 29u8, 137u8, 227u8, @@ -24399,11 +21893,11 @@ pub mod api { 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 { ::subxt::tx::Payload::new_static( "Tips", "tip_new", - TipNew { + types::TipNew { reason, who, tip_value, @@ -24441,11 +21935,11 @@ pub mod api { &self, hash: ::subxt::utils::H256, tip_value: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Tips", "tip", - Tip { hash, tip_value }, + types::Tip { hash, tip_value }, [ 133u8, 52u8, 131u8, 14u8, 71u8, 232u8, 254u8, 31u8, 33u8, 206u8, 50u8, 76u8, 56u8, 167u8, 228u8, 202u8, 195u8, 0u8, 164u8, 107u8, 170u8, 98u8, @@ -24469,11 +21963,11 @@ pub mod api { pub fn close_tip( &self, hash: ::subxt::utils::H256, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Tips", "close_tip", - CloseTip { hash }, + types::CloseTip { hash }, [ 32u8, 53u8, 0u8, 222u8, 45u8, 157u8, 107u8, 174u8, 203u8, 50u8, 81u8, 230u8, 6u8, 111u8, 79u8, 55u8, 49u8, 151u8, 107u8, 114u8, 81u8, 200u8, @@ -24494,11 +21988,11 @@ pub mod api { pub fn slash_tip( &self, hash: ::subxt::utils::H256, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Tips", "slash_tip", - SlashTip { hash }, + types::SlashTip { hash }, [ 222u8, 209u8, 22u8, 47u8, 114u8, 230u8, 81u8, 200u8, 131u8, 0u8, 209u8, 54u8, 17u8, 200u8, 175u8, 125u8, 100u8, 254u8, 41u8, 178u8, 20u8, 27u8, @@ -24808,85 +22302,88 @@ 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 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 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, + 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>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (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 { @@ -24910,11 +22407,11 @@ pub mod api { runtime_types::polkadot_runtime::NposCompactSolution16, >, witness : runtime_types :: pallet_election_provider_multi_phase :: SolutionOrSnapshotSize, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "ElectionProviderMultiPhase", "submit_unsigned", - SubmitUnsigned { + types::SubmitUnsigned { raw_solution: ::std::boxed::Box::new(raw_solution), witness, }, @@ -24935,11 +22432,11 @@ pub mod api { maybe_next_score: ::core::option::Option< runtime_types::sp_npos_elections::ElectionScore, >, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "ElectionProviderMultiPhase", "set_minimum_untrusted_score", - SetMinimumUntrustedScore { maybe_next_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, @@ -24961,11 +22458,11 @@ pub mod api { ::subxt::utils::AccountId32, runtime_types::sp_npos_elections::Support<::subxt::utils::AccountId32>, )>, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "ElectionProviderMultiPhase", "set_emergency_election_result", - SetEmergencyElectionResult { supports }, + 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, @@ -24987,11 +22484,11 @@ pub mod api { raw_solution: runtime_types::pallet_election_provider_multi_phase::RawSolution< runtime_types::polkadot_runtime::NposCompactSolution16, >, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "ElectionProviderMultiPhase", "submit", - Submit { + types::Submit { raw_solution: ::std::boxed::Box::new(raw_solution), }, [ @@ -25010,11 +22507,11 @@ pub mod api { &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 { ::subxt::tx::Payload::new_static( "ElectionProviderMultiPhase", "governance_fallback", - GovernanceFallback { + types::GovernanceFallback { maybe_max_voters, maybe_max_targets, }, @@ -25648,460 +23145,139 @@ pub mod api { #[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, - ], - ) - } - pub fn miner_max_winners( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "ElectionProviderMultiPhase", - "MinerMaxWinners", - [ - 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 voter_list { - 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 :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (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, - 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, - ], - ) - } - } - } - #[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, - _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(), - )], + ) -> ::subxt::constants::Address<::core::primitive::u128> { + ::subxt::constants::Address::new_static( + "ElectionProviderMultiPhase", + "SignedDepositByte", [ - 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, + 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 = " A single node, within some bag."] - #[doc = ""] - #[doc = " Nodes store links forward and back within their respective bags."] - pub fn list_nodes_root( + #[doc = " Per-weight deposit for a signed solution."] + pub fn signed_deposit_weight( &self, - ) -> ::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(), + ) -> ::subxt::constants::Address<::core::primitive::u128> { + ::subxt::constants::Address::new_static( + "ElectionProviderMultiPhase", + "SignedDepositWeight", [ - 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, + 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 = "Counter for the related counted storage map"] - pub fn counter_for_list_nodes( + #[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::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![], + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "ElectionProviderMultiPhase", + "MaxElectingVoters", [ - 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, + 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 bag stored in storage."] - #[doc = ""] - #[doc = " Stores a `Bag` struct, which stores head and tail pointers to itself."] - pub fn list_bags( + #[doc = " The maximum number of electable targets to put in the snapshot."] + pub fn max_electable_targets( &self, - _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(), - )], + ) -> ::subxt::constants::Address<::core::primitive::u16> { + ::subxt::constants::Address::new_static( + "ElectionProviderMultiPhase", + "MaxElectableTargets", [ - 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, + 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 = " A bag stored in storage."] + #[doc = " The maximum number of winners that can be elected by this `ElectionProvider`"] + #[doc = " implementation."] #[doc = ""] - #[doc = " Stores a `Bag` struct, which stores head and tail pointers to itself."] - pub fn list_bags_root( + #[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::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(), + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "ElectionProviderMultiPhase", + "MinerMaxLength", [ - 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, + 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 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( + pub fn miner_max_weight( &self, - ) -> ::subxt::constants::Address<::std::vec::Vec<::core::primitive::u64>> + ) -> ::subxt::constants::Address { ::subxt::constants::Address::new_static( - "VoterList", - "BagThresholds", + "ElectionProviderMultiPhase", + "MinerMaxWeight", [ - 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, + 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, + ], + ) + } + pub fn miner_max_winners( + &self, + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "ElectionProviderMultiPhase", + "MinerMaxWinners", + [ + 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 nomination_pools { + pub mod voter_list { use super::root_mod; use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] @@ -26109,282 +23285,93 @@ 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 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, + 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, ()>, + } } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (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, - )>, + 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", + types::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", + types::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, + ], + ) + } } + } + #[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, @@ -26395,9 +23382,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 SetCommissionMax { - pub pool_id: ::core::primitive::u32, - pub max_commission: runtime_types::sp_arithmetic::per_things::Perbill, + #[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, @@ -26409,25 +23402,540 @@ 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 SetCommissionChangeRate { - pub pool_id: ::core::primitive::u32, - pub change_rate: runtime_types::pallet_nomination_pools::CommissionChangeRate< + #[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, + _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(), + )], + [ + 176u8, 186u8, 93u8, 51u8, 100u8, 184u8, 240u8, 29u8, 70u8, 3u8, 117u8, + 47u8, 23u8, 66u8, 231u8, 234u8, 53u8, 8u8, 234u8, 175u8, 181u8, 8u8, + 161u8, 154u8, 48u8, 178u8, 147u8, 227u8, 122u8, 115u8, 57u8, 97u8, + ], + ) + } + #[doc = " A single node, within some bag."] + #[doc = ""] + #[doc = " Nodes store links forward and back within their respective bags."] + pub fn list_nodes_root( + &self, + ) -> ::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(), + [ + 176u8, 186u8, 93u8, 51u8, 100u8, 184u8, 240u8, 29u8, 70u8, 3u8, 117u8, + 47u8, 23u8, 66u8, 231u8, 234u8, 53u8, 8u8, 234u8, 175u8, 181u8, 8u8, + 161u8, 154u8, 48u8, 178u8, 147u8, 227u8, 122u8, 115u8, 57u8, 97u8, + ], + ) + } + #[doc = "Counter for the related counted storage map"] + pub fn counter_for_list_nodes( + &self, + ) -> ::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![], + [ + 156u8, 168u8, 97u8, 33u8, 84u8, 117u8, 220u8, 89u8, 62u8, 182u8, 24u8, + 88u8, 231u8, 244u8, 41u8, 19u8, 210u8, 131u8, 87u8, 0u8, 241u8, 230u8, + 160u8, 142u8, 128u8, 153u8, 83u8, 36u8, 88u8, 247u8, 70u8, 130u8, + ], + ) + } + #[doc = " A bag stored in storage."] + #[doc = ""] + #[doc = " Stores a `Bag` struct, which stores head and tail pointers to itself."] + pub fn list_bags( + &self, + _0: 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(), + )], + [ + 38u8, 86u8, 63u8, 92u8, 85u8, 59u8, 225u8, 244u8, 14u8, 155u8, 76u8, + 249u8, 153u8, 140u8, 179u8, 7u8, 96u8, 170u8, 236u8, 179u8, 4u8, 18u8, + 232u8, 146u8, 216u8, 51u8, 135u8, 116u8, 196u8, 117u8, 143u8, 153u8, + ], + ) + } + #[doc = " A bag stored in storage."] + #[doc = ""] + #[doc = " Stores a `Bag` struct, which stores head and tail pointers to itself."] + pub fn list_bags_root( + &self, + ) -> ::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(), + [ + 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, + ], + ) + } } - #[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 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, + ) -> ::subxt::constants::Address<::std::vec::Vec<::core::primitive::u64>> + { + ::subxt::constants::Address::new_static( + "VoterList", + "BagThresholds", + [ + 103u8, 102u8, 255u8, 165u8, 124u8, 54u8, 5u8, 172u8, 112u8, 234u8, + 25u8, 175u8, 178u8, 19u8, 251u8, 73u8, 91u8, 192u8, 227u8, 81u8, 249u8, + 45u8, 126u8, 116u8, 7u8, 37u8, 9u8, 200u8, 167u8, 182u8, 12u8, 131u8, + ], + ) + } + } + } + } + pub mod nomination_pools { + 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 :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (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 { @@ -26445,11 +23953,11 @@ pub mod api { &self, amount: ::core::primitive::u128, pool_id: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "NominationPools", "join", - Join { amount, pool_id }, + types::Join { amount, pool_id }, [ 205u8, 66u8, 42u8, 72u8, 146u8, 148u8, 119u8, 162u8, 101u8, 183u8, 46u8, 176u8, 221u8, 204u8, 197u8, 20u8, 75u8, 226u8, 29u8, 118u8, @@ -26470,11 +23978,11 @@ pub mod api { extra: runtime_types::pallet_nomination_pools::BondExtra< ::core::primitive::u128, >, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "NominationPools", "bond_extra", - BondExtra { extra }, + types::BondExtra { extra }, [ 50u8, 72u8, 181u8, 216u8, 249u8, 27u8, 250u8, 177u8, 253u8, 22u8, 240u8, 100u8, 184u8, 202u8, 197u8, 34u8, 21u8, 188u8, 248u8, 191u8, @@ -26491,11 +23999,11 @@ pub mod api { #[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 { + pub fn claim_payout(&self) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "NominationPools", "claim_payout", - ClaimPayout {}, + types::ClaimPayout {}, [ 128u8, 58u8, 138u8, 55u8, 64u8, 16u8, 129u8, 25u8, 211u8, 229u8, 193u8, 115u8, 47u8, 45u8, 155u8, 221u8, 218u8, 1u8, 222u8, 5u8, 236u8, 32u8, @@ -26538,11 +24046,11 @@ pub mod api { &self, member_account: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, unbonding_points: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "NominationPools", "unbond", - Unbond { + types::Unbond { member_account, unbonding_points, }, @@ -26563,11 +24071,11 @@ pub mod api { &self, pool_id: ::core::primitive::u32, num_slashing_spans: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "NominationPools", "pool_withdraw_unbonded", - PoolWithdrawUnbonded { + types::PoolWithdrawUnbonded { pool_id, num_slashing_spans, }, @@ -26602,11 +24110,11 @@ pub mod api { &self, member_account: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, num_slashing_spans: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "NominationPools", "withdraw_unbonded", - WithdrawUnbonded { + types::WithdrawUnbonded { member_account, num_slashing_spans, }, @@ -26641,11 +24149,11 @@ pub mod api { 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 { ::subxt::tx::Payload::new_static( "NominationPools", "create", - Create { + types::Create { amount, root, nominator, @@ -26672,11 +24180,11 @@ pub mod api { 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 { ::subxt::tx::Payload::new_static( "NominationPools", "create_with_pool_id", - CreateWithPoolId { + types::CreateWithPoolId { amount, root, nominator, @@ -26701,11 +24209,11 @@ pub mod api { &self, pool_id: ::core::primitive::u32, validators: ::std::vec::Vec<::subxt::utils::AccountId32>, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "NominationPools", "nominate", - Nominate { + types::Nominate { pool_id, validators, }, @@ -26730,11 +24238,11 @@ pub mod api { &self, pool_id: ::core::primitive::u32, state: runtime_types::pallet_nomination_pools::PoolState, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "NominationPools", "set_state", - SetState { pool_id, state }, + types::SetState { pool_id, state }, [ 104u8, 40u8, 213u8, 88u8, 159u8, 115u8, 35u8, 249u8, 78u8, 180u8, 99u8, 1u8, 225u8, 218u8, 192u8, 151u8, 25u8, 194u8, 192u8, 187u8, 39u8, @@ -26751,11 +24259,11 @@ pub mod api { &self, pool_id: ::core::primitive::u32, metadata: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "NominationPools", "set_metadata", - SetMetadata { pool_id, 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, @@ -26794,11 +24302,11 @@ pub mod api { global_max_commission: runtime_types::pallet_nomination_pools::ConfigOp< runtime_types::sp_arithmetic::per_things::Perbill, >, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "NominationPools", "set_configs", - SetConfigs { + types::SetConfigs { min_join_bond, min_create_bond, max_pools, @@ -26833,11 +24341,11 @@ pub mod api { new_bouncer: runtime_types::pallet_nomination_pools::ConfigOp< ::subxt::utils::AccountId32, >, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "NominationPools", "update_roles", - UpdateRoles { + types::UpdateRoles { pool_id, new_root, new_nominator, @@ -26861,11 +24369,11 @@ pub mod api { pub fn chill( &self, pool_id: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "NominationPools", "chill", - Chill { pool_id }, + 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, @@ -26888,11 +24396,11 @@ pub mod api { extra: runtime_types::pallet_nomination_pools::BondExtra< ::core::primitive::u128, >, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "NominationPools", "bond_extra_other", - BondExtraOther { member, extra }, + 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, @@ -26915,11 +24423,11 @@ pub mod api { pub fn set_claim_permission( &self, permission: runtime_types::pallet_nomination_pools::ClaimPermission, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "NominationPools", "set_claim_permission", - SetClaimPermission { 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, @@ -26934,11 +24442,11 @@ pub mod api { pub fn claim_payout_other( &self, other: ::subxt::utils::AccountId32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "NominationPools", "claim_payout_other", - ClaimPayoutOther { 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, @@ -26958,11 +24466,11 @@ pub mod api { runtime_types::sp_arithmetic::per_things::Perbill, ::subxt::utils::AccountId32, )>, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "NominationPools", "set_commission", - SetCommission { + types::SetCommission { pool_id, new_commission, }, @@ -26982,11 +24490,11 @@ pub mod api { &self, pool_id: ::core::primitive::u32, max_commission: runtime_types::sp_arithmetic::per_things::Perbill, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "NominationPools", "set_commission_max", - SetCommissionMax { + types::SetCommissionMax { pool_id, max_commission, }, @@ -27007,11 +24515,11 @@ pub mod api { change_rate: runtime_types::pallet_nomination_pools::CommissionChangeRate< ::core::primitive::u32, >, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "NominationPools", "set_commission_change_rate", - SetCommissionChangeRate { + types::SetCommissionChangeRate { pool_id, change_rate, }, @@ -27031,11 +24539,11 @@ pub mod api { pub fn claim_commission( &self, pool_id: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "NominationPools", "claim_commission", - ClaimCommission { pool_id }, + types::ClaimCommission { pool_id }, [ 139u8, 126u8, 219u8, 117u8, 140u8, 51u8, 163u8, 32u8, 83u8, 60u8, 250u8, 44u8, 186u8, 194u8, 225u8, 84u8, 61u8, 181u8, 212u8, 160u8, @@ -28068,848 +25576,125 @@ 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 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, + 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, + } } 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, - eras_to_check: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "FastUnstake", - "control", - Control { eras_to_check }, - [ - 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, - ], - ) - } - } - } - #[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, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - 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"; - } - #[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 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, - } - 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 = " 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( - "FastUnstake", - "Head", - vec![], - [ - 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 = " 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( - &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( - "FastUnstake", - "Queue", - 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, - ], - ) - } - #[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, - ::core::primitive::u128, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "FastUnstake", - "Queue", - 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, - ], - ) - } - #[doc = "Counter for the related counted storage map"] - pub fn counter_for_queue( + #[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::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "FastUnstake", - "CounterForQueue", - vec![], + "register_fast_unstake", + types::RegisterFastUnstake {}, [ - 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, + 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 = " Number of eras to check per block."] + #[doc = "Deregister oneself from the fast-unstake."] #[doc = ""] - #[doc = " If set to 0, this pallet does absolutely nothing."] + #[doc = "This is useful if one is registered, they are still waiting, and they change their mind."] #[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, - ::core::primitive::u32, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( + #[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", - "ErasToCheckPerBlock", - vec![], + "deregister", + types::Deregister {}, [ - 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, + 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, ], ) } - } - } - pub mod constants { - use super::runtime_types; - 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( + #[doc = "Control the operation of this pallet."] + #[doc = ""] + #[doc = "Dispatch origin must be signed by the [`Config::ControlOrigin`]."] + pub fn control( + &self, + eras_to_check: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "FastUnstake", - "Deposit", + "control", + types::Control { eras_to_check }, [ - 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, + 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 parachains_origin { - use super::root_mod; - use super::runtime_types; - } - pub mod configuration { - 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, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (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, + ) + } } + } + #[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 :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -28919,25 +25704,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 SetHrmpChannelMaxMessageSize { - pub new: ::core::primitive::u32, + #[doc = "A staker was unstaked."] + pub struct Unstaked { + pub stash: ::subxt::utils::AccountId32, + pub result: ::core::result::Result<(), 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 SetHrmpMaxParachainOutboundChannels { - pub new: ::core::primitive::u32, + impl ::subxt::events::StaticEvent for Unstaked { + const PALLET: &'static str = "FastUnstake"; + const EVENT: &'static str = "Unstaked"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -28947,22 +25723,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 SetHrmpMaxParathreadOutboundChannels { - pub new: ::core::primitive::u32, + #[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, } - #[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, + impl ::subxt::events::StaticEvent for Slashed { + const PALLET: &'static str = "FastUnstake"; + const EVENT: &'static str = "Slashed"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -28974,8 +25742,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 SetUmpMaxIndividualWeight { - pub new: runtime_types::sp_weights::weight_v2::Weight, + #[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, @@ -28987,22 +25758,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 SetPvfCheckingEnabled { - pub new: ::core::primitive::bool, + #[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>, } - #[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 BatchChecked { + const PALLET: &'static str = "FastUnstake"; + const EVENT: &'static str = "BatchChecked"; } #[derive( :: subxt :: ext :: codec :: CompactAs, @@ -29015,47 +25777,802 @@ 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 = "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, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (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 BatchFinished { + const PALLET: &'static str = "FastUnstake"; + const EVENT: &'static str = "BatchFinished"; } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (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, + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[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( + "FastUnstake", + "Head", + vec![], + [ + 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 = " 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( + &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( + "FastUnstake", + "Queue", + 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, + ], + ) + } + #[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, + ::core::primitive::u128, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "FastUnstake", + "Queue", + 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, + ], + ) + } + #[doc = "Counter for the related counted storage map"] + pub fn counter_for_queue( + &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![], + [ + 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 = " 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( + &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![], + [ + 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, + ], + ) + } } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (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 mod constants { + use super::runtime_types; + 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", + [ + 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 { + 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 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 { @@ -29063,11 +26580,11 @@ pub mod api { pub fn set_validation_upgrade_cooldown( &self, new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Configuration", "set_validation_upgrade_cooldown", - SetValidationUpgradeCooldown { new }, + types::SetValidationUpgradeCooldown { new }, [ 109u8, 185u8, 0u8, 59u8, 177u8, 198u8, 76u8, 90u8, 108u8, 190u8, 56u8, 126u8, 147u8, 110u8, 76u8, 111u8, 38u8, 200u8, 230u8, 144u8, 42u8, @@ -29080,11 +26597,11 @@ pub mod api { pub fn set_validation_upgrade_delay( &self, new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Configuration", "set_validation_upgrade_delay", - SetValidationUpgradeDelay { new }, + types::SetValidationUpgradeDelay { new }, [ 18u8, 130u8, 158u8, 253u8, 160u8, 194u8, 220u8, 120u8, 9u8, 68u8, 232u8, 176u8, 34u8, 81u8, 200u8, 236u8, 141u8, 139u8, 62u8, 110u8, @@ -29097,11 +26614,11 @@ pub mod api { pub fn set_code_retention_period( &self, new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Configuration", "set_code_retention_period", - SetCodeRetentionPeriod { new }, + types::SetCodeRetentionPeriod { new }, [ 221u8, 140u8, 253u8, 111u8, 64u8, 236u8, 93u8, 52u8, 214u8, 245u8, 178u8, 30u8, 77u8, 166u8, 242u8, 252u8, 203u8, 106u8, 12u8, 195u8, @@ -29114,11 +26631,11 @@ pub mod api { pub fn set_max_code_size( &self, new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Configuration", "set_max_code_size", - SetMaxCodeSize { new }, + types::SetMaxCodeSize { new }, [ 232u8, 106u8, 45u8, 195u8, 27u8, 162u8, 188u8, 213u8, 137u8, 13u8, 123u8, 89u8, 215u8, 141u8, 231u8, 82u8, 205u8, 215u8, 73u8, 142u8, @@ -29131,11 +26648,11 @@ pub mod api { pub fn set_max_pov_size( &self, new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Configuration", "set_max_pov_size", - SetMaxPovSize { new }, + types::SetMaxPovSize { new }, [ 15u8, 176u8, 13u8, 19u8, 177u8, 160u8, 211u8, 238u8, 29u8, 194u8, 187u8, 235u8, 244u8, 65u8, 158u8, 47u8, 102u8, 221u8, 95u8, 10u8, 21u8, @@ -29147,11 +26664,11 @@ pub mod api { pub fn set_max_head_data_size( &self, new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Configuration", "set_max_head_data_size", - SetMaxHeadDataSize { new }, + types::SetMaxHeadDataSize { new }, [ 219u8, 128u8, 213u8, 65u8, 190u8, 224u8, 87u8, 80u8, 172u8, 112u8, 160u8, 229u8, 52u8, 1u8, 189u8, 125u8, 177u8, 139u8, 103u8, 39u8, 21u8, @@ -29163,11 +26680,11 @@ pub mod api { pub fn set_parathread_cores( &self, new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Configuration", "set_parathread_cores", - SetParathreadCores { new }, + types::SetParathreadCores { new }, [ 155u8, 102u8, 168u8, 202u8, 236u8, 87u8, 16u8, 128u8, 141u8, 99u8, 154u8, 162u8, 216u8, 198u8, 236u8, 233u8, 104u8, 230u8, 137u8, 132u8, @@ -29180,11 +26697,11 @@ pub mod api { pub fn set_parathread_retries( &self, new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Configuration", "set_parathread_retries", - SetParathreadRetries { new }, + 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, @@ -29196,11 +26713,11 @@ pub mod api { pub fn set_group_rotation_frequency( &self, new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Configuration", "set_group_rotation_frequency", - SetGroupRotationFrequency { new }, + types::SetGroupRotationFrequency { new }, [ 205u8, 222u8, 129u8, 36u8, 136u8, 186u8, 114u8, 70u8, 214u8, 22u8, 112u8, 65u8, 56u8, 42u8, 103u8, 93u8, 108u8, 242u8, 188u8, 229u8, @@ -29213,11 +26730,11 @@ pub mod api { pub fn set_chain_availability_period( &self, new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Configuration", "set_chain_availability_period", - SetChainAvailabilityPeriod { new }, + 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, @@ -29229,11 +26746,11 @@ pub mod api { pub fn set_thread_availability_period( &self, new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Configuration", "set_thread_availability_period", - SetThreadAvailabilityPeriod { new }, + 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, @@ -29245,11 +26762,11 @@ pub mod api { pub fn set_scheduling_lookahead( &self, new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Configuration", "set_scheduling_lookahead", - SetSchedulingLookahead { new }, + types::SetSchedulingLookahead { new }, [ 220u8, 74u8, 0u8, 150u8, 45u8, 29u8, 56u8, 210u8, 66u8, 12u8, 119u8, 176u8, 103u8, 24u8, 216u8, 55u8, 211u8, 120u8, 233u8, 204u8, 167u8, @@ -29262,11 +26779,11 @@ pub mod api { pub fn set_max_validators_per_core( &self, new: ::core::option::Option<::core::primitive::u32>, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Configuration", "set_max_validators_per_core", - SetMaxValidatorsPerCore { new }, + types::SetMaxValidatorsPerCore { new }, [ 227u8, 113u8, 192u8, 116u8, 114u8, 171u8, 27u8, 22u8, 84u8, 117u8, 146u8, 152u8, 94u8, 101u8, 14u8, 52u8, 228u8, 170u8, 163u8, 82u8, @@ -29279,11 +26796,11 @@ pub mod api { pub fn set_max_validators( &self, new: ::core::option::Option<::core::primitive::u32>, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Configuration", "set_max_validators", - SetMaxValidators { new }, + 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, @@ -29295,11 +26812,11 @@ pub mod api { pub fn set_dispute_period( &self, new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Configuration", "set_dispute_period", - SetDisputePeriod { new }, + types::SetDisputePeriod { new }, [ 36u8, 191u8, 142u8, 240u8, 48u8, 101u8, 10u8, 197u8, 117u8, 125u8, 156u8, 189u8, 130u8, 77u8, 242u8, 130u8, 205u8, 154u8, 152u8, 47u8, @@ -29312,12 +26829,12 @@ pub mod api { pub fn set_dispute_post_conclusion_acceptance_period( &self, new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Configuration", "set_dispute_post_conclusion_acceptance_period", - SetDisputePostConclusionAcceptancePeriod { new }, + 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, @@ -29330,11 +26847,11 @@ pub mod api { pub fn set_no_show_slots( &self, new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Configuration", "set_no_show_slots", - SetNoShowSlots { new }, + types::SetNoShowSlots { new }, [ 94u8, 230u8, 89u8, 131u8, 188u8, 246u8, 251u8, 34u8, 249u8, 16u8, 134u8, 63u8, 238u8, 115u8, 19u8, 97u8, 97u8, 218u8, 238u8, 115u8, @@ -29347,11 +26864,11 @@ pub mod api { pub fn set_n_delay_tranches( &self, new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Configuration", "set_n_delay_tranches", - SetNDelayTranches { new }, + types::SetNDelayTranches { new }, [ 195u8, 168u8, 178u8, 51u8, 20u8, 107u8, 227u8, 236u8, 57u8, 30u8, 130u8, 93u8, 149u8, 2u8, 161u8, 66u8, 48u8, 37u8, 71u8, 108u8, 195u8, @@ -29364,11 +26881,11 @@ pub mod api { pub fn set_zeroth_delay_tranche_width( &self, new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Configuration", "set_zeroth_delay_tranche_width", - SetZerothDelayTrancheWidth { new }, + types::SetZerothDelayTrancheWidth { new }, [ 69u8, 56u8, 125u8, 24u8, 181u8, 62u8, 99u8, 92u8, 166u8, 107u8, 91u8, 134u8, 230u8, 128u8, 214u8, 135u8, 245u8, 64u8, 62u8, 78u8, 96u8, @@ -29380,11 +26897,11 @@ pub mod api { pub fn set_needed_approvals( &self, new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Configuration", "set_needed_approvals", - SetNeededApprovals { new }, + types::SetNeededApprovals { new }, [ 238u8, 55u8, 134u8, 30u8, 67u8, 153u8, 150u8, 5u8, 226u8, 227u8, 185u8, 188u8, 66u8, 60u8, 147u8, 118u8, 46u8, 174u8, 104u8, 100u8, 26u8, @@ -29396,11 +26913,11 @@ pub mod api { pub fn set_relay_vrf_modulo_samples( &self, new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Configuration", "set_relay_vrf_modulo_samples", - SetRelayVrfModuloSamples { new }, + 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, @@ -29412,11 +26929,11 @@ pub mod api { pub fn set_max_upward_queue_count( &self, new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Configuration", "set_max_upward_queue_count", - SetMaxUpwardQueueCount { new }, + types::SetMaxUpwardQueueCount { new }, [ 116u8, 186u8, 216u8, 17u8, 150u8, 187u8, 86u8, 154u8, 92u8, 122u8, 178u8, 167u8, 215u8, 165u8, 55u8, 86u8, 229u8, 114u8, 10u8, 149u8, @@ -29429,11 +26946,11 @@ pub mod api { pub fn set_max_upward_queue_size( &self, new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Configuration", "set_max_upward_queue_size", - SetMaxUpwardQueueSize { new }, + 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, @@ -29445,11 +26962,11 @@ pub mod api { pub fn set_max_downward_message_size( &self, new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Configuration", "set_max_downward_message_size", - SetMaxDownwardMessageSize { new }, + types::SetMaxDownwardMessageSize { new }, [ 104u8, 25u8, 229u8, 184u8, 53u8, 246u8, 206u8, 180u8, 13u8, 156u8, 14u8, 224u8, 215u8, 115u8, 104u8, 127u8, 167u8, 189u8, 239u8, 183u8, @@ -29462,11 +26979,11 @@ pub mod api { pub fn set_ump_service_total_weight( &self, new: runtime_types::sp_weights::weight_v2::Weight, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Configuration", "set_ump_service_total_weight", - SetUmpServiceTotalWeight { new }, + types::SetUmpServiceTotalWeight { new }, [ 178u8, 63u8, 233u8, 183u8, 160u8, 109u8, 10u8, 162u8, 150u8, 110u8, 66u8, 166u8, 197u8, 207u8, 91u8, 208u8, 137u8, 106u8, 140u8, 184u8, @@ -29479,11 +26996,11 @@ pub mod api { pub fn set_max_upward_message_size( &self, new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Configuration", "set_max_upward_message_size", - SetMaxUpwardMessageSize { new }, + types::SetMaxUpwardMessageSize { new }, [ 213u8, 120u8, 21u8, 247u8, 101u8, 21u8, 164u8, 228u8, 33u8, 115u8, 20u8, 138u8, 28u8, 174u8, 247u8, 39u8, 194u8, 113u8, 34u8, 73u8, 142u8, @@ -29496,11 +27013,12 @@ pub mod api { pub fn set_max_upward_message_num_per_candidate( &self, new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload + { ::subxt::tx::Payload::new_static( "Configuration", "set_max_upward_message_num_per_candidate", - SetMaxUpwardMessageNumPerCandidate { new }, + types::SetMaxUpwardMessageNumPerCandidate { new }, [ 54u8, 133u8, 226u8, 138u8, 184u8, 27u8, 130u8, 153u8, 130u8, 196u8, 54u8, 79u8, 124u8, 10u8, 37u8, 139u8, 59u8, 190u8, 169u8, 87u8, 255u8, @@ -29512,11 +27030,11 @@ pub mod api { pub fn set_hrmp_open_request_ttl( &self, new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Configuration", "set_hrmp_open_request_ttl", - SetHrmpOpenRequestTtl { new }, + types::SetHrmpOpenRequestTtl { new }, [ 192u8, 113u8, 113u8, 133u8, 197u8, 75u8, 88u8, 67u8, 130u8, 207u8, 37u8, 192u8, 157u8, 159u8, 114u8, 75u8, 83u8, 180u8, 194u8, 180u8, @@ -29529,11 +27047,11 @@ pub mod api { pub fn set_hrmp_sender_deposit( &self, new: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Configuration", "set_hrmp_sender_deposit", - SetHrmpSenderDeposit { new }, + 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, @@ -29546,11 +27064,11 @@ pub mod api { pub fn set_hrmp_recipient_deposit( &self, new: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Configuration", "set_hrmp_recipient_deposit", - SetHrmpRecipientDeposit { new }, + types::SetHrmpRecipientDeposit { new }, [ 209u8, 212u8, 164u8, 56u8, 71u8, 215u8, 98u8, 250u8, 202u8, 150u8, 228u8, 6u8, 166u8, 94u8, 171u8, 142u8, 10u8, 253u8, 89u8, 43u8, 6u8, @@ -29562,11 +27080,11 @@ pub mod api { pub fn set_hrmp_channel_max_capacity( &self, new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Configuration", "set_hrmp_channel_max_capacity", - SetHrmpChannelMaxCapacity { new }, + types::SetHrmpChannelMaxCapacity { new }, [ 148u8, 109u8, 67u8, 220u8, 1u8, 115u8, 70u8, 93u8, 138u8, 190u8, 60u8, 220u8, 80u8, 137u8, 246u8, 230u8, 115u8, 162u8, 30u8, 197u8, 11u8, @@ -29578,11 +27096,11 @@ pub mod api { pub fn set_hrmp_channel_max_total_size( &self, new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Configuration", "set_hrmp_channel_max_total_size", - SetHrmpChannelMaxTotalSize { new }, + types::SetHrmpChannelMaxTotalSize { new }, [ 79u8, 40u8, 207u8, 173u8, 168u8, 143u8, 130u8, 240u8, 205u8, 34u8, 61u8, 217u8, 215u8, 106u8, 61u8, 181u8, 8u8, 21u8, 105u8, 64u8, 183u8, @@ -29594,11 +27112,12 @@ pub mod api { pub fn set_hrmp_max_parachain_inbound_channels( &self, new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload + { ::subxt::tx::Payload::new_static( "Configuration", "set_hrmp_max_parachain_inbound_channels", - SetHrmpMaxParachainInboundChannels { new }, + types::SetHrmpMaxParachainInboundChannels { new }, [ 91u8, 215u8, 212u8, 131u8, 140u8, 185u8, 119u8, 184u8, 61u8, 121u8, 120u8, 73u8, 202u8, 98u8, 124u8, 187u8, 171u8, 84u8, 136u8, 77u8, @@ -29611,11 +27130,12 @@ pub mod api { pub fn set_hrmp_max_parathread_inbound_channels( &self, new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload + { ::subxt::tx::Payload::new_static( "Configuration", "set_hrmp_max_parathread_inbound_channels", - SetHrmpMaxParathreadInboundChannels { new }, + 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, @@ -29627,11 +27147,11 @@ pub mod api { pub fn set_hrmp_channel_max_message_size( &self, new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Configuration", "set_hrmp_channel_max_message_size", - SetHrmpChannelMaxMessageSize { new }, + types::SetHrmpChannelMaxMessageSize { new }, [ 17u8, 224u8, 230u8, 9u8, 114u8, 221u8, 138u8, 46u8, 234u8, 151u8, 27u8, 34u8, 179u8, 67u8, 113u8, 228u8, 128u8, 212u8, 209u8, 125u8, 122u8, @@ -29643,11 +27163,12 @@ pub mod api { pub fn set_hrmp_max_parachain_outbound_channels( &self, new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload + { ::subxt::tx::Payload::new_static( "Configuration", "set_hrmp_max_parachain_outbound_channels", - SetHrmpMaxParachainOutboundChannels { new }, + types::SetHrmpMaxParachainOutboundChannels { new }, [ 26u8, 146u8, 150u8, 88u8, 236u8, 8u8, 63u8, 103u8, 71u8, 11u8, 20u8, 210u8, 205u8, 106u8, 101u8, 112u8, 116u8, 73u8, 116u8, 136u8, 149u8, @@ -29659,11 +27180,12 @@ pub mod api { pub fn set_hrmp_max_parathread_outbound_channels( &self, new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload + { ::subxt::tx::Payload::new_static( "Configuration", "set_hrmp_max_parathread_outbound_channels", - SetHrmpMaxParathreadOutboundChannels { new }, + 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, @@ -29675,11 +27197,11 @@ pub mod api { pub fn set_hrmp_max_message_num_per_candidate( &self, new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Configuration", "set_hrmp_max_message_num_per_candidate", - SetHrmpMaxMessageNumPerCandidate { new }, + types::SetHrmpMaxMessageNumPerCandidate { new }, [ 244u8, 94u8, 225u8, 194u8, 133u8, 116u8, 202u8, 238u8, 8u8, 57u8, 122u8, 125u8, 6u8, 131u8, 84u8, 102u8, 180u8, 67u8, 250u8, 136u8, 30u8, @@ -29692,11 +27214,11 @@ pub mod api { pub fn set_ump_max_individual_weight( &self, new: runtime_types::sp_weights::weight_v2::Weight, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Configuration", "set_ump_max_individual_weight", - SetUmpMaxIndividualWeight { new }, + types::SetUmpMaxIndividualWeight { new }, [ 66u8, 190u8, 15u8, 172u8, 67u8, 16u8, 117u8, 247u8, 176u8, 25u8, 163u8, 130u8, 147u8, 224u8, 226u8, 101u8, 219u8, 173u8, 176u8, 49u8, 90u8, @@ -29708,11 +27230,11 @@ pub mod api { pub fn set_pvf_checking_enabled( &self, new: ::core::primitive::bool, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Configuration", "set_pvf_checking_enabled", - SetPvfCheckingEnabled { new }, + types::SetPvfCheckingEnabled { new }, [ 123u8, 76u8, 1u8, 112u8, 174u8, 245u8, 18u8, 67u8, 13u8, 29u8, 219u8, 197u8, 201u8, 112u8, 230u8, 191u8, 37u8, 148u8, 73u8, 125u8, 54u8, @@ -29724,11 +27246,11 @@ pub mod api { pub fn set_pvf_voting_ttl( &self, new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Configuration", "set_pvf_voting_ttl", - SetPvfVotingTtl { new }, + 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, @@ -29743,11 +27265,11 @@ pub mod api { pub fn set_minimum_validation_upgrade_delay( &self, new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Configuration", "set_minimum_validation_upgrade_delay", - SetMinimumValidationUpgradeDelay { new }, + types::SetMinimumValidationUpgradeDelay { new }, [ 205u8, 188u8, 75u8, 136u8, 228u8, 26u8, 112u8, 27u8, 119u8, 37u8, 252u8, 109u8, 23u8, 145u8, 21u8, 212u8, 7u8, 28u8, 242u8, 210u8, 182u8, @@ -29761,11 +27283,11 @@ pub mod api { pub fn set_bypass_consistency_check( &self, new: ::core::primitive::bool, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Configuration", "set_bypass_consistency_check", - SetBypassConsistencyCheck { new }, + types::SetBypassConsistencyCheck { new }, [ 80u8, 66u8, 200u8, 98u8, 54u8, 207u8, 64u8, 99u8, 162u8, 121u8, 26u8, 173u8, 113u8, 224u8, 240u8, 106u8, 69u8, 191u8, 177u8, 107u8, 34u8, @@ -29778,11 +27300,11 @@ pub mod api { pub fn set_async_backing_params( &self, new: runtime_types::polkadot_primitives::vstaging::AsyncBackingParams, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Configuration", "set_async_backing_params", - SetAsyncBackingParams { new }, + types::SetAsyncBackingParams { new }, [ 124u8, 182u8, 66u8, 138u8, 209u8, 54u8, 42u8, 232u8, 110u8, 67u8, 248u8, 16u8, 61u8, 38u8, 120u8, 242u8, 34u8, 240u8, 219u8, 169u8, @@ -29795,11 +27317,11 @@ pub mod api { pub fn set_executor_params( &self, new: runtime_types::polkadot_primitives::v4::executor_params::ExecutorParams, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Configuration", "set_executor_params", - SetExecutorParams { new }, + types::SetExecutorParams { new }, [ 193u8, 235u8, 143u8, 62u8, 34u8, 192u8, 162u8, 49u8, 224u8, 10u8, 189u8, 132u8, 70u8, 114u8, 50u8, 155u8, 39u8, 238u8, 238u8, 161u8, @@ -29890,6 +27412,9 @@ pub mod api { 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 {} } @@ -29974,6 +27499,9 @@ pub mod api { 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 {} } @@ -30162,23 +27690,26 @@ 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 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 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 { @@ -30191,11 +27722,11 @@ pub mod api { runtime_types::sp_runtime::traits::BlakeTwo256, >, >, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "ParaInherent", "enter", - Enter { data }, + types::Enter { data }, [ 196u8, 247u8, 84u8, 213u8, 181u8, 15u8, 195u8, 125u8, 252u8, 46u8, 165u8, 1u8, 23u8, 159u8, 187u8, 34u8, 8u8, 15u8, 44u8, 240u8, 136u8, @@ -30446,116 +27977,120 @@ 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 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 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 { @@ -30564,11 +28099,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( "Paras", "force_set_current_code", - ForceSetCurrentCode { para, new_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, @@ -30581,11 +28116,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( "Paras", "force_set_current_head", - ForceSetCurrentHead { para, new_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, @@ -30599,11 +28134,11 @@ pub mod api { para: runtime_types::polkadot_parachain::primitives::Id, new_code: runtime_types::polkadot_parachain::primitives::ValidationCode, relay_parent_number: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Paras", "force_schedule_code_upgrade", - ForceScheduleCodeUpgrade { + types::ForceScheduleCodeUpgrade { para, new_code, relay_parent_number, @@ -30621,11 +28156,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( "Paras", "force_note_new_head", - ForceNoteNewHead { para, 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, @@ -30639,11 +28174,11 @@ pub mod api { pub fn force_queue_action( &self, para: runtime_types::polkadot_parachain::primitives::Id, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Paras", "force_queue_action", - ForceQueueAction { para }, + types::ForceQueueAction { para }, [ 195u8, 243u8, 79u8, 34u8, 111u8, 246u8, 109u8, 90u8, 251u8, 137u8, 48u8, 23u8, 117u8, 29u8, 26u8, 200u8, 37u8, 64u8, 36u8, 254u8, 224u8, @@ -30667,11 +28202,11 @@ pub mod api { pub fn add_trusted_validation_code( &self, validation_code: runtime_types::polkadot_parachain::primitives::ValidationCode, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Paras", "add_trusted_validation_code", - AddTrustedValidationCode { 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, @@ -30687,11 +28222,11 @@ pub mod api { pub fn poke_unused_validation_code( &self, validation_code_hash : runtime_types :: polkadot_parachain :: primitives :: ValidationCodeHash, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Paras", "poke_unused_validation_code", - PokeUnusedValidationCode { + types::PokeUnusedValidationCode { validation_code_hash, }, [ @@ -30708,11 +28243,11 @@ pub mod api { &self, stmt: runtime_types::polkadot_primitives::v4::PvfCheckStatement, signature: runtime_types::polkadot_primitives::v4::validator_app::Signature, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Paras", "include_pvf_check_statement", - IncludePvfCheckStatement { stmt, signature }, + 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, @@ -31771,19 +29306,22 @@ 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 ForceApprove { - pub up_to: ::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 ForceApprove { + pub up_to: ::core::primitive::u32, + } } pub struct TransactionApi; impl TransactionApi { @@ -31793,11 +29331,11 @@ pub mod api { pub fn force_approve( &self, up_to: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Initializer", "force_approve", - ForceApprove { up_to }, + 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, @@ -31870,6 +29408,9 @@ pub mod api { 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 {} } @@ -32000,19 +29541,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 ServiceOverweight { - pub index: ::core::primitive::u64, - pub weight_limit: runtime_types::sp_weights::weight_v2::Weight, + 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 { @@ -32032,11 +29576,11 @@ pub mod api { &self, index: ::core::primitive::u64, weight_limit: runtime_types::sp_weights::weight_v2::Weight, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Ump", "service_overweight", - ServiceOverweight { + types::ServiceOverweight { index, weight_limit, }, @@ -32485,119 +30029,122 @@ 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 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 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 { @@ -32616,11 +30163,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, @@ -32639,11 +30186,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, @@ -32658,11 +30205,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, @@ -32682,11 +30229,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, @@ -32708,11 +30255,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, @@ -32730,11 +30277,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, @@ -32754,11 +30301,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, }, @@ -32782,11 +30329,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, @@ -33714,24 +31261,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, @@ -34023,129 +31573,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 { @@ -34168,11 +31723,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, @@ -34197,11 +31752,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, @@ -34221,11 +31776,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, @@ -34248,11 +31803,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, @@ -34267,11 +31822,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, @@ -34293,11 +31848,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, @@ -34313,11 +31868,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, @@ -34332,11 +31887,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, @@ -34351,11 +31906,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, @@ -34597,48 +32152,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 { @@ -34653,11 +32211,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, @@ -34677,11 +32235,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, @@ -34699,11 +32257,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, @@ -34894,55 +32452,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."] @@ -34954,11 +32515,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, }, @@ -34993,11 +32554,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, @@ -35014,11 +32575,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, @@ -35407,153 +32968,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 { @@ -35569,11 +33135,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, @@ -35595,11 +33161,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, @@ -35633,11 +33199,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, @@ -35654,11 +33220,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, @@ -35671,11 +33237,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, @@ -35694,11 +33260,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, @@ -35721,11 +33287,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, @@ -35739,11 +33305,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, @@ -35757,11 +33323,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, @@ -36151,153 +33717,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: 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 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 { @@ -36305,11 +33874,11 @@ 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), }, @@ -36341,11 +33910,11 @@ 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), @@ -36380,11 +33949,11 @@ 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), @@ -36412,11 +33981,11 @@ pub mod api { &self, message: runtime_types::xcm::VersionedXcm, max_weight: runtime_types::sp_weights::weight_v2::Weight, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "XcmPallet", "execute", - Execute { + types::Execute { message: ::std::boxed::Box::new(message), max_weight, }, @@ -36437,11 +34006,11 @@ pub mod api { &self, 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, }, @@ -36460,11 +34029,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, @@ -36479,11 +34048,11 @@ 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), }, [ @@ -36502,11 +34071,11 @@ 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), }, [ @@ -36541,11 +34110,11 @@ pub mod api { assets: runtime_types::xcm::VersionedMultiAssets, fee_asset_item: ::core::primitive::u32, weight_limit: runtime_types::xcm::v3::WeightLimit, - ) -> ::subxt::tx::Payload { + ) -> ::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), @@ -36583,11 +34152,11 @@ pub mod api { assets: runtime_types::xcm::VersionedMultiAssets, fee_asset_item: ::core::primitive::u32, weight_limit: runtime_types::xcm::v3::WeightLimit, - ) -> ::subxt::tx::Payload { + ) -> ::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), @@ -46273,55 +43842,6 @@ pub mod api { }, } } - 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 FeeDetails<_0> { - pub inclusion_fee: ::core::option::Option< - runtime_types::pallet_transaction_payment::types::InclusionFee<_0>, - >, - pub tip: _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 InclusionFee<_0> { - pub base_fee: _0, - pub len_fee: _0, - pub adjusted_weight_fee: _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 RuntimeDispatchInfo<_0, _1> { - pub weight: _1, - pub class: runtime_types::frame_support::dispatch::DispatchClass, - pub partial_fee: _0, - } - } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -47935,38 +45455,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 CandidateEvent<_0> { - #[codec(index = 0)] - CandidateBacked( - runtime_types::polkadot_primitives::v4::CandidateReceipt<_0>, - runtime_types::polkadot_parachain::primitives::HeadData, - runtime_types::polkadot_primitives::v4::CoreIndex, - runtime_types::polkadot_primitives::v4::GroupIndex, - ), - #[codec(index = 1)] - CandidateIncluded( - runtime_types::polkadot_primitives::v4::CandidateReceipt<_0>, - runtime_types::polkadot_parachain::primitives::HeadData, - runtime_types::polkadot_primitives::v4::CoreIndex, - runtime_types::polkadot_primitives::v4::GroupIndex, - ), - #[codec(index = 2)] - CandidateTimedOut( - runtime_types::polkadot_primitives::v4::CandidateReceipt<_0>, - runtime_types::polkadot_parachain::primitives::HeadData, - runtime_types::polkadot_primitives::v4::CoreIndex, - ), - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[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::v4::CandidateDescriptor<_0>, pub commitments_hash: _0, @@ -48025,24 +45513,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 CoreState<_0, _1> { - #[codec(index = 0)] - Occupied(runtime_types::polkadot_primitives::v4::OccupiedCore<_0, _1>), - #[codec(index = 1)] - Scheduled(runtime_types::polkadot_primitives::v4::ScheduledCore), - #[codec(index = 2)] - Free, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct DisputeState<_0> { pub validators_for: ::subxt::utils::bits::DecodedBits< ::core::primitive::u8, @@ -48112,21 +45582,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 struct GroupRotationInfo<_0> { - pub session_start_block: _0, - pub group_rotation_frequency: _0, - pub now: _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 IndexedVec<_0, _1>( pub ::std::vec::Vec<_1>, #[codec(skip)] pub ::core::marker::PhantomData<_0>, @@ -48182,52 +45637,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 struct OccupiedCore<_0, _1> { - pub next_up_on_available: ::core::option::Option< - runtime_types::polkadot_primitives::v4::ScheduledCore, - >, - pub occupied_since: _1, - pub time_out_at: _1, - pub next_up_on_time_out: ::core::option::Option< - runtime_types::polkadot_primitives::v4::ScheduledCore, - >, - pub availability: ::subxt::utils::bits::DecodedBits< - ::core::primitive::u8, - ::subxt::utils::bits::Lsb0, - >, - pub group_responsible: runtime_types::polkadot_primitives::v4::GroupIndex, - pub candidate_hash: runtime_types::polkadot_core_primitives::CandidateHash, - pub candidate_descriptor: - runtime_types::polkadot_primitives::v4::CandidateDescriptor<_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 OccupiedCoreAssumption { - #[codec(index = 0)] - Included, - #[codec(index = 1)] - TimedOut, - #[codec(index = 2)] - Free, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ParathreadClaim( pub runtime_types::polkadot_parachain::primitives::Id, pub runtime_types::polkadot_primitives::v4::collator_app::Public, @@ -48256,22 +45665,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 struct PersistedValidationData<_0, _1> { - pub parent_head: runtime_types::polkadot_parachain::primitives::HeadData, - pub relay_parent_number: _1, - pub relay_parent_storage_root: _0, - pub max_pov_size: _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 struct PvfCheckStatement { pub accept: ::core::primitive::bool, pub subject: runtime_types::polkadot_parachain::primitives::ValidationCodeHash, @@ -48320,22 +45713,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 struct ScheduledCore { - pub para_id: runtime_types::polkadot_parachain::primitives::Id, - pub collator: ::core::option::Option< - runtime_types::polkadot_primitives::v4::collator_app::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 ScrapedOnChainVotes<_0> { pub session: ::core::primitive::u32, pub backing_validators_per_candidate: ::std::vec::Vec<( @@ -51625,182 +49002,10 @@ 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 BabeConfiguration { - pub slot_duration: ::core::primitive::u64, - pub epoch_length: ::core::primitive::u64, - pub c: (::core::primitive::u64, ::core::primitive::u64), - pub authorities: ::std::vec::Vec<( - runtime_types::sp_consensus_babe::app::Public, - ::core::primitive::u64, - )>, - pub randomness: [::core::primitive::u8; 32usize], - pub allowed_slots: runtime_types::sp_consensus_babe::AllowedSlots, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct BabeEpochConfiguration { pub c: (::core::primitive::u64, ::core::primitive::u64), pub allowed_slots: runtime_types::sp_consensus_babe::AllowedSlots, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Epoch { - pub epoch_index: ::core::primitive::u64, - pub start_slot: runtime_types::sp_consensus_slots::Slot, - pub duration: ::core::primitive::u64, - pub authorities: ::std::vec::Vec<( - runtime_types::sp_consensus_babe::app::Public, - ::core::primitive::u64, - )>, - pub randomness: [::core::primitive::u8; 32usize], - pub config: runtime_types::sp_consensus_babe::BabeEpochConfiguration, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct OpaqueKeyOwnershipProof(pub ::std::vec::Vec<::core::primitive::u8>); - } - pub mod sp_consensus_beefy { - use super::runtime_types; - pub mod commitment { - 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 Commitment<_0> { - pub payload: runtime_types::sp_consensus_beefy::payload::Payload, - pub block_number: _0, - pub validator_set_id: ::core::primitive::u64, - } - } - pub mod crypto { - 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::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 struct Signature(pub runtime_types::sp_core::ecdsa::Signature); - } - pub mod payload { - 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 Payload( - pub ::std::vec::Vec<( - [::core::primitive::u8; 2usize], - ::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 EquivocationProof<_0, _1, _2> { - pub first: runtime_types::sp_consensus_beefy::VoteMessage<_0, _1, _2>, - pub second: runtime_types::sp_consensus_beefy::VoteMessage<_0, _1, _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 OpaqueKeyOwnershipProof(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 ValidatorSet<_0> { - pub validators: ::std::vec::Vec<_0>, - pub id: ::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 VoteMessage<_0, _1, _2> { - pub commitment: runtime_types::sp_consensus_beefy::commitment::Commitment<_0>, - pub id: _1, - pub signature: _2, - } } pub mod sp_consensus_grandpa { use super::runtime_types; @@ -51871,17 +49076,6 @@ pub mod api { pub set_id: ::core::primitive::u64, pub equivocation: runtime_types::sp_consensus_grandpa::Equivocation<_0, _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 struct OpaqueKeyOwnershipProof(pub ::std::vec::Vec<::core::primitive::u8>); } pub mod sp_consensus_slots { use super::runtime_types; @@ -52061,17 +49255,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 struct OpaqueMetadata(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 OpaquePeerId(pub ::std::vec::Vec<::core::primitive::u8>); #[derive( :: subxt :: ext :: codec :: Decode, @@ -52085,101 +49268,6 @@ pub mod api { #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum Void {} } - pub mod sp_inherents { - 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 CheckInherentsResult { - pub okay: ::core::primitive::bool, - pub fatal_error: ::core::primitive::bool, - pub errors: runtime_types::sp_inherents::InherentData, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct InherentData { - pub data: ::subxt::utils::KeyedVec< - [::core::primitive::u8; 8usize], - ::std::vec::Vec<::core::primitive::u8>, - >, - } - } - pub mod sp_mmr_primitives { - 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 EncodableOpaqueLeaf(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 Error { - #[codec(index = 0)] - InvalidNumericOp, - #[codec(index = 1)] - Push, - #[codec(index = 2)] - GetRoot, - #[codec(index = 3)] - Commit, - #[codec(index = 4)] - GenerateProof, - #[codec(index = 5)] - Verify, - #[codec(index = 6)] - LeafNotFound, - #[codec(index = 7)] - PalletNotIncluded, - #[codec(index = 8)] - InvalidLeafIndex, - #[codec(index = 9)] - InvalidBestKnownBlock, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Proof<_0> { - pub leaf_indices: ::std::vec::Vec<::core::primitive::u64>, - pub leaf_count: ::core::primitive::u64, - pub items: ::std::vec::Vec<_0>, - } - } pub mod sp_npos_elections { use super::runtime_types; #[derive( @@ -52216,23 +49304,6 @@ pub mod api { use super::runtime_types; pub mod generic { use super::runtime_types; - pub mod block { - 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 Block<_0, _1> { - pub header: _0, - pub extrinsics: ::std::vec::Vec<_1>, - } - } pub mod digest { use super::runtime_types; #[derive( @@ -52863,112 +49934,6 @@ pub mod api { #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct BlakeTwo256; } - pub mod transaction_validity { - 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 InvalidTransaction { - #[codec(index = 0)] - Call, - #[codec(index = 1)] - Payment, - #[codec(index = 2)] - Future, - #[codec(index = 3)] - Stale, - #[codec(index = 4)] - BadProof, - #[codec(index = 5)] - AncientBirthBlock, - #[codec(index = 6)] - ExhaustsResources, - #[codec(index = 7)] - Custom(::core::primitive::u8), - #[codec(index = 8)] - BadMandatory, - #[codec(index = 9)] - MandatoryValidation, - #[codec(index = 10)] - BadSigner, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [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 TransactionSource { - #[codec(index = 0)] - InBlock, - #[codec(index = 1)] - Local, - #[codec(index = 2)] - External, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [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 TransactionValidityError { - #[codec(index = 0)] - Invalid(runtime_types::sp_runtime::transaction_validity::InvalidTransaction), - #[codec(index = 1)] - Unknown(runtime_types::sp_runtime::transaction_validity::UnknownTransaction), - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [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 UnknownTransaction { - #[codec(index = 0)] - CannotLookup, - #[codec(index = 1)] - NoUnsignedValidator, - #[codec(index = 2)] - Custom(::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 ValidTransaction { - pub priority: ::core::primitive::u64, - pub requires: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, - pub provides: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, - pub longevity: ::core::primitive::u64, - pub propagate: ::core::primitive::bool, - } - } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, From ff64caa71dd1bd8b6b3e2ce4baed73421494c22b Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Tue, 2 May 2023 23:52:25 +0300 Subject: [PATCH 54/66] codegen: Adjust fetch_metadata to inspect version list Signed-off-by: Alexandru Vasile --- codegen/src/utils/fetch_metadata.rs | 106 ++++++++++++++++++++++++---- 1 file changed, 91 insertions(+), 15 deletions(-) diff --git a/codegen/src/utils/fetch_metadata.rs b/codegen/src/utils/fetch_metadata.rs index a367503a04..feb2b359a9 100644 --- a/codegen/src/utils/fetch_metadata.rs +++ b/codegen/src/utils/fetch_metadata.rs @@ -77,6 +77,16 @@ pub async fn fetch_metadata_hex( Ok(hex_data) } +async fn fetch_latest_stable(client: impl ClientT) -> Result, FetchMetadataError> { + // Fetch latest stable metadata of a node via `Metadata_metadata`. + let raw: String = client + .request("state_call", rpc_params!["Metadata_metadata", "0x"]) + .await?; + let raw_bytes = hex::decode(raw.trim_start_matches("0x"))?; + let bytes: frame_metadata::OpaqueMetadata = Decode::decode(&mut &raw_bytes[..])?; + Ok(bytes.0) +} + /// Execute runtime API call and return the specified runtime metadata version. async fn fetch_metadata( client: impl ClientT, @@ -84,15 +94,68 @@ async fn fetch_metadata( ) -> Result, FetchMetadataError> { const UNSTABLE_METADATA_VERSION: u32 = u32::MAX; + // Note: `Metadata_metadata_versions` may not be present on all nodes. + // Once every node supports the new RPC methods, we can simplify the code a bit. + let supported: Option> = client + .request( + "state_call", + rpc_params!["Metadata_metadata_versions", "0x"], + ) + .await + .ok() + .map(|raw: String| { + let raw_bytes = hex::decode(raw.trim_start_matches("0x"))?; + let versions: Vec = Decode::decode(&mut &raw_bytes[..])?; + Ok::, FetchMetadataError>(versions) + }) + .transpose()?; + + // Ensure the user requested a valid version if done implicitly. + if let (Some(supported_versions), MetadataVersion::Version(request_version)) = + (&supported, &version) + { + if !supported_versions.is_empty() + && !supported_versions + .iter() + .any(|value| value == request_version) + { + return Err(FetchMetadataError::Other(format!( + "Metadata version {} not supported", + request_version + )))?; + } + } + + let mut is_latest = false; let version_num = match version { MetadataVersion::Latest => { - // Fetch latest stable metadata of a node via `Metadata_metadata`. - let raw: String = client - .request("state_call", rpc_params!["Metadata_metadata", "0x"]) - .await?; - let raw_bytes = hex::decode(raw.trim_start_matches("0x"))?; - let bytes: frame_metadata::OpaqueMetadata = Decode::decode(&mut &raw_bytes[..])?; - return Ok(bytes.0); + // If he have a valid supported version, find the latest stable version number. + let version_num = if let Some(supported_versions) = &supported { + supported_versions + .iter() + .fold(None, |max, value| match (max, value) { + (None, value) => Some(value), + (Some(old_max), value) => { + if value != &UNSTABLE_METADATA_VERSION && value > old_max { + Some(value) + } else { + Some(old_max) + } + } + }) + } else { + // List not exposed by node. + None + }; + + if let Some(version_num) = version_num { + // Use the latest stable from the provided list. + is_latest = true; + *version_num + } else { + // List is empty or the node does not expose the list of supported versions. + return fetch_latest_stable(client).await; + } } MetadataVersion::Version(version) => version, MetadataVersion::Unstable => UNSTABLE_METADATA_VERSION, @@ -102,21 +165,34 @@ async fn fetch_metadata( let bytes = version_num.encode(); let version: String = format!("0x{}", hex::encode(&bytes)); - let raw: String = client + let result: Result = client .request( "state_call", rpc_params!["Metadata_metadata_at_version", &version], ) - .await?; + .await; - let raw_bytes = hex::decode(raw.trim_start_matches("0x"))?; + match result { + Ok(raw) => { + let raw_bytes = hex::decode(raw.trim_start_matches("0x"))?; - let opaque: Option = Decode::decode(&mut &raw_bytes[..])?; - let bytes = opaque.ok_or(FetchMetadataError::Other( - "Metadata version not found".into(), - ))?; + let opaque: Option = + Decode::decode(&mut &raw_bytes[..])?; + let bytes = opaque.ok_or(FetchMetadataError::Other( + "Metadata version not found".into(), + ))?; - Ok(bytes.0) + Ok(bytes.0) + } + Err(err) => { + // Try to fetch the latest with `Metadata_metadata`. + if is_latest { + fetch_latest_stable(client).await + } else { + Err(err.into()) + } + } + } } async fn fetch_metadata_ws( From 9e02da4ed29d5ee39fe4d37273c03becac613fe4 Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Wed, 3 May 2023 00:18:25 +0300 Subject: [PATCH 55/66] testing: Adjust metadata to metadata_legacy Signed-off-by: Alexandru Vasile --- testing/integration-tests/src/blocks/mod.rs | 2 +- testing/integration-tests/src/client/mod.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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); } From 0e17af5e589b93baa3c0e3c3e368570fdb4294eb Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Wed, 3 May 2023 09:35:38 +0300 Subject: [PATCH 56/66] events: Adjust docs to use metadata_legacy Signed-off-by: Alexandru Vasile --- subxt/src/events/events_type.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subxt/src/events/events_type.rs b/subxt/src/events/events_type.rs index 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(()) From b336ff30e80f2db966232e2e49c648842b898666 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Wed, 3 May 2023 13:20:58 +0100 Subject: [PATCH 57/66] have a pass over fetch_metadata --- codegen/src/utils/fetch_metadata.rs | 202 +++++++++++----------------- 1 file changed, 82 insertions(+), 120 deletions(-) diff --git a/codegen/src/utils/fetch_metadata.rs b/codegen/src/utils/fetch_metadata.rs index feb2b359a9..8b671f413e 100644 --- a/codegen/src/utils/fetch_metadata.rs +++ b/codegen/src/utils/fetch_metadata.rs @@ -3,7 +3,7 @@ // see LICENSE for license details. use crate::error::FetchMetadataError; -use codec::{Decode, Encode}; +use codec::{Decode}; use jsonrpsee::{ async_client::ClientBuilder, client_transport::ws::{Uri, WsTransportClientBuilder}, @@ -14,7 +14,7 @@ use jsonrpsee::{ use std::time::Duration; /// The metadata version that is fetched from the node. -#[derive(Default)] +#[derive(Default, Clone, Copy)] pub enum MetadataVersion { /// Latest stable version of the metadata. #[default] @@ -77,124 +77,6 @@ pub async fn fetch_metadata_hex( Ok(hex_data) } -async fn fetch_latest_stable(client: impl ClientT) -> Result, FetchMetadataError> { - // Fetch latest stable metadata of a node via `Metadata_metadata`. - let raw: String = client - .request("state_call", rpc_params!["Metadata_metadata", "0x"]) - .await?; - let raw_bytes = hex::decode(raw.trim_start_matches("0x"))?; - let bytes: frame_metadata::OpaqueMetadata = Decode::decode(&mut &raw_bytes[..])?; - Ok(bytes.0) -} - -/// Execute runtime API call and return the specified runtime metadata version. -async fn fetch_metadata( - client: impl ClientT, - version: MetadataVersion, -) -> Result, FetchMetadataError> { - const UNSTABLE_METADATA_VERSION: u32 = u32::MAX; - - // Note: `Metadata_metadata_versions` may not be present on all nodes. - // Once every node supports the new RPC methods, we can simplify the code a bit. - let supported: Option> = client - .request( - "state_call", - rpc_params!["Metadata_metadata_versions", "0x"], - ) - .await - .ok() - .map(|raw: String| { - let raw_bytes = hex::decode(raw.trim_start_matches("0x"))?; - let versions: Vec = Decode::decode(&mut &raw_bytes[..])?; - Ok::, FetchMetadataError>(versions) - }) - .transpose()?; - - // Ensure the user requested a valid version if done implicitly. - if let (Some(supported_versions), MetadataVersion::Version(request_version)) = - (&supported, &version) - { - if !supported_versions.is_empty() - && !supported_versions - .iter() - .any(|value| value == request_version) - { - return Err(FetchMetadataError::Other(format!( - "Metadata version {} not supported", - request_version - )))?; - } - } - - let mut is_latest = false; - let version_num = match version { - MetadataVersion::Latest => { - // If he have a valid supported version, find the latest stable version number. - let version_num = if let Some(supported_versions) = &supported { - supported_versions - .iter() - .fold(None, |max, value| match (max, value) { - (None, value) => Some(value), - (Some(old_max), value) => { - if value != &UNSTABLE_METADATA_VERSION && value > old_max { - Some(value) - } else { - Some(old_max) - } - } - }) - } else { - // List not exposed by node. - None - }; - - if let Some(version_num) = version_num { - // Use the latest stable from the provided list. - is_latest = true; - *version_num - } else { - // List is empty or the node does not expose the list of supported versions. - return fetch_latest_stable(client).await; - } - } - MetadataVersion::Version(version) => version, - MetadataVersion::Unstable => UNSTABLE_METADATA_VERSION, - }; - - // Other versions (including unstable) are fetched with `Metadata_metadata_at_version`. - let bytes = version_num.encode(); - let version: String = format!("0x{}", hex::encode(&bytes)); - - let result: Result = client - .request( - "state_call", - rpc_params!["Metadata_metadata_at_version", &version], - ) - .await; - - match result { - Ok(raw) => { - let raw_bytes = hex::decode(raw.trim_start_matches("0x"))?; - - let opaque: Option = - Decode::decode(&mut &raw_bytes[..])?; - let bytes = opaque.ok_or(FetchMetadataError::Other( - "Metadata version not found".into(), - ))?; - - Ok(bytes.0) - } - Err(err) => { - // Try to fetch the latest with `Metadata_metadata`. - if is_latest { - fetch_latest_stable(client).await - } else { - Err(err.into()) - } - } - } -} - async fn fetch_metadata_ws( url: &Uri, version: MetadataVersion, @@ -222,3 +104,83 @@ async fn fetch_metadata_http( 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 { + // 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(format!("No valid metadata versions returned")))? + }, + MetadataVersion::Unstable => { + if supported_versions.contains(&UNSTABLE_METADATA_VERSION) { + UNSTABLE_METADATA_VERSION + } else { + return Err(FetchMetadataError::Other(format!("The node does not have an unstable metadata version available"))) + } + }, + MetadataVersion::Version(version) => { + if supported_versions.contains(&version) { + version + } else { + return Err(FetchMetadataError::Other(format!("The node does not have version {version} available"))) + } + } + }; + + // Fetch the metadata at that version: + let metadata_string: String = client + .request("state_call", rpc_params!["Metadata_metadata_at_version", &version]) + .await?; + Ok(metadata_string) + } + + // Fetch metadata using the "old" state_call interface + async fn fetch_inner_legacy(client: &impl ClientT, version: MetadataVersion) -> Result { + if !matches!(version, MetadataVersion::Latest | MetadataVersion::Version(14)) { + return Err(FetchMetadataError::Other( + format!("The node can only return version 14 metadata but you've asked for something else")) + ) + } + + // Fetch the metadata at that version: + let metadata_string: String = client + .request("state_call", rpc_params!["Metadata_metadata", "0x"]) + .await?; + Ok(metadata_string) + } + + // Fetch using the new interface, falling back to trying old one if there's an error. + let metadata_string = match fetch_inner(&client, version).await { + Ok(s) => s, + Err(_) => fetch_inner_legacy(&client, version).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) +} From 4138b6a3a36e7660be7a9dc4ed6c0a4a635b6968 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Wed, 3 May 2023 13:23:12 +0100 Subject: [PATCH 58/66] cargo fmt --- codegen/src/utils/fetch_metadata.rs | 54 +++++++++++++++++++---------- 1 file changed, 35 insertions(+), 19 deletions(-) diff --git a/codegen/src/utils/fetch_metadata.rs b/codegen/src/utils/fetch_metadata.rs index 8b671f413e..b72432967c 100644 --- a/codegen/src/utils/fetch_metadata.rs +++ b/codegen/src/utils/fetch_metadata.rs @@ -3,7 +3,7 @@ // see LICENSE for license details. use crate::error::FetchMetadataError; -use codec::{Decode}; +use codec::Decode; use jsonrpsee::{ async_client::ClientBuilder, client_transport::ws::{Uri, WsTransportClientBuilder}, @@ -113,7 +113,10 @@ async fn fetch_metadata( 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 { + async fn fetch_inner( + client: &impl ClientT, + version: MetadataVersion, + ) -> Result { // Look up supported versions: let supported_versions: Vec = { let res: String = client @@ -128,42 +131,55 @@ async fn fetch_metadata( // 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(format!("No valid metadata versions returned")))? - }, + MetadataVersion::Latest => *supported_versions + .iter() + .filter(|&&v| v != UNSTABLE_METADATA_VERSION) + .max() + .ok_or_else(|| { + FetchMetadataError::Other(format!("No valid metadata versions returned")) + })?, MetadataVersion::Unstable => { if supported_versions.contains(&UNSTABLE_METADATA_VERSION) { UNSTABLE_METADATA_VERSION } else { - return Err(FetchMetadataError::Other(format!("The node does not have an unstable metadata version available"))) + return Err(FetchMetadataError::Other(format!( + "The node does not have an unstable metadata version available" + ))); } - }, + } MetadataVersion::Version(version) => { if supported_versions.contains(&version) { version } else { - return Err(FetchMetadataError::Other(format!("The node does not have version {version} available"))) + return Err(FetchMetadataError::Other(format!( + "The node does not have version {version} available" + ))); } } }; // Fetch the metadata at that version: let metadata_string: String = client - .request("state_call", rpc_params!["Metadata_metadata_at_version", &version]) + .request( + "state_call", + rpc_params!["Metadata_metadata_at_version", &version], + ) .await?; Ok(metadata_string) } // Fetch metadata using the "old" state_call interface - async fn fetch_inner_legacy(client: &impl ClientT, version: MetadataVersion) -> Result { - if !matches!(version, MetadataVersion::Latest | MetadataVersion::Version(14)) { - return Err(FetchMetadataError::Other( - format!("The node can only return version 14 metadata but you've asked for something else")) - ) + async fn fetch_inner_legacy( + client: &impl ClientT, + version: MetadataVersion, + ) -> Result { + if !matches!( + version, + MetadataVersion::Latest | MetadataVersion::Version(14) + ) { + return Err(FetchMetadataError::Other(format!( + "The node can only return version 14 metadata but you've asked for something else" + ))); } // Fetch the metadata at that version: @@ -176,7 +192,7 @@ async fn fetch_metadata( // Fetch using the new interface, falling back to trying old one if there's an error. let metadata_string = match fetch_inner(&client, version).await { Ok(s) => s, - Err(_) => fetch_inner_legacy(&client, version).await? + Err(_) => fetch_inner_legacy(&client, version).await?, }; // Decode the metadata. From 05ebbe04f02a48c7c8421939218492860f123e70 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Wed, 3 May 2023 13:28:01 +0100 Subject: [PATCH 59/66] Option when fetch metadata via latest API --- codegen/src/utils/fetch_metadata.rs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/codegen/src/utils/fetch_metadata.rs b/codegen/src/utils/fetch_metadata.rs index b72432967c..1418a7c55f 100644 --- a/codegen/src/utils/fetch_metadata.rs +++ b/codegen/src/utils/fetch_metadata.rs @@ -159,12 +159,17 @@ async fn fetch_metadata( }; // Fetch the metadata at that version: - let metadata_string: String = client - .request( + let metadata_string = client + .request::, _>( "state_call", rpc_params!["Metadata_metadata_at_version", &version], ) - .await?; + .await? + .ok_or_else(|| { + FetchMetadataError::Other(format!( + "The node does not have version {version} available" + )) + })?; Ok(metadata_string) } From bd665d1bf66ba17a912bd31664cc5d84de1fe9d0 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Wed, 3 May 2023 13:34:32 +0100 Subject: [PATCH 60/66] clippy --- codegen/src/utils/fetch_metadata.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/codegen/src/utils/fetch_metadata.rs b/codegen/src/utils/fetch_metadata.rs index 1418a7c55f..b6f8f6cd8e 100644 --- a/codegen/src/utils/fetch_metadata.rs +++ b/codegen/src/utils/fetch_metadata.rs @@ -136,15 +136,15 @@ async fn fetch_metadata( .filter(|&&v| v != UNSTABLE_METADATA_VERSION) .max() .ok_or_else(|| { - FetchMetadataError::Other(format!("No valid metadata versions returned")) + 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(format!( - "The node does not have an unstable metadata version available" - ))); + return Err(FetchMetadataError::Other( + "The node does not have an unstable metadata version available".to_string() + )); } } MetadataVersion::Version(version) => { @@ -182,9 +182,9 @@ async fn fetch_metadata( version, MetadataVersion::Latest | MetadataVersion::Version(14) ) { - return Err(FetchMetadataError::Other(format!( - "The node can only return version 14 metadata but you've asked for something else" - ))); + 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: From 9c92ade666beaf4788ebda8480965fb05163e1c5 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Wed, 3 May 2023 13:36:25 +0100 Subject: [PATCH 61/66] fmt --- codegen/src/utils/fetch_metadata.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/codegen/src/utils/fetch_metadata.rs b/codegen/src/utils/fetch_metadata.rs index b6f8f6cd8e..b561cb284c 100644 --- a/codegen/src/utils/fetch_metadata.rs +++ b/codegen/src/utils/fetch_metadata.rs @@ -143,7 +143,7 @@ async fn fetch_metadata( UNSTABLE_METADATA_VERSION } else { return Err(FetchMetadataError::Other( - "The node does not have an unstable metadata version available".to_string() + "The node does not have an unstable metadata version available".to_string(), )); } } @@ -183,7 +183,8 @@ async fn fetch_metadata( 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() + "The node can only return version 14 metadata but you've asked for something else" + .to_string(), )); } From f16525d36aaa6420b0610cb1d7b1d21f42277dc6 Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Wed, 3 May 2023 15:42:45 +0300 Subject: [PATCH 62/66] cli: Use the MetadataVersion from codegen Signed-off-by: Alexandru Vasile --- cli/src/commands/compatibility.rs | 2 +- cli/src/commands/metadata.rs | 2 +- cli/src/utils.rs | 46 ++++------------------------- codegen/src/utils/fetch_metadata.rs | 21 ++++++++++++- 4 files changed, 28 insertions(+), 43 deletions(-) diff --git a/cli/src/commands/compatibility.rs b/cli/src/commands/compatibility.rs index 9d5f1b1533..7c3a5d73d2 100644 --- a/cli/src/commands/compatibility.rs +++ b/cli/src/commands/compatibility.rs @@ -2,7 +2,6 @@ // This file is dual-licensed as Apache-2.0 or GPL-3.0. // see LICENSE for license details. -use crate::utils::MetadataVersion; use clap::Parser as ClapParser; use codec::Decode; use color_eyre::eyre::{self, WrapErr}; @@ -12,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. diff --git a/cli/src/commands/metadata.rs b/cli/src/commands/metadata.rs index e983207f0e..7c037184af 100644 --- a/cli/src/commands/metadata.rs +++ b/cli/src/commands/metadata.rs @@ -3,12 +3,12 @@ // see LICENSE for license details. use crate::utils::FileOrUrl; -use crate::utils::MetadataVersion; use clap::Parser as ClapParser; use codec::{Decode, Encode}; use color_eyre::eyre; use frame_metadata::{RuntimeMetadata, RuntimeMetadataPrefixed}; use std::io::{self, Write}; +use subxt_codegen::utils::MetadataVersion; use subxt_metadata::{metadata_v14_to_latest, retain_metadata_pallets}; /// Download metadata from a substrate node, for use with `subxt` codegen. diff --git a/cli/src/utils.rs b/cli/src/utils.rs index fd38954761..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::{MetadataVersion as CodegenMetadataVersion, Uri}; +use subxt_codegen::utils::{MetadataVersion, Uri}; /// The source of the metadata. #[derive(Debug, Args)] @@ -34,7 +34,7 @@ pub struct FileOrUrl { impl FileOrUrl { /// Fetch the metadata bytes. pub async fn fetch(&self) -> color_eyre::Result> { - match (&self.file, &self.url, &self.version) { + match (&self.file, &self.url, self.version) { // Can't provide both --file and --url (Some(_), Some(_), _) => { eyre::bail!("specify one of `--url` or `--file` but not both") @@ -57,51 +57,17 @@ impl FileOrUrl { // Fetch from --url (None, Some(uri), version) => Ok(subxt_codegen::utils::fetch_metadata_bytes( uri, - version.map(Into::into).unwrap_or_default(), + version.unwrap_or_default(), ) .await?), // Default if neither is provided; fetch from local url (None, None, version) => { let uri = Uri::from_static("http://localhost:9933"); - Ok(subxt_codegen::utils::fetch_metadata_bytes( - &uri, - version.map(Into::into).unwrap_or_default(), + Ok( + subxt_codegen::utils::fetch_metadata_bytes(&uri, version.unwrap_or_default()) + .await?, ) - .await?) } } } } - -/// The metadata version to fetch from the node. -#[derive(Debug, Clone, Copy, PartialEq)] -pub struct MetadataVersion { - version: u32, -} - -impl std::str::FromStr for MetadataVersion { - type Err = String; - - fn from_str(input: &str) -> Result { - match input { - "unstable" => Ok(MetadataVersion { version: u32::MAX }), - version => { - let num: u32 = version - .parse() - .map_err(|_| format!("Invalid metadata version specified {:?}", version))?; - - Ok(MetadataVersion { version: num }) - } - } - } -} - -impl From for CodegenMetadataVersion { - fn from(input: MetadataVersion) -> CodegenMetadataVersion { - match input.version { - u32::MAX => CodegenMetadataVersion::Unstable, - 14 => CodegenMetadataVersion::Latest, - v => CodegenMetadataVersion::Version(v), - } - } -} diff --git a/codegen/src/utils/fetch_metadata.rs b/codegen/src/utils/fetch_metadata.rs index feb2b359a9..daaff20dde 100644 --- a/codegen/src/utils/fetch_metadata.rs +++ b/codegen/src/utils/fetch_metadata.rs @@ -14,7 +14,7 @@ use jsonrpsee::{ use std::time::Duration; /// The metadata version that is fetched from the node. -#[derive(Default)] +#[derive(Default, Debug, Clone, Copy)] pub enum MetadataVersion { /// Latest stable version of the metadata. #[default] @@ -25,6 +25,25 @@ pub enum MetadataVersion { 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, From 9bf0f66bbdf696d46916772078cd01ec3fc970f2 Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Wed, 3 May 2023 15:44:56 +0300 Subject: [PATCH 63/66] cli: Specify latest as default for MetadataVersion Signed-off-by: Alexandru Vasile --- cli/src/commands/compatibility.rs | 4 ++-- cli/src/commands/metadata.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cli/src/commands/compatibility.rs b/cli/src/commands/compatibility.rs index 7c3a5d73d2..3b547ecfa1 100644 --- a/cli/src/commands/compatibility.rs +++ b/cli/src/commands/compatibility.rs @@ -36,8 +36,8 @@ pub struct Opts { /// /// Use this specific metadata version. /// - /// Defaults to 14. - #[clap(long = "version", default_value = "14")] + /// Defaults to latest. + #[clap(long = "version", default_value = "latest")] version: MetadataVersion, } diff --git a/cli/src/commands/metadata.rs b/cli/src/commands/metadata.rs index 7c037184af..01b05ef83c 100644 --- a/cli/src/commands/metadata.rs +++ b/cli/src/commands/metadata.rs @@ -36,8 +36,8 @@ pub struct Opts { /// /// Use this specific metadata version. /// - /// Defaults to 14. - #[clap(long = "version", default_value = "14")] + /// Defaults to latest. + #[clap(long = "version", default_value = "latest")] version: MetadataVersion, } From f29c048c8e1c15366a2a738142512c33fbc5b61f Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Wed, 3 May 2023 15:47:42 +0300 Subject: [PATCH 64/66] cli: Remove version from metadata and use the one from file_or_url Signed-off-by: Alexandru Vasile --- cli/src/commands/metadata.rs | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/cli/src/commands/metadata.rs b/cli/src/commands/metadata.rs index 01b05ef83c..00537778af 100644 --- a/cli/src/commands/metadata.rs +++ b/cli/src/commands/metadata.rs @@ -8,7 +8,6 @@ use codec::{Decode, Encode}; use color_eyre::eyre; use frame_metadata::{RuntimeMetadata, RuntimeMetadataPrefixed}; use std::io::{self, Write}; -use subxt_codegen::utils::MetadataVersion; use subxt_metadata::{metadata_v14_to_latest, retain_metadata_pallets}; /// Download metadata from a substrate node, for use with `subxt` codegen. @@ -26,19 +25,6 @@ pub struct Opts { /// when using the option. #[clap(long, use_value_delimiter = true, value_parser)] pallets: 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<()> { From a032374c62dd798092c4e42a32b54d7d102233b8 Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Wed, 3 May 2023 15:49:54 +0300 Subject: [PATCH 65/66] Fix clippy Signed-off-by: Alexandru Vasile --- cli/src/commands/compatibility.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/src/commands/compatibility.rs b/cli/src/commands/compatibility.rs index 3b547ecfa1..51d50068c8 100644 --- a/cli/src/commands/compatibility.rs +++ b/cli/src/commands/compatibility.rs @@ -120,7 +120,7 @@ async fn fetch_runtime_metadata( url: &Uri, version: MetadataVersion, ) -> color_eyre::Result { - let bytes = subxt_codegen::utils::fetch_metadata_bytes(url, version.into()).await?; + let bytes = subxt_codegen::utils::fetch_metadata_bytes(url, version).await?; let metadata = ::decode(&mut &bytes[..])?; if metadata.0 != META_RESERVED { From 0ea32fc91db3c957f21589727c6c486e455b5352 Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Wed, 3 May 2023 16:41:33 +0300 Subject: [PATCH 66/66] codegen: Decode metadata independently for different RPC calls Signed-off-by: Alexandru Vasile --- codegen/src/utils/fetch_metadata.rs | 50 ++++++++++++++++------------- 1 file changed, 28 insertions(+), 22 deletions(-) diff --git a/codegen/src/utils/fetch_metadata.rs b/codegen/src/utils/fetch_metadata.rs index 7697ab32d7..9d49e35ac4 100644 --- a/codegen/src/utils/fetch_metadata.rs +++ b/codegen/src/utils/fetch_metadata.rs @@ -3,7 +3,7 @@ // see LICENSE for license details. use crate::error::FetchMetadataError; -use codec::Decode; +use codec::{Decode, Encode}; use jsonrpsee::{ async_client::ClientBuilder, client_transport::ws::{Uri, WsTransportClientBuilder}, @@ -135,7 +135,7 @@ async fn fetch_metadata( async fn fetch_inner( client: &impl ClientT, version: MetadataVersion, - ) -> Result { + ) -> Result, FetchMetadataError> { // Look up supported versions: let supported_versions: Vec = { let res: String = client @@ -177,26 +177,33 @@ async fn fetch_metadata( } }; + let bytes = version.encode(); + let version: String = format!("0x{}", hex::encode(&bytes)); + // Fetch the metadata at that version: - let metadata_string = client - .request::, _>( + let metadata_string: String = client + .request( "state_call", rpc_params!["Metadata_metadata_at_version", &version], ) - .await? - .ok_or_else(|| { - FetchMetadataError::Other(format!( - "The node does not have version {version} available" - )) - })?; - Ok(metadata_string) + .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 { + ) -> Result, FetchMetadataError> { if !matches!( version, MetadataVersion::Latest | MetadataVersion::Version(14) @@ -211,17 +218,16 @@ async fn fetch_metadata( let metadata_string: String = client .request("state_call", rpc_params!["Metadata_metadata", "0x"]) .await?; - Ok(metadata_string) + + // 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. - let metadata_string = match fetch_inner(&client, version).await { - Ok(s) => s, - Err(_) => fetch_inner_legacy(&client, version).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) + match fetch_inner(&client, version).await { + Ok(s) => Ok(s), + Err(_) => fetch_inner_legacy(&client, version).await, + } }