diff --git a/.github/workflows/hyperspace-docker-image.yml b/.github/workflows/hyperspace-docker-image.yml index a38ef8ecb..1c7fbb498 100644 --- a/.github/workflows/hyperspace-docker-image.yml +++ b/.github/workflows/hyperspace-docker-image.yml @@ -4,6 +4,7 @@ on: push: branches: - master + - main jobs: build-and-publish: diff --git a/Cargo.lock b/Cargo.lock index 0e50526db..a30dd399d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4311,7 +4311,7 @@ dependencies = [ "clap 3.2.23", "hyperspace-core", "tokio", - "toml 0.7.3", + "toml 0.7.4", ] [[package]] @@ -4363,7 +4363,7 @@ dependencies = [ "tendermint-proto", "thiserror", "tokio", - "toml 0.7.3", + "toml 0.7.4", ] [[package]] @@ -4470,6 +4470,7 @@ dependencies = [ "parity-scale-codec", "polkadot-core-primitives", "prost 0.11.6", + "rand 0.8.5", "rs_merkle", "sc-finality-grandpa-rpc", "serde", @@ -4490,7 +4491,6 @@ dependencies = [ "thiserror", "tokio", "tokio-stream", - "vec1", ] [[package]] @@ -4509,6 +4509,7 @@ dependencies = [ "pallet-ibc", "parity-scale-codec", "rand 0.8.5", + "serde", "subxt", "thiserror", "tokio", @@ -4550,6 +4551,7 @@ dependencies = [ "subxt", "tendermint-proto", "tokio", + "toml 0.7.4", ] [[package]] @@ -4717,6 +4719,7 @@ dependencies = [ "bytes", "env_logger 0.9.3", "flex-error", + "hex", "ibc", "ibc-derive", "ibc-proto", @@ -4825,7 +4828,6 @@ dependencies = [ "tendermint", "tendermint-proto", "tokio", - "vec1", ] [[package]] @@ -7482,7 +7484,6 @@ dependencies = [ "tendermint", "tendermint-light-client-verifier", "tendermint-proto", - "vec1", ] [[package]] @@ -12245,9 +12246,9 @@ checksum = "f638d531eccd6e23b980caf34876660d38e265409d8e99b397ab71eb3612fad0" [[package]] name = "serde" -version = "1.0.162" +version = "1.0.164" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71b2f6e1ab5c2b98c05f0f35b236b22e8df7ead6ffbf51d7808da7f8817e7ab6" +checksum = "9e8c8cf938e98f769bc164923b06dce91cea1751522f46f8466461af04c9027d" dependencies = [ "serde_derive", ] @@ -12282,9 +12283,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.162" +version = "1.0.164" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2a0814352fd64b58489904a44ea8d90cb1a91dcb6b4f5ebabc32c8318e93cb6" +checksum = "d9735b638ccc51c28bf6914d90a2e9725b377144fc612c49a611fddd1b631d68" dependencies = [ "proc-macro2", "quote", @@ -12326,9 +12327,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0efd8caf556a6cebd3b285caf480045fcc1ac04f6bd786b09a6f11af30c4fcf4" +checksum = "93107647184f6027e3b7dcb2e11034cf95ffa1e3a682c67951963ac69c1c007d" dependencies = [ "serde", ] @@ -14549,14 +14550,14 @@ dependencies = [ [[package]] name = "toml" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b403acf6f2bb0859c93c7f0d967cb4a75a7ac552100f9322faf64dc047669b21" +checksum = "d6135d499e69981f9ff0ef2167955a5333c35e36f6937d382974566b3d5b94ec" dependencies = [ "serde", "serde_spanned", - "toml_datetime 0.6.1", - "toml_edit 0.19.8", + "toml_datetime 0.6.2", + "toml_edit 0.19.10", ] [[package]] @@ -14567,9 +14568,9 @@ checksum = "4553f467ac8e3d374bc9a177a26801e5d0f9b211aa1673fb137a403afd1c9cf5" [[package]] name = "toml_datetime" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ab8ed2edee10b50132aed5f331333428b011c99402b5a534154ed15746f9622" +checksum = "5a76a9312f5ba4c2dec6b9161fdf25d87ad8a09256ccea5a556fef03c706a10f" dependencies = [ "serde", ] @@ -14587,14 +14588,14 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.19.8" +version = "0.19.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "239410c8609e8125456927e6707163a3b1fdb40561e4b803bc041f466ccfdc13" +checksum = "2380d56e8670370eee6566b0bfd4265f65b3f432e8c6d85623f728d4fa31f739" dependencies = [ "indexmap", "serde", "serde_spanned", - "toml_datetime 0.6.1", + "toml_datetime 0.6.2", "winnow", ] @@ -15186,12 +15187,6 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" -[[package]] -name = "vec1" -version = "1.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bda7c41ca331fe9a1c278a9e7ee055f4be7f5eb1c2b72f079b4ff8b5fce9d5c" - [[package]] name = "version_check" version = "0.9.4" diff --git a/algorithms/grandpa/primitives/src/justification.rs b/algorithms/grandpa/primitives/src/justification.rs index 127f7238e..4ed985e44 100644 --- a/algorithms/grandpa/primitives/src/justification.rs +++ b/algorithms/grandpa/primitives/src/justification.rs @@ -257,33 +257,6 @@ where Ok(()) } -/// The function checks if the given chain is canonical: -/// - the chain is not empty -/// - all the header hashes from `base_header` to `header.last()` form a chain -/// - height of the blocks increase sequentially by 1 -/// And returns the first and last hashes of the chain -pub fn validate_chain( - mut base_header_hash: H::Hash, - mut base_header_number: H::Number, - headers: &[H], -) -> Result<(&H, &H), anyhow::Error> { - if headers.is_empty() { - return Err(anyhow!("Empty chain")) - } - for header in headers { - if base_header_number + 1u32.into() != *header.number() { - return Err(anyhow!("Invalid block number in the chain")) - } - let current_hash = base_header_hash; - if header.parent_hash() != ¤t_hash { - return Err(anyhow!("Invalid block hash in the chain")) - } - base_header_hash = header.hash(); - base_header_number = *header.number(); - } - Ok(headers.first().zip(headers.last()).expect("headers are not empty; qed")) -} - /// Verifies the equivocation proof by making sure that both votes target /// different blocks and that its signatures are valid. pub fn check_equivocation_proof( diff --git a/algorithms/grandpa/primitives/src/lib.rs b/algorithms/grandpa/primitives/src/lib.rs index 37f086a16..02a15e4c6 100644 --- a/algorithms/grandpa/primitives/src/lib.rs +++ b/algorithms/grandpa/primitives/src/lib.rs @@ -106,9 +106,8 @@ pub trait HostFunctions: light_client_common::HostFunctions + 'static { /// Verify an ed25519 signature fn ed25519_verify(sig: &ed25519::Signature, msg: &[u8], pub_key: &ed25519::Public) -> bool; - /// Stores the given list of RelayChain header hashes in the light client's storage with - /// the given timestamp. - fn insert_relay_header_hashes(now_ms: u64, headers: &[::Hash]); + /// Stores the given list of RelayChain header hashes in the light client's storage. + fn insert_relay_header_hashes(headers: &[::Hash]); /// Checks if a RelayChain header hash exists in the light client's storage. fn contains_relay_header_hash(hash: ::Hash) -> bool; } diff --git a/algorithms/grandpa/prover/src/host_functions.rs b/algorithms/grandpa/prover/src/host_functions.rs index e31aec575..e1c6e1cd6 100644 --- a/algorithms/grandpa/prover/src/host_functions.rs +++ b/algorithms/grandpa/prover/src/host_functions.rs @@ -36,7 +36,7 @@ impl HostFunctions for HostFunctionsProvider { pubkey.verify(&msg, sig) } - fn insert_relay_header_hashes(_now: u64, _headers: &[::Hash]) { + fn insert_relay_header_hashes(_headers: &[::Hash]) { unimplemented!() } diff --git a/algorithms/grandpa/verifier/src/lib.rs b/algorithms/grandpa/verifier/src/lib.rs index 18d6ae138..e4dec8ff5 100644 --- a/algorithms/grandpa/verifier/src/lib.rs +++ b/algorithms/grandpa/verifier/src/lib.rs @@ -58,7 +58,7 @@ where proof; // 1. First validate unknown headers. - let headers = AncestryChain::new(&finality_proof.unknown_headers); + let headers = AncestryChain::::new(&finality_proof.unknown_headers); let target = finality_proof .unknown_headers @@ -66,10 +66,8 @@ where .max_by_key(|h| *h.number()) .ok_or_else(|| anyhow!("Unknown headers can't be empty!"))?; - let target_hash = target.hash(); - // this is illegal - if target_hash != finality_proof.block { + if target.hash() != finality_proof.block { Err(anyhow!("Latest finalized block should be highest block in unknown_headers"))?; } @@ -95,7 +93,7 @@ where })?; } - let mut finalized = headers.ancestry(from, target_hash).map_err(|_| { + let mut finalized = headers.ancestry(from, target.hash()).map_err(|_| { anyhow!("[verify_parachain_headers_with_grandpa_finality_proof] Invalid ancestry!") })?; finalized.sort(); @@ -141,7 +139,7 @@ where } // 4. set new client state, optionally rotating authorities - client_state.latest_relay_hash = target_hash; + client_state.latest_relay_hash = target.hash(); client_state.latest_relay_height = (*target.number()).into(); if let Some(max_height) = para_heights.into_iter().max() { if max_height != latest_para_height { diff --git a/config/rococo-local-local.toml b/config/rococo-local-local.toml index a2922c137..37aeab43e 100644 --- a/config/rococo-local-local.toml +++ b/config/rococo-local-local.toml @@ -4,10 +4,10 @@ para_id = 2000 parachain_rpc_url = "ws://127.0.0.1:9188" relay_chain_rpc_url = "ws://127.0.0.1:9944" client_id = "08-wasm-0" -connection_id = "connection-0" +connection_id = "connection-2" commitment_prefix = "0x6962632f" private_key = "//Alice" ss58_version = 49 -channel_whitelist = [["channel-0", "transfer"], ["channel-0", "transfer"], ["channel-0", "transfer"], ["channel-0", "transfer"], ["channel-0", "transfer"], ["channel-0", "transfer"]] +channel_whitelist = [["channel-2", "transfer"]] finality_protocol = "Grandpa" key_type = "sr25519" diff --git a/contracts/pallet-ibc/Cargo.toml b/contracts/pallet-ibc/Cargo.toml index b1cb278d2..c6bd0523c 100644 --- a/contracts/pallet-ibc/Cargo.toml +++ b/contracts/pallet-ibc/Cargo.toml @@ -33,7 +33,6 @@ ibc-proto = { path = "../../ibc/proto", default-features = false } tendermint = { git = "https://github.com/informalsystems/tendermint-rs", rev = "e81f7bf23d63ffbcd242381d1ce5e35da3515ff1", default-features = false } # cannot be defined as optional in workspace tendermint-proto = { git = "https://github.com/informalsystems/tendermint-rs", rev = "e81f7bf23d63ffbcd242381d1ce5e35da3515ff1", default-features = false } ics23 = { git = "https://github.com/cosmos/ics23", rev = "74ce807b7be39a7e0afb4e2efb8e28a57965f57b", default-features = false } -vec1 = { version = "1.10.1", default-features = false } grandpa-client-primitives = { package = "grandpa-light-client-primitives", path = "../../algorithms/grandpa/primitives", default-features = false } beefy-client-primitives = { package = "beefy-light-client-primitives", path = "../../algorithms/beefy/primitives", default-features = false } diff --git a/contracts/pallet-ibc/rpc/src/lib.rs b/contracts/pallet-ibc/rpc/src/lib.rs index 1564e4a1b..e6a53d6c4 100644 --- a/contracts/pallet-ibc/rpc/src/lib.rs +++ b/contracts/pallet-ibc/rpc/src/lib.rs @@ -110,7 +110,7 @@ pub struct Proof { } /// Packet info -#[derive(Clone, Eq, PartialEq, Serialize, Deserialize, Debug)] +#[derive(Clone, Eq, PartialEq, Serialize, Deserialize, Debug, PartialOrd, Ord)] pub struct PacketInfo { /// Minimal height at which packet proof is available pub height: Option, diff --git a/contracts/pallet-ibc/src/benchmarks/grandpa_benchmark_utils.rs b/contracts/pallet-ibc/src/benchmarks/grandpa_benchmark_utils.rs index e405d2656..6803bcb91 100644 --- a/contracts/pallet-ibc/src/benchmarks/grandpa_benchmark_utils.rs +++ b/contracts/pallet-ibc/src/benchmarks/grandpa_benchmark_utils.rs @@ -9,7 +9,7 @@ use grandpa_client_primitives::{ use ibc::{timestamp::Timestamp, Height}; use ics10_grandpa::{ client_message::{ClientMessage, Header as GrandpaHeader, RelayChainHeader}, - client_state::{AuthoritiesChange, ClientState}, + client_state::ClientState, consensus_state::ConsensusState, }; use sp_core::H256; @@ -17,7 +17,6 @@ use sp_finality_grandpa::{AuthorityId, AuthoritySignature, KEY_TYPE}; use sp_runtime::{traits::BlakeTwo256, SaturatedConversion}; use sp_std::prelude::*; use sp_trie::{generate_trie_proof, LayoutV0, MemoryDB, StorageProof, TrieDBMutBuilder, TrieMut}; -use vec1::vec1; pub const GRANDPA_UPDATE_TIMESTAMP: u64 = 1650894363; /// Builds a grandpa client message that that contains the requested number of precommits @@ -157,12 +156,8 @@ pub fn generate_finality_proof( frozen_height: None, latest_para_height, para_id, - authorities_changes: vec1![AuthoritiesChange { - set_id, - authorities: authorities.into_iter().map(|authority| (authority, 100)).collect(), - height: 0, - timestamp: Timestamp::from_nanoseconds(1).unwrap(), - }], + current_set_id: set_id, + current_authorities: authorities.into_iter().map(|authority| (authority, 100)).collect(), _phantom: Default::default(), }; diff --git a/contracts/pallet-ibc/src/benchmarks/tendermint_benchmark_utils.rs b/contracts/pallet-ibc/src/benchmarks/tendermint_benchmark_utils.rs index 92ac15c9a..6fb5fcfd8 100644 --- a/contracts/pallet-ibc/src/benchmarks/tendermint_benchmark_utils.rs +++ b/contracts/pallet-ibc/src/benchmarks/tendermint_benchmark_utils.rs @@ -49,7 +49,6 @@ use ibc_proto::{cosmos::ics23::v1::CommitmentProof, ibc::core::commitment::v1::M use ics07_tendermint::{ client_state::ClientState as TendermintClientState, consensus_state::ConsensusState, }; -use ics10_grandpa::client_state::AuthoritiesChange; use ics11_beefy::{ client_state::ClientState as BeefyClientState, consensus_state::ConsensusState as BeefyConsensusState, @@ -69,7 +68,6 @@ use tendermint::{ }; use tendermint_light_client_verifier::types::Validator; use tendermint_proto::Protobuf; -use vec1::vec1; pub const TENDERMINT_TIMESTAMP: u64 = 1650894363; @@ -319,12 +317,8 @@ pub(crate) fn create_mock_grandpa_client_state() -> ( frozen_height: None, latest_para_height: 0, para_id: 2087, - authorities_changes: vec1![AuthoritiesChange { - height: 0, - timestamp: Timestamp::from_nanoseconds(1).unwrap(), - set_id: 0, - authorities: vec![], - }], + current_set_id: 0, + current_authorities: vec![], _phantom: Default::default(), }; diff --git a/contracts/pallet-ibc/src/lib.rs b/contracts/pallet-ibc/src/lib.rs index 272d74964..ac687f278 100644 --- a/contracts/pallet-ibc/src/lib.rs +++ b/contracts/pallet-ibc/src/lib.rs @@ -30,26 +30,10 @@ #[macro_use] extern crate alloc; -mod channel; -mod client; -mod connection; -pub mod errors; -pub mod events; -pub mod ics20; -mod ics23; -pub mod light_clients; -mod port; -pub mod routing; - -pub use client::HostConsensusProof; -pub use ibc_primitives::Timeout; -pub use light_client_common; - use codec::{Decode, Encode}; use core::fmt::Debug; use cumulus_primitives_core::ParaId; use frame_support::weights::Weight; -use ics08_wasm::client_state::ClientState as WasmClientState; pub use pallet::*; use scale_info::{ prelude::{ @@ -62,6 +46,20 @@ use scale_info::{ use sp_runtime::{Either, RuntimeDebug}; use sp_std::{marker::PhantomData, prelude::*, str::FromStr}; +mod channel; +mod client; +mod connection; +pub mod errors; +pub mod events; +pub mod ics20; +mod ics23; +pub mod light_clients; +mod port; +pub mod routing; +pub use client::HostConsensusProof; +pub use ibc_primitives::Timeout; +pub use light_client_common; + pub const MODULE_ID: &str = "pallet_ibc"; #[derive(Clone, PartialEq, Eq, Encode, Decode, RuntimeDebug, TypeInfo)] @@ -168,8 +166,7 @@ pub mod pallet { }; use crate::{ ics20::HandleMemo, - ics23::client_states::ClientStates, - light_clients::{AnyClientStateV1, AnyConsensusState}, + light_clients::AnyConsensusState, routing::{Context, ModuleRouter}, }; use ibc::{ @@ -179,10 +176,7 @@ pub mod pallet { }, bigint::U256, core::{ - ics02_client::{ - client_state::ClientState, - context::{ClientKeeper, ClientReader}, - }, + ics02_client::context::{ClientKeeper, ClientReader}, ics04_channel::context::ChannelReader, ics24_host::identifier::{ChannelId, ClientId, PortId}, }, @@ -190,7 +184,6 @@ pub mod pallet { Height, }; use ibc_primitives::{client_id_from_bytes, get_channel_escrow_address, IbcHandler}; - use ics08_wasm::Bytes; use light_clients::AnyClientState; use sp_runtime::{ traits::{IdentifyAccount, Saturating, Zero}, @@ -711,20 +704,6 @@ pub mod pallet { remaining_weight.saturating_sub(T::WeightInfo::packet_cleanup(removed_packets_count)) } - fn on_runtime_upgrade() -> Weight { - let mut count = 0; - for (client_id, client_state) in >::iter() { - if let Err(e) = Pallet::::upgrade_grandpa_client_state(&client_id, client_state) - { - log::warn!(target: "pallet_ibc", "Error upgrading grandpa consensus state: {:?}", e); - } else { - log::info!(target: "pallet_ibc", "Upgraded grandpa consensus state for {client_id}"); - } - count += 1; - } - T::DbWeight::get().reads_writes(count, count) - } - fn offchain_worker(_n: BlockNumberFor) {} } @@ -1233,68 +1212,6 @@ pub mod pallet { Ok(()) } } - - impl Pallet - where - T: Send + Sync, - AccountId32: From<::AccountId>, - u32: From<::BlockNumber>, - { - fn upgrade_grandpa_client_state( - client_id: &ClientId, - client_state: Bytes, - ) -> Result<(), String> { - if client_id.as_str().contains("grandpa") || client_id.as_str().contains("wasm") { - let decoded = AnyClientStateV1::decode_vec(&mut client_state.as_slice()) - .map_err(|e| e.to_string())?; - let mut wasm_code_id = None; - let old_state = match decoded { - AnyClientStateV1::Grandpa(state) => state, - AnyClientStateV1::Wasm(WasmClientState { inner, code_id, .. }) => - match *inner { - AnyClientStateV1::Grandpa(state) => { - wasm_code_id = Some(code_id); - state - }, - _ => { - log::trace!( - target: "pallet_ibc", - "Skipping client state upgrade for client {:?}", - client_id - ); - return Ok(()) - }, - }, - _ => { - log::trace!( - target: "pallet_ibc", - "Skipping client state upgrade for client {:?}", - client_id - ); - return Ok(()) - }, - }; - let new_state = old_state.into(); - let any_state = if let Some(code_id) = wasm_code_id { - AnyClientState::wasm(AnyClientState::Grandpa(new_state), code_id) - .map_err(|e| e.to_string())? - } else { - AnyClientState::Grandpa(new_state) - }; - >::insert( - &client_id, - any_state.encode_to_vec().map_err(|e| e.to_string())?, - ); - } else { - log::trace!( - target: "pallet_ibc", - "Ignoring upgrade for client {:?}", - client_id - ); - } - Ok(()) - } - } } /// Result of the `DenomToAssetId::ibc_assets` function. diff --git a/contracts/pallet-ibc/src/light_clients.rs b/contracts/pallet-ibc/src/light_clients.rs index 235b52c2a..3b085a1d2 100644 --- a/contracts/pallet-ibc/src/light_clients.rs +++ b/contracts/pallet-ibc/src/light_clients.rs @@ -1,7 +1,6 @@ use alloc::{borrow::ToOwned, boxed::Box, format, string::ToString, vec::Vec}; -use core::convert::identity; use frame_support::{ - pallet_prelude::{Blake2_256, StorageMap, StorageValue, ValueQuery}, + pallet_prelude::{StorageValue, ValueQuery}, traits::StorageInstance, }; use ibc::{ @@ -38,7 +37,7 @@ use ics10_grandpa::{ RelayChainHeader, GRANDPA_CLIENT_MESSAGE_TYPE_URL, GRANDPA_HEADER_TYPE_URL, GRANDPA_MISBEHAVIOUR_TYPE_URL, }, - client_state::{GRANDPA_CLIENT_STATE_TYPE_URL, HEADER_ITEM_LIFETIME, HEADER_ITEM_MIN_COUNT}, + client_state::GRANDPA_CLIENT_STATE_TYPE_URL, consensus_state::GRANDPA_CONSENSUS_STATE_TYPE_URL, }; use ics11_beefy::{ @@ -49,7 +48,8 @@ use prost::Message; use sp_core::{crypto::ByteArray, ed25519, H256}; use sp_runtime::{ app_crypto::RuntimePublic, - traits::{BlakeTwo256, Header}, + traits::{BlakeTwo256, ConstU32, Header}, + BoundedBTreeSet, BoundedVec, }; use tendermint::{ crypto::{ @@ -130,10 +130,13 @@ impl StorageInstance for GrandpaHeaderHashesStorageInstance { "ibc.lightclients.grandpa" } - const STORAGE_PREFIX: &'static str = "HeaderHashesV2"; + const STORAGE_PREFIX: &'static str = "HeaderHashes"; } -pub type GrandpaHeaderHashesStorage = - StorageValue, ValueQuery>; +pub type GrandpaHeaderHashesStorage = StorageValue< + GrandpaHeaderHashesStorageInstance, + BoundedVec>, + ValueQuery, +>; pub struct GrandpaHeaderHashesSetStorageInstance; impl StorageInstance for GrandpaHeaderHashesSetStorageInstance { @@ -141,10 +144,16 @@ impl StorageInstance for GrandpaHeaderHashesSetStorageInstance { "ibc.lightclients.grandpa" } - const STORAGE_PREFIX: &'static str = "HeaderHashesSetV2"; + const STORAGE_PREFIX: &'static str = "HeaderHashesSet"; } -pub type GrandpaHeaderHashesSetStorage = - StorageMap; +pub type GrandpaHeaderHashesSetStorage = StorageValue< + GrandpaHeaderHashesSetStorageInstance, + BoundedBTreeSet>, + ValueQuery, +>; + +/// Maximum number of block number to block hash mappings to keep (oldest pruned first). +const GRANDPA_BLOCK_HASHES_CACHE_SIZE: u32 = 500; impl grandpa_client_primitives::HostFunctions for HostFunctionsManager { type Header = RelayChainHeader; @@ -153,32 +162,37 @@ impl grandpa_client_primitives::HostFunctions for HostFunctionsManager { pub_key.verify(&msg, sig) } - fn insert_relay_header_hashes(now_ms: u64, new_hashes: &[::Hash]) { + fn insert_relay_header_hashes(new_hashes: &[::Hash]) { if new_hashes.is_empty() { return } - GrandpaHeaderHashesStorage::mutate(|hashes| { - hashes.reserve(new_hashes.len()); - for hash in new_hashes { - hashes.push((now_ms, *hash)); - GrandpaHeaderHashesSetStorage::insert(*hash, ()); - } - let expired = now_ms.saturating_sub(HEADER_ITEM_LIFETIME.as_millis() as u64); - let key = hashes.binary_search_by_key(&expired, |(t, _)| *t).unwrap_or_else(identity); - let len = hashes.len(); - // keep at least HEADER_ITEM_MIN_COUNT items if possible - let remove_up_to_index = key.min(len.saturating_sub(HEADER_ITEM_MIN_COUNT)); - if remove_up_to_index < len { - for hash in hashes.drain(..remove_up_to_index).map(|(_, hash)| hash) { - GrandpaHeaderHashesSetStorage::remove(&hash); + GrandpaHeaderHashesSetStorage::mutate(|hashes_set| { + GrandpaHeaderHashesStorage::mutate(|hashes| { + for hash in new_hashes { + match hashes.try_push(*hash) { + Ok(_) => {}, + Err(_) => { + let old_hash = hashes.remove(0); + hashes_set.remove(&old_hash); + hashes.try_push(*hash).expect( + "we just removed an element, so there is space for this one; qed", + ); + }, + } + match hashes_set.try_insert(*hash) { + Ok(_) => {}, + Err(_) => { + log::warn!("duplicated value in GrandpaHeaderHashesStorage or the storage is corrupted"); + }, + } } - } + }); }); } fn contains_relay_header_hash(hash: ::Hash) -> bool { - GrandpaHeaderHashesSetStorage::contains_key(&hash) + GrandpaHeaderHashesSetStorage::get().contains(&hash) } } @@ -218,77 +232,21 @@ pub enum AnyUpgradeOptions { Mock(()), } -mod v1 { - use super::*; - - #[derive(Clone, Debug, PartialEq, Eq)] - pub enum AnyClientState { - Grandpa(ics10_grandpa::client_state::ClientStateV1), - Beefy(ics11_beefy::client_state::ClientState), - Tendermint(ics07_tendermint::client_state::ClientState), - Wasm(ics08_wasm::client_state::ClientState), - #[cfg(test)] - Mock(ibc::mock::client_state::MockClientState), - } - - impl ibc::protobuf::Protobuf for AnyClientState {} - - impl TryFrom for AnyClientState { - type Error = ics02_client::error::Error; - fn try_from(value: Any) -> Result { - match value.type_url.as_str() { - "" => Err(ics02_client::error::Error::empty_consensus_state_response()), - GRANDPA_CLIENT_STATE_TYPE_URL => Ok(Self::Grandpa(>::decode_vec(&value.value).map_err(::ibc::core::ics02_client::error::Error::decode_raw_client_state)?)), - BEEFY_CLIENT_STATE_TYPE_URL => Ok(Self::Beefy(>::decode_vec(&value.value).map_err(::ibc::core::ics02_client::error::Error::decode_raw_client_state)?)), - TENDERMINT_CLIENT_STATE_TYPE_URL => Ok(Self::Tendermint(>::decode_vec(&value.value).map_err(::ibc::core::ics02_client::error::Error::decode_raw_client_state)?)), - WASM_CLIENT_STATE_TYPE_URL => Ok(Self::Wasm(>::decode_vec(&value.value).map_err(::ibc::core::ics02_client::error::Error::decode_raw_client_state)?)), - #[cfg(test)] MOCK_CLIENT_STATE_TYPE_URL => Ok(Self::Mock(::decode_vec(&value.value).map_err(::ibc::core::ics02_client::error::Error::decode_raw_client_state)?)), - _ => Err(ics02_client::error::Error::unknown_consensus_state_type(value.type_url)), - } - } - } - - impl From for Any { - fn from(value: AnyClientState) -> Self { - match value { - AnyClientState::Grandpa(value) => Any { - type_url: GRANDPA_CLIENT_STATE_TYPE_URL.to_string(), - value: value.encode_vec().unwrap(), - }, - AnyClientState::Wasm(value) => Any { - type_url: WASM_CLIENT_STATE_TYPE_URL.to_string(), - value: value.encode_vec().unwrap(), - }, - _ => unreachable!(), - } - } - } -} - -mod v2 { - use super::*; - - #[derive(Clone, Debug, PartialEq, Eq, ClientState, Protobuf)] - pub enum AnyClientState { - #[ibc(proto_url = "GRANDPA_CLIENT_STATE_TYPE_URL")] - Grandpa(ics10_grandpa::client_state::ClientStateV2), - #[ibc(proto_url = "BEEFY_CLIENT_STATE_TYPE_URL")] - Beefy(ics11_beefy::client_state::ClientState), - #[ibc(proto_url = "TENDERMINT_CLIENT_STATE_TYPE_URL")] - Tendermint(ics07_tendermint::client_state::ClientState), - #[ibc(proto_url = "WASM_CLIENT_STATE_TYPE_URL")] - Wasm(ics08_wasm::client_state::ClientState), - #[cfg(test)] - #[ibc(proto_url = "MOCK_CLIENT_STATE_TYPE_URL")] - Mock(ibc::mock::client_state::MockClientState), - } +#[derive(Clone, Debug, PartialEq, Eq, ClientState, Protobuf)] +pub enum AnyClientState { + #[ibc(proto_url = "GRANDPA_CLIENT_STATE_TYPE_URL")] + Grandpa(ics10_grandpa::client_state::ClientState), + #[ibc(proto_url = "BEEFY_CLIENT_STATE_TYPE_URL")] + Beefy(ics11_beefy::client_state::ClientState), + #[ibc(proto_url = "TENDERMINT_CLIENT_STATE_TYPE_URL")] + Tendermint(ics07_tendermint::client_state::ClientState), + #[ibc(proto_url = "WASM_CLIENT_STATE_TYPE_URL")] + Wasm(ics08_wasm::client_state::ClientState), + #[cfg(test)] + #[ibc(proto_url = "MOCK_CLIENT_STATE_TYPE_URL")] + Mock(ibc::mock::client_state::MockClientState), } -pub use v1::AnyClientState as AnyClientStateV1; -pub use v2::AnyClientState as AnyClientStateV2; - -pub type AnyClientState = AnyClientStateV2; - impl AnyClientState { /// Recursively decode the client state from the given `Any` type, until it /// matches the given predicate `f`. Only `Wasm` variant may be unpacked recursively. diff --git a/contracts/pallet-ibc/src/tests.rs b/contracts/pallet-ibc/src/tests.rs index ec6f65817..cdb4c46a9 100644 --- a/contracts/pallet-ibc/src/tests.rs +++ b/contracts/pallet-ibc/src/tests.rs @@ -1,7 +1,6 @@ use crate::{ ics20_fee::FlatFeeConverter, - ics23::client_states::ClientStates, - light_clients::{AnyClientState, AnyClientStateV1, AnyConsensusState}, + light_clients::{AnyClientState, AnyConsensusState}, mock::*, routing::Context, Any, Config, ConsensusHeights, DenomToAssetId, MultiAddress, Pallet, PendingRecvPacketSeqs, @@ -47,11 +46,9 @@ use ibc::{ }, proofs::Proofs, signer::Signer, - timestamp::Timestamp, tx_msg::Msg, }; use ibc_primitives::{get_channel_escrow_address, HandlerMessage, IbcHandler}; -use ics08_wasm::client_state::ClientState as WasmClientState; use sp_core::Pair; use sp_runtime::{ traits::{Bounded, IdentifyAccount}, @@ -1029,46 +1026,3 @@ fn test_next_and_previous_consensus_state_for_other_client_types() { assert!(ctx.next_consensus_state(&client_id, Height::new(0, 400)).unwrap().is_some()); }) } - -#[test] -fn test_migration_to_grandpa_v2() { - new_test_ext().execute_with(|| { - let client_id = ClientId::from_str("10-grandpa-0").unwrap(); - let wasm_client_id = ClientId::from_str("08-wasm-0").unwrap(); - let ctx = Context::::default(); - - // this is a real state queried from the node - let data = hex::decode("0a282f6962632e6c69676874636c69656e74732e6772616e6470612e76312e436c69656e74537461746512c9580a206fa8cbe41be17654e5c5a88098ba35f04798f3f671bddb67d4917b7b378a4d1110d0b9980718f10a280230e30f38c9ce6d42240a20db30c718a48a844d7bffad2dce4859812e999c7d65d496ceecfe803fb556c46d100142240a20fff437ff18629bf1490e5c9b3ec6f1515d46bb9b2aeaa6e39e36611f2479b50d100142240a2047f940bc985355be7187c709ded2b689b66d69e61e293a507f1d4f90bdbeceee100142240a20525c0460e98f5cda7d20e67ea1e27b3ca471760559baa73dcf77b2e163b95718100142240a204fc65112cfbcd612a79a752ecce93465965f0415428f049f0430360426becf2f100142240a20f98b21ab797ac19b101f8e446865564901dff29b4e0bbc5badcae7ac88dab7d8100142240a20b61e9b13e849779be8f5378a670d61991875d8e091f359384d7be73d02d50693100142240a2070ba6e5985990ba1b1392713236f1b50df750f10f744cc6eb95fa7c5cfbc6876100142240a2057ae0c85ebaf333a6ec3251f577cab910cce072f238d1e50046322b83bbc0dd5100142240a20bdae4bc60b03f8fbc14299f0449301ef7f423a4cd15c6f6a35ea6a44fc5bcb0f100142240a2072c09c9e2dc9ab20a65cf70e951352f554442514ba2ac7063966ea7bbe3e6cf0100142240a200139b946b46bee4c61be50c986f2a9ef2e76917644e2ecd842c59d61a94ee612100142240a2076aa25ab781816fdfabc9051149c3db958bc09d2e8f0e10a4d91e0df8c79ec9b100142240a2007937ef39e4d18ffbf6d7343df62fcf74378aed34a9d3483bbfea77046d6f023100142240a2053352e16d2a27fb3525d5d8750d6ad7f46b303a45e434a409ac727d5cb80432b100142240a208c54298c6f8704498112ecb24f64f7a28ed2289ec573620b0d1e5a9a44f5fa78100142240a2041ef4a31eb7dc1e01f4630604e1908e644d7cdee3f66a60f98d6d59605326f8b100142240a20c4ab2451500e321f187140d3aeed09d5cdf67f09d9997b966c86dd74714233db100142240a20049cb09a86d544249f9e11cf6c348bc0561600343ebee89d1c90bbef3d13e517100142240a20d04d64a07f144638f20f081de122b88fed0cc8bda57e4810e7afb38036dd8bbf100142240a20f26945a8a64032a1defa76e720a99649125b55751b6088205e7acab901de670b100142240a20684768723f0efc2001562c3b2156b987601ae9431f8aaa6f4199649cba487aea100142240a209b94bc45bf79bb33f70430c82880456cd7bd5fb3ea131c1b26d493d01c5fe710100142240a20d7e8ce7ff46c836473acb0c3016feab586b5c4a6b529f7cedef01c6727dbbcf6100142240a20ce8d085d4b0a9502a680280ecc162bd33533a5ebada62f3be19427542189cb5a100142240a206f4855725ebb9eced957bae43ffa7d30657ce7d06b251ce20e2218bcf929e405100142240a20b046cf7d24d49b720b28dd2476b36c157262208fb065c077b1b94db1e9ffa605100142240a20f2f0f84855c6bce35c42d537fb4022662272203cc4985767ad4ef8ef1bbb7165100142240a20ff0bf39c82ed573d48585448b0fc19ba3f6203806cb6b4a230848892c097a26f100142240a209c27510363c46fb84c22765901302fa26af266da5a22099368fce05562ce97eb100142240a200ce4d93e25fa5302f4b059456f680047f87be428ae88579e0b862502b5ceed60100142240a203478e6a5b64e3aaaa6795e6536a12728a20af7a8d44c75f5e981c6d2aee45177100142240a203b252801bf8a2f4797699a0d95e8fad8c8fb42cf6f6a33f4555bde1c7fefd449100142240a20c1c1ff5f66fefb5c0849e3b2333411d1f7e9dd4888600e334e7a33623f15fa36100142240a202acce562c859bcb760e355961fee5bd27b9b52a83ded5d7a340ad21f90935be9100142240a20fe240e80ff8a48a77947b394979cf361017cd906ddaab637d72cf72e729d79bf100142240a2006854c73f5703242d31d2576ac2297c93f0b5dc16ade0097c59d5dc0faa43c55100142240a208aabd4f6d7ecec7a749c83fc7be33f3b4818cca6f93a4927b4964900df9454e5100142240a20b9186b95c90d2d00a31e7c68066bd37d73408271762604e3608e2f2c983f8309100142240a203948bfd09bbbc2fe6ac5dfe53146e32df50828eecf7b2b18cdcff8dc385cbd75100142240a201ba602a293ccdb7a77042fb486c6e010d48b13dff2bef0a26c53637312aac7f7100142240a20f5260c9ada18534d79be08836484429e686985c8241e113307792aa1255b1cb1100142240a20e730007e26ea493e96a65b30d278e92ef85444e61fee3606729a5e699b74f110100142240a20d4d8cfaa23b3a1a89a7f6a90cdbfdea15c87ad2ca4ae77deb3389406ad3feffe100142240a20dc1427d14e83926d22f6be25d1bd39cbc82a194f5e9373ecae644f156ae9c62e100142240a200339088379600f5bd507277eb894aba34d2a8f27ce1964f41e60ef2a4142dc6e100142240a2003d105a30087d96b5f0684f6ded76f826b01dab61e4136e1d851a24f0088b5ed100142240a2020d4e595c50bb9558dad9be6a8784492bbbfc754b9c5fae17edf4f8a84e8b471100142240a206ba031ff146af5199eeb335a4a9c2fd487685a489e1a154ba1d012e965fdd5ba100142240a20608f61824d3ae16d443cd0fec15c18590c890d4105e9402cad8743fb423e52b4100142240a20a8bec5971a19af91454989be32455a1302dd8169636cd9116910260f6a5bdcf2100142240a20fe95aa161a01b3473ed9dc7f4e2219528d8be86530bcfa7095086ed61e3d7a03100142240a200ccee96768f9b1d29d5bd9e63afd2be78a90cc89d19653ff1910cb36000b4853100142240a20818a546c630b881c2161588866965649678cda0f4110cccc3533d0f20e5e4120100142240a20088f8736e1cf2ea3d102f0a96ccf51222b8aa1f93d8e42947892f4395cb5477c100142240a20cbfefdf389bc341a7e17139f61146f9fb3a9d7bb84fe93c1f771eafd4d4d9d46100142240a20c3ff25a1743a9df92af4ccd9a7aed5cbc90f64fd538c3df0a9539128f5965267100142240a204e3fb8c16ad624c1852777456805e5352d0221269de66949c95da4076206b35a100142240a207ad55381f9de00220678c95a19489640fc61331e2a40d927e3d833555575c6fc100142240a20cb92ffeace78dbafe6fbf275741b4b38657fb81590712aa0bca7877931f6ad39100142240a207ac1f611f90df5fb222924b2c6683062db933d6083922c4a17ce29f21298a768100142240a2007727680e6caac998c03e3702c7f84e558b592dd76ab2a49cdd3dae16e7e853f100142240a200a0182091a12fec9482a149b62e1b9c15aa5dfc7b013f602ce1e68c636c88749100142240a20c6b03ba3484a8eb6518858d525b5a64f5b9db650bcc7c0df788ade370714d222100142240a2059bba625d971d505a9c7d7c2f3ad69203e69e3e5e1fc1e4905fae7703fa19e03100142240a20e9cd3df644306d83a34a04682f264d8db5da92f0d48a9f8fa7a48caefa65a25b100142240a20ba95f5d0e987305bb794dfeae69d7dd6a7987aa66cd7c9d42aca15e9160ec6a1100142240a2057d2c2934f6896f927b91431398ee0ee820f35d13959ffdb77961c86893c7fea100142240a2054efa280ecec9c8ce569b293e92733e2fd4a884a551241d92b042be850cca5b9100142240a2016278af083f6d261762f8a97b6a09ff83e2f5927ce26c2e48f3c7e771dc7e695100142240a206a4dd2a5375c3ed37eca0a5ecda6ad6d7d1dc9818a588129c9529b41706c28b5100142240a20c49e3cd2c701bb845963c2870dcca12ed070c3f67ffc20144327a93aa6e896ec100142240a208041ec7547fadc33aa19a785dbd1a7058b0147f2d9736b9dc4dbc6ce454bd7ef100142240a2082a1428bcd525a2e77b8f5fb89c73e5fe1261e96e93b383dd2d66767c855c8f0100142240a202dad5b2212ee688f2eeb9ca1fb6a90574f006dc1c6680ac3a8523363a248940b100142240a20be0a28e5615d9ce3b866b5cf0babf6a7f0e6de06119463382e715b47c89853e4100142240a20b7c13f1239888cda5c8e6ac9ea10675df17633368906e66a487f91ddd3268ca6100142240a20a7c97a8b886fb36c1cd26977af2dabcabc59e565fb2ac4662ea3e825ba05eaf7100142240a208cc5497465564e76909d43a2baeb935c9c3ecba972164f0817940b51b83f9507100142240a20f3b1c0e43606bd49bc84e403db685b577e898b5f7c5db9052bdc3dacf38dc7ad100142240a20596004e838b7d90408d46de62b01e13e631575f348bc59f926286aae4c88702a100142240a203a511828c0cdc0fd257387843fdbf6f19d5ca1ef1c29ec7e971fc9f1195eb60c100142240a20ee5605c1a9ed9484a70b8a591339830f24530eefc4599a7c6188a78896908e2c100142240a2058a618057cf738d5fe0ecd46959bc90fc35e75abfabdad47466882af2328f451100142240a20d1c146d2429a5a827660008721c7a880e71f44feaa3dc75524c1a9281bac48cd100142240a20aa8539bb50cbc77bd9dd6ebe43e8d63547b5eab8c7d592f5f4ae8820dfc5161b100142240a20b28ba3f09e3521f7d09f0098c6743bc218ee2970068adfa5d908d9d06e627ae5100142240a202bb7b11dfe79a12110b0370510ef20d40ba8a563f517310f8bf37cf7f0403de4100142240a2040533a786cd0be9618126633512666b1b1b9ab3b436fa653c93e2f65da9c196b100142240a203fbbcb8e681f33040bd41a37ffd6997c61ebf8584923e25e89a6a067edb844be100142240a206a5f902cdeda2c2161d16bd21d586720c08c0bbb7b463d9c59147338d26a8a96100142240a20f459c0d1b1e42bf6c6f976b70e15e2842d753200ce2f901a7cf1b8c9bfb10c04100142240a2078ffabbea4ce0d6c8208eacda97bd6aa8b91fe5fd1226bbb08c63c12dfd416aa100142240a20fd4ae377dbe850ae5bdd50c71831ccf889ede1785d4011f20e3ca6edf0b93900100142240a20fcd1a93deb820043c92b87798d9aa88f699bf721daa89f143f90c800d906d3d1100142240a20e8e197cc511ee16a75a247697c20173114def67c902aa28673022e98dd36d339100142240a2056682332630f5dd42f160f1e3475d1881b2adab83023216892f538efa1e0e66f100142240a20c7d9cab0fb88dccd0cf4abbf5df9d7f36a3de439c5070c599d397e74133bdfed100142240a20866fe4ae134938ccf4c5caf01358881c75cfde473b0bb8a2623cc231db2ea3b9100142240a205cecf03ce3d4f89afc378058886f46a745f1672efea7f0a01160cf2df98bade0100142240a202892778d5f2c58f231c340c9ac3fcc339abe45e6cf51d207a3cf36f854643ca2100142240a20fc555c014d927fe7838e840609916b9af5d93892ce6f394398858286802b8c61100142240a200aa2bb3872ae3916648f22ce359f3953ecd1ff971c0f265328e049dbad9e935b100142240a208c3dbd5a1b928cb51e918452191e5328b0f6e8de0259517831a90b02dba3e611100142240a20aa6fd06015b8309ea9103f4b0e29bfa7e21ab5bb1431c3a76433f591c739f838100142240a20fbe806f96dcc137dcaea26125661f35d36aba1e2b2d7c89cf6a536c1a721c3a0100142240a20a892342c56149812a43e98c82b6a3dfee7eff384d9b6d832002ea63838f64900100142240a205cd92a7f0b1a7ded1de21ee73439f8851622b8d3e4664f68db20269cf0ede9ef100142240a2023f07bcb8dade90cefd08732183d5fe32b89ad8a4f84987b9e4e7e767c258756100142240a20be6b59cb464fadec4e0b22a9f12857ba5cf7a14c4f9551439d36305d582dd7fb100142240a2056cd1acff4de0c0d403c9f34bcafd74cb9e50e47b0b2ffda16f3db9a5fa12d48100142240a20acc5d703d7819d7993784e6ce107cd4c5625954d3baab0bcc07afe7d8c473a22100142240a20300c6f7d60252ecda817a4161b72e77445ef0f95874503ed01533a78a917411a100142240a205ed0b6dcf93bd071118859eb275ddf122a7aacadcb6c46cd518846f0d4733a15100142240a204b98c985398b5d64b7c1cc430cae9fe4a7bb24e6051db62555a83c9662660704100142240a206ba7fd1d9a17418b9d8a66d934fe866d69d2065d7d8ba1f6dc051fd4a2f6de01100142240a206ade09347d6072d154bdf0b13d0814ce9bf2a3b163c7092d71f0ed5cdcc9e1c9100142240a20f733feae629c4d654a9f1e5de09e422de82ff8aaed17a0701ab43450e63720f6100142240a208cfea50157362012d46ebbd35d758d9e7e583192a19ccd9fa44e8e566a2f5f61100142240a20d0b4aada93fb3d0b358e8d59f8914f5987acbc6f5b4f3e12a1ed8d962eded827100142240a204f950be5bf61958a0ae6e6a036b85b33ba838de8bd5508b558cbe2602d341168100142240a2082e6b6bf1f275c59fbde0dad91393ae690d5e644d11d23898a9ccfdda025920a100142240a206f7a1a4f9d8c054907f3b6b946a59525199dbcffe9fd3ba89612a5d4b548bede100142240a20664321f9b5f8f1154b1f6ecf936629232bca97b4e6cb7b15b18f6788df57acf2100142240a2074b60dfb12745236ba9dc8f925efa21482b50c870c567638ba3240a05fe363d9100142240a205b379072ec1f3f70b4650979a47b24f9b080c03450f7e9587d92cb599fcf4d6b100142240a2018b45f8c44b86e28967b6a1d16b7ceef81ba4dab940af7f431e2c362779bf8f6100142240a208934b9a6c38dd420aefa1e115c839fad7a71147a6efc77ab593485c3b07576ac100142240a20d6dfcd2fd4743915bd90a97b149d985bab1371d416ea1c94878f425b2a312a9c100142240a20d3b3d9703a265a51a137b9de348587c645a168981ef3e01c9dc482856751b8ef100142240a20fc787e0cc80b880cec43b8186eabcaf905c6df87582986fe724884d8f50addfa100142240a20c0444bc7cff2374b76ba49e5ce25b632b0db77f08f6c40799077ce3f5b035f3f100142240a20a2ee8d9c22eba97998d63854409d99c87b21d079f5c888d863a81d41d6abf011100142240a20c2344c6fb787621295335b6b5acbab9531199901492d41e13a64dfb2927f83be100142240a2093d7130f787b66a92d9fa3d9abd8047e5a9cb2dbd639f5bac360155b8c909f58100142240a20d7a02b1ba41b222313975f17552d85546feb24331205aeb12d664a0b31597a2f100142240a204c51b84496e533a7f1bb2b806f3733a7f0a48543976d0a4e5410e831f93e0417100142240a20615d64d17a182504db609d14dc6a45a109817cfaaad1608b4c48382bee48d378100142240a201d704a1e9e8ceb87d7ebf583e96a6318ce17bf25ffdedbe57a4fb200f9c8f206100142240a20155763a153e0c02b2eef1d8a9cd8a50a9eaac9d3af7ad1e559b1e2320b521e1c100142240a2098ec45e2f815f8bcb99d5006439ac4418667db79c3abf07c8b34e6568c288142100142240a205208fe27477acbc6750d0caa831c0b26801c58eca046a6cf9d4143f85d877e83100142240a20a3d4641c0c5c4fc1012044d8daa6853b70e6dad8178fbafa2d93046db48a4ca0100142240a203773b05d2e2660498c8d407a1d6223423c26aa08b9b3656af94d78b861fba22f100142240a203ca72e96f3893cd5250ff6ba60a9cdfa049945a3740ad6338398d70a1355e06f100142240a20500a9e1ea37636c24ebf4e32668897dae936eef42b6da49027f606d4f24a7e96100142240a20ed171997fcc2549c08a39a0367b723c68434e08b7c104320f410a6da9a6d822a100142240a2039712f967c4e06d284d6da4735cf2823c1f770674b668f7bc896071c3fd41eda100142240a20d42a22861f9f410c2f0733d0aba4ce6ba6cfa9c69ad5b6c6502a2b99ae8c0b49100142240a2095fcf1464d41feaa1f7659756d5278e7a42dac7951ed211f6caeb3e75285c75b100142240a204df6e4d7da2c11ddb9153c714699f9ab625bbcd5e8e38f1cdeee567dc04abc61100142240a20f2ecf2265889c11a724e4fdb0e9f0fd9905b776989014222b047ff9de5fe4014100142240a20b8cf76a8082d518016ea5588be57b64e156ed23b0f72248975522c23d15ef161100142240a20a3d9e6ea3bf5bbaeb654fa0667fa89d6333e1bda95488c5e0cf70fc3a6f5f354100142240a202565e04c6e0b665fac87f8238bee74837f8f621ed63409f3838d263603400a98100142240a20c2e6a39d423f82b034e5370932f02653ee45254ced3ec2094640508e3d04d91b100142240a202eede43f3ecd9490e538e4caf623079ca8ac9f6c7ede20686ac4ed6737608e43100142240a20f25a93ddbbd03cf6db28c430de1bc7c0cc4ab2912f9df692da294a3d97032ec3100142240a202a38a4dcdffc571d547ee3e59121fdd378335df7c65877f983f0957cdc982413100142240a2013bb7d0d3ad02c62ffe9dd420451792fe18502818635ca189cdfb27cee4e0ae7100142240a203a76a7eebe9edea2fcfb70ed044111a1e8f8aa85ee30efe364586845cf28c478100142240a2053db8eab8282ff36ab195de04f694c726085d18722e02ad3713c7e0a64353d00100142240a204dc2e72680dbf0156818114fa34d3591f8e6948df25a128e191190c66f6ac353100142240a2081c5c3bebb947d1716d5f6f325afdc71c953c23fd85a716dc082790bbb8d1915100142240a20121e86ff9fde3cc3d2ae12c7346e007c7e025dc2dbb9474494659d76903fdf4f100142240a207af0706d921a331b5c1f957a8d1decf15aa0e3377a80d72107693afd8614ef8f100142240a20ea7689b86efdd05afd7e5cd450b13583220b4428e26547f6203b4f9fa5bf7e9c100142240a20f5e2c973d4ccbdd36d8ed4e3dae75d3b50002cc1c74eb0a1fe29ef1ef8e3f0cc100142240a20258f23d60623fcb1d699a35f79776a9e81e979150ba5098dcc8e3a69a407ff9a100142240a20f56f5b3de4f46bcde88569888783fd60646806795807edb1e04ec3dff85ff3e1100142240a20b1f748c87b12edf7242b4719cfe68e6761acaa4329beee538d6ff740941d3cd3100142240a20a3dbfbf4eba67c252cf10f45008eff4581f97a5c4f377260de7538aac5a422cb100142240a208b35aa0d212e4032ede352d5426696c260c9ecffa632a2e14e6a6629a6c9f637100142240a2072341ca1eb3a0fd4e790318b51ace114315573d5355c9d5336e39382ba064256100142240a2057cdefa56a9a1df54da7c8b7220e8e1932f5d1a414a74daba754c0072f1dffdb100142240a20b14911cb101f45b88c437a36bd82a5f8641b1c55052060ea46ea2baea570e8bf100142240a209d31c78ebe9664e2bd8ba41cddcd9c5b9fb0cc6f8be0a2e5b91f6bcf66a5c753100142240a20290be52ae5259f3e8bd0cdf454004607867a97c1db86d0c9ff16c8c83625bc83100142240a20c91199db47b7591bf1a928534cdbd3e5979a0d09d6a464f2a9607ec444bd8a97100142240a205e0fad9f1e6837994babd7d55b2d4079af785ec48568cd1c4efd60ea28162e8e100142240a204c43a374e6b3e6f7d6c5a6b8518ae0d0d232a1c46d63af8fbc800045a14cbe93100142240a2045983f6d17109e1957bb37362f40a1eb0c8d5259091ee9f8a1693dd821e926eb100142240a2054ad6303d60c57a12c38568dae27449da3a436a1ee225e76ae219c618adf7fdb100142240a2022edc626e6c76166af032395ade8b874ac872074c72e3e6a70c8f668993d19e8100142240a20ee73c2912d35fe8d3f5bd51303d89bbd8500cd12b3a17594ab3e9ac4cee92220100142240a2081738498a35450b3e36b0a8af266f887bbc3205c00aa46b04fab7f47bc0dc775100142240a20194d95608f8340cab24e8bb302f1e4b02803ebe8f750888aa5da5508019f5f26100142240a20ac0ef45b1c0f242a4aeb0ef03a9c0d9e3ae2a4bee8cb4c35f0293bac4331e765100142240a201887f7937a8ca4ec67ceaedebfad3d307b10f416219de1ed4f8646409eab730a100142240a20a3392683550322454a4b5745afbe051746c4e34170ab2af0d1ce40307c7b7f9a100142240a202c203d61f409a43e44773a1e7024ebb67b45b489e675ef384334e073bb935ad2100142240a20e1c1327187f940cd73d5afb676b4b28399109aa6a6c3868707df1dc3d62a8382100142240a20fc2ff0598fd334e425949d552cd31b59e87365b05d6151aa2e8e982e44f29609100142240a20ee40b85aa515fdbe6e559f815edc7ec1e321e0d152dd54258382ba31b54e447a100142240a201267b8cba49007ec111d8d037e52e3e32c7ad6c2f41d6b45e90b8402a24005d3100142240a20c3e904b307c280271b2a2bca82cefc7e14d75f776e08ffe58fc4f7fa3d1d0a61100142240a207cd2af9dc098c7fa40243b775ab92a9c5cb3a31380bb3d5779e8b7015c9cf189100142240a208dc1439b28d488419535c2fea9c821023f7bce423fa02d9f42e60c07c3d6ab56100142240a20c3150e4ca47e7bc6486f198bf0a742a18ab0871bb1efa34e82c4ce81f2792667100142240a202e8f05a1e5ba68d6e4b93c289e885f630cf27f720181060c437869ab9e839391100142240a207a92827270cfa82f16145a44f9bdd9ff5038ef1b665dd520a2e61db974909496100142240a20ebb1834a568ea7653bc66f394937a0aa4f2f617118d2161e2c11c0d7d2febb9d100142240a2054840bd4fe6fbabe28e2e1e54cebb2002e9523d2e1543b50f22dad31a07bc700100142240a202ea29e0897dea1ebd35d08aaf170ffbcef9b1add7a80aa3afdd9161fdd4329e0100142240a20d49bb29ccd716262579a5a448c377aa16ff969d5b2c282a43de87abaf4174e93100142240a20fd2d8b8e265ca440581956a7e36b57eba685631193bc4fe0a2b638887ca5cc0b100142240a20b6d7ac98d6667fe8f4a186ef12a66b017df05a54e11b45d3f2967cb3d6b6827f100142240a2012e9b2bfe3d95c70fe8036a6cc8f677d67c9c65724aef87cc2a2eba5555d8107100142240a20e5f305cd6d930d41209036f066a86d3724aad2f388d354ac4979cc763c220a56100142240a202605f256953a6cd468cb45aa10509abd14d606166578147b8f4d2c70e3c5a4d3100142240a2045e03689170b9fc027db927a99842e2c13f9fcbd875a74e2b54a2663f3c23dfc100142240a204f623eddef2d19ee27b9e5270a51290741fb7953f3465ecbe521ced55d97b9af100142240a2098a6defcfeb3dfca36ec46eb373734627a2c395cdd2d886046a11788ed6467af100142240a2035db4f9ab121f213b695b982f50c47ac04a14c54214e831ed1bbef7b9542310c100142240a20496826b538d97906e14d417b48598d7d591a483ab5f4c6786cd0b96239c2f4cf100142240a20ef27d1d5573e6419ffcc7c4372668105118256b810ab2e2dbb5e7d8280ee9425100142240a20ed3f97f83ee7799c4aeba9f40bd18134c862c1a30875fc1e038cd27bae3a739a100142240a20348e8bacc2d40191a6a00e137c745a422ff8fb03148d2ff9cad75efbb7a67014100142240a20316d5dbafd16258b7077d46a3dc32c46986a56a3eb095094d3f8fdd6acbf91cf100142240a20bfcc366ce0bfebc76ac157ed0814e2516786e48eb1a3313b5fe37283e9cf2c5a100142240a20cafe2356af019d8b5f39c949b3dee71dd5356eb2655d819f485d0244e55b9fcd100142240a206a5dcdf2c3598c00d31a010dece5bf744f203856712531b07a31babcf06d09e3100142240a20d03903d0b6fb3ea0891ceeb3a84afdd6979f453d70ee1531168e418d0a886972100142240a2008bd9e0a5b268a1ec30a8efd34973a15e2e487c9bc7a987514f8ba28e2df81b8100142240a20e18f9d4831f99a874b84355d8404b084c06793b62e78cd05e479e7e399dc6869100142240a200938374801c6b36a9164ffdbec02bd2d54b7f927a850f46136126726774166eb100142240a20efb31c5039e45fda750af5d2ea31b3210a407b168adec8f98db1f3dbc4cd9438100142240a20e2d564796e2660ba1bf553a21581f82116f775002a0dc0f26439f54c660fd84d100142240a20bff74b6ff5ccdce9a659408871d486511938422a6e550fe0669ccd739f801081100142240a20e41a59c4d549c3e42a7a8d6dadf124bbba1e44ba8ce985aff12eca30e88f9875100142240a2082019acc07b285d7edea9f72e3d5285312e994beb056e6faf58492841a80d282100142240a2004eed32b0d6be0b60d2e33281f623471f3a65de597d2de13c0d8f887ea723aab100142240a20bc969803075efefd39758affc268d35239b19b63234bce1a8681d3fe5f454057100142240a20e01d6eda8094e949bfbb05c819b509a12eb662a414b822f841d9555d58e1ce76100142240a20c3576342cbf99792896ee5329b04ff2eee2fc2bb6d53c5c03d52c8957ee793fb100142240a20de186294778cc927cb2a24ade9ad165956f3586979f1ac5f3b4a16edd2674339100142240a2043a9a2915f377cd4943f602be38c3bd6ef39e91562c09f18fb672884b4bf8eab100142240a201a608965f3df6f3b63f91616d5c7878c3decad01ea6b3b286be37c62e30118b5100142240a2059dadf17dc0f84c1c334e6a815a04bdfcd0988a3f3bcb713c66ae29e17276cc6100142240a208d5cb94ebe135f3e9fb84ed39aa213a14c57b98f19d2cf35f2cc450b44e3792f100142240a20297dc7cf28b3d40a42c5e8faac876bf7227c670e6e031dd0e0537f4fb70e6fbe100142240a200909c1eff97923f6bd47e6ec8b5dc163b32d5b675a3b13138d3599e5cc77ab9f100142240a20f7bdbb5c598784ba157940b08b5c5aa967d0f3faf60da28b915650eb39afe47c100142240a2022b53680ec36fef4aa69033220dca0e12722cbb58cf4acf7de23b3144cdb534a100142240a2077aef3319ea0729b546a0fabba015b08e2e201014b8a6cd05e6d239d89a00872100142240a20677358fc648638cbd854d2a009dd39b8508dd3047d0c5f13bb403a64d053ad03100142240a20645b81dc1769e34a815cc5682abd3c3b3ea60afa9705a5ff2908ad354b0f9ca4100142240a2073dce1727ec50c50366378cd389246e19543d900d7e9dab8e323d04cf5b202a7100142240a202ada479e1fde7211de15900ed29035f6f07506cdbadc4c232aab96d62006b9de100142240a20ee1a56541083b083f1a13b5f8aa4042a098de2cec4c43f3250baaba8f03a52ea100142240a20e2cc4424464983ada824bbef5aaa8995e80ef1017c15ef3b13902599841637ba100142240a205246164c02e9e6bfb7a2dbf7ba8a5440a189f8048373678f5b1085f217464c05100142240a20b73fa06a1769cf81bd238e8633bb3a54432cc70408d44cd23423d586ffd711fa100142240a201889f1b031fa7d64c4b480a17cd2941be2c02681bca397c93607091f37bf5ee1100142240a20b884577e30ee6428215afe3b9bd2d7b5e50f724d74a8e11defc1b52ce411b385100142240a20fd734da3c98d7d56f8b9cc92f389350f3b6de2fb5917d338fee9fd961978e2a3100142240a20229fbcb8d2c81679fc46e983723defda5c232a98964f295b1ee0ac100f38b8df100142240a2084845f99ad8fe89b7aa136c30b71b791015e8801b1d42cbf9841a0b90e723aad100142240a208c258b4ca16dfb8e5afde4cf40fecf115307798117b4860475511b3b5d561584100142240a20ea8c8bec277832ff4f31396f76d6117026cf73407bce46de9ccfd17c686ca117100142240a200e7bc96895730726225e47e31c742fd44d3936f31ecd32658c694fc11df25224100142240a203726c5309429bb2ac37f35f67ade81f691cde2fc1e84cab80db6527b8d0dab9e100142240a2017dd31b9a0e4e050b82550ffe7920c3f53392afb5f6e546114921d5a4a2b6fce100142240a203f6aeb3ed0d67d71ee11a1c2e1ed66da77abd8cc8c0f4d995d64fe4ec8736847100142240a206375ae0c1bf2b0388e16971715fd68c31ed179f38947531c165f0da2c3fe7667100142240a2012aa455c35356255f9ba286193962f3bc23f7fff565c1995ac21015bd946fe6e100142240a204a46371fa537ccb9ad995cd03c69517dfd310fd4af9d8a95c7976cf8eb6c37fc100142240a2025196076d22b8093c7a53a1be1f9ba73d404c73dde8fd8c49465990eb7d7707a100142240a2047ede3eca5f6c8f0a51f2d36d7d1c236aab07a8b2aaa6ab08c8ccf8d87ce3dd1100142240a20a2a4f4e18a49ae5fa0170e13427a58e53779a64bdbf817183420f9abdc0cd409100142240a2017638d776ab08bfd9eab2ee19973c1cae6b2904830f14c12d675bfe88e0d7e07100142240a20d7a0c586d45638b0c2b335420a57c73b2acbe1a8038a25c800a030ffa1e62fbf100142240a20af470f2d66661e59ad85302877ba095309d859cea3d5086c5c184030c8f5bdf3100142240a2052f15f5f5cbea0ee45d19f44601ba96cd533ccdcd3b9e5f966d059294d0e0a96100142240a204485615186ae8ad33aff337594a7f8325d3a50201ee04320fb1dd2eab9643d16100142240a202b07c366c1ed899a2ac9722b76e092828714a8177368e51ca05ec05c565866b3100142240a20e81206b483fdcf1fe42145f27d1efb8178a57ee24b196285374037da2a53b323100142240a20a0586d138691972dad187e747b31698e301c3e1d58d5ff6be8a06d4ec5d6b855100142240a2027a748182c49d7c4ec091c9589da5c9c35fa99ac8ffa4d613129dd4d08e9f112100142240a202773bf65269603924e514b545eb69d988b5f6b5d94310f2eac5fe549cadad07c100142240a20ff568b8e0dbe74604c6d04b5de6f2df03b343bea074c4495c6a10e511ba473d9100142240a209337ca812d686250385c635198917e85833d7a9b0ab4c537246fb069d09f401d100142240a203a4bfd825ccd308def4a61bac80c579db42b02ea5f1a0768656a326e83a0dd88100142240a20b5e0d0ae74b0ac76c0195fecca9660a241920ba97cdc5a247c7e941ee1f5407c100142240a201b47bfdc6dc74483d9f8b2b6317c4c1a38b781bdcb8e054ba268fe470a2617a0100142240a20f33b53556f28f27d250585317cd57a18f37c5d5f2b3c1bd00a0c91ea54f1636f100142240a205b2085a051ff58153cf38a4abe8411d1c24c828d1c54779ee778eb8f9a419cb8100142240a2025017db1dce55f9e64405da1d3d61dae9b5138fd60fc9f1f3c3187ff22e78ac1100142240a2094efdddccdd25ae650a89596fe23a93801b087be8e5b380451a79d7ddf4a1d5e100142240a203ee2346e1195969237202d47b843937c1038c34c67dca5a3fcd1127b9e8aa014100142240a2080629b67e7b2d6f57e9da3cb29cc8463a65d125039628124784f944b94c29e88100142240a202c3ce4d7102f4236e0df2e8f5797f6dc3d2e6f0e57d373c9a4b89b21d4d22868100142240a20fc678679f11bc904720421273689e6826acb42b21e2c4c5c1d7bf532d8966841100142240a2030afa9ef79458f844a27a3881655b6eafb90b3912737f1bcddb95e78eb098c1d100142240a2095885aaa49faca9622ac9eab12f2efa509361511039934ffeff93eb948eb517d100142240a20c222ba3fffec09b85f1992db2dcaeaa48205903219789369855e347fd188144b100142240a2012c277c98d0593ec3d0f9d01e8ce08f67813197b67fe96d2be7c5ba6481515df1001").unwrap(); - let AnyClientStateV1::Grandpa(old_state) = AnyClientStateV1::decode_vec(&data).unwrap() else { panic!("bad grandpa data") }; - - // should ignore other clients - >::insert(&ClientId::from_str("00-unknown-0").unwrap(), vec![1, 2, 3]); - >::insert(&client_id, data.clone()); - >::insert(&wasm_client_id, AnyClientStateV1::Wasm(WasmClientState { - data, - code_id: vec![3, 3, 3], - latest_height: Default::default(), - inner: Box::new(AnyClientStateV1::Grandpa(old_state.clone())), - _phantom: Default::default(), - }).encode_vec().unwrap()); - - Pallet::::on_runtime_upgrade(); - - let AnyClientState::Grandpa(new_state) = ctx.client_state(&client_id).unwrap() else { panic!("failed to decode grandpa state") }; - let AnyClientState::Wasm(new_wasm_state) = ctx.client_state(&wasm_client_id).unwrap() else { panic!("failed to decode grandpa state") }; - - assert_eq!(1, new_state.authorities_changes.len()); - assert_eq!(old_state.current_set_id, new_state.authorities_changes.last().set_id); - assert_eq!(old_state.current_authorities, new_state.authorities_changes.last().authorities); - assert_eq!(0, new_state.authorities_changes.last().height); - assert_eq!(Timestamp::from_nanoseconds(1).unwrap(), new_state.authorities_changes.last().timestamp); - assert_eq!(old_state.latest_relay_height, new_state.latest_relay_height); - assert_eq!(old_state.latest_para_height, new_state.latest_para_height); - assert_eq!(old_state.latest_relay_hash, new_state.latest_relay_hash); - assert_eq!(old_state.para_id, new_state.para_id); - assert_eq!(old_state.frozen_height, new_state.frozen_height); - assert_eq!(old_state.relay_chain, new_state.relay_chain); - - assert_eq!(*new_wasm_state.inner, AnyClientState::Grandpa(new_state)); - }) -} diff --git a/hyperspace/core/src/chain.rs b/hyperspace/core/src/chain.rs index cf60fbfed..a19c3182d 100644 --- a/hyperspace/core/src/chain.rs +++ b/hyperspace/core/src/chain.rs @@ -65,8 +65,8 @@ use pallet_ibc::light_clients::{AnyClientMessage, AnyClientState, AnyConsensusSt use pallet_ibc::Timeout; use parachain::{ParachainClient, ParachainClientConfig}; use primitives::{ - mock::LocalClientTypes, Chain, IbcProvider, KeyProvider, LightClientSync, MisbehaviourHandler, - UpdateType, + mock::LocalClientTypes, Chain, CommonClientState, IbcProvider, KeyProvider, LightClientSync, + MisbehaviourHandler, UpdateType, }; use serde::{Deserialize, Serialize}; use std::{pin::Pin, time::Duration}; diff --git a/hyperspace/core/src/lib.rs b/hyperspace/core/src/lib.rs index 721ef2066..e53bead38 100644 --- a/hyperspace/core/src/lib.rs +++ b/hyperspace/core/src/lib.rs @@ -14,9 +14,6 @@ #![warn(unused_variables)] -use futures::{future::ready, StreamExt}; -use primitives::Chain; - pub mod chain; pub mod command; pub mod events; @@ -25,11 +22,17 @@ mod macros; pub mod packets; pub mod queue; pub mod substrate; +mod utils; +use crate::utils::RecentStream; +use anyhow::anyhow; use events::{has_packet_events, parse_events}; -use futures::TryFutureExt; -use ibc::events::IbcEvent; +use futures::{future::ready, StreamExt, TryFutureExt}; +use ibc::{events::IbcEvent, Height}; +use ibc_proto::google::protobuf::Any; use metrics::handler::MetricsHandler; +use primitives::{Chain, IbcProvider, UndeliveredType, UpdateType}; +use std::collections::HashSet; #[derive(Copy, Debug, Clone)] pub enum Mode { @@ -50,19 +53,29 @@ where A: Chain, B: Chain, { - let (mut chain_a_finality, mut chain_b_finality) = - (chain_a.finality_notifications().await?, chain_b.finality_notifications().await?); + let stream_a = RecentStream::new(chain_a.finality_notifications().await?); + let stream_b = RecentStream::new(chain_b.finality_notifications().await?); + let (mut chain_a_finality, mut chain_b_finality) = (stream_a, stream_b); + + // Introduce altering between branches so that each branch gets a chance to execute first after + // another one + let mut first_executed = false; // loop forever loop { tokio::select! { // new finality event from chain A - result = chain_a_finality.next() => { - process_finality_event!(chain_a, chain_b, chain_a_metrics, mode, result, chain_a_finality, chain_b_finality) + result = chain_a_finality.next(), if !first_executed => { + first_executed = true; + process_finality_event(&mut chain_a, &mut chain_b, &mut chain_a_metrics, mode, result, &mut chain_a_finality, &mut chain_b_finality).await?; } // new finality event from chain B result = chain_b_finality.next() => { - process_finality_event!(chain_b, chain_a, chain_b_metrics, mode, result, chain_b_finality, chain_a_finality) + first_executed = false; + process_finality_event(&mut chain_b, &mut chain_a, &mut chain_b_metrics, mode, result, &mut chain_b_finality, &mut chain_a_finality).await?; + } + else => { + first_executed = false; } } } @@ -107,12 +120,7 @@ where tokio::time::sleep(chain_a.expected_block_time()).await; } let message = chain_a.query_client_message(update).await.map_err(|e| { log::info!("error: {}", e); e })?; - let state = chain_b.relayer_state(); - let mut queue = state.misbehaviour_client_msg_queue.lock().await; - queue.push(message); - let next_message = queue.first().unwrap().clone(); - chain_b.check_for_misbehaviour(&chain_a, next_message).await.map_err(|e| { log::info!("error: {}", e); e })?; - queue.remove(0); + chain_b.check_for_misbehaviour(&chain_a, message).await.map_err(|e| { log::info!("error: {}", e); e })?; } // new finality event from chain B update = chain_b_client_updates.next() => { @@ -125,12 +133,7 @@ where tokio::time::sleep(chain_a.expected_block_time()).await; } let message = chain_b.query_client_message(update).await.map_err(|e| { log::info!("error: {}", e); e })?; - let state = chain_a.relayer_state(); - let mut queue = state.misbehaviour_client_msg_queue.lock().await; - queue.push(message); - let next_message = queue.first().unwrap().clone(); - chain_a.check_for_misbehaviour(&chain_b, next_message).await.map_err(|e| { log::info!("error: {}", e); e })?; - queue.remove(0); + chain_a.check_for_misbehaviour(&chain_b, message).await.map_err(|e| { log::info!("error: {}", e); e })?; } } } @@ -138,6 +141,268 @@ where Ok(()) } +async fn process_finality_event( + source: &mut A, + sink: &mut B, + metrics: &mut Option, + mode: Option, + result: Option, + stream_source: &mut RecentStream, + stream_sink: &mut RecentStream, +) -> anyhow::Result<()> { + match result { + // stream closed + None => { + log::warn!("Stream closed for {}", source.name()); + *stream_source = loop { + match source.finality_notifications().await { + Ok(stream) => break RecentStream::new(stream), + Err(e) => { + log::error!("Failed to get finality notifications for {} {:?}. Trying again in 30 seconds...", source.name(), e); + tokio::time::sleep(std::time::Duration::from_secs(30)).await; + let _ = source.reconnect().await; + }, + }; + }; + *stream_sink = loop { + match sink.finality_notifications().await { + Ok(stream) => break RecentStream::new(stream), + Err(e) => { + log::error!("Failed to get finality notifications for {} {:?}. Trying again in 30 seconds...", sink.name(), e); + tokio::time::sleep(std::time::Duration::from_secs(30)).await; + let _ = sink.reconnect().await; + }, + }; + }; + }, + Some(finality_event) => { + log::info!("======================================================="); + log::info!("Received finality notification from {}", source.name(),); + let sink_initial_rpc_call_delay = sink.rpc_call_delay(); + let source_initial_rpc_call_delay = source.rpc_call_delay(); + + let result = + process_some_finality_event(source, sink, metrics, mode, finality_event).await; + + match result { + Ok(()) => { + sink.set_rpc_call_delay(sink_initial_rpc_call_delay); + source.set_rpc_call_delay(source_initial_rpc_call_delay); + }, + Err(e) => { + log::error!("{}", e); + match sink.handle_error(&e).and_then(|_| source.handle_error(&e)).await { + Ok(_) => (), + Err(e) => { + log::error!("Failed to handle error {:?}", e) + }, + } + }, + } + }, + } + Ok(()) +} + +async fn process_some_finality_event( + source: &mut A, + sink: &mut B, + metrics: &mut Option, + mode: Option, + finality_event: ::FinalityEvent, +) -> anyhow::Result<()> { + let updates = source + .query_latest_ibc_events(finality_event, &*sink) + .await + .map_err(|e| anyhow!("Failed to fetch IBC events for finality event {e}"))?; + log::trace!(target: "hyperspace", "Received updates count: {}", updates.len()); + // query packets that can now be sent, at this sink height because of connection + // delay. + let (ready_packets, timeout_msgs) = + packets::query_ready_and_timed_out_packets(&*source, &*sink) + .await + .map_err(|e| anyhow!("Failed to parse events: {:?}", e))?; + + let mut msgs = Vec::new(); + + log::trace!( + target: "hyperspace", + "{} has undelivered seqs: [{:?}:{}, {:?}:{}, {:?}:{}]", source.name(), + UndeliveredType::Acks, source.has_undelivered_sequences(UndeliveredType::Acks), + UndeliveredType::Timeouts, source.has_undelivered_sequences(UndeliveredType::Timeouts), + UndeliveredType::Recvs, source.has_undelivered_sequences(UndeliveredType::Recvs), + ); + + log::trace!( + target: "hyperspace", + "{} has undelivered seqs: [{:?}:{}, {:?}:{}, {:?}:{}]", sink.name(), + UndeliveredType::Acks, sink.has_undelivered_sequences(UndeliveredType::Acks), + UndeliveredType::Timeouts, sink.has_undelivered_sequences(UndeliveredType::Timeouts), + UndeliveredType::Recvs, sink.has_undelivered_sequences(UndeliveredType::Recvs), + ); + + log::trace!( + target: "hyperspace", + "Received timeouts count: {}", + timeout_msgs.len() + ); + + process_updates(source, sink, metrics, mode, updates, &mut msgs).await?; + + msgs.extend(ready_packets); + + process_messages(sink, metrics, msgs).await?; + process_timeouts(source, metrics, timeout_msgs).await?; + Ok(()) +} + +async fn process_updates( + source: &mut A, + sink: &mut B, + metrics: &mut Option, + mode: Option, + updates: Vec<(Any, Height, Vec, UpdateType)>, + msgs: &mut Vec, +) -> anyhow::Result<()> { + // for timeouts we need both chains to be up to date + let sink_has_undelivered_acks = sink.has_undelivered_sequences(UndeliveredType::Recvs) || + sink.has_undelivered_sequences(UndeliveredType::Acks) || + sink.has_undelivered_sequences(UndeliveredType::Timeouts); + let source_has_undelivered_acks = source.has_undelivered_sequences(UndeliveredType::Timeouts); + + let mandatory_heights_for_undelivered_seqs = + if (sink_has_undelivered_acks || source_has_undelivered_acks) && !updates.is_empty() { + find_mandatory_heights_for_undelivered_sequences(source, &updates).await + } else { + HashSet::new() + }; + + for (msg_update_client, height, events, update_type) in updates { + if let Some(metrics) = metrics.as_mut() { + if let Err(e) = metrics.handle_events(events.as_slice()).await { + log::error!("Failed to handle metrics for {} {:?}", source.name(), e); + } + } + + let event_types = events.iter().map(|ev| ev.event_type()).collect::>(); + let mut messages = parse_events(source, sink, events, mode) + .await + .map_err(|e| anyhow!("Failed to parse events: {:?}", e))?; + + log::trace!( + target: "hyperspace", + "Received messages count: {}, is the update optional: {}", + messages.len(), update_type.is_optional(), + ); + + let need_to_send_proofs_for_sequences = (sink_has_undelivered_acks || + source_has_undelivered_acks) && + mandatory_heights_for_undelivered_seqs.contains(&height.revision_height); + let common_state = source.common_state(); + let skip_optional_updates = common_state.skip_optional_client_updates; + + // We want to send client update if packet messages exist but where not sent due + // to a connection delay even if client update message is optional + match ( + // TODO: we actually may send only when timeout of some packet has reached, + // not when we have *any* undelivered packets. But this requires rewriting + // `find_suitable_proof_height_for_client` function, that uses binary + // search, which won't work in this case + skip_optional_updates && + update_type.is_optional() && + !need_to_send_proofs_for_sequences, + has_packet_events(&event_types), + messages.is_empty(), + ) { + (true, false, true) => { + // skip sending ibc messages if no new events + log::info!("Skipping finality notification for {}", sink.name()); + continue + }, + (false, _, true) => + if update_type.is_optional() && need_to_send_proofs_for_sequences { + log::info!("Sending an optional update because source ({}) chain has undelivered sequences", sink.name()); + } else { + log::info!("Sending mandatory client update message for {}", sink.name()) + }, + _ => log::info!("Received finalized events from: {} {event_types:#?}", source.name()), + }; + msgs.push(msg_update_client); + msgs.append(&mut messages); + } + Ok(()) +} + +async fn process_messages( + sink: &mut B, + metrics: &mut Option, + msgs: Vec, +) -> anyhow::Result<()> { + if !msgs.is_empty() { + if let Some(metrics) = metrics.as_ref() { + metrics.handle_messages(msgs.as_slice()).await; + } + let type_urls = msgs.iter().map(|msg| msg.type_url.as_str()).collect::>(); + log::info!("Submitting messages to {}: {type_urls:#?}", sink.name()); + + queue::flush_message_batch(msgs, metrics.as_ref(), &*sink) + .await + .map_err(|e| anyhow!("Failed to submit messages: {:?}", e))?; + log::debug!(target: "hyperspace", "Successfully submitted messages to {}", sink.name()); + } + Ok(()) +} + +async fn process_timeouts( + source: &mut A, + metrics: &mut Option, + timeout_msgs: Vec, +) -> anyhow::Result<()> { + if !timeout_msgs.is_empty() { + if let Some(metrics) = metrics.as_ref() { + metrics.handle_timeouts(timeout_msgs.as_slice()).await; + } + let type_urls = timeout_msgs.iter().map(|msg| msg.type_url.as_str()).collect::>(); + log::info!("Submitting timeout messages to {}: {type_urls:#?}", source.name()); + queue::flush_message_batch(timeout_msgs, metrics.as_ref(), &*source) + .await + .map_err(|e| anyhow!("Failed to submit timeout messages: {:?}", e))?; + log::debug!(target: "hyperspace", "Successfully submitted timeout messages to {}", source.name()); + } + Ok(()) +} + +async fn find_mandatory_heights_for_undelivered_sequences( + source: &mut A, + updates: &Vec<(Any, Height, Vec, UpdateType)>, +) -> HashSet { + let mut mandatory_updates_for_undelivered_seqs = HashSet::new(); + let update_heights = updates + .iter() + .map(|(_, height, ..)| height.revision_height) + .collect::>(); + let (_, height, ..) = updates.first().unwrap().clone(); + let proof_height = source.get_proof_height(*height).await; + let block_proof_height_difference = proof_height + .revision_height + .checked_sub(height.revision_height) + .expect("proof height is less than update height"); + let needed_updates_num = if block_proof_height_difference > 0 { 2 } else { 1 }; + for (_, height, ..) in updates.iter().rev() { + if let Some(prev_height) = height.revision_height.checked_sub(block_proof_height_difference) + { + if update_heights.contains(&prev_height) { + mandatory_updates_for_undelivered_seqs.insert(height.revision_height); + mandatory_updates_for_undelivered_seqs.insert(prev_height); + } + } + if mandatory_updates_for_undelivered_seqs.len() == needed_updates_num { + break + } + } + mandatory_updates_for_undelivered_seqs +} + #[cfg(feature = "testing")] pub mod send_packet_relay { use std::sync::atomic::{AtomicBool, Ordering}; diff --git a/hyperspace/core/src/macros.rs b/hyperspace/core/src/macros.rs index 6ea74c873..eaceb80f1 100644 --- a/hyperspace/core/src/macros.rs +++ b/hyperspace/core/src/macros.rs @@ -12,188 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#[macro_export] -macro_rules! process_finality_event { - ($source:ident, $sink:ident, $metrics:expr, $mode:ident, $result:ident, $stream_source:ident, $stream_sink:ident) => { - match $result { - // stream closed - None => { - log::warn!("Stream closed for {}", $source.name()); - $stream_source = loop { - match $source.finality_notifications().await { - Ok(stream) => break stream, - Err(e) => { - log::error!("Failed to get finality notifications for {} {:?}. Trying again in 30 seconds...", $source.name(), e); - tokio::time::sleep(std::time::Duration::from_secs(30)).await; - }, - }; - }; - $stream_sink = loop { - match $sink.finality_notifications().await { - Ok(stream) => break stream, - Err(e) => { - log::error!("Failed to get finality notifications for {} {:?}. Trying again in 30 seconds...", $sink.name(), e); - tokio::time::sleep(std::time::Duration::from_secs(30)).await; - }, - }; - }; - }, - Some(finality_event) => { - log::info!("======================================================="); - log::info!("Received finality notification from {}", $source.name()); - let sink_initial_rpc_call_delay = $sink.rpc_call_delay(); - let source_initial_rpc_call_delay = $source.rpc_call_delay(); - // TODO: make better error handling - let mut had_error = false; - - let updates = match $source.query_latest_ibc_events(finality_event, &$sink).await { - Ok(resp) => resp, - Err(err) => { - log::error!( - "Failed to fetch IBC events for finality event for {} {:?}", - $source.name(), - err - ); - match $sink.handle_error(&err).and_then(|_| $source.handle_error(&err)).await { - Ok(_) => {}, - Err(e) => log::error!("Failed to handle error for {} {:?}", $sink.name(), e), - } - continue - }, - }; - log::trace!(target: "hyperspace", "Received updates count: {}", updates.len()); - // query packets that can now be sent, at this sink height because of connection - // delay. - let (ready_packets, timeout_msgs) = - crate::packets::query_ready_and_timed_out_packets(&$source, &$sink).await?; - - let mut msgs = Vec::new(); - - for (msg_update_client, events, update_type) in updates { - if let Some(metrics) = $metrics.as_mut() { - if let Err(e) = metrics.handle_events(events.as_slice()).await { - log::error!("Failed to handle metrics for {} {:?}", $source.name(), e); - } - } - let event_types = events.iter().map(|ev| ev.event_type()).collect::>(); - let mut messages = - match parse_events(&mut $source, &mut $sink, events, $mode).await { - Ok(msgs) => msgs, - Err(e) => { - log::error!("Failed to parse events for {} {:?}", $source.name(), e); - match $sink.handle_error(&e).and_then(|_| $source.handle_error(&e)).await { - Ok(_) => {}, - Err(e) => log::error!("Failed to handle error for {} {:?}", $sink.name(), e), - } - had_error = true; - continue - }, - }; - log::trace!(target: "hyperspace", "Received messages count: {}, timeouts count: {}, is the update optional: {}, has undelivered packets: {}", messages.len(), timeout_msgs.len(), update_type.is_optional(), $source.has_undelivered_sequences()); - - // We want to send client update if packet messages exist but where not sent due - // to a connection delay even if client update message is optional - match ( - // TODO: we actually man send only when timeout of some packet has reached, - // not when we have *any* undelivered packets. But this requires rewriting - // `find_suitable_proof_height_for_client` function, that uses binary - // search, which won't work in this case - update_type.is_optional() && !$source.has_undelivered_sequences(), - has_packet_events(&event_types), - messages.is_empty(), - ) { - (true, false, true) => { - // skip sending ibc messages if no new events - log::info!("Skipping finality notification for {}", $sink.name()); - continue - }, - (false, _, true) => log::info!( - "Sending mandatory client update message for {}", - $sink.name() - ), - _ => log::info!( - "Received finalized events from: {} {event_types:#?}", - $source.name() - ), - }; - msgs.push(msg_update_client); - msgs.append(&mut messages); - } - msgs.extend(ready_packets); - - if !msgs.is_empty() { - if let Some(metrics) = $metrics.as_ref() { - metrics.handle_messages(msgs.as_slice()).await; - } - let type_urls = - msgs.iter().map(|msg| msg.type_url.as_str()).collect::>(); - log::info!("Submitting messages to {}: {type_urls:#?}", $sink.name()); - match queue::flush_message_batch(msgs, $metrics.as_ref(), &$sink).await { - Ok(_) => { - log::trace!(target: "hyperspace", "Successfully submitted messages to {}", $sink.name()); - }, - Err(e) => { - log::error!( - target:"hyperspace", - "Failed to submit messages to {} {:?}", - $sink.name(), - e - ); - match $sink.handle_error(&e).and_then(|_| $source.handle_error(&e)).await { - Ok(_) => {}, - Err(e) => log::error!("Failed to handle error for {} {:?}", $sink.name(), e), - } - had_error = true; - }, - } - } - - if !timeout_msgs.is_empty() { - if let Some(metrics) = $metrics.as_ref() { - metrics.handle_timeouts(timeout_msgs.as_slice()).await; - } - let type_urls = - timeout_msgs.iter().map(|msg| msg.type_url.as_str()).collect::>(); - log::info!( - "Submitting timeout messages to {}: {type_urls:#?}", - $source.name() - ); - match queue::flush_message_batch(timeout_msgs, $metrics.as_ref(), &$source).await { - Ok(_) => { - log::trace!(target: "hyperspace", "Successfully submitted timeout messages to {}", $source.name()); - }, - Err(e) => { - log::error!( - target:"hyperspace", - "Failed to submit timeout messages to {} {:?}", - $source.name(), - e - ); - match $sink.handle_error(&e).and_then(|_| $source.handle_error(&e)).await { - Ok(_) => {}, - Err(e) => log::error!("Failed to handle error for {} {:?}", $sink.name(), e), - } - had_error = true; - }, - } - } - if !had_error { - $sink.set_rpc_call_delay(sink_initial_rpc_call_delay); - $source.set_rpc_call_delay(source_initial_rpc_call_delay); - } - }, - } - }; -} - #[macro_export] macro_rules! chains { ($( $(#[$($meta:meta)*])* $name:ident($config:path, $client:path), )*) => { - use primitives::RelayerState; - #[derive(Debug, Serialize, Deserialize, Clone)] #[serde(tag = "type", rename_all = "snake_case")] pub enum AnyConfig { @@ -264,7 +88,7 @@ macro_rules! chains { &mut self, finality_event: Self::FinalityEvent, counterparty: &T, - ) -> Result, UpdateType)>, anyhow::Error> + ) -> Result, UpdateType)>, anyhow::Error> where T: Chain, { @@ -820,26 +644,6 @@ macro_rules! chains { } } - async fn on_undelivered_sequences(&self, is_empty: bool) -> Result<(), Self::Error> { - match self { - $( - $(#[$($meta)*])* - Self::$name(chain) => chain.on_undelivered_sequences(is_empty).await.map_err(AnyError::$name), - )* - Self::Wasm(c) => c.inner.on_undelivered_sequences(is_empty).await, - } - } - - fn has_undelivered_sequences(&self) -> bool { - match self { - $( - $(#[$($meta)*])* - Self::$name(chain) => chain.has_undelivered_sequences(), - )* - Self::Wasm(c) => c.inner.has_undelivered_sequences(), - } - } - async fn query_connection_id_from_tx_hash( &self, tx_id: Self::TransactionId, @@ -941,7 +745,6 @@ macro_rules! chains { #[async_trait] impl Chain for AnyChain { - fn name(&self) -> &str { match self { $( @@ -1064,23 +867,33 @@ macro_rules! chains { } } - fn relayer_state(&self) -> &RelayerState { + fn common_state(&self) -> &CommonClientState { + match self { + $( + $(#[$($meta)*])* + Self::$name(chain) => chain.common_state(), + )* + Self::Wasm(c) => c.inner.common_state(), + } + } + + fn common_state_mut(&mut self) -> &mut CommonClientState { match self { $( $(#[$($meta)*])* - Self::$name(chain) => chain.relayer_state(), + Self::$name(chain) => chain.common_state_mut(), )* - Self::Wasm(c) => c.inner.relayer_state(), + Self::Wasm(c) => c.inner.common_state_mut(), } } - fn relayer_state_mut(&mut self) -> &mut RelayerState { + async fn reconnect(&mut self) -> anyhow::Result<()> { match self { $( $(#[$($meta)*])* - Self::$name(chain) => chain.relayer_state_mut(), + Self::$name(chain) => chain.reconnect().await, )* - Self::Wasm(c) => c.inner.relayer_state_mut(), + Self::Wasm(c) => c.inner.reconnect().await, } } } diff --git a/hyperspace/core/src/packets.rs b/hyperspace/core/src/packets.rs index 4bf89cc2a..9e4f595d4 100644 --- a/hyperspace/core/src/packets.rs +++ b/hyperspace/core/src/packets.rs @@ -16,7 +16,13 @@ use crate::send_packet_relay::packet_relay_status; use rand::Rng; use sp_runtime::Either::{Left, Right}; -use std::{sync::Arc, time::Duration}; +use std::{ + sync::{ + atomic::{AtomicUsize, Ordering}, + Arc, + }, + time::Duration, +}; use tokio::{task::JoinSet, time::sleep}; use crate::packets::utils::{ @@ -35,17 +41,23 @@ use ibc_proto::google::protobuf::Any; use pallet_ibc::light_clients::AnyClientState; use primitives::{ error::Error, find_suitable_proof_height_for_client, packet_info_to_packet, - query_undelivered_acks, query_undelivered_sequences, Chain, + query_undelivered_acks, query_undelivered_sequences, Chain, UndeliveredType, }; pub mod connection_delay; pub mod utils; pub const PROCESS_PACKETS_BATCH_SIZE: usize = 100; -pub const MAX_PACKETS_TO_PROCESS: usize = 1000; /// Returns a tuple of messages, with the first item being packets that are ready to be sent to the /// sink chain. And the second item being packet timeouts that should be sent to the source. +/// +/// The function also flags the packets/timeouts that are ready to be sent. The idea is the +/// following, basically: +/// source -> recv_packet -> sink => sink has undelivered recvs +/// source -> ack_packet -> sink => sink has undelivered acks +/// source -> timeout_packet -> source => source & sink has undelivered timeouts (since timeouts +/// need both clients to be up to date) pub async fn query_ready_and_timed_out_packets( source: &impl Chain, sink: &impl Chain, @@ -170,6 +182,8 @@ pub async fn query_ready_and_timed_out_packets( let latest_sink_height_on_source = sink_client_state_on_source.latest_height(); let latest_source_height_on_sink = source_client_state_on_sink.latest_height(); + let max_packets_to_process = source.common_state().max_packets_to_process; + // query packets that are waiting for connection delay. let seqs = query_undelivered_sequences( source_height, @@ -181,16 +195,20 @@ pub async fn query_ready_and_timed_out_packets( ) .await? .into_iter() - .take(MAX_PACKETS_TO_PROCESS) .collect::>(); - log::trace!(target: "hyperspace", "Found {} undelivered packets for {:?}/{:?} for {seqs:?}", seqs.len(), channel_id, port_id.clone()); + log::debug!(target: "hyperspace", "Found {} undelivered packets for {:?}/{:?} for {seqs:?}", seqs.len(), channel_id, port_id.clone()); - let send_packets = source.query_send_packets(channel_id, port_id.clone(), seqs).await?; + let mut send_packets = source.query_send_packets(channel_id, port_id.clone(), seqs).await?; log::trace!(target: "hyperspace", "SendPackets count: {}", send_packets.len()); - let mut timeout_packets_join_set: JoinSet> = JoinSet::new(); + send_packets.sort(); + send_packets.dedup(); + log::trace!(target: "hyperspace", "SendPackets count': {}", send_packets.len()); + let mut recv_packets_join_set: JoinSet> = JoinSet::new(); let source = Arc::new(source.clone()); let sink = Arc::new(sink.clone()); + let timeout_packets_count = Arc::new(AtomicUsize::new(0)); + let send_packets_count = Arc::new(AtomicUsize::new(0)); for send_packets in send_packets.chunks(PROCESS_PACKETS_BATCH_SIZE) { for send_packet in send_packets.to_owned() { let source_connection_end = source_connection_end.clone(); @@ -201,7 +219,9 @@ pub async fn query_ready_and_timed_out_packets( let duration = Duration::from_millis( rand::thread_rng().gen_range(1..source.rpc_call_delay().as_millis() as u64), ); - timeout_packets_join_set.spawn(async move { + let timeout_packets_count = timeout_packets_count.clone(); + let recv_packets_count = send_packets_count.clone(); + recv_packets_join_set.spawn(async move { sleep(duration).await; let source = &source; let sink = &sink; @@ -212,6 +232,7 @@ pub async fn query_ready_and_timed_out_packets( })?; if packet.timed_out(&sink_timestamp, sink_height) { + timeout_packets_count.fetch_add(1, Ordering::SeqCst); // so we know this packet has timed out on the sink, we need to find the maximum // consensus state height at which we can generate a non-membership proof of the // packet for the sink's client on the source. @@ -264,7 +285,7 @@ pub async fn query_ready_and_timed_out_packets( .await?; return Ok(Some(Left(msg))) } else { - log::trace!(target: "hyperspace", "Skipping packet as it has not timed out: {:?}", packet); + log::trace!(target: "hyperspace", "The packet has not timed out yet: {:?}", packet); } // If packet has not timed out but channel is closed on sink we skip @@ -288,10 +309,12 @@ pub async fn query_ready_and_timed_out_packets( if packet_height > latest_source_height_on_sink.revision_height { // Sink does not have client update required to prove recv packet message log::debug!(target: "hyperspace", "Skipping packet {:?} as sink does not have client update required to prove recv packet message", packet); + recv_packets_count.fetch_add(1, Ordering::SeqCst); return Ok(None) } let proof_height = if let Some(proof_height) = find_suitable_proof_height_for_client( + &**source, &**sink, sink_height, source.client_id(), @@ -335,7 +358,7 @@ pub async fn query_ready_and_timed_out_packets( } } - while let Some(result) = timeout_packets_join_set.join_next().await { + while let Some(result) = recv_packets_join_set.join_next().await { let Some(either) = result?? else { continue }; match either { Left(msg) => timeout_messages.push(msg), @@ -343,6 +366,16 @@ pub async fn query_ready_and_timed_out_packets( } } + let timeouts_count = timeout_packets_count.load(Ordering::SeqCst); + log::debug!(target: "hyperspace", "Found {timeouts_count} packets that have timed out"); + source + .on_undelivered_sequences(timeouts_count != 0, UndeliveredType::Timeouts) + .await; + + let sends_count = send_packets_count.load(Ordering::SeqCst); + log::debug!(target: "hyperspace", "Found {sends_count} sent packets"); + sink.on_undelivered_sequences(sends_count != 0, UndeliveredType::Recvs).await; + // Get acknowledgement messages if source_channel_end.state == State::Closed { log::trace!(target: "hyperspace", "Skipping acknowledgements for channel {:?} as channel is closed on source", channel_id); @@ -360,11 +393,13 @@ pub async fn query_ready_and_timed_out_packets( ) .await? .into_iter() - .take(MAX_PACKETS_TO_PROCESS) .collect::>(); let acknowledgements = source.query_recv_packets(channel_id, port_id.clone(), acks).await?; + log::trace!(target: "hyperspace", "Got acknowledgements for channel {:?}: {:?}", channel_id, acknowledgements); let mut acknowledgements_join_set: JoinSet> = JoinSet::new(); + sink.on_undelivered_sequences(!acknowledgements.is_empty(), UndeliveredType::Acks) + .await; for acknowledgements in acknowledgements.chunks(PROCESS_PACKETS_BATCH_SIZE) { for acknowledgement in acknowledgements.to_owned() { let source_connection_end = source_connection_end.clone(); @@ -402,6 +437,7 @@ pub async fn query_ready_and_timed_out_packets( log::trace!(target: "hyperspace", "sink_height: {:?}, latest_source_height_on_sink: {:?}, acknowledgement.height: {}", sink_height, latest_source_height_on_sink, ack_height); let proof_height = if let Some(proof_height) = find_suitable_proof_height_for_client( + &**source, &**sink, sink_height, source.client_id(), diff --git a/hyperspace/core/src/packets/utils.rs b/hyperspace/core/src/packets/utils.rs index ed1a26f3c..8ddd0ae79 100644 --- a/hyperspace/core/src/packets/utils.rs +++ b/hyperspace/core/src/packets/utils.rs @@ -41,6 +41,22 @@ use primitives::{find_suitable_proof_height_for_client, Chain}; use std::time::Duration; use tendermint_proto::Protobuf; +/* +[2023-06-24T00:25:03Z TRACE hyperspace] get_timeout_proof_height: +centauri_mainnet->picasso, timeout_variant=Both, source_height=1-270103, +sink_height=2087-2686237, sink_timestamp=Timestamp(2023-06-24T00:24:36.344Z), +latest_client_height_on_source=2087-2686225, packet_creation_height=249155, +packet=Packet { + sequence: Sequence(10), + source_port: PortId("transfer"), + source_channel: ChannelId("channel-2"), + destination_port: PortId("transfer"), + destination_channel: ChannelId("channel-17"), + data: [123, 34, 97, 109, 111, 117, 110, 116, 34, 58, 34, 49, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 34, 44, 34, 100, 101, 110, 111, 109, 34, 58, 34, 116, 114, 97, 110, 115, 102, 101, 114, 47, 99, 104, 97, 110, 110, 101, 108, 45, 50, 47, 49, 34, 44, 34, 114, 101, 99, 101, 105, 118, 101, 114, 34, 58, 34, 53, 121, 66, 113, 120, 53, 74, 117, 49, 109, 112, 119, 111, 109, 84, 88, 106, 120, 81, 107, 77, 105, 118, 118, 110, 85, 118, 76, 118, 80, 116, 99, 115, 101, 119, 66, 65, 72, 67, 90, 107, 51, 56, 101, 121, 111, 121, 77, 34, 44, 34, 115, 101, 110, 100, 101, 114, 34, 58, 34, 99, 101, 110, 116, 97, 117, 114, 105, 49, 115, 57, 104, 118, 108, 53, 116, 120, 112, 104, 110, 117, 97, 104, 119, 108, 107, 51, 100, 99, 50, 53, 99, 108, 122, 115, 55, 50, 108, 120, 119, 120, 107, 107, 107, 110, 50, 114, 34, 125], + timeout_height: Height { revision: 2087, height: 2677740 }, + timeout_timestamp: Timestamp { time: Some(Time(2023-06-22 15:13:05.897165453)) } +} + */ pub async fn get_timeout_proof_height( source: &impl Chain, sink: &impl Chain, @@ -52,10 +68,13 @@ pub async fn get_timeout_proof_height( packet_creation_height: u64, ) -> Option { let timeout_variant = Packet::timeout_variant(&packet, &sink_timestamp, sink_height).unwrap(); + log::trace!(target: "hyperspace", "get_timeout_proof_height: {}->{}, timeout_variant={:?}, source_height={}, sink_height={}, sink_timestamp={}, latest_client_height_on_source={}, packet_creation_height={}, packet={:?}", + source.name(), sink.name(), timeout_variant, source_height, sink_height, sink_timestamp, latest_client_height_on_source, packet_creation_height, packet); match timeout_variant { TimeoutVariant::Height => find_suitable_proof_height_for_client( + sink, source, source_height, sink.client_id(), @@ -69,24 +88,28 @@ pub async fn get_timeout_proof_height( // bound for where to start our search // We offset the sink height when this packet was created with the approximate number of // blocks contained in the difference in timestamp at packet creation until timeout - let sink_client_state = source - .query_client_state( - Height::new(source_height.revision_number, packet_creation_height), - sink.client_id(), - ) - .await - .ok()?; + let height = Height::new(source_height.revision_number, packet_creation_height); + log::trace!( + target: "hyperspace", + "Querying client state at {height}" + ); + let sink_client_state = + source.query_client_state(height, sink.client_id()).await.ok()?; let sink_client_state = AnyClientState::try_from(sink_client_state.client_state?).ok()?; let height = sink_client_state.latest_height(); let timestamp_at_creation = sink.query_timestamp_at(height.revision_height).await.ok()?; - let period = packet.timeout_timestamp.nanoseconds() - timestamp_at_creation; + // may underflow if the user have chosen timeout less than the block timestamp at which + // the packet was created, so we use `saturating_sub` + let period = + packet.timeout_timestamp.nanoseconds().saturating_sub(timestamp_at_creation); let period = Duration::from_nanos(period); let start_height = height.revision_height + calculate_block_delay(period, sink.expected_block_time()).saturating_sub(1); let start_height = Height::new(sink_height.revision_number, start_height); find_suitable_proof_height_for_client( + sink, source, source_height, sink.client_id(), @@ -124,6 +147,7 @@ pub async fn get_timeout_proof_height( Height::new(packet.timeout_height.revision_number, start_height) }; find_suitable_proof_height_for_client( + sink, source, source_height, sink.client_id(), @@ -178,6 +202,22 @@ pub async fn verify_delay_passed( }, VerifyDelayOn::Sink => { let actual_proof_height = source.get_proof_height(proof_height).await; + log::info!( + "Checking proof height on {} as {}:{}", + sink.name(), + proof_height, + actual_proof_height + ); + let _cs = sink + .query_client_consensus(sink_height, source.client_id(), actual_proof_height) + .await + .unwrap() + .consensus_state + .expect(&format!( + "query_client_consensus for {} at height {} is not found", + source.client_id(), + actual_proof_height + )); if let Ok((sink_client_update_height, sink_client_update_time)) = sink .query_client_update_time_and_height(source.client_id(), actual_proof_height) .await diff --git a/hyperspace/core/src/queue.rs b/hyperspace/core/src/queue.rs index c0ff36afd..bf23e6dff 100644 --- a/hyperspace/core/src/queue.rs +++ b/hyperspace/core/src/queue.rs @@ -22,7 +22,7 @@ pub async fn flush_message_batch( metrics: Option<&MetricsHandler>, sink: &impl Chain, ) -> Result<(), anyhow::Error> { - let block_max_weight = sink.block_max_weight(); + let block_max_weight = sink.block_max_weight() / 2; let batch_weight = sink.estimate_weight(msgs.clone()).await?; if let Some(metrics) = metrics { diff --git a/hyperspace/core/src/substrate/composable.rs b/hyperspace/core/src/substrate/composable.rs index 6d7bcdc4b..01614ea17 100644 --- a/hyperspace/core/src/substrate/composable.rs +++ b/hyperspace/core/src/substrate/composable.rs @@ -166,6 +166,7 @@ define_runtime_transactions!( TransferParamsWrapper, DummySendPingParamsWrapper, parachain_subxt::api::runtime_types::pallet_ibc::Any, + MemoMessage, |x| parachain_subxt::api::tx().ibc().deliver(x), |x, y, z, w| parachain_subxt::api::tx().ibc().transfer(x, CurrencyId(y), z, w), |x| parachain_subxt::api::tx().sudo().sudo(x), diff --git a/hyperspace/core/src/substrate/default.rs b/hyperspace/core/src/substrate/default.rs index 1e6807aea..15339e8e0 100644 --- a/hyperspace/core/src/substrate/default.rs +++ b/hyperspace/core/src/substrate/default.rs @@ -120,6 +120,7 @@ define_runtime_transactions!( TransferParamsWrapper, SendPingParamsWrapper, parachain_subxt::api::runtime_types::pallet_ibc::Any, + MemoMessage, |x| parachain_subxt::api::tx().ibc().deliver(x), |x, y, z, w| parachain_subxt::api::tx().ibc().transfer(x, y, z, w), |x| parachain_subxt::api::tx().sudo().sudo(x), diff --git a/hyperspace/core/src/substrate/macros.rs b/hyperspace/core/src/substrate/macros.rs index e44f1f947..e47e57459 100644 --- a/hyperspace/core/src/substrate/macros.rs +++ b/hyperspace/core/src/substrate/macros.rs @@ -676,6 +676,7 @@ macro_rules! define_runtime_transactions { $transfer_wrapper:expr, $send_ping_params_wrapper:expr, $any: path, + $memo_message:ty, $ibc_deliver: expr, $ibc_transfer: expr, $sudo_sudo: expr, @@ -693,6 +694,7 @@ macro_rules! define_runtime_transactions { type ParaRuntimeCall = $para_runtime_call; type SendPingParams = $send_ping_params; type TransferParams = $transfer_params; + type MemoMessage = $memo_message; fn ibc_deliver(messages: Vec) -> Payload { use $any as Any; @@ -708,14 +710,9 @@ macro_rules! define_runtime_transactions { params: Self::TransferParams, asset_id: u128, amount: u128, - memo: Option<()>, + memo: Option, ) -> Payload { - $ibc_transfer( - $transfer_wrapper(params).into(), - asset_id, - amount, - memo.map(|_| MemoMessage), - ) + $ibc_transfer($transfer_wrapper(params).into(), asset_id, amount, memo) } fn sudo_sudo(call: Self::ParaRuntimeCall) -> Payload { @@ -849,8 +846,7 @@ macro_rules! define_runtime_call { #[macro_export] macro_rules! define_asset_id { ($name:ident, $ty:ty) => { - #[derive(Decode, Encode)] - + #[derive(Decode, Encode, Debug)] pub struct $name(pub $ty); impl From for $name { diff --git a/hyperspace/core/src/substrate/picasso_kusama.rs b/hyperspace/core/src/substrate/picasso_kusama.rs index c3abfe40d..5ae35ae94 100644 --- a/hyperspace/core/src/substrate/picasso_kusama.rs +++ b/hyperspace/core/src/substrate/picasso_kusama.rs @@ -43,9 +43,7 @@ use subxt::{ tx::Payload, Error, OnlineClient, }; -use subxt_generated::picasso_kusama::parachain::api::runtime_types::{ - picasso_runtime::ibc::MemoMessage, primitives::currency::CurrencyId, -}; +use subxt_generated::picasso_kusama::parachain::api::runtime_types::primitives::currency::CurrencyId; pub mod parachain_subxt { pub use subxt_generated::picasso_kusama::parachain::*; @@ -127,6 +125,7 @@ define_runtime_transactions!( TransferParamsWrapper, DummySendPingParamsWrapper, parachain_subxt::api::runtime_types::pallet_ibc::Any, + String, |x| parachain_subxt::api::tx().ibc().deliver(x), |x, y, z, w| parachain_subxt::api::tx().ibc().transfer(x, CurrencyId(y), z, w), |x| parachain_subxt::api::tx().sudo().sudo(x), diff --git a/hyperspace/core/src/substrate/picasso_rococo.rs b/hyperspace/core/src/substrate/picasso_rococo.rs index d9fe08995..86b5420b5 100644 --- a/hyperspace/core/src/substrate/picasso_rococo.rs +++ b/hyperspace/core/src/substrate/picasso_rococo.rs @@ -125,6 +125,7 @@ define_runtime_transactions!( TransferParamsWrapper, DummySendPingParamsWrapper, parachain_subxt::api::runtime_types::pallet_ibc::Any, + MemoMessage, |x| parachain_subxt::api::tx().ibc().deliver(x), |x, y, z, w| parachain_subxt::api::tx().ibc().transfer(x, CurrencyId(y), z, w), |x| parachain_subxt::api::tx().sudo().sudo(x), diff --git a/hyperspace/core/src/utils.rs b/hyperspace/core/src/utils.rs new file mode 100644 index 000000000..a88b8b7d5 --- /dev/null +++ b/hyperspace/core/src/utils.rs @@ -0,0 +1,47 @@ +use futures::{Stream, StreamExt}; +use std::{ + pin::Pin, + sync::{Arc, Mutex}, + task::Poll, +}; + +/// Keeps the most recent value of a stream and acts as stream itself. +pub struct RecentStream { + value: Arc>>>, +} + +impl RecentStream { + pub fn new(mut stream: impl Stream + Send + Unpin + 'static) -> Self { + let value = Arc::new(Mutex::new(Some(None))); + let value_cloned = value.clone(); + tokio::spawn(async move { + while let Some(v) = stream.next().await { + *value_cloned.lock().unwrap() = Some(Some(v)); + } + *value_cloned.lock().unwrap() = None; + }); + Self { value } + } +} + +impl Stream for RecentStream { + type Item = T; + + fn poll_next( + self: Pin<&mut Self>, + cx: &mut std::task::Context<'_>, + ) -> Poll> { + let this = self.get_mut(); + let mut value = this.value.lock().unwrap(); + match value.as_mut() { + Some(v) => match v.take() { + Some(v) => Poll::Ready(Some(v)), + None => { + cx.waker().wake_by_ref(); + Poll::Pending + }, + }, + None => Poll::Ready(None), + } + } +} diff --git a/hyperspace/cosmos/Cargo.toml b/hyperspace/cosmos/Cargo.toml index 699437214..85328fd07 100644 --- a/hyperspace/cosmos/Cargo.toml +++ b/hyperspace/cosmos/Cargo.toml @@ -64,7 +64,6 @@ tendermint-light-client = { git = "https://github.com/informalsystems/tendermint ] } tendermint-light-client-verifier = { git = "https://github.com/informalsystems/tendermint-rs", rev = "e81f7bf23d63ffbcd242381d1ce5e35da3515ff1", default-features = false } - [features] testing = [ "primitives/testing" diff --git a/hyperspace/cosmos/src/chain.rs b/hyperspace/cosmos/src/chain.rs index 6bde6334e..9e6770925 100644 --- a/hyperspace/cosmos/src/chain.rs +++ b/hyperspace/cosmos/src/chain.rs @@ -19,7 +19,8 @@ use ibc_proto::{ }; use pallet_ibc::light_clients::AnyClientMessage; use primitives::{ - mock::LocalClientTypes, Chain, IbcProvider, LightClientSync, MisbehaviourHandler, RelayerState, + mock::LocalClientTypes, Chain, CommonClientState, IbcProvider, LightClientSync, + MisbehaviourHandler, }; use prost::Message; use std::{pin::Pin, time::Duration}; @@ -95,10 +96,7 @@ where Pin::FinalityEvent> + Send + Sync>>, Error, > { - let (ws_client, ws_driver) = WebSocketClient::new(self.websocket_url.clone()) - .await - .map_err(|e| Error::from(format!("Web Socket Client Error {:?}", e)))?; - tokio::spawn(ws_driver.run()); + let ws_client = self.rpc_client.clone(); let subscription = ws_client .subscribe(Query::from(EventType::NewBlock)) .await @@ -238,33 +236,40 @@ where error.to_string() }; log::debug!(target: "hyperspace_cosmos", "Handling error: {err_str}"); - if err_str.contains("dispatch task is gone") { - let (rpc_client, ws_driver) = WebSocketClient::new(self.rpc_url.clone()) - .await - .map_err(|e| Error::RpcError(format!("{:?}", e)))?; - tokio::spawn(ws_driver.run()); - log::info!(target: "hyperspace_cosmos", "Reconnected to cosmos chain"); - self.rpc_client = rpc_client; - self.rpc_call_delay = self.rpc_call_delay * 2; + if err_str.contains("dispatch task is gone") || + err_str.contains("failed to send message to internal channel") + { + self.reconnect().await?; + self.common_state.rpc_call_delay = self.common_state.rpc_call_delay * 2; } Ok(()) } fn rpc_call_delay(&self) -> Duration { - self.rpc_call_delay + self.common_state.rpc_call_delay } fn set_rpc_call_delay(&mut self, delay: Duration) { - self.rpc_call_delay = delay; + self.common_state.rpc_call_delay = delay; + } + + fn common_state(&self) -> &CommonClientState { + &self.common_state } - fn relayer_state(&self) -> &RelayerState { - todo!() + fn common_state_mut(&mut self) -> &mut CommonClientState { + &mut self.common_state } - fn relayer_state_mut(&mut self) -> &mut RelayerState { - todo!() + async fn reconnect(&mut self) -> anyhow::Result<()> { + let (rpc_client, ws_driver) = WebSocketClient::new(self.websocket_url.clone()) + .await + .map_err(|e| Error::RpcError(format!("{:?}", e)))?; + self.join_handles.lock().await.push(tokio::spawn(ws_driver.run())); + self.rpc_client = rpc_client; + log::info!(target: "hyperspace_cosmos", "Reconnected to cosmos chain"); + Ok(()) } } diff --git a/hyperspace/cosmos/src/client.rs b/hyperspace/cosmos/src/client.rs index 6171feda2..9daa4046f 100644 --- a/hyperspace/cosmos/src/client.rs +++ b/hyperspace/cosmos/src/client.rs @@ -26,7 +26,9 @@ use ics07_tendermint::{ merkle::convert_tm_to_ics_merkle_proof, }; use pallet_ibc::light_clients::{AnyClientState, AnyConsensusState, HostFunctionsManager}; -use primitives::{Chain, IbcProvider, KeyProvider, UpdateType}; +use primitives::{ + Chain, CommonClientConfig, CommonClientState, IbcProvider, KeyProvider, UpdateType, +}; use prost::Message; use quick_cache::sync::Cache; use rand::Rng; @@ -43,7 +45,8 @@ use tendermint_light_client::components::io::{AtHeight, Io}; use tendermint_light_client_verifier::types::{LightBlock, ValidatorSet}; use tendermint_rpc::{endpoint::abci_query::AbciQuery, Client, Url, WebSocketClient}; use tokio::{ - task::JoinSet, + sync::{Mutex as TokioMutex, Mutex as AsyncMutex}, + task::{JoinHandle, JoinSet}, time::{error::Elapsed, sleep, timeout}, }; @@ -165,17 +168,12 @@ pub struct CosmosClient { /// Mutex used to sequentially send transactions. This is necessary because /// account sequence numbers are not updated until the transaction is processed. pub tx_mutex: Arc>, - /// Delay between parallel RPC calls to be friendly with the node and avoid MaxSlotsExceeded - /// error - pub rpc_call_delay: Duration, - /// Used to determine whether client updates should be forced to send - /// even if it's optional. It's required, because some timeout packets - /// should use proof of the client states. - /// - /// Set inside `on_undelivered_sequences`. - pub maybe_has_undelivered_packets: Arc>, /// Light-client blocks cache pub light_block_cache: Arc>, + /// Relayer data + pub common_state: CommonClientState, + /// Join handles for spawned tasks + pub join_handles: Arc>>>>, } /// config options for [`ParachainClient`] @@ -237,6 +235,9 @@ pub struct CosmosClientConfig { pub channel_whitelist: Vec<(ChannelId, PortId)>, /// The key that signs transactions pub mnemonic: String, + /// Common client config + #[serde(flatten)] + pub common: CommonClientConfig, } impl CosmosClient @@ -246,10 +247,15 @@ where { /// Initializes a [`CosmosClient`] given a [`CosmosClientConfig`] pub async fn new(config: CosmosClientConfig) -> Result { + assert!( + config.channel_whitelist.len() <= 1, + "Only one channel is supported. Please remove all but one channel from the config." + ); + let (rpc_client, rpc_driver) = WebSocketClient::new(config.websocket_url.clone()) .await .map_err(|e| Error::RpcError(format!("{:?}", e)))?; - tokio::spawn(rpc_driver.run()); + let ws_driver_jh = tokio::spawn(rpc_driver.run()); let grpc_client = tonic::transport::Endpoint::new(config.grpc_url.to_string()) .map_err(|e| Error::RpcError(format!("{:?}", e)))? .connect() @@ -257,7 +263,8 @@ where .map_err(|e| Error::RpcError(format!("{:?}", e)))?; let chain_id = ChainId::from(config.chain_id); - let light_client = LightClient::init_light_client(config.rpc_url.clone()).await?; + let light_client = + LightClient::init_light_client(config.rpc_url.clone(), Duration::from_secs(10)).await?; let commitment_prefix = CommitmentPrefix::try_from(config.store_prefix.as_bytes().to_vec()) .map_err(|e| Error::from(format!("Invalid store prefix {:?}", e)))?; @@ -288,9 +295,15 @@ where keybase, _phantom: std::marker::PhantomData, tx_mutex: Default::default(), - rpc_call_delay: Duration::from_millis(1000), - maybe_has_undelivered_packets: Default::default(), light_block_cache: Arc::new(Cache::new(100000)), + common_state: CommonClientState { + skip_optional_client_updates: config.common.skip_optional_client_updates, + maybe_has_undelivered_packets: Default::default(), + rpc_call_delay: Duration::from_millis(1000), + misbehaviour_client_msg_queue: Arc::new(AsyncMutex::new(vec![])), + max_packets_to_process: 50, + }, + join_handles: Arc::new(TokioMutex::new(vec![ws_driver_jh])), }) } @@ -404,6 +417,7 @@ where client.name, e )) })?; + let trusted_light_block = client.fetch_light_block_with_cache(height.increment(), duration).await?; @@ -411,9 +425,10 @@ where &latest_light_block.validators, &latest_light_block.next_validators, ) { - true => UpdateType::Mandatory, + true => UpdateType::Optional, false => UpdateType::Mandatory, }; + Ok(( Header { signed_header: latest_light_block.signed_header, @@ -433,9 +448,6 @@ where } } xs.sort_by_key(|(h, _)| h.signed_header.header.height.value()); - for (x, _) in &xs { - log::debug!(target: "hyperspace_cosmos", "Sorted: {:?}, {:?}", x.trusted_height, x.signed_header); - } Ok(xs) } @@ -522,10 +534,8 @@ fn is_validators_equal(set_a: &ValidatorSet, set_b: &ValidatorSet) -> bool { #[cfg(test)] pub mod tests { - - use crate::key_provider::KeyEntry; - use super::MnemonicEntry; + use crate::key_provider::KeyEntry; struct TestVector { mnemonic: &'static str, diff --git a/hyperspace/cosmos/src/light_client.rs b/hyperspace/cosmos/src/light_client.rs index a54f9d783..539857272 100644 --- a/hyperspace/cosmos/src/light_client.rs +++ b/hyperspace/cosmos/src/light_client.rs @@ -3,6 +3,7 @@ use crate::error::Error; use ibc::Height; use ics07_tendermint::{client_state::ClientState, ProdVerifier}; use pallet_ibc::light_clients::HostFunctionsManager; +use std::time::Duration; use tendermint::trust_threshold::TrustThresholdFraction; use tendermint_light_client::{ components::{ @@ -27,14 +28,14 @@ pub struct LightClient { } impl LightClient { - pub async fn init_light_client(rpc_url: Url) -> Result { + pub async fn init_light_client(rpc_url: Url, timeout: Duration) -> Result { let rpc_client = HttpClient::new(rpc_url).map_err(|e| Error::from(e.to_string()))?; let peer_id: PeerId = rpc_client .status() .await .map(|s| s.node_info.id) .map_err(|e| Error::from(e.to_string()))?; - let io = ProdIo::new(peer_id, rpc_client, None); + let io = ProdIo::new(peer_id, rpc_client, Some(timeout)); Ok(Self { peer_id, io }) } diff --git a/hyperspace/cosmos/src/provider.rs b/hyperspace/cosmos/src/provider.rs index e1683d2cc..bef3b6547 100644 --- a/hyperspace/cosmos/src/provider.rs +++ b/hyperspace/cosmos/src/provider.rs @@ -35,7 +35,7 @@ use ibc::{ }; use ibc_primitives::PacketInfo as IbcPacketInfo; use ibc_proto::{ - cosmos::bank::v1beta1::QueryBalanceRequest, + cosmos::{bank::v1beta1::QueryBalanceRequest, base::query::v1beta1::PageRequest}, google::protobuf::Any, ibc::core::{ channel::v1::{ @@ -61,7 +61,9 @@ use ics08_wasm::msg::MsgPushNewWasmCode; use pallet_ibc::light_clients::{ AnyClientMessage, AnyClientState, AnyConsensusState, HostFunctionsManager, }; -use primitives::{mock::LocalClientTypes, Chain, IbcProvider, KeyProvider, UpdateType}; +use primitives::{ + filter_events, mock::LocalClientTypes, Chain, IbcProvider, KeyProvider, UpdateType, +}; use prost::Message; use rand::Rng; use std::{collections::HashSet, pin::Pin, str::FromStr, time::Duration}; @@ -71,10 +73,12 @@ use tendermint_rpc::{ endpoint::tx::Response, event::{Event, EventData}, query::{EventType, Query}, - Client, Error as RpcError, Order, SubscriptionClient, WebSocketClient, + Client, Error as RpcError, Order, SubscriptionClient, }; use tokio::{task::JoinSet, time::sleep}; +pub const NUMBER_OF_BLOCKS_TO_PROCESS_PER_ITER: u64 = 250; + #[derive(Clone, Debug)] pub enum FinalityEvent { Tendermint { from: TmHeight, to: TmHeight }, @@ -99,7 +103,7 @@ where &mut self, finality_event: Self::FinalityEvent, counterparty: &C, - ) -> Result, UpdateType)>, anyhow::Error> + ) -> Result, UpdateType)>, anyhow::Error> where C: Chain, { @@ -121,7 +125,10 @@ where let latest_revision = latest_height.revision_number; let from = TmHeight::try_from(latest_cp_client_height).unwrap(); - let to = finality_event_height; + let to = finality_event_height.min( + TmHeight::try_from(latest_cp_client_height + NUMBER_OF_BLOCKS_TO_PROCESS_PER_ITER) + .expect("should not overflow"), + ); log::info!(target: "hyperspace_cosmos", "Getting blocks {}..{}", from, to); // query (exclusively) up to `to`, because the proof for the event at `to - 1` will be @@ -138,11 +145,12 @@ where log::trace!(target: "hyperspace_cosmos", "Parsing events at height {:?}", height); let client = self.clone(); let duration = Duration::from_millis(rand::thread_rng().gen_range(0..to) as u64); + let counterparty = counterparty.clone(); join_set.spawn(async move { sleep(duration).await; let xs = tokio::time::timeout( Duration::from_secs(30), - client.parse_ibc_events_at(latest_revision, height), + client.parse_ibc_events_at(&counterparty, latest_revision, height), ) .await??; Ok((height, xs)) @@ -154,15 +162,20 @@ where } } - // we don't submit events for the last block, because we don't have a proof for it - assert_eq!(block_events.len(), update_headers.len(), "block events and updates must match"); + if block_events.len() != update_headers.len() { + return Err(anyhow::anyhow!( + "block events and updates must match, got {} and {}", + block_events.len(), + update_headers.len() + )) + } block_events.sort_by_key(|(height, _)| *height); let mut updates = Vec::new(); for (events, (update_header, update_type)) in block_events.into_iter().map(|(_, events)| events).zip(update_headers) { - log::info!(target: "hyperspace_cosmos", "Fetching block {}", update_header.height().revision_height); + let height = update_header.height(); let update_client_header = { let msg = MsgUpdateAnyClient:: { client_id: client_id.clone(), @@ -176,7 +189,7 @@ where })?; Any { value, type_url: msg.type_url() } }; - updates.push((update_client_header, events, update_type)); + updates.push((update_client_header, height, events, update_type)); } Ok(updates) } @@ -185,11 +198,8 @@ where // necessary height field, as `height` is removed from `Attribute` from ibc-rs v0.22.0 async fn ibc_events(&self) -> Pin + Send + 'static>> { // Create websocket client. Like what `EventMonitor::subscribe()` does in `hermes` - let (ws_client, ws_driver) = WebSocketClient::new(self.websocket_url.clone()) - .await - .map_err(|e| Error::from(format!("Web Socket Client Error {:?}", e))) - .unwrap(); - tokio::spawn(ws_driver.run()); + let ws_client = self.rpc_client.clone(); + let query_all = vec![ Query::from(EventType::NewBlock), Query::eq("message.module", "ibc_client"), @@ -494,7 +504,7 @@ where let request = QueryPacketCommitmentsRequest { port_id: port_id.to_string(), channel_id: channel_id.to_string(), - pagination: None, + pagination: Some(PageRequest { limit: u32::MAX as _, ..Default::default() }), }; let request = tonic::Request::new(request); let response = grpc_client @@ -532,7 +542,7 @@ where port_id: port_id.to_string(), channel_id: channel_id.to_string(), packet_commitment_sequences: vec![], - pagination: None, + pagination: Some(PageRequest { limit: u32::MAX as _, ..Default::default() }), }; let request = tonic::Request::new(request); let response = grpc_client @@ -579,15 +589,6 @@ where Ok(commitment_sequences) } - async fn on_undelivered_sequences(&self, is_empty: bool) -> Result<(), Self::Error> { - *self.maybe_has_undelivered_packets.lock().unwrap() = !is_empty; - Ok(()) - } - - fn has_undelivered_sequences(&self) -> bool { - *self.maybe_has_undelivered_packets.lock().unwrap() - } - async fn query_unreceived_acknowledgements( &self, _at: Height, @@ -637,7 +638,7 @@ where .map_err(|e| Error::from(format!("{:?}", e)))?; let request = tonic::Request::new(QueryConnectionChannelsRequest { connection: connection_id.to_string(), - pagination: None, + pagination: Some(PageRequest { limit: u32::MAX as _, ..Default::default() }), }); let response = grpc_client @@ -666,11 +667,14 @@ where ); let mut block_events = vec![]; - for seq in seqs { - let query_str = - Query::eq(format!("{}.packet_src_channel", "send_packet"), channel_id.to_string()) - .and_eq(format!("{}.packet_src_port", "send_packet"), port_id.to_string()) - .and_eq(format!("{}.packet_sequence", "send_packet"), seq.to_string()); + let mut added_seqs = HashSet::new(); + for seq in seqs.iter().cloned() { + if added_seqs.contains(&seq) { + continue + } + let query_str = Query::eq("send_packet.packet_src_channel", channel_id.to_string()) + .and_eq("send_packet.packet_src_port", port_id.to_string()) + .and_eq("send_packet.packet_sequence", seq.to_string()); let response = self .rpc_client @@ -691,7 +695,13 @@ where ibc_event_try_from_abci_event(ev, Height::new(self.id().version(), height)); match ev { - Ok(IbcEvent::SendPacket(p)) => { + Ok(IbcEvent::SendPacket(p)) + if !added_seqs.contains(&p.packet.sequence.0) && + seqs.contains(&p.packet.sequence.0) && + p.packet.source_port == port_id && p.packet.source_channel == + channel_id => + { + added_seqs.insert(p.packet.sequence.0); let mut info = PacketInfo::try_from(IbcPacketInfo::from(p.packet)) .map_err(|_| { Error::from(format!( @@ -719,9 +729,14 @@ where target: "hyperspace_cosmos", "query_recv_packets: channel_id: {}, port_id: {}, seqs: {:?}", channel_id, port_id, seqs ); + let mut block_events = vec![]; - for seq in seqs { + let mut added_seqs = HashSet::new(); + for seq in seqs.iter().cloned() { + if added_seqs.contains(&seq) { + continue + } let query_str = Query::eq("recv_packet.packet_dst_channel", channel_id.to_string()) .and_eq("recv_packet.packet_dst_port", port_id.to_string()) .and_eq("recv_packet.packet_sequence", seq.to_string()); @@ -743,8 +758,15 @@ where let height = tx.height.value(); let ev = ibc_event_try_from_abci_event(ev, Height::new(self.id().version(), height)); + match ev { - Ok(IbcEvent::WriteAcknowledgement(p)) => { + Ok(IbcEvent::WriteAcknowledgement(p)) + if !added_seqs.contains(&p.packet.sequence.0) && + seqs.contains(&p.packet.sequence.0) && + p.packet.destination_port == port_id && + p.packet.destination_channel == channel_id => + { + added_seqs.insert(p.packet.sequence.0); let mut info = PacketInfo::try_from(IbcPacketInfo::from(p.packet)) .map_err(|_| { Error::from(format!( @@ -799,7 +821,7 @@ where ibc_event_try_from_abci_event(ev, Height::new(self.id().version(), height)); let timestamp = self.query_timestamp_at(height).await?; match ev { - Ok(IbcEvent::UpdateClient(_)) => + Ok(IbcEvent::UpdateClient(e)) if e.client_id() == &client_id => return Ok(( Height::new(self.chain_id.version(), height), Timestamp::from_nanoseconds(timestamp)?, @@ -901,7 +923,9 @@ where } async fn query_clients(&self) -> Result, Self::Error> { - let request = tonic::Request::new(QueryClientStatesRequest { pagination: None }); + let request = tonic::Request::new(QueryClientStatesRequest { + pagination: Some(PageRequest { limit: u32::MAX as _, ..Default::default() }), + }); let grpc_client = ibc_proto::ibc::core::client::v1::query_client::QueryClient::new( self.grpc_client.clone(), ); @@ -927,7 +951,9 @@ where } async fn query_channels(&self) -> Result, Self::Error> { - let request = tonic::Request::new(QueryChannelsRequest { pagination: None }); + let request = tonic::Request::new(QueryChannelsRequest { + pagination: Some(PageRequest { limit: u32::MAX as _, ..Default::default() }), + }); let mut grpc_client = ibc_proto::ibc::core::channel::v1::query_client::QueryClient::connect( self.grpc_url.clone().to_string(), @@ -962,7 +988,9 @@ where .await .map_err(|e| Error::from(format!("{:?}", e)))?; - let request = tonic::Request::new(QueryConnectionsRequest { pagination: None }); + let request = tonic::Request::new(QueryConnectionsRequest { + pagination: Some(PageRequest { limit: u32::MAX as _, ..Default::default() }), + }); let response = grpc_client .connections(request) @@ -1274,8 +1302,9 @@ impl CosmosClient where H: 'static + Clone + Send + Sync, { - async fn parse_ibc_events_at( + async fn parse_ibc_events_at( &self, + counterparty: &C, latest_revision: u64, height: u64, ) -> Result, ::Error> { @@ -1300,20 +1329,40 @@ where let ibc_height = Height::new(latest_revision, height); for event in events { + let mut channel_and_port_ids = self.channel_whitelist(); + channel_and_port_ids.extend(counterparty.channel_whitelist()); + let ibc_event = ibc_event_try_from_abci_event(&event, ibc_height).ok(); match ibc_event { Some(mut ev) => { ev.set_height(ibc_height); - log::debug!(target: "hyperspace_cosmos", "Encountered event at {height}: {:?}", event.kind); ibc_events.push(ev); }, None => { - log::debug!(target: "hyperspace_cosmos", "Skipped event: {:?}", event.kind); + let ignored_events = [ + "commission", + "rewards", + "transfer", + "mint", + "withdraw_rewards", + "coin_spent", + "coin_received", + "withdraw_commission", + "message", + "liveness", + "tx", + ]; + if !ignored_events.contains(&event.kind.as_str()) { + log::debug!(target: "hyperspace_cosmos", "Skipped event: {:?}", event.kind); + } continue }, } } - Ok(ibc_events) + + let filtered_events = filter_events(ibc_events, self, counterparty); + + Ok(filtered_events) } } diff --git a/hyperspace/cosmos/src/test_provider.rs b/hyperspace/cosmos/src/test_provider.rs index db051ec64..e2cc6c8a1 100644 --- a/hyperspace/cosmos/src/test_provider.rs +++ b/hyperspace/cosmos/src/test_provider.rs @@ -11,7 +11,7 @@ use primitives::TestProvider; use tendermint_rpc::{ event::{Event, EventData}, query::{EventType, Query}, - SubscriptionClient, WebSocketClient, + SubscriptionClient, }; #[async_trait::async_trait] @@ -37,9 +37,8 @@ where /// Returns a stream that yields chain Block number async fn subscribe_blocks(&self) -> Pin + Send + Sync>> { - let (ws_client, ws_driver) = - WebSocketClient::new(self.websocket_url.clone()).await.unwrap(); - tokio::spawn(ws_driver.run()); + let ws_client = self.rpc_client.clone(); + let subscription = ws_client.subscribe(Query::from(EventType::NewBlock)).await.unwrap(); log::info!(target: "hyperspace_cosmos", "🛰️ Subscribed to {} listening to finality notifications", self.name); let stream = subscription.filter_map(|event| { diff --git a/hyperspace/parachain/Cargo.toml b/hyperspace/parachain/Cargo.toml index 041457e95..69c380cec 100644 --- a/hyperspace/parachain/Cargo.toml +++ b/hyperspace/parachain/Cargo.toml @@ -28,7 +28,7 @@ jsonrpsee = "0.16.2" jsonrpsee-ws-client = "0.16.2" finality-grandpa = "0.16.0" prost = { version = "0.11" } -vec1 = "1.10.1" +rand = "0.8.5" # substrate sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39", features = ["full_crypto"] } diff --git a/hyperspace/parachain/src/chain.rs b/hyperspace/parachain/src/chain.rs index 09de3a389..7688d017e 100644 --- a/hyperspace/parachain/src/chain.rs +++ b/hyperspace/parachain/src/chain.rs @@ -39,7 +39,9 @@ use itertools::Itertools; use jsonrpsee_ws_client::WsClientBuilder; use light_client_common::config::{EventRecordT, RuntimeCall, RuntimeTransactions}; use pallet_ibc::light_clients::AnyClientMessage; -use primitives::{mock::LocalClientTypes, Chain, IbcProvider, MisbehaviourHandler, RelayerState}; +use primitives::{ + mock::LocalClientTypes, Chain, CommonClientState, IbcProvider, MisbehaviourHandler, +}; use sp_core::{twox_128, H256}; use sp_runtime::{ traits::{IdentifyAccount, One, Verify}, @@ -86,7 +88,7 @@ where ::Signature: From + Send + Sync, <::Header as Header>::Number: BlockNumberOps + From + Display + Ord + sp_runtime::traits::Zero + One + Send + Sync, - ::Header: Decode + Send + Sync, + ::Header: Decode + Send + Sync + Clone, T::Hash: From + From<[u8; 32]>, BTreeMap: From::Hash, ParachainHeaderProofs>>, @@ -339,56 +341,54 @@ where log::debug!(target: "hyperspace", "Handling error: {err_str}"); if err_str.contains("MaxSlotsExceeded") { - self.rpc_call_delay = self.rpc_call_delay * 2; + self.common_state.rpc_call_delay = self.common_state.rpc_call_delay * 2; } else if err_str.contains("RestartNeeded") || err_str.contains("restart required") { - let relay_ws_client = Arc::new( - WsClientBuilder::default() - .build(&self.relay_chain_rpc_url) - .await - .map_err(|e| Error::from(format!("Rpc Error {:?}", e)))?, - ); - let para_ws_client = Arc::new( - WsClientBuilder::default() - .build(&self.parachain_rpc_url) - .await - .map_err(|e| Error::from(format!("Rpc Error {:?}", e)))?, - ); - - let para_client = subxt::OnlineClient::from_rpc_client(unsafe { - unsafe_cast_to_jsonrpsee_client(¶_ws_client) - }) - .await?; - let relay_client = subxt::OnlineClient::from_rpc_client(unsafe { - unsafe_cast_to_jsonrpsee_client(&relay_ws_client) - }) - .await?; - - log::info!(target: "hyperspace", "Reconnected to relay chain and parachain"); - - self.relay_ws_client = relay_ws_client; - self.para_ws_client = para_ws_client; - self.relay_client = relay_client; - self.para_client = para_client; - self.rpc_call_delay = self.rpc_call_delay * 2; + self.reconnect().await?; + self.common_state.rpc_call_delay = self.common_state.rpc_call_delay * 2; } Ok(()) } - fn rpc_call_delay(&self) -> Duration { - self.rpc_call_delay - } + async fn reconnect(&mut self) -> anyhow::Result<()> { + let relay_ws_client = Arc::new( + WsClientBuilder::default() + .build(&self.relay_chain_rpc_url) + .await + .map_err(|e| Error::from(format!("Rpc Error {:?}", e)))?, + ); + let para_ws_client = Arc::new( + WsClientBuilder::default() + .build(&self.parachain_rpc_url) + .await + .map_err(|e| Error::from(format!("Rpc Error {:?}", e)))?, + ); + + let para_client = subxt::OnlineClient::from_rpc_client(unsafe { + unsafe_cast_to_jsonrpsee_client(¶_ws_client) + }) + .await?; + let relay_client = subxt::OnlineClient::from_rpc_client(unsafe { + unsafe_cast_to_jsonrpsee_client(&relay_ws_client) + }) + .await?; + + self.relay_ws_client = relay_ws_client; + self.para_ws_client = para_ws_client; + self.relay_client = relay_client; + self.para_client = para_client; + + log::info!(target: "hyperspace", "Reconnected to relay chain and parachain"); - fn set_rpc_call_delay(&mut self, delay: Duration) { - self.rpc_call_delay = delay; + Ok(()) } - fn relayer_state(&self) -> &RelayerState { - &self.relayer_state + fn common_state(&self) -> &CommonClientState { + &self.common_state } - fn relayer_state_mut(&mut self) -> &mut RelayerState { - &mut self.relayer_state + fn common_state_mut(&mut self) -> &mut CommonClientState { + &mut self.common_state } } @@ -421,7 +421,7 @@ where ) -> Result<(), anyhow::Error> { let client_message = client_message.unpack_recursive_into(); match client_message { - AnyClientMessage::Grandpa(ClientMessage::Header(mut header)) => { + AnyClientMessage::Grandpa(ClientMessage::Header(header)) => { let base_header = header .finality_proof .unknown_headers @@ -439,68 +439,59 @@ where })?; let common_ancestor_block_number = u32::from(common_ancestor_header.number()); + let encoded = + GrandpaApiClient::::prove_finality( + &*self.relay_ws_client, + common_ancestor_block_number + 1, + ) + .await? + .ok_or_else(|| { + anyhow!( + "No justification found for block: {:?}", + header.finality_proof.block + ) + })? + .0; - let mut detected_misbehaviour_at = None; - // TODO: parallelize this - for header in &header.finality_proof.unknown_headers { - let i = header.number; - let unknown_header_hash = - self.relay_client.rpc().block_hash(Some(i.into())).await?.ok_or_else( - || { - anyhow!( - "No block hash found for block number: {:?}", - common_ancestor_block_number - ) - }, - )?; - - // if detected_misbehaviour.is_none() { - let header_hash = header.hash(); - if unknown_header_hash != header_hash.into() { - detected_misbehaviour_at = Some(i); - let _guard = self.client_id.lock().unwrap(); - let client_id = - _guard.as_ref().map(|x| x.as_str()).unwrap_or_else(|| "{unknown}"); - log::warn!( - "Found misbehaviour on client {}: {:?} != {:?} at {i}", - client_id, - unknown_header_hash, - header_hash - ); - break - } - } + let mut trusted_finality_proof = + FinalityProof::::decode(&mut &encoded[..])?; + let trusted_justification = + GrandpaJustification::decode(&mut &*trusted_finality_proof.justification)?; + let to_block = trusted_justification.commit.target_number; + let from_block = (common_ancestor_block_number + 1).min(to_block); - if let Some(height) = detected_misbehaviour_at { - let encoded = - GrandpaApiClient::::prove_finality( - &*self.relay_ws_client, - height, - ) - .await? - .ok_or_else(|| { - anyhow!( - "No justification found for block: {:?}", - header.finality_proof.block - ) - })? - .0; - - let mut trusted_finality_proof = - FinalityProof::::decode(&mut &encoded[..])?; - let trusted_justification = - GrandpaJustification::decode(&mut &*trusted_finality_proof.justification)?; - let to_block = trusted_finality_proof - .unknown_headers - .first() - .map(|x| x.number.saturating_sub(1)) - .unwrap_or(trusted_justification.commit.target_number); - let from_block = height.min(to_block); - - for h in (from_block..=to_block).rev() { + let trusted_base_header_hash = self + .relay_client + .rpc() + .block_hash(Some(from_block.into())) + .await? + .ok_or_else(|| anyhow!("No hash found for block: {:?}", from_block))?; + + let base_header_hash = base_header.hash(); + if base_header_hash != trusted_base_header_hash.into() { + log::warn!( + "Found misbehaviour on client {}: {:?} != {:?}", + self.client_id + .lock() + .unwrap() + .as_ref() + .map(|x| x.as_str().to_owned()) + .unwrap_or_else(|| "{unknown}".to_owned()), + base_header_hash, + trusted_base_header_hash + ); + + trusted_finality_proof.unknown_headers.clear(); + // TODO: parallelize this + for i in from_block..=to_block { let unknown_header_hash = - self.relay_client.rpc().block_hash(Some(h.into())).await?.ok_or_else( - || anyhow!("No block hash found for block number: {:?}", h), + self.relay_client.rpc().block_hash(Some(i.into())).await?.ok_or_else( + || { + anyhow!( + "No block hash found for block number: {:?}", + common_ancestor_block_number + ) + }, )?; let unknown_header = self .relay_client @@ -512,14 +503,11 @@ where })?; trusted_finality_proof .unknown_headers - .insert(0, codec::Decode::decode(&mut &*unknown_header.encode()).expect( + .push(codec::Decode::decode(&mut &*unknown_header.encode()).expect( "Same header struct defined in different crates, decoding cannot panic", )); } - let remove_up_to = (height - base_header.number) as usize; - header.finality_proof.unknown_headers.drain(..remove_up_to).for_each(|_| ()); - let misbehaviour = ClientMessage::Misbehaviour(Misbehaviour { first_finality_proof: header.finality_proof, second_finality_proof: trusted_finality_proof, diff --git a/hyperspace/parachain/src/finality_protocol.rs b/hyperspace/parachain/src/finality_protocol.rs index d9d9a68b2..85928e00f 100644 --- a/hyperspace/parachain/src/finality_protocol.rs +++ b/hyperspace/parachain/src/finality_protocol.rs @@ -38,30 +38,32 @@ use ics11_beefy::client_message::{ }; use pallet_ibc::light_clients::{AnyClientMessage, AnyClientState}; use primitives::{ - mock::LocalClientTypes, query_maximum_height_for_timeout_proofs, Chain, IbcProvider, - KeyProvider, UpdateType, + filter_events, mock::LocalClientTypes, query_maximum_height_for_timeout_proofs, Chain, + IbcProvider, KeyProvider, UpdateType, }; +use rand::Rng; use serde::{Deserialize, Serialize}; use sp_core::H256; +use sp_finality_grandpa::GRANDPA_ENGINE_ID; use sp_runtime::{ traits::{BlakeTwo256, IdentifyAccount, One, Verify}, MultiSignature, MultiSigner, }; use std::{ - collections::{BTreeMap, BTreeSet, HashMap, HashSet}, + collections::{BTreeMap, BTreeSet, HashMap}, fmt::{Debug, Display}, + time::Duration, }; use beefy_prover::helpers::unsafe_arc_cast; -use grandpa_prover::{GrandpaJustification, JustificationNotification}; -use ibc::core::{ - ics04_channel::packet::Packet, - ics24_host::identifier::{ChannelId, ClientId, ConnectionId, PortId}, +use grandpa_prover::{ + GrandpaJustification, GrandpaProver, JustificationNotification, PROCESS_BLOCKS_BATCH_SIZE, }; use subxt::config::{ extrinsic_params::BaseExtrinsicParamsBuilder, ExtrinsicParams, Header as HeaderT, Header, }; use tendermint_proto::Protobuf; +use tokio::task::JoinSet; #[derive(Clone, Debug, Serialize, Deserialize)] pub enum FinalityProtocol { @@ -86,7 +88,7 @@ impl FinalityProtocol { source: &mut ParachainClient, finality_event: FinalityEvent, counterparty: &C, - ) -> Result, UpdateType)>, anyhow::Error> + ) -> Result, UpdateType)>, anyhow::Error> where T: light_client_common::config::Config + Send + Sync, C: Chain, @@ -107,7 +109,7 @@ impl FinalityProtocol { + One + Send + Sync, - ::Header: Decode + Send + Sync, + ::Header: Decode + Send + Sync + Clone, T::Hash: From + From<[u8; 32]>, sp_core::H256: From, BTreeMap: @@ -133,7 +135,7 @@ pub async fn query_latest_ibc_events_with_beefy( source: &mut ParachainClient, finality_event: FinalityEvent, counterparty: &C, -) -> Result, UpdateType)>, anyhow::Error> +) -> Result, UpdateType)>, anyhow::Error> where T: light_client_common::config::Config + Send + Sync, C: Chain, @@ -283,23 +285,7 @@ where }) .collect::>(); - let events: Vec = events - .into_values() - .flatten() - .filter(|e| { - let mut channel_and_port_ids = source.channel_whitelist(); - channel_and_port_ids.extend(counterparty.channel_whitelist()); - filter_events_by_ids( - e, - &[source.client_id(), counterparty.client_id()], - &[source.connection_id(), counterparty.connection_id()] - .into_iter() - .flatten() - .collect::>(), - &channel_and_port_ids, - ) - }) - .collect(); + let events: Vec = filter_events(events.into_values().flatten(), source, counterparty); if timeout_update_required { let max_height_for_timeouts = max_height_for_timeouts.unwrap(); @@ -353,90 +339,79 @@ where Any { value, type_url: msg.type_url() } }; - Ok(vec![(update_header, events, update_type)]) + // FIXME: use height from the beefy header + Ok(vec![(update_header, Height::new(0, 0), events, update_type)]) } -pub fn filter_events_by_ids( - ev: &IbcEvent, - client_ids: &[ClientId], - connection_ids: &[ConnectionId], - channel_and_port_ids: &HashSet<(ChannelId, PortId)>, -) -> bool { - use ibc::core::{ - ics02_client::events::Attributes as ClientAttributes, - ics03_connection::events::Attributes as ConnectionAttributes, - ics04_channel::events::Attributes as ChannelAttributes, - }; - let channel_ids = channel_and_port_ids - .iter() - .map(|(channel_id, _)| channel_id) - .collect::>(); - - let filter_packet = |packet: &Packet| { - channel_and_port_ids.contains(&(packet.source_channel.clone(), packet.source_port.clone())) || - channel_and_port_ids - .contains(&(packet.destination_channel.clone(), packet.destination_port.clone())) - }; - let filter_client_attributes = - |packet: &ClientAttributes| client_ids.contains(&packet.client_id); - let filter_connection_attributes = |packet: &ConnectionAttributes| { - packet - .connection_id - .as_ref() - .map(|id| connection_ids.contains(&id)) - .unwrap_or(false) || - packet - .counterparty_connection_id - .as_ref() - .map(|id| connection_ids.contains(&id)) - .unwrap_or(false) - }; - let filter_channel_attributes = |packet: &ChannelAttributes| { - packet.channel_id.as_ref().map(|id| channel_ids.contains(&id)).unwrap_or(false) || - packet - .counterparty_channel_id - .as_ref() - .map(|id| channel_ids.contains(&id)) - .unwrap_or(false) - }; - - let v = match ev { - IbcEvent::SendPacket(e) => filter_packet(&e.packet), - IbcEvent::WriteAcknowledgement(e) => filter_packet(&e.packet), - IbcEvent::TimeoutPacket(e) => filter_packet(&e.packet), - IbcEvent::ReceivePacket(e) => filter_packet(&e.packet), - IbcEvent::AcknowledgePacket(e) => filter_packet(&e.packet), - IbcEvent::TimeoutOnClosePacket(e) => filter_packet(&e.packet), - IbcEvent::CreateClient(e) => filter_client_attributes(&e.0), - IbcEvent::UpdateClient(e) => filter_client_attributes(&e.common), - IbcEvent::UpgradeClient(e) => filter_client_attributes(&e.0), - IbcEvent::ClientMisbehaviour(e) => filter_client_attributes(&e.0), - IbcEvent::OpenInitConnection(e) => filter_connection_attributes(&e.0), - IbcEvent::OpenTryConnection(e) => filter_connection_attributes(&e.0), - IbcEvent::OpenAckConnection(e) => filter_connection_attributes(&e.0), - IbcEvent::OpenConfirmConnection(e) => filter_connection_attributes(&e.0), - IbcEvent::OpenInitChannel(e) => - filter_channel_attributes(&ChannelAttributes::from(e.clone())), - IbcEvent::OpenTryChannel(e) => - filter_channel_attributes(&ChannelAttributes::from(e.clone())), - IbcEvent::OpenAckChannel(e) => - filter_channel_attributes(&ChannelAttributes::from(e.clone())), - IbcEvent::OpenConfirmChannel(e) => - filter_channel_attributes(&ChannelAttributes::from(e.clone())), - IbcEvent::CloseInitChannel(e) => - filter_channel_attributes(&ChannelAttributes::from(e.clone())), - IbcEvent::CloseConfirmChannel(e) => - filter_channel_attributes(&ChannelAttributes::from(e.clone())), - IbcEvent::PushWasmCode(_) => true, - IbcEvent::NewBlock(_) | - IbcEvent::AppModule(_) | - IbcEvent::Empty(_) | - IbcEvent::ChainError(_) => true, - }; - if !v { - log::debug!(target: "hyperspace_parachain", "Filtered out event: {:?}", ev); +async fn find_next_justification( + prover: &GrandpaProver, + from: u32, + to: u32, +) -> anyhow::Result>> +where + T: light_client_common::config::Config + Send + Sync, + u32: From<<::Header as HeaderT>::Number> + + From<<::Header as Header>::Number>, + ParachainClient: Chain + KeyProvider, + <::Signature as Verify>::Signer: + From + IdentifyAccount, + ::Address: From<::AccountId>, + ::Signature: From + Send + Sync, + <::Header as Header>::Number: + BlockNumberOps + From + Display + Ord + sp_runtime::traits::Zero + One + Send + Sync, + T::Hash: From + From<[u8; 32]>, + sp_core::H256: From, + BTreeMap: + From::Hash, ParachainHeaderProofs>>, + >::OtherParams: + From> + Send + Sync, + ::Header: Decode + Send + Sync + Clone, + ::AccountId: Send + Sync, + ::Address: Send + Sync, +{ + log::debug!(target: "hyperspace", "Trying to find next justification in blocks {from}..{to}"); + let mut join_set: JoinSet> = JoinSet::new(); + let heights = (from..to).collect::>(); + for heights in heights.chunks(PROCESS_BLOCKS_BATCH_SIZE) { + for height in heights.to_owned() { + if height % 100 == 0 { + log::debug!(target: "hyperspace", "Looking for a closer proof {height}/{to}..."); + } + let relay_client = prover.relay_client.clone(); + let delay = prover.rpc_call_delay.as_millis(); + let duration = Duration::from_millis(rand::thread_rng().gen_range(1..delay) as u64); + join_set.spawn(async move { + tokio::time::sleep(duration).await; + let Some(hash) = relay_client.rpc().block_hash(Some(height.into())).await? else { + return Ok(None) + }; + let Some(block) = relay_client.rpc().block(Some(hash)).await? else { + return Ok(None) + }; + let Some(justifications) = block.justifications else { + return Ok(None) + }; + for (id, justification) in justifications { + log::info!(target: "hyperspace", "Found closer justification at {height} (suggested {to})"); + if id == GRANDPA_ENGINE_ID { + let decoded_justification = + GrandpaJustification::::decode(&mut &justification[..])?; + return Ok(Some(decoded_justification)) + } + } + return Ok(None) + }); + } + while let Some(res) = join_set.join_next().await { + let justification = res??; + if justification.is_some() { + join_set.abort_all(); + return Ok(justification) + } + } } - v + + Ok(None) } /// Query the latest events that have been finalized by the GRANDPA finality protocol. @@ -444,7 +419,7 @@ pub async fn query_latest_ibc_events_with_grandpa( source: &mut ParachainClient, finality_event: FinalityEvent, counterparty: &C, -) -> Result, UpdateType)>, anyhow::Error> +) -> Result, UpdateType)>, anyhow::Error> where T: light_client_common::config::Config + Send + Sync, C: Chain, @@ -463,7 +438,7 @@ where From::Hash, ParachainHeaderProofs>>, >::OtherParams: From> + Send + Sync, - ::Header: Decode + Send + Sync, + ::Header: Decode + Send + Sync + Clone, ::AccountId: Send + Sync, ::Address: Send + Sync, { @@ -473,7 +448,7 @@ where }; let client_id = source.client_id(); let latest_height = counterparty.latest_height_and_timestamp().await?.0; - let response = counterparty.query_client_state(latest_height, client_id).await?; + let response = counterparty.query_client_state(latest_height, client_id.clone()).await?; let any_client_state = response.client_state.ok_or_else(|| { Error::Custom("Received an empty client state from counterparty".to_string()) })?; @@ -507,9 +482,28 @@ where let finality_proof = FinalityProof::::decode(&mut &encoded[..])?; - let justification = + let mut justification = GrandpaJustification::::decode(&mut &finality_proof.justification[..])?; + let diff = justification + .commit + .target_number + .saturating_sub(client_state.latest_relay_height); + if diff > 100 { + // try to find a closer justification + if let Some(new_justification) = find_next_justification( + &prover, + client_state.latest_relay_height + 1, + justification.commit.target_number, + ) + .await? + { + justification = new_justification; + } + } + + let justification = justification; + // fetch the latest finalized parachain header let finalized_para_header = prover .query_latest_finalized_parachain_header(justification.commit.target_number) @@ -570,25 +564,7 @@ where }) .collect::>(); - let events: Vec = events - .into_values() - .flatten() - .filter(|e| { - let mut channel_and_port_ids = source.channel_whitelist(); - channel_and_port_ids.extend(counterparty.channel_whitelist()); - let f = filter_events_by_ids( - e, - &[source.client_id(), counterparty.client_id()], - &[source.connection_id(), counterparty.connection_id()] - .into_iter() - .flatten() - .collect::>(), - &channel_and_port_ids, - ); - log::trace!(target: "hyperspace", "Filtering event: {:?}: {f}", e.event_type()); - f - }) - .collect(); + let events: Vec = filter_events(events.into_values().flatten(), source, counterparty); if timeout_update_required { let max_height_for_timeouts = max_height_for_timeouts.unwrap(); @@ -637,6 +613,7 @@ where .expect("Should not panic, same struct from different crates"); let authority_set_changed_scheduled = find_scheduled_change(&target).is_some(); + log::info!(target: "hyperspace_parachain", "authority_set_changed_scheduled = {authority_set_changed_scheduled}, timeout_update_required = {timeout_update_required}, is_update_required = {is_update_required}"); // if validator set has changed this is a mandatory update let update_type = match authority_set_changed_scheduled || timeout_update_required || is_update_required { @@ -650,10 +627,10 @@ where parachain_headers: parachain_headers.into(), height: Height::new(source.para_id as u64, finalized_para_height as u64), }; - + let height = grandpa_header.height(); let update_header = { let msg = MsgUpdateAnyClient:: { - client_id: source.client_id(), + client_id: client_id.clone(), client_message: AnyClientMessage::Grandpa(ClientMessage::Header(grandpa_header)), signer: counterparty.account_id(), }; @@ -661,7 +638,5 @@ where Any { value, type_url: msg.type_url() } }; - log::trace!(target: "hyperspace", "Sending update header with type {:?} to {}", update_type, source.name()); - - Ok(vec![(update_header, events, update_type)]) + Ok(vec![(update_header, height, events, update_type)]) } diff --git a/hyperspace/parachain/src/lib.rs b/hyperspace/parachain/src/lib.rs index f2b2a275a..52eeb3841 100644 --- a/hyperspace/parachain/src/lib.rs +++ b/hyperspace/parachain/src/lib.rs @@ -38,41 +38,45 @@ use error::Error; use frame_support::Serialize; use serde::Deserialize; +use crate::{ + finality_protocol::FinalityProtocol, + signer::ExtrinsicSigner, + utils::{fetch_max_extrinsic_weight, unsafe_cast_to_jsonrpsee_client}, +}; use beefy_light_client_primitives::{ClientState, MmrUpdateProof}; use beefy_prover::Prover; -use ibc::core::ics24_host::identifier::{ChannelId, ClientId, ConnectionId, PortId}; -use ics11_beefy::client_message::ParachainHeader; -use pallet_mmr_primitives::Proof; -use sp_core::{ecdsa, ed25519, sr25519, Bytes, Pair, H256}; -use sp_keystore::{SyncCryptoStore, SyncCryptoStorePtr}; -use sp_runtime::{ - traits::{IdentifyAccount, Verify}, - KeyTypeId, MultiSignature, MultiSigner, -}; -use ss58_registry::Ss58AddressFormat; -use subxt::config::{Header as HeaderT, Header}; - -use crate::utils::{fetch_max_extrinsic_weight, unsafe_cast_to_jsonrpsee_client}; use codec::Decode; -use ics10_grandpa::consensus_state::ConsensusState as GrandpaConsensusState; +use grandpa_light_client_primitives::ParachainHeaderProofs; +use grandpa_prover::GrandpaProver; +use ibc::{ + core::ics24_host::identifier::{ChannelId, ClientId, ConnectionId, PortId}, + timestamp::Timestamp, +}; +use ics10_grandpa::{ + client_state::ClientState as GrandpaClientState, + consensus_state::ConsensusState as GrandpaConsensusState, +}; use ics11_beefy::{ - client_state::ClientState as BeefyClientState, + client_message::ParachainHeader, client_state::ClientState as BeefyClientState, consensus_state::ConsensusState as BeefyConsensusState, }; -use primitives::{KeyProvider, RelayerState}; - -use crate::{finality_protocol::FinalityProtocol, signer::ExtrinsicSigner}; -use grandpa_light_client_primitives::ParachainHeaderProofs; -use grandpa_prover::GrandpaProver; -use ibc::timestamp::Timestamp; -use ics10_grandpa::client_state::{AuthoritiesChange, ClientState as GrandpaClientState}; use jsonrpsee_ws_client::WsClientBuilder; use light_client_common::config::{AsInner, RuntimeStorage}; use pallet_ibc::light_clients::{AnyClientState, AnyConsensusState, HostFunctionsManager}; -use sp_keystore::testing::KeyStore; -use sp_runtime::traits::One; -use subxt::tx::TxPayload; -use vec1::Vec1; +use pallet_mmr_primitives::Proof; +use primitives::{CommonClientState, KeyProvider}; +use sp_core::{ecdsa, ed25519, sr25519, Bytes, Pair, H256}; +use sp_keystore::{testing::KeyStore, SyncCryptoStore, SyncCryptoStorePtr}; +use sp_runtime::{ + traits::{IdentifyAccount, One, Verify}, + KeyTypeId, MultiSignature, MultiSigner, +}; +use ss58_registry::Ss58AddressFormat; +use subxt::{ + config::{Header as HeaderT, Header}, + tx::TxPayload, +}; +use tokio::sync::Mutex as AsyncMutex; /// Implements the [`crate::Chain`] trait for parachains. /// This is responsible for: @@ -117,17 +121,8 @@ pub struct ParachainClient { pub max_extrinsic_weight: u64, /// Finality protocol to use, eg Beefy, Grandpa pub finality_protocol: FinalityProtocol, - /// Delay between parallel RPC calls to be friendly with the node and avoid MaxSlotsExceeded - /// error - pub rpc_call_delay: Duration, - /// Used to determine whether client updates should be forced to send - /// even if it's optional. It's required, because some timeout packets - /// should use proof of the client states. - /// - /// Set inside `on_undelivered_sequences`. - pub maybe_has_undelivered_packets: Arc>, - /// Relayer data - pub relayer_state: RelayerState, + /// Common relayer data + pub common_state: CommonClientState, } enum KeyType { @@ -200,6 +195,11 @@ where { /// Initializes a [`ParachainClient`] given a [`ParachainConfig`] pub async fn new(config: ParachainClientConfig) -> Result { + assert!( + config.channel_whitelist.len() <= 1, + "Only one channel is supported. Please remove all but one channel from the config." + ); + let relay_ws_client = Arc::new( WsClientBuilder::default() .build(&config.relay_chain_rpc_url) @@ -274,9 +274,13 @@ where ss58_version: Ss58AddressFormat::from(config.ss58_version), channel_whitelist: Arc::new(Mutex::new(config.channel_whitelist.into_iter().collect())), finality_protocol: config.finality_protocol, - rpc_call_delay: DEFAULT_RPC_CALL_DELAY, - maybe_has_undelivered_packets: Default::default(), - relayer_state: Default::default(), + common_state: CommonClientState { + skip_optional_client_updates: true, + maybe_has_undelivered_packets: Arc::new(Mutex::new(Default::default())), + rpc_call_delay: DEFAULT_RPC_CALL_DELAY, + misbehaviour_client_msg_queue: Arc::new(AsyncMutex::new(vec![])), + ..Default::default() + }, }) } } @@ -306,7 +310,7 @@ where para_client: self.para_client.clone(), para_ws_client, para_id: self.para_id, - rpc_call_delay: self.rpc_call_delay, + rpc_call_delay: self.common_state.rpc_call_delay, } } @@ -590,7 +594,7 @@ where para_client: self.para_client.clone(), para_ws_client, para_id: self.para_id, - rpc_call_delay: self.rpc_call_delay, + rpc_call_delay: self.common_state.rpc_call_delay, }; let api = self.relay_client.storage(); let para_client_api = self.para_client.storage(); @@ -625,12 +629,8 @@ where let mut client_state = GrandpaClientState::::default(); client_state.relay_chain = Default::default(); - client_state.authorities_changes = Vec1::new(AuthoritiesChange { - height: light_client_state.latest_relay_height, - timestamp: Timestamp::now(), - set_id: light_client_state.current_set_id, - authorities: light_client_state.current_authorities, - }); + client_state.current_authorities = light_client_state.current_authorities; + client_state.current_set_id = light_client_state.current_set_id; client_state.latest_relay_hash = light_client_state.latest_relay_hash.into(); client_state.frozen_height = None; client_state.latest_para_height = block_number; diff --git a/hyperspace/parachain/src/light_client_sync.rs b/hyperspace/parachain/src/light_client_sync.rs index a44ae0130..787767791 100644 --- a/hyperspace/parachain/src/light_client_sync.rs +++ b/hyperspace/parachain/src/light_client_sync.rs @@ -28,10 +28,10 @@ use ibc_rpc::{BlockNumberOrHash, IbcApiClient}; use ics10_grandpa::client_message::{ClientMessage, Header as GrandpaHeader}; use pallet_ibc::light_clients::{AnyClientMessage, AnyClientState}; -use primitives::{mock::LocalClientTypes, Chain, KeyProvider, LightClientSync}; +use primitives::{filter_events, mock::LocalClientTypes, Chain, KeyProvider, LightClientSync}; use super::{error::Error, ParachainClient}; -use crate::finality_protocol::{filter_events_by_ids, FinalityProtocol}; +use crate::finality_protocol::FinalityProtocol; const MAX_HEADERS_PER_ITERATION: usize = 100; @@ -49,7 +49,7 @@ where ::Signature: From + Send + Sync, <::Header as Header>::Number: BlockNumberOps + From + Display + Ord + sp_runtime::traits::Zero + One + Send + Sync, - ::Header: Decode + Send + Sync, + ::Header: Decode + Send + Sync + Clone, T::Hash: From + From<[u8; 32]>, sp_core::H256: From, BTreeMap: @@ -174,7 +174,7 @@ where ::Hash: From, ::Hash: From<[u8; 32]>, ::AssetId: Clone, - ::Header: Decode + Send + Sync, + ::Header: Decode + Send + Sync + Clone, <::Header as HeaderT>::Number: Send + Sync, { let prover = self.grandpa_prover(); @@ -241,7 +241,7 @@ where + From<<::Header as Header>::Number>, <::Header as Header>::Number: BlockNumberOps + From + Display + Ord + sp_runtime::traits::Zero + One + Send + Sync, - ::Header: Decode + Send + Sync, + ::Header: Decode + Send + Sync + Clone, H256: From, BTreeMap: From::Hash, ParachainHeaderProofs>>, @@ -299,23 +299,7 @@ where headers_with_events.insert(finalized_para_header.number()); } - let events: Vec = events - .into_values() - .flatten() - .filter(|e| { - let mut channel_and_port_ids = source.channel_whitelist(); - channel_and_port_ids.extend(counterparty.channel_whitelist()); - filter_events_by_ids( - e, - &[source.client_id(), counterparty.client_id()], - &[source.connection_id(), counterparty.connection_id()] - .into_iter() - .flatten() - .collect::>(), - &channel_and_port_ids, - ) - }) - .collect(); + let events: Vec = filter_events(events.into_values().flatten(), source, counterparty); let ParachainHeadersWithFinalityProof { finality_proof, parachain_headers, .. } = prover .query_finalized_parachain_headers_with_proof::( previous_finalized_height, diff --git a/hyperspace/parachain/src/provider.rs b/hyperspace/parachain/src/provider.rs index b4cbf5c88..721803eb6 100644 --- a/hyperspace/parachain/src/provider.rs +++ b/hyperspace/parachain/src/provider.rs @@ -87,9 +87,16 @@ where MultiSigner: From, ::Address: From<::AccountId>, ::Signature: From + Send + Sync, - <::Header as Header>::Number: - BlockNumberOps + From + Display + Ord + sp_runtime::traits::Zero + One + Send + Sync, - ::Header: Decode + Send + Sync, + <::Header as Header>::Number: BlockNumberOps + + From + + Display + + Ord + + sp_runtime::traits::Zero + + One + + Send + + Sync + + Clone, + ::Header: Decode + Send + Sync + Clone, T::Hash: From + From<[u8; 32]>, sp_core::H256: From, BTreeMap: @@ -109,7 +116,7 @@ where &mut self, finality_event: Self::FinalityEvent, counterparty: &C, - ) -> Result, UpdateType)>, anyhow::Error> + ) -> Result, UpdateType)>, anyhow::Error> where C: Chain, { @@ -414,15 +421,6 @@ where Ok(res) } - async fn on_undelivered_sequences(&self, is_empty: bool) -> Result<(), Self::Error> { - *self.maybe_has_undelivered_packets.lock().unwrap() = !is_empty; - Ok(()) - } - - fn has_undelivered_sequences(&self) -> bool { - *self.maybe_has_undelivered_packets.lock().unwrap() - } - async fn query_unreceived_acknowledgements( &self, at: Height, @@ -486,8 +484,6 @@ where .await .map_err(|e| Error::from(format!("Rpc Error {:?}", e)))?; - self.on_undelivered_sequences(response.is_empty()).await?; - Ok(response) } diff --git a/hyperspace/parachain/src/test_provider.rs b/hyperspace/parachain/src/test_provider.rs index 09656b126..268249879 100644 --- a/hyperspace/parachain/src/test_provider.rs +++ b/hyperspace/parachain/src/test_provider.rs @@ -141,7 +141,7 @@ where ::Signature: From + Send + Sync, <::Header as Header>::Number: BlockNumberOps + From + Display + Ord + sp_runtime::traits::Zero + One + Send + Sync, - ::Header: Decode + Send + Sync, + ::Header: Decode + Send + Sync + Clone, T::Hash: From + From<[u8; 32]>, H256: From, BTreeMap: diff --git a/hyperspace/primitives/Cargo.toml b/hyperspace/primitives/Cargo.toml index 2c6fd9222..0f6a17323 100644 --- a/hyperspace/primitives/Cargo.toml +++ b/hyperspace/primitives/Cargo.toml @@ -16,6 +16,7 @@ tokio = { version = "1.19.2", features = ["macros", "sync", "time"] } thiserror = "1.0.31" log = "0.4.17" rand = "0.8.5" +serde = "1.0.163" # substrate subxt = { git = "https://github.com/paritytech/subxt", rev = "2a4da618a033bb82f768e4ef67b093b371f8b492", features = ["substrate-compat"] } diff --git a/hyperspace/primitives/src/lib.rs b/hyperspace/primitives/src/lib.rs index d8f19a392..9d5396ac3 100644 --- a/hyperspace/primitives/src/lib.rs +++ b/hyperspace/primitives/src/lib.rs @@ -14,7 +14,7 @@ #![allow(clippy::all)] -use futures::Stream; +use futures::{FutureExt, Stream}; use ibc_proto::{ google::protobuf::Any, ibc::core::{ @@ -28,8 +28,26 @@ use ibc_proto::{ }, }; use rand::Rng; -use std::{collections::HashSet, fmt::Debug, pin::Pin, str::FromStr, sync::Arc, time::Duration}; -use tokio::{sync::Mutex, task::JoinSet, time::sleep}; +use serde::{Deserialize, Serialize}; +use std::{ + collections::{HashMap, HashSet}, + convert::identity, + fmt::Debug, + iter, + pin::Pin, + str::FromStr, + sync::{Arc, Mutex}, + time::Duration, +}; +use subxt::ext::sp_runtime::{ + Either, + Either::{Left, Right}, +}; +use tokio::{ + sync::{Mutex as AsyncMutex, RwLock}, + task::JoinSet, + time::sleep, +}; use crate::error::Error; #[cfg(any(feature = "testing", test))] @@ -87,10 +105,76 @@ impl UpdateType { } } +fn default_skip_optional_client_updates() -> bool { + true +} + +// TODO: move other fields like `client_id`, `connection_id`, etc. here +/// Common relayer parameters +#[derive(Debug, Serialize, Deserialize, Clone)] +pub struct CommonClientConfig { + /// Skip optional client updates + #[serde(default = "default_skip_optional_client_updates")] + pub skip_optional_client_updates: bool, +} + /// A common data that all clients should keep. -#[derive(Debug, Clone, Default)] -pub struct RelayerState { - pub misbehaviour_client_msg_queue: Arc>>, +#[derive(Debug, Clone)] +pub struct CommonClientState { + /// Enable skipping client updates when possible. + pub skip_optional_client_updates: bool, + /// Used to determine whether client updates should be forced to send + /// even if it's optional. It's required, because some timeout packets + /// should use proof of the client states. + /// + /// Set inside `on_undelivered_sequences`. + pub maybe_has_undelivered_packets: Arc>>, + /// Delay between parallel RPC calls to be friendly with the node and avoid MaxSlotsExceeded + /// error + pub rpc_call_delay: Duration, + pub misbehaviour_client_msg_queue: Arc>>, + pub max_packets_to_process: usize, +} + +impl Default for CommonClientState { + fn default() -> Self { + Self { + skip_optional_client_updates: true, + maybe_has_undelivered_packets: Default::default(), + rpc_call_delay: Default::default(), + misbehaviour_client_msg_queue: Arc::new(Default::default()), + max_packets_to_process: 100, + } + } +} + +impl CommonClientState { + pub async fn on_undelivered_sequences(&self, has: bool, kind: UndeliveredType) { + log::trace!( + target: "hyperspace", + "on_undelivered_sequences: {:?}, type: {kind:?}", + has + ); + self.maybe_has_undelivered_packets.lock().unwrap().insert(kind, has); + } + + pub fn has_undelivered_sequences(&self, kind: UndeliveredType) -> bool { + self.maybe_has_undelivered_packets + .lock() + .unwrap() + .get(&kind) + .as_deref() + .cloned() + .unwrap_or_default() + } + + pub fn rpc_call_delay(&self) -> Duration { + self.rpc_call_delay + } + + pub fn set_rpc_call_delay(&mut self, delay: Duration) { + self.rpc_call_delay = delay; + } } pub fn apply_prefix(mut commitment_prefix: Vec, path: impl Into>) -> Vec { @@ -99,12 +183,23 @@ pub fn apply_prefix(mut commitment_prefix: Vec, path: impl Into>) -> commitment_prefix } +/// A type of undelivered sequences (packets). Can be: +/// - acknowledgement packet (`Acks`), +/// - receive packet (`Recvs`) +/// - timeout packet (`Timeouts`) +#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +pub enum UndeliveredType { + Acks, + Recvs, + Timeouts, +} + /// Provides an interface for accessing new events and Ibc data on the chain which must be /// relayed to the counterparty chain. #[async_trait::async_trait] pub trait IbcProvider { /// Finality event type, passed on to [`Chain::query_latest_ibc_events`] - type FinalityEvent: Debug; + type FinalityEvent: Debug + Send + 'static; /// A representation of the transaction id for the chain type TransactionId: Debug; /// Asset Id @@ -120,7 +215,7 @@ pub trait IbcProvider { &mut self, finality_event: Self::FinalityEvent, counterparty: &T, - ) -> Result, UpdateType)>, anyhow::Error> + ) -> Result, UpdateType)>, anyhow::Error> where T: Chain; @@ -231,10 +326,6 @@ pub trait IbcProvider { seqs: Vec, ) -> Result, Self::Error>; - async fn on_undelivered_sequences(&self, is_empty: bool) -> Result<(), Self::Error>; - - fn has_undelivered_sequences(&self) -> bool; - /// Given a list of packet acknowledgements sequences from the sink chain /// return a list of acknowledgement sequences that have not been received on the source chain async fn query_unreceived_acknowledgements( @@ -460,13 +551,27 @@ pub trait Chain: async fn handle_error(&mut self, error: &anyhow::Error) -> Result<(), anyhow::Error>; - fn rpc_call_delay(&self) -> Duration; + fn common_state(&self) -> &CommonClientState; + + fn common_state_mut(&mut self) -> &mut CommonClientState; + + async fn on_undelivered_sequences(&self, has: bool, kind: UndeliveredType) { + self.common_state().on_undelivered_sequences(has, kind).await + } - fn set_rpc_call_delay(&mut self, delay: Duration); + fn has_undelivered_sequences(&self, kind: UndeliveredType) -> bool { + self.common_state().has_undelivered_sequences(kind) + } - fn relayer_state(&self) -> &RelayerState; + fn rpc_call_delay(&self) -> Duration { + self.common_state().rpc_call_delay() + } + + fn set_rpc_call_delay(&mut self, delay: Duration) { + self.common_state_mut().set_rpc_call_delay(delay) + } - fn relayer_state_mut(&mut self) -> &mut RelayerState; + async fn reconnect(&mut self) -> anyhow::Result<()>; } /// Returns undelivered packet sequences that have been sent out from @@ -491,7 +596,10 @@ pub async fn query_undelivered_sequences( // First we fetch all packet commitments from source let seqs = source .query_packet_commitments(source_height, channel_id, port_id.clone()) - .await?; + .await? + .into_iter() + .collect::>(); + log::trace!(target: "hyperspace", "Seqs: {:?}", seqs); let counterparty_channel_id = channel_end .counterparty() .channel_id @@ -550,7 +658,7 @@ pub async fn query_undelivered_acks( .ok_or_else(|| Error::Custom("Expected counterparty channel id".to_string()))?; let counterparty_port_id = channel_end.counterparty().port_id.clone(); - let undelivered_acks = sink + let mut undelivered_acks = sink .query_unreceived_acknowledgements( sink_height, counterparty_channel_id, @@ -563,6 +671,8 @@ pub async fn query_undelivered_acks( "Found {} undelivered packet acks for {} chain", undelivered_acks.len(), sink.name() ); + undelivered_acks.sort(); + undelivered_acks.dedup(); Ok(undelivered_acks) } @@ -587,23 +697,47 @@ pub fn packet_info_to_packet(packet_info: &PacketInfo) -> Packet { /// Should return the first client consensus height with a consensus state timestamp that /// is equal to or greater than the values provided pub async fn find_suitable_proof_height_for_client( - chain: &impl Chain, + source: &impl Chain, + sink: &impl Chain, at: Height, client_id: ClientId, start_height: Height, timestamp_to_match: Option, latest_client_height: Height, ) -> Option { + log::trace!( + target: "hyperspace", + "Searching for suitable proof height for client {} ({}) starting at {}, {:?}, latest_client_height={}", + client_id, sink.name(), start_height, timestamp_to_match, latest_client_height + ); // If searching for existence of just a height we use a pure linear search because there's no // valid comparison to be made and there might be missing values for some heights if timestamp_to_match.is_none() { + // try to find latest states first, because relayer's strategy is to submit the most + // recent ones for height in start_height.revision_height..=latest_client_height.revision_height { let temp_height = Height::new(start_height.revision_number, height); let consensus_state = - chain.query_client_consensus(at, client_id.clone(), temp_height).await.ok(); - if consensus_state.is_none() { + sink.query_client_consensus(at, client_id.clone(), temp_height).await.ok(); + let decoded = consensus_state + .map(|x| x.consensus_state.map(AnyConsensusState::try_from)) + .flatten(); + if !matches!(decoded, Some(Ok(_))) { continue } + let proof_height = source.get_proof_height(temp_height).await; + if proof_height != temp_height { + let has_consensus_state_with_proof = sink + .query_client_consensus(at, client_id.clone(), proof_height) + .await + .ok() + .map(|x| x.consensus_state.is_some()) + .unwrap_or_default(); + if !has_consensus_state_with_proof { + continue + } + } + log::info!("Found proof height on {} as {}:{}", sink.name(), temp_height, proof_height); return Some(temp_height) } } else { @@ -612,42 +746,111 @@ pub async fn find_suitable_proof_height_for_client( let mut end = latest_client_height.revision_height; let mut last_known_valid_height = None; if start > end { + // log::debug!( + // target: "hyperspace", + // "start height {} is greater than end height {} for client {} on {}", start, end, + // client_id, sink.name() ); return None } + + log::debug!( + target: "hyperspace", + "Entered binary search for proof height on {} for client {} starting at {}", sink.name(), client_id, start_height + ); while end - start > 1 { let mid = (end + start) / 2; let temp_height = Height::new(start_height.revision_number, mid); let consensus_state = - chain.query_client_consensus(at, client_id.clone(), temp_height).await.ok(); - if consensus_state.is_none() { + sink.query_client_consensus(at, client_id.clone(), temp_height).await.ok(); + let Some(Ok(consensus_state)) = consensus_state.map(|x| x.consensus_state.map(AnyConsensusState::try_from)).flatten() else { start += 1; + // log::debug!( + // target: "hyperspace", + // "Client {} on {} does not have a consensus state at {}. start' = {start}", client_id, sink.name(), temp_height + // ); continue + }; + let proof_height = source.get_proof_height(temp_height).await; + if proof_height != temp_height { + let has_consensus_state_with_proof = sink + .query_client_consensus(at, client_id.clone(), proof_height) + .await + .ok() + .map(|x| x.consensus_state.is_some()) + .unwrap_or_default(); + if !has_consensus_state_with_proof { + // log::debug!( + // target: "hyperspace", + // "Client {} on {} does not have a proof consensus state at {}", client_id, + // sink.name(), proof_height ); + start += 1; + continue + } } - let consensus_state = - AnyConsensusState::try_from(consensus_state.unwrap().consensus_state?).ok()?; - if consensus_state.timestamp().nanoseconds() < timestamp_to_match.nanoseconds() { + // let consensus_state = + // AnyConsensusState::try_from(consensus_state.unwrap().consensus_state.unwrap()) + // .unwrap(); + // convert the code above to the one that will continue instead of panicking, without + // returning an error + + let t1 = consensus_state.timestamp().nanoseconds(); + let t2 = timestamp_to_match.nanoseconds(); + if t1 < t2 { start = mid + 1; + // log::debug!( + // target: "hyperspace", + // "Client {} on {} has a consensus state at {} but it is too old. Start' = {start}, + // {t1} < {t2}", client_id, sink.name(), temp_height ); continue } else { last_known_valid_height = Some(temp_height); end = mid; + // log::debug!( + // target: "hyperspace", + // "Client {} on {} has a consensus state at {} but it is too old. end' = {end}, + // last_known_valid_height = {last_known_valid_height:?}, {t1} >= {t2}", client_id, + // sink.name(), temp_height ); } } let start_height = Height::new(start_height.revision_number, start); let consensus_state = - chain.query_client_consensus(at, client_id.clone(), start_height).await.ok(); - if let Some(consensus_state) = consensus_state { - let consensus_state = - AnyConsensusState::try_from(consensus_state.consensus_state?).ok()?; + sink.query_client_consensus(at, client_id.clone(), start_height).await.ok(); + if let Some(Ok(consensus_state)) = consensus_state + .map(|x| x.consensus_state.map(AnyConsensusState::try_from)) + .flatten() + { if consensus_state.timestamp().nanoseconds() >= timestamp_to_match.nanoseconds() { - return Some(start_height) + let proof_height = source.get_proof_height(start_height).await; + if proof_height != start_height { + let has_consensus_state_with_proof = sink + .query_client_consensus(at, client_id.clone(), proof_height) + .await + .ok() + .map(|x| x.consensus_state.is_some()) + .unwrap_or_default(); + if has_consensus_state_with_proof { + // panic!("wtf1"); + return Some(start_height) + } + } else { + // panic!("wtf2"); + return Some(start_height) + } } } + // log::debug!( + // target: "hyperspace", + // "returning last_known_valid_height = {last_known_valid_height:?}" + // ); return last_known_valid_height } + // log::debug!( + // target: "hyperspace", + // "returning None" + // ); None } @@ -669,6 +872,11 @@ pub async fn query_maximum_height_for_timeout_proofs( ) .await .ok()?; + let undelivered_sequences = undelivered_sequences + .into_iter() + .rev() + .take(source.common_state().max_packets_to_process) + .collect(); let send_packets = source.query_send_packets(channel, port_id, undelivered_sequences).await.ok()?; for send_packet in send_packets { @@ -716,3 +924,175 @@ pub async fn query_maximum_height_for_timeout_proofs( } min_timeout_height } + +/// A wrapper around a type that can be either a single value or a pair of values. +#[derive(Clone)] +pub struct SingleOrPair { + inner: Either, +} + +impl SingleOrPair { + pub fn single(inner: T) -> Self { + Self { inner: Left(inner) } + } + + pub fn pair(first: T, second: T) -> Self { + Self { inner: Right((first, second)) } + } + + pub fn from_option(first: Option, second: Option) -> Option { + match (first, second) { + (Some(a), Some(b)) => Some(Self { inner: Right((a, b)) }), + (Some(a), None) => Some(Self { inner: Left(a) }), + (None, Some(b)) => Some(Self { inner: Left(b) }), + (None, None) => None, + } + } + + /// This is a function that checks if two SingleOrPair objects intersect with each other. + /// + /// If both objects are Single values, the function checks if they are + /// equal. If one object is a Single value and the other is a Pair, the function checks if the + /// Single value is equal to either value in the Pair. If both objects are Pairs, the function + /// checks if they have the same values in any order. + pub fn intersects(&self, other: &SingleOrPair) -> bool + where + T: PartialEq, + { + match (&self.inner, &other.inner) { + (Left(a), Left(b)) => a == b, + (Left(a), Right((b, c))) => a == b || a == c, + (Right((a, b)), Left(c)) => a == c || b == c, + (Right((a, b)), Right((c, d))) => (a == c) && (b == d) || (a == d) && (b == c), + } + } + + pub fn intersects_any(&self, others: &[SingleOrPair]) -> bool + where + T: PartialEq, + { + others.iter().any(|other| self.intersects(other)) + } +} + +pub fn filter_events_by_ids( + ev: &IbcEvent, + client_ids: &[SingleOrPair], + connection_ids: &[SingleOrPair], + channel_and_port_ids: &[SingleOrPair<(ChannelId, PortId)>], +) -> bool { + use ibc::core::{ + ics02_client::events::Attributes as ClientAttributes, + ics03_connection::events::Attributes as ConnectionAttributes, + ics04_channel::events::Attributes as ChannelAttributes, + }; + + let filter_packet = |packet: &Packet| { + let channel = SingleOrPair::pair( + (packet.source_channel.clone(), packet.source_port.clone()), + (packet.destination_channel.clone(), packet.destination_port.clone()), + ); + channel.intersects_any(channel_and_port_ids) + }; + let filter_client_attributes = |packet: &ClientAttributes| { + SingleOrPair::single(packet.client_id.clone()).intersects_any(client_ids) + }; + let filter_connection_attributes = |packet: &ConnectionAttributes| { + SingleOrPair::single(packet.client_id.clone()).intersects_any(client_ids) && + SingleOrPair::from_option( + packet.connection_id.clone(), + packet.counterparty_connection_id.clone(), + ) + .expect("connection id or counterparty connection id must be present") + .intersects_any(connection_ids) + }; + let filter_channel_attributes = |packet: &ChannelAttributes| { + let channel = SingleOrPair::from_option( + packet.channel_id.clone().map(|x| (x, packet.port_id.clone())), + packet + .counterparty_channel_id + .clone() + .map(|x| (x, packet.counterparty_port_id.clone())), + ) + .expect("channel id or counterparty channel id must be present"); + channel.intersects_any(channel_and_port_ids) + }; + + let v = match ev { + IbcEvent::SendPacket(e) => filter_packet(&e.packet), + IbcEvent::WriteAcknowledgement(e) => filter_packet(&e.packet), + IbcEvent::TimeoutPacket(e) => filter_packet(&e.packet), + IbcEvent::ReceivePacket(e) => filter_packet(&e.packet), + IbcEvent::AcknowledgePacket(e) => filter_packet(&e.packet), + IbcEvent::TimeoutOnClosePacket(e) => filter_packet(&e.packet), + IbcEvent::CreateClient(e) => filter_client_attributes(&e.0), + IbcEvent::UpdateClient(e) => filter_client_attributes(&e.common), + IbcEvent::UpgradeClient(e) => filter_client_attributes(&e.0), + IbcEvent::ClientMisbehaviour(e) => filter_client_attributes(&e.0), + IbcEvent::OpenInitConnection(e) => filter_connection_attributes(&e.0), + IbcEvent::OpenTryConnection(e) => filter_connection_attributes(&e.0), + IbcEvent::OpenAckConnection(e) => filter_connection_attributes(&e.0), + IbcEvent::OpenConfirmConnection(e) => filter_connection_attributes(&e.0), + IbcEvent::OpenInitChannel(e) => + filter_channel_attributes(&ChannelAttributes::from(e.clone())), + IbcEvent::OpenTryChannel(e) => + filter_channel_attributes(&ChannelAttributes::from(e.clone())), + IbcEvent::OpenAckChannel(e) => + filter_channel_attributes(&ChannelAttributes::from(e.clone())), + IbcEvent::OpenConfirmChannel(e) => + filter_channel_attributes(&ChannelAttributes::from(e.clone())), + IbcEvent::CloseInitChannel(e) => + filter_channel_attributes(&ChannelAttributes::from(e.clone())), + IbcEvent::CloseConfirmChannel(e) => + filter_channel_attributes(&ChannelAttributes::from(e.clone())), + IbcEvent::PushWasmCode(_) => true, + IbcEvent::NewBlock(_) | + IbcEvent::AppModule(_) | + IbcEvent::Empty(_) | + IbcEvent::ChainError(_) => true, + }; + if !v { + log::debug!(target: "hyperspace_parachain", "Filtered out event: {:?}", ev); + } + v +} + +pub fn filter_events( + events: impl IntoIterator, + chain_a: &A, + chain_b: &B, +) -> Vec { + events + .into_iter() + .filter(|e| { + let clients = [SingleOrPair::pair(chain_a.client_id(), chain_b.client_id())]; + let connections = iter::once(SingleOrPair::from_option( + chain_a.connection_id(), + chain_b.connection_id(), + )) + .filter_map(identity) + .collect::>(); + + let channels_a = chain_a.channel_whitelist(); + let channels_b = chain_b.channel_whitelist(); + + assert!(channels_a.len() <= 1, "Only one channel is supported for now"); + assert!(channels_b.len() <= 1, "Only one channel is supported for now"); + + let channel_a = channels_a.iter().next().cloned(); + let channel_b = channels_b.iter().next().cloned(); + let channels = iter::once(SingleOrPair::from_option(channel_a, channel_b)) + .filter_map(identity) + .collect::>(); + + let is_filtered = filter_events_by_ids(e, &clients, &connections, &channels); + if is_filtered { + let height = e.height(); + log::debug!(target: "hyperspace", "Encountered event at {height}: {:?}", e.event_type()); + } else { + log::debug!(target: "hyperspace", "Filtered out event: {:?}", e.event_type()); + } + is_filtered + }) + .collect() +} diff --git a/hyperspace/primitives/src/utils.rs b/hyperspace/primitives/src/utils.rs index 961c82cee..097c571f6 100644 --- a/hyperspace/primitives/src/utils.rs +++ b/hyperspace/primitives/src/utils.rs @@ -124,27 +124,47 @@ pub async fn create_connection( let future = chain_b .ibc_events() .await - .skip_while(|ev| future::ready(!matches!(ev, IbcEvent::OpenConfirmConnection(_)))) + .skip_while(|ev| { + future::ready(!matches!(ev, IbcEvent::OpenTryConnection(e) if + e.0.counterparty_connection_id == connection_id_a + )) + }) .take(1) .collect::>(); let mut events = timeout_future( future, - 15 * 60, - format!("Didn't see OpenConfirmConnection on {}", chain_b.name()), + 5 * 60, + format!("Didn't see OpenTryConnection on {}", chain_b.name()), ) .await; - let (connection_id_b, connection_id_a) = match events.pop() { - Some(IbcEvent::OpenConfirmConnection(conn)) => ( - conn.connection_id().unwrap().clone(), - conn.attributes() - .counterparty_connection_id - .clone() - .expect("Failed to create connection"), - ), - got => panic!("Last event should be OpenConfirmConnection: {got:?}"), + let connection_id_b = match events.pop() { + Some(IbcEvent::OpenTryConnection(conn)) => (conn.connection_id().unwrap().clone()), + got => panic!("Last event should be OpenTryConnection: {got:?}"), }; + chain_b.set_connection_id(connection_id_b.clone()); + + // wait till both chains have completed connection handshake + let future = chain_b + .ibc_events() + .await + .skip_while(|ev| { + future::ready(!matches!(ev, + IbcEvent::OpenConfirmConnection(e) if + e.0.connection_id == connection_id_b && + e.0.counterparty_connection_id == connection_id_a + )) + }) + .take(1) + .collect::>(); + + let mut _events = timeout_future( + future, + 10 * 60, + format!("Didn't see OpenConfirmConnection on {}", chain_b.name()), + ) + .await; Ok((connection_id_a, connection_id_b)) } @@ -172,30 +192,54 @@ pub async fn create_channel( let msg = Any { type_url: msg.type_url(), value: msg.encode_vec()? }; let tx_id = chain_a.submit(vec![msg]).await?; - let channel_id_a = chain_a.query_channel_id_from_tx_hash(tx_id).await?; - chain_a.add_channel_to_whitelist(channel_id_a); + let channel_and_port_id_a = chain_a.query_channel_id_from_tx_hash(tx_id).await?; + chain_a.add_channel_to_whitelist(channel_and_port_id_a.clone()); + + let (channel_id_a, port_id_a) = channel_and_port_id_a; log::info!(target: "hyperspace", "============= Wait till both chains have completed channel handshake ============="); let future = chain_b .ibc_events() .await - .skip_while(|ev| future::ready(!matches!(ev, IbcEvent::OpenConfirmChannel(_)))) + .skip_while(|ev| { + future::ready(!matches!(ev, IbcEvent::OpenTryChannel(e) if + e.counterparty_channel_id == channel_id_a && e.counterparty_port_id == port_id_a)) + }) .take(1) .collect::>(); - let mut events = timeout_future( + let mut events = + timeout_future(future, 10 * 60, format!("Didn't see OpenTryChannel on {}", chain_b.name())) + .await; + + let channel_and_port_id_b = match events.pop() { + Some(IbcEvent::OpenTryChannel(chan)) => + (chan.channel_id().unwrap().clone(), chan.port_id().clone()), + got => panic!("Last event should be OpenTryChannel: {got:?}"), + }; + chain_b.add_channel_to_whitelist(channel_and_port_id_b.clone()); + + let (channel_id_b, port_id_b) = channel_and_port_id_b; + + let future = chain_b + .ibc_events() + .await + .skip_while(|ev| { + future::ready(!matches!(ev, IbcEvent::OpenConfirmChannel(e) if + e.channel_id == channel_id_b && e.port_id == port_id_b && + e.counterparty_channel_id == channel_id_a && e.counterparty_port_id == port_id_a + )) + }) + .take(1) + .collect::>(); + + let mut _events = timeout_future( future, - 30 * 60, + 20 * 60, format!("Didn't see OpenConfirmChannel on {}", chain_b.name()), ) .await; - let (channel_id_a, channel_id_b) = match events.pop() { - Some(IbcEvent::OpenConfirmChannel(chan)) => - (chan.counterparty_channel_id.unwrap(), chan.channel_id().unwrap().clone()), - got => panic!("Last event should be OpenConfirmChannel: {got:?}"), - }; - Ok((channel_id_a, channel_id_b)) } diff --git a/hyperspace/testsuite/Cargo.toml b/hyperspace/testsuite/Cargo.toml index 89d2d20c6..7e6b521d8 100644 --- a/hyperspace/testsuite/Cargo.toml +++ b/hyperspace/testsuite/Cargo.toml @@ -44,6 +44,7 @@ light-client-common = { path = "../../light-clients/common" } grandpa-light-client = { path = "../../algorithms/grandpa/verifier", package = "grandpa-light-client-verifier" } hex = "0.4.3" rand = "0.8.5" +toml = "0.7.4" [dev-dependencies] subxt = { git = "https://github.com/paritytech/subxt", rev = "2a4da618a033bb82f768e4ef67b093b371f8b492", features = ["substrate-compat"] } diff --git a/hyperspace/testsuite/src/misbehaviour.rs b/hyperspace/testsuite/src/misbehaviour.rs index b13a9c554..353c05a74 100644 --- a/hyperspace/testsuite/src/misbehaviour.rs +++ b/hyperspace/testsuite/src/misbehaviour.rs @@ -64,7 +64,7 @@ where let finality_event = chain_b.finality_notifications().await.unwrap().next().await.expect("no event"); - let set_id = client_state.current_set_id(); + let set_id = client_state.current_set_id; // construct an extrinsic proof with the mandatory timestamp extrinsic let mut para_db = MemoryDB::::default(); @@ -126,7 +126,7 @@ where let precommit = Precommit { target_hash: header_hash, target_number: header.number }; let message = finality_grandpa::Message::Precommit(precommit.clone()); - let (update_client_msg, _, _) = chain_b + let (update_client_msg, _, _, _) = chain_b .query_latest_ibc_events(finality_event, chain_a) .await .expect("no event") @@ -153,7 +153,7 @@ where .iter() .map(|id| { let key = id.pair(); - let encoded = sp_finality_grandpa::localized_payload(round, *set_id, &message); + let encoded = sp_finality_grandpa::localized_payload(round, set_id, &message); let signature = AuthoritySignature::from(key.sign(&encoded)); SignedPrecommit { precommit: precommit.clone(), diff --git a/hyperspace/testsuite/tests/parachain_cosmos.rs b/hyperspace/testsuite/tests/parachain_cosmos.rs index 4967fa05a..93f947342 100644 --- a/hyperspace/testsuite/tests/parachain_cosmos.rs +++ b/hyperspace/testsuite/tests/parachain_cosmos.rs @@ -17,11 +17,12 @@ use futures::StreamExt; use hyperspace_core::{ chain::{AnyAssetId, AnyChain, AnyConfig}, logging, + packets::utils::get_key_path, substrate::DefaultConfig, }; use hyperspace_cosmos::client::{ConfigKeyEntry, CosmosClient, CosmosClientConfig}; use hyperspace_parachain::{finality_protocol::FinalityProtocol, ParachainClientConfig}; -use hyperspace_primitives::{utils::create_clients, IbcProvider}; +use hyperspace_primitives::{utils::create_clients, CommonClientConfig, IbcProvider}; use hyperspace_testsuite::{ ibc_channel_close, ibc_messaging_packet_height_timeout_with_connection_delay, ibc_messaging_packet_timeout_on_channel_close, @@ -29,7 +30,10 @@ use hyperspace_testsuite::{ ibc_messaging_with_connection_delay, misbehaviour::ibc_messaging_submit_misbehaviour, setup_connection_and_channel, }; -use ibc::core::ics24_host::identifier::PortId; +use ibc::{ + core::{ics23_commitment::commitment::CommitmentPrefix, ics24_host::identifier::PortId}, + Height, +}; use sp_core::hashing::sha2_256; #[derive(Debug, Clone)] @@ -108,6 +112,7 @@ async fn setup_clients() -> (AnyChain, AnyChain) { .to_string(), wasm_code_id: None, channel_whitelist: vec![], + common: CommonClientConfig { skip_optional_client_updates: true }, }; let chain_b = CosmosClient::::new(config_b.clone()).await.unwrap(); diff --git a/hyperspace/testsuite/tests/parachain_parachain.rs b/hyperspace/testsuite/tests/parachain_parachain.rs index ab5613e84..97b287bf5 100644 --- a/hyperspace/testsuite/tests/parachain_parachain.rs +++ b/hyperspace/testsuite/tests/parachain_parachain.rs @@ -131,6 +131,7 @@ async fn setup_clients() -> (ParachainClient, ParachainClient MerkleProof { Some(Proof::Exist(existence_proof)) => { subroot = calculate_existence_root::(existence_proof) .map_err(|_| Error::invalid_merkle_proof())?; + if !verify_membership::(proof, spec, &subroot, key.as_bytes(), &value) { return Err(Error::verification_failure()) } diff --git a/ibc/modules/src/events.rs b/ibc/modules/src/events.rs index a798f3f93..cdf83a302 100644 --- a/ibc/modules/src/events.rs +++ b/ibc/modules/src/events.rs @@ -371,7 +371,7 @@ impl IbcEvent { IbcEvent::AcknowledgePacket(ev) => ev.height(), IbcEvent::TimeoutPacket(ev) => ev.height(), IbcEvent::TimeoutOnClosePacket(ev) => ev.height(), - _ => unimplemented!(), + e => unimplemented!("can't get height for {e:?}"), } } @@ -398,7 +398,7 @@ impl IbcEvent { IbcEvent::AcknowledgePacket(ev) => ev.set_height(height), IbcEvent::TimeoutPacket(ev) => ev.set_height(height), IbcEvent::PushWasmCode(_ev) => (), - _ => unimplemented!(), + _ => (), } } diff --git a/ibc/modules/src/mock/client_state.rs b/ibc/modules/src/mock/client_state.rs index f727dbe3e..0e9d98c8b 100644 --- a/ibc/modules/src/mock/client_state.rs +++ b/ibc/modules/src/mock/client_state.rs @@ -228,11 +228,7 @@ where type Error = Error; fn try_from(value: ConsensusStateWithHeight) -> Result { - let state = value - .consensus_state - .map(C::AnyConsensusState::try_from) - .transpose()? - .ok_or_else(Error::empty_consensus_state_response)?; + let state = value.consensus_state.map(C::AnyConsensusState::try_from).unwrap().unwrap(); Ok(AnyConsensusStateWithHeight { height: value.height.ok_or_else(Error::missing_height)?.into(), diff --git a/light-clients/common/src/config.rs b/light-clients/common/src/config.rs index 3a13771c3..b5c0b31f0 100644 --- a/light-clients/common/src/config.rs +++ b/light-clients/common/src/config.rs @@ -194,13 +194,14 @@ pub trait RuntimeTransactions { type SendPingParams; type TransferParams; + type MemoMessage; fn ibc_deliver(messages: Vec) -> Payload; fn ibc_transfer( params: Self::TransferParams, asset_id: u128, amount: u128, - memo: Option<()>, + memo: Option, ) -> Payload; fn sudo_sudo(call: Self::ParaRuntimeCall) -> Payload; fn ibc_ping_send_ping(params: Self::SendPingParams) -> Payload; diff --git a/light-clients/ics07-tendermint/Cargo.toml b/light-clients/ics07-tendermint/Cargo.toml index 7840c38ae..4dbb31c41 100644 --- a/light-clients/ics07-tendermint/Cargo.toml +++ b/light-clients/ics07-tendermint/Cargo.toml @@ -27,6 +27,8 @@ tendermint = { git = "https://github.com/informalsystems/tendermint-rs", rev = " tendermint-proto = { git = "https://github.com/informalsystems/tendermint-rs", rev = "e81f7bf23d63ffbcd242381d1ce5e35da3515ff1", default-features = false } tendermint-light-client-verifier = { git = "https://github.com/informalsystems/tendermint-rs", rev = "e81f7bf23d63ffbcd242381d1ce5e35da3515ff1", default-features = false } sha2 = { version = "0.10", optional = true, default-features = false } +hex = { version = "0.4.3", default-features = false } +log = { version = "0.4", default-features = false } [dev-dependencies] ibc = { path = "../../ibc/modules", features = ["mocks"] } diff --git a/light-clients/ics10-grandpa-cw/src/context.rs b/light-clients/ics10-grandpa-cw/src/context.rs index 6a7ebe4a8..523c0a982 100644 --- a/light-clients/ics10-grandpa-cw/src/context.rs +++ b/light-clients/ics10-grandpa-cw/src/context.rs @@ -14,7 +14,10 @@ // limitations under the License. use crate::{ - contract::{GRANDPA_HEADER_HASHES_SET_STORAGE, GRANDPA_HEADER_HASHES_STORAGE}, + contract::{ + GRANDPA_BLOCK_HASHES_CACHE_SIZE, GRANDPA_HEADER_HASHES_SET_STORAGE, + GRANDPA_HEADER_HASHES_STORAGE, + }, ics23::{ClientStates, ConsensusStates, ReadonlyClientStates, ReadonlyConsensusStates}, ContractError, }; @@ -22,12 +25,10 @@ use cosmwasm_std::{DepsMut, Env, Storage}; use grandpa_light_client_primitives::HostFunctions; use ibc::{core::ics26_routing::context::ReaderContext, Height}; use ics10_grandpa::{ - client_message::RelayChainHeader, - client_state::{ClientState, HEADER_ITEM_LIFETIME, HEADER_ITEM_MIN_COUNT}, - consensus_state::ConsensusState, + client_message::RelayChainHeader, client_state::ClientState, consensus_state::ConsensusState, }; use sp_core::H256; -use std::{convert::identity, fmt, fmt::Debug, marker::PhantomData}; +use std::{fmt, fmt::Debug, marker::PhantomData}; pub struct Context<'a, H> { pub deps: DepsMut<'a>, @@ -72,38 +73,37 @@ impl<'a, H> Context<'a, H> { self.deps.storage } - pub fn insert_relay_header_hashes(&mut self, now_ms: u64, headers: &[H256]) { + pub fn insert_relay_header_hashes(&mut self, headers: &[H256]) { if headers.is_empty() { return } - let mut hashes = GRANDPA_HEADER_HASHES_STORAGE.load(self.storage()).unwrap_or_default(); - hashes.reserve(headers.len()); + let mut xs = GRANDPA_HEADER_HASHES_STORAGE.load(self.storage()).unwrap_or_default(); + xs.reserve(headers.len()); for header in headers { - hashes.push((now_ms, *header)); + xs.push(*header); let _ = GRANDPA_HEADER_HASHES_SET_STORAGE .save(self.storage_mut(), header.0.to_vec(), &()) .map_err(|e| { self.log(&format!("error saving hash to set: {:?}", e)); }); } - let expired = now_ms.saturating_sub(HEADER_ITEM_LIFETIME.as_millis() as u64); - let key = hashes.binary_search_by_key(&expired, |(t, _)| *t).unwrap_or_else(identity); - let len = hashes.len(); - let remove_up_to_index = key.min(len.saturating_sub(HEADER_ITEM_MIN_COUNT)); - if remove_up_to_index < len { - let drained = hashes.drain(..remove_up_to_index).map(|(_, hash)| hash); + if xs.len() > GRANDPA_BLOCK_HASHES_CACHE_SIZE { + let drained = xs.drain(0..xs.len() - GRANDPA_BLOCK_HASHES_CACHE_SIZE); for hash in drained { GRANDPA_HEADER_HASHES_SET_STORAGE.remove(self.storage_mut(), hash.0.to_vec()); } } GRANDPA_HEADER_HASHES_STORAGE - .save(self.storage_mut(), &hashes) + .save(self.storage_mut(), &xs) .expect("error saving header hashes"); } pub fn contains_relay_header_hash(&self, hash: H256) -> bool { - GRANDPA_HEADER_HASHES_SET_STORAGE.has(self.storage(), hash.0.to_vec()) + GRANDPA_HEADER_HASHES_STORAGE + .load(self.storage()) + .unwrap_or_default() + .contains(&hash) } } diff --git a/light-clients/ics10-grandpa-cw/src/contract.rs b/light-clients/ics10-grandpa-cw/src/contract.rs index 3900ccb14..673a3db14 100644 --- a/light-clients/ics10-grandpa-cw/src/contract.rs +++ b/light-clients/ics10-grandpa-cw/src/contract.rs @@ -72,12 +72,11 @@ pub const CLIENT_COUNTER: Item = Item::new("client_counter"); pub const HOST_CONSENSUS_STATE: Map = Map::new("host_consensus_state"); pub const CONSENSUS_STATES_HEIGHTS: Map> = Map::new("consensus_states_heights"); -pub const GRANDPA_HEADER_HASHES_STORAGE: Item> = - Item::new("grandpa_header_hashes"); +pub const GRANDPA_HEADER_HASHES_STORAGE: Item> = Item::new("grandpa_header_hashes"); pub const GRANDPA_HEADER_HASHES_SET_STORAGE: Map, ()> = Map::new("grandpa_header_hashes_set"); -pub const GRANDPA_BLOCK_HASHES_CACHE_SIZE: usize = 5000; +pub const GRANDPA_BLOCK_HASHES_CACHE_SIZE: usize = 500; #[derive(Clone, Copy, Debug, PartialEq, Default, Eq)] pub struct HostFunctions; @@ -105,7 +104,7 @@ impl grandpa_light_client_primitives::HostFunctions for HostFunctions { pub_key.verify(&sig, msg).is_ok() } - fn insert_relay_header_hashes(_now_ms: u64, _headers: &[::Hash]) { + fn insert_relay_header_hashes(_headers: &[::Hash]) { // implementation of this method is in `Context` } @@ -262,9 +261,7 @@ fn process_message( .update_state(ctx, client_id.clone(), client_state, msg.client_message) .map_err(|e| ContractError::Grandpa(e.to_string())) .and_then(|(cs, cu)| { - let now = ctx.host_timestamp(); - let now_ms = now.nanoseconds() / 1_000_000; - ctx.insert_relay_header_hashes(now_ms, &finalized_headers); + ctx.insert_relay_header_hashes(&finalized_headers); store_client_and_consensus_states(ctx, client_id.clone(), cs, cu) }) }, @@ -287,8 +284,9 @@ fn process_message( old_client_state.latest_para_height = substitute_client_state.latest_para_height; old_client_state.latest_relay_height = substitute_client_state.latest_relay_height; old_client_state.frozen_height = substitute_client_state.frozen_height; - old_client_state.authorities_changes = - substitute_client_state.authorities_changes.clone(); + old_client_state.current_authorities = + substitute_client_state.current_authorities.clone(); + old_client_state.current_set_id = substitute_client_state.current_set_id; if old_client_state != substitute_client_state { return Err(ContractError::Grandpa( diff --git a/light-clients/ics10-grandpa/Cargo.toml b/light-clients/ics10-grandpa/Cargo.toml index e07d2135a..78e73d5fb 100644 --- a/light-clients/ics10-grandpa/Cargo.toml +++ b/light-clients/ics10-grandpa/Cargo.toml @@ -45,7 +45,6 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features = anyhow = { version = "1.0.65", default-features = false } derive_more = { version = "0.99.17", default-features = false, features = ["from"] } serde = { version = "1.0.144", default-features = false, features = ["derive"] } -vec1 = { version = "1.10.1", default-features = false } # substrate deps sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39", default-features = false } diff --git a/light-clients/ics10-grandpa/src/client_def.rs b/light-clients/ics10-grandpa/src/client_def.rs index a0bd82309..f72ae3d7b 100644 --- a/light-clients/ics10-grandpa/src/client_def.rs +++ b/light-clients/ics10-grandpa/src/client_def.rs @@ -18,15 +18,10 @@ use ibc::core::ics02_client::{ client_consensus::ConsensusState as _, client_state::ClientState as _, }; -use crate::{ - client_message::{ClientMessage, RelayChainHeader}, - client_state::{ - AuthoritiesChange, AUTHORITIES_CHANGE_ITEM_LIFETIME, AUTHORITIES_CHANGE_ITEM_MIN_COUNT, - }, -}; +use crate::client_message::{ClientMessage, RelayChainHeader}; use alloc::{format, string::ToString, vec, vec::Vec}; use codec::Decode; -use core::{convert::identity, marker::PhantomData}; +use core::marker::PhantomData; use finality_grandpa::Chain; use grandpa_client_primitives::{ justification::{ @@ -56,7 +51,6 @@ use ibc::{ }, ics26_routing::context::ReaderContext, }, - timestamp::Expiry, Height, }; use light_client_common::{ @@ -66,7 +60,6 @@ use sp_core::H256; use sp_runtime::traits::Header; use sp_trie::StorageProof; use tendermint_proto::Protobuf; -use vec1::Vec1; const CLIENT_STATE_UPGRADE_PATH: &[u8] = b"client-state-upgrade-path"; const CONSENSUS_STATE_UPGRADE_PATH: &[u8] = b"consensus-state-upgrade-path"; @@ -147,7 +140,7 @@ where first_proof.unknown_headers.iter().min_by_key(|h| *h.number()).ok_or_else( || Error::Custom("Unknown headers can't be empty!".to_string()), )?; - let first_finalized = first_headers + first_headers .ancestry(first_base.hash(), first_target.hash()) .map_err(|_| Error::Custom("Invalid ancestry!".to_string()))?; @@ -155,7 +148,7 @@ where second_proof.unknown_headers.iter().min_by_key(|h| *h.number()).ok_or_else( || Error::Custom("Unknown headers can't be empty!".to_string()), )?; - let second_finalized = second_headers + second_headers .ancestry(second_base.hash(), second_target.hash()) .map_err(|_| Error::Custom("Invalid ancestry!".to_string()))?; @@ -169,12 +162,6 @@ where .into()) } - let chain_diverges = - first_finalized.iter().zip(&second_finalized).any(|(a, b)| a != b); - if !chain_diverges { - return Err(Error::Custom("Chains should diverge".into()).into()) - } - // TODO: should we handle genesis block here somehow? if !H::contains_relay_header_hash(first_parent) { Err(Error::Custom( @@ -200,50 +187,18 @@ where ))? } - // we don't know which of the number is canonical, so we will try to verify both - // if the two bases are not equal - let base_numbers = if first_base.number == second_base.number { - vec![first_base.number] - } else { - vec![first_base.number, second_base.number] - }; - for base_number in base_numbers { - // we can't trust block numbers, because they may be changed arbitrary - let first_height = base_number + first_finalized.len() as u32 - 1; - let second_height = base_number + second_finalized.len() as u32 - 1; - - let get_authorities = |height| { - let key = client_state - .authorities_changes - .binary_search_by_key(&height, |x| x.height) - .unwrap_or_else(identity); - client_state - .authorities_changes - .get(key) - .map(|change| (change.set_id, &change.authorities)) - .unwrap_or_else(|| { - let change = client_state.authorities_changes.last(); - (change.set_id, &change.authorities) - }) - }; - let (first_set_id, first_current_authorities) = get_authorities(first_height); - let (second_set_id, second_current_authorities) = - get_authorities(second_height); - - let first_valid = first_justification - .verify::(first_set_id, first_current_authorities) - .is_ok(); - let second_valid = second_justification - .verify::(second_set_id, second_current_authorities) - .is_ok(); - - // whoops equivocation is valid. - if first_valid && second_valid { - return Ok(()) - } + let first_valid = first_justification + .verify::(client_state.current_set_id, &client_state.current_authorities) + .is_ok(); + let second_valid = second_justification + .verify::(client_state.current_set_id, &client_state.current_authorities) + .is_ok(); + + if !first_valid || !second_valid { + Err(Error::Custom("Invalid justification".to_string()))? } - return Err(Error::Custom("Invalid justification".to_string()).into()) + // whoops equivocation is valid. }, } @@ -272,7 +227,6 @@ where let finalized = ancestry .ancestry(from, header.finality_proof.block) .map_err(|_| Error::Custom(format!("[update_state] Invalid ancestry!")))?; - let mut finalized_sorted = finalized.clone(); finalized_sorted.sort(); @@ -308,16 +262,6 @@ where .header(&header.finality_proof.block) .expect("target header has already been checked in verify_client_message; qed"); - // check that the block number is correct, because it will be used later for - // finding the authorities set - let expected_target_height = client_state.latest_relay_height + finalized.len() as u32 - 1; - if expected_target_height != target.number { - return Err(Error::Custom(format!( - "[update_state] unexpected block number: {expected_target_height} != {}", - target.number - )))? - } - // can't try to rewind relay chain if target.number <= client_state.latest_relay_height { Err(Ics02Error::implementation_specific(format!( @@ -349,43 +293,12 @@ where client_state.latest_relay_height = target.number; if let Some(scheduled_change) = find_scheduled_change(target) { - let now = ctx.host_timestamp(); - let len = client_state.authorities_changes.len(); - let next_set_id = client_state.last_set_id() + 1; - let mut xs = client_state - .authorities_changes - .into_iter() - .enumerate() - .filter(|(i, x)| { - // we keep at least AUTHORITIES_CHANGE_ITEM_MIN_COUNT changes - if len - i < AUTHORITIES_CHANGE_ITEM_MIN_COUNT { - return true - } - // prune expired changes - !matches!( - now.check_expiry( - &(x.timestamp + AUTHORITIES_CHANGE_ITEM_LIFETIME).unwrap() - ), - Expiry::Expired - ) - }) - .map(|(_, x)| x) - .collect::>(); - xs.push(AuthoritiesChange { - height: target.number + scheduled_change.delay + 1, /* we start using the set id - * at the next block + delay */ - timestamp: now, - set_id: next_set_id, - authorities: scheduled_change.next_authorities, - }); - xs.sort_by_key(|change| change.height); - client_state.authorities_changes = - Vec1::try_from_vec(xs).expect("we've just added one item to the vector above; qed"); + client_state.current_set_id += 1; + client_state.current_authorities = scheduled_change.next_authorities; } - let now = ctx.host_timestamp(); - let now_ms = now.nanoseconds() / 1_000_000; - H::insert_relay_header_hashes(now_ms, &finalized); + H::insert_relay_header_hashes(&finalized); + Ok((client_state, ConsensusUpdateResult::Batch(consensus_states))) } diff --git a/light-clients/ics10-grandpa/src/client_state.rs b/light-clients/ics10-grandpa/src/client_state.rs index 4172e4d67..27e4ca62a 100644 --- a/light-clients/ics10-grandpa/src/client_state.rs +++ b/light-clients/ics10-grandpa/src/client_state.rs @@ -13,20 +13,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -#![allow(deprecated)] - use crate::{ client_def::GrandpaClient, client_message::RelayChainHeader, error::Error, - proto::{ - Authority as RawAuthority, AuthorityChange as RawAuthorityChange, - ClientState as RawClientState, - }, + proto::{Authority as RawAuthority, ClientState as RawClientState}, }; use alloc::{format, string::ToString, vec::Vec}; use anyhow::anyhow; -use core::{convert::identity, fmt::Debug, marker::PhantomData, time::Duration}; +use core::{marker::PhantomData, time::Duration}; use ibc::{ core::{ ics02_client::{ @@ -36,60 +31,20 @@ use ibc::{ ics24_host::identifier::{ChainId, ClientId}, ics26_routing::context::ReaderContext, }, - timestamp::Timestamp, Height, }; use ibc_proto::google::protobuf::Any; use light_client_common::RelayChain; use serde::{Deserialize, Serialize}; use sp_core::{ed25519::Public, H256}; -use sp_finality_grandpa::{AuthorityList, SetId}; -use tendermint::Time; +use sp_finality_grandpa::AuthorityList; use tendermint_proto::Protobuf; -use vec1::Vec1; /// Protobuf type url for GRANDPA ClientState pub const GRANDPA_CLIENT_STATE_TYPE_URL: &str = "/ibc.lightclients.grandpa.v1.ClientState"; -/// Maximum time to keep a block number to block hash mapping (if number of items is greater than -/// HEADER_ITEM_MIN_COUNT). -pub const HEADER_ITEM_LIFETIME: Duration = Duration::from_secs(1 * 60 * 60); -/// Minimum (if possible) number of block number to block hash mappings to keep (oldest pruned -/// first). -pub const HEADER_ITEM_MIN_COUNT: usize = 500; -pub const SESSION_LENGTH: Duration = Duration::from_secs(6 * 60 * 60); -/// Maximum time to keep a an authority set change (if number of items is greater than -/// AUTHORITIES_CHANGE_ITEM_MIN_COUNT). -pub const AUTHORITIES_CHANGE_ITEM_LIFETIME: Duration = - Duration::from_secs(3 * SESSION_LENGTH.as_secs()); -/// Minimum (if possible) number of authority set changes to keep (oldest pruned first). -pub const AUTHORITIES_CHANGE_ITEM_MIN_COUNT: usize = 10; - -#[derive(PartialEq, Clone, Debug, Default, Eq)] -pub struct AuthoritiesChange { - /// Block height at which the authorities set starts to be active. - pub height: u32, - /// When the change was scheduled. - pub timestamp: Timestamp, - /// Id of the new authority set. - pub set_id: SetId, - /// New authorities. - pub authorities: AuthorityList, -} - -impl AuthoritiesChange { - pub fn new( - height: u32, - timestamp: Timestamp, - set_id: SetId, - authorities: AuthorityList, - ) -> Self { - Self { height, timestamp, set_id, authorities } - } -} - #[derive(PartialEq, Clone, Debug, Default, Eq)] -pub struct ClientStateV1 { +pub struct ClientState { /// Relay chain pub relay_chain: RelayChain, // Latest relay chain height @@ -104,62 +59,17 @@ pub struct ClientStateV1 { pub para_id: u32, /// Id of the current authority set. pub current_set_id: u64, - /// Authorities for the current round. + /// authorities for the current round pub current_authorities: AuthorityList, - pub _phantom: PhantomData, -} - -#[derive(PartialEq, Clone, Debug, Default, Eq)] -pub struct ClientStateV2 { - /// Relay chain - pub relay_chain: RelayChain, - // Latest relay chain height - pub latest_relay_height: u32, - /// Latest relay chain block hash - pub latest_relay_hash: H256, - /// Block height when the client was frozen due to a misbehaviour - pub frozen_height: Option, - /// latest parachain height - pub latest_para_height: u32, - /// ParaId of associated parachain - pub para_id: u32, - // Id of the current authority set. - // pub current_set_id: u64, - /// Authorities changes history. More than one authorities change is needed to - /// properly verify misbehaviour. - pub authorities_changes: Vec1, /// phantom type. pub _phantom: PhantomData, } -pub type ClientState = ClientStateV2; - -impl From> for ClientStateV2 { - fn from(value: ClientStateV1) -> Self { - ClientStateV2 { - relay_chain: value.relay_chain, - latest_relay_height: value.latest_relay_height, - latest_relay_hash: value.latest_relay_hash, - frozen_height: value.frozen_height, - latest_para_height: value.latest_para_height, - para_id: value.para_id, - // current_set_id: value.current_set_id, - authorities_changes: Vec1::new(AuthoritiesChange { - height: 0, - timestamp: Timestamp::from_nanoseconds(1).unwrap(), - set_id: value.current_set_id, - authorities: value.current_authorities, - }), - _phantom: Default::default(), - } - } -} - -impl From> for grandpa_client_primitives::ClientState { +impl From> for grandpa_client_primitives::ClientState { fn from(client_state: ClientState) -> grandpa_client_primitives::ClientState { grandpa_client_primitives::ClientState { - current_authorities: client_state.current_authorities().clone(), - current_set_id: *client_state.current_set_id(), + current_authorities: client_state.current_authorities, + current_set_id: client_state.current_set_id, latest_relay_hash: client_state.latest_relay_hash, latest_relay_height: client_state.latest_relay_height, latest_para_height: client_state.latest_para_height, @@ -170,8 +80,6 @@ impl From> for grandpa_client_primitives::ClientState { impl Protobuf for ClientState {} -impl Protobuf for ClientStateV1 {} - #[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] pub struct UpgradeOptions { latest_relay_hash: H256, @@ -200,32 +108,6 @@ impl ClientState { value: self.encode_vec().unwrap(), } } - - pub fn current_authorities(&self) -> &AuthorityList { - let key = self - .authorities_changes - .binary_search_by_key(&self.latest_relay_height, |x| x.height) - .unwrap_or_else(identity); - match self.authorities_changes.get(key) { - Some(change) => &change.authorities, - _ => &self.authorities_changes.last().authorities, - } - } - - pub fn current_set_id(&self) -> &SetId { - let key = self - .authorities_changes - .binary_search_by_key(&self.latest_relay_height, |x| x.height) - .unwrap_or_else(identity); - match self.authorities_changes.get(key) { - Some(change) => &change.set_id, - _ => &self.authorities_changes.last().set_id, - } - } - - pub fn last_set_id(&self) -> &SetId { - &self.authorities_changes.last().set_id - } } impl ClientState { @@ -349,37 +231,6 @@ where impl TryFrom for ClientState { type Error = Error; - fn try_from(raw: RawClientState) -> Result { - let relay_chain = RelayChain::from_i32(raw.relay_chain)?; - if raw.latest_relay_hash.len() != 32 { - Err(anyhow!("Invalid ed25519 public key lenght: {}", raw.latest_relay_hash.len()))? - } - let mut fixed_bytes = [0u8; 32]; - fixed_bytes.copy_from_slice(&*raw.latest_relay_hash); - let latest_relay_hash = H256::from(fixed_bytes); - - Ok(Self { - frozen_height: raw.frozen_height.map(|height| Height::new(raw.para_id.into(), height)), - relay_chain, - latest_para_height: raw.latest_para_height, - para_id: raw.para_id, - authorities_changes: Vec1::try_from( - raw.authorities_changes - .into_iter() - .map(TryInto::try_into) - .collect::, _>>()?, - ) - .map_err(|e| Error::Custom(e.to_string()))?, - latest_relay_hash, - latest_relay_height: raw.latest_relay_height, - _phantom: Default::default(), - }) - } -} - -impl TryFrom for ClientStateV1 { - type Error = Error; - fn try_from(raw: RawClientState) -> Result { let current_authorities = raw .current_authorities @@ -415,28 +266,6 @@ impl TryFrom for ClientStateV1 { impl From> for RawClientState { fn from(client_state: ClientState) -> Self { - RawClientState { - latest_relay_height: client_state.latest_relay_height, - latest_relay_hash: client_state.latest_relay_hash.as_bytes().to_vec(), - current_set_id: client_state.authorities_changes.last().set_id, - frozen_height: client_state - .frozen_height - .map(|frozen_height| frozen_height.revision_height), - relay_chain: client_state.relay_chain as i32, - para_id: client_state.para_id, - latest_para_height: client_state.latest_para_height, - current_authorities: Vec::new(), - authorities_changes: client_state - .authorities_changes - .into_iter() - .map(Into::into) - .collect(), - } - } -} - -impl From> for RawClientState { - fn from(client_state: ClientStateV1) -> Self { RawClientState { latest_relay_height: client_state.latest_relay_height, latest_relay_hash: client_state.latest_relay_hash.as_bytes().to_vec(), @@ -456,58 +285,6 @@ impl From> for RawClientState { weight, }) .collect(), - authorities_changes: Vec::new(), } } } - -impl From for RawAuthorityChange { - fn from(change: AuthoritiesChange) -> Self { - let authorities = change - .authorities - .into_iter() - .map(|(id, weight)| RawAuthority { - public_key: >::as_ref(&id).to_vec(), - weight, - }) - .collect(); - let tendermint_proto::google::protobuf::Timestamp { seconds, nanos } = - change.timestamp.into_tm_time().expect("shouldn't fail").into(); - let timestamp = prost_types::Timestamp { seconds, nanos }; - Self { - timestamp: Some(timestamp), - height: change.height, - set_id: change.set_id, - authorities, - } - } -} - -impl TryFrom for AuthoritiesChange { - type Error = Error; - - fn try_from(raw: RawAuthorityChange) -> Result { - let authorities = raw - .authorities - .into_iter() - .map(|authority| { - let id = Public::try_from(&*authority.public_key) - .map_err(|_| anyhow!("Invalid ed25519 public key"))?; - Ok((id.into(), authority.weight)) - }) - .collect::>()?; - let prost_types::Timestamp { seconds, nanos } = - raw.timestamp.ok_or_else(|| Error::Custom(format!("missing timestamp")))?; - let proto_timestamp = tendermint_proto::google::protobuf::Timestamp { seconds, nanos }; - let timestamp: Time = proto_timestamp - .try_into() - .map_err(|e| Error::Custom(format!("invalid timestamp {e}")))?; - - Ok(AuthoritiesChange { - height: raw.height, - timestamp: Timestamp::from(timestamp), - set_id: raw.set_id, - authorities, - }) - } -} diff --git a/light-clients/ics10-grandpa/src/lib.rs b/light-clients/ics10-grandpa/src/lib.rs index a92c742ba..d22a3367c 100644 --- a/light-clients/ics10-grandpa/src/lib.rs +++ b/light-clients/ics10-grandpa/src/lib.rs @@ -19,7 +19,6 @@ //! ICS-10: Grandpa IBC light client protocol implementation extern crate alloc; -extern crate core; pub mod client_def; pub mod client_message; diff --git a/light-clients/ics10-grandpa/src/mock.rs b/light-clients/ics10-grandpa/src/mock.rs index 568509a9a..d376b7a50 100644 --- a/light-clients/ics10-grandpa/src/mock.rs +++ b/light-clients/ics10-grandpa/src/mock.rs @@ -66,7 +66,7 @@ impl grandpa_client_primitives::HostFunctions for HostFunctionsManager { pub_key.verify(&msg, sig) } - fn insert_relay_header_hashes(_now_ms: u64, headers: &[::Hash]) { + fn insert_relay_header_hashes(headers: &[::Hash]) { HEADER_HASHES.with(|set| { let mut set_mut = set.borrow_mut(); for hash in headers { diff --git a/light-clients/ics10-grandpa/src/proto/grandpa.proto b/light-clients/ics10-grandpa/src/proto/grandpa.proto index 52fe6be6d..3c4cf7a9c 100644 --- a/light-clients/ics10-grandpa/src/proto/grandpa.proto +++ b/light-clients/ics10-grandpa/src/proto/grandpa.proto @@ -32,16 +32,6 @@ message Authority { uint64 weight = 2; } -message AuthorityChange { - // Block height at which the authority set is started to be active - uint32 height = 1; - google.protobuf.Timestamp timestamp = 2; - // new authority set id - uint64 set_id = 3; - // new authority set - repeated Authority authorities = 4; -} - // ClientState for the grandpa client message ClientState { // Latest relay chain block hash @@ -51,8 +41,7 @@ message ClientState { uint32 latest_relay_height = 2; // current grandpa authority set id - // DEPRECATED: use `authorities_changes` instead - uint64 current_set_id = 3 [deprecated = true]; + uint64 current_set_id = 3; // Block height when the client was frozen due to a misbehaviour optional uint64 frozen_height = 4; @@ -67,11 +56,7 @@ message ClientState { uint32 latest_para_height = 7; // Current grandpa authorities - // DEPRECATED: use `authorities_changes` instead - repeated Authority current_authorities = 8 [deprecated = true]; - - // Current grandpa authorities - repeated AuthorityChange authorities_changes = 9; + repeated Authority current_authorities = 8; } message ParachainHeaderWithRelayHash { diff --git a/light-clients/ics10-grandpa/src/tests.rs b/light-clients/ics10-grandpa/src/tests.rs index b69b872d6..ee8d9ca13 100644 --- a/light-clients/ics10-grandpa/src/tests.rs +++ b/light-clients/ics10-grandpa/src/tests.rs @@ -15,7 +15,7 @@ use crate::{ client_message::{ClientMessage, Header, RelayChainHeader}, - client_state::{AuthoritiesChange, ClientState}, + client_state::ClientState, consensus_state::ConsensusState, mock::{ AnyClientMessage, AnyClientState, AnyConsensusState, HostFunctionsManager, MockClientTypes, @@ -49,14 +49,12 @@ use ibc::{ handler::HandlerOutput, mock::{context::MockContext, host::MockHostType}, test_utils::get_dummy_account_id, - timestamp::Timestamp, Height, }; use light_client_common::config::RuntimeStorage; use sp_core::{hexdisplay::AsBytesRef, H256}; use std::time::Duration; use subxt::config::substrate::{BlakeTwo256, SubstrateHeader}; -use vec1::Vec1; #[tokio::test] async fn test_continuous_update_of_grandpa_client() { @@ -148,13 +146,9 @@ async fn test_continuous_update_of_grandpa_client() { frozen_height: None, latest_para_height: decoded_para_head.number, para_id: prover.para_id, + current_set_id: client_state.current_set_id, + current_authorities: client_state.current_authorities, _phantom: Default::default(), - authorities_changes: Vec1::new(AuthoritiesChange::new( - latest_relay_header.number, - Timestamp::from_nanoseconds(1).unwrap(), - client_state.current_set_id, - client_state.current_authorities, - )), }; let subxt_block_number: subxt::rpc::types::BlockNumber = decoded_para_head.number.into(); let block_hash = @@ -258,7 +252,7 @@ async fn test_continuous_update_of_grandpa_client() { let proof = ParachainHeadersWithFinalityProof::::decode(&mut &*proof).unwrap(); println!("========= New Justification ========="); - println!("current_set_id: {}", client_state.current_set_id()); + println!("current_set_id: {}", client_state.current_set_id); println!( "For relay chain header: Hash({:?}), Number({})", justification.commit.target_hash, justification.commit.target_number diff --git a/utils/subxt/codegen/bin/main.rs b/utils/subxt/codegen/bin/main.rs index 5b8b1ab4f..119a896d5 100644 --- a/utils/subxt/codegen/bin/main.rs +++ b/utils/subxt/codegen/bin/main.rs @@ -60,8 +60,8 @@ async fn main() -> Result<(), anyhow::Error> { cli.para_host = format!("ws://{}", cli.para_host); } let runtimes = [ - (format!("{}:{}", cli.relay_host, cli.relay_port), "relaychain"), - (format!("{}:{}", cli.para_host, cli.para_port), "parachain"), + (format!("{}", cli.relay_host), "relaychain"), + (format!("{}", cli.para_host), "parachain"), ]; for (url, runtime) in runtimes { diff --git a/utils/subxt/generated/src/picasso_kusama/parachain.rs b/utils/subxt/generated/src/picasso_kusama/parachain.rs index 3d9eb5396..99f66fe4c 100644 --- a/utils/subxt/generated/src/picasso_kusama/parachain.rs +++ b/utils/subxt/generated/src/picasso_kusama/parachain.rs @@ -5,11 +5,10 @@ pub mod api { mod root_mod { pub use super::*; } - pub static PALLETS: [&str; 49usize] = [ + pub static PALLETS: [&str; 50usize] = [ "System", "Timestamp", "Sudo", - "RandomnessCollectiveFlip", "TransactionPayment", "AssetTxPayment", "Indices", @@ -44,7 +43,6 @@ pub mod api { "Tokens", "CurrencyFactory", "GovernanceRegistry", - "Assets", "CrowdloanRewards", "Vesting", "BondedFinance", @@ -52,7 +50,10 @@ pub mod api { "Pablo", "Oracle", "AssetsTransactorRouter", + "FarmingRewards", + "Farming", "CallFilter", + "Cosmwasm", "Ibc", "Ics20Fee", ]; @@ -130,20 +131,26 @@ pub mod api { CurrencyFactory(currency_factory::Event), #[codec(index = 54)] GovernanceRegistry(governance_registry::Event), - #[codec(index = 56)] + #[codec(index = 55)] CrowdloanRewards(crowdloan_rewards::Event), - #[codec(index = 57)] + #[codec(index = 56)] Vesting(vesting::Event), - #[codec(index = 58)] + #[codec(index = 57)] BondedFinance(bonded_finance::Event), - #[codec(index = 59)] + #[codec(index = 58)] AssetsRegistry(assets_registry::Event), - #[codec(index = 60)] + #[codec(index = 59)] Pablo(pablo::Event), - #[codec(index = 61)] + #[codec(index = 60)] Oracle(oracle::Event), + #[codec(index = 62)] + FarmingRewards(farming_rewards::Event), + #[codec(index = 63)] + Farming(farming::Event), #[codec(index = 100)] CallFilter(call_filter::Event), + #[codec(index = 180)] + Cosmwasm(cosmwasm::Event), #[codec(index = 190)] Ibc(ibc::Event), #[codec(index = 191)] @@ -430,6 +437,20 @@ pub mod api { metadata, )?)) } + if pallet_name == "FarmingRewards" { + return Ok(Event::FarmingRewards(farming_rewards::Event::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?)) + } + if pallet_name == "Farming" { + return Ok(Event::Farming(farming::Event::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?)) + } if pallet_name == "CallFilter" { return Ok(Event::CallFilter(call_filter::Event::decode_with_metadata( &mut &*pallet_bytes, @@ -437,6 +458,13 @@ pub mod api { metadata, )?)) } + if pallet_name == "Cosmwasm" { + return Ok(Event::Cosmwasm(cosmwasm::Event::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?)) + } if pallet_name == "Ibc" { return Ok(Event::Ibc(ibc::Event::decode_with_metadata( &mut &*pallet_bytes, @@ -514,9 +542,6 @@ pub mod api { pub fn tokens(&self) -> tokens::constants::ConstantsApi { tokens::constants::ConstantsApi } - pub fn assets(&self) -> assets::constants::ConstantsApi { - assets::constants::ConstantsApi - } pub fn crowdloan_rewards(&self) -> crowdloan_rewards::constants::ConstantsApi { crowdloan_rewards::constants::ConstantsApi } @@ -537,9 +562,18 @@ pub mod api { ) -> assets_transactor_router::constants::ConstantsApi { assets_transactor_router::constants::ConstantsApi } + pub fn farming_rewards(&self) -> farming_rewards::constants::ConstantsApi { + farming_rewards::constants::ConstantsApi + } + pub fn farming(&self) -> farming::constants::ConstantsApi { + farming::constants::ConstantsApi + } pub fn call_filter(&self) -> call_filter::constants::ConstantsApi { call_filter::constants::ConstantsApi } + pub fn cosmwasm(&self) -> cosmwasm::constants::ConstantsApi { + cosmwasm::constants::ConstantsApi + } pub fn ibc(&self) -> ibc::constants::ConstantsApi { ibc::constants::ConstantsApi } @@ -558,11 +592,6 @@ pub mod api { pub fn sudo(&self) -> sudo::storage::StorageApi { sudo::storage::StorageApi } - pub fn randomness_collective_flip( - &self, - ) -> randomness_collective_flip::storage::StorageApi { - randomness_collective_flip::storage::StorageApi - } pub fn transaction_payment(&self) -> transaction_payment::storage::StorageApi { transaction_payment::storage::StorageApi } @@ -676,9 +705,18 @@ pub mod api { pub fn oracle(&self) -> oracle::storage::StorageApi { oracle::storage::StorageApi } + pub fn farming_rewards(&self) -> farming_rewards::storage::StorageApi { + farming_rewards::storage::StorageApi + } + pub fn farming(&self) -> farming::storage::StorageApi { + farming::storage::StorageApi + } pub fn call_filter(&self) -> call_filter::storage::StorageApi { call_filter::storage::StorageApi } + pub fn cosmwasm(&self) -> cosmwasm::storage::StorageApi { + cosmwasm::storage::StorageApi + } pub fn ibc(&self) -> ibc::storage::StorageApi { ibc::storage::StorageApi } @@ -789,9 +827,6 @@ pub mod api { pub fn governance_registry(&self) -> governance_registry::calls::TransactionApi { governance_registry::calls::TransactionApi } - pub fn assets(&self) -> assets::calls::TransactionApi { - assets::calls::TransactionApi - } pub fn crowdloan_rewards(&self) -> crowdloan_rewards::calls::TransactionApi { crowdloan_rewards::calls::TransactionApi } @@ -813,9 +848,18 @@ pub mod api { pub fn assets_transactor_router(&self) -> assets_transactor_router::calls::TransactionApi { assets_transactor_router::calls::TransactionApi } + pub fn farming_rewards(&self) -> farming_rewards::calls::TransactionApi { + farming_rewards::calls::TransactionApi + } + pub fn farming(&self) -> farming::calls::TransactionApi { + farming::calls::TransactionApi + } pub fn call_filter(&self) -> call_filter::calls::TransactionApi { call_filter::calls::TransactionApi } + pub fn cosmwasm(&self) -> cosmwasm::calls::TransactionApi { + cosmwasm::calls::TransactionApi + } pub fn ibc(&self) -> ibc::calls::TransactionApi { ibc::calls::TransactionApi } @@ -830,9 +874,9 @@ pub mod api { let runtime_metadata_hash = client.metadata().metadata_hash(&PALLETS); if runtime_metadata_hash != [ - 128u8, 167u8, 3u8, 41u8, 109u8, 61u8, 78u8, 162u8, 113u8, 79u8, 89u8, 110u8, 46u8, - 108u8, 4u8, 61u8, 208u8, 157u8, 156u8, 226u8, 248u8, 22u8, 22u8, 60u8, 16u8, 2u8, - 90u8, 74u8, 115u8, 31u8, 40u8, 50u8, + 68u8, 103u8, 32u8, 161u8, 126u8, 88u8, 65u8, 95u8, 174u8, 138u8, 59u8, 190u8, + 201u8, 171u8, 191u8, 193u8, 179u8, 196u8, 99u8, 183u8, 67u8, 1u8, 145u8, 73u8, + 35u8, 139u8, 181u8, 12u8, 220u8, 191u8, 224u8, 50u8, ] { Err(::subxt::error::MetadataError::IncompatibleMetadata) } else { @@ -1455,9 +1499,10 @@ pub mod api { "Events", vec![], [ - 144u8, 128u8, 53u8, 252u8, 8u8, 255u8, 232u8, 251u8, 46u8, 242u8, - 251u8, 5u8, 88u8, 5u8, 34u8, 12u8, 198u8, 152u8, 201u8, 159u8, 150u8, - 186u8, 213u8, 74u8, 201u8, 135u8, 14u8, 24u8, 177u8, 208u8, 82u8, 68u8, + 248u8, 155u8, 116u8, 56u8, 226u8, 206u8, 64u8, 85u8, 220u8, 160u8, + 194u8, 229u8, 113u8, 216u8, 222u8, 239u8, 156u8, 150u8, 22u8, 49u8, + 191u8, 135u8, 213u8, 11u8, 49u8, 118u8, 121u8, 113u8, 191u8, 35u8, + 156u8, 69u8, ], ) } @@ -1870,9 +1915,9 @@ pub mod api { "sudo", Sudo { call: ::std::boxed::Box::new(call) }, [ - 130u8, 50u8, 193u8, 191u8, 21u8, 42u8, 24u8, 80u8, 62u8, 216u8, 235u8, - 232u8, 29u8, 148u8, 46u8, 107u8, 147u8, 148u8, 207u8, 63u8, 42u8, 72u8, - 153u8, 84u8, 20u8, 138u8, 17u8, 198u8, 41u8, 34u8, 167u8, 174u8, + 98u8, 98u8, 176u8, 219u8, 188u8, 50u8, 255u8, 231u8, 17u8, 82u8, 168u8, + 44u8, 193u8, 251u8, 73u8, 159u8, 58u8, 62u8, 153u8, 177u8, 28u8, 169u8, + 221u8, 170u8, 3u8, 50u8, 255u8, 128u8, 161u8, 207u8, 25u8, 136u8, ], ) } @@ -1886,9 +1931,9 @@ pub mod api { "sudo_unchecked_weight", SudoUncheckedWeight { call: ::std::boxed::Box::new(call), weight }, [ - 235u8, 36u8, 70u8, 37u8, 27u8, 142u8, 193u8, 216u8, 173u8, 219u8, 28u8, - 170u8, 8u8, 77u8, 128u8, 119u8, 184u8, 154u8, 60u8, 244u8, 206u8, - 155u8, 136u8, 31u8, 150u8, 193u8, 34u8, 43u8, 153u8, 171u8, 100u8, 8u8, + 136u8, 153u8, 150u8, 51u8, 57u8, 113u8, 7u8, 192u8, 190u8, 209u8, 62u8, + 175u8, 73u8, 118u8, 132u8, 90u8, 51u8, 191u8, 249u8, 202u8, 91u8, 71u8, + 17u8, 82u8, 102u8, 189u8, 3u8, 230u8, 123u8, 247u8, 18u8, 219u8, ], ) } @@ -1923,10 +1968,9 @@ pub mod api { "sudo_as", SudoAs { who, call: ::std::boxed::Box::new(call) }, [ - 122u8, 108u8, 208u8, 103u8, 109u8, 255u8, 144u8, 215u8, 48u8, 152u8, - 185u8, 107u8, 130u8, 125u8, 208u8, 200u8, 100u8, 241u8, 138u8, 219u8, - 146u8, 139u8, 179u8, 197u8, 245u8, 73u8, 197u8, 229u8, 232u8, 134u8, - 75u8, 251u8, + 168u8, 209u8, 60u8, 79u8, 175u8, 76u8, 31u8, 120u8, 241u8, 226u8, 96u8, + 129u8, 203u8, 202u8, 35u8, 110u8, 89u8, 17u8, 97u8, 54u8, 63u8, 103u8, + 151u8, 55u8, 193u8, 142u8, 237u8, 251u8, 86u8, 208u8, 9u8, 134u8, ], ) } @@ -2013,36 +2057,6 @@ pub mod api { } } } - pub mod randomness_collective_flip { - use super::{root_mod, runtime_types}; - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - pub fn random_material( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::sp_core::bounded::bounded_vec::BoundedVec<::subxt::utils::H256>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "RandomnessCollectiveFlip", - "RandomMaterial", - vec![], - [ - 152u8, 126u8, 73u8, 88u8, 54u8, 147u8, 6u8, 19u8, 214u8, 40u8, 159u8, - 30u8, 236u8, 61u8, 240u8, 65u8, 178u8, 94u8, 146u8, 152u8, 135u8, - 252u8, 160u8, 86u8, 123u8, 114u8, 251u8, 140u8, 98u8, 143u8, 217u8, - 242u8, - ], - ) - } - } - } - } pub mod transaction_payment { use super::{root_mod, runtime_types}; pub type Event = runtime_types::pallet_transaction_payment::pallet::Event; @@ -3036,7 +3050,7 @@ 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::bounded_collections::weak_bounded_vec::WeakBoundedVec< runtime_types::pallet_balances::BalanceLock<::core::primitive::u128>, >, ::subxt::storage::address::Yes, @@ -3058,7 +3072,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_balances::BalanceLock<::core::primitive::u128>, >, (), @@ -3081,7 +3095,7 @@ 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::bounded_collections::bounded_vec::BoundedVec< runtime_types::pallet_balances::ReserveData< [::core::primitive::u8; 8usize], ::core::primitive::u128, @@ -3106,7 +3120,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::pallet_balances::ReserveData< [::core::primitive::u8; 8usize], ::core::primitive::u128, @@ -3934,7 +3948,7 @@ pub mod api { ::subxt::storage::address::StaticStorageMapKey, ( ::core::primitive::u128, - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + runtime_types::bounded_collections::bounded_vec::BoundedVec< ::subxt::utils::AccountId32, >, ), @@ -3959,7 +3973,7 @@ pub mod api { ::subxt::storage::address::StaticStorageMapKey, ( ::core::primitive::u128, - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + runtime_types::bounded_collections::bounded_vec::BoundedVec< ::subxt::utils::AccountId32, >, ), @@ -3982,7 +3996,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_identity::types::RegistrarInfo< ::core::primitive::u128, @@ -4176,10 +4190,10 @@ pub mod api { "as_multi_threshold_1", AsMultiThreshold1 { other_signatories, call: ::std::boxed::Box::new(call) }, [ - 72u8, 253u8, 240u8, 172u8, 217u8, 189u8, 254u8, 91u8, 227u8, 34u8, - 236u8, 209u8, 16u8, 96u8, 161u8, 115u8, 42u8, 186u8, 198u8, 82u8, 82u8, - 234u8, 112u8, 105u8, 102u8, 196u8, 28u8, 126u8, 165u8, 242u8, 213u8, - 11u8, + 71u8, 76u8, 20u8, 220u8, 135u8, 84u8, 25u8, 87u8, 4u8, 106u8, 39u8, + 30u8, 135u8, 98u8, 174u8, 161u8, 229u8, 101u8, 116u8, 24u8, 167u8, + 34u8, 205u8, 229u8, 125u8, 66u8, 208u8, 130u8, 229u8, 109u8, 130u8, + 148u8, ], ) } @@ -4204,9 +4218,9 @@ pub mod api { max_weight, }, [ - 23u8, 121u8, 135u8, 185u8, 120u8, 221u8, 68u8, 17u8, 220u8, 59u8, - 133u8, 219u8, 69u8, 72u8, 101u8, 171u8, 191u8, 110u8, 66u8, 10u8, 61u8, - 76u8, 155u8, 27u8, 174u8, 167u8, 4u8, 238u8, 150u8, 165u8, 106u8, 70u8, + 111u8, 133u8, 144u8, 119u8, 235u8, 24u8, 201u8, 220u8, 243u8, 78u8, + 77u8, 51u8, 12u8, 13u8, 48u8, 99u8, 22u8, 142u8, 26u8, 52u8, 196u8, + 67u8, 69u8, 0u8, 212u8, 183u8, 215u8, 34u8, 48u8, 206u8, 187u8, 41u8, ], ) } @@ -5415,7 +5429,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, @@ -5437,7 +5451,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::pallet_collator_selection::pallet::CandidateInfo< ::subxt::utils::AccountId32, ::core::primitive::u128, @@ -5836,7 +5850,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_consensus_aura::sr25519::app_sr25519::Public, >, ::subxt::storage::address::Yes, @@ -5889,7 +5903,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_consensus_aura::sr25519::app_sr25519::Public, >, ::subxt::storage::address::Yes, @@ -6052,9 +6066,10 @@ pub mod api { "execute", Execute { proposal: ::std::boxed::Box::new(proposal), length_bound }, [ - 18u8, 85u8, 156u8, 235u8, 45u8, 239u8, 4u8, 226u8, 73u8, 66u8, 103u8, - 80u8, 43u8, 203u8, 68u8, 146u8, 59u8, 171u8, 133u8, 4u8, 246u8, 103u8, - 102u8, 72u8, 89u8, 100u8, 64u8, 68u8, 150u8, 157u8, 41u8, 130u8, + 73u8, 58u8, 181u8, 199u8, 228u8, 172u8, 225u8, 66u8, 83u8, 41u8, 212u8, + 114u8, 3u8, 235u8, 241u8, 99u8, 182u8, 159u8, 122u8, 28u8, 140u8, + 115u8, 190u8, 237u8, 124u8, 91u8, 177u8, 178u8, 245u8, 197u8, 11u8, + 8u8, ], ) } @@ -6073,9 +6088,10 @@ pub mod api { length_bound, }, [ - 172u8, 79u8, 87u8, 100u8, 65u8, 77u8, 72u8, 149u8, 186u8, 163u8, 169u8, - 37u8, 90u8, 42u8, 253u8, 158u8, 148u8, 253u8, 205u8, 167u8, 251u8, - 25u8, 2u8, 115u8, 129u8, 113u8, 246u8, 22u8, 213u8, 159u8, 248u8, 23u8, + 114u8, 86u8, 200u8, 107u8, 125u8, 33u8, 83u8, 172u8, 107u8, 2u8, 116u8, + 248u8, 109u8, 186u8, 106u8, 106u8, 152u8, 234u8, 142u8, 77u8, 30u8, + 37u8, 219u8, 89u8, 101u8, 194u8, 151u8, 175u8, 121u8, 39u8, 83u8, + 128u8, ], ) } @@ -6289,7 +6305,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, (), @@ -6321,9 +6339,10 @@ pub mod api { "ProposalOf", vec![::subxt::storage::address::make_static_storage_map_key(_0.borrow())], [ - 83u8, 120u8, 130u8, 39u8, 42u8, 157u8, 122u8, 223u8, 129u8, 207u8, - 186u8, 78u8, 101u8, 47u8, 81u8, 159u8, 82u8, 6u8, 208u8, 53u8, 128u8, - 188u8, 142u8, 77u8, 210u8, 9u8, 64u8, 181u8, 67u8, 49u8, 55u8, 140u8, + 180u8, 204u8, 250u8, 156u8, 200u8, 133u8, 60u8, 124u8, 134u8, 111u8, + 29u8, 56u8, 110u8, 117u8, 131u8, 105u8, 228u8, 213u8, 218u8, 89u8, + 234u8, 118u8, 128u8, 95u8, 225u8, 122u8, 239u8, 150u8, 140u8, 236u8, + 142u8, 153u8, ], ) } @@ -6341,9 +6360,10 @@ pub mod api { "ProposalOf", Vec::new(), [ - 83u8, 120u8, 130u8, 39u8, 42u8, 157u8, 122u8, 223u8, 129u8, 207u8, - 186u8, 78u8, 101u8, 47u8, 81u8, 159u8, 82u8, 6u8, 208u8, 53u8, 128u8, - 188u8, 142u8, 77u8, 210u8, 9u8, 64u8, 181u8, 67u8, 49u8, 55u8, 140u8, + 180u8, 204u8, 250u8, 156u8, 200u8, 133u8, 60u8, 124u8, 134u8, 111u8, + 29u8, 56u8, 110u8, 117u8, 131u8, 105u8, 228u8, 213u8, 218u8, 89u8, + 234u8, 118u8, 128u8, 95u8, 225u8, 122u8, 239u8, 150u8, 140u8, 236u8, + 142u8, 153u8, ], ) } @@ -6791,7 +6811,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, @@ -7254,7 +7274,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, >, ::subxt::storage::address::Yes, @@ -7624,6 +7644,19 @@ pub mod api { #[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, + )] + #[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 { pub fn propose( @@ -7926,6 +7959,22 @@ pub mod api { ], ) } + 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, + ], + ) + } } } pub type Event = runtime_types::pallet_democracy::pallet::Event; @@ -8167,6 +8216,58 @@ 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, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + 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, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + 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, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + 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; @@ -8197,7 +8298,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::picasso_runtime::RuntimeCall, @@ -8226,7 +8327,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, @@ -8251,7 +8352,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, @@ -8469,7 +8570,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, >, ), @@ -8495,7 +8596,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, >, ), @@ -8558,6 +8659,51 @@ pub mod api { ], ) } + 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, + ], + ) + } + 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 { @@ -8864,9 +9010,10 @@ pub mod api { "execute", Execute { proposal: ::std::boxed::Box::new(proposal), length_bound }, [ - 18u8, 85u8, 156u8, 235u8, 45u8, 239u8, 4u8, 226u8, 73u8, 66u8, 103u8, - 80u8, 43u8, 203u8, 68u8, 146u8, 59u8, 171u8, 133u8, 4u8, 246u8, 103u8, - 102u8, 72u8, 89u8, 100u8, 64u8, 68u8, 150u8, 157u8, 41u8, 130u8, + 73u8, 58u8, 181u8, 199u8, 228u8, 172u8, 225u8, 66u8, 83u8, 41u8, 212u8, + 114u8, 3u8, 235u8, 241u8, 99u8, 182u8, 159u8, 122u8, 28u8, 140u8, + 115u8, 190u8, 237u8, 124u8, 91u8, 177u8, 178u8, 245u8, 197u8, 11u8, + 8u8, ], ) } @@ -8885,9 +9032,10 @@ pub mod api { length_bound, }, [ - 172u8, 79u8, 87u8, 100u8, 65u8, 77u8, 72u8, 149u8, 186u8, 163u8, 169u8, - 37u8, 90u8, 42u8, 253u8, 158u8, 148u8, 253u8, 205u8, 167u8, 251u8, - 25u8, 2u8, 115u8, 129u8, 113u8, 246u8, 22u8, 213u8, 159u8, 248u8, 23u8, + 114u8, 86u8, 200u8, 107u8, 125u8, 33u8, 83u8, 172u8, 107u8, 2u8, 116u8, + 248u8, 109u8, 186u8, 106u8, 106u8, 152u8, 234u8, 142u8, 77u8, 30u8, + 37u8, 219u8, 89u8, 101u8, 194u8, 151u8, 175u8, 121u8, 39u8, 83u8, + 128u8, ], ) } @@ -9101,7 +9249,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, (), @@ -9133,9 +9283,10 @@ pub mod api { "ProposalOf", vec![::subxt::storage::address::make_static_storage_map_key(_0.borrow())], [ - 83u8, 120u8, 130u8, 39u8, 42u8, 157u8, 122u8, 223u8, 129u8, 207u8, - 186u8, 78u8, 101u8, 47u8, 81u8, 159u8, 82u8, 6u8, 208u8, 53u8, 128u8, - 188u8, 142u8, 77u8, 210u8, 9u8, 64u8, 181u8, 67u8, 49u8, 55u8, 140u8, + 180u8, 204u8, 250u8, 156u8, 200u8, 133u8, 60u8, 124u8, 134u8, 111u8, + 29u8, 56u8, 110u8, 117u8, 131u8, 105u8, 228u8, 213u8, 218u8, 89u8, + 234u8, 118u8, 128u8, 95u8, 225u8, 122u8, 239u8, 150u8, 140u8, 236u8, + 142u8, 153u8, ], ) } @@ -9153,9 +9304,10 @@ pub mod api { "ProposalOf", Vec::new(), [ - 83u8, 120u8, 130u8, 39u8, 42u8, 157u8, 122u8, 223u8, 129u8, 207u8, - 186u8, 78u8, 101u8, 47u8, 81u8, 159u8, 82u8, 6u8, 208u8, 53u8, 128u8, - 188u8, 142u8, 77u8, 210u8, 9u8, 64u8, 181u8, 67u8, 49u8, 55u8, 140u8, + 180u8, 204u8, 250u8, 156u8, 200u8, 133u8, 60u8, 124u8, 134u8, 111u8, + 29u8, 56u8, 110u8, 117u8, 131u8, 105u8, 228u8, 213u8, 218u8, 89u8, + 234u8, 118u8, 128u8, 95u8, 225u8, 122u8, 239u8, 150u8, 140u8, 236u8, + 142u8, 153u8, ], ) } @@ -9603,7 +9755,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, @@ -9786,9 +9938,10 @@ pub mod api { "execute", Execute { proposal: ::std::boxed::Box::new(proposal), length_bound }, [ - 18u8, 85u8, 156u8, 235u8, 45u8, 239u8, 4u8, 226u8, 73u8, 66u8, 103u8, - 80u8, 43u8, 203u8, 68u8, 146u8, 59u8, 171u8, 133u8, 4u8, 246u8, 103u8, - 102u8, 72u8, 89u8, 100u8, 64u8, 68u8, 150u8, 157u8, 41u8, 130u8, + 73u8, 58u8, 181u8, 199u8, 228u8, 172u8, 225u8, 66u8, 83u8, 41u8, 212u8, + 114u8, 3u8, 235u8, 241u8, 99u8, 182u8, 159u8, 122u8, 28u8, 140u8, + 115u8, 190u8, 237u8, 124u8, 91u8, 177u8, 178u8, 245u8, 197u8, 11u8, + 8u8, ], ) } @@ -9807,9 +9960,10 @@ pub mod api { length_bound, }, [ - 172u8, 79u8, 87u8, 100u8, 65u8, 77u8, 72u8, 149u8, 186u8, 163u8, 169u8, - 37u8, 90u8, 42u8, 253u8, 158u8, 148u8, 253u8, 205u8, 167u8, 251u8, - 25u8, 2u8, 115u8, 129u8, 113u8, 246u8, 22u8, 213u8, 159u8, 248u8, 23u8, + 114u8, 86u8, 200u8, 107u8, 125u8, 33u8, 83u8, 172u8, 107u8, 2u8, 116u8, + 248u8, 109u8, 186u8, 106u8, 106u8, 152u8, 234u8, 142u8, 77u8, 30u8, + 37u8, 219u8, 89u8, 101u8, 194u8, 151u8, 175u8, 121u8, 39u8, 83u8, + 128u8, ], ) } @@ -10023,7 +10177,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, (), @@ -10055,9 +10211,10 @@ pub mod api { "ProposalOf", vec![::subxt::storage::address::make_static_storage_map_key(_0.borrow())], [ - 83u8, 120u8, 130u8, 39u8, 42u8, 157u8, 122u8, 223u8, 129u8, 207u8, - 186u8, 78u8, 101u8, 47u8, 81u8, 159u8, 82u8, 6u8, 208u8, 53u8, 128u8, - 188u8, 142u8, 77u8, 210u8, 9u8, 64u8, 181u8, 67u8, 49u8, 55u8, 140u8, + 180u8, 204u8, 250u8, 156u8, 200u8, 133u8, 60u8, 124u8, 134u8, 111u8, + 29u8, 56u8, 110u8, 117u8, 131u8, 105u8, 228u8, 213u8, 218u8, 89u8, + 234u8, 118u8, 128u8, 95u8, 225u8, 122u8, 239u8, 150u8, 140u8, 236u8, + 142u8, 153u8, ], ) } @@ -10075,9 +10232,10 @@ pub mod api { "ProposalOf", Vec::new(), [ - 83u8, 120u8, 130u8, 39u8, 42u8, 157u8, 122u8, 223u8, 129u8, 207u8, - 186u8, 78u8, 101u8, 47u8, 81u8, 159u8, 82u8, 6u8, 208u8, 53u8, 128u8, - 188u8, 142u8, 77u8, 210u8, 9u8, 64u8, 181u8, 67u8, 49u8, 55u8, 140u8, + 180u8, 204u8, 250u8, 156u8, 200u8, 133u8, 60u8, 124u8, 134u8, 111u8, + 29u8, 56u8, 110u8, 117u8, 131u8, 105u8, 228u8, 213u8, 218u8, 89u8, + 234u8, 118u8, 128u8, 95u8, 225u8, 122u8, 239u8, 150u8, 140u8, 236u8, + 142u8, 153u8, ], ) } @@ -10525,7 +10683,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, @@ -10685,10 +10843,9 @@ pub mod api { call: ::std::boxed::Box::new(call), }, [ - 8u8, 93u8, 15u8, 215u8, 145u8, 159u8, 135u8, 237u8, 165u8, 124u8, - 224u8, 57u8, 130u8, 144u8, 15u8, 103u8, 174u8, 54u8, 160u8, 168u8, - 63u8, 13u8, 181u8, 94u8, 26u8, 23u8, 110u8, 230u8, 206u8, 252u8, 39u8, - 44u8, + 202u8, 180u8, 127u8, 19u8, 48u8, 153u8, 160u8, 155u8, 107u8, 188u8, + 95u8, 94u8, 182u8, 43u8, 67u8, 52u8, 73u8, 62u8, 50u8, 71u8, 143u8, + 223u8, 30u8, 166u8, 183u8, 45u8, 88u8, 106u8, 82u8, 24u8, 233u8, 179u8, ], ) } @@ -10730,9 +10887,9 @@ pub mod api { call: ::std::boxed::Box::new(call), }, [ - 180u8, 137u8, 129u8, 208u8, 1u8, 152u8, 187u8, 213u8, 61u8, 251u8, 3u8, - 197u8, 44u8, 23u8, 64u8, 139u8, 250u8, 158u8, 158u8, 223u8, 172u8, - 243u8, 7u8, 89u8, 142u8, 0u8, 98u8, 69u8, 0u8, 187u8, 75u8, 124u8, + 103u8, 189u8, 103u8, 9u8, 137u8, 248u8, 69u8, 23u8, 179u8, 18u8, 129u8, + 196u8, 91u8, 56u8, 32u8, 61u8, 175u8, 70u8, 101u8, 49u8, 181u8, 51u8, + 142u8, 138u8, 100u8, 191u8, 81u8, 252u8, 186u8, 111u8, 57u8, 55u8, ], ) } @@ -10771,9 +10928,9 @@ pub mod api { call: ::std::boxed::Box::new(call), }, [ - 152u8, 76u8, 70u8, 166u8, 225u8, 133u8, 115u8, 6u8, 1u8, 78u8, 71u8, - 172u8, 112u8, 210u8, 166u8, 248u8, 249u8, 89u8, 173u8, 222u8, 165u8, - 43u8, 97u8, 134u8, 23u8, 189u8, 166u8, 176u8, 71u8, 123u8, 97u8, 99u8, + 84u8, 85u8, 128u8, 202u8, 159u8, 173u8, 49u8, 77u8, 106u8, 41u8, 53u8, + 102u8, 85u8, 26u8, 255u8, 39u8, 141u8, 183u8, 32u8, 123u8, 125u8, 97u8, + 26u8, 17u8, 45u8, 227u8, 58u8, 114u8, 195u8, 81u8, 199u8, 252u8, ], ) } @@ -10799,10 +10956,9 @@ pub mod api { call: ::std::boxed::Box::new(call), }, [ - 189u8, 139u8, 91u8, 205u8, 228u8, 31u8, 163u8, 93u8, 209u8, 84u8, - 173u8, 63u8, 191u8, 115u8, 32u8, 154u8, 144u8, 159u8, 173u8, 183u8, - 105u8, 210u8, 222u8, 213u8, 52u8, 58u8, 88u8, 243u8, 36u8, 93u8, 238u8, - 52u8, + 26u8, 164u8, 33u8, 47u8, 123u8, 18u8, 154u8, 242u8, 148u8, 41u8, 104u8, + 123u8, 188u8, 225u8, 247u8, 97u8, 52u8, 253u8, 106u8, 114u8, 76u8, + 55u8, 52u8, 55u8, 60u8, 55u8, 134u8, 62u8, 222u8, 184u8, 200u8, 157u8, ], ) } @@ -10945,7 +11101,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], @@ -10977,7 +11133,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], @@ -11176,10 +11332,10 @@ pub mod api { "batch", Batch { calls }, [ - 117u8, 207u8, 11u8, 34u8, 216u8, 22u8, 203u8, 179u8, 85u8, 118u8, - 185u8, 61u8, 153u8, 231u8, 25u8, 200u8, 246u8, 157u8, 99u8, 228u8, - 239u8, 207u8, 192u8, 1u8, 6u8, 184u8, 27u8, 76u8, 152u8, 239u8, 117u8, - 251u8, + 24u8, 124u8, 69u8, 216u8, 167u8, 148u8, 223u8, 156u8, 173u8, 15u8, + 207u8, 14u8, 139u8, 252u8, 146u8, 225u8, 182u8, 199u8, 185u8, 251u8, + 194u8, 38u8, 207u8, 183u8, 79u8, 34u8, 2u8, 125u8, 75u8, 31u8, 46u8, + 236u8, ], ) } @@ -11193,10 +11349,10 @@ pub mod api { "as_derivative", AsDerivative { index, call: ::std::boxed::Box::new(call) }, [ - 143u8, 135u8, 79u8, 46u8, 140u8, 112u8, 163u8, 222u8, 34u8, 176u8, - 60u8, 192u8, 173u8, 12u8, 195u8, 53u8, 153u8, 13u8, 39u8, 186u8, 219u8, - 119u8, 23u8, 151u8, 222u8, 107u8, 251u8, 240u8, 13u8, 118u8, 109u8, - 214u8, + 124u8, 33u8, 5u8, 181u8, 184u8, 39u8, 217u8, 3u8, 141u8, 75u8, 242u8, + 215u8, 14u8, 208u8, 128u8, 214u8, 173u8, 75u8, 114u8, 112u8, 135u8, + 72u8, 71u8, 202u8, 142u8, 33u8, 32u8, 209u8, 212u8, 183u8, 241u8, + 194u8, ], ) } @@ -11209,10 +11365,10 @@ pub mod api { "batch_all", BatchAll { calls }, [ - 167u8, 214u8, 211u8, 218u8, 75u8, 1u8, 165u8, 96u8, 222u8, 141u8, - 208u8, 176u8, 112u8, 142u8, 248u8, 122u8, 168u8, 52u8, 123u8, 1u8, - 185u8, 112u8, 145u8, 12u8, 116u8, 236u8, 85u8, 158u8, 113u8, 81u8, - 211u8, 5u8, + 150u8, 110u8, 239u8, 171u8, 123u8, 38u8, 107u8, 174u8, 176u8, 20u8, + 149u8, 205u8, 188u8, 62u8, 115u8, 164u8, 139u8, 214u8, 201u8, 69u8, + 154u8, 35u8, 206u8, 147u8, 2u8, 10u8, 250u8, 79u8, 14u8, 59u8, 212u8, + 198u8, ], ) } @@ -11229,9 +11385,9 @@ pub mod api { call: ::std::boxed::Box::new(call), }, [ - 229u8, 90u8, 39u8, 81u8, 146u8, 114u8, 113u8, 44u8, 68u8, 152u8, 107u8, - 138u8, 7u8, 24u8, 235u8, 90u8, 155u8, 172u8, 139u8, 91u8, 85u8, 197u8, - 47u8, 171u8, 48u8, 243u8, 251u8, 115u8, 142u8, 46u8, 9u8, 73u8, + 116u8, 82u8, 187u8, 223u8, 103u8, 17u8, 79u8, 152u8, 104u8, 12u8, + 194u8, 49u8, 64u8, 122u8, 7u8, 70u8, 19u8, 50u8, 93u8, 41u8, 230u8, + 89u8, 198u8, 105u8, 34u8, 63u8, 78u8, 183u8, 94u8, 139u8, 127u8, 157u8, ], ) } @@ -11244,9 +11400,9 @@ pub mod api { "force_batch", ForceBatch { calls }, [ - 125u8, 221u8, 202u8, 157u8, 240u8, 232u8, 42u8, 198u8, 91u8, 99u8, - 149u8, 227u8, 17u8, 197u8, 140u8, 70u8, 182u8, 48u8, 80u8, 224u8, 11u8, - 92u8, 48u8, 159u8, 105u8, 111u8, 44u8, 202u8, 216u8, 13u8, 55u8, 136u8, + 5u8, 23u8, 19u8, 203u8, 5u8, 232u8, 55u8, 0u8, 77u8, 193u8, 165u8, + 242u8, 14u8, 16u8, 76u8, 178u8, 78u8, 2u8, 134u8, 133u8, 236u8, 223u8, + 189u8, 6u8, 67u8, 1u8, 86u8, 214u8, 184u8, 94u8, 144u8, 181u8, ], ) } @@ -11260,10 +11416,10 @@ pub mod api { "with_weight", WithWeight { call: ::std::boxed::Box::new(call), weight }, [ - 98u8, 254u8, 89u8, 96u8, 236u8, 233u8, 81u8, 182u8, 140u8, 128u8, - 154u8, 148u8, 207u8, 174u8, 64u8, 95u8, 119u8, 172u8, 101u8, 236u8, - 44u8, 220u8, 13u8, 222u8, 175u8, 70u8, 200u8, 38u8, 58u8, 154u8, 93u8, - 168u8, + 229u8, 108u8, 198u8, 81u8, 115u8, 159u8, 70u8, 30u8, 160u8, 182u8, + 162u8, 243u8, 60u8, 23u8, 122u8, 96u8, 178u8, 13u8, 170u8, 81u8, 134u8, + 50u8, 85u8, 204u8, 220u8, 113u8, 217u8, 47u8, 156u8, 100u8, 102u8, + 201u8, ], ) } @@ -11611,7 +11767,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, @@ -11634,7 +11792,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, @@ -11845,10 +12005,10 @@ pub mod api { "proxy", Proxy { real, force_proxy_type, call: ::std::boxed::Box::new(call) }, [ - 138u8, 138u8, 175u8, 13u8, 171u8, 70u8, 177u8, 237u8, 115u8, 189u8, - 200u8, 193u8, 20u8, 87u8, 247u8, 251u8, 104u8, 146u8, 123u8, 123u8, - 37u8, 55u8, 154u8, 22u8, 0u8, 50u8, 113u8, 84u8, 94u8, 44u8, 251u8, - 88u8, + 228u8, 127u8, 133u8, 242u8, 51u8, 161u8, 252u8, 49u8, 167u8, 251u8, + 49u8, 100u8, 219u8, 220u8, 147u8, 80u8, 181u8, 77u8, 35u8, 80u8, 234u8, + 111u8, 123u8, 234u8, 43u8, 23u8, 114u8, 117u8, 205u8, 158u8, 107u8, + 78u8, ], ) } @@ -11866,9 +12026,9 @@ pub mod api { "add_proxy", AddProxy { delegate, proxy_type, delay }, [ - 167u8, 117u8, 94u8, 25u8, 229u8, 153u8, 10u8, 136u8, 43u8, 105u8, 59u8, - 191u8, 21u8, 253u8, 0u8, 196u8, 125u8, 99u8, 233u8, 129u8, 220u8, - 152u8, 154u8, 81u8, 160u8, 190u8, 80u8, 140u8, 6u8, 33u8, 175u8, 9u8, + 84u8, 231u8, 178u8, 40u8, 111u8, 129u8, 6u8, 186u8, 103u8, 1u8, 100u8, + 183u8, 27u8, 62u8, 55u8, 233u8, 37u8, 110u8, 151u8, 3u8, 218u8, 230u8, + 65u8, 56u8, 68u8, 21u8, 58u8, 240u8, 183u8, 116u8, 218u8, 226u8, ], ) } @@ -11886,10 +12046,10 @@ pub mod api { "remove_proxy", RemoveProxy { delegate, proxy_type, delay }, [ - 80u8, 164u8, 180u8, 127u8, 48u8, 192u8, 248u8, 115u8, 128u8, 195u8, - 206u8, 87u8, 53u8, 141u8, 82u8, 113u8, 211u8, 26u8, 168u8, 14u8, 132u8, - 128u8, 255u8, 245u8, 86u8, 189u8, 81u8, 105u8, 72u8, 235u8, 179u8, - 106u8, + 174u8, 24u8, 162u8, 43u8, 182u8, 210u8, 225u8, 238u8, 244u8, 157u8, + 39u8, 150u8, 29u8, 53u8, 191u8, 91u8, 171u8, 231u8, 45u8, 118u8, 172u8, + 151u8, 162u8, 31u8, 95u8, 145u8, 72u8, 167u8, 128u8, 195u8, 151u8, + 83u8, ], ) } @@ -11916,10 +12076,10 @@ pub mod api { "create_pure", CreatePure { proxy_type, delay, index }, [ - 171u8, 135u8, 187u8, 46u8, 63u8, 151u8, 174u8, 100u8, 0u8, 63u8, 17u8, - 243u8, 33u8, 168u8, 32u8, 177u8, 183u8, 169u8, 126u8, 162u8, 108u8, - 115u8, 61u8, 152u8, 49u8, 208u8, 204u8, 116u8, 44u8, 163u8, 242u8, - 201u8, + 176u8, 173u8, 191u8, 144u8, 58u8, 237u8, 247u8, 46u8, 166u8, 28u8, + 169u8, 154u8, 90u8, 117u8, 158u8, 124u8, 143u8, 139u8, 156u8, 68u8, + 144u8, 117u8, 153u8, 233u8, 254u8, 138u8, 66u8, 66u8, 79u8, 74u8, 64u8, + 247u8, ], ) } @@ -11939,10 +12099,9 @@ pub mod api { "kill_pure", KillPure { spawner, proxy_type, index, height, ext_index }, [ - 109u8, 96u8, 111u8, 212u8, 211u8, 107u8, 224u8, 196u8, 208u8, 160u8, - 221u8, 79u8, 107u8, 113u8, 234u8, 66u8, 27u8, 211u8, 249u8, 241u8, - 173u8, 44u8, 87u8, 14u8, 207u8, 162u8, 235u8, 247u8, 14u8, 126u8, - 139u8, 209u8, + 150u8, 48u8, 9u8, 78u8, 163u8, 204u8, 124u8, 1u8, 89u8, 156u8, 226u8, + 61u8, 110u8, 20u8, 133u8, 234u8, 212u8, 40u8, 191u8, 76u8, 16u8, 114u8, + 245u8, 169u8, 188u8, 181u8, 130u8, 42u8, 128u8, 73u8, 179u8, 222u8, ], ) } @@ -12030,9 +12189,10 @@ pub mod api { call: ::std::boxed::Box::new(call), }, [ - 88u8, 83u8, 28u8, 37u8, 56u8, 147u8, 50u8, 77u8, 221u8, 205u8, 161u8, - 75u8, 242u8, 133u8, 83u8, 79u8, 200u8, 136u8, 205u8, 130u8, 29u8, - 170u8, 141u8, 5u8, 138u8, 31u8, 67u8, 25u8, 53u8, 47u8, 219u8, 88u8, + 211u8, 47u8, 150u8, 183u8, 116u8, 200u8, 169u8, 24u8, 130u8, 150u8, + 93u8, 5u8, 221u8, 101u8, 35u8, 239u8, 22u8, 155u8, 160u8, 122u8, 184u8, + 69u8, 183u8, 97u8, 149u8, 32u8, 183u8, 57u8, 213u8, 251u8, 172u8, + 180u8, ], ) } @@ -12143,7 +12303,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< runtime_types::pallet_proxy::ProxyDefinition< ::subxt::utils::AccountId32, runtime_types::composable_traits::account_proxy::ProxyType, @@ -12161,9 +12321,9 @@ pub mod api { "Proxies", vec![::subxt::storage::address::make_static_storage_map_key(_0.borrow())], [ - 40u8, 92u8, 112u8, 242u8, 63u8, 121u8, 150u8, 79u8, 47u8, 99u8, 191u8, - 214u8, 231u8, 74u8, 248u8, 133u8, 166u8, 152u8, 17u8, 237u8, 19u8, - 225u8, 31u8, 88u8, 91u8, 43u8, 102u8, 129u8, 119u8, 94u8, 170u8, 210u8, + 4u8, 179u8, 233u8, 7u8, 107u8, 36u8, 245u8, 75u8, 67u8, 135u8, 44u8, + 205u8, 95u8, 235u8, 58u8, 25u8, 179u8, 49u8, 12u8, 204u8, 133u8, 2u8, + 211u8, 42u8, 182u8, 92u8, 220u8, 247u8, 53u8, 168u8, 243u8, 236u8, ], ) } @@ -12172,7 +12332,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< runtime_types::pallet_proxy::ProxyDefinition< ::subxt::utils::AccountId32, runtime_types::composable_traits::account_proxy::ProxyType, @@ -12190,9 +12350,9 @@ pub mod api { "Proxies", Vec::new(), [ - 40u8, 92u8, 112u8, 242u8, 63u8, 121u8, 150u8, 79u8, 47u8, 99u8, 191u8, - 214u8, 231u8, 74u8, 248u8, 133u8, 166u8, 152u8, 17u8, 237u8, 19u8, - 225u8, 31u8, 88u8, 91u8, 43u8, 102u8, 129u8, 119u8, 94u8, 170u8, 210u8, + 4u8, 179u8, 233u8, 7u8, 107u8, 36u8, 245u8, 75u8, 67u8, 135u8, 44u8, + 205u8, 95u8, 235u8, 58u8, 25u8, 179u8, 49u8, 12u8, 204u8, 133u8, 2u8, + 211u8, 42u8, 182u8, 92u8, 220u8, 247u8, 53u8, 168u8, 243u8, 236u8, ], ) } @@ -12202,7 +12362,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< runtime_types::pallet_proxy::Announcement< ::subxt::utils::AccountId32, ::subxt::utils::H256, @@ -12231,7 +12391,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< runtime_types::pallet_proxy::Announcement< ::subxt::utils::AccountId32, ::subxt::utils::H256, @@ -13193,10 +13353,9 @@ pub mod api { message: ::std::boxed::Box::new(message), }, [ - 30u8, 49u8, 111u8, 253u8, 2u8, 97u8, 134u8, 171u8, 46u8, 226u8, 59u8, - 152u8, 242u8, 28u8, 252u8, 241u8, 241u8, 107u8, 231u8, 160u8, 27u8, - 43u8, 106u8, 117u8, 218u8, 179u8, 100u8, 235u8, 109u8, 42u8, 79u8, - 253u8, + 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, ], ) } @@ -13256,10 +13415,9 @@ pub mod api { "execute", Execute { message: ::std::boxed::Box::new(message), max_weight }, [ - 254u8, 34u8, 241u8, 240u8, 10u8, 232u8, 102u8, 177u8, 201u8, 227u8, - 241u8, 173u8, 223u8, 77u8, 139u8, 243u8, 195u8, 57u8, 221u8, 236u8, - 1u8, 89u8, 117u8, 182u8, 193u8, 121u8, 218u8, 173u8, 64u8, 202u8, 93u8, - 72u8, + 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, ], ) } @@ -13823,10 +13981,10 @@ pub mod api { "Queries", vec![::subxt::storage::address::make_static_storage_map_key(_0.borrow())], [ - 161u8, 32u8, 215u8, 15u8, 178u8, 18u8, 74u8, 203u8, 170u8, 162u8, - 242u8, 115u8, 191u8, 129u8, 174u8, 70u8, 85u8, 126u8, 218u8, 156u8, - 212u8, 51u8, 253u8, 144u8, 74u8, 122u8, 238u8, 35u8, 194u8, 11u8, - 253u8, 35u8, + 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, ], ) } @@ -13844,10 +14002,10 @@ pub mod api { "Queries", Vec::new(), [ - 161u8, 32u8, 215u8, 15u8, 178u8, 18u8, 74u8, 203u8, 170u8, 162u8, - 242u8, 115u8, 191u8, 129u8, 174u8, 70u8, 85u8, 126u8, 218u8, 156u8, - 212u8, 51u8, 253u8, 144u8, 74u8, 122u8, 238u8, 35u8, 194u8, 11u8, - 253u8, 35u8, + 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, ], ) } @@ -14062,7 +14220,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, )>, @@ -14153,7 +14311,7 @@ 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::bounded_collections::bounded_vec::BoundedVec<( ::core::primitive::u128, runtime_types::xcm::VersionedMultiLocation, )>, @@ -14177,7 +14335,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::u128, runtime_types::xcm::VersionedMultiLocation, )>, @@ -15568,7 +15726,7 @@ pub mod api { _1: impl ::std::borrow::Borrow, ) -> ::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::orml_tokens::BalanceLock<::core::primitive::u128>, >, ::subxt::storage::address::Yes, @@ -15594,7 +15752,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::orml_tokens::BalanceLock<::core::primitive::u128>, >, (), @@ -15666,7 +15824,7 @@ pub mod api { _1: impl ::std::borrow::Borrow, ) -> ::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::orml_tokens::ReserveData< [::core::primitive::u8; 8usize], ::core::primitive::u128, @@ -15694,7 +15852,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::orml_tokens::ReserveData< [::core::primitive::u8; 8usize], ::core::primitive::u128, @@ -16149,7 +16307,7 @@ pub mod api { } } } - pub mod assets { + pub mod crowdloan_rewards { use super::{root_mod, runtime_types}; pub mod calls { use super::{root_mod, runtime_types}; @@ -16163,17 +16321,9 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Transfer { - pub asset: runtime_types::primitives::currency::CurrencyId, - pub dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - #[codec(compact)] - pub amount: ::core::primitive::u128, - pub keep_alive: ::core::primitive::bool, - } + pub struct Initialize; #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -16182,14 +16332,8 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct TransferNative { - pub dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - #[codec(compact)] - pub value: ::core::primitive::u128, - pub keep_alive: ::core::primitive::bool, + pub struct InitializeAt { + pub at: ::core::primitive::u64, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -16200,19 +16344,14 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceTransfer { - pub asset: runtime_types::primitives::currency::CurrencyId, - pub source: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pub dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - #[codec(compact)] - pub value: ::core::primitive::u128, - pub keep_alive: ::core::primitive::bool, + pub struct Populate { + pub rewards: ::std::vec::Vec<( + runtime_types::pallet_crowdloan_rewards::models::RemoteAccount< + ::subxt::utils::AccountId32, + >, + ::core::primitive::u128, + ::core::primitive::u64, + )>, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -16223,18 +16362,11 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceTransferNative { - pub source: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pub dest: ::subxt::utils::MultiAddress< + pub struct Associate { + pub reward_account: ::subxt::utils::AccountId32, + pub proof: runtime_types::pallet_crowdloan_rewards::models::Proof< ::subxt::utils::AccountId32, - ::core::primitive::u32, >, - #[codec(compact)] - pub value: ::core::primitive::u128, - pub keep_alive: ::core::primitive::bool, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -16245,14 +16377,7 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct TransferAll { - pub asset: runtime_types::primitives::currency::CurrencyId, - pub dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pub keep_alive: ::core::primitive::bool, - } + pub struct Claim; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -16262,12 +16387,8 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct TransferAllNative { - pub dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pub keep_alive: ::core::primitive::bool, + pub struct UnlockRewardsFor { + pub reward_accounts: ::std::vec::Vec<::subxt::utils::AccountId32>, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -16278,530 +16399,133 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct MintInitialize { - #[codec(compact)] - pub amount: ::core::primitive::u128, - pub dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::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 MintInitializeWithGovernance { - #[codec(compact)] - pub amount: ::core::primitive::u128, - pub governance_origin: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pub dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::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 MintInto { - pub asset_id: runtime_types::primitives::currency::CurrencyId, - pub dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::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, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct BurnFrom { - pub asset_id: runtime_types::primitives::currency::CurrencyId, - pub dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - #[codec(compact)] - pub amount: ::core::primitive::u128, + pub struct Add { + pub additions: ::std::vec::Vec<( + runtime_types::pallet_crowdloan_rewards::models::RemoteAccount< + ::subxt::utils::AccountId32, + >, + ::core::primitive::u128, + ::core::primitive::u64, + )>, } pub struct TransactionApi; impl TransactionApi { - pub fn transfer( - &self, - asset: runtime_types::primitives::currency::CurrencyId, - dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - amount: ::core::primitive::u128, - keep_alive: ::core::primitive::bool, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Assets", - "transfer", - Transfer { asset, dest, amount, keep_alive }, - [ - 191u8, 249u8, 227u8, 177u8, 227u8, 30u8, 137u8, 210u8, 170u8, 186u8, - 138u8, 181u8, 23u8, 51u8, 178u8, 172u8, 107u8, 134u8, 163u8, 172u8, - 190u8, 202u8, 127u8, 160u8, 205u8, 98u8, 205u8, 39u8, 15u8, 68u8, - 165u8, 80u8, - ], - ) - } - pub fn transfer_native( - &self, - dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - value: ::core::primitive::u128, - keep_alive: ::core::primitive::bool, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Assets", - "transfer_native", - TransferNative { dest, value, keep_alive }, - [ - 203u8, 255u8, 186u8, 102u8, 209u8, 83u8, 227u8, 118u8, 11u8, 209u8, - 70u8, 190u8, 67u8, 158u8, 173u8, 231u8, 41u8, 137u8, 127u8, 209u8, - 160u8, 160u8, 59u8, 226u8, 154u8, 116u8, 108u8, 210u8, 87u8, 108u8, - 141u8, 18u8, - ], - ) - } - pub fn force_transfer( - &self, - asset: runtime_types::primitives::currency::CurrencyId, - source: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - value: ::core::primitive::u128, - keep_alive: ::core::primitive::bool, - ) -> ::subxt::tx::Payload { + pub fn initialize(&self) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Assets", - "force_transfer", - ForceTransfer { asset, source, dest, value, keep_alive }, + "CrowdloanRewards", + "initialize", + Initialize {}, [ - 123u8, 143u8, 36u8, 52u8, 57u8, 12u8, 209u8, 44u8, 106u8, 69u8, 200u8, - 38u8, 79u8, 3u8, 59u8, 128u8, 242u8, 132u8, 83u8, 22u8, 13u8, 7u8, - 185u8, 221u8, 193u8, 73u8, 242u8, 55u8, 109u8, 194u8, 15u8, 163u8, + 210u8, 6u8, 171u8, 194u8, 188u8, 76u8, 163u8, 192u8, 223u8, 241u8, + 194u8, 189u8, 221u8, 190u8, 28u8, 191u8, 208u8, 85u8, 140u8, 167u8, + 160u8, 29u8, 155u8, 216u8, 185u8, 27u8, 109u8, 39u8, 4u8, 82u8, 50u8, + 180u8, ], ) } - pub fn force_transfer_native( + pub fn initialize_at( &self, - source: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - value: ::core::primitive::u128, - keep_alive: ::core::primitive::bool, - ) -> ::subxt::tx::Payload { + at: ::core::primitive::u64, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Assets", - "force_transfer_native", - ForceTransferNative { source, dest, value, keep_alive }, + "CrowdloanRewards", + "initialize_at", + InitializeAt { at }, [ - 109u8, 219u8, 2u8, 9u8, 154u8, 57u8, 173u8, 220u8, 132u8, 248u8, 31u8, - 203u8, 185u8, 230u8, 252u8, 89u8, 92u8, 152u8, 87u8, 44u8, 21u8, 209u8, - 202u8, 159u8, 229u8, 5u8, 156u8, 252u8, 219u8, 9u8, 138u8, 135u8, + 213u8, 36u8, 13u8, 147u8, 34u8, 81u8, 248u8, 154u8, 70u8, 189u8, 57u8, + 225u8, 107u8, 84u8, 25u8, 18u8, 160u8, 135u8, 118u8, 251u8, 223u8, + 204u8, 43u8, 65u8, 50u8, 130u8, 31u8, 80u8, 16u8, 158u8, 173u8, 20u8, ], ) } - pub fn transfer_all( + pub fn populate( &self, - asset: runtime_types::primitives::currency::CurrencyId, - dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - keep_alive: ::core::primitive::bool, - ) -> ::subxt::tx::Payload { + rewards: ::std::vec::Vec<( + runtime_types::pallet_crowdloan_rewards::models::RemoteAccount< + ::subxt::utils::AccountId32, + >, + ::core::primitive::u128, + ::core::primitive::u64, + )>, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Assets", - "transfer_all", - TransferAll { asset, dest, keep_alive }, + "CrowdloanRewards", + "populate", + Populate { rewards }, [ - 252u8, 242u8, 56u8, 229u8, 110u8, 245u8, 215u8, 78u8, 248u8, 237u8, - 202u8, 143u8, 219u8, 104u8, 121u8, 75u8, 53u8, 234u8, 134u8, 214u8, - 73u8, 250u8, 151u8, 124u8, 247u8, 60u8, 230u8, 36u8, 26u8, 222u8, - 240u8, 108u8, + 216u8, 166u8, 103u8, 132u8, 191u8, 229u8, 187u8, 209u8, 218u8, 72u8, + 104u8, 134u8, 42u8, 241u8, 178u8, 94u8, 19u8, 197u8, 28u8, 171u8, 72u8, + 248u8, 228u8, 247u8, 176u8, 93u8, 30u8, 234u8, 95u8, 23u8, 136u8, + 140u8, ], ) } - pub fn transfer_all_native( + pub fn associate( &self, - dest: ::subxt::utils::MultiAddress< + reward_account: ::subxt::utils::AccountId32, + proof: runtime_types::pallet_crowdloan_rewards::models::Proof< ::subxt::utils::AccountId32, - ::core::primitive::u32, >, - keep_alive: ::core::primitive::bool, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Assets", - "transfer_all_native", - TransferAllNative { dest, keep_alive }, + "CrowdloanRewards", + "associate", + Associate { reward_account, proof }, [ - 199u8, 166u8, 244u8, 2u8, 74u8, 109u8, 252u8, 7u8, 251u8, 242u8, 80u8, - 154u8, 164u8, 73u8, 144u8, 79u8, 83u8, 188u8, 208u8, 23u8, 127u8, 19u8, - 234u8, 226u8, 111u8, 93u8, 176u8, 171u8, 178u8, 132u8, 74u8, 63u8, + 172u8, 177u8, 98u8, 224u8, 100u8, 149u8, 103u8, 198u8, 237u8, 49u8, + 31u8, 231u8, 222u8, 173u8, 28u8, 233u8, 20u8, 109u8, 135u8, 134u8, + 170u8, 40u8, 244u8, 28u8, 174u8, 139u8, 51u8, 229u8, 120u8, 251u8, + 73u8, 5u8, ], ) } - pub fn mint_initialize( - &self, - amount: ::core::primitive::u128, - dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - ) -> ::subxt::tx::Payload { + pub fn claim(&self) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Assets", - "mint_initialize", - MintInitialize { amount, dest }, + "CrowdloanRewards", + "claim", + Claim {}, [ - 46u8, 118u8, 244u8, 196u8, 195u8, 185u8, 222u8, 58u8, 151u8, 155u8, - 118u8, 131u8, 134u8, 226u8, 8u8, 155u8, 76u8, 98u8, 92u8, 157u8, 133u8, - 62u8, 166u8, 172u8, 200u8, 39u8, 11u8, 184u8, 87u8, 73u8, 62u8, 36u8, + 45u8, 97u8, 229u8, 222u8, 255u8, 43u8, 179u8, 22u8, 163u8, 231u8, 33u8, + 96u8, 167u8, 206u8, 213u8, 116u8, 80u8, 254u8, 184u8, 3u8, 96u8, 5u8, + 160u8, 81u8, 148u8, 30u8, 117u8, 255u8, 107u8, 177u8, 200u8, 78u8, ], ) } - pub fn mint_initialize_with_governance( + pub fn unlock_rewards_for( &self, - amount: ::core::primitive::u128, - governance_origin: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - ) -> ::subxt::tx::Payload { + reward_accounts: ::std::vec::Vec<::subxt::utils::AccountId32>, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Assets", - "mint_initialize_with_governance", - MintInitializeWithGovernance { amount, governance_origin, dest }, + "CrowdloanRewards", + "unlock_rewards_for", + UnlockRewardsFor { reward_accounts }, [ - 112u8, 237u8, 174u8, 228u8, 234u8, 128u8, 152u8, 223u8, 18u8, 220u8, - 251u8, 233u8, 136u8, 177u8, 214u8, 237u8, 151u8, 115u8, 86u8, 68u8, - 220u8, 98u8, 98u8, 101u8, 94u8, 55u8, 195u8, 248u8, 233u8, 20u8, 186u8, - 45u8, + 116u8, 71u8, 22u8, 93u8, 198u8, 85u8, 61u8, 147u8, 75u8, 125u8, 232u8, + 122u8, 54u8, 186u8, 142u8, 244u8, 235u8, 65u8, 164u8, 187u8, 11u8, + 90u8, 72u8, 111u8, 104u8, 109u8, 239u8, 164u8, 148u8, 43u8, 248u8, + 187u8, ], ) } - pub fn mint_into( + pub fn add( &self, - asset_id: runtime_types::primitives::currency::CurrencyId, - dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - amount: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { + additions: ::std::vec::Vec<( + runtime_types::pallet_crowdloan_rewards::models::RemoteAccount< + ::subxt::utils::AccountId32, + >, + ::core::primitive::u128, + ::core::primitive::u64, + )>, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Assets", - "mint_into", - MintInto { asset_id, dest, amount }, + "CrowdloanRewards", + "add", + Add { additions }, [ - 67u8, 51u8, 185u8, 110u8, 243u8, 173u8, 151u8, 175u8, 141u8, 214u8, - 194u8, 139u8, 176u8, 25u8, 49u8, 248u8, 121u8, 103u8, 178u8, 128u8, - 5u8, 52u8, 66u8, 232u8, 182u8, 57u8, 192u8, 55u8, 136u8, 90u8, 60u8, - 32u8, - ], - ) - } - pub fn burn_from( - &self, - asset_id: runtime_types::primitives::currency::CurrencyId, - dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - amount: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Assets", - "burn_from", - BurnFrom { asset_id, dest, amount }, - [ - 97u8, 142u8, 84u8, 209u8, 163u8, 111u8, 93u8, 46u8, 152u8, 84u8, 142u8, - 82u8, 3u8, 128u8, 43u8, 26u8, 148u8, 160u8, 230u8, 48u8, 239u8, 34u8, - 174u8, 88u8, 52u8, 149u8, 146u8, 77u8, 139u8, 31u8, 225u8, 102u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - pub fn native_asset_id( - &self, - ) -> ::subxt::constants::Address { - ::subxt::constants::Address::new_static( - "Assets", - "NativeAssetId", - [ - 150u8, 207u8, 49u8, 178u8, 254u8, 209u8, 81u8, 36u8, 235u8, 117u8, - 62u8, 166u8, 4u8, 173u8, 64u8, 189u8, 19u8, 182u8, 131u8, 166u8, 234u8, - 145u8, 83u8, 23u8, 246u8, 20u8, 47u8, 34u8, 66u8, 162u8, 146u8, 49u8, - ], - ) - } - } - } - } - pub mod crowdloan_rewards { - use super::{root_mod, runtime_types}; - pub mod calls { - use super::{root_mod, 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 Initialize; - #[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 InitializeAt { - pub at: ::core::primitive::u64, - } - #[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 Populate { - pub rewards: ::std::vec::Vec<( - runtime_types::pallet_crowdloan_rewards::models::RemoteAccount< - ::subxt::utils::AccountId32, - >, - ::core::primitive::u128, - ::core::primitive::u64, - )>, - } - #[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 Associate { - pub reward_account: ::subxt::utils::AccountId32, - pub proof: runtime_types::pallet_crowdloan_rewards::models::Proof< - ::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")] - pub struct Claim; - #[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 UnlockRewardsFor { - pub reward_accounts: ::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, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Add { - pub additions: ::std::vec::Vec<( - runtime_types::pallet_crowdloan_rewards::models::RemoteAccount< - ::subxt::utils::AccountId32, - >, - ::core::primitive::u128, - ::core::primitive::u64, - )>, - } - pub struct TransactionApi; - impl TransactionApi { - pub fn initialize(&self) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "CrowdloanRewards", - "initialize", - Initialize {}, - [ - 210u8, 6u8, 171u8, 194u8, 188u8, 76u8, 163u8, 192u8, 223u8, 241u8, - 194u8, 189u8, 221u8, 190u8, 28u8, 191u8, 208u8, 85u8, 140u8, 167u8, - 160u8, 29u8, 155u8, 216u8, 185u8, 27u8, 109u8, 39u8, 4u8, 82u8, 50u8, - 180u8, - ], - ) - } - pub fn initialize_at( - &self, - at: ::core::primitive::u64, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "CrowdloanRewards", - "initialize_at", - InitializeAt { at }, - [ - 213u8, 36u8, 13u8, 147u8, 34u8, 81u8, 248u8, 154u8, 70u8, 189u8, 57u8, - 225u8, 107u8, 84u8, 25u8, 18u8, 160u8, 135u8, 118u8, 251u8, 223u8, - 204u8, 43u8, 65u8, 50u8, 130u8, 31u8, 80u8, 16u8, 158u8, 173u8, 20u8, - ], - ) - } - pub fn populate( - &self, - rewards: ::std::vec::Vec<( - runtime_types::pallet_crowdloan_rewards::models::RemoteAccount< - ::subxt::utils::AccountId32, - >, - ::core::primitive::u128, - ::core::primitive::u64, - )>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "CrowdloanRewards", - "populate", - Populate { rewards }, - [ - 216u8, 166u8, 103u8, 132u8, 191u8, 229u8, 187u8, 209u8, 218u8, 72u8, - 104u8, 134u8, 42u8, 241u8, 178u8, 94u8, 19u8, 197u8, 28u8, 171u8, 72u8, - 248u8, 228u8, 247u8, 176u8, 93u8, 30u8, 234u8, 95u8, 23u8, 136u8, - 140u8, - ], - ) - } - pub fn associate( - &self, - reward_account: ::subxt::utils::AccountId32, - proof: runtime_types::pallet_crowdloan_rewards::models::Proof< - ::subxt::utils::AccountId32, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "CrowdloanRewards", - "associate", - Associate { reward_account, proof }, - [ - 172u8, 177u8, 98u8, 224u8, 100u8, 149u8, 103u8, 198u8, 237u8, 49u8, - 31u8, 231u8, 222u8, 173u8, 28u8, 233u8, 20u8, 109u8, 135u8, 134u8, - 170u8, 40u8, 244u8, 28u8, 174u8, 139u8, 51u8, 229u8, 120u8, 251u8, - 73u8, 5u8, - ], - ) - } - pub fn claim(&self) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "CrowdloanRewards", - "claim", - Claim {}, - [ - 45u8, 97u8, 229u8, 222u8, 255u8, 43u8, 179u8, 22u8, 163u8, 231u8, 33u8, - 96u8, 167u8, 206u8, 213u8, 116u8, 80u8, 254u8, 184u8, 3u8, 96u8, 5u8, - 160u8, 81u8, 148u8, 30u8, 117u8, 255u8, 107u8, 177u8, 200u8, 78u8, - ], - ) - } - pub fn unlock_rewards_for( - &self, - reward_accounts: ::std::vec::Vec<::subxt::utils::AccountId32>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "CrowdloanRewards", - "unlock_rewards_for", - UnlockRewardsFor { reward_accounts }, - [ - 116u8, 71u8, 22u8, 93u8, 198u8, 85u8, 61u8, 147u8, 75u8, 125u8, 232u8, - 122u8, 54u8, 186u8, 142u8, 244u8, 235u8, 65u8, 164u8, 187u8, 11u8, - 90u8, 72u8, 111u8, 104u8, 109u8, 239u8, 164u8, 148u8, 43u8, 248u8, - 187u8, - ], - ) - } - pub fn add( - &self, - additions: ::std::vec::Vec<( - runtime_types::pallet_crowdloan_rewards::models::RemoteAccount< - ::subxt::utils::AccountId32, - >, - ::core::primitive::u128, - ::core::primitive::u64, - )>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "CrowdloanRewards", - "add", - Add { additions }, - [ - 124u8, 149u8, 199u8, 140u8, 93u8, 212u8, 169u8, 146u8, 29u8, 88u8, - 113u8, 119u8, 254u8, 20u8, 66u8, 67u8, 9u8, 2u8, 58u8, 178u8, 231u8, - 139u8, 126u8, 235u8, 91u8, 81u8, 81u8, 126u8, 152u8, 239u8, 170u8, - 136u8, + 124u8, 149u8, 199u8, 140u8, 93u8, 212u8, 169u8, 146u8, 29u8, 88u8, + 113u8, 119u8, 254u8, 20u8, 66u8, 67u8, 9u8, 2u8, 58u8, 178u8, 231u8, + 139u8, 126u8, 235u8, 91u8, 81u8, 81u8, 126u8, 152u8, 239u8, 170u8, + 136u8, ], ) } @@ -17495,7 +17219,7 @@ pub mod api { >, pub locked_amount: ::core::primitive::u128, pub claimed_amount_per_schedule: - runtime_types::sp_core::bounded::bounded_btree_map::BoundedBTreeMap< + runtime_types::bounded_collections::bounded_btree_map::BoundedBTreeMap< ::core::primitive::u128, ::core::primitive::u128, >, @@ -17531,7 +17255,7 @@ pub mod api { _1: impl ::std::borrow::Borrow, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::sp_core::bounded::bounded_btree_map::BoundedBTreeMap< + runtime_types::bounded_collections::bounded_btree_map::BoundedBTreeMap< ::core::primitive::u128, runtime_types::pallet_vesting::types::VestingSchedule< ::core::primitive::u128, @@ -17563,7 +17287,7 @@ pub mod api { &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::sp_core::bounded::bounded_btree_map::BoundedBTreeMap< + runtime_types::bounded_collections::bounded_btree_map::BoundedBTreeMap< ::core::primitive::u128, runtime_types::pallet_vesting::types::VestingSchedule< ::core::primitive::u128, @@ -19097,6 +18821,7 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SetSigner { + pub who: ::subxt::utils::AccountId32, pub signer: ::subxt::utils::AccountId32, } #[derive( @@ -19158,8 +18883,20 @@ pub mod api { pub price: ::core::primitive::u128, pub asset_id: runtime_types::primitives::currency::CurrencyId, } - pub struct TransactionApi; - impl TransactionApi { + #[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 RemoveSigner { + pub who: ::subxt::utils::AccountId32, + } + pub struct TransactionApi; + impl TransactionApi { pub fn add_asset_and_info( &self, asset_id: runtime_types::primitives::currency::CurrencyId, @@ -19193,16 +18930,17 @@ pub mod api { } pub fn set_signer( &self, + who: ::subxt::utils::AccountId32, signer: ::subxt::utils::AccountId32, ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Oracle", "set_signer", - SetSigner { signer }, + SetSigner { who, signer }, [ - 73u8, 228u8, 199u8, 211u8, 100u8, 63u8, 140u8, 6u8, 161u8, 1u8, 34u8, - 191u8, 159u8, 173u8, 241u8, 217u8, 29u8, 185u8, 67u8, 187u8, 126u8, - 88u8, 214u8, 207u8, 147u8, 70u8, 66u8, 237u8, 233u8, 97u8, 108u8, 44u8, + 65u8, 234u8, 44u8, 63u8, 246u8, 180u8, 248u8, 157u8, 138u8, 254u8, + 170u8, 43u8, 77u8, 67u8, 152u8, 12u8, 125u8, 230u8, 84u8, 86u8, 68u8, + 117u8, 133u8, 85u8, 87u8, 78u8, 242u8, 108u8, 156u8, 158u8, 29u8, 73u8, ], ) } @@ -19280,6 +19018,22 @@ pub mod api { ], ) } + pub fn remove_signer( + &self, + who: ::subxt::utils::AccountId32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Oracle", + "remove_signer", + RemoveSigner { who }, + [ + 242u8, 213u8, 62u8, 251u8, 252u8, 155u8, 68u8, 199u8, 167u8, 248u8, + 211u8, 201u8, 171u8, 205u8, 37u8, 150u8, 184u8, 165u8, 155u8, 155u8, + 204u8, 50u8, 30u8, 238u8, 205u8, 205u8, 86u8, 168u8, 193u8, 253u8, + 119u8, 130u8, + ], + ) + } } } pub type Event = runtime_types::pallet_oracle::pallet::Event; @@ -19471,6 +19225,24 @@ pub mod api { const PALLET: &'static str = "Oracle"; const EVENT: &'static str = "PriceChanged"; } + #[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 SignerRemoved( + pub ::subxt::utils::AccountId32, + pub ::subxt::utils::AccountId32, + pub ::core::primitive::u128, + ); + impl ::subxt::events::StaticEvent for SignerRemoved { + const PALLET: &'static str = "Oracle"; + const EVENT: &'static str = "SignerRemoved"; + } } pub mod storage { use super::runtime_types; @@ -19695,6 +19467,47 @@ pub mod api { ], ) } + pub fn accumulated_rewards_per_asset( + &self, + _0: impl ::std::borrow::Borrow, + ) -> ::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( + "Oracle", + "AccumulatedRewardsPerAsset", + vec![::subxt::storage::address::make_static_storage_map_key(_0.borrow())], + [ + 175u8, 101u8, 137u8, 110u8, 70u8, 76u8, 145u8, 253u8, 107u8, 224u8, + 88u8, 56u8, 200u8, 13u8, 238u8, 123u8, 168u8, 172u8, 26u8, 0u8, 184u8, + 135u8, 5u8, 191u8, 223u8, 218u8, 133u8, 55u8, 9u8, 136u8, 205u8, 68u8, + ], + ) + } + pub fn accumulated_rewards_per_asset_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u128, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Oracle", + "AccumulatedRewardsPerAsset", + Vec::new(), + [ + 175u8, 101u8, 137u8, 110u8, 70u8, 76u8, 145u8, 253u8, 107u8, 224u8, + 88u8, 56u8, 200u8, 13u8, 238u8, 123u8, 168u8, 172u8, 26u8, 0u8, 184u8, + 135u8, 5u8, 191u8, 223u8, 218u8, 133u8, 55u8, 9u8, 136u8, 205u8, 68u8, + ], + ) + } pub fn answer_in_transit( &self, _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, @@ -19792,7 +19605,7 @@ pub mod api { _0: impl ::std::borrow::Borrow, ) -> ::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::composable_traits::oracle::Price< ::core::primitive::u128, ::core::primitive::u32, @@ -19818,7 +19631,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::composable_traits::oracle::Price< ::core::primitive::u128, ::core::primitive::u32, @@ -19845,7 +19658,7 @@ pub mod api { _0: impl ::std::borrow::Borrow, ) -> ::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::pallet_oracle::pallet::PrePrice< ::core::primitive::u128, ::core::primitive::u32, @@ -19871,7 +19684,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::pallet_oracle::pallet::PrePrice< ::core::primitive::u128, ::core::primitive::u32, @@ -20359,11 +20172,17 @@ pub mod api { } } } - pub mod call_filter { + pub mod farming_rewards { use super::{root_mod, runtime_types}; pub mod calls { use super::{root_mod, runtime_types}; type DispatchError = runtime_types::sp_runtime::DispatchError; + pub struct TransactionApi; + impl TransactionApi {} + } + pub type Event = runtime_types::reward::pallet::Event; + pub mod events { + use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -20373,10 +20192,14 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Disable { - pub entry: runtime_types::pallet_call_filter::types::CallFilterEntry< - runtime_types::common::MaxStringSize, - >, + pub struct DepositStake { + pub pool_id: runtime_types::primitives::currency::CurrencyId, + pub stake_id: ::subxt::utils::AccountId32, + pub amount: runtime_types::sp_arithmetic::fixed_point::FixedI128, + } + impl ::subxt::events::StaticEvent for DepositStake { + const PALLET: &'static str = "FarmingRewards"; + const EVENT: &'static str = "DepositStake"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -20387,52 +20210,14 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Enable { - pub entry: runtime_types::pallet_call_filter::types::CallFilterEntry< - runtime_types::common::MaxStringSize, - >, + pub struct DistributeReward { + pub currency_id: runtime_types::primitives::currency::CurrencyId, + pub amount: runtime_types::sp_arithmetic::fixed_point::FixedI128, } - pub struct TransactionApi; - impl TransactionApi { - pub fn disable( - &self, - entry: runtime_types::pallet_call_filter::types::CallFilterEntry< - runtime_types::common::MaxStringSize, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "CallFilter", - "disable", - Disable { entry }, - [ - 135u8, 13u8, 52u8, 184u8, 86u8, 89u8, 77u8, 78u8, 232u8, 107u8, 230u8, - 67u8, 122u8, 192u8, 193u8, 4u8, 59u8, 44u8, 175u8, 209u8, 194u8, 49u8, - 73u8, 116u8, 232u8, 227u8, 56u8, 254u8, 72u8, 54u8, 206u8, 27u8, - ], - ) - } - pub fn enable( - &self, - entry: runtime_types::pallet_call_filter::types::CallFilterEntry< - runtime_types::common::MaxStringSize, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "CallFilter", - "enable", - Enable { entry }, - [ - 24u8, 54u8, 83u8, 13u8, 223u8, 77u8, 229u8, 162u8, 164u8, 107u8, 208u8, - 132u8, 0u8, 252u8, 176u8, 125u8, 236u8, 185u8, 128u8, 209u8, 252u8, - 116u8, 112u8, 242u8, 25u8, 76u8, 69u8, 22u8, 4u8, 205u8, 227u8, 207u8, - ], - ) - } + impl ::subxt::events::StaticEvent for DistributeReward { + const PALLET: &'static str = "FarmingRewards"; + const EVENT: &'static str = "DistributeReward"; } - } - pub type Event = runtime_types::pallet_call_filter::pallet::Event; - pub mod events { - use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -20442,14 +20227,14 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Disabled { - pub entry: runtime_types::pallet_call_filter::types::CallFilterEntry< - runtime_types::common::MaxStringSize, - >, + pub struct WithdrawStake { + pub pool_id: runtime_types::primitives::currency::CurrencyId, + pub stake_id: ::subxt::utils::AccountId32, + pub amount: runtime_types::sp_arithmetic::fixed_point::FixedI128, } - impl ::subxt::events::StaticEvent for Disabled { - const PALLET: &'static str = "CallFilter"; - const EVENT: &'static str = "Disabled"; + impl ::subxt::events::StaticEvent for WithdrawStake { + const PALLET: &'static str = "FarmingRewards"; + const EVENT: &'static str = "WithdrawStake"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -20460,77 +20245,1692 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Enabled { - pub entry: runtime_types::pallet_call_filter::types::CallFilterEntry< - runtime_types::common::MaxStringSize, - >, + pub struct WithdrawReward { + pub pool_id: runtime_types::primitives::currency::CurrencyId, + pub stake_id: ::subxt::utils::AccountId32, + pub currency_id: runtime_types::primitives::currency::CurrencyId, + pub amount: runtime_types::sp_arithmetic::fixed_point::FixedI128, } - impl ::subxt::events::StaticEvent for Enabled { - const PALLET: &'static str = "CallFilter"; - const EVENT: &'static str = "Enabled"; + impl ::subxt::events::StaticEvent for WithdrawReward { + const PALLET: &'static str = "FarmingRewards"; + const EVENT: &'static str = "WithdrawReward"; } } pub mod storage { use super::runtime_types; pub struct StorageApi; impl StorageApi { - pub fn disabled_calls( + pub fn total_stake( &self, - _0: impl ::std::borrow::Borrow< - runtime_types::pallet_call_filter::types::CallFilterEntry< - runtime_types::common::MaxStringSize, - >, - >, + _0: impl ::std::borrow::Borrow, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - (), + runtime_types::sp_arithmetic::fixed_point::FixedI128, + ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "FarmingRewards", + "TotalStake", + vec![::subxt::storage::address::make_static_storage_map_key(_0.borrow())], + [ + 160u8, 48u8, 158u8, 71u8, 236u8, 248u8, 240u8, 225u8, 86u8, 191u8, + 216u8, 115u8, 253u8, 220u8, 52u8, 151u8, 10u8, 174u8, 57u8, 41u8, + 196u8, 184u8, 151u8, 214u8, 165u8, 157u8, 128u8, 125u8, 36u8, 205u8, + 8u8, 235u8, + ], + ) + } + pub fn total_stake_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::sp_arithmetic::fixed_point::FixedI128, (), ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( - "CallFilter", - "DisabledCalls", + "FarmingRewards", + "TotalStake", + Vec::new(), + [ + 160u8, 48u8, 158u8, 71u8, 236u8, 248u8, 240u8, 225u8, 86u8, 191u8, + 216u8, 115u8, 253u8, 220u8, 52u8, 151u8, 10u8, 174u8, 57u8, 41u8, + 196u8, 184u8, 151u8, 214u8, 165u8, 157u8, 128u8, 125u8, 36u8, 205u8, + 8u8, 235u8, + ], + ) + } + pub fn total_rewards( + &self, + _0: impl ::std::borrow::Borrow, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::sp_arithmetic::fixed_point::FixedI128, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "FarmingRewards", + "TotalRewards", vec![::subxt::storage::address::make_static_storage_map_key(_0.borrow())], [ - 54u8, 93u8, 201u8, 230u8, 97u8, 19u8, 95u8, 130u8, 213u8, 155u8, 135u8, - 208u8, 52u8, 55u8, 238u8, 157u8, 6u8, 135u8, 46u8, 136u8, 82u8, 53u8, - 1u8, 182u8, 38u8, 172u8, 140u8, 63u8, 56u8, 88u8, 173u8, 16u8, + 197u8, 163u8, 136u8, 95u8, 156u8, 228u8, 81u8, 66u8, 116u8, 24u8, + 246u8, 126u8, 115u8, 20u8, 190u8, 178u8, 111u8, 52u8, 45u8, 39u8, + 195u8, 62u8, 120u8, 86u8, 221u8, 135u8, 20u8, 46u8, 11u8, 200u8, 194u8, + 34u8, ], ) } - pub fn disabled_calls_root( + pub fn total_rewards_root( &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, + runtime_types::sp_arithmetic::fixed_point::FixedI128, (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "FarmingRewards", + "TotalRewards", + Vec::new(), + [ + 197u8, 163u8, 136u8, 95u8, 156u8, 228u8, 81u8, 66u8, 116u8, 24u8, + 246u8, 126u8, 115u8, 20u8, 190u8, 178u8, 111u8, 52u8, 45u8, 39u8, + 195u8, 62u8, 120u8, 86u8, 221u8, 135u8, 20u8, 46u8, 11u8, 200u8, 194u8, + 34u8, + ], + ) + } + pub fn reward_per_token( + &self, + _0: impl ::std::borrow::Borrow, + _1: impl ::std::borrow::Borrow, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::sp_arithmetic::fixed_point::FixedI128, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "FarmingRewards", + "RewardPerToken", + vec![ + ::subxt::storage::address::make_static_storage_map_key(_0.borrow()), + ::subxt::storage::address::make_static_storage_map_key(_1.borrow()), + ], + [ + 239u8, 253u8, 16u8, 199u8, 62u8, 21u8, 167u8, 240u8, 34u8, 235u8, + 246u8, 124u8, 97u8, 211u8, 185u8, 238u8, 15u8, 106u8, 232u8, 224u8, + 147u8, 99u8, 7u8, 62u8, 31u8, 255u8, 178u8, 42u8, 25u8, 161u8, 62u8, + 7u8, + ], + ) + } + pub fn reward_per_token_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::sp_arithmetic::fixed_point::FixedI128, (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "FarmingRewards", + "RewardPerToken", + Vec::new(), + [ + 239u8, 253u8, 16u8, 199u8, 62u8, 21u8, 167u8, 240u8, 34u8, 235u8, + 246u8, 124u8, 97u8, 211u8, 185u8, 238u8, 15u8, 106u8, 232u8, 224u8, + 147u8, 99u8, 7u8, 62u8, 31u8, 255u8, 178u8, 42u8, 25u8, 161u8, 62u8, + 7u8, + ], + ) + } + pub fn stake( + &self, + _0: impl ::std::borrow::Borrow, + _1: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::sp_arithmetic::fixed_point::FixedI128, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "FarmingRewards", + "Stake", + vec![ + ::subxt::storage::address::make_static_storage_map_key(_0.borrow()), + ::subxt::storage::address::make_static_storage_map_key(_1.borrow()), + ], + [ + 222u8, 132u8, 114u8, 102u8, 215u8, 167u8, 38u8, 50u8, 11u8, 171u8, + 22u8, 9u8, 19u8, 27u8, 112u8, 62u8, 2u8, 75u8, 209u8, 188u8, 83u8, + 69u8, 18u8, 11u8, 76u8, 132u8, 192u8, 44u8, 185u8, 189u8, 58u8, 80u8, + ], + ) + } + pub fn stake_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::sp_arithmetic::fixed_point::FixedI128, (), ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { ::subxt::storage::address::Address::new_static( - "CallFilter", - "DisabledCalls", + "FarmingRewards", + "Stake", Vec::new(), [ - 54u8, 93u8, 201u8, 230u8, 97u8, 19u8, 95u8, 130u8, 213u8, 155u8, 135u8, - 208u8, 52u8, 55u8, 238u8, 157u8, 6u8, 135u8, 46u8, 136u8, 82u8, 53u8, - 1u8, 182u8, 38u8, 172u8, 140u8, 63u8, 56u8, 88u8, 173u8, 16u8, + 222u8, 132u8, 114u8, 102u8, 215u8, 167u8, 38u8, 50u8, 11u8, 171u8, + 22u8, 9u8, 19u8, 27u8, 112u8, 62u8, 2u8, 75u8, 209u8, 188u8, 83u8, + 69u8, 18u8, 11u8, 76u8, 132u8, 192u8, 44u8, 185u8, 189u8, 58u8, 80u8, ], ) } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; + pub fn reward_tally( + &self, + _0: impl ::std::borrow::Borrow, + _1: impl ::std::borrow::Borrow<( + runtime_types::primitives::currency::CurrencyId, + ::subxt::utils::AccountId32, + )>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::sp_arithmetic::fixed_point::FixedI128, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "FarmingRewards", + "RewardTally", + vec![ + ::subxt::storage::address::make_static_storage_map_key(_0.borrow()), + ::subxt::storage::address::make_static_storage_map_key(_1.borrow()), + ], + [ + 60u8, 223u8, 100u8, 95u8, 152u8, 235u8, 178u8, 200u8, 35u8, 134u8, + 157u8, 109u8, 3u8, 154u8, 234u8, 143u8, 250u8, 20u8, 197u8, 187u8, + 62u8, 251u8, 47u8, 150u8, 221u8, 236u8, 211u8, 128u8, 196u8, 232u8, + 129u8, 243u8, + ], + ) + } + pub fn reward_tally_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::sp_arithmetic::fixed_point::FixedI128, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "FarmingRewards", + "RewardTally", + Vec::new(), + [ + 60u8, 223u8, 100u8, 95u8, 152u8, 235u8, 178u8, 200u8, 35u8, 134u8, + 157u8, 109u8, 3u8, 154u8, 234u8, 143u8, 250u8, 20u8, 197u8, 187u8, + 62u8, 251u8, 47u8, 150u8, 221u8, 236u8, 211u8, 128u8, 196u8, 232u8, + 129u8, 243u8, + ], + ) + } + pub fn reward_currencies( + &self, + _0: impl ::std::borrow::Borrow, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::bounded_collections::bounded_btree_set::BoundedBTreeSet< + runtime_types::primitives::currency::CurrencyId, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "FarmingRewards", + "RewardCurrencies", + vec![::subxt::storage::address::make_static_storage_map_key(_0.borrow())], + [ + 253u8, 41u8, 84u8, 84u8, 217u8, 109u8, 18u8, 175u8, 34u8, 133u8, 18u8, + 42u8, 239u8, 135u8, 99u8, 3u8, 104u8, 18u8, 114u8, 253u8, 108u8, 9u8, + 241u8, 37u8, 132u8, 169u8, 150u8, 110u8, 103u8, 226u8, 77u8, 91u8, + ], + ) + } + pub fn reward_currencies_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::bounded_collections::bounded_btree_set::BoundedBTreeSet< + runtime_types::primitives::currency::CurrencyId, + >, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "FarmingRewards", + "RewardCurrencies", + Vec::new(), + [ + 253u8, 41u8, 84u8, 84u8, 217u8, 109u8, 18u8, 175u8, 34u8, 133u8, 18u8, + 42u8, 239u8, 135u8, 99u8, 3u8, 104u8, 18u8, 114u8, 253u8, 108u8, 9u8, + 241u8, 37u8, 132u8, 169u8, 150u8, 110u8, 103u8, 226u8, 77u8, 91u8, + ], + ) + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + pub fn max_reward_currencies( + &self, + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "FarmingRewards", + "MaxRewardCurrencies", + [ + 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 farming { + use super::{root_mod, runtime_types}; + pub mod calls { + use super::{root_mod, 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 UpdateRewardSchedule { + pub pool_currency_id: runtime_types::primitives::currency::CurrencyId, + pub reward_currency_id: runtime_types::primitives::currency::CurrencyId, + pub period_count: ::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, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct RemoveRewardSchedule { + pub pool_currency_id: runtime_types::primitives::currency::CurrencyId, + pub reward_currency_id: runtime_types::primitives::currency::CurrencyId, + } + #[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 Deposit { + pub pool_currency_id: runtime_types::primitives::currency::CurrencyId, + 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 Withdraw { + pub pool_currency_id: runtime_types::primitives::currency::CurrencyId, + 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 Claim { + pub pool_currency_id: runtime_types::primitives::currency::CurrencyId, + pub reward_currency_id: runtime_types::primitives::currency::CurrencyId, + } + pub struct TransactionApi; + impl TransactionApi { + pub fn update_reward_schedule( + &self, + pool_currency_id: runtime_types::primitives::currency::CurrencyId, + reward_currency_id: runtime_types::primitives::currency::CurrencyId, + period_count: ::core::primitive::u32, + amount: ::core::primitive::u128, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Farming", + "update_reward_schedule", + UpdateRewardSchedule { + pool_currency_id, + reward_currency_id, + period_count, + amount, + }, + [ + 59u8, 10u8, 125u8, 158u8, 23u8, 21u8, 48u8, 193u8, 245u8, 24u8, 202u8, + 40u8, 2u8, 15u8, 220u8, 185u8, 230u8, 248u8, 165u8, 252u8, 144u8, + 108u8, 164u8, 124u8, 96u8, 191u8, 65u8, 206u8, 214u8, 90u8, 166u8, + 220u8, + ], + ) + } + pub fn remove_reward_schedule( + &self, + pool_currency_id: runtime_types::primitives::currency::CurrencyId, + reward_currency_id: runtime_types::primitives::currency::CurrencyId, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Farming", + "remove_reward_schedule", + RemoveRewardSchedule { pool_currency_id, reward_currency_id }, + [ + 66u8, 69u8, 7u8, 99u8, 1u8, 20u8, 179u8, 87u8, 87u8, 173u8, 174u8, + 90u8, 24u8, 12u8, 39u8, 220u8, 249u8, 93u8, 116u8, 65u8, 232u8, 197u8, + 139u8, 50u8, 45u8, 55u8, 181u8, 19u8, 14u8, 198u8, 37u8, 32u8, + ], + ) + } + pub fn deposit( + &self, + pool_currency_id: runtime_types::primitives::currency::CurrencyId, + amount: ::core::primitive::u128, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Farming", + "deposit", + Deposit { pool_currency_id, amount }, + [ + 91u8, 240u8, 129u8, 66u8, 80u8, 134u8, 234u8, 73u8, 166u8, 1u8, 188u8, + 132u8, 44u8, 128u8, 22u8, 252u8, 121u8, 143u8, 16u8, 156u8, 47u8, + 117u8, 107u8, 35u8, 67u8, 213u8, 145u8, 15u8, 165u8, 255u8, 130u8, + 192u8, + ], + ) + } + pub fn withdraw( + &self, + pool_currency_id: runtime_types::primitives::currency::CurrencyId, + amount: ::core::primitive::u128, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Farming", + "withdraw", + Withdraw { pool_currency_id, amount }, + [ + 240u8, 220u8, 99u8, 209u8, 166u8, 113u8, 133u8, 2u8, 49u8, 131u8, 45u8, + 223u8, 251u8, 120u8, 247u8, 188u8, 223u8, 229u8, 48u8, 186u8, 33u8, + 166u8, 58u8, 75u8, 89u8, 111u8, 113u8, 242u8, 224u8, 250u8, 22u8, 51u8, + ], + ) + } + pub fn claim( + &self, + pool_currency_id: runtime_types::primitives::currency::CurrencyId, + reward_currency_id: runtime_types::primitives::currency::CurrencyId, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Farming", + "claim", + Claim { pool_currency_id, reward_currency_id }, + [ + 162u8, 105u8, 75u8, 191u8, 14u8, 173u8, 145u8, 84u8, 211u8, 135u8, + 136u8, 53u8, 252u8, 37u8, 236u8, 101u8, 106u8, 204u8, 102u8, 68u8, + 230u8, 84u8, 196u8, 144u8, 245u8, 50u8, 133u8, 213u8, 160u8, 42u8, 3u8, + 115u8, + ], + ) + } + } + } + pub type Event = runtime_types::farming::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")] + pub struct RewardScheduleUpdated { + pub pool_currency_id: runtime_types::primitives::currency::CurrencyId, + pub reward_currency_id: runtime_types::primitives::currency::CurrencyId, + pub period_count: ::core::primitive::u32, + pub per_period: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for RewardScheduleUpdated { + const PALLET: &'static str = "Farming"; + const EVENT: &'static str = "RewardScheduleUpdated"; + } + #[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 RewardDistributed { + pub pool_currency_id: runtime_types::primitives::currency::CurrencyId, + pub reward_currency_id: runtime_types::primitives::currency::CurrencyId, + pub amount: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for RewardDistributed { + const PALLET: &'static str = "Farming"; + const EVENT: &'static str = "RewardDistributed"; + } + #[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 RewardClaimed { + pub account_id: ::subxt::utils::AccountId32, + pub pool_currency_id: runtime_types::primitives::currency::CurrencyId, + pub reward_currency_id: runtime_types::primitives::currency::CurrencyId, + pub amount: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for RewardClaimed { + const PALLET: &'static str = "Farming"; + const EVENT: &'static str = "RewardClaimed"; + } + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + pub fn reward_schedules( + &self, + _0: impl ::std::borrow::Borrow, + _1: impl ::std::borrow::Borrow, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::farming::RewardSchedule<::core::primitive::u128>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Farming", + "RewardSchedules", + vec![ + ::subxt::storage::address::make_static_storage_map_key(_0.borrow()), + ::subxt::storage::address::make_static_storage_map_key(_1.borrow()), + ], + [ + 212u8, 14u8, 48u8, 59u8, 102u8, 37u8, 84u8, 174u8, 60u8, 32u8, 38u8, + 64u8, 102u8, 110u8, 109u8, 203u8, 27u8, 189u8, 166u8, 50u8, 252u8, + 71u8, 94u8, 21u8, 123u8, 23u8, 19u8, 224u8, 162u8, 215u8, 64u8, 59u8, + ], + ) + } + pub fn reward_schedules_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::farming::RewardSchedule<::core::primitive::u128>, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Farming", + "RewardSchedules", + Vec::new(), + [ + 212u8, 14u8, 48u8, 59u8, 102u8, 37u8, 84u8, 174u8, 60u8, 32u8, 38u8, + 64u8, 102u8, 110u8, 109u8, 203u8, 27u8, 189u8, 166u8, 50u8, 252u8, + 71u8, 94u8, 21u8, 123u8, 23u8, 19u8, 224u8, 162u8, 215u8, 64u8, 59u8, + ], + ) + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + pub fn farming_pallet_id( + &self, + ) -> ::subxt::constants::Address { + ::subxt::constants::Address::new_static( + "Farming", + "FarmingPalletId", + [ + 139u8, 109u8, 228u8, 151u8, 252u8, 32u8, 130u8, 69u8, 112u8, 154u8, + 174u8, 45u8, 83u8, 245u8, 51u8, 132u8, 173u8, 5u8, 186u8, 24u8, 243u8, + 9u8, 12u8, 214u8, 80u8, 74u8, 69u8, 189u8, 30u8, 94u8, 22u8, 39u8, + ], + ) + } + pub fn treasury_account_id( + &self, + ) -> ::subxt::constants::Address<::subxt::utils::AccountId32> { + ::subxt::constants::Address::new_static( + "Farming", + "TreasuryAccountId", + [ + 167u8, 71u8, 0u8, 47u8, 217u8, 107u8, 29u8, 163u8, 157u8, 187u8, 110u8, + 219u8, 88u8, 213u8, 82u8, 107u8, 46u8, 199u8, 41u8, 110u8, 102u8, + 187u8, 45u8, 201u8, 247u8, 66u8, 33u8, 228u8, 33u8, 99u8, 242u8, 80u8, + ], + ) + } + pub fn reward_period(&self) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "Farming", + "RewardPeriod", + [ + 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 call_filter { + use super::{root_mod, runtime_types}; + pub mod calls { + use super::{root_mod, 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 Disable { + pub entry: runtime_types::pallet_call_filter::types::CallFilterEntry< + runtime_types::common::MaxStringSize, + >, + } + #[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 Enable { + pub entry: runtime_types::pallet_call_filter::types::CallFilterEntry< + runtime_types::common::MaxStringSize, + >, + } + pub struct TransactionApi; + impl TransactionApi { + pub fn disable( + &self, + entry: runtime_types::pallet_call_filter::types::CallFilterEntry< + runtime_types::common::MaxStringSize, + >, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "CallFilter", + "disable", + Disable { entry }, + [ + 135u8, 13u8, 52u8, 184u8, 86u8, 89u8, 77u8, 78u8, 232u8, 107u8, 230u8, + 67u8, 122u8, 192u8, 193u8, 4u8, 59u8, 44u8, 175u8, 209u8, 194u8, 49u8, + 73u8, 116u8, 232u8, 227u8, 56u8, 254u8, 72u8, 54u8, 206u8, 27u8, + ], + ) + } + pub fn enable( + &self, + entry: runtime_types::pallet_call_filter::types::CallFilterEntry< + runtime_types::common::MaxStringSize, + >, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "CallFilter", + "enable", + Enable { entry }, + [ + 24u8, 54u8, 83u8, 13u8, 223u8, 77u8, 229u8, 162u8, 164u8, 107u8, 208u8, + 132u8, 0u8, 252u8, 176u8, 125u8, 236u8, 185u8, 128u8, 209u8, 252u8, + 116u8, 112u8, 242u8, 25u8, 76u8, 69u8, 22u8, 4u8, 205u8, 227u8, 207u8, + ], + ) + } + } + } + pub type Event = runtime_types::pallet_call_filter::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")] + pub struct Disabled { + pub entry: runtime_types::pallet_call_filter::types::CallFilterEntry< + runtime_types::common::MaxStringSize, + >, + } + impl ::subxt::events::StaticEvent for Disabled { + const PALLET: &'static str = "CallFilter"; + const EVENT: &'static str = "Disabled"; + } + #[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 Enabled { + pub entry: runtime_types::pallet_call_filter::types::CallFilterEntry< + runtime_types::common::MaxStringSize, + >, + } + impl ::subxt::events::StaticEvent for Enabled { + const PALLET: &'static str = "CallFilter"; + const EVENT: &'static str = "Enabled"; + } + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + pub fn disabled_calls( + &self, + _0: impl ::std::borrow::Borrow< + runtime_types::pallet_call_filter::types::CallFilterEntry< + runtime_types::common::MaxStringSize, + >, + >, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + (), + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "CallFilter", + "DisabledCalls", + vec![::subxt::storage::address::make_static_storage_map_key(_0.borrow())], + [ + 54u8, 93u8, 201u8, 230u8, 97u8, 19u8, 95u8, 130u8, 213u8, 155u8, 135u8, + 208u8, 52u8, 55u8, 238u8, 157u8, 6u8, 135u8, 46u8, 136u8, 82u8, 53u8, + 1u8, 182u8, 38u8, 172u8, 140u8, 63u8, 56u8, 88u8, 173u8, 16u8, + ], + ) + } + pub fn disabled_calls_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + (), + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "CallFilter", + "DisabledCalls", + Vec::new(), + [ + 54u8, 93u8, 201u8, 230u8, 97u8, 19u8, 95u8, 130u8, 213u8, 155u8, 135u8, + 208u8, 52u8, 55u8, 238u8, 157u8, 6u8, 135u8, 46u8, 136u8, 82u8, 53u8, + 1u8, 182u8, 38u8, 172u8, 140u8, 63u8, 56u8, 88u8, 173u8, 16u8, + ], + ) + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + pub fn max_string_size( + &self, + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "CallFilter", + "MaxStringSize", + [ + 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 cosmwasm { + use super::{root_mod, runtime_types}; + pub mod calls { + use super::{root_mod, 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 Upload { + pub code: 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, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Instantiate { + pub code_identifier: runtime_types::pallet_cosmwasm::types::CodeIdentifier, + pub salt: runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + pub admin: ::core::option::Option<::subxt::utils::AccountId32>, + pub label: runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + pub funds: runtime_types::bounded_collections::bounded_btree_map::BoundedBTreeMap< + runtime_types::primitives::currency::CurrencyId, + (::core::primitive::u128, ::core::primitive::bool), + >, + pub gas: ::core::primitive::u64, + pub message: 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, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Execute { + pub contract: ::subxt::utils::AccountId32, + pub funds: runtime_types::bounded_collections::bounded_btree_map::BoundedBTreeMap< + runtime_types::primitives::currency::CurrencyId, + (::core::primitive::u128, ::core::primitive::bool), + >, + pub gas: ::core::primitive::u64, + pub message: 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, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Migrate { + pub contract: ::subxt::utils::AccountId32, + pub new_code_identifier: runtime_types::pallet_cosmwasm::types::CodeIdentifier, + pub gas: ::core::primitive::u64, + pub message: 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, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct UpdateAdmin { + pub contract: ::subxt::utils::AccountId32, + pub new_admin: ::core::option::Option<::subxt::utils::AccountId32>, + pub gas: ::core::primitive::u64, + } + pub struct TransactionApi; + impl TransactionApi { + pub fn upload( + &self, + code: runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Cosmwasm", + "upload", + Upload { code }, + [ + 46u8, 215u8, 183u8, 97u8, 138u8, 131u8, 98u8, 17u8, 75u8, 155u8, 50u8, + 211u8, 151u8, 56u8, 150u8, 35u8, 181u8, 55u8, 0u8, 47u8, 34u8, 43u8, + 12u8, 134u8, 136u8, 184u8, 109u8, 68u8, 195u8, 67u8, 152u8, 247u8, + ], + ) + } + pub fn instantiate( + &self, + code_identifier: runtime_types::pallet_cosmwasm::types::CodeIdentifier, + salt: runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + admin: ::core::option::Option<::subxt::utils::AccountId32>, + label: runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + funds: runtime_types::bounded_collections::bounded_btree_map::BoundedBTreeMap< + runtime_types::primitives::currency::CurrencyId, + (::core::primitive::u128, ::core::primitive::bool), + >, + gas: ::core::primitive::u64, + message: runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Cosmwasm", + "instantiate", + Instantiate { code_identifier, salt, admin, label, funds, gas, message }, + [ + 112u8, 217u8, 14u8, 221u8, 110u8, 172u8, 201u8, 161u8, 229u8, 64u8, + 23u8, 98u8, 174u8, 84u8, 48u8, 15u8, 47u8, 83u8, 131u8, 76u8, 199u8, + 196u8, 146u8, 136u8, 249u8, 253u8, 172u8, 158u8, 89u8, 98u8, 9u8, + 115u8, + ], + ) + } + pub fn execute( + &self, + contract: ::subxt::utils::AccountId32, + funds: runtime_types::bounded_collections::bounded_btree_map::BoundedBTreeMap< + runtime_types::primitives::currency::CurrencyId, + (::core::primitive::u128, ::core::primitive::bool), + >, + gas: ::core::primitive::u64, + message: runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Cosmwasm", + "execute", + Execute { contract, funds, gas, message }, + [ + 152u8, 193u8, 214u8, 152u8, 133u8, 46u8, 29u8, 93u8, 125u8, 53u8, + 250u8, 156u8, 157u8, 97u8, 216u8, 220u8, 203u8, 94u8, 214u8, 222u8, + 79u8, 36u8, 190u8, 226u8, 198u8, 139u8, 85u8, 95u8, 91u8, 192u8, 212u8, + 224u8, + ], + ) + } + pub fn migrate( + &self, + contract: ::subxt::utils::AccountId32, + new_code_identifier: runtime_types::pallet_cosmwasm::types::CodeIdentifier, + gas: ::core::primitive::u64, + message: runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Cosmwasm", + "migrate", + Migrate { contract, new_code_identifier, gas, message }, + [ + 208u8, 32u8, 224u8, 63u8, 121u8, 137u8, 220u8, 124u8, 239u8, 214u8, + 104u8, 87u8, 21u8, 93u8, 154u8, 245u8, 42u8, 100u8, 174u8, 31u8, 178u8, + 60u8, 29u8, 85u8, 197u8, 69u8, 151u8, 70u8, 64u8, 150u8, 44u8, 15u8, + ], + ) + } + pub fn update_admin( + &self, + contract: ::subxt::utils::AccountId32, + new_admin: ::core::option::Option<::subxt::utils::AccountId32>, + gas: ::core::primitive::u64, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Cosmwasm", + "update_admin", + UpdateAdmin { contract, new_admin, gas }, + [ + 90u8, 91u8, 234u8, 105u8, 116u8, 222u8, 156u8, 108u8, 141u8, 212u8, + 10u8, 40u8, 183u8, 226u8, 213u8, 128u8, 171u8, 238u8, 146u8, 83u8, + 49u8, 13u8, 151u8, 182u8, 207u8, 86u8, 119u8, 224u8, 160u8, 213u8, + 243u8, 195u8, + ], + ) + } + } + } + pub type Event = runtime_types::pallet_cosmwasm::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")] + pub struct Uploaded { + pub code_hash: [::core::primitive::u8; 32usize], + pub code_id: ::core::primitive::u64, + } + impl ::subxt::events::StaticEvent for Uploaded { + const PALLET: &'static str = "Cosmwasm"; + const EVENT: &'static str = "Uploaded"; + } + #[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 Instantiated { + pub contract: ::subxt::utils::AccountId32, + pub info: runtime_types::pallet_cosmwasm::types::ContractInfo< + ::subxt::utils::AccountId32, + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + >, + } + impl ::subxt::events::StaticEvent for Instantiated { + const PALLET: &'static str = "Cosmwasm"; + const EVENT: &'static str = "Instantiated"; + } + #[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 Executed { + pub contract: ::subxt::utils::AccountId32, + pub entrypoint: runtime_types::pallet_cosmwasm::types::EntryPoint, + pub data: ::core::option::Option<::std::vec::Vec<::core::primitive::u8>>, + } + impl ::subxt::events::StaticEvent for Executed { + const PALLET: &'static str = "Cosmwasm"; + const EVENT: &'static str = "Executed"; + } + #[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 ExecutionFailed { + pub contract: ::subxt::utils::AccountId32, + pub entrypoint: runtime_types::pallet_cosmwasm::types::EntryPoint, + pub error: ::std::vec::Vec<::core::primitive::u8>, + } + impl ::subxt::events::StaticEvent for ExecutionFailed { + const PALLET: &'static str = "Cosmwasm"; + const EVENT: &'static str = "ExecutionFailed"; + } + #[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 Emitted { + pub contract: ::subxt::utils::AccountId32, + pub ty: ::std::vec::Vec<::core::primitive::u8>, + pub attributes: ::std::vec::Vec<( + ::std::vec::Vec<::core::primitive::u8>, + ::std::vec::Vec<::core::primitive::u8>, + )>, + } + impl ::subxt::events::StaticEvent for Emitted { + const PALLET: &'static str = "Cosmwasm"; + const EVENT: &'static str = "Emitted"; + } + #[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 Migrated { + pub contract: ::subxt::utils::AccountId32, + pub to: ::core::primitive::u64, + } + impl ::subxt::events::StaticEvent for Migrated { + const PALLET: &'static str = "Cosmwasm"; + const EVENT: &'static str = "Migrated"; + } + #[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 AdminUpdated { + pub contract: ::subxt::utils::AccountId32, + pub new_admin: ::core::option::Option<::subxt::utils::AccountId32>, + } + impl ::subxt::events::StaticEvent for AdminUpdated { + const PALLET: &'static str = "Cosmwasm"; + const EVENT: &'static str = "AdminUpdated"; + } + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + pub fn pristine_code( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u64>, + ) -> ::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( + "Cosmwasm", + "PristineCode", + vec![::subxt::storage::address::make_static_storage_map_key(_0.borrow())], + [ + 79u8, 150u8, 181u8, 109u8, 57u8, 227u8, 51u8, 18u8, 238u8, 33u8, 184u8, + 234u8, 110u8, 199u8, 38u8, 21u8, 151u8, 94u8, 206u8, 59u8, 41u8, 222u8, + 9u8, 237u8, 91u8, 130u8, 129u8, 219u8, 19u8, 168u8, 82u8, 56u8, + ], + ) + } + pub fn pristine_code_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( + "Cosmwasm", + "PristineCode", + Vec::new(), + [ + 79u8, 150u8, 181u8, 109u8, 57u8, 227u8, 51u8, 18u8, 238u8, 33u8, 184u8, + 234u8, 110u8, 199u8, 38u8, 21u8, 151u8, 94u8, 206u8, 59u8, 41u8, 222u8, + 9u8, 237u8, 91u8, 130u8, 129u8, 219u8, 19u8, 168u8, 82u8, 56u8, + ], + ) + } + pub fn instrumented_code( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u64>, + ) -> ::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( + "Cosmwasm", + "InstrumentedCode", + vec![::subxt::storage::address::make_static_storage_map_key(_0.borrow())], + [ + 26u8, 54u8, 181u8, 51u8, 227u8, 64u8, 39u8, 161u8, 10u8, 30u8, 115u8, + 95u8, 219u8, 194u8, 208u8, 180u8, 2u8, 189u8, 3u8, 12u8, 86u8, 134u8, + 158u8, 15u8, 110u8, 63u8, 241u8, 65u8, 146u8, 79u8, 1u8, 230u8, + ], + ) + } + pub fn instrumented_code_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( + "Cosmwasm", + "InstrumentedCode", + Vec::new(), + [ + 26u8, 54u8, 181u8, 51u8, 227u8, 64u8, 39u8, 161u8, 10u8, 30u8, 115u8, + 95u8, 219u8, 194u8, 208u8, 180u8, 2u8, 189u8, 3u8, 12u8, 86u8, 134u8, + 158u8, 15u8, 110u8, 63u8, 241u8, 65u8, 146u8, 79u8, 1u8, 230u8, + ], + ) + } + pub fn current_code_id( + &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( + "Cosmwasm", + "CurrentCodeId", + vec![], + [ + 152u8, 186u8, 207u8, 74u8, 80u8, 134u8, 213u8, 20u8, 242u8, 188u8, + 145u8, 200u8, 199u8, 41u8, 238u8, 182u8, 147u8, 235u8, 123u8, 74u8, + 92u8, 121u8, 120u8, 17u8, 141u8, 255u8, 9u8, 202u8, 152u8, 38u8, 45u8, + 139u8, + ], + ) + } + pub fn code_id_to_info( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u64>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_cosmwasm::types::CodeInfo<::subxt::utils::AccountId32>, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Cosmwasm", + "CodeIdToInfo", + vec![::subxt::storage::address::make_static_storage_map_key(_0.borrow())], + [ + 63u8, 94u8, 227u8, 200u8, 216u8, 148u8, 23u8, 63u8, 34u8, 158u8, 15u8, + 108u8, 103u8, 95u8, 239u8, 212u8, 237u8, 156u8, 19u8, 49u8, 217u8, + 135u8, 160u8, 243u8, 72u8, 244u8, 94u8, 76u8, 66u8, 196u8, 224u8, 59u8, + ], + ) + } + pub fn code_id_to_info_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_cosmwasm::types::CodeInfo<::subxt::utils::AccountId32>, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Cosmwasm", + "CodeIdToInfo", + Vec::new(), + [ + 63u8, 94u8, 227u8, 200u8, 216u8, 148u8, 23u8, 63u8, 34u8, 158u8, 15u8, + 108u8, 103u8, 95u8, 239u8, 212u8, 237u8, 156u8, 19u8, 49u8, 217u8, + 135u8, 160u8, 243u8, 72u8, 244u8, 94u8, 76u8, 66u8, 196u8, 224u8, 59u8, + ], + ) + } + pub fn code_hash_to_id( + &self, + _0: impl ::std::borrow::Borrow<[::core::primitive::u8; 32usize]>, + ) -> ::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( + "Cosmwasm", + "CodeHashToId", + vec![::subxt::storage::address::make_static_storage_map_key(_0.borrow())], + [ + 39u8, 218u8, 110u8, 92u8, 70u8, 35u8, 90u8, 62u8, 132u8, 157u8, 206u8, + 197u8, 255u8, 213u8, 209u8, 195u8, 174u8, 242u8, 183u8, 75u8, 254u8, + 52u8, 161u8, 150u8, 18u8, 167u8, 141u8, 170u8, 245u8, 207u8, 60u8, + 49u8, + ], + ) + } + pub fn code_hash_to_id_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u64, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Cosmwasm", + "CodeHashToId", + Vec::new(), + [ + 39u8, 218u8, 110u8, 92u8, 70u8, 35u8, 90u8, 62u8, 132u8, 157u8, 206u8, + 197u8, 255u8, 213u8, 209u8, 195u8, 174u8, 242u8, 183u8, 75u8, 254u8, + 52u8, 161u8, 150u8, 18u8, 167u8, 141u8, 170u8, 245u8, 207u8, 60u8, + 49u8, + ], + ) + } + pub fn current_nonce( + &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( + "Cosmwasm", + "CurrentNonce", + vec![], + [ + 33u8, 7u8, 37u8, 162u8, 216u8, 134u8, 22u8, 195u8, 233u8, 188u8, 112u8, + 93u8, 142u8, 55u8, 241u8, 194u8, 45u8, 249u8, 44u8, 28u8, 80u8, 161u8, + 205u8, 179u8, 187u8, 54u8, 126u8, 255u8, 174u8, 38u8, 142u8, 201u8, + ], + ) + } + pub fn contract_to_info( + &self, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_cosmwasm::types::ContractInfo< + ::subxt::utils::AccountId32, + runtime_types::bounded_collections::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::Address::new_static( + "Cosmwasm", + "ContractToInfo", + vec![::subxt::storage::address::make_static_storage_map_key(_0.borrow())], + [ + 67u8, 240u8, 240u8, 193u8, 198u8, 143u8, 97u8, 148u8, 166u8, 192u8, + 99u8, 159u8, 24u8, 84u8, 195u8, 122u8, 151u8, 142u8, 42u8, 50u8, 209u8, + 114u8, 28u8, 11u8, 202u8, 107u8, 159u8, 224u8, 218u8, 229u8, 177u8, + 244u8, + ], + ) + } + pub fn contract_to_info_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_cosmwasm::types::ContractInfo< + ::subxt::utils::AccountId32, + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + >, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Cosmwasm", + "ContractToInfo", + Vec::new(), + [ + 67u8, 240u8, 240u8, 193u8, 198u8, 143u8, 97u8, 148u8, 166u8, 192u8, + 99u8, 159u8, 24u8, 84u8, 195u8, 122u8, 151u8, 142u8, 42u8, 50u8, 209u8, + 114u8, 28u8, 11u8, 202u8, 107u8, 159u8, 224u8, 218u8, 229u8, 177u8, + 244u8, + ], + ) + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; impl ConstantsApi { - pub fn max_string_size( + pub fn pallet_id( + &self, + ) -> ::subxt::constants::Address { + ::subxt::constants::Address::new_static( + "Cosmwasm", + "PalletId", + [ + 139u8, 109u8, 228u8, 151u8, 252u8, 32u8, 130u8, 69u8, 112u8, 154u8, + 174u8, 45u8, 83u8, 245u8, 51u8, 132u8, 173u8, 5u8, 186u8, 24u8, 243u8, + 9u8, 12u8, 214u8, 80u8, 74u8, 69u8, 189u8, 30u8, 94u8, 22u8, 39u8, + ], + ) + } + pub fn chain_id(&self) -> ::subxt::constants::Address<::std::string::String> { + ::subxt::constants::Address::new_static( + "Cosmwasm", + "ChainId", + [ + 251u8, 233u8, 211u8, 209u8, 5u8, 66u8, 94u8, 200u8, 148u8, 166u8, + 119u8, 200u8, 59u8, 180u8, 70u8, 77u8, 182u8, 127u8, 45u8, 65u8, 28u8, + 104u8, 253u8, 149u8, 167u8, 216u8, 2u8, 94u8, 39u8, 173u8, 198u8, + 219u8, + ], + ) + } + pub fn max_frames(&self) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "Cosmwasm", + "MaxFrames", + [ + 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 max_code_size(&self) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "Cosmwasm", + "MaxCodeSize", + [ + 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 max_instrumented_code_size( + &self, + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "Cosmwasm", + "MaxInstrumentedCodeSize", + [ + 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 max_message_size( + &self, + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "Cosmwasm", + "MaxMessageSize", + [ + 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 max_contract_label_size( + &self, + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "Cosmwasm", + "MaxContractLabelSize", + [ + 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 max_contract_trie_id_size( + &self, + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "Cosmwasm", + "MaxContractTrieIdSize", + [ + 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 max_instantiate_salt_size( + &self, + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "Cosmwasm", + "MaxInstantiateSaltSize", + [ + 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 max_funds_assets( + &self, + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "Cosmwasm", + "MaxFundsAssets", + [ + 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 code_table_size_limit( + &self, + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "Cosmwasm", + "CodeTableSizeLimit", + [ + 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 code_global_variable_limit( + &self, + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "Cosmwasm", + "CodeGlobalVariableLimit", + [ + 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 code_parameter_limit( + &self, + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "Cosmwasm", + "CodeParameterLimit", + [ + 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 code_branch_table_size_limit( + &self, + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "Cosmwasm", + "CodeBranchTableSizeLimit", + [ + 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 code_stack_limit( + &self, + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "Cosmwasm", + "CodeStackLimit", + [ + 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 code_storage_byte_deposit( + &self, + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "Cosmwasm", + "CodeStorageByteDeposit", + [ + 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 contract_storage_byte_write_price( + &self, + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "Cosmwasm", + "ContractStorageByteWritePrice", + [ + 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 contract_storage_byte_read_price( &self, ) -> ::subxt::constants::Address<::core::primitive::u32> { ::subxt::constants::Address::new_static( - "CallFilter", - "MaxStringSize", + "Cosmwasm", + "ContractStorageByteReadPrice", [ 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, @@ -20539,6 +21939,21 @@ pub mod api { ], ) } + pub fn wasm_cost_rules( + &self, + ) -> ::subxt::constants::Address< + runtime_types::pallet_cosmwasm::instrument::CostRules, + > { + ::subxt::constants::Address::new_static( + "Cosmwasm", + "WasmCostRules", + [ + 156u8, 160u8, 194u8, 19u8, 105u8, 92u8, 5u8, 136u8, 108u8, 108u8, 98u8, + 6u8, 242u8, 28u8, 25u8, 145u8, 132u8, 35u8, 247u8, 85u8, 28u8, 170u8, + 166u8, 209u8, 173u8, 85u8, 65u8, 15u8, 94u8, 73u8, 19u8, 90u8, + ], + ) + } } } } @@ -20572,7 +21987,7 @@ pub mod api { pub params: runtime_types::pallet_ibc::TransferParams<::subxt::utils::AccountId32>, pub asset_id: runtime_types::primitives::currency::CurrencyId, pub amount: ::core::primitive::u128, - pub memo: ::core::option::Option, + pub memo: ::core::option::Option<::std::string::String>, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -20609,6 +22024,60 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct IncreaseCounters; + #[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 AddChannelsToFeelessChannelList { + pub source_channel: ::core::primitive::u64, + pub destination_channel: ::core::primitive::u64, + } + #[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 RemoveChannelsFromFeelessChannelList { + pub source_channel: ::core::primitive::u64, + pub destination_channel: ::core::primitive::u64, + } + #[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 SetChildStorage { + pub key: ::std::vec::Vec<::core::primitive::u8>, + pub value: ::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 SubstituteClientState { + pub client_id: ::std::string::String, + pub height: runtime_types::ibc::core::ics02_client::height::Height, + pub client_state_bytes: ::std::vec::Vec<::core::primitive::u8>, + pub consensus_state_bytes: ::std::vec::Vec<::core::primitive::u8>, + } pub struct TransactionApi; impl TransactionApi { pub fn deliver( @@ -20632,16 +22101,16 @@ pub mod api { params: runtime_types::pallet_ibc::TransferParams<::subxt::utils::AccountId32>, asset_id: runtime_types::primitives::currency::CurrencyId, amount: ::core::primitive::u128, - memo: ::core::option::Option, + memo: ::core::option::Option<::std::string::String>, ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Ibc", "transfer", Transfer { params, asset_id, amount, memo }, [ - 104u8, 136u8, 36u8, 50u8, 105u8, 241u8, 120u8, 243u8, 74u8, 48u8, - 173u8, 124u8, 56u8, 78u8, 20u8, 193u8, 27u8, 73u8, 16u8, 127u8, 125u8, - 113u8, 70u8, 115u8, 43u8, 2u8, 103u8, 109u8, 208u8, 40u8, 10u8, 36u8, + 41u8, 191u8, 254u8, 178u8, 218u8, 14u8, 149u8, 146u8, 80u8, 247u8, + 198u8, 233u8, 37u8, 24u8, 139u8, 11u8, 211u8, 99u8, 94u8, 17u8, 86u8, + 157u8, 187u8, 67u8, 80u8, 218u8, 88u8, 117u8, 151u8, 11u8, 29u8, 70u8, ], ) } @@ -20688,6 +22157,82 @@ pub mod api { ], ) } + pub fn add_channels_to_feeless_channel_list( + &self, + source_channel: ::core::primitive::u64, + destination_channel: ::core::primitive::u64, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Ibc", + "add_channels_to_feeless_channel_list", + AddChannelsToFeelessChannelList { source_channel, destination_channel }, + [ + 94u8, 90u8, 107u8, 98u8, 113u8, 134u8, 183u8, 32u8, 208u8, 138u8, + 173u8, 24u8, 152u8, 97u8, 73u8, 1u8, 95u8, 126u8, 203u8, 112u8, 13u8, + 122u8, 126u8, 7u8, 141u8, 110u8, 13u8, 185u8, 252u8, 71u8, 163u8, 18u8, + ], + ) + } + pub fn remove_channels_from_feeless_channel_list( + &self, + source_channel: ::core::primitive::u64, + destination_channel: ::core::primitive::u64, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Ibc", + "remove_channels_from_feeless_channel_list", + RemoveChannelsFromFeelessChannelList { + source_channel, + destination_channel, + }, + [ + 56u8, 207u8, 158u8, 148u8, 9u8, 34u8, 243u8, 213u8, 138u8, 143u8, 10u8, + 115u8, 118u8, 197u8, 187u8, 250u8, 210u8, 187u8, 169u8, 157u8, 158u8, + 61u8, 241u8, 90u8, 117u8, 123u8, 239u8, 105u8, 99u8, 196u8, 254u8, + 116u8, + ], + ) + } + pub fn set_child_storage( + &self, + key: ::std::vec::Vec<::core::primitive::u8>, + value: ::std::vec::Vec<::core::primitive::u8>, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Ibc", + "set_child_storage", + SetChildStorage { key, value }, + [ + 54u8, 168u8, 178u8, 188u8, 166u8, 223u8, 180u8, 182u8, 208u8, 217u8, + 154u8, 231u8, 21u8, 88u8, 211u8, 188u8, 63u8, 192u8, 34u8, 236u8, + 153u8, 118u8, 18u8, 41u8, 198u8, 99u8, 241u8, 132u8, 58u8, 170u8, 40u8, + 74u8, + ], + ) + } + pub fn substitute_client_state( + &self, + client_id: ::std::string::String, + height: runtime_types::ibc::core::ics02_client::height::Height, + client_state_bytes: ::std::vec::Vec<::core::primitive::u8>, + consensus_state_bytes: ::std::vec::Vec<::core::primitive::u8>, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Ibc", + "substitute_client_state", + SubstituteClientState { + client_id, + height, + client_state_bytes, + consensus_state_bytes, + }, + [ + 156u8, 107u8, 88u8, 238u8, 241u8, 13u8, 71u8, 9u8, 14u8, 67u8, 82u8, + 154u8, 205u8, 108u8, 253u8, 145u8, 3u8, 251u8, 93u8, 169u8, 43u8, 26u8, + 16u8, 209u8, 148u8, 111u8, 99u8, 155u8, 32u8, 145u8, 19u8, 149u8, + ], + ) + } } } pub type Event = runtime_types::pallet_ibc::pallet::Event; @@ -20723,20 +22268,180 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct TokenTransferInitiated { - pub from: ::std::vec::Vec<::core::primitive::u8>, - pub to: ::std::vec::Vec<::core::primitive::u8>, - pub ibc_denom: ::std::vec::Vec<::core::primitive::u8>, - pub local_asset_id: - ::core::option::Option, - pub amount: ::core::primitive::u128, - pub is_sender_source: ::core::primitive::bool, - pub source_channel: ::std::vec::Vec<::core::primitive::u8>, - pub destination_channel: ::std::vec::Vec<::core::primitive::u8>, - } - impl ::subxt::events::StaticEvent for TokenTransferInitiated { + pub struct TokenTransferInitiated { + pub from: ::std::vec::Vec<::core::primitive::u8>, + pub to: ::std::vec::Vec<::core::primitive::u8>, + pub ibc_denom: ::std::vec::Vec<::core::primitive::u8>, + pub local_asset_id: + ::core::option::Option, + pub amount: ::core::primitive::u128, + pub is_sender_source: ::core::primitive::bool, + pub source_channel: ::std::vec::Vec<::core::primitive::u8>, + pub destination_channel: ::std::vec::Vec<::core::primitive::u8>, + } + impl ::subxt::events::StaticEvent for TokenTransferInitiated { + const PALLET: &'static str = "Ibc"; + const EVENT: &'static str = "TokenTransferInitiated"; + } + #[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 ChannelOpened { + pub channel_id: ::std::vec::Vec<::core::primitive::u8>, + pub port_id: ::std::vec::Vec<::core::primitive::u8>, + } + impl ::subxt::events::StaticEvent for ChannelOpened { + const PALLET: &'static str = "Ibc"; + const EVENT: &'static str = "ChannelOpened"; + } + #[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 ParamsUpdated { + pub send_enabled: ::core::primitive::bool, + pub receive_enabled: ::core::primitive::bool, + } + impl ::subxt::events::StaticEvent for ParamsUpdated { + const PALLET: &'static str = "Ibc"; + const EVENT: &'static str = "ParamsUpdated"; + } + #[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 TokenTransferCompleted { + pub from: runtime_types::ibc::signer::Signer, + pub to: runtime_types::ibc::signer::Signer, + pub ibc_denom: ::std::vec::Vec<::core::primitive::u8>, + pub local_asset_id: + ::core::option::Option, + pub amount: ::core::primitive::u128, + pub is_sender_source: ::core::primitive::bool, + pub source_channel: ::std::vec::Vec<::core::primitive::u8>, + pub destination_channel: ::std::vec::Vec<::core::primitive::u8>, + } + impl ::subxt::events::StaticEvent for TokenTransferCompleted { + const PALLET: &'static str = "Ibc"; + const EVENT: &'static str = "TokenTransferCompleted"; + } + #[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 TokenReceived { + pub from: runtime_types::ibc::signer::Signer, + pub to: runtime_types::ibc::signer::Signer, + pub ibc_denom: ::std::vec::Vec<::core::primitive::u8>, + pub local_asset_id: + ::core::option::Option, + pub amount: ::core::primitive::u128, + pub is_receiver_source: ::core::primitive::bool, + pub source_channel: ::std::vec::Vec<::core::primitive::u8>, + pub destination_channel: ::std::vec::Vec<::core::primitive::u8>, + } + impl ::subxt::events::StaticEvent for TokenReceived { + const PALLET: &'static str = "Ibc"; + const EVENT: &'static str = "TokenReceived"; + } + #[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 TokenTransferFailed { + pub from: runtime_types::ibc::signer::Signer, + pub to: runtime_types::ibc::signer::Signer, + pub ibc_denom: ::std::vec::Vec<::core::primitive::u8>, + pub local_asset_id: + ::core::option::Option, + pub amount: ::core::primitive::u128, + pub is_sender_source: ::core::primitive::bool, + pub source_channel: ::std::vec::Vec<::core::primitive::u8>, + pub destination_channel: ::std::vec::Vec<::core::primitive::u8>, + } + impl ::subxt::events::StaticEvent for TokenTransferFailed { + const PALLET: &'static str = "Ibc"; + const EVENT: &'static str = "TokenTransferFailed"; + } + #[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 TokenTransferTimeout { + pub from: runtime_types::ibc::signer::Signer, + pub to: runtime_types::ibc::signer::Signer, + pub ibc_denom: ::std::vec::Vec<::core::primitive::u8>, + pub local_asset_id: + ::core::option::Option, + pub amount: ::core::primitive::u128, + pub is_sender_source: ::core::primitive::bool, + pub source_channel: ::std::vec::Vec<::core::primitive::u8>, + pub destination_channel: ::std::vec::Vec<::core::primitive::u8>, + } + impl ::subxt::events::StaticEvent for TokenTransferTimeout { + const PALLET: &'static str = "Ibc"; + const EVENT: &'static str = "TokenTransferTimeout"; + } + #[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 OnRecvPacketError { + pub msg: ::std::vec::Vec<::core::primitive::u8>, + } + impl ::subxt::events::StaticEvent for OnRecvPacketError { + const PALLET: &'static str = "Ibc"; + const EVENT: &'static str = "OnRecvPacketError"; + } + #[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 ClientUpgradeSet; + impl ::subxt::events::StaticEvent for ClientUpgradeSet { const PALLET: &'static str = "Ibc"; - const EVENT: &'static str = "TokenTransferInitiated"; + const EVENT: &'static str = "ClientUpgradeSet"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -20747,13 +22452,14 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ChannelOpened { - pub channel_id: ::std::vec::Vec<::core::primitive::u8>, - pub port_id: ::std::vec::Vec<::core::primitive::u8>, + pub struct ClientFrozen { + pub client_id: ::std::vec::Vec<::core::primitive::u8>, + pub height: ::core::primitive::u64, + pub revision_number: ::core::primitive::u64, } - impl ::subxt::events::StaticEvent for ChannelOpened { + impl ::subxt::events::StaticEvent for ClientFrozen { const PALLET: &'static str = "Ibc"; - const EVENT: &'static str = "ChannelOpened"; + const EVENT: &'static str = "ClientFrozen"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -20764,13 +22470,12 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ParamsUpdated { - pub send_enabled: ::core::primitive::bool, - pub receive_enabled: ::core::primitive::bool, + pub struct AssetAdminUpdated { + pub admin_account: ::subxt::utils::AccountId32, } - impl ::subxt::events::StaticEvent for ParamsUpdated { + impl ::subxt::events::StaticEvent for AssetAdminUpdated { const PALLET: &'static str = "Ibc"; - const EVENT: &'static str = "ParamsUpdated"; + const EVENT: &'static str = "AssetAdminUpdated"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -20781,20 +22486,13 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct TokenTransferCompleted { - pub from: runtime_types::ibc::signer::Signer, - pub to: runtime_types::ibc::signer::Signer, - pub ibc_denom: ::std::vec::Vec<::core::primitive::u8>, - pub local_asset_id: - ::core::option::Option, - pub amount: ::core::primitive::u128, - pub is_sender_source: ::core::primitive::bool, - pub source_channel: ::std::vec::Vec<::core::primitive::u8>, - pub destination_channel: ::std::vec::Vec<::core::primitive::u8>, + pub struct FeeLessChannelIdsAdded { + pub source_channel: ::core::primitive::u64, + pub destination_channel: ::core::primitive::u64, } - impl ::subxt::events::StaticEvent for TokenTransferCompleted { + impl ::subxt::events::StaticEvent for FeeLessChannelIdsAdded { const PALLET: &'static str = "Ibc"; - const EVENT: &'static str = "TokenTransferCompleted"; + const EVENT: &'static str = "FeeLessChannelIdsAdded"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -20805,20 +22503,13 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct TokenReceived { - pub from: runtime_types::ibc::signer::Signer, - pub to: runtime_types::ibc::signer::Signer, - pub ibc_denom: ::std::vec::Vec<::core::primitive::u8>, - pub local_asset_id: - ::core::option::Option, - pub amount: ::core::primitive::u128, - pub is_receiver_source: ::core::primitive::bool, - pub source_channel: ::std::vec::Vec<::core::primitive::u8>, - pub destination_channel: ::std::vec::Vec<::core::primitive::u8>, + pub struct FeeLessChannelIdsRemoved { + pub source_channel: ::core::primitive::u64, + pub destination_channel: ::core::primitive::u64, } - impl ::subxt::events::StaticEvent for TokenReceived { + impl ::subxt::events::StaticEvent for FeeLessChannelIdsRemoved { const PALLET: &'static str = "Ibc"; - const EVENT: &'static str = "TokenReceived"; + const EVENT: &'static str = "FeeLessChannelIdsRemoved"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -20829,22 +22520,24 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct TokenTransferFailed { - pub from: runtime_types::ibc::signer::Signer, - pub to: runtime_types::ibc::signer::Signer, + pub struct ChargingFeeOnTransferInitiated { + pub sequence: ::core::primitive::u64, + pub from: ::std::vec::Vec<::core::primitive::u8>, + pub to: ::std::vec::Vec<::core::primitive::u8>, pub ibc_denom: ::std::vec::Vec<::core::primitive::u8>, pub local_asset_id: ::core::option::Option, pub amount: ::core::primitive::u128, - pub is_sender_source: ::core::primitive::bool, + pub is_flat_fee: ::core::primitive::bool, pub source_channel: ::std::vec::Vec<::core::primitive::u8>, pub destination_channel: ::std::vec::Vec<::core::primitive::u8>, } - impl ::subxt::events::StaticEvent for TokenTransferFailed { + impl ::subxt::events::StaticEvent for ChargingFeeOnTransferInitiated { const PALLET: &'static str = "Ibc"; - const EVENT: &'static str = "TokenTransferFailed"; + const EVENT: &'static str = "ChargingFeeOnTransferInitiated"; } #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -20853,22 +22546,15 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct TokenTransferTimeout { - pub from: runtime_types::ibc::signer::Signer, - pub to: runtime_types::ibc::signer::Signer, - pub ibc_denom: ::std::vec::Vec<::core::primitive::u8>, - pub local_asset_id: - ::core::option::Option, - pub amount: ::core::primitive::u128, - pub is_sender_source: ::core::primitive::bool, - pub source_channel: ::std::vec::Vec<::core::primitive::u8>, - pub destination_channel: ::std::vec::Vec<::core::primitive::u8>, + pub struct ChargingFeeConfirmed { + pub sequence: ::core::primitive::u64, } - impl ::subxt::events::StaticEvent for TokenTransferTimeout { + impl ::subxt::events::StaticEvent for ChargingFeeConfirmed { const PALLET: &'static str = "Ibc"; - const EVENT: &'static str = "TokenTransferTimeout"; + const EVENT: &'static str = "ChargingFeeConfirmed"; } #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -20877,14 +22563,15 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct OnRecvPacketError { - pub msg: ::std::vec::Vec<::core::primitive::u8>, + pub struct ChargingFeeTimeout { + pub sequence: ::core::primitive::u64, } - impl ::subxt::events::StaticEvent for OnRecvPacketError { + impl ::subxt::events::StaticEvent for ChargingFeeTimeout { const PALLET: &'static str = "Ibc"; - const EVENT: &'static str = "OnRecvPacketError"; + const EVENT: &'static str = "ChargingFeeTimeout"; } #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -20893,10 +22580,12 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ClientUpgradeSet; - impl ::subxt::events::StaticEvent for ClientUpgradeSet { + pub struct ChargingFeeFailedAcknowledgement { + pub sequence: ::core::primitive::u64, + } + impl ::subxt::events::StaticEvent for ChargingFeeFailedAcknowledgement { const PALLET: &'static str = "Ibc"; - const EVENT: &'static str = "ClientUpgradeSet"; + const EVENT: &'static str = "ChargingFeeFailedAcknowledgement"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -20907,14 +22596,10 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ClientFrozen { - pub client_id: ::std::vec::Vec<::core::primitive::u8>, - pub height: ::core::primitive::u64, - pub revision_number: ::core::primitive::u64, - } - impl ::subxt::events::StaticEvent for ClientFrozen { + pub struct ChildStateUpdated; + impl ::subxt::events::StaticEvent for ChildStateUpdated { const PALLET: &'static str = "Ibc"; - const EVENT: &'static str = "ClientFrozen"; + const EVENT: &'static str = "ChildStateUpdated"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -20925,12 +22610,13 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AssetAdminUpdated { - pub admin_account: ::subxt::utils::AccountId32, + pub struct ClientStateSubstituted { + pub client_id: ::std::string::String, + pub height: runtime_types::ibc::core::ics02_client::height::Height, } - impl ::subxt::events::StaticEvent for AssetAdminUpdated { + impl ::subxt::events::StaticEvent for ClientStateSubstituted { const PALLET: &'static str = "Ibc"; - const EVENT: &'static str = "AssetAdminUpdated"; + const EVENT: &'static str = "ClientStateSubstituted"; } } pub mod storage { @@ -20984,6 +22670,26 @@ pub mod api { ], ) } + pub fn service_charge_out( + &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( + "Ibc", + "ServiceChargeOut", + vec![], + [ + 3u8, 153u8, 106u8, 100u8, 56u8, 235u8, 77u8, 52u8, 230u8, 105u8, 155u8, + 35u8, 156u8, 113u8, 41u8, 45u8, 92u8, 253u8, 248u8, 97u8, 201u8, 101u8, + 18u8, 85u8, 248u8, 6u8, 200u8, 191u8, 42u8, 67u8, 172u8, 151u8, + ], + ) + } pub fn client_update_time( &self, _0: impl ::std::borrow::Borrow<[::core::primitive::u8]>, @@ -21118,6 +22824,92 @@ pub mod api { ], ) } + pub fn fee_less_channel_ids( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u64>, + _1: impl ::std::borrow::Borrow<::core::primitive::u64>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Ibc", + "FeeLessChannelIds", + vec![ + ::subxt::storage::address::make_static_storage_map_key(_0.borrow()), + ::subxt::storage::address::make_static_storage_map_key(_1.borrow()), + ], + [ + 190u8, 190u8, 60u8, 41u8, 38u8, 36u8, 108u8, 181u8, 192u8, 34u8, 88u8, + 107u8, 188u8, 195u8, 107u8, 232u8, 197u8, 153u8, 16u8, 234u8, 161u8, + 255u8, 37u8, 78u8, 4u8, 7u8, 40u8, 52u8, 9u8, 110u8, 150u8, 216u8, + ], + ) + } + pub fn fee_less_channel_ids_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + (), + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Ibc", + "FeeLessChannelIds", + Vec::new(), + [ + 190u8, 190u8, 60u8, 41u8, 38u8, 36u8, 108u8, 181u8, 192u8, 34u8, 88u8, + 107u8, 188u8, 195u8, 107u8, 232u8, 197u8, 153u8, 16u8, 234u8, 161u8, + 255u8, 37u8, 78u8, 4u8, 7u8, 40u8, 52u8, 9u8, 110u8, 150u8, 216u8, + ], + ) + } + pub fn sequence_fee( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u64>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u128, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Ibc", + "SequenceFee", + vec![::subxt::storage::address::make_static_storage_map_key(_0.borrow())], + [ + 42u8, 117u8, 77u8, 205u8, 205u8, 54u8, 177u8, 179u8, 247u8, 26u8, 4u8, + 45u8, 160u8, 255u8, 209u8, 2u8, 203u8, 10u8, 54u8, 6u8, 155u8, 44u8, + 186u8, 242u8, 212u8, 31u8, 55u8, 45u8, 90u8, 9u8, 77u8, 119u8, + ], + ) + } + pub fn sequence_fee_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u128, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Ibc", + "SequenceFee", + Vec::new(), + [ + 42u8, 117u8, 77u8, 205u8, 205u8, 54u8, 177u8, 179u8, 247u8, 26u8, 4u8, + 45u8, 160u8, 255u8, 209u8, 2u8, 203u8, 10u8, 54u8, 6u8, 155u8, 44u8, + 186u8, 242u8, 212u8, 31u8, 55u8, 45u8, 90u8, 9u8, 77u8, 119u8, + ], + ) + } pub fn client_counter( &self, ) -> ::subxt::storage::address::Address< @@ -21415,7 +23207,7 @@ pub mod api { _0: impl ::std::borrow::Borrow<[::core::primitive::u8]>, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::sp_core::bounded::bounded_btree_set::BoundedBTreeSet< + runtime_types::bounded_collections::bounded_btree_set::BoundedBTreeSet< runtime_types::ibc::core::ics02_client::height::Height, >, ::subxt::storage::address::Yes, @@ -21438,7 +23230,7 @@ pub mod api { &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - runtime_types::sp_core::bounded::bounded_btree_set::BoundedBTreeSet< + runtime_types::bounded_collections::bounded_btree_set::BoundedBTreeSet< runtime_types::ibc::core::ics02_client::height::Height, >, (), @@ -21574,13 +23366,105 @@ pub mod api { > { ::subxt::storage::address::Address::new_static( "Ibc", - "Acks", + "Acks", + Vec::new(), + [ + 193u8, 242u8, 208u8, 150u8, 1u8, 103u8, 241u8, 98u8, 227u8, 26u8, + 158u8, 161u8, 14u8, 230u8, 134u8, 210u8, 154u8, 177u8, 14u8, 216u8, + 134u8, 72u8, 102u8, 128u8, 21u8, 77u8, 164u8, 95u8, 40u8, 96u8, 205u8, + 4u8, + ], + ) + } + pub fn pending_send_packet_seqs( + &self, + _0: impl ::std::borrow::Borrow<[::core::primitive::u8]>, + _1: impl ::std::borrow::Borrow<[::core::primitive::u8]>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + (::std::vec::Vec<::core::primitive::u64>, ::core::primitive::u64), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Ibc", + "PendingSendPacketSeqs", + vec![ + ::subxt::storage::address::make_static_storage_map_key(_0.borrow()), + ::subxt::storage::address::make_static_storage_map_key(_1.borrow()), + ], + [ + 177u8, 235u8, 231u8, 90u8, 78u8, 216u8, 49u8, 192u8, 170u8, 167u8, + 215u8, 146u8, 83u8, 146u8, 76u8, 117u8, 40u8, 104u8, 7u8, 182u8, 56u8, + 30u8, 14u8, 255u8, 236u8, 34u8, 176u8, 197u8, 78u8, 220u8, 34u8, 224u8, + ], + ) + } + pub fn pending_send_packet_seqs_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + (::std::vec::Vec<::core::primitive::u64>, ::core::primitive::u64), + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Ibc", + "PendingSendPacketSeqs", + Vec::new(), + [ + 177u8, 235u8, 231u8, 90u8, 78u8, 216u8, 49u8, 192u8, 170u8, 167u8, + 215u8, 146u8, 83u8, 146u8, 76u8, 117u8, 40u8, 104u8, 7u8, 182u8, 56u8, + 30u8, 14u8, 255u8, 236u8, 34u8, 176u8, 197u8, 78u8, 220u8, 34u8, 224u8, + ], + ) + } + pub fn pending_recv_packet_seqs( + &self, + _0: impl ::std::borrow::Borrow<[::core::primitive::u8]>, + _1: impl ::std::borrow::Borrow<[::core::primitive::u8]>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + (::std::vec::Vec<::core::primitive::u64>, ::core::primitive::u64), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Ibc", + "PendingRecvPacketSeqs", + vec![ + ::subxt::storage::address::make_static_storage_map_key(_0.borrow()), + ::subxt::storage::address::make_static_storage_map_key(_1.borrow()), + ], + [ + 206u8, 66u8, 91u8, 112u8, 240u8, 28u8, 169u8, 232u8, 243u8, 211u8, + 174u8, 107u8, 109u8, 148u8, 165u8, 170u8, 28u8, 213u8, 221u8, 180u8, + 188u8, 250u8, 94u8, 128u8, 92u8, 177u8, 207u8, 36u8, 190u8, 3u8, 72u8, + 154u8, + ], + ) + } + pub fn pending_recv_packet_seqs_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + (::std::vec::Vec<::core::primitive::u64>, ::core::primitive::u64), + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Ibc", + "PendingRecvPacketSeqs", Vec::new(), [ - 193u8, 242u8, 208u8, 150u8, 1u8, 103u8, 241u8, 98u8, 227u8, 26u8, - 158u8, 161u8, 14u8, 230u8, 134u8, 210u8, 154u8, 177u8, 14u8, 216u8, - 134u8, 72u8, 102u8, 128u8, 21u8, 77u8, 164u8, 95u8, 40u8, 96u8, 205u8, - 4u8, + 206u8, 66u8, 91u8, 112u8, 240u8, 28u8, 169u8, 232u8, 243u8, 211u8, + 174u8, 107u8, 109u8, 148u8, 165u8, 170u8, 28u8, 213u8, 221u8, 180u8, + 188u8, 250u8, 94u8, 128u8, 92u8, 177u8, 207u8, 36u8, 190u8, 3u8, 72u8, + 154u8, ], ) } @@ -21670,6 +23554,34 @@ pub mod api { ], ) } + pub fn clean_up_packets_period( + &self, + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "Ibc", + "CleanUpPacketsPeriod", + [ + 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 service_charge_out( + &self, + ) -> ::subxt::constants::Address + { + ::subxt::constants::Address::new_static( + "Ibc", + "ServiceChargeOut", + [ + 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, + ], + ) + } } } } @@ -21690,6 +23602,32 @@ pub mod api { pub struct SetCharge { pub charge: 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, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct AddChannelsToFeelessChannelList { + pub source_channel: ::core::primitive::u64, + pub destination_channel: ::core::primitive::u64, + } + #[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 RemoveChannelsFromFeelessChannelList { + pub source_channel: ::core::primitive::u64, + pub destination_channel: ::core::primitive::u64, + } pub struct TransactionApi; impl TransactionApi { pub fn set_charge( @@ -21707,13 +23645,48 @@ pub mod api { ], ) } + pub fn add_channels_to_feeless_channel_list( + &self, + source_channel: ::core::primitive::u64, + destination_channel: ::core::primitive::u64, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Ics20Fee", + "add_channels_to_feeless_channel_list", + AddChannelsToFeelessChannelList { source_channel, destination_channel }, + [ + 94u8, 90u8, 107u8, 98u8, 113u8, 134u8, 183u8, 32u8, 208u8, 138u8, + 173u8, 24u8, 152u8, 97u8, 73u8, 1u8, 95u8, 126u8, 203u8, 112u8, 13u8, + 122u8, 126u8, 7u8, 141u8, 110u8, 13u8, 185u8, 252u8, 71u8, 163u8, 18u8, + ], + ) + } + pub fn remove_channels_from_feeless_channel_list( + &self, + source_channel: ::core::primitive::u64, + destination_channel: ::core::primitive::u64, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Ics20Fee", + "remove_channels_from_feeless_channel_list", + RemoveChannelsFromFeelessChannelList { + source_channel, + destination_channel, + }, + [ + 56u8, 207u8, 158u8, 148u8, 9u8, 34u8, 243u8, 213u8, 138u8, 143u8, 10u8, + 115u8, 118u8, 197u8, 187u8, 250u8, 210u8, 187u8, 169u8, 157u8, 158u8, + 61u8, 241u8, 90u8, 117u8, 123u8, 239u8, 105u8, 99u8, 196u8, 254u8, + 116u8, + ], + ) + } } } pub type Event = runtime_types::pallet_ibc::ics20_fee::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, @@ -21724,17 +23697,52 @@ pub mod api { #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct IbcTransferFeeCollected { pub amount: ::core::primitive::u128, + pub asset_id: runtime_types::primitives::currency::CurrencyId, } impl ::subxt::events::StaticEvent for IbcTransferFeeCollected { const PALLET: &'static str = "Ics20Fee"; const EVENT: &'static str = "IbcTransferFeeCollected"; } + #[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 FeeLessChannelIdsAdded { + pub source_channel: ::core::primitive::u64, + pub destination_channel: ::core::primitive::u64, + } + impl ::subxt::events::StaticEvent for FeeLessChannelIdsAdded { + const PALLET: &'static str = "Ics20Fee"; + const EVENT: &'static str = "FeeLessChannelIdsAdded"; + } + #[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 FeeLessChannelIdsRemoved { + pub source_channel: ::core::primitive::u64, + pub destination_channel: ::core::primitive::u64, + } + impl ::subxt::events::StaticEvent for FeeLessChannelIdsRemoved { + const PALLET: &'static str = "Ics20Fee"; + const EVENT: &'static str = "FeeLessChannelIdsRemoved"; + } } pub mod storage { use super::runtime_types; pub struct StorageApi; impl StorageApi { - pub fn service_charge( + pub fn service_charge_in( &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, @@ -21745,12 +23753,58 @@ pub mod api { > { ::subxt::storage::address::Address::new_static( "Ics20Fee", - "ServiceCharge", + "ServiceChargeIn", vec![], [ - 178u8, 152u8, 243u8, 23u8, 192u8, 72u8, 203u8, 115u8, 243u8, 185u8, - 64u8, 143u8, 82u8, 189u8, 207u8, 41u8, 25u8, 97u8, 63u8, 68u8, 153u8, - 239u8, 120u8, 84u8, 101u8, 191u8, 65u8, 78u8, 43u8, 64u8, 25u8, 95u8, + 129u8, 223u8, 79u8, 233u8, 108u8, 171u8, 157u8, 84u8, 38u8, 149u8, + 146u8, 33u8, 178u8, 49u8, 125u8, 207u8, 11u8, 191u8, 152u8, 53u8, + 223u8, 241u8, 199u8, 102u8, 198u8, 0u8, 71u8, 166u8, 10u8, 211u8, 1u8, + 13u8, + ], + ) + } + pub fn fee_less_channel_ids( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u64>, + _1: impl ::std::borrow::Borrow<::core::primitive::u64>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Ics20Fee", + "FeeLessChannelIds", + vec![ + ::subxt::storage::address::make_static_storage_map_key(_0.borrow()), + ::subxt::storage::address::make_static_storage_map_key(_1.borrow()), + ], + [ + 190u8, 190u8, 60u8, 41u8, 38u8, 36u8, 108u8, 181u8, 192u8, 34u8, 88u8, + 107u8, 188u8, 195u8, 107u8, 232u8, 197u8, 153u8, 16u8, 234u8, 161u8, + 255u8, 37u8, 78u8, 4u8, 7u8, 40u8, 52u8, 9u8, 110u8, 150u8, 216u8, + ], + ) + } + pub fn fee_less_channel_ids_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + (), + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Ics20Fee", + "FeeLessChannelIds", + Vec::new(), + [ + 190u8, 190u8, 60u8, 41u8, 38u8, 36u8, 108u8, 181u8, 192u8, 34u8, 88u8, + 107u8, 188u8, 195u8, 107u8, 232u8, 197u8, 153u8, 16u8, 234u8, 161u8, + 255u8, 37u8, 78u8, 4u8, 7u8, 40u8, 52u8, 9u8, 110u8, 150u8, 216u8, ], ) } @@ -21760,13 +23814,13 @@ pub mod api { use super::runtime_types; pub struct ConstantsApi; impl ConstantsApi { - pub fn service_charge( + pub fn service_charge_in( &self, ) -> ::subxt::constants::Address { ::subxt::constants::Address::new_static( "Ics20Fee", - "ServiceCharge", + "ServiceChargeIn", [ 225u8, 236u8, 95u8, 157u8, 90u8, 94u8, 106u8, 192u8, 254u8, 19u8, 87u8, 80u8, 16u8, 62u8, 42u8, 204u8, 136u8, 106u8, 225u8, 53u8, 212u8, 52u8, @@ -21792,6 +23846,61 @@ pub mod api { } 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, + )] + #[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_btree_set { + 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 BoundedBTreeSet<_0>(pub ::std::vec::Vec<_0>); + } + 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 common { use super::runtime_types; #[derive( @@ -21877,6 +23986,14 @@ pub mod api { CancelProxy, #[codec(index = 3)] Bridge, + #[codec(index = 4)] + Assets, + #[codec(index = 5)] + Defi, + #[codec(index = 6)] + Oracle, + #[codec(index = 7)] + Contracts, } } pub mod assets { @@ -22009,7 +24126,7 @@ pub mod api { pub struct BasicPoolInfo<_0, _1> { pub owner: _0, pub assets_weights: - runtime_types::sp_core::bounded::bounded_btree_map::BoundedBTreeMap< + runtime_types::bounded_collections::bounded_btree_map::BoundedBTreeMap< _1, runtime_types::sp_arithmetic::per_things::Permill, >, @@ -22565,19 +24682,138 @@ pub mod api { pub weight_restrict_decay: runtime_types::sp_weights::weight_v2::Weight, pub xcmp_max_individual_weight: runtime_types::sp_weights::weight_v2::Weight, } - } - pub mod cumulus_primitives_parachain_inherent { - 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 MessageQueueChain(pub ::subxt::utils::H256); + } + pub mod cumulus_primitives_parachain_inherent { + 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 MessageQueueChain(pub ::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 ParachainInherentData { + pub validation_data: + runtime_types::polkadot_primitives::v2::PersistedValidationData< + ::subxt::utils::H256, + ::core::primitive::u32, + >, + pub relay_chain_state: runtime_types::sp_trie::storage_proof::StorageProof, + pub downward_messages: ::std::vec::Vec< + runtime_types::polkadot_core_primitives::InboundDownwardMessage< + ::core::primitive::u32, + >, + >, + pub horizontal_messages: ::subxt::utils::KeyedVec< + runtime_types::polkadot_parachain::primitives::Id, + ::std::vec::Vec< + runtime_types::polkadot_core_primitives::InboundHrmpMessage< + ::core::primitive::u32, + >, + >, + >, + } + } + pub mod farming { + 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")] + pub enum Call { + #[codec(index = 0)] + update_reward_schedule { + pool_currency_id: runtime_types::primitives::currency::CurrencyId, + reward_currency_id: runtime_types::primitives::currency::CurrencyId, + period_count: ::core::primitive::u32, + #[codec(compact)] + amount: ::core::primitive::u128, + }, + #[codec(index = 1)] + remove_reward_schedule { + pool_currency_id: runtime_types::primitives::currency::CurrencyId, + reward_currency_id: runtime_types::primitives::currency::CurrencyId, + }, + #[codec(index = 2)] + deposit { + pool_currency_id: runtime_types::primitives::currency::CurrencyId, + amount: ::core::primitive::u128, + }, + #[codec(index = 3)] + withdraw { + pool_currency_id: runtime_types::primitives::currency::CurrencyId, + amount: ::core::primitive::u128, + }, + #[codec(index = 4)] + claim { + pool_currency_id: runtime_types::primitives::currency::CurrencyId, + reward_currency_id: runtime_types::primitives::currency::CurrencyId, + }, + } + #[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 Error { + #[codec(index = 0)] + InsufficientStake, + } + #[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 Event { + #[codec(index = 0)] + RewardScheduleUpdated { + pool_currency_id: runtime_types::primitives::currency::CurrencyId, + reward_currency_id: runtime_types::primitives::currency::CurrencyId, + period_count: ::core::primitive::u32, + per_period: ::core::primitive::u128, + }, + #[codec(index = 1)] + RewardDistributed { + pool_currency_id: runtime_types::primitives::currency::CurrencyId, + reward_currency_id: runtime_types::primitives::currency::CurrencyId, + amount: ::core::primitive::u128, + }, + #[codec(index = 2)] + RewardClaimed { + account_id: ::subxt::utils::AccountId32, + pool_currency_id: runtime_types::primitives::currency::CurrencyId, + reward_currency_id: runtime_types::primitives::currency::CurrencyId, + amount: ::core::primitive::u128, + }, + } + } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -22587,26 +24823,10 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ParachainInherentData { - pub validation_data: - runtime_types::polkadot_primitives::v2::PersistedValidationData< - ::subxt::utils::H256, - ::core::primitive::u32, - >, - pub relay_chain_state: runtime_types::sp_trie::storage_proof::StorageProof, - pub downward_messages: ::std::vec::Vec< - runtime_types::polkadot_core_primitives::InboundDownwardMessage< - ::core::primitive::u32, - >, - >, - pub horizontal_messages: ::subxt::utils::KeyedVec< - runtime_types::polkadot_parachain::primitives::Id, - ::std::vec::Vec< - runtime_types::polkadot_core_primitives::InboundHrmpMessage< - ::core::primitive::u32, - >, - >, - >, + pub struct RewardSchedule<_0> { + pub period_count: ::core::primitive::u32, + #[codec(compact)] + pub per_period: _0, } } pub mod frame_support { @@ -22711,7 +24931,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, >, ), @@ -23597,203 +25817,45 @@ pub mod api { BadVersion, #[codec(index = 11)] DistinctReserveForAssetAndFee, - #[codec(index = 12)] - ZeroFee, - #[codec(index = 13)] - ZeroAmount, - #[codec(index = 14)] - TooManyAssetsBeingSent, - #[codec(index = 15)] - AssetIndexNonExistent, - #[codec(index = 16)] - FeeNotEnough, - #[codec(index = 17)] - NotSupportedMultiLocation, - #[codec(index = 18)] - MinXcmFeeNotDefined, - } - #[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 Event { - #[codec(index = 0)] - TransferredMultiAssets { - sender: ::subxt::utils::AccountId32, - assets: runtime_types::xcm::v3::multiasset::MultiAssets, - fee: runtime_types::xcm::v3::multiasset::MultiAsset, - dest: runtime_types::xcm::v3::multilocation::MultiLocation, - }, - } - } - } - pub mod pallet_asset_tx_payment { - 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")] - pub enum Call { - #[codec(index = 0)] - set_payment_asset { - payer: ::subxt::utils::AccountId32, - asset_id: - ::core::option::Option, - }, - } - } - #[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 ChargeAssetTxPayment { - #[codec(compact)] - pub tip: ::core::primitive::u128, - pub asset_id: - ::core::option::Option, - } - } - pub mod pallet_assets { - 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")] - pub enum Call { - #[codec(index = 0)] - transfer { - asset: runtime_types::primitives::currency::CurrencyId, - dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - #[codec(compact)] - amount: ::core::primitive::u128, - keep_alive: ::core::primitive::bool, - }, - #[codec(index = 1)] - transfer_native { - dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - #[codec(compact)] - value: ::core::primitive::u128, - keep_alive: ::core::primitive::bool, - }, - #[codec(index = 2)] - force_transfer { - asset: runtime_types::primitives::currency::CurrencyId, - source: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - #[codec(compact)] - value: ::core::primitive::u128, - keep_alive: ::core::primitive::bool, - }, - #[codec(index = 3)] - force_transfer_native { - source: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - #[codec(compact)] - value: ::core::primitive::u128, - keep_alive: ::core::primitive::bool, - }, - #[codec(index = 4)] - transfer_all { - asset: runtime_types::primitives::currency::CurrencyId, - dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - keep_alive: ::core::primitive::bool, - }, - #[codec(index = 5)] - transfer_all_native { - dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - keep_alive: ::core::primitive::bool, - }, - #[codec(index = 6)] - mint_initialize { - #[codec(compact)] - amount: ::core::primitive::u128, - dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - }, - #[codec(index = 7)] - mint_initialize_with_governance { - #[codec(compact)] - amount: ::core::primitive::u128, - governance_origin: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - }, - #[codec(index = 8)] - mint_into { - asset_id: runtime_types::primitives::currency::CurrencyId, - dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - #[codec(compact)] - amount: ::core::primitive::u128, - }, - #[codec(index = 9)] - burn_from { - asset_id: runtime_types::primitives::currency::CurrencyId, - dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - #[codec(compact)] - amount: ::core::primitive::u128, + #[codec(index = 12)] + ZeroFee, + #[codec(index = 13)] + ZeroAmount, + #[codec(index = 14)] + TooManyAssetsBeingSent, + #[codec(index = 15)] + AssetIndexNonExistent, + #[codec(index = 16)] + FeeNotEnough, + #[codec(index = 17)] + NotSupportedMultiLocation, + #[codec(index = 18)] + MinXcmFeeNotDefined, + } + #[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 Event { + #[codec(index = 0)] + TransferredMultiAssets { + sender: ::subxt::utils::AccountId32, + assets: runtime_types::xcm::v3::multiasset::MultiAssets, + fee: runtime_types::xcm::v3::multiasset::MultiAsset, + dest: runtime_types::xcm::v3::multilocation::MultiLocation, }, } + } + } + pub mod pallet_asset_tx_payment { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -23803,13 +25865,30 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Error { + pub enum Call { #[codec(index = 0)] - CannotSetNewCurrencyToRegistry, - #[codec(index = 1)] - InvalidCurrency, + set_payment_asset { + payer: ::subxt::utils::AccountId32, + asset_id: + ::core::option::Option, + }, } } + #[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 ChargeAssetTxPayment { + #[codec(compact)] + pub tip: ::core::primitive::u128, + pub asset_id: + ::core::option::Option, + } } pub mod pallet_assets_registry { use super::runtime_types; @@ -24406,10 +26485,10 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct CallFilterEntry<_0> { - pub pallet_name: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + pub pallet_name: runtime_types::bounded_collections::bounded_vec::BoundedVec< ::core::primitive::u8, >, - pub function_name: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + pub function_name: runtime_types::bounded_collections::bounded_vec::BoundedVec< ::core::primitive::u8, >, #[codec(skip)] @@ -24689,6 +26768,387 @@ pub mod api { pub end: _1, } } + pub mod pallet_cosmwasm { + use super::runtime_types; + pub mod instrument { + 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 CostRules { + pub i64const: ::core::primitive::u32, + pub f64const: ::core::primitive::u32, + pub i64load: ::core::primitive::u32, + pub f64load: ::core::primitive::u32, + pub i64store: ::core::primitive::u32, + pub f64store: ::core::primitive::u32, + pub i64eq: ::core::primitive::u32, + pub i64eqz: ::core::primitive::u32, + pub i64ne: ::core::primitive::u32, + pub i64lts: ::core::primitive::u32, + pub i64gts: ::core::primitive::u32, + pub i64les: ::core::primitive::u32, + pub i64ges: ::core::primitive::u32, + pub i64clz: ::core::primitive::u32, + pub i64ctz: ::core::primitive::u32, + pub i64popcnt: ::core::primitive::u32, + pub i64add: ::core::primitive::u32, + pub i64sub: ::core::primitive::u32, + pub i64mul: ::core::primitive::u32, + pub i64divs: ::core::primitive::u32, + pub i64divu: ::core::primitive::u32, + pub i64rems: ::core::primitive::u32, + pub i64and: ::core::primitive::u32, + pub i64or: ::core::primitive::u32, + pub i64xor: ::core::primitive::u32, + pub i64shl: ::core::primitive::u32, + pub i64shrs: ::core::primitive::u32, + pub i64rotl: ::core::primitive::u32, + pub i64rotr: ::core::primitive::u32, + pub i32wrapi64: ::core::primitive::u32, + pub i64extendsi32: ::core::primitive::u32, + pub f64eq: ::core::primitive::u32, + pub f64ne: ::core::primitive::u32, + pub f64lt: ::core::primitive::u32, + pub f64gt: ::core::primitive::u32, + pub f64le: ::core::primitive::u32, + pub f64ge: ::core::primitive::u32, + pub f64abs: ::core::primitive::u32, + pub f64neg: ::core::primitive::u32, + pub f64ceil: ::core::primitive::u32, + pub f64floor: ::core::primitive::u32, + pub f64trunc: ::core::primitive::u32, + pub f64nearest: ::core::primitive::u32, + pub f64sqrt: ::core::primitive::u32, + pub f64add: ::core::primitive::u32, + pub f64sub: ::core::primitive::u32, + pub f64mul: ::core::primitive::u32, + pub f64div: ::core::primitive::u32, + pub f64min: ::core::primitive::u32, + pub f64max: ::core::primitive::u32, + pub f64copysign: ::core::primitive::u32, + pub select: ::core::primitive::u32, + pub if_: ::core::primitive::u32, + pub else_: ::core::primitive::u32, + pub getlocal: ::core::primitive::u32, + pub setlocal: ::core::primitive::u32, + pub teelocal: ::core::primitive::u32, + pub setglobal: ::core::primitive::u32, + pub getglobal: ::core::primitive::u32, + pub currentmemory: ::core::primitive::u32, + pub growmemory: ::core::primitive::u32, + pub br: ::core::primitive::u32, + pub brif: ::core::primitive::u32, + pub brtable: ::core::primitive::u32, + pub brtable_per_elem: ::core::primitive::u32, + pub call: ::core::primitive::u32, + pub call_indirect: ::core::primitive::u32, + } + } + 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")] + pub enum Call { + #[codec(index = 0)] + upload { + code: runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + }, + #[codec(index = 1)] + instantiate { + code_identifier: runtime_types::pallet_cosmwasm::types::CodeIdentifier, + salt: runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + admin: ::core::option::Option<::subxt::utils::AccountId32>, + label: runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + funds: + runtime_types::bounded_collections::bounded_btree_map::BoundedBTreeMap< + runtime_types::primitives::currency::CurrencyId, + (::core::primitive::u128, ::core::primitive::bool), + >, + gas: ::core::primitive::u64, + message: runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + }, + #[codec(index = 2)] + execute { + contract: ::subxt::utils::AccountId32, + funds: + runtime_types::bounded_collections::bounded_btree_map::BoundedBTreeMap< + runtime_types::primitives::currency::CurrencyId, + (::core::primitive::u128, ::core::primitive::bool), + >, + gas: ::core::primitive::u64, + message: runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + }, + #[codec(index = 3)] + migrate { + contract: ::subxt::utils::AccountId32, + new_code_identifier: runtime_types::pallet_cosmwasm::types::CodeIdentifier, + gas: ::core::primitive::u64, + message: runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + }, + #[codec(index = 4)] + update_admin { + contract: ::subxt::utils::AccountId32, + new_admin: ::core::option::Option<::subxt::utils::AccountId32>, + gas: ::core::primitive::u64, + }, + } + #[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 Error { + #[codec(index = 0)] + Instrumentation, + #[codec(index = 1)] + VmCreation, + #[codec(index = 2)] + ContractHasNoInfo, + #[codec(index = 3)] + CodeDecoding, + #[codec(index = 4)] + CodeValidation, + #[codec(index = 5)] + CodeEncoding, + #[codec(index = 6)] + CodeInstrumentation, + #[codec(index = 7)] + InstrumentedCodeIsTooBig, + #[codec(index = 8)] + CodeAlreadyExists, + #[codec(index = 9)] + CodeNotFound, + #[codec(index = 10)] + ContractAlreadyExists, + #[codec(index = 11)] + ContractNotFound, + #[codec(index = 12)] + SubstrateDispatch, + #[codec(index = 13)] + AssetConversion, + #[codec(index = 14)] + TransferFailed, + #[codec(index = 15)] + LabelTooBig, + #[codec(index = 16)] + UnknownDenom, + #[codec(index = 17)] + StackOverflow, + #[codec(index = 18)] + NotEnoughFundsForUpload, + #[codec(index = 19)] + NonceOverflow, + #[codec(index = 20)] + RefcountOverflow, + #[codec(index = 21)] + VMDepthOverflow, + #[codec(index = 22)] + SignatureVerificationError, + #[codec(index = 23)] + IteratorIdOverflow, + #[codec(index = 24)] + IteratorNotFound, + #[codec(index = 25)] + IteratorValueNotFound, + #[codec(index = 26)] + NotAuthorized, + #[codec(index = 27)] + Unsupported, + #[codec(index = 28)] + ExecuteDeserialize, + #[codec(index = 29)] + Ibc, + #[codec(index = 30)] + FailedToSerialize, + #[codec(index = 31)] + OutOfGas, + #[codec(index = 32)] + InvalidSalt, + #[codec(index = 33)] + InvalidAccount, + #[codec(index = 34)] + Interpreter, + #[codec(index = 35)] + VirtualMachine, + #[codec(index = 36)] + AccountConversionFailure, + #[codec(index = 37)] + Aborted, + #[codec(index = 38)] + ReadOnlyViolation, + #[codec(index = 39)] + Rpc, + } + #[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 Event { + #[codec(index = 0)] + Uploaded { + code_hash: [::core::primitive::u8; 32usize], + code_id: ::core::primitive::u64, + }, + #[codec(index = 1)] + Instantiated { + contract: ::subxt::utils::AccountId32, + info: runtime_types::pallet_cosmwasm::types::ContractInfo< + ::subxt::utils::AccountId32, + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + >, + }, + #[codec(index = 2)] + Executed { + contract: ::subxt::utils::AccountId32, + entrypoint: runtime_types::pallet_cosmwasm::types::EntryPoint, + data: ::core::option::Option<::std::vec::Vec<::core::primitive::u8>>, + }, + #[codec(index = 3)] + ExecutionFailed { + contract: ::subxt::utils::AccountId32, + entrypoint: runtime_types::pallet_cosmwasm::types::EntryPoint, + error: ::std::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 4)] + Emitted { + contract: ::subxt::utils::AccountId32, + ty: ::std::vec::Vec<::core::primitive::u8>, + attributes: ::std::vec::Vec<( + ::std::vec::Vec<::core::primitive::u8>, + ::std::vec::Vec<::core::primitive::u8>, + )>, + }, + #[codec(index = 5)] + Migrated { contract: ::subxt::utils::AccountId32, to: ::core::primitive::u64 }, + #[codec(index = 6)] + AdminUpdated { + contract: ::subxt::utils::AccountId32, + new_admin: ::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, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum CodeIdentifier { + #[codec(index = 0)] + CodeId(::core::primitive::u64), + #[codec(index = 1)] + CodeHash([::core::primitive::u8; 32usize]), + } + #[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 CodeInfo<_0> { + pub creator: _0, + pub pristine_code_hash: [::core::primitive::u8; 32usize], + pub instrumentation_version: ::core::primitive::u16, + pub refcount: ::core::primitive::u32, + pub ibc_capable: ::core::primitive::bool, + } + #[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 ContractInfo<_0, _1, _2> { + pub code_id: ::core::primitive::u64, + pub trie_id: _2, + pub instantiator: _0, + pub admin: ::core::option::Option<_0>, + pub label: _1, + } + #[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 EntryPoint { + #[codec(index = 0)] + Instantiate, + #[codec(index = 1)] + Execute, + #[codec(index = 2)] + Migrate, + #[codec(index = 3)] + Reply, + #[codec(index = 4)] + IbcChannelOpen, + #[codec(index = 5)] + IbcChannelConnect, + #[codec(index = 6)] + IbcChannelClose, + #[codec(index = 7)] + IbcPacketTimeout, + #[codec(index = 8)] + IbcPacketReceive, + #[codec(index = 9)] + IbcPacketAck, + } + } + } pub mod pallet_crowdloan_rewards { use super::runtime_types; pub mod models { @@ -24953,7 +27413,7 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Ranges<_0> { - pub ranges: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + pub ranges: runtime_types::bounded_collections::bounded_vec::BoundedVec< runtime_types::pallet_currency_factory::ranges::Range<_0>, >, } @@ -25095,6 +27555,11 @@ pub mod api { #[codec(compact)] prop_index: ::core::primitive::u32, }, + #[codec(index = 18)] + set_metadata { + owner: runtime_types::pallet_democracy::types::MetadataOwner, + maybe_hash: ::core::option::Option<::subxt::utils::H256>, + }, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -25152,6 +27617,8 @@ pub mod api { TooMany, #[codec(index = 22)] VotingPeriodLow, + #[codec(index = 23)] + PreimageNotExist, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -25216,6 +27683,22 @@ pub mod api { }, #[codec(index = 13)] ProposalCanceled { prop_index: ::core::primitive::u32 }, + #[codec(index = 14)] + MetadataSet { + owner: runtime_types::pallet_democracy::types::MetadataOwner, + hash: ::subxt::utils::H256, + }, + #[codec(index = 15)] + MetadataCleared { + owner: runtime_types::pallet_democracy::types::MetadataOwner, + hash: ::subxt::utils::H256, + }, + #[codec(index = 16)] + MetadataTransferred { + prev_owner: runtime_types::pallet_democracy::types::MetadataOwner, + owner: runtime_types::pallet_democracy::types::MetadataOwner, + hash: ::subxt::utils::H256, + }, } } pub mod types { @@ -25242,6 +27725,23 @@ pub mod api { )] #[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, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum ReferendumInfo<_0, _1, _2> { #[codec(index = 0)] Ongoing(runtime_types::pallet_democracy::types::ReferendumStatus<_0, _1, _2>), @@ -25329,7 +27829,7 @@ pub mod api { pub enum Voting<_0, _1, _2> { #[codec(index = 0)] Direct { - votes: runtime_types::sp_core::bounded::bounded_vec::BoundedVec<( + votes: runtime_types::bounded_collections::bounded_vec::BoundedVec<( _2, runtime_types::pallet_democracy::vote::AccountVote<_0>, )>, @@ -25700,6 +28200,16 @@ pub mod api { pub enum Call { #[codec(index = 0)] set_charge { charge: runtime_types::sp_arithmetic::per_things::Perbill }, + #[codec(index = 1)] + add_channels_to_feeless_channel_list { + source_channel: ::core::primitive::u64, + destination_channel: ::core::primitive::u64, + }, + #[codec(index = 2)] + remove_channels_from_feeless_channel_list { + source_channel: ::core::primitive::u64, + destination_channel: ::core::primitive::u64, + }, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -25712,7 +28222,20 @@ pub mod api { #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum Event { #[codec(index = 0)] - IbcTransferFeeCollected { amount: ::core::primitive::u128 }, + IbcTransferFeeCollected { + amount: ::core::primitive::u128, + asset_id: runtime_types::primitives::currency::CurrencyId, + }, + #[codec(index = 1)] + FeeLessChannelIdsAdded { + source_channel: ::core::primitive::u64, + destination_channel: ::core::primitive::u64, + }, + #[codec(index = 2)] + FeeLessChannelIdsRemoved { + source_channel: ::core::primitive::u64, + destination_channel: ::core::primitive::u64, + }, } } } @@ -25736,9 +28259,7 @@ pub mod api { runtime_types::pallet_ibc::TransferParams<::subxt::utils::AccountId32>, asset_id: runtime_types::primitives::currency::CurrencyId, amount: ::core::primitive::u128, - memo: ::core::option::Option< - runtime_types::picasso_runtime::ibc::MemoMessage, - >, + memo: ::core::option::Option<::std::string::String>, }, #[codec(index = 3)] upgrade_client { params: runtime_types::pallet_ibc::UpgradeParams }, @@ -25749,6 +28270,28 @@ pub mod api { }, #[codec(index = 5)] increase_counters, + #[codec(index = 6)] + add_channels_to_feeless_channel_list { + source_channel: ::core::primitive::u64, + destination_channel: ::core::primitive::u64, + }, + #[codec(index = 7)] + remove_channels_from_feeless_channel_list { + source_channel: ::core::primitive::u64, + destination_channel: ::core::primitive::u64, + }, + #[codec(index = 8)] + set_child_storage { + key: ::std::vec::Vec<::core::primitive::u8>, + value: ::std::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 9)] + substitute_client_state { + client_id: ::std::string::String, + height: runtime_types::ibc::core::ics02_client::height::Height, + client_state_bytes: ::std::vec::Vec<::core::primitive::u8>, + consensus_state_bytes: ::std::vec::Vec<::core::primitive::u8>, + }, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -25834,6 +28377,10 @@ pub mod api { AccessDenied, #[codec(index = 36)] RateLimiter, + #[codec(index = 37)] + FailedSendFeeToAccount, + #[codec(index = 38)] + OriginAddress, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -25936,6 +28483,42 @@ pub mod api { }, #[codec(index = 11)] AssetAdminUpdated { admin_account: ::subxt::utils::AccountId32 }, + #[codec(index = 12)] + FeeLessChannelIdsAdded { + source_channel: ::core::primitive::u64, + destination_channel: ::core::primitive::u64, + }, + #[codec(index = 13)] + FeeLessChannelIdsRemoved { + source_channel: ::core::primitive::u64, + destination_channel: ::core::primitive::u64, + }, + #[codec(index = 14)] + ChargingFeeOnTransferInitiated { + sequence: ::core::primitive::u64, + from: ::std::vec::Vec<::core::primitive::u8>, + to: ::std::vec::Vec<::core::primitive::u8>, + ibc_denom: ::std::vec::Vec<::core::primitive::u8>, + local_asset_id: + ::core::option::Option, + amount: ::core::primitive::u128, + is_flat_fee: ::core::primitive::bool, + source_channel: ::std::vec::Vec<::core::primitive::u8>, + destination_channel: ::std::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 15)] + ChargingFeeConfirmed { sequence: ::core::primitive::u64 }, + #[codec(index = 16)] + ChargingFeeTimeout { sequence: ::core::primitive::u64 }, + #[codec(index = 17)] + ChargingFeeFailedAcknowledgement { sequence: ::core::primitive::u64 }, + #[codec(index = 18)] + ChildStateUpdated, + #[codec(index = 19)] + ClientStateSubstituted { + client_id: ::std::string::String, + height: runtime_types::ibc::core::ics02_client::height::Height, + }, } } #[derive( @@ -26369,7 +28952,7 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct IdentityInfo { - pub additional: runtime_types::sp_core::bounded::bounded_vec::BoundedVec<( + pub additional: runtime_types::bounded_collections::bounded_vec::BoundedVec<( runtime_types::pallet_identity::types::Data, runtime_types::pallet_identity::types::Data, )>, @@ -26433,7 +29016,7 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Registration<_0> { - pub judgements: runtime_types::sp_core::bounded::bounded_vec::BoundedVec<( + pub judgements: runtime_types::bounded_collections::bounded_vec::BoundedVec<( ::core::primitive::u32, runtime_types::pallet_identity::types::Judgement<_0>, )>, @@ -26767,7 +29350,7 @@ pub mod api { pub when: runtime_types::pallet_multisig::Timepoint<_0>, pub deposit: _1, pub depositor: _2, - pub approvals: runtime_types::sp_core::bounded::bounded_vec::BoundedVec<_2>, + pub approvals: runtime_types::bounded_collections::bounded_vec::BoundedVec<_2>, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -26827,7 +29410,10 @@ pub mod api { emit_price_changes: ::core::primitive::bool, }, #[codec(index = 1)] - set_signer { signer: ::subxt::utils::AccountId32 }, + set_signer { + who: ::subxt::utils::AccountId32, + signer: ::subxt::utils::AccountId32, + }, #[codec(index = 2)] adjust_rewards { annual_cost_per_oracle: ::core::primitive::u128, @@ -26844,6 +29430,8 @@ pub mod api { price: ::core::primitive::u128, asset_id: runtime_types::primitives::currency::CurrencyId, }, + #[codec(index = 7)] + remove_signer { who: ::subxt::utils::AccountId32 }, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -26983,6 +29571,12 @@ pub mod api { runtime_types::primitives::currency::CurrencyId, ::core::primitive::u128, ), + #[codec(index = 11)] + SignerRemoved( + ::subxt::utils::AccountId32, + ::subxt::utils::AccountId32, + ::core::primitive::u128, + ), } #[derive( :: subxt :: ext :: codec :: Decode, @@ -28245,7 +30839,7 @@ pub mod api { >, locked_amount: ::core::primitive::u128, claimed_amount_per_schedule: - runtime_types::sp_core::bounded::bounded_btree_map::BoundedBTreeMap< + runtime_types::bounded_collections::bounded_btree_map::BoundedBTreeMap< ::core::primitive::u128, ::core::primitive::u128, >, @@ -28290,7 +30884,7 @@ pub mod api { #[codec(index = 1)] One(_0), #[codec(index = 2)] - Many(runtime_types::sp_core::bounded::bounded_vec::BoundedVec<_0>), + Many(runtime_types::bounded_collections::bounded_vec::BoundedVec<_0>), } #[derive( :: subxt :: ext :: codec :: Decode, @@ -28677,19 +31271,6 @@ pub mod api { } pub mod picasso_runtime { use super::runtime_types; - pub mod ibc { - 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 MemoMessage; - } pub mod opaque { use super::runtime_types; #[derive( @@ -28823,25 +31404,29 @@ pub mod api { #[codec(index = 54)] GovernanceRegistry(runtime_types::pallet_governance_registry::pallet::Call), #[codec(index = 55)] - Assets(runtime_types::pallet_assets::pallet::Call), - #[codec(index = 56)] CrowdloanRewards(runtime_types::pallet_crowdloan_rewards::pallet::Call), - #[codec(index = 57)] + #[codec(index = 56)] Vesting(runtime_types::pallet_vesting::module::Call), - #[codec(index = 58)] + #[codec(index = 57)] BondedFinance(runtime_types::pallet_bonded_finance::pallet::Call), - #[codec(index = 59)] + #[codec(index = 58)] AssetsRegistry(runtime_types::pallet_assets_registry::pallet::Call), - #[codec(index = 60)] + #[codec(index = 59)] Pablo(runtime_types::pallet_pablo::pallet::Call), - #[codec(index = 61)] + #[codec(index = 60)] Oracle(runtime_types::pallet_oracle::pallet::Call), - #[codec(index = 62)] + #[codec(index = 61)] AssetsTransactorRouter( runtime_types::pallet_assets_transactor_router::pallet::Call, ), + #[codec(index = 62)] + FarmingRewards(runtime_types::reward::pallet::Call), + #[codec(index = 63)] + Farming(runtime_types::farming::pallet::Call), #[codec(index = 100)] CallFilter(runtime_types::pallet_call_filter::pallet::Call), + #[codec(index = 180)] + Cosmwasm(runtime_types::pallet_cosmwasm::pallet::Call), #[codec(index = 190)] Ibc(runtime_types::pallet_ibc::pallet::Call), #[codec(index = 191)] @@ -28919,20 +31504,26 @@ pub mod api { CurrencyFactory(runtime_types::pallet_currency_factory::pallet::Event), #[codec(index = 54)] GovernanceRegistry(runtime_types::pallet_governance_registry::pallet::Event), - #[codec(index = 56)] + #[codec(index = 55)] CrowdloanRewards(runtime_types::pallet_crowdloan_rewards::pallet::Event), - #[codec(index = 57)] + #[codec(index = 56)] Vesting(runtime_types::pallet_vesting::module::Event), - #[codec(index = 58)] + #[codec(index = 57)] BondedFinance(runtime_types::pallet_bonded_finance::pallet::Event), - #[codec(index = 59)] + #[codec(index = 58)] AssetsRegistry(runtime_types::pallet_assets_registry::pallet::Event), - #[codec(index = 60)] + #[codec(index = 59)] Pablo(runtime_types::pallet_pablo::pallet::Event), - #[codec(index = 61)] + #[codec(index = 60)] Oracle(runtime_types::pallet_oracle::pallet::Event), + #[codec(index = 62)] + FarmingRewards(runtime_types::reward::pallet::Event), + #[codec(index = 63)] + Farming(runtime_types::farming::pallet::Event), #[codec(index = 100)] CallFilter(runtime_types::pallet_call_filter::pallet::Event), + #[codec(index = 180)] + Cosmwasm(runtime_types::pallet_cosmwasm::pallet::Event), #[codec(index = 190)] Ibc(runtime_types::pallet_ibc::pallet::Event), #[codec(index = 191)] @@ -29153,10 +31744,90 @@ pub mod api { } } } + pub mod reward { + 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")] + pub enum Call {} + #[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 Error { + #[codec(index = 0)] + TryIntoIntError, + #[codec(index = 1)] + InsufficientFunds, + #[codec(index = 2)] + ZeroTotalStake, + #[codec(index = 3)] + MaxRewardCurrencies, + } + #[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 Event { + #[codec(index = 0)] + DepositStake { + pool_id: runtime_types::primitives::currency::CurrencyId, + stake_id: ::subxt::utils::AccountId32, + amount: runtime_types::sp_arithmetic::fixed_point::FixedI128, + }, + #[codec(index = 1)] + DistributeReward { + currency_id: runtime_types::primitives::currency::CurrencyId, + amount: runtime_types::sp_arithmetic::fixed_point::FixedI128, + }, + #[codec(index = 2)] + WithdrawStake { + pool_id: runtime_types::primitives::currency::CurrencyId, + stake_id: ::subxt::utils::AccountId32, + amount: runtime_types::sp_arithmetic::fixed_point::FixedI128, + }, + #[codec(index = 3)] + WithdrawReward { + pool_id: runtime_types::primitives::currency::CurrencyId, + stake_id: ::subxt::utils::AccountId32, + currency_id: runtime_types::primitives::currency::CurrencyId, + amount: runtime_types::sp_arithmetic::fixed_point::FixedI128, + }, + } + } + } pub mod sp_arithmetic { 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, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct FixedI128(pub ::core::primitive::i128); #[derive( :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, @@ -29258,61 +31929,6 @@ pub mod api { } pub mod sp_core { use super::runtime_types; - pub mod bounded { - use super::runtime_types; - pub mod bounded_btree_map { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[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_btree_set { - 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 BoundedBTreeSet<_0>(pub ::std::vec::Vec<_0>); - } - 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( @@ -30228,7 +32844,7 @@ pub mod api { GeneralIndex(#[codec(compact)] ::core::primitive::u128), #[codec(index = 6)] GeneralKey( - runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec< + runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec< ::core::primitive::u8, >, ), @@ -30539,7 +33155,7 @@ pub mod api { Unit, #[codec(index = 1)] Named( - runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec< + runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec< ::core::primitive::u8, >, ), @@ -30761,7 +33377,7 @@ pub mod api { Any, #[codec(index = 1)] Named( - runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec< + runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec< ::core::primitive::u8, >, ), @@ -31573,9 +34189,17 @@ pub mod api { #[codec(index = 0)] Success, #[codec(index = 1)] - Error(::std::vec::Vec<::core::primitive::u8>), + Error( + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + ), #[codec(index = 2)] - TruncatedError(::std::vec::Vec<::core::primitive::u8>), + TruncatedError( + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + ), } #[derive( :: subxt :: ext :: codec :: Decode, @@ -31589,8 +34213,12 @@ pub mod api { pub struct PalletInfo { #[codec(compact)] pub index: ::core::primitive::u32, - pub name: ::std::vec::Vec<::core::primitive::u8>, - pub module_name: ::std::vec::Vec<::core::primitive::u8>, + 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)] @@ -31637,7 +34265,11 @@ pub mod api { #[codec(index = 3)] Version(::core::primitive::u32), #[codec(index = 4)] - PalletsInfo(runtime_types::xcm::v3::VecPalletInfo), + PalletsInfo( + runtime_types::bounded_collections::bounded_vec::BoundedVec< + runtime_types::xcm::v3::PalletInfo, + >, + ), #[codec(index = 5)] DispatchResult(runtime_types::xcm::v3::MaybeErrorCode), } @@ -31650,16 +34282,6 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct VecPalletInfo(pub ::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 WeightLimit { #[codec(index = 0)] Unlimited, @@ -31687,7 +34309,7 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum VersionedAssetId { - #[codec(index = 0)] + #[codec(index = 3)] V3(runtime_types::xcm::v3::multiasset::AssetId), } #[derive( @@ -31700,9 +34322,9 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum VersionedMultiAsset { - #[codec(index = 0)] - V2(runtime_types::xcm::v2::multiasset::MultiAsset), #[codec(index = 1)] + V2(runtime_types::xcm::v2::multiasset::MultiAsset), + #[codec(index = 3)] V3(runtime_types::xcm::v3::multiasset::MultiAsset), } #[derive( @@ -31715,9 +34337,9 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum VersionedMultiAssets { - #[codec(index = 0)] - V2(runtime_types::xcm::v2::multiasset::MultiAssets), #[codec(index = 1)] + V2(runtime_types::xcm::v2::multiasset::MultiAssets), + #[codec(index = 3)] V3(runtime_types::xcm::v3::multiasset::MultiAssets), } #[derive( @@ -31730,9 +34352,9 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum VersionedMultiLocation { - #[codec(index = 0)] - V2(runtime_types::xcm::v2::multilocation::MultiLocation), #[codec(index = 1)] + V2(runtime_types::xcm::v2::multilocation::MultiLocation), + #[codec(index = 3)] V3(runtime_types::xcm::v3::multilocation::MultiLocation), } #[derive( @@ -31745,9 +34367,9 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum VersionedResponse { - #[codec(index = 0)] + #[codec(index = 2)] V2(runtime_types::xcm::v2::Response), - #[codec(index = 1)] + #[codec(index = 3)] V3(runtime_types::xcm::v3::Response), } #[derive( diff --git a/utils/subxt/generated/src/picasso_kusama/relaychain.rs b/utils/subxt/generated/src/picasso_kusama/relaychain.rs index 4d7f829c3..314e274dd 100644 --- a/utils/subxt/generated/src/picasso_kusama/relaychain.rs +++ b/utils/subxt/generated/src/picasso_kusama/relaychain.rs @@ -5,7 +5,7 @@ pub mod api { mod root_mod { pub use super::*; } - pub static PALLETS: [&str; 62usize] = [ + pub static PALLETS: [&str; 57usize] = [ "System", "Babe", "Timestamp", @@ -20,11 +20,6 @@ pub mod api { "Grandpa", "ImOnline", "AuthorityDiscovery", - "Democracy", - "Council", - "TechnicalCommittee", - "PhragmenElection", - "TechnicalMembership", "Treasury", "ConvictionVoting", "Referenda", @@ -43,7 +38,6 @@ pub mod api { "Preimage", "Bounties", "ChildBounties", - "Tips", "ElectionProviderMultiPhase", "Nis", "NisCounterpartBalances", @@ -63,6 +57,7 @@ pub mod api { "Hrmp", "ParaSessionInfo", "ParasDisputes", + "ParasSlashing", "Registrar", "Slots", "Auctions", @@ -99,16 +94,6 @@ pub mod api { Grandpa(grandpa::Event), #[codec(index = 11)] ImOnline(im_online::Event), - #[codec(index = 13)] - Democracy(democracy::Event), - #[codec(index = 14)] - Council(council::Event), - #[codec(index = 15)] - TechnicalCommittee(technical_committee::Event), - #[codec(index = 16)] - PhragmenElection(phragmen_election::Event), - #[codec(index = 17)] - TechnicalMembership(technical_membership::Event), #[codec(index = 18)] Treasury(treasury::Event), #[codec(index = 20)] @@ -145,8 +130,6 @@ pub mod api { Bounties(bounties::Event), #[codec(index = 40)] ChildBounties(child_bounties::Event), - #[codec(index = 36)] - Tips(tips::Event), #[codec(index = 37)] ElectionProviderMultiPhase(election_provider_multi_phase::Event), #[codec(index = 38)] @@ -253,45 +236,6 @@ pub mod api { metadata, )?)) } - if pallet_name == "Democracy" { - return Ok(Event::Democracy(democracy::Event::decode_with_metadata( - &mut &*pallet_bytes, - pallet_ty, - metadata, - )?)) - } - if pallet_name == "Council" { - return Ok(Event::Council(council::Event::decode_with_metadata( - &mut &*pallet_bytes, - pallet_ty, - metadata, - )?)) - } - if pallet_name == "TechnicalCommittee" { - return Ok(Event::TechnicalCommittee( - technical_committee::Event::decode_with_metadata( - &mut &*pallet_bytes, - pallet_ty, - metadata, - )?, - )) - } - if pallet_name == "PhragmenElection" { - return Ok(Event::PhragmenElection(phragmen_election::Event::decode_with_metadata( - &mut &*pallet_bytes, - pallet_ty, - metadata, - )?)) - } - if pallet_name == "TechnicalMembership" { - return Ok(Event::TechnicalMembership( - technical_membership::Event::decode_with_metadata( - &mut &*pallet_bytes, - pallet_ty, - metadata, - )?, - )) - } if pallet_name == "Treasury" { return Ok(Event::Treasury(treasury::Event::decode_with_metadata( &mut &*pallet_bytes, @@ -422,13 +366,6 @@ pub mod api { metadata, )?)) } - if pallet_name == "Tips" { - return Ok(Event::Tips(tips::Event::decode_with_metadata( - &mut &*pallet_bytes, - pallet_ty, - metadata, - )?)) - } if pallet_name == "ElectionProviderMultiPhase" { return Ok(Event::ElectionProviderMultiPhase( election_provider_multi_phase::Event::decode_with_metadata( @@ -590,12 +527,6 @@ pub mod api { pub fn im_online(&self) -> im_online::constants::ConstantsApi { im_online::constants::ConstantsApi } - pub fn democracy(&self) -> democracy::constants::ConstantsApi { - democracy::constants::ConstantsApi - } - pub fn phragmen_election(&self) -> phragmen_election::constants::ConstantsApi { - phragmen_election::constants::ConstantsApi - } pub fn treasury(&self) -> treasury::constants::ConstantsApi { treasury::constants::ConstantsApi } @@ -641,9 +572,6 @@ pub mod api { 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 { @@ -720,21 +648,6 @@ pub mod api { 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 } @@ -786,9 +699,6 @@ pub mod api { 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 { @@ -845,6 +755,9 @@ pub mod api { pub fn paras_disputes(&self) -> paras_disputes::storage::StorageApi { paras_disputes::storage::StorageApi } + pub fn paras_slashing(&self) -> paras_slashing::storage::StorageApi { + paras_slashing::storage::StorageApi + } pub fn registrar(&self) -> registrar::storage::StorageApi { registrar::storage::StorageApi } @@ -890,21 +803,6 @@ pub mod api { 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 } @@ -959,9 +857,6 @@ pub mod api { 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 { @@ -1000,9 +895,6 @@ pub mod api { 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 } @@ -1012,6 +904,9 @@ pub mod api { pub fn paras_disputes(&self) -> paras_disputes::calls::TransactionApi { paras_disputes::calls::TransactionApi } + pub fn paras_slashing(&self) -> paras_slashing::calls::TransactionApi { + paras_slashing::calls::TransactionApi + } pub fn registrar(&self) -> registrar::calls::TransactionApi { registrar::calls::TransactionApi } @@ -1035,9 +930,9 @@ pub mod api { let runtime_metadata_hash = client.metadata().metadata_hash(&PALLETS); if runtime_metadata_hash != [ - 6u8, 30u8, 125u8, 220u8, 192u8, 173u8, 31u8, 231u8, 191u8, 59u8, 151u8, 13u8, 71u8, - 125u8, 31u8, 196u8, 223u8, 60u8, 1u8, 181u8, 199u8, 24u8, 158u8, 181u8, 78u8, - 225u8, 22u8, 228u8, 90u8, 95u8, 218u8, 163u8, + 183u8, 206u8, 122u8, 221u8, 97u8, 171u8, 90u8, 162u8, 123u8, 200u8, 219u8, 35u8, + 6u8, 40u8, 119u8, 63u8, 136u8, 212u8, 68u8, 255u8, 97u8, 200u8, 241u8, 120u8, 86u8, + 100u8, 110u8, 12u8, 175u8, 225u8, 36u8, 212u8, ] { Err(::subxt::error::MetadataError::IncompatibleMetadata) } else { @@ -1393,7 +1288,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, @@ -1404,9 +1299,10 @@ pub mod api { "Account", vec![::subxt::storage::address::make_static_storage_map_key(_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, ], ) } @@ -1416,7 +1312,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, @@ -1427,9 +1323,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, ], ) } @@ -1660,10 +1557,9 @@ pub mod api { "Events", vec![], [ - 36u8, 158u8, 226u8, 54u8, 133u8, 124u8, 147u8, 145u8, 163u8, 210u8, - 196u8, 74u8, 152u8, 118u8, 202u8, 236u8, 162u8, 93u8, 141u8, 75u8, - 70u8, 115u8, 104u8, 82u8, 178u8, 106u8, 221u8, 110u8, 45u8, 28u8, - 176u8, 129u8, + 98u8, 197u8, 131u8, 196u8, 174u8, 156u8, 100u8, 140u8, 5u8, 104u8, + 41u8, 109u8, 253u8, 46u8, 244u8, 88u8, 62u8, 255u8, 23u8, 63u8, 81u8, + 107u8, 5u8, 95u8, 13u8, 82u8, 222u8, 149u8, 221u8, 54u8, 4u8, 221u8, ], ) } @@ -2061,7 +1957,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, )>, @@ -2188,7 +2084,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, )>, @@ -2232,7 +2128,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, @@ -2254,7 +2150,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], >, (), @@ -2286,10 +2182,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, ], ) } @@ -2398,6 +2293,29 @@ pub mod api { ], ) } + 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 { @@ -2835,7 +2753,7 @@ pub mod api { )] #[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, @@ -2849,12 +2767,12 @@ pub mod api { )] #[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, @@ -2911,40 +2829,79 @@ pub mod api { 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, + )] + #[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, + )] + #[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, + )] + #[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 { - 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, ], ) } - pub fn set_balance( + 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 { who, new_free, new_reserved }, + "set_balance_deprecated", + SetBalanceDeprecated { who, new_free, 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, ], ) } @@ -3017,6 +2974,54 @@ pub mod api { ], ) } + 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, + ], + ) + } + 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, + ], + ) + } + 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, + ], + ) + } } } pub type Event = runtime_types::pallet_balances::pallet::Event; @@ -3086,7 +3091,6 @@ pub mod api { pub struct BalanceSet { pub who: ::subxt::utils::AccountId32, pub free: ::core::primitive::u128, - pub reserved: ::core::primitive::u128, } impl ::subxt::events::StaticEvent for BalanceSet { const PALLET: &'static str = "Balances"; @@ -3197,6 +3201,192 @@ 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, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + 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, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + 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, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + 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, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + 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, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + 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, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + 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, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + 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, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + 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, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + 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"; + } + #[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 Frozen { + pub who: ::subxt::utils::AccountId32, + pub amount: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for Frozen { + const PALLET: &'static str = "Balances"; + const EVENT: &'static str = "Frozen"; + } + #[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 Thawed { + pub who: ::subxt::utils::AccountId32, + pub amount: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for Thawed { + const PALLET: &'static str = "Balances"; + const EVENT: &'static str = "Thawed"; + } } pub mod storage { use super::runtime_types; @@ -3248,7 +3438,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, @@ -3258,9 +3448,10 @@ pub mod api { "Account", vec![::subxt::storage::address::make_static_storage_map_key(_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, ], ) } @@ -3268,7 +3459,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, @@ -3278,9 +3469,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, ], ) } @@ -3289,8 +3481,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, @@ -3311,8 +3503,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, @@ -3334,8 +3526,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, >, @@ -3359,8 +3551,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, >, @@ -3380,6 +3572,110 @@ pub mod api { ], ) } + pub fn holds( + &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< + runtime_types::kusama_runtime::RuntimeHoldReason, + ::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())], + [ + 234u8, 137u8, 244u8, 156u8, 38u8, 153u8, 141u8, 248u8, 168u8, 189u8, + 82u8, 136u8, 104u8, 141u8, 13u8, 243u8, 155u8, 174u8, 181u8, 187u8, + 0u8, 43u8, 68u8, 119u8, 250u8, 17u8, 238u8, 236u8, 66u8, 229u8, 91u8, + 200u8, + ], + ) + } + 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< + runtime_types::kusama_runtime::RuntimeHoldReason, + ::core::primitive::u128, + >, + >, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Balances", + "Holds", + Vec::new(), + [ + 234u8, 137u8, 244u8, 156u8, 38u8, 153u8, 141u8, 248u8, 168u8, 189u8, + 82u8, 136u8, 104u8, 141u8, 13u8, 243u8, 155u8, 174u8, 181u8, 187u8, + 0u8, 43u8, 68u8, 119u8, 250u8, 17u8, 238u8, 236u8, 66u8, 229u8, 91u8, + 200u8, + ], + ) + } + 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, + ], + ) + } + 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(), + [ + 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, + ], + ) + } } } pub mod constants { @@ -3423,6 +3719,30 @@ pub mod api { ], ) } + 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, + ], + ) + } + 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, + ], + ) + } } } } @@ -5980,49 +6300,6 @@ pub mod api { ], ) } - pub fn reports_by_kind_index( - &self, - _0: impl ::std::borrow::Borrow<[::core::primitive::u8; 16usize]>, - ) -> ::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( - "Offences", - "ReportsByKindIndex", - vec![::subxt::storage::address::make_static_storage_map_key(_0.borrow())], - [ - 162u8, 66u8, 131u8, 48u8, 250u8, 237u8, 179u8, 214u8, 36u8, 137u8, - 226u8, 136u8, 120u8, 61u8, 215u8, 43u8, 164u8, 50u8, 91u8, 164u8, 20u8, - 96u8, 189u8, 100u8, 242u8, 106u8, 21u8, 136u8, 98u8, 215u8, 180u8, - 145u8, - ], - ) - } - pub fn reports_by_kind_index_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( - "Offences", - "ReportsByKindIndex", - Vec::new(), - [ - 162u8, 66u8, 131u8, 48u8, 250u8, 237u8, 179u8, 214u8, 36u8, 137u8, - 226u8, 136u8, 120u8, 61u8, 215u8, 43u8, 164u8, 50u8, 91u8, 164u8, 20u8, - 96u8, 189u8, 100u8, 242u8, 106u8, 21u8, 136u8, 98u8, 215u8, 180u8, - 145u8, - ], - ) - } } } } @@ -6328,7 +6605,7 @@ pub mod api { #[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, >, @@ -6346,7 +6623,7 @@ pub mod api { #[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, >, @@ -6370,7 +6647,7 @@ pub mod api { impl TransactionApi { 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, >, @@ -6392,7 +6669,7 @@ pub mod api { } 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, >, @@ -6446,7 +6723,7 @@ pub mod api { #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] 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, )>, } @@ -6794,7 +7071,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, @@ -6937,7 +7214,7 @@ pub mod api { pub mod authority_discovery { use super::{root_mod, runtime_types}; } - pub mod democracy { + pub mod treasury { use super::{root_mod, runtime_types}; pub mod calls { use super::{root_mod, runtime_types}; @@ -6951,12 +7228,10 @@ pub mod api { )] #[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::kusama_runtime::RuntimeCall, - >, + pub struct ProposeSpend { #[codec(compact)] pub value: ::core::primitive::u128, + pub beneficiary: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -6967,9 +7242,9 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Second { + pub struct RejectProposal { #[codec(compact)] - pub proposal: ::core::primitive::u32, + pub proposal_id: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -6980,14 +7255,11 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Vote { + pub struct ApproveProposal { #[codec(compact)] - pub ref_index: ::core::primitive::u32, - pub vote: - runtime_types::pallet_democracy::vote::AccountVote<::core::primitive::u128>, + pub proposal_id: ::core::primitive::u32, } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -6996,8 +7268,10 @@ pub mod api { )] #[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, + pub struct Spend { + #[codec(compact)] + pub amount: ::core::primitive::u128, + pub beneficiary: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -7008,26 +7282,97 @@ pub mod api { )] #[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::kusama_runtime::RuntimeCall, - >, + pub struct RemoveApproval { + #[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, - )] - #[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::kusama_runtime::RuntimeCall, - >, + pub struct TransactionApi; + impl TransactionApi { + pub fn propose_spend( + &self, + value: ::core::primitive::u128, + beneficiary: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Treasury", + "propose_spend", + ProposeSpend { value, beneficiary }, + [ + 109u8, 46u8, 8u8, 159u8, 127u8, 79u8, 27u8, 100u8, 92u8, 244u8, 78u8, + 46u8, 105u8, 246u8, 169u8, 210u8, 149u8, 7u8, 108u8, 153u8, 203u8, + 223u8, 8u8, 117u8, 126u8, 250u8, 255u8, 52u8, 245u8, 69u8, 45u8, 136u8, + ], + ) + } + pub fn reject_proposal( + &self, + proposal_id: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Treasury", + "reject_proposal", + RejectProposal { proposal_id }, + [ + 106u8, 223u8, 97u8, 22u8, 111u8, 208u8, 128u8, 26u8, 198u8, 140u8, + 118u8, 126u8, 187u8, 51u8, 193u8, 50u8, 193u8, 68u8, 143u8, 144u8, + 34u8, 132u8, 44u8, 244u8, 105u8, 186u8, 223u8, 234u8, 17u8, 145u8, + 209u8, 145u8, + ], + ) + } + pub fn approve_proposal( + &self, + proposal_id: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Treasury", + "approve_proposal", + ApproveProposal { proposal_id }, + [ + 164u8, 229u8, 172u8, 98u8, 129u8, 62u8, 84u8, 128u8, 47u8, 108u8, 33u8, + 120u8, 89u8, 79u8, 57u8, 121u8, 4u8, 197u8, 170u8, 153u8, 156u8, 17u8, + 59u8, 164u8, 123u8, 227u8, 175u8, 195u8, 220u8, 160u8, 60u8, 186u8, + ], + ) + } + pub fn spend( + &self, + amount: ::core::primitive::u128, + beneficiary: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Treasury", + "spend", + Spend { amount, beneficiary }, + [ + 177u8, 178u8, 242u8, 136u8, 135u8, 237u8, 114u8, 71u8, 233u8, 239u8, + 7u8, 84u8, 14u8, 228u8, 58u8, 31u8, 158u8, 185u8, 25u8, 91u8, 70u8, + 33u8, 19u8, 92u8, 100u8, 162u8, 5u8, 48u8, 20u8, 120u8, 9u8, 109u8, + ], + ) + } + pub fn remove_approval( + &self, + proposal_id: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Treasury", + "remove_approval", + RemoveApproval { proposal_id }, + [ + 133u8, 126u8, 181u8, 47u8, 196u8, 243u8, 7u8, 46u8, 25u8, 251u8, 154u8, + 125u8, 217u8, 77u8, 54u8, 245u8, 240u8, 180u8, 97u8, 34u8, 186u8, 53u8, + 225u8, 144u8, 155u8, 107u8, 172u8, 54u8, 250u8, 184u8, 178u8, 86u8, + ], + ) + } } + } + pub type Event = runtime_types::pallet_treasury::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, @@ -7036,26 +7381,15 @@ pub mod api { )] #[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::kusama_runtime::RuntimeCall, - >, + pub struct Proposed { + pub proposal_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 FastTrack { - pub proposal_hash: ::subxt::utils::H256, - pub voting_period: ::core::primitive::u32, - pub delay: ::core::primitive::u32, + impl ::subxt::events::StaticEvent for Proposed { + const PALLET: &'static str = "Treasury"; + const EVENT: &'static str = "Proposed"; } #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -7064,21 +7398,12 @@ pub mod api { )] #[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, + pub struct Spending { + pub budget_remaining: ::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 CancelReferendum { - #[codec(compact)] - pub ref_index: ::core::primitive::u32, + impl ::subxt::events::StaticEvent for Spending { + const PALLET: &'static str = "Treasury"; + const EVENT: &'static str = "Spending"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -7089,10 +7414,14 @@ pub mod api { )] #[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, + pub struct Awarded { + pub proposal_index: ::core::primitive::u32, + pub award: ::core::primitive::u128, + pub account: ::subxt::utils::AccountId32, + } + impl ::subxt::events::StaticEvent for Awarded { + const PALLET: &'static str = "Treasury"; + const EVENT: &'static str = "Awarded"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -7103,18 +7432,16 @@ pub mod api { )] #[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, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ClearPublicProposals; + pub struct Rejected { + pub proposal_index: ::core::primitive::u32, + pub slashed: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for Rejected { + const PALLET: &'static str = "Treasury"; + const EVENT: &'static str = "Rejected"; + } #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -7123,8 +7450,12 @@ pub mod api { )] #[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, ()>, + pub struct Burnt { + pub burnt_funds: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for Burnt { + const PALLET: &'static str = "Treasury"; + const EVENT: &'static str = "Burnt"; } #[derive( :: subxt :: ext :: codec :: CompactAs, @@ -7136,10 +7467,15 @@ pub mod api { )] #[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, + pub struct Rollover { + pub rollover_balance: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for Rollover { + const PALLET: &'static str = "Treasury"; + const EVENT: &'static str = "Rollover"; } #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -7148,9 +7484,12 @@ pub mod api { )] #[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, + pub struct Deposit { + pub value: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for Deposit { + const PALLET: &'static str = "Treasury"; + const EVENT: &'static str = "Deposit"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -7161,9 +7500,14 @@ pub mod api { )] #[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>, + pub struct SpendApproved { + pub proposal_index: ::core::primitive::u32, + pub amount: ::core::primitive::u128, + pub beneficiary: ::subxt::utils::AccountId32, + } + impl ::subxt::events::StaticEvent for SpendApproved { + const PALLET: &'static str = "Treasury"; + const EVENT: &'static str = "SpendApproved"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -7174,3595 +7518,190 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CancelProposal { - #[codec(compact)] - pub prop_index: ::core::primitive::u32, + pub struct UpdatedInactive { + pub reactivated: ::core::primitive::u128, + pub deactivated: ::core::primitive::u128, } - pub struct TransactionApi; - impl TransactionApi { - pub fn propose( + impl ::subxt::events::StaticEvent for UpdatedInactive { + const PALLET: &'static str = "Treasury"; + const EVENT: &'static str = "UpdatedInactive"; + } + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + pub fn proposal_count( &self, - proposal: runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::kusama_runtime::RuntimeCall, - >, - value: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Democracy", - "propose", - Propose { proposal, value }, + ) -> ::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( + "Treasury", + "ProposalCount", + vec![], [ - 123u8, 3u8, 204u8, 140u8, 194u8, 195u8, 214u8, 39u8, 167u8, 126u8, - 45u8, 4u8, 219u8, 17u8, 143u8, 185u8, 29u8, 224u8, 230u8, 68u8, 253u8, - 15u8, 170u8, 90u8, 232u8, 123u8, 46u8, 255u8, 168u8, 39u8, 204u8, 63u8, + 132u8, 145u8, 78u8, 218u8, 51u8, 189u8, 55u8, 172u8, 143u8, 33u8, + 140u8, 99u8, 124u8, 208u8, 57u8, 232u8, 154u8, 110u8, 32u8, 142u8, + 24u8, 149u8, 109u8, 105u8, 30u8, 83u8, 39u8, 177u8, 127u8, 160u8, 34u8, + 70u8, ], ) } - pub fn second( + pub fn proposals( &self, - proposal: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Democracy", - "second", - Second { proposal }, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_treasury::Proposal< + ::subxt::utils::AccountId32, + ::core::primitive::u128, + >, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Treasury", + "Proposals", + vec![::subxt::storage::address::make_static_storage_map_key(_0.borrow())], [ - 59u8, 240u8, 183u8, 218u8, 61u8, 93u8, 184u8, 67u8, 10u8, 4u8, 138u8, - 196u8, 168u8, 49u8, 42u8, 69u8, 154u8, 42u8, 90u8, 112u8, 179u8, 69u8, - 51u8, 148u8, 159u8, 212u8, 221u8, 226u8, 132u8, 228u8, 51u8, 83u8, + 62u8, 223u8, 55u8, 209u8, 151u8, 134u8, 122u8, 65u8, 207u8, 38u8, + 113u8, 213u8, 237u8, 48u8, 129u8, 32u8, 91u8, 228u8, 108u8, 91u8, 37u8, + 49u8, 94u8, 4u8, 75u8, 122u8, 25u8, 34u8, 198u8, 224u8, 246u8, 160u8, ], ) } - pub fn vote( + pub fn proposals_root( &self, - ref_index: ::core::primitive::u32, - vote: runtime_types::pallet_democracy::vote::AccountVote< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_treasury::Proposal< + ::subxt::utils::AccountId32, ::core::primitive::u128, >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Democracy", - "vote", - Vote { ref_index, vote }, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Treasury", + "Proposals", + Vec::new(), [ - 138u8, 213u8, 229u8, 111u8, 1u8, 191u8, 73u8, 3u8, 145u8, 28u8, 44u8, - 88u8, 163u8, 188u8, 129u8, 188u8, 64u8, 15u8, 64u8, 103u8, 250u8, 97u8, - 234u8, 188u8, 29u8, 205u8, 51u8, 6u8, 116u8, 58u8, 156u8, 201u8, + 62u8, 223u8, 55u8, 209u8, 151u8, 134u8, 122u8, 65u8, 207u8, 38u8, + 113u8, 213u8, 237u8, 48u8, 129u8, 32u8, 91u8, 228u8, 108u8, 91u8, 37u8, + 49u8, 94u8, 4u8, 75u8, 122u8, 25u8, 34u8, 198u8, 224u8, 246u8, 160u8, ], ) } - pub fn emergency_cancel( + pub fn deactivated( &self, - ref_index: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Democracy", - "emergency_cancel", - EmergencyCancel { ref_index }, + ) -> ::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![], [ - 139u8, 213u8, 133u8, 75u8, 34u8, 206u8, 124u8, 245u8, 35u8, 237u8, - 132u8, 92u8, 49u8, 167u8, 117u8, 80u8, 188u8, 93u8, 198u8, 237u8, - 132u8, 77u8, 195u8, 65u8, 29u8, 37u8, 86u8, 74u8, 214u8, 119u8, 71u8, - 204u8, + 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, ], ) } - pub fn external_propose( + pub fn approvals( &self, - proposal: runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::kusama_runtime::RuntimeCall, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u32, >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Democracy", - "external_propose", - ExternalPropose { proposal }, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "Treasury", + "Approvals", + vec![], [ - 164u8, 193u8, 14u8, 122u8, 105u8, 232u8, 20u8, 194u8, 99u8, 227u8, - 36u8, 105u8, 218u8, 146u8, 16u8, 208u8, 56u8, 62u8, 100u8, 65u8, 35u8, - 33u8, 51u8, 208u8, 17u8, 43u8, 223u8, 198u8, 202u8, 16u8, 56u8, 75u8, + 202u8, 106u8, 189u8, 40u8, 127u8, 172u8, 108u8, 50u8, 193u8, 4u8, + 248u8, 226u8, 176u8, 101u8, 212u8, 222u8, 64u8, 206u8, 244u8, 175u8, + 111u8, 106u8, 86u8, 96u8, 19u8, 109u8, 218u8, 152u8, 30u8, 59u8, 96u8, + 1u8, ], ) } - pub fn external_propose_majority( + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + pub fn proposal_bond( &self, - proposal: runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::kusama_runtime::RuntimeCall, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Democracy", - "external_propose_majority", - ExternalProposeMajority { proposal }, + ) -> ::subxt::constants::Address + { + ::subxt::constants::Address::new_static( + "Treasury", + "ProposalBond", [ - 129u8, 124u8, 147u8, 253u8, 69u8, 115u8, 230u8, 186u8, 155u8, 4u8, - 220u8, 103u8, 28u8, 132u8, 115u8, 153u8, 196u8, 88u8, 9u8, 130u8, - 129u8, 234u8, 75u8, 96u8, 202u8, 216u8, 145u8, 189u8, 231u8, 101u8, - 127u8, 11u8, + 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, ], ) } - pub fn external_propose_default( + pub fn proposal_bond_minimum( &self, - proposal: runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::kusama_runtime::RuntimeCall, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Democracy", - "external_propose_default", - ExternalProposeDefault { proposal }, + ) -> ::subxt::constants::Address<::core::primitive::u128> { + ::subxt::constants::Address::new_static( + "Treasury", + "ProposalBondMinimum", [ - 96u8, 15u8, 108u8, 208u8, 141u8, 247u8, 4u8, 73u8, 2u8, 30u8, 231u8, - 40u8, 184u8, 250u8, 42u8, 161u8, 248u8, 45u8, 217u8, 50u8, 53u8, 13u8, - 181u8, 214u8, 136u8, 51u8, 93u8, 95u8, 165u8, 3u8, 83u8, 190u8, + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, + 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, ], ) } - pub fn fast_track( + pub fn proposal_bond_maximum( &self, - proposal_hash: ::subxt::utils::H256, - voting_period: ::core::primitive::u32, - delay: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Democracy", - "fast_track", - FastTrack { proposal_hash, voting_period, delay }, + ) -> ::subxt::constants::Address<::core::option::Option<::core::primitive::u128>> { + ::subxt::constants::Address::new_static( + "Treasury", + "ProposalBondMaximum", [ - 125u8, 209u8, 107u8, 120u8, 93u8, 205u8, 129u8, 147u8, 254u8, 126u8, - 45u8, 126u8, 39u8, 0u8, 56u8, 14u8, 233u8, 49u8, 245u8, 220u8, 156u8, - 10u8, 252u8, 31u8, 102u8, 90u8, 163u8, 236u8, 178u8, 85u8, 13u8, 24u8, + 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, ], ) } - pub fn veto_external( - &self, - proposal_hash: ::subxt::utils::H256, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Democracy", - "veto_external", - VetoExternal { proposal_hash }, + pub fn spend_period(&self) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "Treasury", + "SpendPeriod", [ - 209u8, 18u8, 18u8, 103u8, 186u8, 160u8, 214u8, 124u8, 150u8, 207u8, - 112u8, 90u8, 84u8, 197u8, 95u8, 157u8, 165u8, 65u8, 109u8, 101u8, 75u8, - 201u8, 41u8, 149u8, 75u8, 154u8, 37u8, 178u8, 239u8, 121u8, 124u8, - 23u8, + 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 cancel_referendum( - &self, - ref_index: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Democracy", - "cancel_referendum", - CancelReferendum { ref_index }, - [ - 51u8, 25u8, 25u8, 251u8, 236u8, 115u8, 130u8, 230u8, 72u8, 186u8, - 119u8, 71u8, 165u8, 137u8, 55u8, 167u8, 187u8, 128u8, 55u8, 8u8, 212u8, - 139u8, 245u8, 232u8, 103u8, 136u8, 229u8, 113u8, 125u8, 36u8, 1u8, - 149u8, - ], - ) - } - pub fn delegate( - &self, - to: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - conviction: runtime_types::pallet_democracy::conviction::Conviction, - balance: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Democracy", - "delegate", - Delegate { to, conviction, balance }, - [ - 22u8, 205u8, 202u8, 196u8, 63u8, 1u8, 196u8, 109u8, 4u8, 190u8, 38u8, - 142u8, 248u8, 200u8, 136u8, 12u8, 194u8, 170u8, 237u8, 176u8, 70u8, - 21u8, 112u8, 154u8, 93u8, 169u8, 211u8, 120u8, 156u8, 68u8, 14u8, - 231u8, - ], - ) - } - pub fn undelegate(&self) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Democracy", - "undelegate", - Undelegate {}, - [ - 165u8, 40u8, 183u8, 209u8, 57u8, 153u8, 111u8, 29u8, 114u8, 109u8, - 107u8, 235u8, 97u8, 61u8, 53u8, 155u8, 44u8, 245u8, 28u8, 220u8, 56u8, - 134u8, 43u8, 122u8, 248u8, 156u8, 191u8, 154u8, 4u8, 121u8, 152u8, - 153u8, - ], - ) - } - pub fn clear_public_proposals(&self) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Democracy", - "clear_public_proposals", - ClearPublicProposals {}, - [ - 59u8, 126u8, 254u8, 223u8, 252u8, 225u8, 75u8, 185u8, 188u8, 181u8, - 42u8, 179u8, 211u8, 73u8, 12u8, 141u8, 243u8, 197u8, 46u8, 130u8, - 215u8, 196u8, 225u8, 88u8, 48u8, 199u8, 231u8, 249u8, 195u8, 53u8, - 184u8, 204u8, - ], - ) - } - pub fn unlock( - &self, - target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Democracy", - "unlock", - Unlock { target }, - [ - 126u8, 151u8, 230u8, 89u8, 49u8, 247u8, 242u8, 139u8, 190u8, 15u8, - 47u8, 2u8, 132u8, 165u8, 48u8, 205u8, 196u8, 66u8, 230u8, 222u8, 164u8, - 249u8, 152u8, 107u8, 0u8, 99u8, 238u8, 167u8, 72u8, 77u8, 145u8, 236u8, - ], - ) - } - pub fn remove_vote( - &self, - index: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Democracy", - "remove_vote", - RemoveVote { index }, - [ - 148u8, 120u8, 14u8, 172u8, 81u8, 152u8, 159u8, 178u8, 106u8, 244u8, - 36u8, 98u8, 120u8, 189u8, 213u8, 93u8, 119u8, 156u8, 112u8, 34u8, - 241u8, 72u8, 206u8, 113u8, 212u8, 161u8, 164u8, 126u8, 122u8, 82u8, - 160u8, 74u8, - ], - ) - } - pub fn remove_other_vote( - &self, - target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - index: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Democracy", - "remove_other_vote", - RemoveOtherVote { target, index }, - [ - 151u8, 190u8, 115u8, 124u8, 185u8, 43u8, 70u8, 147u8, 98u8, 167u8, - 120u8, 25u8, 231u8, 143u8, 214u8, 25u8, 240u8, 74u8, 35u8, 58u8, 206u8, - 78u8, 121u8, 215u8, 190u8, 42u8, 2u8, 206u8, 241u8, 44u8, 92u8, 23u8, - ], - ) - } - pub fn blacklist( - &self, - proposal_hash: ::subxt::utils::H256, - maybe_ref_index: ::core::option::Option<::core::primitive::u32>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Democracy", - "blacklist", - Blacklist { proposal_hash, maybe_ref_index }, - [ - 48u8, 144u8, 81u8, 164u8, 54u8, 111u8, 197u8, 134u8, 6u8, 98u8, 121u8, - 179u8, 254u8, 191u8, 204u8, 212u8, 84u8, 255u8, 86u8, 110u8, 225u8, - 130u8, 26u8, 65u8, 133u8, 56u8, 231u8, 15u8, 245u8, 137u8, 146u8, - 242u8, - ], - ) - } - pub fn cancel_proposal( - &self, - prop_index: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Democracy", - "cancel_proposal", - CancelProposal { prop_index }, - [ - 179u8, 3u8, 198u8, 244u8, 241u8, 124u8, 205u8, 58u8, 100u8, 80u8, - 177u8, 254u8, 98u8, 220u8, 189u8, 63u8, 229u8, 60u8, 157u8, 83u8, - 142u8, 6u8, 236u8, 183u8, 193u8, 235u8, 253u8, 126u8, 153u8, 185u8, - 74u8, 117u8, - ], - ) - } - } - } - pub type Event = runtime_types::pallet_democracy::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")] - pub struct Proposed { - pub proposal_index: ::core::primitive::u32, - pub deposit: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for Proposed { - const PALLET: &'static str = "Democracy"; - const EVENT: &'static str = "Proposed"; - } - #[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 Tabled { - pub proposal_index: ::core::primitive::u32, - pub deposit: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for Tabled { - const PALLET: &'static str = "Democracy"; - const EVENT: &'static str = "Tabled"; - } - #[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 ExternalTabled; - impl ::subxt::events::StaticEvent for ExternalTabled { - const PALLET: &'static str = "Democracy"; - const EVENT: &'static str = "ExternalTabled"; - } - #[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 Started { - pub ref_index: ::core::primitive::u32, - pub threshold: runtime_types::pallet_democracy::vote_threshold::VoteThreshold, - } - impl ::subxt::events::StaticEvent for Started { - const PALLET: &'static str = "Democracy"; - const EVENT: &'static str = "Started"; - } - #[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 Passed { - pub ref_index: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for Passed { - const PALLET: &'static str = "Democracy"; - const EVENT: &'static str = "Passed"; - } - #[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 NotPassed { - pub ref_index: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for NotPassed { - const PALLET: &'static str = "Democracy"; - const EVENT: &'static str = "NotPassed"; - } - #[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 Cancelled { - pub ref_index: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for Cancelled { - const PALLET: &'static str = "Democracy"; - const EVENT: &'static str = "Cancelled"; - } - #[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 Delegated { - pub who: ::subxt::utils::AccountId32, - pub target: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for Delegated { - const PALLET: &'static str = "Democracy"; - const EVENT: &'static str = "Delegated"; - } - #[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 Undelegated { - pub account: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for Undelegated { - const PALLET: &'static str = "Democracy"; - const EVENT: &'static str = "Undelegated"; - } - #[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 Vetoed { - pub who: ::subxt::utils::AccountId32, - pub proposal_hash: ::subxt::utils::H256, - pub until: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for Vetoed { - const PALLET: &'static str = "Democracy"; - const EVENT: &'static str = "Vetoed"; - } - #[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 Blacklisted { - pub proposal_hash: ::subxt::utils::H256, - } - impl ::subxt::events::StaticEvent for Blacklisted { - const PALLET: &'static str = "Democracy"; - const EVENT: &'static str = "Blacklisted"; - } - #[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 Voted { - pub voter: ::subxt::utils::AccountId32, - pub ref_index: ::core::primitive::u32, - pub vote: - runtime_types::pallet_democracy::vote::AccountVote<::core::primitive::u128>, - } - impl ::subxt::events::StaticEvent for Voted { - const PALLET: &'static str = "Democracy"; - const EVENT: &'static str = "Voted"; - } - #[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 Seconded { - pub seconder: ::subxt::utils::AccountId32, - pub prop_index: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for Seconded { - const PALLET: &'static str = "Democracy"; - const EVENT: &'static str = "Seconded"; - } - #[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 ProposalCanceled { - pub prop_index: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for ProposalCanceled { - const PALLET: &'static str = "Democracy"; - const EVENT: &'static str = "ProposalCanceled"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - pub fn public_prop_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( - "Democracy", - "PublicPropCount", - vec![], - [ - 91u8, 14u8, 171u8, 94u8, 37u8, 157u8, 46u8, 157u8, 254u8, 13u8, 68u8, - 144u8, 23u8, 146u8, 128u8, 159u8, 9u8, 174u8, 74u8, 174u8, 218u8, - 197u8, 23u8, 235u8, 152u8, 226u8, 216u8, 4u8, 120u8, 121u8, 27u8, - 138u8, - ], - ) - } - pub fn public_props( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::sp_core::bounded::bounded_vec::BoundedVec<( - ::core::primitive::u32, - runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::kusama_runtime::RuntimeCall, - >, - ::subxt::utils::AccountId32, - )>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Democracy", - "PublicProps", - vec![], - [ - 63u8, 172u8, 211u8, 85u8, 27u8, 14u8, 86u8, 49u8, 133u8, 5u8, 132u8, - 189u8, 138u8, 137u8, 219u8, 37u8, 209u8, 49u8, 172u8, 86u8, 240u8, - 235u8, 42u8, 201u8, 203u8, 12u8, 122u8, 225u8, 0u8, 109u8, 205u8, - 103u8, - ], - ) - } - pub fn deposit_of( - &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< - ::subxt::utils::AccountId32, - >, - ::core::primitive::u128, - ), - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Democracy", - "DepositOf", - vec![::subxt::storage::address::make_static_storage_map_key(_0.borrow())], - [ - 9u8, 219u8, 11u8, 58u8, 17u8, 194u8, 248u8, 154u8, 135u8, 119u8, 123u8, - 235u8, 252u8, 176u8, 190u8, 162u8, 236u8, 45u8, 237u8, 125u8, 98u8, - 176u8, 184u8, 160u8, 8u8, 181u8, 213u8, 65u8, 14u8, 84u8, 200u8, 64u8, - ], - ) - } - pub fn deposit_of_root( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ( - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::subxt::utils::AccountId32, - >, - ::core::primitive::u128, - ), - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Democracy", - "DepositOf", - Vec::new(), - [ - 9u8, 219u8, 11u8, 58u8, 17u8, 194u8, 248u8, 154u8, 135u8, 119u8, 123u8, - 235u8, 252u8, 176u8, 190u8, 162u8, 236u8, 45u8, 237u8, 125u8, 98u8, - 176u8, 184u8, 160u8, 8u8, 181u8, 213u8, 65u8, 14u8, 84u8, 200u8, 64u8, - ], - ) - } - pub fn referendum_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( - "Democracy", - "ReferendumCount", - vec![], - [ - 153u8, 210u8, 106u8, 244u8, 156u8, 70u8, 124u8, 251u8, 123u8, 75u8, - 7u8, 189u8, 199u8, 145u8, 95u8, 119u8, 137u8, 11u8, 240u8, 160u8, - 151u8, 248u8, 229u8, 231u8, 89u8, 222u8, 18u8, 237u8, 144u8, 78u8, - 99u8, 58u8, - ], - ) - } - pub fn lowest_unbaked( - &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( - "Democracy", - "LowestUnbaked", - vec![], - [ - 4u8, 51u8, 108u8, 11u8, 48u8, 165u8, 19u8, 251u8, 182u8, 76u8, 163u8, - 73u8, 227u8, 2u8, 212u8, 74u8, 128u8, 27u8, 165u8, 164u8, 111u8, 22u8, - 209u8, 190u8, 103u8, 7u8, 116u8, 16u8, 160u8, 144u8, 123u8, 64u8, - ], - ) - } - pub fn referendum_info_of( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_democracy::types::ReferendumInfo< - ::core::primitive::u32, - runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::kusama_runtime::RuntimeCall, - >, - ::core::primitive::u128, - >, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Democracy", - "ReferendumInfoOf", - vec![::subxt::storage::address::make_static_storage_map_key(_0.borrow())], - [ - 167u8, 58u8, 230u8, 197u8, 185u8, 56u8, 181u8, 32u8, 81u8, 150u8, 29u8, - 138u8, 142u8, 38u8, 255u8, 216u8, 139u8, 93u8, 56u8, 148u8, 196u8, - 169u8, 168u8, 144u8, 193u8, 200u8, 187u8, 5u8, 141u8, 201u8, 254u8, - 248u8, - ], - ) - } - pub fn referendum_info_of_root( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_democracy::types::ReferendumInfo< - ::core::primitive::u32, - runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::kusama_runtime::RuntimeCall, - >, - ::core::primitive::u128, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Democracy", - "ReferendumInfoOf", - Vec::new(), - [ - 167u8, 58u8, 230u8, 197u8, 185u8, 56u8, 181u8, 32u8, 81u8, 150u8, 29u8, - 138u8, 142u8, 38u8, 255u8, 216u8, 139u8, 93u8, 56u8, 148u8, 196u8, - 169u8, 168u8, 144u8, 193u8, 200u8, 187u8, 5u8, 141u8, 201u8, 254u8, - 248u8, - ], - ) - } - pub fn voting_of( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_democracy::vote::Voting< - ::core::primitive::u128, - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Democracy", - "VotingOf", - vec![::subxt::storage::address::make_static_storage_map_key(_0.borrow())], - [ - 125u8, 121u8, 167u8, 170u8, 18u8, 194u8, 183u8, 38u8, 176u8, 48u8, - 30u8, 88u8, 233u8, 196u8, 33u8, 119u8, 160u8, 201u8, 29u8, 183u8, 88u8, - 67u8, 219u8, 137u8, 6u8, 195u8, 11u8, 63u8, 162u8, 181u8, 82u8, 243u8, - ], - ) - } - pub fn voting_of_root( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_democracy::vote::Voting< - ::core::primitive::u128, - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Democracy", - "VotingOf", - Vec::new(), - [ - 125u8, 121u8, 167u8, 170u8, 18u8, 194u8, 183u8, 38u8, 176u8, 48u8, - 30u8, 88u8, 233u8, 196u8, 33u8, 119u8, 160u8, 201u8, 29u8, 183u8, 88u8, - 67u8, 219u8, 137u8, 6u8, 195u8, 11u8, 63u8, 162u8, 181u8, 82u8, 243u8, - ], - ) - } - pub fn last_tabled_was_external( - &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( - "Democracy", - "LastTabledWasExternal", - vec![], - [ - 3u8, 67u8, 106u8, 1u8, 89u8, 204u8, 4u8, 145u8, 121u8, 44u8, 34u8, - 76u8, 18u8, 206u8, 65u8, 214u8, 222u8, 82u8, 31u8, 223u8, 144u8, 169u8, - 17u8, 6u8, 138u8, 36u8, 113u8, 155u8, 241u8, 106u8, 189u8, 218u8, - ], - ) - } - pub fn next_external( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ( - runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::kusama_runtime::RuntimeCall, - >, - runtime_types::pallet_democracy::vote_threshold::VoteThreshold, - ), - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "Democracy", - "NextExternal", - vec![], - [ - 213u8, 36u8, 235u8, 75u8, 153u8, 33u8, 140u8, 121u8, 191u8, 197u8, - 17u8, 57u8, 234u8, 67u8, 81u8, 55u8, 123u8, 179u8, 207u8, 124u8, 238u8, - 147u8, 243u8, 126u8, 200u8, 2u8, 16u8, 143u8, 165u8, 143u8, 159u8, - 93u8, - ], - ) - } - pub fn blacklist( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ( - ::core::primitive::u32, - 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( - "Democracy", - "Blacklist", - vec![::subxt::storage::address::make_static_storage_map_key(_0.borrow())], - [ - 8u8, 227u8, 185u8, 179u8, 192u8, 92u8, 171u8, 125u8, 237u8, 224u8, - 109u8, 207u8, 44u8, 181u8, 78u8, 17u8, 254u8, 183u8, 199u8, 241u8, - 49u8, 90u8, 101u8, 168u8, 46u8, 89u8, 253u8, 155u8, 38u8, 183u8, 112u8, - 35u8, - ], - ) - } - pub fn blacklist_root( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ( - ::core::primitive::u32, - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::subxt::utils::AccountId32, - >, - ), - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Democracy", - "Blacklist", - Vec::new(), - [ - 8u8, 227u8, 185u8, 179u8, 192u8, 92u8, 171u8, 125u8, 237u8, 224u8, - 109u8, 207u8, 44u8, 181u8, 78u8, 17u8, 254u8, 183u8, 199u8, 241u8, - 49u8, 90u8, 101u8, 168u8, 46u8, 89u8, 253u8, 155u8, 38u8, 183u8, 112u8, - 35u8, - ], - ) - } - pub fn cancellations( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::bool, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Democracy", - "Cancellations", - vec![::subxt::storage::address::make_static_storage_map_key(_0.borrow())], - [ - 154u8, 36u8, 172u8, 46u8, 65u8, 218u8, 30u8, 151u8, 173u8, 186u8, - 166u8, 79u8, 35u8, 226u8, 94u8, 200u8, 67u8, 44u8, 47u8, 7u8, 17u8, - 89u8, 169u8, 166u8, 236u8, 101u8, 68u8, 54u8, 114u8, 141u8, 177u8, - 135u8, - ], - ) - } - pub fn cancellations_root( - &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( - "Democracy", - "Cancellations", - Vec::new(), - [ - 154u8, 36u8, 172u8, 46u8, 65u8, 218u8, 30u8, 151u8, 173u8, 186u8, - 166u8, 79u8, 35u8, 226u8, 94u8, 200u8, 67u8, 44u8, 47u8, 7u8, 17u8, - 89u8, 169u8, 166u8, 236u8, 101u8, 68u8, 54u8, 114u8, 141u8, 177u8, - 135u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - pub fn enactment_period( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "Democracy", - "EnactmentPeriod", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, - ], - ) - } - pub fn launch_period(&self) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "Democracy", - "LaunchPeriod", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, - ], - ) - } - pub fn voting_period(&self) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "Democracy", - "VotingPeriod", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, - ], - ) - } - pub fn vote_locking_period( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "Democracy", - "VoteLockingPeriod", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, - ], - ) - } - pub fn minimum_deposit( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::Address::new_static( - "Democracy", - "MinimumDeposit", - [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, - 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, - 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, - ], - ) - } - pub fn instant_allowed( - &self, - ) -> ::subxt::constants::Address<::core::primitive::bool> { - ::subxt::constants::Address::new_static( - "Democracy", - "InstantAllowed", - [ - 165u8, 28u8, 112u8, 190u8, 18u8, 129u8, 182u8, 206u8, 237u8, 1u8, 68u8, - 252u8, 125u8, 234u8, 185u8, 50u8, 149u8, 164u8, 47u8, 126u8, 134u8, - 100u8, 14u8, 86u8, 209u8, 39u8, 20u8, 4u8, 233u8, 115u8, 102u8, 131u8, - ], - ) - } - pub fn fast_track_voting_period( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "Democracy", - "FastTrackVotingPeriod", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, - ], - ) - } - pub fn cooloff_period( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "Democracy", - "CooloffPeriod", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, - ], - ) - } - pub fn max_votes(&self) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "Democracy", - "MaxVotes", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, - ], - ) - } - pub fn max_proposals(&self) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "Democracy", - "MaxProposals", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, - ], - ) - } - pub fn max_deposits(&self) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "Democracy", - "MaxDeposits", - [ - 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 max_blacklisted( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "Democracy", - "MaxBlacklisted", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, - ], - ) - } - } - } - } - pub mod council { - use super::{root_mod, runtime_types}; - pub mod calls { - use super::{root_mod, 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 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, - )] - #[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, - )] - #[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, - )] - #[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, - )] - #[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, - )] - #[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, - )] - #[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 { - pub fn set_members( - &self, - new_members: ::std::vec::Vec<::subxt::utils::AccountId32>, - prime: ::core::option::Option<::subxt::utils::AccountId32>, - old_count: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Council", - "set_members", - SetMembers { new_members, prime, old_count }, - [ - 196u8, 103u8, 123u8, 125u8, 226u8, 177u8, 126u8, 37u8, 160u8, 114u8, - 34u8, 136u8, 219u8, 84u8, 199u8, 94u8, 242u8, 20u8, 126u8, 126u8, - 166u8, 190u8, 198u8, 33u8, 162u8, 113u8, 237u8, 222u8, 90u8, 1u8, 2u8, - 234u8, - ], - ) - } - pub fn execute( - &self, - proposal: runtime_types::kusama_runtime::RuntimeCall, - length_bound: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Council", - "execute", - Execute { proposal: ::std::boxed::Box::new(proposal), length_bound }, - [ - 5u8, 205u8, 182u8, 50u8, 239u8, 210u8, 133u8, 122u8, 130u8, 65u8, - 121u8, 85u8, 104u8, 13u8, 14u8, 119u8, 178u8, 44u8, 254u8, 143u8, - 220u8, 152u8, 125u8, 80u8, 254u8, 115u8, 210u8, 218u8, 175u8, 79u8, - 71u8, 235u8, - ], - ) - } - pub fn propose( - &self, - threshold: ::core::primitive::u32, - proposal: runtime_types::kusama_runtime::RuntimeCall, - length_bound: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Council", - "propose", - Propose { - threshold, - proposal: ::std::boxed::Box::new(proposal), - length_bound, - }, - [ - 150u8, 12u8, 182u8, 53u8, 159u8, 61u8, 17u8, 31u8, 144u8, 90u8, 116u8, - 6u8, 228u8, 1u8, 204u8, 204u8, 1u8, 158u8, 193u8, 188u8, 205u8, 213u8, - 126u8, 203u8, 169u8, 214u8, 98u8, 89u8, 67u8, 34u8, 54u8, 242u8, - ], - ) - } - pub fn vote( - &self, - proposal: ::subxt::utils::H256, - index: ::core::primitive::u32, - approve: ::core::primitive::bool, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Council", - "vote", - Vote { proposal, index, approve }, - [ - 108u8, 46u8, 180u8, 148u8, 145u8, 24u8, 173u8, 56u8, 36u8, 100u8, - 216u8, 43u8, 178u8, 202u8, 26u8, 136u8, 93u8, 84u8, 80u8, 134u8, 14u8, - 42u8, 248u8, 205u8, 68u8, 92u8, 79u8, 11u8, 113u8, 115u8, 157u8, 100u8, - ], - ) - } - 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, - ], - ) - } - pub fn disapprove_proposal( - &self, - proposal_hash: ::subxt::utils::H256, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Council", - "disapprove_proposal", - DisapproveProposal { proposal_hash }, - [ - 25u8, 123u8, 1u8, 8u8, 74u8, 37u8, 3u8, 40u8, 97u8, 37u8, 175u8, 224u8, - 72u8, 155u8, 123u8, 109u8, 104u8, 43u8, 91u8, 125u8, 199u8, 51u8, 17u8, - 225u8, 133u8, 38u8, 120u8, 76u8, 164u8, 5u8, 194u8, 201u8, - ], - ) - } - pub fn close( - &self, - proposal_hash: ::subxt::utils::H256, - index: ::core::primitive::u32, - proposal_weight_bound: runtime_types::sp_weights::weight_v2::Weight, - length_bound: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Council", - "close", - Close { proposal_hash, index, proposal_weight_bound, length_bound }, - [ - 191u8, 138u8, 89u8, 247u8, 97u8, 51u8, 45u8, 193u8, 76u8, 16u8, 80u8, - 225u8, 197u8, 83u8, 204u8, 133u8, 169u8, 16u8, 86u8, 32u8, 125u8, 16u8, - 116u8, 185u8, 45u8, 20u8, 76u8, 148u8, 206u8, 163u8, 154u8, 30u8, - ], - ) - } - } - } - pub type Event = runtime_types::pallet_collective::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")] - pub struct Proposed { - pub account: ::subxt::utils::AccountId32, - pub proposal_index: ::core::primitive::u32, - pub proposal_hash: ::subxt::utils::H256, - pub threshold: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for Proposed { - const PALLET: &'static str = "Council"; - const EVENT: &'static str = "Proposed"; - } - #[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 Voted { - pub account: ::subxt::utils::AccountId32, - pub proposal_hash: ::subxt::utils::H256, - pub voted: ::core::primitive::bool, - pub yes: ::core::primitive::u32, - pub no: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for Voted { - const PALLET: &'static str = "Council"; - const EVENT: &'static str = "Voted"; - } - #[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 Approved { - pub proposal_hash: ::subxt::utils::H256, - } - impl ::subxt::events::StaticEvent for Approved { - const PALLET: &'static str = "Council"; - const EVENT: &'static str = "Approved"; - } - #[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 Disapproved { - pub proposal_hash: ::subxt::utils::H256, - } - impl ::subxt::events::StaticEvent for Disapproved { - const PALLET: &'static str = "Council"; - const EVENT: &'static str = "Disapproved"; - } - #[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 Executed { - pub proposal_hash: ::subxt::utils::H256, - pub result: ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - } - impl ::subxt::events::StaticEvent for Executed { - const PALLET: &'static str = "Council"; - const EVENT: &'static str = "Executed"; - } - #[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 MemberExecuted { - pub proposal_hash: ::subxt::utils::H256, - pub result: ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - } - impl ::subxt::events::StaticEvent for MemberExecuted { - const PALLET: &'static str = "Council"; - const EVENT: &'static str = "MemberExecuted"; - } - #[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 Closed { - pub proposal_hash: ::subxt::utils::H256, - pub yes: ::core::primitive::u32, - pub no: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for Closed { - const PALLET: &'static str = "Council"; - const EVENT: &'static str = "Closed"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - pub fn proposals( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::sp_core::bounded::bounded_vec::BoundedVec<::subxt::utils::H256>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Council", - "Proposals", - vec![], - [ - 10u8, 133u8, 82u8, 54u8, 193u8, 41u8, 253u8, 159u8, 56u8, 96u8, 249u8, - 148u8, 43u8, 57u8, 116u8, 43u8, 222u8, 243u8, 237u8, 231u8, 238u8, - 60u8, 26u8, 225u8, 19u8, 203u8, 213u8, 220u8, 114u8, 217u8, 100u8, - 27u8, - ], - ) - } - pub fn proposal_of( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::kusama_runtime::RuntimeCall, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Council", - "ProposalOf", - vec![::subxt::storage::address::make_static_storage_map_key(_0.borrow())], - [ - 210u8, 86u8, 59u8, 99u8, 220u8, 89u8, 222u8, 197u8, 71u8, 131u8, 153u8, - 61u8, 234u8, 151u8, 93u8, 126u8, 11u8, 48u8, 194u8, 182u8, 162u8, - 104u8, 223u8, 70u8, 101u8, 246u8, 255u8, 34u8, 209u8, 188u8, 47u8, 1u8, - ], - ) - } - pub fn proposal_of_root( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::kusama_runtime::RuntimeCall, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Council", - "ProposalOf", - Vec::new(), - [ - 210u8, 86u8, 59u8, 99u8, 220u8, 89u8, 222u8, 197u8, 71u8, 131u8, 153u8, - 61u8, 234u8, 151u8, 93u8, 126u8, 11u8, 48u8, 194u8, 182u8, 162u8, - 104u8, 223u8, 70u8, 101u8, 246u8, 255u8, 34u8, 209u8, 188u8, 47u8, 1u8, - ], - ) - } - pub fn voting( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_collective::Votes< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Council", - "Voting", - vec![::subxt::storage::address::make_static_storage_map_key(_0.borrow())], - [ - 89u8, 108u8, 65u8, 58u8, 60u8, 116u8, 54u8, 68u8, 179u8, 73u8, 161u8, - 168u8, 78u8, 213u8, 208u8, 54u8, 244u8, 58u8, 70u8, 209u8, 170u8, - 136u8, 215u8, 3u8, 2u8, 105u8, 229u8, 217u8, 240u8, 230u8, 107u8, - 221u8, - ], - ) - } - pub fn voting_root( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_collective::Votes< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Council", - "Voting", - Vec::new(), - [ - 89u8, 108u8, 65u8, 58u8, 60u8, 116u8, 54u8, 68u8, 179u8, 73u8, 161u8, - 168u8, 78u8, 213u8, 208u8, 54u8, 244u8, 58u8, 70u8, 209u8, 170u8, - 136u8, 215u8, 3u8, 2u8, 105u8, 229u8, 217u8, 240u8, 230u8, 107u8, - 221u8, - ], - ) - } - pub fn proposal_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( - "Council", - "ProposalCount", - vec![], - [ - 132u8, 145u8, 78u8, 218u8, 51u8, 189u8, 55u8, 172u8, 143u8, 33u8, - 140u8, 99u8, 124u8, 208u8, 57u8, 232u8, 154u8, 110u8, 32u8, 142u8, - 24u8, 149u8, 109u8, 105u8, 30u8, 83u8, 39u8, 177u8, 127u8, 160u8, 34u8, - 70u8, - ], - ) - } - pub fn members( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec<::subxt::utils::AccountId32>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Council", - "Members", - vec![], - [ - 162u8, 72u8, 174u8, 204u8, 140u8, 105u8, 205u8, 176u8, 197u8, 117u8, - 206u8, 134u8, 157u8, 110u8, 139u8, 54u8, 43u8, 233u8, 25u8, 51u8, 36u8, - 238u8, 94u8, 124u8, 221u8, 52u8, 237u8, 71u8, 125u8, 56u8, 129u8, - 222u8, - ], - ) - } - pub fn prime( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::subxt::utils::AccountId32, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "Council", - "Prime", - vec![], - [ - 108u8, 118u8, 54u8, 193u8, 207u8, 227u8, 119u8, 97u8, 23u8, 239u8, - 157u8, 69u8, 56u8, 142u8, 106u8, 17u8, 215u8, 159u8, 48u8, 42u8, 185u8, - 209u8, 49u8, 159u8, 32u8, 168u8, 111u8, 158u8, 159u8, 217u8, 244u8, - 158u8, - ], - ) - } - } - } - } - pub mod technical_committee { - use super::{root_mod, runtime_types}; - pub mod calls { - use super::{root_mod, 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 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, - )] - #[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, - )] - #[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, - )] - #[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, - )] - #[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, - )] - #[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, - )] - #[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 { - pub fn set_members( - &self, - new_members: ::std::vec::Vec<::subxt::utils::AccountId32>, - prime: ::core::option::Option<::subxt::utils::AccountId32>, - old_count: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "TechnicalCommittee", - "set_members", - SetMembers { new_members, prime, old_count }, - [ - 196u8, 103u8, 123u8, 125u8, 226u8, 177u8, 126u8, 37u8, 160u8, 114u8, - 34u8, 136u8, 219u8, 84u8, 199u8, 94u8, 242u8, 20u8, 126u8, 126u8, - 166u8, 190u8, 198u8, 33u8, 162u8, 113u8, 237u8, 222u8, 90u8, 1u8, 2u8, - 234u8, - ], - ) - } - pub fn execute( - &self, - proposal: runtime_types::kusama_runtime::RuntimeCall, - length_bound: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "TechnicalCommittee", - "execute", - Execute { proposal: ::std::boxed::Box::new(proposal), length_bound }, - [ - 5u8, 205u8, 182u8, 50u8, 239u8, 210u8, 133u8, 122u8, 130u8, 65u8, - 121u8, 85u8, 104u8, 13u8, 14u8, 119u8, 178u8, 44u8, 254u8, 143u8, - 220u8, 152u8, 125u8, 80u8, 254u8, 115u8, 210u8, 218u8, 175u8, 79u8, - 71u8, 235u8, - ], - ) - } - pub fn propose( - &self, - threshold: ::core::primitive::u32, - proposal: runtime_types::kusama_runtime::RuntimeCall, - length_bound: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "TechnicalCommittee", - "propose", - Propose { - threshold, - proposal: ::std::boxed::Box::new(proposal), - length_bound, - }, - [ - 150u8, 12u8, 182u8, 53u8, 159u8, 61u8, 17u8, 31u8, 144u8, 90u8, 116u8, - 6u8, 228u8, 1u8, 204u8, 204u8, 1u8, 158u8, 193u8, 188u8, 205u8, 213u8, - 126u8, 203u8, 169u8, 214u8, 98u8, 89u8, 67u8, 34u8, 54u8, 242u8, - ], - ) - } - pub fn vote( - &self, - proposal: ::subxt::utils::H256, - index: ::core::primitive::u32, - approve: ::core::primitive::bool, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "TechnicalCommittee", - "vote", - Vote { proposal, index, approve }, - [ - 108u8, 46u8, 180u8, 148u8, 145u8, 24u8, 173u8, 56u8, 36u8, 100u8, - 216u8, 43u8, 178u8, 202u8, 26u8, 136u8, 93u8, 84u8, 80u8, 134u8, 14u8, - 42u8, 248u8, 205u8, 68u8, 92u8, 79u8, 11u8, 113u8, 115u8, 157u8, 100u8, - ], - ) - } - 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, - ], - ) - } - pub fn disapprove_proposal( - &self, - proposal_hash: ::subxt::utils::H256, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "TechnicalCommittee", - "disapprove_proposal", - DisapproveProposal { proposal_hash }, - [ - 25u8, 123u8, 1u8, 8u8, 74u8, 37u8, 3u8, 40u8, 97u8, 37u8, 175u8, 224u8, - 72u8, 155u8, 123u8, 109u8, 104u8, 43u8, 91u8, 125u8, 199u8, 51u8, 17u8, - 225u8, 133u8, 38u8, 120u8, 76u8, 164u8, 5u8, 194u8, 201u8, - ], - ) - } - pub fn close( - &self, - proposal_hash: ::subxt::utils::H256, - index: ::core::primitive::u32, - proposal_weight_bound: runtime_types::sp_weights::weight_v2::Weight, - length_bound: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "TechnicalCommittee", - "close", - Close { proposal_hash, index, proposal_weight_bound, length_bound }, - [ - 191u8, 138u8, 89u8, 247u8, 97u8, 51u8, 45u8, 193u8, 76u8, 16u8, 80u8, - 225u8, 197u8, 83u8, 204u8, 133u8, 169u8, 16u8, 86u8, 32u8, 125u8, 16u8, - 116u8, 185u8, 45u8, 20u8, 76u8, 148u8, 206u8, 163u8, 154u8, 30u8, - ], - ) - } - } - } - pub type Event = runtime_types::pallet_collective::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")] - pub struct Proposed { - pub account: ::subxt::utils::AccountId32, - pub proposal_index: ::core::primitive::u32, - pub proposal_hash: ::subxt::utils::H256, - pub threshold: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for Proposed { - const PALLET: &'static str = "TechnicalCommittee"; - const EVENT: &'static str = "Proposed"; - } - #[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 Voted { - pub account: ::subxt::utils::AccountId32, - pub proposal_hash: ::subxt::utils::H256, - pub voted: ::core::primitive::bool, - pub yes: ::core::primitive::u32, - pub no: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for Voted { - const PALLET: &'static str = "TechnicalCommittee"; - const EVENT: &'static str = "Voted"; - } - #[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 Approved { - pub proposal_hash: ::subxt::utils::H256, - } - impl ::subxt::events::StaticEvent for Approved { - const PALLET: &'static str = "TechnicalCommittee"; - const EVENT: &'static str = "Approved"; - } - #[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 Disapproved { - pub proposal_hash: ::subxt::utils::H256, - } - impl ::subxt::events::StaticEvent for Disapproved { - const PALLET: &'static str = "TechnicalCommittee"; - const EVENT: &'static str = "Disapproved"; - } - #[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 Executed { - pub proposal_hash: ::subxt::utils::H256, - pub result: ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - } - impl ::subxt::events::StaticEvent for Executed { - const PALLET: &'static str = "TechnicalCommittee"; - const EVENT: &'static str = "Executed"; - } - #[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 MemberExecuted { - pub proposal_hash: ::subxt::utils::H256, - pub result: ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - } - impl ::subxt::events::StaticEvent for MemberExecuted { - const PALLET: &'static str = "TechnicalCommittee"; - const EVENT: &'static str = "MemberExecuted"; - } - #[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 Closed { - pub proposal_hash: ::subxt::utils::H256, - pub yes: ::core::primitive::u32, - pub no: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for Closed { - const PALLET: &'static str = "TechnicalCommittee"; - const EVENT: &'static str = "Closed"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - pub fn proposals( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::sp_core::bounded::bounded_vec::BoundedVec<::subxt::utils::H256>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "TechnicalCommittee", - "Proposals", - vec![], - [ - 10u8, 133u8, 82u8, 54u8, 193u8, 41u8, 253u8, 159u8, 56u8, 96u8, 249u8, - 148u8, 43u8, 57u8, 116u8, 43u8, 222u8, 243u8, 237u8, 231u8, 238u8, - 60u8, 26u8, 225u8, 19u8, 203u8, 213u8, 220u8, 114u8, 217u8, 100u8, - 27u8, - ], - ) - } - pub fn proposal_of( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::kusama_runtime::RuntimeCall, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "TechnicalCommittee", - "ProposalOf", - vec![::subxt::storage::address::make_static_storage_map_key(_0.borrow())], - [ - 210u8, 86u8, 59u8, 99u8, 220u8, 89u8, 222u8, 197u8, 71u8, 131u8, 153u8, - 61u8, 234u8, 151u8, 93u8, 126u8, 11u8, 48u8, 194u8, 182u8, 162u8, - 104u8, 223u8, 70u8, 101u8, 246u8, 255u8, 34u8, 209u8, 188u8, 47u8, 1u8, - ], - ) - } - pub fn proposal_of_root( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::kusama_runtime::RuntimeCall, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "TechnicalCommittee", - "ProposalOf", - Vec::new(), - [ - 210u8, 86u8, 59u8, 99u8, 220u8, 89u8, 222u8, 197u8, 71u8, 131u8, 153u8, - 61u8, 234u8, 151u8, 93u8, 126u8, 11u8, 48u8, 194u8, 182u8, 162u8, - 104u8, 223u8, 70u8, 101u8, 246u8, 255u8, 34u8, 209u8, 188u8, 47u8, 1u8, - ], - ) - } - pub fn voting( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_collective::Votes< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "TechnicalCommittee", - "Voting", - vec![::subxt::storage::address::make_static_storage_map_key(_0.borrow())], - [ - 89u8, 108u8, 65u8, 58u8, 60u8, 116u8, 54u8, 68u8, 179u8, 73u8, 161u8, - 168u8, 78u8, 213u8, 208u8, 54u8, 244u8, 58u8, 70u8, 209u8, 170u8, - 136u8, 215u8, 3u8, 2u8, 105u8, 229u8, 217u8, 240u8, 230u8, 107u8, - 221u8, - ], - ) - } - pub fn voting_root( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_collective::Votes< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "TechnicalCommittee", - "Voting", - Vec::new(), - [ - 89u8, 108u8, 65u8, 58u8, 60u8, 116u8, 54u8, 68u8, 179u8, 73u8, 161u8, - 168u8, 78u8, 213u8, 208u8, 54u8, 244u8, 58u8, 70u8, 209u8, 170u8, - 136u8, 215u8, 3u8, 2u8, 105u8, 229u8, 217u8, 240u8, 230u8, 107u8, - 221u8, - ], - ) - } - pub fn proposal_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( - "TechnicalCommittee", - "ProposalCount", - vec![], - [ - 132u8, 145u8, 78u8, 218u8, 51u8, 189u8, 55u8, 172u8, 143u8, 33u8, - 140u8, 99u8, 124u8, 208u8, 57u8, 232u8, 154u8, 110u8, 32u8, 142u8, - 24u8, 149u8, 109u8, 105u8, 30u8, 83u8, 39u8, 177u8, 127u8, 160u8, 34u8, - 70u8, - ], - ) - } - pub fn members( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec<::subxt::utils::AccountId32>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "TechnicalCommittee", - "Members", - vec![], - [ - 162u8, 72u8, 174u8, 204u8, 140u8, 105u8, 205u8, 176u8, 197u8, 117u8, - 206u8, 134u8, 157u8, 110u8, 139u8, 54u8, 43u8, 233u8, 25u8, 51u8, 36u8, - 238u8, 94u8, 124u8, 221u8, 52u8, 237u8, 71u8, 125u8, 56u8, 129u8, - 222u8, - ], - ) - } - pub fn prime( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::subxt::utils::AccountId32, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "TechnicalCommittee", - "Prime", - vec![], - [ - 108u8, 118u8, 54u8, 193u8, 207u8, 227u8, 119u8, 97u8, 23u8, 239u8, - 157u8, 69u8, 56u8, 142u8, 106u8, 17u8, 215u8, 159u8, 48u8, 42u8, 185u8, - 209u8, 49u8, 159u8, 32u8, 168u8, 111u8, 158u8, 159u8, 217u8, 244u8, - 158u8, - ], - ) - } - } - } - } - pub mod phragmen_election { - use super::{root_mod, runtime_types}; - pub mod calls { - use super::{root_mod, 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 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, - )] - #[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, - )] - #[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, - )] - #[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, - )] - #[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, - )] - #[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 { - pub fn vote( - &self, - votes: ::std::vec::Vec<::subxt::utils::AccountId32>, - value: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "PhragmenElection", - "vote", - Vote { votes, value }, - [ - 71u8, 90u8, 175u8, 225u8, 51u8, 202u8, 197u8, 252u8, 183u8, 92u8, - 239u8, 83u8, 112u8, 144u8, 128u8, 211u8, 109u8, 33u8, 252u8, 6u8, - 156u8, 15u8, 91u8, 88u8, 70u8, 19u8, 32u8, 29u8, 224u8, 255u8, 26u8, - 145u8, - ], - ) - } - pub fn remove_voter(&self) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "PhragmenElection", - "remove_voter", - RemoveVoter {}, - [ - 254u8, 46u8, 140u8, 4u8, 218u8, 45u8, 150u8, 72u8, 67u8, 131u8, 108u8, - 201u8, 46u8, 157u8, 104u8, 161u8, 53u8, 155u8, 130u8, 50u8, 88u8, - 149u8, 255u8, 12u8, 17u8, 85u8, 95u8, 69u8, 153u8, 130u8, 221u8, 1u8, - ], - ) - } - pub fn submit_candidacy( - &self, - candidate_count: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "PhragmenElection", - "submit_candidacy", - SubmitCandidacy { candidate_count }, - [ - 228u8, 63u8, 217u8, 99u8, 128u8, 104u8, 175u8, 10u8, 30u8, 35u8, 47u8, - 14u8, 254u8, 122u8, 146u8, 239u8, 61u8, 145u8, 82u8, 7u8, 181u8, 98u8, - 238u8, 208u8, 23u8, 84u8, 48u8, 255u8, 177u8, 255u8, 84u8, 83u8, - ], - ) - } - pub fn renounce_candidacy( - &self, - renouncing: runtime_types::pallet_elections_phragmen::Renouncing, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "PhragmenElection", - "renounce_candidacy", - RenounceCandidacy { renouncing }, - [ - 70u8, 72u8, 208u8, 36u8, 80u8, 245u8, 224u8, 75u8, 60u8, 142u8, 19u8, - 49u8, 142u8, 90u8, 14u8, 69u8, 15u8, 61u8, 170u8, 235u8, 16u8, 252u8, - 86u8, 200u8, 120u8, 127u8, 36u8, 42u8, 143u8, 130u8, 217u8, 128u8, - ], - ) - } - pub fn remove_member( - &self, - who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - slash_bond: ::core::primitive::bool, - rerun_election: ::core::primitive::bool, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "PhragmenElection", - "remove_member", - RemoveMember { who, slash_bond, rerun_election }, - [ - 45u8, 106u8, 9u8, 19u8, 133u8, 38u8, 20u8, 233u8, 12u8, 169u8, 216u8, - 40u8, 23u8, 139u8, 184u8, 202u8, 2u8, 124u8, 202u8, 48u8, 205u8, 176u8, - 161u8, 43u8, 66u8, 24u8, 189u8, 183u8, 233u8, 62u8, 102u8, 237u8, - ], - ) - } - pub fn clean_defunct_voters( - &self, - num_voters: ::core::primitive::u32, - num_defunct: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "PhragmenElection", - "clean_defunct_voters", - CleanDefunctVoters { num_voters, num_defunct }, - [ - 198u8, 162u8, 30u8, 249u8, 191u8, 38u8, 141u8, 123u8, 230u8, 90u8, - 213u8, 103u8, 168u8, 28u8, 5u8, 215u8, 213u8, 152u8, 46u8, 189u8, - 238u8, 209u8, 209u8, 142u8, 159u8, 222u8, 161u8, 26u8, 161u8, 250u8, - 9u8, 100u8, - ], - ) - } - } - } - pub type Event = runtime_types::pallet_elections_phragmen::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")] - pub struct NewTerm { - pub new_members: - ::std::vec::Vec<(::subxt::utils::AccountId32, ::core::primitive::u128)>, - } - impl ::subxt::events::StaticEvent for NewTerm { - const PALLET: &'static str = "PhragmenElection"; - const EVENT: &'static str = "NewTerm"; - } - #[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 EmptyTerm; - impl ::subxt::events::StaticEvent for EmptyTerm { - const PALLET: &'static str = "PhragmenElection"; - const EVENT: &'static str = "EmptyTerm"; - } - #[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 ElectionError; - impl ::subxt::events::StaticEvent for ElectionError { - const PALLET: &'static str = "PhragmenElection"; - const EVENT: &'static str = "ElectionError"; - } - #[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 MemberKicked { - pub member: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for MemberKicked { - const PALLET: &'static str = "PhragmenElection"; - const EVENT: &'static str = "MemberKicked"; - } - #[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 Renounced { - pub candidate: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for Renounced { - const PALLET: &'static str = "PhragmenElection"; - const EVENT: &'static str = "Renounced"; - } - #[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 CandidateSlashed { - pub candidate: ::subxt::utils::AccountId32, - pub amount: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for CandidateSlashed { - const PALLET: &'static str = "PhragmenElection"; - const EVENT: &'static str = "CandidateSlashed"; - } - #[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 SeatHolderSlashed { - pub seat_holder: ::subxt::utils::AccountId32, - pub amount: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for SeatHolderSlashed { - const PALLET: &'static str = "PhragmenElection"; - const EVENT: &'static str = "SeatHolderSlashed"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - pub fn members( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec< - runtime_types::pallet_elections_phragmen::SeatHolder< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - >, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "PhragmenElection", - "Members", - vec![], - [ - 2u8, 182u8, 43u8, 180u8, 87u8, 185u8, 26u8, 79u8, 196u8, 55u8, 28u8, - 26u8, 174u8, 133u8, 158u8, 221u8, 101u8, 161u8, 83u8, 9u8, 221u8, - 175u8, 221u8, 220u8, 81u8, 80u8, 1u8, 236u8, 74u8, 121u8, 10u8, 82u8, - ], - ) - } - pub fn runners_up( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec< - runtime_types::pallet_elections_phragmen::SeatHolder< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - >, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "PhragmenElection", - "RunnersUp", - vec![], - [ - 248u8, 81u8, 190u8, 53u8, 121u8, 49u8, 55u8, 69u8, 116u8, 177u8, 46u8, - 30u8, 131u8, 14u8, 32u8, 198u8, 10u8, 132u8, 73u8, 117u8, 2u8, 146u8, - 188u8, 146u8, 214u8, 227u8, 97u8, 77u8, 7u8, 131u8, 208u8, 209u8, - ], - ) - } - pub fn candidates( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec<(::subxt::utils::AccountId32, ::core::primitive::u128)>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "PhragmenElection", - "Candidates", - vec![], - [ - 224u8, 107u8, 141u8, 11u8, 54u8, 86u8, 117u8, 45u8, 195u8, 252u8, - 152u8, 21u8, 165u8, 23u8, 198u8, 117u8, 5u8, 216u8, 183u8, 163u8, - 243u8, 56u8, 11u8, 102u8, 85u8, 107u8, 219u8, 250u8, 45u8, 80u8, 108u8, - 127u8, - ], - ) - } - pub fn election_rounds( - &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( - "PhragmenElection", - "ElectionRounds", - vec![], - [ - 144u8, 146u8, 10u8, 32u8, 149u8, 147u8, 59u8, 205u8, 61u8, 246u8, 28u8, - 169u8, 130u8, 136u8, 143u8, 104u8, 253u8, 86u8, 228u8, 68u8, 19u8, - 184u8, 166u8, 214u8, 58u8, 103u8, 176u8, 160u8, 240u8, 249u8, 117u8, - 115u8, - ], - ) - } - pub fn voting( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_elections_phragmen::Voter< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "PhragmenElection", - "Voting", - vec![::subxt::storage::address::make_static_storage_map_key(_0.borrow())], - [ - 9u8, 135u8, 76u8, 194u8, 240u8, 182u8, 111u8, 207u8, 102u8, 37u8, - 126u8, 36u8, 84u8, 112u8, 26u8, 216u8, 175u8, 5u8, 14u8, 189u8, 83u8, - 185u8, 136u8, 39u8, 171u8, 221u8, 147u8, 20u8, 168u8, 126u8, 111u8, - 137u8, - ], - ) - } - pub fn voting_root( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_elections_phragmen::Voter< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - >, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "PhragmenElection", - "Voting", - Vec::new(), - [ - 9u8, 135u8, 76u8, 194u8, 240u8, 182u8, 111u8, 207u8, 102u8, 37u8, - 126u8, 36u8, 84u8, 112u8, 26u8, 216u8, 175u8, 5u8, 14u8, 189u8, 83u8, - 185u8, 136u8, 39u8, 171u8, 221u8, 147u8, 20u8, 168u8, 126u8, 111u8, - 137u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - pub fn pallet_id( - &self, - ) -> ::subxt::constants::Address<[::core::primitive::u8; 8usize]> { - ::subxt::constants::Address::new_static( - "PhragmenElection", - "PalletId", - [ - 224u8, 197u8, 247u8, 125u8, 62u8, 180u8, 69u8, 91u8, 226u8, 36u8, 82u8, - 148u8, 70u8, 147u8, 209u8, 40u8, 210u8, 229u8, 181u8, 191u8, 170u8, - 205u8, 138u8, 97u8, 127u8, 59u8, 124u8, 244u8, 252u8, 30u8, 213u8, - 179u8, - ], - ) - } - pub fn candidacy_bond( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::Address::new_static( - "PhragmenElection", - "CandidacyBond", - [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, - 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, - 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, - ], - ) - } - pub fn voting_bond_base( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::Address::new_static( - "PhragmenElection", - "VotingBondBase", - [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, - 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, - 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, - ], - ) - } - pub fn voting_bond_factor( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::Address::new_static( - "PhragmenElection", - "VotingBondFactor", - [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, - 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, - 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, - ], - ) - } - pub fn desired_members( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "PhragmenElection", - "DesiredMembers", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, - ], - ) - } - pub fn desired_runners_up( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "PhragmenElection", - "DesiredRunnersUp", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, - ], - ) - } - pub fn term_duration(&self) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "PhragmenElection", - "TermDuration", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, - ], - ) - } - pub fn max_candidates( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "PhragmenElection", - "MaxCandidates", - [ - 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 max_voters(&self) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "PhragmenElection", - "MaxVoters", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, - ], - ) - } - } - } - } - pub mod technical_membership { - use super::{root_mod, runtime_types}; - pub mod calls { - use super::{root_mod, 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 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, - )] - #[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, - )] - #[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, - )] - #[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, - )] - #[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, - )] - #[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, - )] - #[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 { - pub fn add_member( - &self, - who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "TechnicalMembership", - "add_member", - AddMember { who }, - [ - 165u8, 116u8, 123u8, 50u8, 236u8, 196u8, 108u8, 211u8, 112u8, 214u8, - 121u8, 105u8, 7u8, 88u8, 125u8, 99u8, 24u8, 0u8, 168u8, 65u8, 158u8, - 100u8, 42u8, 62u8, 101u8, 59u8, 30u8, 174u8, 170u8, 119u8, 141u8, - 121u8, - ], - ) - } - pub fn remove_member( - &self, - who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "TechnicalMembership", - "remove_member", - RemoveMember { who }, - [ - 177u8, 18u8, 217u8, 235u8, 254u8, 40u8, 137u8, 79u8, 146u8, 5u8, 55u8, - 187u8, 129u8, 28u8, 54u8, 132u8, 115u8, 220u8, 132u8, 139u8, 91u8, - 81u8, 0u8, 110u8, 188u8, 248u8, 1u8, 135u8, 93u8, 153u8, 95u8, 193u8, - ], - ) - } - pub fn swap_member( - &self, - remove: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - add: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "TechnicalMembership", - "swap_member", - SwapMember { remove, add }, - [ - 96u8, 248u8, 50u8, 206u8, 192u8, 242u8, 162u8, 62u8, 28u8, 91u8, 11u8, - 208u8, 15u8, 84u8, 188u8, 234u8, 219u8, 233u8, 200u8, 215u8, 157u8, - 155u8, 40u8, 220u8, 132u8, 182u8, 57u8, 210u8, 94u8, 240u8, 95u8, - 252u8, - ], - ) - } - pub fn reset_members( - &self, - members: ::std::vec::Vec<::subxt::utils::AccountId32>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "TechnicalMembership", - "reset_members", - ResetMembers { members }, - [ - 9u8, 35u8, 28u8, 59u8, 158u8, 232u8, 89u8, 78u8, 101u8, 53u8, 240u8, - 98u8, 13u8, 104u8, 235u8, 161u8, 201u8, 150u8, 117u8, 32u8, 75u8, - 209u8, 166u8, 252u8, 57u8, 131u8, 96u8, 215u8, 51u8, 81u8, 42u8, 123u8, - ], - ) - } - pub fn change_key( - &self, - new: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "TechnicalMembership", - "change_key", - ChangeKey { new }, - [ - 27u8, 236u8, 241u8, 168u8, 98u8, 39u8, 176u8, 220u8, 145u8, 48u8, - 173u8, 25u8, 179u8, 103u8, 170u8, 13u8, 166u8, 181u8, 131u8, 160u8, - 131u8, 219u8, 116u8, 34u8, 152u8, 152u8, 46u8, 100u8, 46u8, 5u8, 156u8, - 195u8, - ], - ) - } - pub fn set_prime( - &self, - who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "TechnicalMembership", - "set_prime", - SetPrime { who }, - [ - 0u8, 42u8, 111u8, 52u8, 151u8, 19u8, 239u8, 149u8, 183u8, 252u8, 87u8, - 194u8, 145u8, 21u8, 245u8, 112u8, 221u8, 181u8, 87u8, 28u8, 48u8, 39u8, - 210u8, 133u8, 241u8, 207u8, 255u8, 209u8, 139u8, 232u8, 119u8, 64u8, - ], - ) - } - pub fn clear_prime(&self) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "TechnicalMembership", - "clear_prime", - ClearPrime {}, - [ - 186u8, 182u8, 225u8, 90u8, 71u8, 124u8, 69u8, 100u8, 234u8, 25u8, 53u8, - 23u8, 182u8, 32u8, 176u8, 81u8, 54u8, 140u8, 235u8, 126u8, 247u8, 7u8, - 155u8, 62u8, 35u8, 135u8, 48u8, 61u8, 88u8, 160u8, 183u8, 72u8, - ], - ) - } - } - } - pub type Event = runtime_types::pallet_membership::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")] - pub struct MemberAdded; - impl ::subxt::events::StaticEvent for MemberAdded { - const PALLET: &'static str = "TechnicalMembership"; - const EVENT: &'static str = "MemberAdded"; - } - #[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 MemberRemoved; - impl ::subxt::events::StaticEvent for MemberRemoved { - const PALLET: &'static str = "TechnicalMembership"; - const EVENT: &'static str = "MemberRemoved"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct MembersSwapped; - impl ::subxt::events::StaticEvent for MembersSwapped { - const PALLET: &'static str = "TechnicalMembership"; - const EVENT: &'static str = "MembersSwapped"; - } - #[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 MembersReset; - impl ::subxt::events::StaticEvent for MembersReset { - const PALLET: &'static str = "TechnicalMembership"; - const EVENT: &'static str = "MembersReset"; - } - #[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 KeyChanged; - impl ::subxt::events::StaticEvent for KeyChanged { - const PALLET: &'static str = "TechnicalMembership"; - const EVENT: &'static str = "KeyChanged"; - } - #[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 Dummy; - impl ::subxt::events::StaticEvent for Dummy { - const PALLET: &'static str = "TechnicalMembership"; - const EVENT: &'static str = "Dummy"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - pub fn members( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - 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( - "TechnicalMembership", - "Members", - vec![], - [ - 56u8, 56u8, 29u8, 90u8, 26u8, 115u8, 252u8, 185u8, 37u8, 108u8, 16u8, - 46u8, 136u8, 139u8, 30u8, 19u8, 235u8, 78u8, 176u8, 129u8, 180u8, 57u8, - 178u8, 239u8, 211u8, 6u8, 64u8, 129u8, 195u8, 46u8, 178u8, 157u8, - ], - ) - } - pub fn prime( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::subxt::utils::AccountId32, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "TechnicalMembership", - "Prime", - vec![], - [ - 108u8, 118u8, 54u8, 193u8, 207u8, 227u8, 119u8, 97u8, 23u8, 239u8, - 157u8, 69u8, 56u8, 142u8, 106u8, 17u8, 215u8, 159u8, 48u8, 42u8, 185u8, - 209u8, 49u8, 159u8, 32u8, 168u8, 111u8, 158u8, 159u8, 217u8, 244u8, - 158u8, - ], - ) - } - } - } - } - pub mod treasury { - use super::{root_mod, runtime_types}; - pub mod calls { - use super::{root_mod, 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 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, - )] - #[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, - )] - #[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, - )] - #[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, - )] - #[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 { - pub fn propose_spend( - &self, - value: ::core::primitive::u128, - beneficiary: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Treasury", - "propose_spend", - ProposeSpend { value, beneficiary }, - [ - 109u8, 46u8, 8u8, 159u8, 127u8, 79u8, 27u8, 100u8, 92u8, 244u8, 78u8, - 46u8, 105u8, 246u8, 169u8, 210u8, 149u8, 7u8, 108u8, 153u8, 203u8, - 223u8, 8u8, 117u8, 126u8, 250u8, 255u8, 52u8, 245u8, 69u8, 45u8, 136u8, - ], - ) - } - pub fn reject_proposal( - &self, - proposal_id: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Treasury", - "reject_proposal", - RejectProposal { proposal_id }, - [ - 106u8, 223u8, 97u8, 22u8, 111u8, 208u8, 128u8, 26u8, 198u8, 140u8, - 118u8, 126u8, 187u8, 51u8, 193u8, 50u8, 193u8, 68u8, 143u8, 144u8, - 34u8, 132u8, 44u8, 244u8, 105u8, 186u8, 223u8, 234u8, 17u8, 145u8, - 209u8, 145u8, - ], - ) - } - pub fn approve_proposal( - &self, - proposal_id: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Treasury", - "approve_proposal", - ApproveProposal { proposal_id }, - [ - 164u8, 229u8, 172u8, 98u8, 129u8, 62u8, 84u8, 128u8, 47u8, 108u8, 33u8, - 120u8, 89u8, 79u8, 57u8, 121u8, 4u8, 197u8, 170u8, 153u8, 156u8, 17u8, - 59u8, 164u8, 123u8, 227u8, 175u8, 195u8, 220u8, 160u8, 60u8, 186u8, - ], - ) - } - pub fn spend( - &self, - amount: ::core::primitive::u128, - beneficiary: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Treasury", - "spend", - Spend { amount, beneficiary }, - [ - 177u8, 178u8, 242u8, 136u8, 135u8, 237u8, 114u8, 71u8, 233u8, 239u8, - 7u8, 84u8, 14u8, 228u8, 58u8, 31u8, 158u8, 185u8, 25u8, 91u8, 70u8, - 33u8, 19u8, 92u8, 100u8, 162u8, 5u8, 48u8, 20u8, 120u8, 9u8, 109u8, - ], - ) - } - pub fn remove_approval( - &self, - proposal_id: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Treasury", - "remove_approval", - RemoveApproval { proposal_id }, - [ - 133u8, 126u8, 181u8, 47u8, 196u8, 243u8, 7u8, 46u8, 25u8, 251u8, 154u8, - 125u8, 217u8, 77u8, 54u8, 245u8, 240u8, 180u8, 97u8, 34u8, 186u8, 53u8, - 225u8, 144u8, 155u8, 107u8, 172u8, 54u8, 250u8, 184u8, 178u8, 86u8, - ], - ) - } - } - } - pub type Event = runtime_types::pallet_treasury::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, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Proposed { - pub proposal_index: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for Proposed { - const PALLET: &'static str = "Treasury"; - const EVENT: &'static str = "Proposed"; - } - #[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 Spending { - pub budget_remaining: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for Spending { - const PALLET: &'static str = "Treasury"; - const EVENT: &'static str = "Spending"; - } - #[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 Awarded { - pub proposal_index: ::core::primitive::u32, - pub award: ::core::primitive::u128, - pub account: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for Awarded { - const PALLET: &'static str = "Treasury"; - const EVENT: &'static str = "Awarded"; - } - #[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 Rejected { - pub proposal_index: ::core::primitive::u32, - pub slashed: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for Rejected { - const PALLET: &'static str = "Treasury"; - 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, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Burnt { - pub burnt_funds: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for Burnt { - const PALLET: &'static str = "Treasury"; - const EVENT: &'static str = "Burnt"; - } - #[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 Rollover { - pub rollover_balance: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for Rollover { - const PALLET: &'static str = "Treasury"; - const EVENT: &'static str = "Rollover"; - } - #[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 Deposit { - pub value: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for Deposit { - const PALLET: &'static str = "Treasury"; - const EVENT: &'static str = "Deposit"; - } - #[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 SpendApproved { - pub proposal_index: ::core::primitive::u32, - pub amount: ::core::primitive::u128, - pub beneficiary: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for SpendApproved { - 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, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - 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; - pub struct StorageApi; - impl StorageApi { - pub fn proposal_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( - "Treasury", - "ProposalCount", - vec![], - [ - 132u8, 145u8, 78u8, 218u8, 51u8, 189u8, 55u8, 172u8, 143u8, 33u8, - 140u8, 99u8, 124u8, 208u8, 57u8, 232u8, 154u8, 110u8, 32u8, 142u8, - 24u8, 149u8, 109u8, 105u8, 30u8, 83u8, 39u8, 177u8, 127u8, 160u8, 34u8, - 70u8, - ], - ) - } - pub fn proposals( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_treasury::Proposal< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - >, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Treasury", - "Proposals", - vec![::subxt::storage::address::make_static_storage_map_key(_0.borrow())], - [ - 62u8, 223u8, 55u8, 209u8, 151u8, 134u8, 122u8, 65u8, 207u8, 38u8, - 113u8, 213u8, 237u8, 48u8, 129u8, 32u8, 91u8, 228u8, 108u8, 91u8, 37u8, - 49u8, 94u8, 4u8, 75u8, 122u8, 25u8, 34u8, 198u8, 224u8, 246u8, 160u8, - ], - ) - } - pub fn proposals_root( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_treasury::Proposal< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Treasury", - "Proposals", - Vec::new(), - [ - 62u8, 223u8, 55u8, 209u8, 151u8, 134u8, 122u8, 65u8, 207u8, 38u8, - 113u8, 213u8, 237u8, 48u8, 129u8, 32u8, 91u8, 228u8, 108u8, 91u8, 37u8, - 49u8, 94u8, 4u8, 75u8, 122u8, 25u8, 34u8, 198u8, 224u8, 246u8, 160u8, - ], - ) - } - 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, - ], - ) - } - pub fn 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( - "Treasury", - "Approvals", - vec![], - [ - 202u8, 106u8, 189u8, 40u8, 127u8, 172u8, 108u8, 50u8, 193u8, 4u8, - 248u8, 226u8, 176u8, 101u8, 212u8, 222u8, 64u8, 206u8, 244u8, 175u8, - 111u8, 106u8, 86u8, 96u8, 19u8, 109u8, 218u8, 152u8, 30u8, 59u8, 96u8, - 1u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - pub fn proposal_bond( - &self, - ) -> ::subxt::constants::Address - { - ::subxt::constants::Address::new_static( - "Treasury", - "ProposalBond", - [ - 225u8, 236u8, 95u8, 157u8, 90u8, 94u8, 106u8, 192u8, 254u8, 19u8, 87u8, - 80u8, 16u8, 62u8, 42u8, 204u8, 136u8, 106u8, 225u8, 53u8, 212u8, 52u8, - 177u8, 79u8, 4u8, 116u8, 201u8, 104u8, 222u8, 75u8, 86u8, 227u8, - ], - ) - } - pub fn proposal_bond_minimum( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::Address::new_static( - "Treasury", - "ProposalBondMinimum", - [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, - 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, - 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, - ], - ) - } - pub fn proposal_bond_maximum( - &self, - ) -> ::subxt::constants::Address<::core::option::Option<::core::primitive::u128>> { - ::subxt::constants::Address::new_static( - "Treasury", - "ProposalBondMaximum", - [ - 84u8, 154u8, 218u8, 83u8, 84u8, 189u8, 32u8, 20u8, 120u8, 194u8, 88u8, - 205u8, 109u8, 216u8, 114u8, 193u8, 120u8, 198u8, 154u8, 237u8, 134u8, - 204u8, 102u8, 247u8, 52u8, 103u8, 231u8, 43u8, 243u8, 122u8, 60u8, - 216u8, - ], - ) - } - pub fn spend_period(&self) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "Treasury", - "SpendPeriod", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, - ], - ) - } - pub fn burn( + pub fn burn( &self, ) -> ::subxt::constants::Address { @@ -11094,7 +8033,7 @@ 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::bounded_collections::bounded_vec::BoundedVec<( ::core::primitive::u16, ::core::primitive::u128, )>, @@ -11118,7 +8057,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::u16, ::core::primitive::u128, )>, @@ -11287,6 +8226,19 @@ pub mod api { 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, + )] + #[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 { pub fn submit( @@ -11308,10 +8260,10 @@ pub mod api { enactment_moment, }, [ - 18u8, 75u8, 200u8, 185u8, 169u8, 175u8, 92u8, 221u8, 168u8, 83u8, - 247u8, 116u8, 218u8, 40u8, 97u8, 107u8, 233u8, 74u8, 228u8, 58u8, - 161u8, 135u8, 52u8, 54u8, 136u8, 121u8, 100u8, 84u8, 142u8, 130u8, - 252u8, 141u8, + 167u8, 159u8, 131u8, 141u8, 239u8, 34u8, 86u8, 4u8, 141u8, 222u8, + 193u8, 73u8, 228u8, 92u8, 117u8, 219u8, 158u8, 240u8, 100u8, 80u8, + 175u8, 23u8, 66u8, 49u8, 175u8, 34u8, 246u8, 140u8, 82u8, 99u8, 100u8, + 107u8, ], ) } @@ -11420,6 +8372,23 @@ pub mod api { ], ) } + pub fn set_metadata( + &self, + index: ::core::primitive::u32, + maybe_hash: ::core::option::Option<::subxt::utils::H256>, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Referenda", + "set_metadata", + SetMetadata { index, maybe_hash }, + [ + 235u8, 215u8, 66u8, 214u8, 157u8, 177u8, 233u8, 214u8, 103u8, 92u8, + 216u8, 228u8, 7u8, 123u8, 167u8, 225u8, 128u8, 16u8, 161u8, 102u8, + 217u8, 36u8, 80u8, 207u8, 137u8, 24u8, 219u8, 239u8, 42u8, 234u8, + 144u8, 133u8, + ], + ) + } } } pub type Event = runtime_types::pallet_referenda::pallet::Event; @@ -11679,6 +8648,40 @@ pub mod api { const PALLET: &'static str = "Referenda"; const EVENT: &'static str = "SubmissionDepositRefunded"; } + #[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 MetadataSet { + pub index: ::core::primitive::u32, + pub hash: ::subxt::utils::H256, + } + impl ::subxt::events::StaticEvent for MetadataSet { + const PALLET: &'static str = "Referenda"; + 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, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct MetadataCleared { + pub index: ::core::primitive::u32, + pub hash: ::subxt::utils::H256, + } + impl ::subxt::events::StaticEvent for MetadataCleared { + const PALLET: &'static str = "Referenda"; + const EVENT: &'static str = "MetadataCleared"; + } } pub mod storage { use super::runtime_types; @@ -11733,9 +8736,10 @@ pub mod api { "ReferendumInfoFor", vec![::subxt::storage::address::make_static_storage_map_key(_0.borrow())], [ - 29u8, 52u8, 75u8, 142u8, 37u8, 30u8, 136u8, 195u8, 68u8, 159u8, 237u8, - 157u8, 227u8, 64u8, 62u8, 11u8, 5u8, 237u8, 48u8, 190u8, 83u8, 134u8, - 203u8, 75u8, 86u8, 158u8, 252u8, 14u8, 180u8, 104u8, 141u8, 154u8, + 102u8, 225u8, 57u8, 18u8, 214u8, 246u8, 61u8, 155u8, 9u8, 78u8, 173u8, + 214u8, 253u8, 95u8, 26u8, 198u8, 148u8, 199u8, 119u8, 249u8, 0u8, + 102u8, 193u8, 167u8, 209u8, 33u8, 129u8, 247u8, 11u8, 29u8, 35u8, + 233u8, ], ) } @@ -11766,9 +8770,10 @@ pub mod api { "ReferendumInfoFor", Vec::new(), [ - 29u8, 52u8, 75u8, 142u8, 37u8, 30u8, 136u8, 195u8, 68u8, 159u8, 237u8, - 157u8, 227u8, 64u8, 62u8, 11u8, 5u8, 237u8, 48u8, 190u8, 83u8, 134u8, - 203u8, 75u8, 86u8, 158u8, 252u8, 14u8, 180u8, 104u8, 141u8, 154u8, + 102u8, 225u8, 57u8, 18u8, 214u8, 246u8, 61u8, 155u8, 9u8, 78u8, 173u8, + 214u8, 253u8, 95u8, 26u8, 198u8, 148u8, 199u8, 119u8, 249u8, 0u8, + 102u8, 193u8, 167u8, 209u8, 33u8, 129u8, 247u8, 11u8, 29u8, 35u8, + 233u8, ], ) } @@ -11777,7 +8782,7 @@ pub mod api { _0: impl ::std::borrow::Borrow<::core::primitive::u16>, ) -> ::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, ::core::primitive::u128, )>, @@ -11801,7 +8806,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, ::core::primitive::u128, )>, @@ -11864,6 +8869,49 @@ pub mod api { ], ) } + pub fn metadata_of( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::subxt::utils::H256, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Referenda", + "MetadataOf", + vec![::subxt::storage::address::make_static_storage_map_key(_0.borrow())], + [ + 104u8, 255u8, 134u8, 120u8, 111u8, 124u8, 108u8, 232u8, 61u8, 47u8, + 251u8, 228u8, 50u8, 49u8, 125u8, 229u8, 254u8, 88u8, 215u8, 90u8, + 116u8, 145u8, 111u8, 72u8, 132u8, 91u8, 106u8, 207u8, 13u8, 104u8, + 164u8, 100u8, + ], + ) + } + pub fn metadata_of_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::subxt::utils::H256, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Referenda", + "MetadataOf", + Vec::new(), + [ + 104u8, 255u8, 134u8, 120u8, 111u8, 124u8, 108u8, 232u8, 61u8, 47u8, + 251u8, 228u8, 50u8, 49u8, 125u8, 229u8, 254u8, 88u8, 215u8, 90u8, + 116u8, 145u8, 111u8, 72u8, 132u8, 91u8, 106u8, 207u8, 13u8, 104u8, + 164u8, 100u8, + ], + ) + } } } pub mod constants { @@ -12436,7 +9484,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, @@ -12457,7 +9507,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, @@ -12591,6 +9643,19 @@ pub mod api { 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, + )] + #[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 { pub fn submit( @@ -12612,10 +9677,10 @@ pub mod api { enactment_moment, }, [ - 18u8, 75u8, 200u8, 185u8, 169u8, 175u8, 92u8, 221u8, 168u8, 83u8, - 247u8, 116u8, 218u8, 40u8, 97u8, 107u8, 233u8, 74u8, 228u8, 58u8, - 161u8, 135u8, 52u8, 54u8, 136u8, 121u8, 100u8, 84u8, 142u8, 130u8, - 252u8, 141u8, + 167u8, 159u8, 131u8, 141u8, 239u8, 34u8, 86u8, 4u8, 141u8, 222u8, + 193u8, 73u8, 228u8, 92u8, 117u8, 219u8, 158u8, 240u8, 100u8, 80u8, + 175u8, 23u8, 66u8, 49u8, 175u8, 34u8, 246u8, 140u8, 82u8, 99u8, 100u8, + 107u8, ], ) } @@ -12724,6 +9789,23 @@ pub mod api { ], ) } + pub fn set_metadata( + &self, + index: ::core::primitive::u32, + maybe_hash: ::core::option::Option<::subxt::utils::H256>, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "FellowshipReferenda", + "set_metadata", + SetMetadata { index, maybe_hash }, + [ + 235u8, 215u8, 66u8, 214u8, 157u8, 177u8, 233u8, 214u8, 103u8, 92u8, + 216u8, 228u8, 7u8, 123u8, 167u8, 225u8, 128u8, 16u8, 161u8, 102u8, + 217u8, 36u8, 80u8, 207u8, 137u8, 24u8, 219u8, 239u8, 42u8, 234u8, + 144u8, 133u8, + ], + ) + } } } pub type Event = runtime_types::pallet_referenda::pallet::Event; @@ -12977,6 +10059,40 @@ pub mod api { const PALLET: &'static str = "FellowshipReferenda"; const EVENT: &'static str = "SubmissionDepositRefunded"; } + #[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 MetadataSet { + pub index: ::core::primitive::u32, + pub hash: ::subxt::utils::H256, + } + impl ::subxt::events::StaticEvent for MetadataSet { + const PALLET: &'static str = "FellowshipReferenda"; + 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, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct MetadataCleared { + pub index: ::core::primitive::u32, + pub hash: ::subxt::utils::H256, + } + impl ::subxt::events::StaticEvent for MetadataCleared { + const PALLET: &'static str = "FellowshipReferenda"; + const EVENT: &'static str = "MetadataCleared"; + } } pub mod storage { use super::runtime_types; @@ -13029,9 +10145,10 @@ pub mod api { "ReferendumInfoFor", vec![::subxt::storage::address::make_static_storage_map_key(_0.borrow())], [ - 164u8, 194u8, 74u8, 208u8, 99u8, 142u8, 54u8, 28u8, 91u8, 95u8, 102u8, - 4u8, 86u8, 234u8, 104u8, 199u8, 123u8, 148u8, 180u8, 239u8, 251u8, - 158u8, 1u8, 99u8, 230u8, 40u8, 71u8, 229u8, 137u8, 223u8, 60u8, 193u8, + 114u8, 209u8, 76u8, 198u8, 139u8, 46u8, 122u8, 149u8, 173u8, 70u8, + 212u8, 135u8, 225u8, 249u8, 221u8, 188u8, 20u8, 34u8, 80u8, 167u8, + 169u8, 139u8, 126u8, 200u8, 108u8, 151u8, 49u8, 200u8, 169u8, 106u8, + 131u8, 84u8, ], ) } @@ -13060,9 +10177,10 @@ pub mod api { "ReferendumInfoFor", Vec::new(), [ - 164u8, 194u8, 74u8, 208u8, 99u8, 142u8, 54u8, 28u8, 91u8, 95u8, 102u8, - 4u8, 86u8, 234u8, 104u8, 199u8, 123u8, 148u8, 180u8, 239u8, 251u8, - 158u8, 1u8, 99u8, 230u8, 40u8, 71u8, 229u8, 137u8, 223u8, 60u8, 193u8, + 114u8, 209u8, 76u8, 198u8, 139u8, 46u8, 122u8, 149u8, 173u8, 70u8, + 212u8, 135u8, 225u8, 249u8, 221u8, 188u8, 20u8, 34u8, 80u8, 167u8, + 169u8, 139u8, 126u8, 200u8, 108u8, 151u8, 49u8, 200u8, 169u8, 106u8, + 131u8, 84u8, ], ) } @@ -13071,7 +10189,7 @@ pub mod api { _0: impl ::std::borrow::Borrow<::core::primitive::u16>, ) -> ::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, ::core::primitive::u32, )>, @@ -13095,7 +10213,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, ::core::primitive::u32, )>, @@ -13158,6 +10276,49 @@ pub mod api { ], ) } + pub fn metadata_of( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::subxt::utils::H256, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "FellowshipReferenda", + "MetadataOf", + vec![::subxt::storage::address::make_static_storage_map_key(_0.borrow())], + [ + 104u8, 255u8, 134u8, 120u8, 111u8, 124u8, 108u8, 232u8, 61u8, 47u8, + 251u8, 228u8, 50u8, 49u8, 125u8, 229u8, 254u8, 88u8, 215u8, 90u8, + 116u8, 145u8, 111u8, 72u8, 132u8, 91u8, 106u8, 207u8, 13u8, 104u8, + 164u8, 100u8, + ], + ) + } + 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( + "FellowshipReferenda", + "MetadataOf", + Vec::new(), + [ + 104u8, 255u8, 134u8, 120u8, 111u8, 124u8, 108u8, 232u8, 61u8, 47u8, + 251u8, 228u8, 50u8, 49u8, 125u8, 229u8, 254u8, 88u8, 215u8, 90u8, + 116u8, 145u8, 111u8, 72u8, 132u8, 91u8, 106u8, 207u8, 13u8, 104u8, + 164u8, 100u8, + ], + ) + } } } pub mod constants { @@ -13359,10 +10520,9 @@ pub mod api { "dispatch_whitelisted_call_with_preimage", DispatchWhitelistedCallWithPreimage { call: ::std::boxed::Box::new(call) }, [ - 160u8, 206u8, 186u8, 255u8, 173u8, 134u8, 168u8, 102u8, 54u8, 148u8, - 120u8, 206u8, 123u8, 192u8, 56u8, 60u8, 124u8, 20u8, 236u8, 141u8, - 145u8, 160u8, 198u8, 68u8, 141u8, 197u8, 83u8, 52u8, 2u8, 201u8, 165u8, - 173u8, + 144u8, 130u8, 7u8, 59u8, 86u8, 242u8, 134u8, 145u8, 59u8, 95u8, 182u8, + 77u8, 203u8, 20u8, 7u8, 199u8, 76u8, 185u8, 26u8, 48u8, 254u8, 106u8, + 238u8, 64u8, 103u8, 91u8, 162u8, 39u8, 73u8, 240u8, 111u8, 71u8, ], ) } @@ -13984,9 +11144,9 @@ pub mod api { "batch", Batch { calls }, [ - 184u8, 155u8, 22u8, 205u8, 37u8, 115u8, 186u8, 7u8, 174u8, 62u8, 144u8, - 53u8, 109u8, 77u8, 61u8, 103u8, 136u8, 179u8, 151u8, 44u8, 21u8, 92u8, - 65u8, 157u8, 185u8, 183u8, 165u8, 37u8, 107u8, 37u8, 201u8, 74u8, + 178u8, 95u8, 181u8, 151u8, 24u8, 163u8, 68u8, 29u8, 22u8, 18u8, 205u8, + 120u8, 44u8, 63u8, 211u8, 59u8, 83u8, 134u8, 209u8, 255u8, 225u8, 99u8, + 107u8, 205u8, 139u8, 160u8, 192u8, 71u8, 252u8, 206u8, 175u8, 118u8, ], ) } @@ -14000,9 +11160,10 @@ pub mod api { "as_derivative", AsDerivative { index, call: ::std::boxed::Box::new(call) }, [ - 246u8, 58u8, 102u8, 106u8, 42u8, 53u8, 44u8, 73u8, 242u8, 240u8, 43u8, - 37u8, 154u8, 140u8, 14u8, 178u8, 81u8, 139u8, 77u8, 216u8, 34u8, 162u8, - 16u8, 57u8, 93u8, 225u8, 142u8, 32u8, 43u8, 185u8, 11u8, 54u8, + 24u8, 22u8, 222u8, 134u8, 169u8, 77u8, 197u8, 229u8, 200u8, 31u8, + 148u8, 215u8, 210u8, 74u8, 52u8, 246u8, 11u8, 91u8, 139u8, 94u8, 13u8, + 79u8, 193u8, 173u8, 236u8, 150u8, 2u8, 137u8, 94u8, 149u8, 212u8, + 209u8, ], ) } @@ -14015,9 +11176,10 @@ pub mod api { "batch_all", BatchAll { calls }, [ - 162u8, 70u8, 201u8, 167u8, 190u8, 108u8, 145u8, 22u8, 11u8, 185u8, - 208u8, 128u8, 110u8, 62u8, 65u8, 151u8, 147u8, 95u8, 158u8, 81u8, 60u8, - 108u8, 216u8, 161u8, 16u8, 144u8, 214u8, 64u8, 71u8, 114u8, 1u8, 14u8, + 70u8, 170u8, 197u8, 19u8, 215u8, 204u8, 167u8, 176u8, 171u8, 41u8, + 211u8, 141u8, 91u8, 115u8, 163u8, 118u8, 115u8, 157u8, 118u8, 81u8, + 79u8, 156u8, 97u8, 173u8, 25u8, 95u8, 30u8, 48u8, 173u8, 156u8, 189u8, + 230u8, ], ) } @@ -14034,9 +11196,10 @@ pub mod api { call: ::std::boxed::Box::new(call), }, [ - 56u8, 138u8, 34u8, 254u8, 92u8, 39u8, 243u8, 214u8, 62u8, 59u8, 252u8, - 172u8, 215u8, 0u8, 62u8, 146u8, 229u8, 87u8, 237u8, 32u8, 99u8, 163u8, - 66u8, 50u8, 124u8, 183u8, 154u8, 241u8, 75u8, 241u8, 124u8, 255u8, + 175u8, 87u8, 219u8, 111u8, 196u8, 171u8, 118u8, 4u8, 183u8, 137u8, + 153u8, 96u8, 41u8, 216u8, 128u8, 187u8, 215u8, 242u8, 49u8, 112u8, + 199u8, 123u8, 88u8, 71u8, 53u8, 171u8, 177u8, 80u8, 223u8, 180u8, + 243u8, 215u8, ], ) } @@ -14049,10 +11212,9 @@ pub mod api { "force_batch", ForceBatch { calls }, [ - 50u8, 119u8, 48u8, 201u8, 105u8, 130u8, 251u8, 103u8, 6u8, 143u8, - 117u8, 91u8, 113u8, 58u8, 167u8, 25u8, 30u8, 186u8, 249u8, 57u8, 236u8, - 13u8, 173u8, 153u8, 161u8, 15u8, 206u8, 40u8, 134u8, 168u8, 212u8, - 229u8, + 0u8, 77u8, 82u8, 187u8, 3u8, 161u8, 23u8, 12u8, 60u8, 174u8, 76u8, + 23u8, 73u8, 11u8, 224u8, 11u8, 38u8, 247u8, 83u8, 187u8, 71u8, 193u8, + 213u8, 56u8, 137u8, 69u8, 216u8, 215u8, 125u8, 106u8, 207u8, 83u8, ], ) } @@ -14066,10 +11228,10 @@ pub mod api { "with_weight", WithWeight { call: ::std::boxed::Box::new(call), weight }, [ - 177u8, 98u8, 55u8, 180u8, 86u8, 10u8, 178u8, 221u8, 9u8, 21u8, 45u8, - 68u8, 114u8, 92u8, 121u8, 234u8, 59u8, 80u8, 150u8, 119u8, 108u8, - 111u8, 52u8, 105u8, 2u8, 211u8, 43u8, 243u8, 132u8, 201u8, 221u8, - 219u8, + 250u8, 153u8, 246u8, 34u8, 207u8, 117u8, 51u8, 221u8, 142u8, 208u8, + 103u8, 80u8, 176u8, 57u8, 54u8, 253u8, 172u8, 230u8, 85u8, 111u8, 35u8, + 206u8, 30u8, 73u8, 80u8, 125u8, 176u8, 138u8, 121u8, 214u8, 173u8, + 136u8, ], ) } @@ -14913,7 +12075,7 @@ pub mod api { ::subxt::storage::address::StaticStorageMapKey, ( ::core::primitive::u128, - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + runtime_types::bounded_collections::bounded_vec::BoundedVec< ::subxt::utils::AccountId32, >, ), @@ -14938,7 +12100,7 @@ pub mod api { ::subxt::storage::address::StaticStorageMapKey, ( ::core::primitive::u128, - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + runtime_types::bounded_collections::bounded_vec::BoundedVec< ::subxt::utils::AccountId32, >, ), @@ -14961,7 +12123,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_identity::types::RegistrarInfo< ::core::primitive::u128, @@ -15682,6 +12844,22 @@ pub mod api { const PALLET: &'static str = "Society"; const EVENT: &'static str = "Deposit"; } + #[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 SkepticsChosen { + pub skeptics: ::std::vec::Vec<::subxt::utils::AccountId32>, + } + impl ::subxt::events::StaticEvent for SkepticsChosen { + const PALLET: &'static str = "Society"; + const EVENT: &'static str = "SkepticsChosen"; + } } pub mod storage { use super::runtime_types; @@ -16445,10 +13623,9 @@ pub mod api { "as_recovered", AsRecovered { account, call: ::std::boxed::Box::new(call) }, [ - 35u8, 10u8, 138u8, 246u8, 167u8, 53u8, 192u8, 127u8, 30u8, 150u8, - 214u8, 11u8, 100u8, 184u8, 10u8, 115u8, 152u8, 51u8, 127u8, 32u8, - 125u8, 128u8, 73u8, 5u8, 183u8, 22u8, 143u8, 162u8, 134u8, 169u8, - 101u8, 77u8, + 219u8, 50u8, 48u8, 30u8, 127u8, 197u8, 134u8, 221u8, 52u8, 217u8, 56u8, + 207u8, 241u8, 132u8, 23u8, 131u8, 52u8, 143u8, 110u8, 100u8, 190u8, + 111u8, 61u8, 0u8, 233u8, 169u8, 45u8, 14u8, 170u8, 216u8, 92u8, 67u8, ], ) } @@ -16695,7 +13872,7 @@ pub mod api { runtime_types::pallet_recovery::RecoveryConfig< ::core::primitive::u32, ::core::primitive::u128, - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + runtime_types::bounded_collections::bounded_vec::BoundedVec< ::subxt::utils::AccountId32, >, >, @@ -16721,7 +13898,7 @@ pub mod api { runtime_types::pallet_recovery::RecoveryConfig< ::core::primitive::u32, ::core::primitive::u128, - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + runtime_types::bounded_collections::bounded_vec::BoundedVec< ::subxt::utils::AccountId32, >, >, @@ -16749,7 +13926,7 @@ pub mod api { runtime_types::pallet_recovery::ActiveRecovery< ::core::primitive::u32, ::core::primitive::u128, - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + runtime_types::bounded_collections::bounded_vec::BoundedVec< ::subxt::utils::AccountId32, >, >, @@ -16778,7 +13955,7 @@ pub mod api { runtime_types::pallet_recovery::ActiveRecovery< ::core::primitive::u32, ::core::primitive::u128, - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + runtime_types::bounded_collections::bounded_vec::BoundedVec< ::subxt::utils::AccountId32, >, >, @@ -17105,7 +14282,7 @@ 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::bounded_collections::bounded_vec::BoundedVec< runtime_types::pallet_vesting::vesting_info::VestingInfo< ::core::primitive::u128, ::core::primitive::u32, @@ -17130,7 +14307,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::pallet_vesting::vesting_info::VestingInfo< ::core::primitive::u128, ::core::primitive::u32, @@ -17325,10 +14502,9 @@ pub mod api { call: ::std::boxed::Box::new(call), }, [ - 194u8, 249u8, 156u8, 249u8, 212u8, 187u8, 37u8, 41u8, 167u8, 39u8, - 134u8, 112u8, 69u8, 40u8, 210u8, 173u8, 50u8, 163u8, 238u8, 109u8, - 178u8, 34u8, 56u8, 200u8, 234u8, 106u8, 235u8, 173u8, 6u8, 131u8, - 255u8, 81u8, + 78u8, 21u8, 158u8, 142u8, 81u8, 99u8, 194u8, 35u8, 247u8, 125u8, 188u8, + 27u8, 93u8, 30u8, 23u8, 27u8, 61u8, 129u8, 39u8, 22u8, 162u8, 192u8, + 58u8, 100u8, 71u8, 188u8, 247u8, 97u8, 148u8, 137u8, 59u8, 6u8, ], ) } @@ -17370,9 +14546,10 @@ pub mod api { call: ::std::boxed::Box::new(call), }, [ - 63u8, 43u8, 123u8, 139u8, 239u8, 13u8, 15u8, 113u8, 124u8, 3u8, 38u8, - 231u8, 231u8, 74u8, 233u8, 188u8, 217u8, 238u8, 235u8, 171u8, 86u8, - 137u8, 161u8, 20u8, 85u8, 5u8, 239u8, 130u8, 109u8, 136u8, 22u8, 190u8, + 134u8, 119u8, 62u8, 40u8, 70u8, 209u8, 235u8, 177u8, 100u8, 67u8, + 235u8, 66u8, 47u8, 69u8, 80u8, 248u8, 227u8, 82u8, 142u8, 69u8, 146u8, + 123u8, 68u8, 231u8, 86u8, 214u8, 173u8, 214u8, 211u8, 231u8, 228u8, + 255u8, ], ) } @@ -17411,9 +14588,10 @@ pub mod api { call: ::std::boxed::Box::new(call), }, [ - 110u8, 162u8, 235u8, 31u8, 68u8, 223u8, 75u8, 52u8, 38u8, 70u8, 250u8, - 32u8, 89u8, 3u8, 123u8, 244u8, 81u8, 128u8, 64u8, 190u8, 110u8, 52u8, - 80u8, 134u8, 3u8, 230u8, 103u8, 42u8, 27u8, 38u8, 68u8, 84u8, + 112u8, 99u8, 229u8, 185u8, 253u8, 242u8, 64u8, 61u8, 242u8, 86u8, + 231u8, 64u8, 194u8, 36u8, 34u8, 160u8, 109u8, 219u8, 79u8, 18u8, 51u8, + 39u8, 174u8, 198u8, 13u8, 132u8, 153u8, 77u8, 120u8, 198u8, 108u8, + 104u8, ], ) } @@ -17439,9 +14617,10 @@ pub mod api { call: ::std::boxed::Box::new(call), }, [ - 147u8, 44u8, 199u8, 106u8, 229u8, 115u8, 172u8, 2u8, 183u8, 61u8, - 148u8, 144u8, 242u8, 56u8, 193u8, 121u8, 8u8, 18u8, 152u8, 76u8, 124u8, - 16u8, 208u8, 220u8, 17u8, 19u8, 196u8, 60u8, 73u8, 29u8, 100u8, 56u8, + 205u8, 170u8, 229u8, 133u8, 170u8, 16u8, 164u8, 184u8, 8u8, 198u8, + 99u8, 180u8, 224u8, 135u8, 115u8, 82u8, 117u8, 78u8, 15u8, 30u8, 55u8, + 96u8, 253u8, 35u8, 151u8, 109u8, 178u8, 182u8, 89u8, 239u8, 29u8, + 115u8, ], ) } @@ -17584,7 +14763,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], @@ -17606,10 +14785,9 @@ pub mod api { "Agenda", vec![::subxt::storage::address::make_static_storage_map_key(_0.borrow())], [ - 6u8, 220u8, 192u8, 183u8, 255u8, 235u8, 123u8, 32u8, 22u8, 30u8, 63u8, - 226u8, 154u8, 157u8, 80u8, 60u8, 135u8, 123u8, 203u8, 52u8, 230u8, - 222u8, 133u8, 146u8, 196u8, 59u8, 175u8, 88u8, 200u8, 34u8, 127u8, - 68u8, + 52u8, 172u8, 66u8, 226u8, 36u8, 159u8, 29u8, 160u8, 101u8, 49u8, 227u8, + 217u8, 58u8, 26u8, 21u8, 90u8, 240u8, 143u8, 92u8, 16u8, 175u8, 78u8, + 242u8, 215u8, 45u8, 229u8, 78u8, 27u8, 223u8, 24u8, 240u8, 200u8, ], ) } @@ -17617,7 +14795,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], @@ -17639,10 +14817,9 @@ pub mod api { "Agenda", Vec::new(), [ - 6u8, 220u8, 192u8, 183u8, 255u8, 235u8, 123u8, 32u8, 22u8, 30u8, 63u8, - 226u8, 154u8, 157u8, 80u8, 60u8, 135u8, 123u8, 203u8, 52u8, 230u8, - 222u8, 133u8, 146u8, 196u8, 59u8, 175u8, 88u8, 200u8, 34u8, 127u8, - 68u8, + 52u8, 172u8, 66u8, 226u8, 36u8, 159u8, 29u8, 160u8, 101u8, 49u8, 227u8, + 217u8, 58u8, 26u8, 21u8, 90u8, 240u8, 143u8, 92u8, 16u8, 175u8, 78u8, + 242u8, 215u8, 45u8, 229u8, 78u8, 27u8, 223u8, 24u8, 240u8, 200u8, ], ) } @@ -17886,9 +15063,9 @@ pub mod api { "proxy", Proxy { real, force_proxy_type, call: ::std::boxed::Box::new(call) }, [ - 69u8, 166u8, 29u8, 197u8, 47u8, 96u8, 124u8, 84u8, 86u8, 3u8, 168u8, - 213u8, 130u8, 136u8, 22u8, 30u8, 170u8, 155u8, 228u8, 76u8, 44u8, 98u8, - 163u8, 141u8, 225u8, 52u8, 121u8, 85u8, 108u8, 18u8, 197u8, 4u8, + 79u8, 120u8, 101u8, 25u8, 23u8, 46u8, 141u8, 12u8, 158u8, 84u8, 202u8, + 168u8, 192u8, 243u8, 156u8, 220u8, 53u8, 219u8, 123u8, 145u8, 201u8, + 99u8, 136u8, 92u8, 122u8, 157u8, 150u8, 131u8, 196u8, 5u8, 11u8, 239u8, ], ) } @@ -17903,9 +15080,9 @@ pub mod api { "add_proxy", AddProxy { delegate, proxy_type, delay }, [ - 72u8, 207u8, 1u8, 239u8, 200u8, 126u8, 59u8, 220u8, 116u8, 146u8, - 155u8, 46u8, 178u8, 1u8, 65u8, 132u8, 129u8, 63u8, 234u8, 214u8, 31u8, - 11u8, 249u8, 237u8, 228u8, 242u8, 80u8, 70u8, 51u8, 254u8, 229u8, 13u8, + 97u8, 0u8, 110u8, 211u8, 26u8, 3u8, 63u8, 21u8, 18u8, 105u8, 104u8, + 158u8, 28u8, 52u8, 85u8, 18u8, 192u8, 44u8, 205u8, 196u8, 70u8, 13u8, + 27u8, 195u8, 158u8, 182u8, 107u8, 100u8, 62u8, 51u8, 50u8, 126u8, ], ) } @@ -17920,9 +15097,10 @@ pub mod api { "remove_proxy", RemoveProxy { delegate, proxy_type, delay }, [ - 254u8, 212u8, 131u8, 205u8, 73u8, 134u8, 114u8, 203u8, 72u8, 221u8, - 80u8, 38u8, 222u8, 1u8, 144u8, 103u8, 198u8, 170u8, 157u8, 64u8, 56u8, - 78u8, 49u8, 79u8, 107u8, 25u8, 46u8, 148u8, 68u8, 1u8, 35u8, 13u8, + 200u8, 182u8, 74u8, 109u8, 81u8, 138u8, 81u8, 252u8, 12u8, 106u8, + 208u8, 138u8, 135u8, 249u8, 231u8, 55u8, 86u8, 237u8, 24u8, 120u8, + 80u8, 103u8, 248u8, 161u8, 128u8, 191u8, 236u8, 169u8, 245u8, 179u8, + 40u8, 125u8, ], ) } @@ -17949,10 +15127,9 @@ pub mod api { "create_pure", CreatePure { proxy_type, delay, index }, [ - 230u8, 237u8, 225u8, 106u8, 251u8, 230u8, 60u8, 135u8, 188u8, 144u8, - 237u8, 59u8, 3u8, 142u8, 133u8, 231u8, 118u8, 230u8, 93u8, 118u8, - 153u8, 184u8, 254u8, 175u8, 220u8, 82u8, 63u8, 17u8, 11u8, 128u8, - 179u8, 109u8, + 197u8, 50u8, 151u8, 106u8, 73u8, 133u8, 200u8, 93u8, 249u8, 77u8, 12u8, + 128u8, 74u8, 178u8, 84u8, 159u8, 149u8, 80u8, 251u8, 53u8, 4u8, 206u8, + 126u8, 151u8, 160u8, 112u8, 54u8, 20u8, 48u8, 152u8, 187u8, 65u8, ], ) } @@ -17969,9 +15146,10 @@ pub mod api { "kill_pure", KillPure { spawner, proxy_type, index, height, ext_index }, [ - 190u8, 51u8, 195u8, 158u8, 218u8, 143u8, 228u8, 200u8, 245u8, 91u8, - 235u8, 127u8, 203u8, 59u8, 205u8, 44u8, 67u8, 10u8, 7u8, 173u8, 189u8, - 24u8, 178u8, 38u8, 10u8, 113u8, 75u8, 38u8, 151u8, 206u8, 98u8, 133u8, + 80u8, 236u8, 144u8, 77u8, 86u8, 49u8, 73u8, 68u8, 5u8, 196u8, 246u8, + 126u8, 20u8, 221u8, 78u8, 104u8, 139u8, 125u8, 103u8, 181u8, 145u8, + 41u8, 35u8, 188u8, 143u8, 184u8, 255u8, 8u8, 246u8, 104u8, 195u8, + 229u8, ], ) } @@ -18045,10 +15223,9 @@ pub mod api { call: ::std::boxed::Box::new(call), }, [ - 109u8, 24u8, 67u8, 187u8, 49u8, 120u8, 179u8, 11u8, 222u8, 237u8, - 229u8, 21u8, 96u8, 201u8, 34u8, 75u8, 161u8, 245u8, 171u8, 119u8, - 104u8, 116u8, 224u8, 174u8, 163u8, 60u8, 222u8, 72u8, 28u8, 104u8, - 29u8, 53u8, + 69u8, 159u8, 3u8, 27u8, 7u8, 103u8, 182u8, 74u8, 42u8, 193u8, 34u8, + 206u8, 105u8, 226u8, 195u8, 75u8, 39u8, 214u8, 16u8, 89u8, 146u8, 45u8, + 117u8, 153u8, 5u8, 229u8, 207u8, 191u8, 245u8, 15u8, 188u8, 68u8, ], ) } @@ -18159,7 +15336,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< runtime_types::pallet_proxy::ProxyDefinition< ::subxt::utils::AccountId32, runtime_types::kusama_runtime::ProxyType, @@ -18177,9 +15354,9 @@ pub mod api { "Proxies", vec![::subxt::storage::address::make_static_storage_map_key(_0.borrow())], [ - 232u8, 174u8, 79u8, 202u8, 162u8, 211u8, 182u8, 4u8, 222u8, 70u8, 75u8, - 15u8, 44u8, 113u8, 110u8, 202u8, 211u8, 139u8, 54u8, 209u8, 5u8, 34u8, - 227u8, 115u8, 80u8, 254u8, 170u8, 209u8, 47u8, 245u8, 226u8, 26u8, + 0u8, 44u8, 183u8, 213u8, 137u8, 212u8, 92u8, 79u8, 85u8, 5u8, 237u8, + 231u8, 22u8, 114u8, 32u8, 210u8, 1u8, 104u8, 87u8, 6u8, 169u8, 240u8, + 212u8, 98u8, 179u8, 133u8, 171u8, 207u8, 2u8, 92u8, 3u8, 80u8, ], ) } @@ -18188,7 +15365,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< runtime_types::pallet_proxy::ProxyDefinition< ::subxt::utils::AccountId32, runtime_types::kusama_runtime::ProxyType, @@ -18206,9 +15383,9 @@ pub mod api { "Proxies", Vec::new(), [ - 232u8, 174u8, 79u8, 202u8, 162u8, 211u8, 182u8, 4u8, 222u8, 70u8, 75u8, - 15u8, 44u8, 113u8, 110u8, 202u8, 211u8, 139u8, 54u8, 209u8, 5u8, 34u8, - 227u8, 115u8, 80u8, 254u8, 170u8, 209u8, 47u8, 245u8, 226u8, 26u8, + 0u8, 44u8, 183u8, 213u8, 137u8, 212u8, 92u8, 79u8, 85u8, 5u8, 237u8, + 231u8, 22u8, 114u8, 32u8, 210u8, 1u8, 104u8, 87u8, 6u8, 169u8, 240u8, + 212u8, 98u8, 179u8, 133u8, 171u8, 207u8, 2u8, 92u8, 3u8, 80u8, ], ) } @@ -18218,7 +15395,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< runtime_types::pallet_proxy::Announcement< ::subxt::utils::AccountId32, ::subxt::utils::H256, @@ -18247,7 +15424,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< runtime_types::pallet_proxy::Announcement< ::subxt::utils::AccountId32, ::subxt::utils::H256, @@ -18437,10 +15614,10 @@ pub mod api { "as_multi_threshold_1", AsMultiThreshold1 { other_signatories, call: ::std::boxed::Box::new(call) }, [ - 82u8, 73u8, 251u8, 34u8, 29u8, 156u8, 20u8, 246u8, 0u8, 194u8, 226u8, - 14u8, 89u8, 63u8, 249u8, 197u8, 102u8, 219u8, 126u8, 32u8, 190u8, - 224u8, 102u8, 21u8, 191u8, 88u8, 135u8, 159u8, 80u8, 129u8, 222u8, - 81u8, + 11u8, 212u8, 166u8, 106u8, 233u8, 90u8, 153u8, 70u8, 215u8, 211u8, + 251u8, 239u8, 140u8, 16u8, 26u8, 231u8, 215u8, 61u8, 23u8, 101u8, 60u8, + 43u8, 124u8, 243u8, 108u8, 226u8, 78u8, 119u8, 184u8, 118u8, 199u8, + 185u8, ], ) } @@ -18465,10 +15642,10 @@ pub mod api { max_weight, }, [ - 172u8, 88u8, 42u8, 169u8, 211u8, 88u8, 121u8, 255u8, 19u8, 221u8, - 149u8, 45u8, 116u8, 5u8, 250u8, 78u8, 162u8, 150u8, 252u8, 152u8, - 224u8, 184u8, 100u8, 87u8, 239u8, 182u8, 10u8, 186u8, 41u8, 35u8, 14u8, - 196u8, + 211u8, 58u8, 124u8, 207u8, 225u8, 150u8, 188u8, 191u8, 214u8, 7u8, + 193u8, 34u8, 11u8, 176u8, 75u8, 27u8, 104u8, 124u8, 190u8, 186u8, + 183u8, 97u8, 164u8, 81u8, 20u8, 108u8, 15u8, 246u8, 220u8, 64u8, 139u8, + 216u8, ], ) } @@ -18930,7 +16107,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, @@ -18953,7 +16132,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, @@ -19453,7 +16634,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, @@ -19473,7 +16656,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, @@ -19493,7 +16678,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, >, ::subxt::storage::address::Yes, @@ -20082,7 +17267,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, @@ -20103,7 +17290,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, @@ -20199,449 +17388,6 @@ pub mod api { } } } - pub mod tips { - use super::{root_mod, runtime_types}; - pub mod calls { - use super::{root_mod, 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 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, - )] - #[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, - )] - #[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, - )] - #[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, - )] - #[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, - )] - #[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 { - pub fn report_awesome( - &self, - reason: ::std::vec::Vec<::core::primitive::u8>, - who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Tips", - "report_awesome", - ReportAwesome { reason, who }, - [ - 126u8, 68u8, 2u8, 54u8, 195u8, 15u8, 43u8, 27u8, 183u8, 254u8, 157u8, - 163u8, 252u8, 14u8, 207u8, 251u8, 215u8, 111u8, 98u8, 209u8, 150u8, - 11u8, 240u8, 177u8, 106u8, 93u8, 191u8, 31u8, 62u8, 11u8, 223u8, 79u8, - ], - ) - } - pub fn retract_tip( - &self, - hash: ::subxt::utils::H256, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Tips", - "retract_tip", - RetractTip { hash }, - [ - 137u8, 42u8, 229u8, 188u8, 157u8, 195u8, 184u8, 176u8, 64u8, 142u8, - 67u8, 175u8, 185u8, 207u8, 214u8, 71u8, 165u8, 29u8, 137u8, 227u8, - 132u8, 195u8, 255u8, 66u8, 186u8, 57u8, 34u8, 184u8, 187u8, 65u8, - 129u8, 131u8, - ], - ) - } - pub fn tip_new( - &self, - reason: ::std::vec::Vec<::core::primitive::u8>, - who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - tip_value: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Tips", - "tip_new", - TipNew { reason, who, tip_value }, - [ - 217u8, 15u8, 70u8, 80u8, 193u8, 110u8, 212u8, 110u8, 212u8, 45u8, - 197u8, 150u8, 43u8, 116u8, 115u8, 231u8, 148u8, 102u8, 202u8, 28u8, - 55u8, 88u8, 166u8, 238u8, 11u8, 238u8, 229u8, 189u8, 89u8, 115u8, - 196u8, 95u8, - ], - ) - } - pub fn tip( - &self, - hash: ::subxt::utils::H256, - tip_value: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Tips", - "tip", - Tip { hash, tip_value }, - [ - 133u8, 52u8, 131u8, 14u8, 71u8, 232u8, 254u8, 31u8, 33u8, 206u8, 50u8, - 76u8, 56u8, 167u8, 228u8, 202u8, 195u8, 0u8, 164u8, 107u8, 170u8, 98u8, - 192u8, 37u8, 209u8, 199u8, 130u8, 15u8, 168u8, 63u8, 181u8, 134u8, - ], - ) - } - pub fn close_tip( - &self, - hash: ::subxt::utils::H256, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Tips", - "close_tip", - CloseTip { hash }, - [ - 32u8, 53u8, 0u8, 222u8, 45u8, 157u8, 107u8, 174u8, 203u8, 50u8, 81u8, - 230u8, 6u8, 111u8, 79u8, 55u8, 49u8, 151u8, 107u8, 114u8, 81u8, 200u8, - 144u8, 175u8, 29u8, 142u8, 115u8, 184u8, 102u8, 116u8, 156u8, 173u8, - ], - ) - } - pub fn slash_tip( - &self, - hash: ::subxt::utils::H256, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Tips", - "slash_tip", - SlashTip { hash }, - [ - 222u8, 209u8, 22u8, 47u8, 114u8, 230u8, 81u8, 200u8, 131u8, 0u8, 209u8, - 54u8, 17u8, 200u8, 175u8, 125u8, 100u8, 254u8, 41u8, 178u8, 20u8, 27u8, - 9u8, 184u8, 79u8, 93u8, 208u8, 148u8, 27u8, 190u8, 176u8, 169u8, - ], - ) - } - } - } - pub type Event = runtime_types::pallet_tips::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")] - pub struct NewTip { - pub tip_hash: ::subxt::utils::H256, - } - impl ::subxt::events::StaticEvent for NewTip { - const PALLET: &'static str = "Tips"; - const EVENT: &'static str = "NewTip"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: 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 TipClosing { - pub tip_hash: ::subxt::utils::H256, - } - impl ::subxt::events::StaticEvent for TipClosing { - const PALLET: &'static str = "Tips"; - const EVENT: &'static str = "TipClosing"; - } - #[derive( - :: subxt :: ext :: codec :: 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 TipClosed { - pub tip_hash: ::subxt::utils::H256, - pub who: ::subxt::utils::AccountId32, - pub payout: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for TipClosed { - const PALLET: &'static str = "Tips"; - const EVENT: &'static str = "TipClosed"; - } - #[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 TipRetracted { - pub tip_hash: ::subxt::utils::H256, - } - impl ::subxt::events::StaticEvent for TipRetracted { - const PALLET: &'static str = "Tips"; - const EVENT: &'static str = "TipRetracted"; - } - #[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 TipSlashed { - pub tip_hash: ::subxt::utils::H256, - pub finder: ::subxt::utils::AccountId32, - pub deposit: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for TipSlashed { - const PALLET: &'static str = "Tips"; - const EVENT: &'static str = "TipSlashed"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - pub fn tips( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_tips::OpenTip< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - ::core::primitive::u32, - ::subxt::utils::H256, - >, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Tips", - "Tips", - vec![::subxt::storage::address::make_static_storage_map_key(_0.borrow())], - [ - 241u8, 196u8, 105u8, 248u8, 29u8, 66u8, 86u8, 98u8, 6u8, 159u8, 191u8, - 0u8, 227u8, 232u8, 147u8, 248u8, 173u8, 20u8, 225u8, 12u8, 232u8, 5u8, - 93u8, 78u8, 18u8, 154u8, 130u8, 38u8, 142u8, 36u8, 66u8, 0u8, - ], - ) - } - pub fn tips_root( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_tips::OpenTip< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - ::core::primitive::u32, - ::subxt::utils::H256, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Tips", - "Tips", - Vec::new(), - [ - 241u8, 196u8, 105u8, 248u8, 29u8, 66u8, 86u8, 98u8, 6u8, 159u8, 191u8, - 0u8, 227u8, 232u8, 147u8, 248u8, 173u8, 20u8, 225u8, 12u8, 232u8, 5u8, - 93u8, 78u8, 18u8, 154u8, 130u8, 38u8, 142u8, 36u8, 66u8, 0u8, - ], - ) - } - pub fn reasons( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, - ) -> ::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( - "Tips", - "Reasons", - vec![::subxt::storage::address::make_static_storage_map_key(_0.borrow())], - [ - 202u8, 191u8, 36u8, 162u8, 156u8, 102u8, 115u8, 10u8, 203u8, 35u8, - 201u8, 70u8, 195u8, 151u8, 89u8, 82u8, 202u8, 35u8, 210u8, 176u8, 82u8, - 1u8, 77u8, 94u8, 31u8, 70u8, 252u8, 194u8, 166u8, 91u8, 189u8, 134u8, - ], - ) - } - pub fn reasons_root( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec<::core::primitive::u8>, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Tips", - "Reasons", - Vec::new(), - [ - 202u8, 191u8, 36u8, 162u8, 156u8, 102u8, 115u8, 10u8, 203u8, 35u8, - 201u8, 70u8, 195u8, 151u8, 89u8, 82u8, 202u8, 35u8, 210u8, 176u8, 82u8, - 1u8, 77u8, 94u8, 31u8, 70u8, 252u8, 194u8, 166u8, 91u8, 189u8, 134u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - pub fn maximum_reason_length( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "Tips", - "MaximumReasonLength", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, - ], - ) - } - pub fn data_deposit_per_byte( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::Address::new_static( - "Tips", - "DataDepositPerByte", - [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, - 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, - 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, - ], - ) - } - pub fn tip_countdown(&self) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "Tips", - "TipCountdown", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, - ], - ) - } - pub fn tip_finders_fee( - &self, - ) -> ::subxt::constants::Address - { - ::subxt::constants::Address::new_static( - "Tips", - "TipFindersFee", - [ - 99u8, 121u8, 176u8, 172u8, 235u8, 159u8, 116u8, 114u8, 179u8, 91u8, - 129u8, 117u8, 204u8, 135u8, 53u8, 7u8, 151u8, 26u8, 124u8, 151u8, - 202u8, 171u8, 171u8, 207u8, 183u8, 177u8, 24u8, 53u8, 109u8, 185u8, - 71u8, 183u8, - ], - ) - } - pub fn tip_report_deposit_base( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::Address::new_static( - "Tips", - "TipReportDepositBase", - [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, - 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, - 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, - ], - ) - } - } - } - } pub mod election_provider_multi_phase { use super::{root_mod, runtime_types}; pub mod calls { @@ -20995,7 +17741,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, (), (), @@ -21076,7 +17831,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, @@ -21431,6 +18186,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, + ], + ) + } } } } @@ -21787,7 +18556,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, ::core::primitive::u128, )>, @@ -21811,7 +18580,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< runtime_types::pallet_nis::pallet::Bid< ::core::primitive::u128, ::subxt::utils::AccountId32, @@ -21837,7 +18606,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::pallet_nis::pallet::Bid< ::core::primitive::u128, ::subxt::utils::AccountId32, @@ -21950,6 +18719,20 @@ pub mod api { ], ) } + pub fn hold_reason( + &self, + ) -> ::subxt::constants::Address { + ::subxt::constants::Address::new_static( + "Nis", + "HoldReason", + [ + 235u8, 197u8, 158u8, 181u8, 190u8, 29u8, 149u8, 238u8, 3u8, 114u8, + 189u8, 81u8, 200u8, 101u8, 82u8, 136u8, 166u8, 105u8, 120u8, 150u8, + 166u8, 130u8, 51u8, 98u8, 110u8, 208u8, 32u8, 211u8, 77u8, 189u8, 64u8, + 111u8, + ], + ) + } pub fn queue_count(&self) -> ::subxt::constants::Address<::core::primitive::u32> { ::subxt::constants::Address::new_static( "Nis", @@ -22068,20 +18851,6 @@ pub mod api { ], ) } - pub fn reserve_id( - &self, - ) -> ::subxt::constants::Address<[::core::primitive::u8; 8usize]> { - ::subxt::constants::Address::new_static( - "Nis", - "ReserveId", - [ - 224u8, 197u8, 247u8, 125u8, 62u8, 180u8, 69u8, 91u8, 226u8, 36u8, 82u8, - 148u8, 70u8, 147u8, 209u8, 40u8, 210u8, 229u8, 181u8, 191u8, 170u8, - 205u8, 138u8, 97u8, 127u8, 59u8, 124u8, 244u8, 252u8, 30u8, 213u8, - 179u8, - ], - ) - } } } } @@ -22099,7 +18868,7 @@ pub mod api { )] #[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, @@ -22113,12 +18882,12 @@ pub mod api { )] #[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, @@ -22175,40 +18944,79 @@ pub mod api { 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, + )] + #[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, + )] + #[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, + )] + #[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 { - 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( "NisCounterpartBalances", - "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, ], ) } - pub fn set_balance( + 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( "NisCounterpartBalances", - "set_balance", - SetBalance { who, new_free, new_reserved }, + "set_balance_deprecated", + SetBalanceDeprecated { who, new_free, 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, ], ) } @@ -22281,6 +19089,54 @@ pub mod api { ], ) } + pub fn upgrade_accounts( + &self, + who: ::std::vec::Vec<::subxt::utils::AccountId32>, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "NisCounterpartBalances", + "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, + ], + ) + } + pub fn transfer( + &self, + dest: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + value: ::core::primitive::u128, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "NisCounterpartBalances", + "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, + ], + ) + } + 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( + "NisCounterpartBalances", + "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, + ], + ) + } } } pub type Event = runtime_types::pallet_balances::pallet::Event; @@ -22350,7 +19206,6 @@ pub mod api { pub struct BalanceSet { pub who: ::subxt::utils::AccountId32, pub free: ::core::primitive::u128, - pub reserved: ::core::primitive::u128, } impl ::subxt::events::StaticEvent for BalanceSet { const PALLET: &'static str = "NisCounterpartBalances"; @@ -22461,6 +19316,192 @@ pub mod api { const PALLET: &'static str = "NisCounterpartBalances"; 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, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Minted { + pub who: ::subxt::utils::AccountId32, + pub amount: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for Minted { + const PALLET: &'static str = "NisCounterpartBalances"; + 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, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Burned { + pub who: ::subxt::utils::AccountId32, + pub amount: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for Burned { + const PALLET: &'static str = "NisCounterpartBalances"; + 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, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Suspended { + pub who: ::subxt::utils::AccountId32, + pub amount: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for Suspended { + const PALLET: &'static str = "NisCounterpartBalances"; + 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, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Restored { + pub who: ::subxt::utils::AccountId32, + pub amount: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for Restored { + const PALLET: &'static str = "NisCounterpartBalances"; + 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, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Upgraded { + pub who: ::subxt::utils::AccountId32, + } + impl ::subxt::events::StaticEvent for Upgraded { + const PALLET: &'static str = "NisCounterpartBalances"; + 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, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Issued { + pub amount: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for Issued { + const PALLET: &'static str = "NisCounterpartBalances"; + 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, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Rescinded { + pub amount: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for Rescinded { + const PALLET: &'static str = "NisCounterpartBalances"; + 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, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Locked { + pub who: ::subxt::utils::AccountId32, + pub amount: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for Locked { + const PALLET: &'static str = "NisCounterpartBalances"; + 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, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Unlocked { + pub who: ::subxt::utils::AccountId32, + pub amount: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for Unlocked { + const PALLET: &'static str = "NisCounterpartBalances"; + const EVENT: &'static str = "Unlocked"; + } + #[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 Frozen { + pub who: ::subxt::utils::AccountId32, + pub amount: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for Frozen { + const PALLET: &'static str = "NisCounterpartBalances"; + const EVENT: &'static str = "Frozen"; + } + #[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 Thawed { + pub who: ::subxt::utils::AccountId32, + pub amount: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for Thawed { + const PALLET: &'static str = "NisCounterpartBalances"; + const EVENT: &'static str = "Thawed"; + } } pub mod storage { use super::runtime_types; @@ -22512,7 +19553,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, @@ -22522,9 +19563,10 @@ pub mod api { "Account", vec![::subxt::storage::address::make_static_storage_map_key(_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, ], ) } @@ -22532,7 +19574,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, @@ -22542,9 +19584,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, ], ) } @@ -22553,8 +19596,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, @@ -22575,8 +19618,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, @@ -22598,8 +19641,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, >, @@ -22623,8 +19666,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, >, @@ -22644,6 +19687,108 @@ pub mod api { ], ) } + pub fn holds( + &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( + "NisCounterpartBalances", + "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, + ], + ) + } + 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( + "NisCounterpartBalances", + "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, + ], + ) + } + 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( + "NisCounterpartBalances", + "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, + ], + ) + } + 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( + "NisCounterpartBalances", + "Freezes", + Vec::new(), + [ + 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, + ], + ) + } } } pub mod constants { @@ -22687,6 +19832,30 @@ pub mod api { ], ) } + pub fn max_holds(&self) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "NisCounterpartBalances", + "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, + ], + ) + } + pub fn max_freezes(&self) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "NisCounterpartBalances", + "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, + ], + ) + } } } } @@ -23018,7 +20187,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, @@ -23034,7 +20203,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( @@ -23096,6 +20265,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, @@ -23112,7 +20284,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( @@ -23128,6 +20300,101 @@ pub mod api { 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, + )] + #[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, + )] + #[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, + )] + #[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, + )] + #[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, + )] + #[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, + )] + #[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, + )] + #[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 { pub fn join( @@ -23232,16 +20499,17 @@ 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", "create", - Create { amount, root, nominator, state_toggler }, + Create { amount, root, nominator, 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, ], ) } @@ -23250,17 +20518,17 @@ 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( "NominationPools", "create_with_pool_id", - CreateWithPoolId { amount, root, nominator, state_toggler, pool_id }, + CreateWithPoolId { amount, root, nominator, 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, ], ) } @@ -23330,6 +20598,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", @@ -23340,11 +20611,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, ], ) } @@ -23357,18 +20630,19 @@ 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 { ::subxt::tx::Payload::new_static( "NominationPools", "update_roles", - UpdateRoles { pool_id, new_root, new_nominator, new_state_toggler }, + UpdateRoles { pool_id, new_root, new_nominator, 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, ], ) } @@ -23387,6 +20661,124 @@ pub mod api { ], ) } + 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, + ], + ) + } + 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, + ], + ) + } + 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, + ], + ) + } + 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, + ], + ) + } + 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, + ], + ) + } + 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, + ], + ) + } + 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, + ], + ) + } } } pub type Event = runtime_types::pallet_nomination_pools::pallet::Event; @@ -23547,7 +20939,7 @@ pub mod api { #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] 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 { @@ -23589,6 +20981,79 @@ 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, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + 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, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + 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, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + 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, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + 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; @@ -23696,6 +21161,27 @@ pub mod api { ], ) } + 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, + ], + ) + } pub fn pool_members( &self, _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, @@ -23775,9 +21261,10 @@ pub mod api { "BondedPools", vec![::subxt::storage::address::make_static_storage_map_key(_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, ], ) } @@ -23795,9 +21282,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, ], ) } @@ -23837,9 +21325,10 @@ pub mod api { "RewardPools", vec![::subxt::storage::address::make_static_storage_map_key(_0.borrow())], [ - 139u8, 123u8, 46u8, 107u8, 9u8, 83u8, 141u8, 12u8, 188u8, 225u8, 170u8, - 215u8, 154u8, 21u8, 100u8, 95u8, 237u8, 245u8, 46u8, 216u8, 199u8, - 184u8, 187u8, 155u8, 8u8, 16u8, 34u8, 177u8, 153u8, 65u8, 109u8, 198u8, + 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, ], ) } @@ -23857,9 +21346,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, ], ) } @@ -23952,7 +21442,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, @@ -23973,7 +21465,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, @@ -24093,6 +21587,49 @@ pub mod api { ], ) } + 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, + ], + ) + } + 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 { @@ -24646,19 +22183,6 @@ pub mod api { )] #[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, - )] - #[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, } @@ -24996,6 +22520,30 @@ pub mod api { 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, + )] + #[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, + )] + #[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 { pub fn set_validation_upgrade_cooldown( @@ -25247,21 +22795,6 @@ pub mod api { ], ) } - 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, - ], - ) - } pub fn set_no_show_slots( &self, new: ::core::primitive::u32, @@ -25678,6 +23211,38 @@ pub mod api { ], ) } + 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, + ], + ) + } + 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 { @@ -25700,10 +23265,10 @@ pub mod api { "ActiveConfig", vec![], [ - 172u8, 130u8, 170u8, 206u8, 221u8, 62u8, 122u8, 61u8, 164u8, 167u8, - 163u8, 81u8, 53u8, 0u8, 119u8, 14u8, 195u8, 60u8, 220u8, 65u8, 233u8, - 80u8, 227u8, 234u8, 123u8, 217u8, 81u8, 157u8, 245u8, 111u8, 236u8, - 55u8, + 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, ], ) } pub fn pending_configs (& self ,) -> :: subxt :: storage :: address :: Address :: < :: subxt :: storage :: address :: StaticStorageMapKey , :: std :: vec :: Vec < (:: core :: primitive :: u32 , runtime_types :: polkadot_runtime_parachains :: configuration :: HostConfiguration < :: core :: primitive :: u32 > ,) > , :: subxt :: storage :: address :: Yes , :: subxt :: storage :: address :: Yes , () >{ @@ -25712,10 +23277,10 @@ pub mod api { "PendingConfigs", vec![], [ - 76u8, 42u8, 247u8, 29u8, 107u8, 96u8, 203u8, 18u8, 38u8, 228u8, 64u8, - 18u8, 208u8, 111u8, 215u8, 154u8, 218u8, 255u8, 178u8, 4u8, 140u8, - 85u8, 36u8, 128u8, 169u8, 227u8, 142u8, 220u8, 100u8, 141u8, 230u8, - 241u8, + 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, ], ) } @@ -25778,7 +23343,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, (), @@ -25799,7 +23364,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, (), @@ -25839,10 +23404,10 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] 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"; @@ -25858,10 +23423,10 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] 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"; @@ -25877,9 +23442,9 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] 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"; @@ -25890,7 +23455,7 @@ pub mod api { use super::runtime_types; pub struct StorageApi; impl StorageApi { - 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 >{ + 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", @@ -25942,7 +23507,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, @@ -25954,10 +23519,9 @@ pub mod api { "PendingAvailabilityCommitments", vec![::subxt::storage::address::make_static_storage_map_key(_0.borrow())], [ - 146u8, 206u8, 148u8, 102u8, 55u8, 101u8, 144u8, 33u8, 197u8, 232u8, - 64u8, 205u8, 216u8, 21u8, 247u8, 170u8, 237u8, 115u8, 144u8, 43u8, - 106u8, 87u8, 82u8, 39u8, 11u8, 87u8, 149u8, 195u8, 56u8, 59u8, 54u8, - 8u8, + 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, ], ) } @@ -25965,7 +23529,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, >, (), @@ -25977,10 +23541,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, ], ) } @@ -26002,7 +23565,7 @@ pub mod api { #[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, @@ -26013,7 +23576,7 @@ pub mod api { impl TransactionApi { 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, @@ -26025,9 +23588,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, ], ) } @@ -26061,7 +23625,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, @@ -26094,7 +23658,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, @@ -26137,7 +23701,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, @@ -26328,8 +23892,8 @@ pub mod api { #[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 { @@ -26447,8 +24011,8 @@ pub mod api { } 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", @@ -27021,7 +24585,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, @@ -27041,7 +24605,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, @@ -27062,7 +24626,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, @@ -27082,7 +24646,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, @@ -27420,12 +24984,6 @@ pub mod api { } pub mod dmp { use super::{root_mod, runtime_types}; - pub mod calls { - use super::{root_mod, runtime_types}; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub struct TransactionApi; - impl TransactionApi {} - } pub mod storage { use super::runtime_types; pub struct StorageApi; @@ -27522,6 +25080,49 @@ pub mod api { ], ) } + pub fn delivery_fee_factor( + &self, + _0: impl ::std::borrow::Borrow, + ) -> ::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::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Dmp", + "DeliveryFeeFactor", + vec![::subxt::storage::address::make_static_storage_map_key(_0.borrow())], + [ + 74u8, 221u8, 160u8, 244u8, 128u8, 163u8, 79u8, 26u8, 35u8, 182u8, + 211u8, 224u8, 181u8, 42u8, 98u8, 193u8, 128u8, 249u8, 40u8, 122u8, + 208u8, 19u8, 64u8, 8u8, 156u8, 165u8, 156u8, 59u8, 112u8, 197u8, 160u8, + 87u8, + ], + ) + } + pub fn delivery_fee_factor_root( + &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( + "Dmp", + "DeliveryFeeFactor", + Vec::new(), + [ + 74u8, 221u8, 160u8, 244u8, 128u8, 163u8, 79u8, 26u8, 35u8, 182u8, + 211u8, 224u8, 181u8, 42u8, 98u8, 193u8, 128u8, 249u8, 40u8, 122u8, + 208u8, 19u8, 64u8, 8u8, 156u8, 165u8, 156u8, 59u8, 112u8, 197u8, 160u8, + 87u8, + ], + ) + } } } } @@ -28748,7 +26349,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, (), @@ -28790,7 +26391,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, @@ -28811,7 +26412,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, @@ -28869,6 +26470,47 @@ pub mod api { ], ) } + 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, + ], + ) + } + 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, + ], + ) + } } } } @@ -28941,20 +26583,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")] - 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, @@ -29003,7 +26631,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, @@ -29027,7 +26655,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, @@ -29052,7 +26680,7 @@ pub mod api { >, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec, + ::std::vec::Vec, ::subxt::storage::address::Yes, (), ::subxt::storage::address::Yes, @@ -29075,7 +26703,7 @@ pub mod api { &self, ) -> ::subxt::storage::address::Address< ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec, + ::std::vec::Vec, (), (), ::subxt::storage::address::Yes, @@ -29164,6 +26792,147 @@ pub mod api { } } } + pub mod paras_slashing { + use super::{root_mod, runtime_types}; + pub mod calls { + use super::{root_mod, 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 ReportDisputeLostUnsigned { + pub dispute_proof: ::std::boxed::Box< + runtime_types::polkadot_runtime_parachains::disputes::slashing::DisputeProof, + >, + pub key_owner_proof: runtime_types::sp_session::MembershipProof, + } + pub struct TransactionApi; + impl TransactionApi { + pub fn report_dispute_lost_unsigned( + &self, + dispute_proof : runtime_types :: polkadot_runtime_parachains :: disputes :: slashing :: DisputeProof, + key_owner_proof: runtime_types::sp_session::MembershipProof, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "ParasSlashing", + "report_dispute_lost_unsigned", + ReportDisputeLostUnsigned { + dispute_proof: ::std::boxed::Box::new(dispute_proof), + key_owner_proof, + }, + [ + 56u8, 94u8, 136u8, 125u8, 219u8, 155u8, 79u8, 241u8, 109u8, 125u8, + 106u8, 175u8, 5u8, 189u8, 34u8, 232u8, 132u8, 113u8, 157u8, 184u8, + 10u8, 34u8, 135u8, 184u8, 36u8, 224u8, 234u8, 141u8, 35u8, 69u8, 254u8, + 125u8, + ], + ) + } + } + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + pub fn unapplied_slashes( + &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, + runtime_types::polkadot_runtime_parachains::disputes::slashing::PendingSlashes, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "ParasSlashing", + "UnappliedSlashes", + vec![ + ::subxt::storage::address::make_static_storage_map_key(_0.borrow()), + ::subxt::storage::address::make_static_storage_map_key(_1.borrow()), + ], + [ + 54u8, 95u8, 76u8, 24u8, 68u8, 137u8, 201u8, 120u8, 51u8, 146u8, 12u8, + 14u8, 39u8, 109u8, 69u8, 148u8, 117u8, 193u8, 139u8, 82u8, 23u8, 77u8, + 0u8, 16u8, 64u8, 125u8, 181u8, 249u8, 23u8, 156u8, 70u8, 90u8, + ], + ) + } + pub fn unapplied_slashes_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_runtime_parachains::disputes::slashing::PendingSlashes, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "ParasSlashing", + "UnappliedSlashes", + Vec::new(), + [ + 54u8, 95u8, 76u8, 24u8, 68u8, 137u8, 201u8, 120u8, 51u8, 146u8, 12u8, + 14u8, 39u8, 109u8, 69u8, 148u8, 117u8, 193u8, 139u8, 82u8, 23u8, 77u8, + 0u8, 16u8, 64u8, 125u8, 181u8, 249u8, 23u8, 156u8, 70u8, 90u8, + ], + ) + } + pub fn validator_set_counts( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "ParasSlashing", + "ValidatorSetCounts", + vec![::subxt::storage::address::make_static_storage_map_key(_0.borrow())], + [ + 121u8, 241u8, 222u8, 61u8, 186u8, 55u8, 206u8, 246u8, 31u8, 128u8, + 103u8, 53u8, 6u8, 73u8, 13u8, 120u8, 63u8, 56u8, 167u8, 75u8, 113u8, + 102u8, 221u8, 129u8, 151u8, 186u8, 225u8, 169u8, 128u8, 192u8, 107u8, + 214u8, + ], + ) + } + pub fn validator_set_counts_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "ParasSlashing", + "ValidatorSetCounts", + Vec::new(), + [ + 121u8, 241u8, 222u8, 61u8, 186u8, 55u8, 206u8, 246u8, 31u8, 128u8, + 103u8, 53u8, 6u8, 73u8, 13u8, 120u8, 63u8, 56u8, 167u8, 75u8, 113u8, + 102u8, 221u8, 129u8, 151u8, 186u8, 225u8, 169u8, 128u8, 192u8, 107u8, + 214u8, + ], + ) + } + } + } + } pub mod registrar { use super::{root_mod, runtime_types}; pub mod calls { @@ -31076,6 +28845,18 @@ pub mod api { 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, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ForceSuspension { + pub suspended: ::core::primitive::bool, + } pub struct TransactionApi; impl TransactionApi { pub fn send( @@ -31091,10 +28872,9 @@ pub mod api { message: ::std::boxed::Box::new(message), }, [ - 30u8, 49u8, 111u8, 253u8, 2u8, 97u8, 134u8, 171u8, 46u8, 226u8, 59u8, - 152u8, 242u8, 28u8, 252u8, 241u8, 241u8, 107u8, 231u8, 160u8, 27u8, - 43u8, 106u8, 117u8, 218u8, 179u8, 100u8, 235u8, 109u8, 42u8, 79u8, - 253u8, + 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, ], ) } @@ -31154,10 +28934,9 @@ pub mod api { "execute", Execute { message: ::std::boxed::Box::new(message), max_weight }, [ - 254u8, 34u8, 241u8, 240u8, 10u8, 232u8, 102u8, 177u8, 201u8, 227u8, - 241u8, 173u8, 223u8, 77u8, 139u8, 243u8, 195u8, 57u8, 221u8, 236u8, - 1u8, 89u8, 117u8, 182u8, 193u8, 121u8, 218u8, 173u8, 64u8, 202u8, 93u8, - 72u8, + 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, ], ) } @@ -31275,6 +29054,21 @@ pub mod api { ], ) } + pub fn force_suspension( + &self, + suspended: ::core::primitive::bool, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "XcmPallet", + "force_suspension", + ForceSuspension { suspended }, + [ + 147u8, 1u8, 117u8, 148u8, 8u8, 14u8, 53u8, 167u8, 85u8, 184u8, 25u8, + 183u8, 52u8, 197u8, 12u8, 135u8, 45u8, 88u8, 13u8, 27u8, 218u8, 31u8, + 80u8, 27u8, 183u8, 36u8, 0u8, 243u8, 235u8, 85u8, 75u8, 81u8, + ], + ) + } } } pub type Event = runtime_types::pallet_xcm::pallet::Event; @@ -31721,10 +29515,10 @@ pub mod api { "Queries", vec![::subxt::storage::address::make_static_storage_map_key(_0.borrow())], [ - 161u8, 32u8, 215u8, 15u8, 178u8, 18u8, 74u8, 203u8, 170u8, 162u8, - 242u8, 115u8, 191u8, 129u8, 174u8, 70u8, 85u8, 126u8, 218u8, 156u8, - 212u8, 51u8, 253u8, 144u8, 74u8, 122u8, 238u8, 35u8, 194u8, 11u8, - 253u8, 35u8, + 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, ], ) } @@ -31742,10 +29536,10 @@ pub mod api { "Queries", Vec::new(), [ - 161u8, 32u8, 215u8, 15u8, 178u8, 18u8, 74u8, 203u8, 170u8, 162u8, - 242u8, 115u8, 191u8, 129u8, 174u8, 70u8, 85u8, 126u8, 218u8, 156u8, - 212u8, 51u8, 253u8, 144u8, 74u8, 122u8, 238u8, 35u8, 194u8, 11u8, - 253u8, 35u8, + 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, ], ) } @@ -31960,7 +29754,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, )>, @@ -32051,7 +29845,7 @@ 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::bounded_collections::bounded_vec::BoundedVec<( ::core::primitive::u128, runtime_types::xcm::VersionedMultiLocation, )>, @@ -32075,7 +29869,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::u128, runtime_types::xcm::VersionedMultiLocation, )>, @@ -32095,11 +29889,74 @@ pub mod api { ], ) } + pub fn xcm_execution_suspended( + &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( + "XcmPallet", + "XcmExecutionSuspended", + vec![], + [ + 182u8, 20u8, 35u8, 10u8, 65u8, 208u8, 52u8, 141u8, 158u8, 23u8, 46u8, + 221u8, 172u8, 110u8, 39u8, 121u8, 106u8, 104u8, 19u8, 64u8, 90u8, + 137u8, 173u8, 31u8, 112u8, 219u8, 64u8, 238u8, 125u8, 242u8, 24u8, + 107u8, + ], + ) + } } } } 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, + )] + #[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 finality_grandpa { use super::runtime_types; #[derive( @@ -32276,7 +30133,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, >, ), @@ -32968,7 +30825,7 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum OriginCaller { - # [codec (index = 0)] system (runtime_types :: frame_support :: dispatch :: RawOrigin < :: subxt :: utils :: AccountId32 > ,) , # [codec (index = 14)] Council (runtime_types :: pallet_collective :: RawOrigin < :: subxt :: utils :: AccountId32 > ,) , # [codec (index = 15)] TechnicalCommittee (runtime_types :: pallet_collective :: RawOrigin < :: subxt :: utils :: AccountId32 > ,) , # [codec (index = 43)] Origins (runtime_types :: kusama_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 ,) , } + # [codec (index = 0)] system (runtime_types :: frame_support :: dispatch :: RawOrigin < :: subxt :: utils :: AccountId32 > ,) , # [codec (index = 43)] Origins (runtime_types :: kusama_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 = 4)] Void (runtime_types :: sp_core :: Void ,) , } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -32995,6 +30852,8 @@ pub mod api { Auction, #[codec(index = 7)] Society, + #[codec(index = 8)] + NominationPools, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -33034,16 +30893,6 @@ pub mod api { Grandpa(runtime_types::pallet_grandpa::pallet::Call), #[codec(index = 11)] ImOnline(runtime_types::pallet_im_online::pallet::Call), - #[codec(index = 13)] - Democracy(runtime_types::pallet_democracy::pallet::Call), - #[codec(index = 14)] - Council(runtime_types::pallet_collective::pallet::Call), - #[codec(index = 15)] - TechnicalCommittee(runtime_types::pallet_collective::pallet::Call), - #[codec(index = 16)] - PhragmenElection(runtime_types::pallet_elections_phragmen::pallet::Call), - #[codec(index = 17)] - TechnicalMembership(runtime_types::pallet_membership::pallet::Call), #[codec(index = 18)] Treasury(runtime_types::pallet_treasury::pallet::Call), #[codec(index = 20)] @@ -33080,8 +30929,6 @@ pub mod api { Bounties(runtime_types::pallet_bounties::pallet::Call), #[codec(index = 40)] ChildBounties(runtime_types::pallet_child_bounties::pallet::Call), - #[codec(index = 36)] - Tips(runtime_types::pallet_tips::pallet::Call), #[codec(index = 37)] ElectionProviderMultiPhase( runtime_types::pallet_election_provider_multi_phase::pallet::Call, @@ -33112,14 +30959,16 @@ pub mod api { Paras(runtime_types::polkadot_runtime_parachains::paras::pallet::Call), #[codec(index = 57)] Initializer(runtime_types::polkadot_runtime_parachains::initializer::pallet::Call), - #[codec(index = 58)] - Dmp(runtime_types::polkadot_runtime_parachains::dmp::pallet::Call), #[codec(index = 59)] Ump(runtime_types::polkadot_runtime_parachains::ump::pallet::Call), #[codec(index = 60)] Hrmp(runtime_types::polkadot_runtime_parachains::hrmp::pallet::Call), #[codec(index = 62)] ParasDisputes(runtime_types::polkadot_runtime_parachains::disputes::pallet::Call), + #[codec(index = 63)] + ParasSlashing( + runtime_types::polkadot_runtime_parachains::disputes::slashing::pallet::Call, + ), #[codec(index = 70)] Registrar(runtime_types::polkadot_runtime_common::paras_registrar::pallet::Call), #[codec(index = 71)] @@ -33159,16 +31008,6 @@ pub mod api { Grandpa(runtime_types::pallet_grandpa::pallet::Event), #[codec(index = 11)] ImOnline(runtime_types::pallet_im_online::pallet::Event), - #[codec(index = 13)] - Democracy(runtime_types::pallet_democracy::pallet::Event), - #[codec(index = 14)] - Council(runtime_types::pallet_collective::pallet::Event), - #[codec(index = 15)] - TechnicalCommittee(runtime_types::pallet_collective::pallet::Event), - #[codec(index = 16)] - PhragmenElection(runtime_types::pallet_elections_phragmen::pallet::Event), - #[codec(index = 17)] - TechnicalMembership(runtime_types::pallet_membership::pallet::Event), #[codec(index = 18)] Treasury(runtime_types::pallet_treasury::pallet::Event), #[codec(index = 20)] @@ -33205,8 +31044,6 @@ pub mod api { Bounties(runtime_types::pallet_bounties::pallet::Event), #[codec(index = 40)] ChildBounties(runtime_types::pallet_child_bounties::pallet::Event), - #[codec(index = 36)] - Tips(runtime_types::pallet_tips::pallet::Event), #[codec(index = 37)] ElectionProviderMultiPhase( runtime_types::pallet_election_provider_multi_phase::pallet::Event, @@ -33251,12 +31088,25 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum RuntimeHoldReason { + #[codec(index = 38)] + Nis(runtime_types::pallet_nis::pallet::HoldReason), + } + #[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 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, } } @@ -33452,18 +31302,18 @@ pub mod api { #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum Call { #[codec(index = 0)] - transfer { + transfer_allow_death { dest: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, #[codec(compact)] value: ::core::primitive::u128, }, #[codec(index = 1)] - set_balance { + 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)] force_transfer { @@ -33488,6 +31338,176 @@ pub mod api { who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, amount: ::core::primitive::u128, }, + #[codec(index = 6)] + upgrade_accounts { who: ::std::vec::Vec<::subxt::utils::AccountId32> }, + #[codec(index = 7)] + transfer { + dest: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + #[codec(compact)] + value: ::core::primitive::u128, + }, + #[codec(index = 8)] + force_set_balance { + who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + #[codec(compact)] + new_free: ::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 enum Error { + #[codec(index = 0)] + VestingBalance, + #[codec(index = 1)] + LiquidityRestrictions, + #[codec(index = 2)] + InsufficientBalance, + #[codec(index = 3)] + ExistentialDeposit, + #[codec(index = 4)] + Expendability, + #[codec(index = 5)] + ExistingVestingSchedule, + #[codec(index = 6)] + DeadAccount, + #[codec(index = 7)] + TooManyReserves, + #[codec(index = 8)] + TooManyHolds, + #[codec(index = 9)] + TooManyFreezes, + } + #[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 Event { + #[codec(index = 0)] + Endowed { + account: ::subxt::utils::AccountId32, + free_balance: ::core::primitive::u128, + }, + #[codec(index = 1)] + DustLost { + account: ::subxt::utils::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 2)] + Transfer { + from: ::subxt::utils::AccountId32, + to: ::subxt::utils::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 3)] + BalanceSet { who: ::subxt::utils::AccountId32, free: ::core::primitive::u128 }, + #[codec(index = 4)] + Reserved { who: ::subxt::utils::AccountId32, amount: ::core::primitive::u128 }, + #[codec(index = 5)] + Unreserved { who: ::subxt::utils::AccountId32, amount: ::core::primitive::u128 }, + #[codec(index = 6)] + ReserveRepatriated { + from: ::subxt::utils::AccountId32, + to: ::subxt::utils::AccountId32, + amount: ::core::primitive::u128, + destination_status: + runtime_types::frame_support::traits::tokens::misc::BalanceStatus, + }, + #[codec(index = 7)] + Deposit { who: ::subxt::utils::AccountId32, amount: ::core::primitive::u128 }, + #[codec(index = 8)] + Withdraw { who: ::subxt::utils::AccountId32, amount: ::core::primitive::u128 }, + #[codec(index = 9)] + Slashed { who: ::subxt::utils::AccountId32, amount: ::core::primitive::u128 }, + #[codec(index = 10)] + Minted { who: ::subxt::utils::AccountId32, amount: ::core::primitive::u128 }, + #[codec(index = 11)] + Burned { who: ::subxt::utils::AccountId32, amount: ::core::primitive::u128 }, + #[codec(index = 12)] + Suspended { who: ::subxt::utils::AccountId32, amount: ::core::primitive::u128 }, + #[codec(index = 13)] + Restored { who: ::subxt::utils::AccountId32, amount: ::core::primitive::u128 }, + #[codec(index = 14)] + Upgraded { who: ::subxt::utils::AccountId32 }, + #[codec(index = 15)] + Issued { amount: ::core::primitive::u128 }, + #[codec(index = 16)] + Rescinded { amount: ::core::primitive::u128 }, + #[codec(index = 17)] + Locked { who: ::subxt::utils::AccountId32, amount: ::core::primitive::u128 }, + #[codec(index = 18)] + Unlocked { who: ::subxt::utils::AccountId32, amount: ::core::primitive::u128 }, + #[codec(index = 19)] + Frozen { who: ::subxt::utils::AccountId32, amount: ::core::primitive::u128 }, + #[codec(index = 20)] + Thawed { who: ::subxt::utils::AccountId32, 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, + )] + #[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, + )] + #[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, + )] + #[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, + )] + #[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, @@ -33498,23 +31518,13 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Error { + pub enum Reasons { #[codec(index = 0)] - VestingBalance, + Fee, #[codec(index = 1)] - LiquidityRestrictions, + Misc, #[codec(index = 2)] - InsufficientBalance, - #[codec(index = 3)] - ExistentialDeposit, - #[codec(index = 4)] - KeepAlive, - #[codec(index = 5)] - ExistingVestingSchedule, - #[codec(index = 6)] - DeadAccount, - #[codec(index = 7)] - TooManyReserves, + All, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -33525,108 +31535,11 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Event { - #[codec(index = 0)] - Endowed { - account: ::subxt::utils::AccountId32, - free_balance: ::core::primitive::u128, - }, - #[codec(index = 1)] - DustLost { - account: ::subxt::utils::AccountId32, - amount: ::core::primitive::u128, - }, - #[codec(index = 2)] - Transfer { - from: ::subxt::utils::AccountId32, - to: ::subxt::utils::AccountId32, - amount: ::core::primitive::u128, - }, - #[codec(index = 3)] - BalanceSet { - who: ::subxt::utils::AccountId32, - free: ::core::primitive::u128, - reserved: ::core::primitive::u128, - }, - #[codec(index = 4)] - Reserved { who: ::subxt::utils::AccountId32, amount: ::core::primitive::u128 }, - #[codec(index = 5)] - Unreserved { who: ::subxt::utils::AccountId32, amount: ::core::primitive::u128 }, - #[codec(index = 6)] - ReserveRepatriated { - from: ::subxt::utils::AccountId32, - to: ::subxt::utils::AccountId32, - amount: ::core::primitive::u128, - destination_status: - runtime_types::frame_support::traits::tokens::misc::BalanceStatus, - }, - #[codec(index = 7)] - Deposit { who: ::subxt::utils::AccountId32, amount: ::core::primitive::u128 }, - #[codec(index = 8)] - Withdraw { who: ::subxt::utils::AccountId32, amount: ::core::primitive::u128 }, - #[codec(index = 9)] - Slashed { who: ::subxt::utils::AccountId32, amount: ::core::primitive::u128 }, + pub struct ReserveData<_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, - )] - #[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 struct ReserveData<_0, _1> { - pub id: _0, - pub amount: _1, - } } pub mod pallet_bounties { use super::runtime_types; @@ -33952,183 +31865,6 @@ pub mod api { PendingPayout { curator: _0, beneficiary: _0, unlock_at: _1 }, } } - pub mod pallet_collective { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: 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 Call { - #[codec(index = 0)] - set_members { - new_members: ::std::vec::Vec<::subxt::utils::AccountId32>, - prime: ::core::option::Option<::subxt::utils::AccountId32>, - old_count: ::core::primitive::u32, - }, - #[codec(index = 1)] - execute { - proposal: ::std::boxed::Box, - #[codec(compact)] - length_bound: ::core::primitive::u32, - }, - #[codec(index = 2)] - propose { - #[codec(compact)] - threshold: ::core::primitive::u32, - proposal: ::std::boxed::Box, - #[codec(compact)] - length_bound: ::core::primitive::u32, - }, - #[codec(index = 3)] - vote { - proposal: ::subxt::utils::H256, - #[codec(compact)] - index: ::core::primitive::u32, - approve: ::core::primitive::bool, - }, - #[codec(index = 4)] - 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)] - disapprove_proposal { proposal_hash: ::subxt::utils::H256 }, - #[codec(index = 6)] - close { - proposal_hash: ::subxt::utils::H256, - #[codec(compact)] - index: ::core::primitive::u32, - proposal_weight_bound: runtime_types::sp_weights::weight_v2::Weight, - #[codec(compact)] - 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, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Error { - #[codec(index = 0)] - NotMember, - #[codec(index = 1)] - DuplicateProposal, - #[codec(index = 2)] - ProposalMissing, - #[codec(index = 3)] - WrongIndex, - #[codec(index = 4)] - DuplicateVote, - #[codec(index = 5)] - AlreadyInitialized, - #[codec(index = 6)] - TooEarly, - #[codec(index = 7)] - TooManyProposals, - #[codec(index = 8)] - WrongProposalWeight, - #[codec(index = 9)] - WrongProposalLength, - } - #[derive( - :: subxt :: 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 Event { - #[codec(index = 0)] - Proposed { - account: ::subxt::utils::AccountId32, - proposal_index: ::core::primitive::u32, - proposal_hash: ::subxt::utils::H256, - threshold: ::core::primitive::u32, - }, - #[codec(index = 1)] - Voted { - account: ::subxt::utils::AccountId32, - proposal_hash: ::subxt::utils::H256, - voted: ::core::primitive::bool, - yes: ::core::primitive::u32, - no: ::core::primitive::u32, - }, - #[codec(index = 2)] - Approved { proposal_hash: ::subxt::utils::H256 }, - #[codec(index = 3)] - Disapproved { proposal_hash: ::subxt::utils::H256 }, - #[codec(index = 4)] - Executed { - proposal_hash: ::subxt::utils::H256, - result: - ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - }, - #[codec(index = 5)] - MemberExecuted { - proposal_hash: ::subxt::utils::H256, - result: - ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - }, - #[codec(index = 6)] - Closed { - proposal_hash: ::subxt::utils::H256, - yes: ::core::primitive::u32, - no: ::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 RawOrigin<_0> { - #[codec(index = 0)] - Members(::core::primitive::u32, ::core::primitive::u32), - #[codec(index = 1)] - Member(_0), - #[codec(index = 2)] - _Phantom, - } - #[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 Votes<_0, _1> { - pub index: _1, - pub threshold: _1, - pub ayes: ::std::vec::Vec<_0>, - pub nays: ::std::vec::Vec<_0>, - pub end: _1, - } - } pub mod pallet_conviction_voting { use super::runtime_types; pub mod conviction { @@ -34318,7 +32054,7 @@ pub mod api { #[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::sp_core::bounded::bounded_vec::BoundedVec<( + pub votes: runtime_types::bounded_collections::bounded_vec::BoundedVec<( _1, runtime_types::pallet_conviction_voting::vote::AccountVote<_0>, )>, @@ -34375,411 +32111,14 @@ pub mod api { )] #[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 { - 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 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, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Call { - #[codec(index = 0)] - propose { - proposal: runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::kusama_runtime::RuntimeCall, - >, - #[codec(compact)] - value: ::core::primitive::u128, - }, - #[codec(index = 1)] - second { - #[codec(compact)] - proposal: ::core::primitive::u32, - }, - #[codec(index = 2)] - vote { - #[codec(compact)] - ref_index: ::core::primitive::u32, - vote: runtime_types::pallet_democracy::vote::AccountVote< - ::core::primitive::u128, - >, - }, - #[codec(index = 3)] - emergency_cancel { ref_index: ::core::primitive::u32 }, - #[codec(index = 4)] - external_propose { - proposal: runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::kusama_runtime::RuntimeCall, - >, - }, - #[codec(index = 5)] - external_propose_majority { - proposal: runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::kusama_runtime::RuntimeCall, - >, - }, - #[codec(index = 6)] - external_propose_default { - proposal: runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::kusama_runtime::RuntimeCall, - >, - }, - #[codec(index = 7)] - fast_track { - proposal_hash: ::subxt::utils::H256, - voting_period: ::core::primitive::u32, - delay: ::core::primitive::u32, - }, - #[codec(index = 8)] - veto_external { proposal_hash: ::subxt::utils::H256 }, - #[codec(index = 9)] - cancel_referendum { - #[codec(compact)] - ref_index: ::core::primitive::u32, - }, - #[codec(index = 10)] - delegate { - to: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - conviction: runtime_types::pallet_democracy::conviction::Conviction, - balance: ::core::primitive::u128, - }, - #[codec(index = 11)] - undelegate, - #[codec(index = 12)] - clear_public_proposals, - #[codec(index = 13)] - unlock { target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()> }, - #[codec(index = 14)] - remove_vote { index: ::core::primitive::u32 }, - #[codec(index = 15)] - remove_other_vote { - target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - index: ::core::primitive::u32, - }, - #[codec(index = 16)] - blacklist { - proposal_hash: ::subxt::utils::H256, - maybe_ref_index: ::core::option::Option<::core::primitive::u32>, - }, - #[codec(index = 17)] - cancel_proposal { - #[codec(compact)] - 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, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Error { - #[codec(index = 0)] - ValueLow, - #[codec(index = 1)] - ProposalMissing, - #[codec(index = 2)] - AlreadyCanceled, - #[codec(index = 3)] - DuplicateProposal, - #[codec(index = 4)] - ProposalBlacklisted, - #[codec(index = 5)] - NotSimpleMajority, - #[codec(index = 6)] - InvalidHash, - #[codec(index = 7)] - NoProposal, - #[codec(index = 8)] - AlreadyVetoed, - #[codec(index = 9)] - ReferendumInvalid, - #[codec(index = 10)] - NoneWaiting, - #[codec(index = 11)] - NotVoter, - #[codec(index = 12)] - NoPermission, - #[codec(index = 13)] - AlreadyDelegating, - #[codec(index = 14)] - InsufficientFunds, - #[codec(index = 15)] - NotDelegating, - #[codec(index = 16)] - VotesExist, - #[codec(index = 17)] - InstantNotAllowed, - #[codec(index = 18)] - Nonsense, - #[codec(index = 19)] - WrongUpperBound, - #[codec(index = 20)] - MaxVotesReached, - #[codec(index = 21)] - TooMany, - #[codec(index = 22)] - VotingPeriodLow, - } - #[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 Event { - #[codec(index = 0)] - Proposed { - proposal_index: ::core::primitive::u32, - deposit: ::core::primitive::u128, - }, - #[codec(index = 1)] - Tabled { - proposal_index: ::core::primitive::u32, - deposit: ::core::primitive::u128, - }, - #[codec(index = 2)] - ExternalTabled, - #[codec(index = 3)] - Started { - ref_index: ::core::primitive::u32, - threshold: runtime_types::pallet_democracy::vote_threshold::VoteThreshold, - }, - #[codec(index = 4)] - Passed { ref_index: ::core::primitive::u32 }, - #[codec(index = 5)] - NotPassed { ref_index: ::core::primitive::u32 }, - #[codec(index = 6)] - Cancelled { ref_index: ::core::primitive::u32 }, - #[codec(index = 7)] - Delegated { - who: ::subxt::utils::AccountId32, - target: ::subxt::utils::AccountId32, - }, - #[codec(index = 8)] - Undelegated { account: ::subxt::utils::AccountId32 }, - #[codec(index = 9)] - Vetoed { - who: ::subxt::utils::AccountId32, - proposal_hash: ::subxt::utils::H256, - until: ::core::primitive::u32, - }, - #[codec(index = 10)] - Blacklisted { proposal_hash: ::subxt::utils::H256 }, - #[codec(index = 11)] - Voted { - voter: ::subxt::utils::AccountId32, - ref_index: ::core::primitive::u32, - vote: runtime_types::pallet_democracy::vote::AccountVote< - ::core::primitive::u128, - >, - }, - #[codec(index = 12)] - Seconded { - seconder: ::subxt::utils::AccountId32, - prop_index: ::core::primitive::u32, - }, - #[codec(index = 13)] - ProposalCanceled { prop_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, - )] - #[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, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum ReferendumInfo<_0, _1, _2> { - #[codec(index = 0)] - Ongoing(runtime_types::pallet_democracy::types::ReferendumStatus<_0, _1, _2>), - #[codec(index = 1)] - Finished { approved: ::core::primitive::bool, end: _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 ReferendumStatus<_0, _1, _2> { - pub end: _0, - pub proposal: _1, - pub threshold: runtime_types::pallet_democracy::vote_threshold::VoteThreshold, - pub delay: _0, - pub tally: runtime_types::pallet_democracy::types::Tally<_2>, - } - #[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 Tally<_0> { - pub ayes: _0, - pub nays: _0, - pub turnout: _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, - )] - #[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_democracy::vote::Vote, balance: _0 }, - #[codec(index = 1)] - Split { aye: _0, nay: _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 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, - )] - #[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, - )] - #[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<( - _2, - runtime_types::pallet_democracy::vote::AccountVote<_0>, - )>, - delegations: runtime_types::pallet_democracy::types::Delegations<_0>, - prior: runtime_types::pallet_democracy::vote::PriorLock<_2, _0>, - }, - #[codec(index = 1)] - Delegating { - balance: _0, - target: _1, - conviction: runtime_types::pallet_democracy::conviction::Conviction, - delegations: runtime_types::pallet_democracy::types::Delegations<_0>, - prior: runtime_types::pallet_democracy::vote::PriorLock<_2, _0>, - }, - } - } - pub mod vote_threshold { - 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 VoteThreshold { + pub enum Voting<_0, _1, _2, _3> { #[codec(index = 0)] - SuperMajorityApprove, + Casting(runtime_types::pallet_conviction_voting::vote::Casting<_0, _2, _2>), #[codec(index = 1)] - SuperMajorityAgainst, - #[codec(index = 2)] - SimpleMajority, + Delegating( + runtime_types::pallet_conviction_voting::vote::Delegating<_0, _1, _2>, + ), + __Ignore(::core::marker::PhantomData<_3>), } } } @@ -34964,7 +32303,7 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ReadySolution { - pub supports: runtime_types::sp_core::bounded::bounded_vec::BoundedVec<( + pub supports: runtime_types::bounded_collections::bounded_vec::BoundedVec<( ::subxt::utils::AccountId32, runtime_types::sp_npos_elections::Support<::subxt::utils::AccountId32>, )>, @@ -34980,15 +32319,9 @@ pub mod api { )] #[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, @@ -35006,175 +32339,6 @@ pub mod api { pub targets: ::core::primitive::u32, } } - pub mod pallet_elections_phragmen { - 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")] - pub enum Call { - #[codec(index = 0)] - vote { - votes: ::std::vec::Vec<::subxt::utils::AccountId32>, - #[codec(compact)] - value: ::core::primitive::u128, - }, - #[codec(index = 1)] - remove_voter, - #[codec(index = 2)] - submit_candidacy { - #[codec(compact)] - candidate_count: ::core::primitive::u32, - }, - #[codec(index = 3)] - renounce_candidacy { - renouncing: runtime_types::pallet_elections_phragmen::Renouncing, - }, - #[codec(index = 4)] - remove_member { - who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - slash_bond: ::core::primitive::bool, - rerun_election: ::core::primitive::bool, - }, - #[codec(index = 5)] - clean_defunct_voters { - num_voters: ::core::primitive::u32, - num_defunct: ::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 Error { - #[codec(index = 0)] - UnableToVote, - #[codec(index = 1)] - NoVotes, - #[codec(index = 2)] - TooManyVotes, - #[codec(index = 3)] - MaximumVotesExceeded, - #[codec(index = 4)] - LowBalance, - #[codec(index = 5)] - UnableToPayBond, - #[codec(index = 6)] - MustBeVoter, - #[codec(index = 7)] - DuplicatedCandidate, - #[codec(index = 8)] - TooManyCandidates, - #[codec(index = 9)] - MemberSubmit, - #[codec(index = 10)] - RunnerUpSubmit, - #[codec(index = 11)] - InsufficientCandidateFunds, - #[codec(index = 12)] - NotMember, - #[codec(index = 13)] - InvalidWitnessData, - #[codec(index = 14)] - InvalidVoteCount, - #[codec(index = 15)] - InvalidRenouncing, - #[codec(index = 16)] - InvalidReplacement, - } - #[derive( - :: subxt :: 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 Event { - #[codec(index = 0)] - NewTerm { - new_members: - ::std::vec::Vec<(::subxt::utils::AccountId32, ::core::primitive::u128)>, - }, - #[codec(index = 1)] - EmptyTerm, - #[codec(index = 2)] - ElectionError, - #[codec(index = 3)] - MemberKicked { member: ::subxt::utils::AccountId32 }, - #[codec(index = 4)] - Renounced { candidate: ::subxt::utils::AccountId32 }, - #[codec(index = 5)] - CandidateSlashed { - candidate: ::subxt::utils::AccountId32, - amount: ::core::primitive::u128, - }, - #[codec(index = 6)] - SeatHolderSlashed { - seat_holder: ::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 enum Renouncing { - #[codec(index = 0)] - Member, - #[codec(index = 1)] - RunnerUp, - #[codec(index = 2)] - Candidate(#[codec(compact)] ::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 SeatHolder<_0, _1> { - pub who: _0, - pub stake: _1, - pub deposit: _1, - } - #[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 Voter<_0, _1> { - pub votes: ::std::vec::Vec<_0>, - pub stake: _1, - pub deposit: _1, - } - } pub mod pallet_fast_unstake { use super::runtime_types; pub mod pallet { @@ -35257,11 +32421,11 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct UnstakeRequest { - pub stashes: runtime_types::sp_core::bounded::bounded_vec::BoundedVec<( + pub stashes: runtime_types::bounded_collections::bounded_vec::BoundedVec<( ::subxt::utils::AccountId32, ::core::primitive::u128, )>, - pub checked: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + pub checked: runtime_types::bounded_collections::bounded_vec::BoundedVec< ::core::primitive::u32, >, } @@ -35284,7 +32448,7 @@ pub mod api { #[codec(index = 0)] 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, >, @@ -35294,7 +32458,7 @@ pub mod api { #[codec(index = 1)] 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, >, @@ -35345,7 +32509,7 @@ pub mod api { #[codec(index = 0)] NewAuthorities { authority_set: ::std::vec::Vec<( - runtime_types::sp_finality_grandpa::app::Public, + runtime_types::sp_consensus_grandpa::app::Public, ::core::primitive::u64, )>, }, @@ -35368,8 +32532,8 @@ pub mod api { pub scheduled_at: _0, pub delay: _0, pub next_authorities: - runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec<( - runtime_types::sp_finality_grandpa::app::Public, + runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec<( + runtime_types::sp_consensus_grandpa::app::Public, ::core::primitive::u64, )>, pub forced: ::core::option::Option<_0>, @@ -35733,7 +32897,7 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct IdentityInfo { - pub additional: runtime_types::sp_core::bounded::bounded_vec::BoundedVec<( + pub additional: runtime_types::bounded_collections::bounded_vec::BoundedVec<( runtime_types::pallet_identity::types::Data, runtime_types::pallet_identity::types::Data, )>, @@ -35797,7 +32961,7 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Registration<_0> { - pub judgements: runtime_types::sp_core::bounded::bounded_vec::BoundedVec<( + pub judgements: runtime_types::bounded_collections::bounded_vec::BoundedVec<( ::core::primitive::u32, runtime_types::pallet_identity::types::Judgement<_0>, )>, @@ -35906,12 +33070,12 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct BoundedOpaqueNetworkState { - pub peer_id: runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec< + pub peer_id: runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec< ::core::primitive::u8, >, pub external_addresses: - runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec< - runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec< + runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec< + runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec< ::core::primitive::u8, >, >, @@ -36008,86 +33172,6 @@ pub mod api { } } } - pub mod pallet_membership { - 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")] - pub enum Call { - #[codec(index = 0)] - add_member { - who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - }, - #[codec(index = 1)] - remove_member { - who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - }, - #[codec(index = 2)] - swap_member { - remove: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - add: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - }, - #[codec(index = 3)] - reset_members { members: ::std::vec::Vec<::subxt::utils::AccountId32> }, - #[codec(index = 4)] - change_key { - new: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - }, - #[codec(index = 5)] - set_prime { who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()> }, - #[codec(index = 6)] - clear_prime, - } - #[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 Error { - #[codec(index = 0)] - AlreadyMember, - #[codec(index = 1)] - NotMember, - #[codec(index = 2)] - TooManyMembers, - } - #[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 Event { - #[codec(index = 0)] - MemberAdded, - #[codec(index = 1)] - MemberRemoved, - #[codec(index = 2)] - MembersSwapped, - #[codec(index = 3)] - MembersReset, - #[codec(index = 4)] - KeyChanged, - #[codec(index = 5)] - Dummy, - } - } - } pub mod pallet_multisig { use super::runtime_types; pub mod pallet { @@ -36232,7 +33316,7 @@ pub mod api { pub when: runtime_types::pallet_multisig::Timepoint<_0>, pub deposit: _1, pub depositor: _2, - pub approvals: runtime_types::sp_core::bounded::bounded_vec::BoundedVec<_2>, + pub approvals: runtime_types::bounded_collections::bounded_vec::BoundedVec<_2>, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -36416,6 +33500,19 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum HoldReason { + #[codec(index = 0)] + NftReceipt, + } + #[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 ReceiptRecord<_0, _1, _2> { pub proportion: runtime_types::sp_arithmetic::per_things::Perquintill, pub owner: ::core::option::Option<(_0, _2)>, @@ -36491,8 +33588,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)] create_with_pool_id { @@ -36500,8 +33596,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)] @@ -36536,6 +33631,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)] update_roles { @@ -36546,12 +33644,47 @@ 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, >, }, #[codec(index = 13)] chill { pool_id: ::core::primitive::u32 }, + #[codec(index = 14)] + bond_extra_other { + member: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + extra: runtime_types::pallet_nomination_pools::BondExtra< + ::core::primitive::u128, + >, + }, + #[codec(index = 15)] + set_claim_permission { + permission: runtime_types::pallet_nomination_pools::ClaimPermission, + }, + #[codec(index = 16)] + claim_payout_other { other: ::subxt::utils::AccountId32 }, + #[codec(index = 17)] + 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)] + set_commission_max { + pool_id: ::core::primitive::u32, + max_commission: runtime_types::sp_arithmetic::per_things::Perbill, + }, + #[codec(index = 19)] + set_commission_change_rate { + pool_id: ::core::primitive::u32, + change_rate: runtime_types::pallet_nomination_pools::CommissionChangeRate< + ::core::primitive::u32, + >, + }, + #[codec(index = 20)] + claim_commission { pool_id: ::core::primitive::u32 }, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -36627,9 +33760,23 @@ pub mod api { #[codec(index = 20)] PartialUnbondNotAllowedPermissionlessly, #[codec(index = 21)] - PoolIdInUse, + MaxCommissionRestricted, #[codec(index = 22)] + CommissionExceedsMaximum, + #[codec(index = 23)] + CommissionChangeThrottled, + #[codec(index = 24)] + CommissionChangeRateNotAllowed, + #[codec(index = 25)] + NoPendingCommission, + #[codec(index = 26)] + NoCommissionCurrentSet, + #[codec(index = 27)] + PoolIdInUse, + #[codec(index = 28)] InvalidPoolId, + #[codec(index = 29)] + BondExtraRestricted, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -36689,7 +33836,7 @@ pub mod api { #[codec(index = 8)] 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)] @@ -36703,6 +33850,31 @@ pub mod api { era: ::core::primitive::u32, balance: ::core::primitive::u128, }, + #[codec(index = 11)] + PoolCommissionUpdated { + pool_id: ::core::primitive::u32, + current: ::core::option::Option<( + runtime_types::sp_arithmetic::per_things::Perbill, + ::subxt::utils::AccountId32, + )>, + }, + #[codec(index = 12)] + PoolMaxCommissionUpdated { + pool_id: ::core::primitive::u32, + max_commission: runtime_types::sp_arithmetic::per_things::Perbill, + }, + #[codec(index = 13)] + PoolCommissionChangeRateUpdated { + pool_id: ::core::primitive::u32, + change_rate: runtime_types::pallet_nomination_pools::CommissionChangeRate< + ::core::primitive::u32, + >, + }, + #[codec(index = 14)] + PoolCommissionClaimed { + pool_id: ::core::primitive::u32, + commission: ::core::primitive::u128, + }, } } #[derive( @@ -36730,11 +33902,66 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct BondedPoolInner { - pub points: ::core::primitive::u128, - pub state: runtime_types::pallet_nomination_pools::PoolState, + pub commission: runtime_types::pallet_nomination_pools::Commission, pub member_counter: ::core::primitive::u32, + pub points: ::core::primitive::u128, pub roles: runtime_types::pallet_nomination_pools::PoolRoles<::subxt::utils::AccountId32>, + pub state: runtime_types::pallet_nomination_pools::PoolState, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum ClaimPermission { + #[codec(index = 0)] + Permissioned, + #[codec(index = 1)] + PermissionlessCompound, + #[codec(index = 2)] + PermissionlessWithdraw, + #[codec(index = 3)] + PermissionlessAll, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[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, + )] + #[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, @@ -36768,7 +33995,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, >, @@ -36786,7 +34013,7 @@ pub mod api { pub depositor: _0, pub root: ::core::option::Option<_0>, pub nominator: ::core::option::Option<_0>, - pub state_toggler: ::core::option::Option<_0>, + pub bouncer: ::core::option::Option<_0>, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -36819,6 +34046,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, @@ -36831,10 +34060,11 @@ pub mod api { #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SubPools { pub no_era: runtime_types::pallet_nomination_pools::UnbondPool, - pub with_era: runtime_types::sp_core::bounded::bounded_btree_map::BoundedBTreeMap< - ::core::primitive::u32, - runtime_types::pallet_nomination_pools::UnbondPool, - >, + pub with_era: + runtime_types::bounded_collections::bounded_btree_map::BoundedBTreeMap< + ::core::primitive::u32, + runtime_types::pallet_nomination_pools::UnbondPool, + >, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -37468,6 +34698,11 @@ pub mod api { one_fewer_deciding { track: ::core::primitive::u16 }, #[codec(index = 7)] refund_submission_deposit { index: ::core::primitive::u32 }, + #[codec(index = 8)] + set_metadata { + index: ::core::primitive::u32, + maybe_hash: ::core::option::Option<::subxt::utils::H256>, + }, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -37503,6 +34738,8 @@ pub mod api { NoDeposit, #[codec(index = 11)] BadStatus, + #[codec(index = 12)] + PreimageNotExist, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -37585,6 +34822,10 @@ pub mod api { who: ::subxt::utils::AccountId32, amount: ::core::primitive::u128, }, + #[codec(index = 14)] + MetadataSet { index: ::core::primitive::u32, hash: ::subxt::utils::H256 }, + #[codec(index = 15)] + MetadataCleared { index: ::core::primitive::u32, hash: ::subxt::utils::H256 }, } } pub mod types { @@ -38121,6 +35362,8 @@ pub mod api { Unfounded { founder: ::subxt::utils::AccountId32 }, #[codec(index = 15)] Deposit { value: ::core::primitive::u128 }, + #[codec(index = 16)] + SkepticsChosen { skeptics: ::std::vec::Vec<::subxt::utils::AccountId32> }, } } #[derive( @@ -38621,7 +35864,7 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Nominations { - pub targets: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + pub targets: runtime_types::bounded_collections::bounded_vec::BoundedVec< ::subxt::utils::AccountId32, >, pub submitted_in: ::core::primitive::u32, @@ -38663,10 +35906,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, >, } @@ -38738,117 +35981,6 @@ pub mod api { } } } - pub mod pallet_tips { - 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")] - pub enum Call { - #[codec(index = 0)] - report_awesome { - reason: ::std::vec::Vec<::core::primitive::u8>, - who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - }, - #[codec(index = 1)] - retract_tip { hash: ::subxt::utils::H256 }, - #[codec(index = 2)] - tip_new { - reason: ::std::vec::Vec<::core::primitive::u8>, - who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - #[codec(compact)] - tip_value: ::core::primitive::u128, - }, - #[codec(index = 3)] - tip { - hash: ::subxt::utils::H256, - #[codec(compact)] - tip_value: ::core::primitive::u128, - }, - #[codec(index = 4)] - close_tip { hash: ::subxt::utils::H256 }, - #[codec(index = 5)] - slash_tip { 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 enum Error { - #[codec(index = 0)] - ReasonTooBig, - #[codec(index = 1)] - AlreadyKnown, - #[codec(index = 2)] - UnknownTip, - #[codec(index = 3)] - NotFinder, - #[codec(index = 4)] - StillOpen, - #[codec(index = 5)] - Premature, - } - #[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 Event { - #[codec(index = 0)] - NewTip { tip_hash: ::subxt::utils::H256 }, - #[codec(index = 1)] - TipClosing { tip_hash: ::subxt::utils::H256 }, - #[codec(index = 2)] - TipClosed { - tip_hash: ::subxt::utils::H256, - who: ::subxt::utils::AccountId32, - payout: ::core::primitive::u128, - }, - #[codec(index = 3)] - TipRetracted { tip_hash: ::subxt::utils::H256 }, - #[codec(index = 4)] - TipSlashed { - tip_hash: ::subxt::utils::H256, - finder: ::subxt::utils::AccountId32, - deposit: ::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 OpenTip<_0, _1, _2, _3> { - pub reason: _3, - pub who: _0, - pub finder: _0, - pub deposit: _1, - pub closes: ::core::option::Option<_2>, - pub tips: ::std::vec::Vec<(_0, _1)>, - pub finders_fee: ::core::primitive::bool, - } - } pub mod pallet_transaction_payment { use super::runtime_types; pub mod pallet { @@ -39367,6 +36499,8 @@ pub mod api { fee_asset_item: ::core::primitive::u32, weight_limit: runtime_types::xcm::v3::WeightLimit, }, + #[codec(index = 10)] + force_suspension { suspended: ::core::primitive::bool }, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -39744,7 +36878,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; @@ -39782,6 +36916,54 @@ pub mod api { #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Signature(pub runtime_types::sp_core::sr25519::Signature); } + pub mod executor_params { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[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, + )] + #[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( @@ -39795,9 +36977,9 @@ pub mod api { #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct UncheckedSigned<_0, _1> { pub payload: _0, - pub validator_index: runtime_types::polkadot_primitives::v2::ValidatorIndex, + pub validator_index: runtime_types::polkadot_primitives::v4::ValidatorIndex, pub signature: - runtime_types::polkadot_primitives::v2::validator_app::Signature, + runtime_types::polkadot_primitives::v4::validator_app::Signature, #[codec(skip)] pub __subxt_unused_type_params: ::core::marker::PhantomData<_1>, } @@ -39851,9 +37033,9 @@ pub mod api { #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct BackedCandidate<_0> { pub candidate: - runtime_types::polkadot_primitives::v2::CommittedCandidateReceipt<_0>, + runtime_types::polkadot_primitives::v4::CommittedCandidateReceipt<_0>, pub validity_votes: ::std::vec::Vec< - runtime_types::polkadot_primitives::v2::ValidityAttestation, + runtime_types::polkadot_primitives::v4::ValidityAttestation, >, pub validator_indices: ::subxt::utils::bits::DecodedBits< ::core::primitive::u8, @@ -39870,12 +37052,16 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct CandidateCommitments<_0> { - pub upward_messages: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, - pub horizontal_messages: ::std::vec::Vec< - runtime_types::polkadot_core_primitives::OutboundHrmpMessage< - runtime_types::polkadot_parachain::primitives::Id, + pub upward_messages: + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::std::vec::Vec<::core::primitive::u8>, + >, + pub horizontal_messages: + runtime_types::bounded_collections::bounded_vec::BoundedVec< + runtime_types::polkadot_core_primitives::OutboundHrmpMessage< + runtime_types::polkadot_parachain::primitives::Id, + >, >, - >, pub new_validation_code: ::core::option::Option< runtime_types::polkadot_parachain::primitives::ValidationCode, >, @@ -39895,11 +37081,11 @@ pub mod api { pub struct CandidateDescriptor<_0> { pub para_id: runtime_types::polkadot_parachain::primitives::Id, pub relay_parent: _0, - pub collator: runtime_types::polkadot_primitives::v2::collator_app::Public, + pub collator: runtime_types::polkadot_primitives::v4::collator_app::Public, pub persisted_validation_data_hash: _0, pub pov_hash: _0, pub erasure_root: _0, - pub signature: runtime_types::polkadot_primitives::v2::collator_app::Signature, + pub signature: runtime_types::polkadot_primitives::v4::collator_app::Signature, pub para_head: _0, pub validation_code_hash: runtime_types::polkadot_parachain::primitives::ValidationCodeHash, @@ -39914,7 +37100,7 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct CandidateReceipt<_0> { - pub descriptor: runtime_types::polkadot_primitives::v2::CandidateDescriptor<_0>, + pub descriptor: runtime_types::polkadot_primitives::v4::CandidateDescriptor<_0>, pub commitments_hash: _0, } #[derive( @@ -39927,8 +37113,8 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct CommittedCandidateReceipt<_0> { - pub descriptor: runtime_types::polkadot_primitives::v2::CandidateDescriptor<_0>, - pub commitments: runtime_types::polkadot_primitives::v2::CandidateCommitments< + pub descriptor: runtime_types::polkadot_primitives::v4::CandidateDescriptor<_0>, + pub commitments: runtime_types::polkadot_primitives::v4::CandidateCommitments< ::core::primitive::u32, >, } @@ -39954,7 +37140,7 @@ pub mod api { #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum CoreOccupied { #[codec(index = 0)] - Parathread(runtime_types::polkadot_primitives::v2::ParathreadEntry), + Parathread(runtime_types::polkadot_primitives::v4::ParathreadEntry), #[codec(index = 1)] Parachain, } @@ -39990,9 +37176,9 @@ pub mod api { #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum DisputeStatement { #[codec(index = 0)] - Valid(runtime_types::polkadot_primitives::v2::ValidDisputeStatementKind), + Valid(runtime_types::polkadot_primitives::v4::ValidDisputeStatementKind), #[codec(index = 1)] - Invalid(runtime_types::polkadot_primitives::v2::InvalidDisputeStatementKind), + Invalid(runtime_types::polkadot_primitives::v4::InvalidDisputeStatementKind), } #[derive( :: subxt :: ext :: codec :: Decode, @@ -40007,9 +37193,9 @@ pub mod api { pub candidate_hash: runtime_types::polkadot_core_primitives::CandidateHash, pub session: ::core::primitive::u32, pub statements: ::std::vec::Vec<( - runtime_types::polkadot_primitives::v2::DisputeStatement, - runtime_types::polkadot_primitives::v2::ValidatorIndex, - runtime_types::polkadot_primitives::v2::validator_app::Signature, + runtime_types::polkadot_primitives::v4::DisputeStatement, + runtime_types::polkadot_primitives::v4::ValidatorIndex, + runtime_types::polkadot_primitives::v4::validator_app::Signature, )>, } #[derive( @@ -40047,18 +37233,18 @@ pub mod api { #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct InherentData<_0> { pub bitfields: ::std::vec::Vec< - runtime_types::polkadot_primitives::v2::signed::UncheckedSigned< - runtime_types::polkadot_primitives::v2::AvailabilityBitfield, - runtime_types::polkadot_primitives::v2::AvailabilityBitfield, + runtime_types::polkadot_primitives::v4::signed::UncheckedSigned< + runtime_types::polkadot_primitives::v4::AvailabilityBitfield, + runtime_types::polkadot_primitives::v4::AvailabilityBitfield, >, >, pub backed_candidates: ::std::vec::Vec< - runtime_types::polkadot_primitives::v2::BackedCandidate< + runtime_types::polkadot_primitives::v4::BackedCandidate< ::subxt::utils::H256, >, >, pub disputes: ::std::vec::Vec< - runtime_types::polkadot_primitives::v2::DisputeStatementSet, + runtime_types::polkadot_primitives::v4::DisputeStatementSet, >, pub parent_header: _0, } @@ -40086,7 +37272,7 @@ pub mod api { #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ParathreadClaim( pub runtime_types::polkadot_parachain::primitives::Id, - pub runtime_types::polkadot_primitives::v2::collator_app::Public, + pub runtime_types::polkadot_primitives::v4::collator_app::Public, ); #[derive( :: subxt :: ext :: codec :: Decode, @@ -40098,7 +37284,7 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ParathreadEntry { - pub claim: runtime_types::polkadot_primitives::v2::ParathreadClaim, + pub claim: runtime_types::polkadot_primitives::v4::ParathreadClaim, pub retries: ::core::primitive::u32, } #[derive( @@ -40114,7 +37300,37 @@ pub mod api { pub accept: ::core::primitive::bool, pub subject: runtime_types::polkadot_parachain::primitives::ValidationCodeHash, pub session_index: ::core::primitive::u32, - pub validator_index: runtime_types::polkadot_primitives::v2::ValidatorIndex, + pub validator_index: runtime_types::polkadot_primitives::v4::ValidatorIndex, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum PvfExecTimeoutKind { + #[codec(index = 0)] + Backing, + #[codec(index = 1)] + Approval, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[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, @@ -40128,14 +37344,14 @@ pub mod api { pub struct ScrapedOnChainVotes<_0> { pub session: ::core::primitive::u32, pub backing_validators_per_candidate: ::std::vec::Vec<( - runtime_types::polkadot_primitives::v2::CandidateReceipt<_0>, + runtime_types::polkadot_primitives::v4::CandidateReceipt<_0>, ::std::vec::Vec<( - runtime_types::polkadot_primitives::v2::ValidatorIndex, - runtime_types::polkadot_primitives::v2::ValidityAttestation, + runtime_types::polkadot_primitives::v4::ValidatorIndex, + runtime_types::polkadot_primitives::v4::ValidityAttestation, )>, )>, pub disputes: ::std::vec::Vec< - runtime_types::polkadot_primitives::v2::DisputeStatementSet, + runtime_types::polkadot_primitives::v4::DisputeStatementSet, >, } #[derive( @@ -40149,21 +37365,21 @@ pub mod api { #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SessionInfo { pub active_validator_indices: - ::std::vec::Vec, + ::std::vec::Vec, pub random_seed: [::core::primitive::u8; 32usize], pub dispute_period: ::core::primitive::u32, - pub validators: runtime_types::polkadot_primitives::v2::IndexedVec< - runtime_types::polkadot_primitives::v2::ValidatorIndex, - runtime_types::polkadot_primitives::v2::validator_app::Public, + pub validators: runtime_types::polkadot_primitives::v4::IndexedVec< + runtime_types::polkadot_primitives::v4::ValidatorIndex, + runtime_types::polkadot_primitives::v4::validator_app::Public, >, pub discovery_keys: ::std::vec::Vec, pub assignment_keys: ::std::vec::Vec< - runtime_types::polkadot_primitives::v2::assignment_app::Public, + runtime_types::polkadot_primitives::v4::assignment_app::Public, >, - pub validator_groups: runtime_types::polkadot_primitives::v2::IndexedVec< - runtime_types::polkadot_primitives::v2::GroupIndex, - ::std::vec::Vec, + pub validator_groups: runtime_types::polkadot_primitives::v4::IndexedVec< + runtime_types::polkadot_primitives::v4::GroupIndex, + ::std::vec::Vec, >, pub n_cores: ::core::primitive::u32, pub zeroth_delay_tranche_width: ::core::primitive::u32, @@ -40241,9 +37457,25 @@ pub mod api { #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum ValidityAttestation { #[codec(index = 1)] - Implicit(runtime_types::polkadot_primitives::v2::validator_app::Signature), + Implicit(runtime_types::polkadot_primitives::v4::validator_app::Signature), #[codec(index = 2)] - Explicit(runtime_types::polkadot_primitives::v2::validator_app::Signature), + Explicit(runtime_types::polkadot_primitives::v4::validator_app::Signature), + } + } + pub mod vstaging { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[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, } } } @@ -40941,103 +38173,7 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum Call { - #[codec(index = 0)] - set_validation_upgrade_cooldown { new: ::core::primitive::u32 }, - #[codec(index = 1)] - set_validation_upgrade_delay { new: ::core::primitive::u32 }, - #[codec(index = 2)] - set_code_retention_period { new: ::core::primitive::u32 }, - #[codec(index = 3)] - set_max_code_size { new: ::core::primitive::u32 }, - #[codec(index = 4)] - set_max_pov_size { new: ::core::primitive::u32 }, - #[codec(index = 5)] - set_max_head_data_size { new: ::core::primitive::u32 }, - #[codec(index = 6)] - set_parathread_cores { new: ::core::primitive::u32 }, - #[codec(index = 7)] - set_parathread_retries { new: ::core::primitive::u32 }, - #[codec(index = 8)] - set_group_rotation_frequency { new: ::core::primitive::u32 }, - #[codec(index = 9)] - set_chain_availability_period { new: ::core::primitive::u32 }, - #[codec(index = 10)] - set_thread_availability_period { new: ::core::primitive::u32 }, - #[codec(index = 11)] - set_scheduling_lookahead { new: ::core::primitive::u32 }, - #[codec(index = 12)] - set_max_validators_per_core { - new: ::core::option::Option<::core::primitive::u32>, - }, - #[codec(index = 13)] - set_max_validators { new: ::core::option::Option<::core::primitive::u32> }, - #[codec(index = 14)] - set_dispute_period { new: ::core::primitive::u32 }, - #[codec(index = 15)] - set_dispute_post_conclusion_acceptance_period { - new: ::core::primitive::u32, - }, - #[codec(index = 17)] - set_dispute_conclusion_by_time_out_period { new: ::core::primitive::u32 }, - #[codec(index = 18)] - set_no_show_slots { new: ::core::primitive::u32 }, - #[codec(index = 19)] - set_n_delay_tranches { new: ::core::primitive::u32 }, - #[codec(index = 20)] - set_zeroth_delay_tranche_width { new: ::core::primitive::u32 }, - #[codec(index = 21)] - set_needed_approvals { new: ::core::primitive::u32 }, - #[codec(index = 22)] - set_relay_vrf_modulo_samples { new: ::core::primitive::u32 }, - #[codec(index = 23)] - set_max_upward_queue_count { new: ::core::primitive::u32 }, - #[codec(index = 24)] - set_max_upward_queue_size { new: ::core::primitive::u32 }, - #[codec(index = 25)] - set_max_downward_message_size { new: ::core::primitive::u32 }, - #[codec(index = 26)] - set_ump_service_total_weight { - new: runtime_types::sp_weights::weight_v2::Weight, - }, - #[codec(index = 27)] - set_max_upward_message_size { new: ::core::primitive::u32 }, - #[codec(index = 28)] - set_max_upward_message_num_per_candidate { new: ::core::primitive::u32 }, - #[codec(index = 29)] - set_hrmp_open_request_ttl { new: ::core::primitive::u32 }, - #[codec(index = 30)] - set_hrmp_sender_deposit { new: ::core::primitive::u128 }, - #[codec(index = 31)] - set_hrmp_recipient_deposit { new: ::core::primitive::u128 }, - #[codec(index = 32)] - set_hrmp_channel_max_capacity { new: ::core::primitive::u32 }, - #[codec(index = 33)] - set_hrmp_channel_max_total_size { new: ::core::primitive::u32 }, - #[codec(index = 34)] - set_hrmp_max_parachain_inbound_channels { new: ::core::primitive::u32 }, - #[codec(index = 35)] - set_hrmp_max_parathread_inbound_channels { new: ::core::primitive::u32 }, - #[codec(index = 36)] - set_hrmp_channel_max_message_size { new: ::core::primitive::u32 }, - #[codec(index = 37)] - set_hrmp_max_parachain_outbound_channels { new: ::core::primitive::u32 }, - #[codec(index = 38)] - set_hrmp_max_parathread_outbound_channels { new: ::core::primitive::u32 }, - #[codec(index = 39)] - set_hrmp_max_message_num_per_candidate { new: ::core::primitive::u32 }, - #[codec(index = 40)] - set_ump_max_individual_weight { - new: runtime_types::sp_weights::weight_v2::Weight, - }, - #[codec(index = 41)] - set_pvf_checking_enabled { new: ::core::primitive::bool }, - #[codec(index = 42)] - set_pvf_voting_ttl { new: ::core::primitive::u32 }, - #[codec(index = 43)] - set_minimum_validation_upgrade_delay { new: ::core::primitive::u32 }, - #[codec(index = 44)] - set_bypass_consistency_check { new: ::core::primitive::bool }, - } + # [codec (index = 0)] set_validation_upgrade_cooldown { new : :: core :: primitive :: u32 , } , # [codec (index = 1)] set_validation_upgrade_delay { new : :: core :: primitive :: u32 , } , # [codec (index = 2)] set_code_retention_period { new : :: core :: primitive :: u32 , } , # [codec (index = 3)] set_max_code_size { new : :: core :: primitive :: u32 , } , # [codec (index = 4)] set_max_pov_size { new : :: core :: primitive :: u32 , } , # [codec (index = 5)] set_max_head_data_size { new : :: core :: primitive :: u32 , } , # [codec (index = 6)] set_parathread_cores { new : :: core :: primitive :: u32 , } , # [codec (index = 7)] set_parathread_retries { new : :: core :: primitive :: u32 , } , # [codec (index = 8)] set_group_rotation_frequency { new : :: core :: primitive :: u32 , } , # [codec (index = 9)] set_chain_availability_period { new : :: core :: primitive :: u32 , } , # [codec (index = 10)] set_thread_availability_period { new : :: core :: primitive :: u32 , } , # [codec (index = 11)] set_scheduling_lookahead { new : :: core :: primitive :: u32 , } , # [codec (index = 12)] set_max_validators_per_core { new : :: core :: option :: Option < :: core :: primitive :: u32 > , } , # [codec (index = 13)] set_max_validators { new : :: core :: option :: Option < :: core :: primitive :: u32 > , } , # [codec (index = 14)] set_dispute_period { new : :: core :: primitive :: u32 , } , # [codec (index = 15)] set_dispute_post_conclusion_acceptance_period { new : :: core :: primitive :: u32 , } , # [codec (index = 18)] set_no_show_slots { new : :: core :: primitive :: u32 , } , # [codec (index = 19)] set_n_delay_tranches { new : :: core :: primitive :: u32 , } , # [codec (index = 20)] set_zeroth_delay_tranche_width { new : :: core :: primitive :: u32 , } , # [codec (index = 21)] set_needed_approvals { new : :: core :: primitive :: u32 , } , # [codec (index = 22)] set_relay_vrf_modulo_samples { new : :: core :: primitive :: u32 , } , # [codec (index = 23)] set_max_upward_queue_count { new : :: core :: primitive :: u32 , } , # [codec (index = 24)] set_max_upward_queue_size { new : :: core :: primitive :: u32 , } , # [codec (index = 25)] set_max_downward_message_size { new : :: core :: primitive :: u32 , } , # [codec (index = 26)] set_ump_service_total_weight { new : runtime_types :: sp_weights :: weight_v2 :: Weight , } , # [codec (index = 27)] set_max_upward_message_size { new : :: core :: primitive :: u32 , } , # [codec (index = 28)] set_max_upward_message_num_per_candidate { new : :: core :: primitive :: u32 , } , # [codec (index = 29)] set_hrmp_open_request_ttl { new : :: core :: primitive :: u32 , } , # [codec (index = 30)] set_hrmp_sender_deposit { new : :: core :: primitive :: u128 , } , # [codec (index = 31)] set_hrmp_recipient_deposit { new : :: core :: primitive :: u128 , } , # [codec (index = 32)] set_hrmp_channel_max_capacity { new : :: core :: primitive :: u32 , } , # [codec (index = 33)] set_hrmp_channel_max_total_size { new : :: core :: primitive :: u32 , } , # [codec (index = 34)] set_hrmp_max_parachain_inbound_channels { new : :: core :: primitive :: u32 , } , # [codec (index = 35)] set_hrmp_max_parathread_inbound_channels { new : :: core :: primitive :: u32 , } , # [codec (index = 36)] set_hrmp_channel_max_message_size { new : :: core :: primitive :: u32 , } , # [codec (index = 37)] set_hrmp_max_parachain_outbound_channels { new : :: core :: primitive :: u32 , } , # [codec (index = 38)] set_hrmp_max_parathread_outbound_channels { new : :: core :: primitive :: u32 , } , # [codec (index = 39)] set_hrmp_max_message_num_per_candidate { new : :: core :: primitive :: u32 , } , # [codec (index = 40)] set_ump_max_individual_weight { new : runtime_types :: sp_weights :: weight_v2 :: Weight , } , # [codec (index = 41)] set_pvf_checking_enabled { new : :: core :: primitive :: bool , } , # [codec (index = 42)] set_pvf_voting_ttl { new : :: core :: primitive :: u32 , } , # [codec (index = 43)] set_minimum_validation_upgrade_delay { new : :: core :: primitive :: u32 , } , # [codec (index = 44)] set_bypass_consistency_check { new : :: core :: primitive :: bool , } , # [codec (index = 45)] set_async_backing_params { new : runtime_types :: polkadot_primitives :: vstaging :: AsyncBackingParams , } , # [codec (index = 46)] set_executor_params { new : runtime_types :: polkadot_primitives :: v4 :: executor_params :: ExecutorParams , } , } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -41071,6 +38207,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, @@ -41083,6 +38221,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, @@ -41094,7 +38234,6 @@ pub mod api { pub max_validators: ::core::option::Option<_0>, pub dispute_period: _0, pub dispute_post_conclusion_acceptance_period: _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, @@ -41173,11 +38312,97 @@ pub mod api { runtime_types::polkadot_runtime_parachains::disputes::DisputeResult, ), #[codec(index = 2)] - DisputeTimedOut(runtime_types::polkadot_core_primitives::CandidateHash), - #[codec(index = 3)] Revert(::core::primitive::u32), } } + pub mod slashing { + 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")] + pub enum Call { + # [codec (index = 0)] report_dispute_lost_unsigned { dispute_proof : :: std :: boxed :: Box < runtime_types :: polkadot_runtime_parachains :: disputes :: slashing :: DisputeProof > , 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, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum Error { + #[codec(index = 0)] + InvalidKeyOwnershipProof, + #[codec(index = 1)] + InvalidSessionIndex, + #[codec(index = 2)] + InvalidCandidateHash, + #[codec(index = 3)] + InvalidValidatorIndex, + #[codec(index = 4)] + ValidatorIndexIdMismatch, + #[codec(index = 5)] + DuplicateSlashingReport, + } + } + #[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 DisputeProof { pub time_slot : runtime_types :: polkadot_runtime_parachains :: disputes :: slashing :: DisputesTimeSlot , pub kind : runtime_types :: polkadot_runtime_parachains :: disputes :: slashing :: SlashingOffenceKind , pub validator_index : runtime_types :: polkadot_primitives :: v4 :: ValidatorIndex , pub validator_id : runtime_types :: polkadot_primitives :: v4 :: validator_app :: 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 DisputesTimeSlot { + pub session_index: ::core::primitive::u32, + pub candidate_hash: runtime_types::polkadot_core_primitives::CandidateHash, + } + #[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 PendingSlashes { pub keys : :: subxt :: utils :: KeyedVec < runtime_types :: polkadot_primitives :: v4 :: ValidatorIndex , runtime_types :: polkadot_primitives :: v4 :: validator_app :: Public > , pub kind : runtime_types :: polkadot_runtime_parachains :: disputes :: slashing :: SlashingOffenceKind , } + #[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 SlashingOffenceKind { + #[codec(index = 0)] + ForInvalid, + #[codec(index = 1)] + AgainstValid, + } + } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -41209,22 +38434,6 @@ pub mod api { Invalid, } } - pub mod dmp { - 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")] - pub enum Call {} - } - } pub mod hrmp { use super::runtime_types; pub mod pallet { @@ -41500,29 +38709,29 @@ pub mod api { pub enum Event { #[codec(index = 0)] 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)] 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)] 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, ), } } @@ -41536,7 +38745,7 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct AvailabilityBitfieldRecord<_0> { - pub bitfield: runtime_types::polkadot_primitives::v2::AvailabilityBitfield, + pub bitfield: runtime_types::polkadot_primitives::v4::AvailabilityBitfield, pub submitted_at: _0, } #[derive( @@ -41549,9 +38758,9 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct CandidatePendingAvailability<_0, _1> { - pub core: runtime_types::polkadot_primitives::v2::CoreIndex, + pub core: runtime_types::polkadot_primitives::v4::CoreIndex, pub hash: runtime_types::polkadot_core_primitives::CandidateHash, - pub descriptor: runtime_types::polkadot_primitives::v2::CandidateDescriptor<_0>, + pub descriptor: runtime_types::polkadot_primitives::v4::CandidateDescriptor<_0>, pub availability_votes: ::subxt::utils::bits::DecodedBits< ::core::primitive::u8, ::subxt::utils::bits::Lsb0, @@ -41562,7 +38771,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 { @@ -41594,10 +38803,10 @@ pub mod api { #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct BufferedSessionChange { pub validators: ::std::vec::Vec< - runtime_types::polkadot_primitives::v2::validator_app::Public, + runtime_types::polkadot_primitives::v4::validator_app::Public, >, pub queued: ::std::vec::Vec< - runtime_types::polkadot_primitives::v2::validator_app::Public, + runtime_types::polkadot_primitives::v4::validator_app::Public, >, pub session_index: ::core::primitive::u32, } @@ -41672,9 +38881,9 @@ pub mod api { }, #[codec(index = 7)] 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( @@ -41881,7 +39090,7 @@ pub mod api { pub enum Call { #[codec(index = 0)] 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, @@ -41930,7 +39139,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, ), } @@ -41944,10 +39153,10 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct CoreAssignment { - pub core: runtime_types::polkadot_primitives::v2::CoreIndex, + pub core: runtime_types::polkadot_primitives::v4::CoreIndex, pub para_id: runtime_types::polkadot_parachain::primitives::Id, pub kind: runtime_types::polkadot_runtime_parachains::scheduler::AssignmentKind, - pub group_idx: runtime_types::polkadot_primitives::v2::GroupIndex, + pub group_idx: runtime_types::polkadot_primitives::v4::GroupIndex, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -41974,7 +39183,7 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct QueuedParathread { - pub claim: runtime_types::polkadot_primitives::v2::ParathreadEntry, + pub claim: runtime_types::polkadot_primitives::v4::ParathreadEntry, pub core_offset: ::core::primitive::u32, } } @@ -42258,8 +39467,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, @@ -42286,8 +39494,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( @@ -42321,6 +39528,72 @@ pub mod api { pub allowed_slots: runtime_types::sp_consensus_babe::AllowedSlots, } } + pub mod sp_consensus_grandpa { + use super::runtime_types; + pub mod app { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[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, + )] + #[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, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct EquivocationProof<_0, _1> { + pub set_id: ::core::primitive::u64, + pub equivocation: runtime_types::sp_consensus_grandpa::Equivocation<_0, _1>, + } + } pub mod sp_consensus_slots { use super::runtime_types; #[derive( @@ -42352,48 +39625,6 @@ pub mod api { } pub mod sp_core { use super::runtime_types; - pub mod bounded { - use super::runtime_types; - pub mod bounded_btree_map { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[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( @@ -42482,6 +39713,22 @@ 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, + )] + #[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, @@ -42524,72 +39771,6 @@ pub mod api { #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum Void {} } - pub mod sp_finality_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, - )] - #[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, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Equivocation<_0, _1> { - #[codec(index = 0)] - Prevote( - runtime_types::finality_grandpa::Equivocation< - runtime_types::sp_finality_grandpa::app::Public, - runtime_types::finality_grandpa::Prevote<_0, _1>, - runtime_types::sp_finality_grandpa::app::Signature, - >, - ), - #[codec(index = 1)] - Precommit( - runtime_types::finality_grandpa::Equivocation< - runtime_types::sp_finality_grandpa::app::Public, - runtime_types::finality_grandpa::Precommit<_0, _1>, - runtime_types::sp_finality_grandpa::app::Signature, - >, - ), - } - #[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 EquivocationProof<_0, _1> { - pub set_id: ::core::primitive::u64, - pub equivocation: runtime_types::sp_finality_grandpa::Equivocation<_0, _1>, - } - } pub mod sp_npos_elections { use super::runtime_types; #[derive( @@ -43356,9 +40537,9 @@ pub mod api { #[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)] @@ -43369,6 +40550,10 @@ pub mod api { Frozen, #[codec(index = 6)] Unsupported, + #[codec(index = 7)] + CannotCreateHold, + #[codec(index = 8)] + NotExpendable, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -43465,17 +40650,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, @@ -43545,7 +40719,7 @@ pub mod api { GeneralIndex(#[codec(compact)] ::core::primitive::u128), #[codec(index = 6)] GeneralKey( - runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec< + runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec< ::core::primitive::u8, >, ), @@ -43856,7 +41030,7 @@ pub mod api { Unit, #[codec(index = 1)] Named( - runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec< + runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec< ::core::primitive::u8, >, ), @@ -44078,7 +41252,7 @@ pub mod api { Any, #[codec(index = 1)] Named( - runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec< + runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec< ::core::primitive::u8, >, ), @@ -44890,9 +42064,17 @@ pub mod api { #[codec(index = 0)] Success, #[codec(index = 1)] - Error(::std::vec::Vec<::core::primitive::u8>), + Error( + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + ), #[codec(index = 2)] - TruncatedError(::std::vec::Vec<::core::primitive::u8>), + TruncatedError( + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + ), } #[derive( :: subxt :: ext :: codec :: Decode, @@ -44906,8 +42088,12 @@ pub mod api { pub struct PalletInfo { #[codec(compact)] pub index: ::core::primitive::u32, - pub name: ::std::vec::Vec<::core::primitive::u8>, - pub module_name: ::std::vec::Vec<::core::primitive::u8>, + 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)] @@ -44954,7 +42140,11 @@ pub mod api { #[codec(index = 3)] Version(::core::primitive::u32), #[codec(index = 4)] - PalletsInfo(runtime_types::xcm::v3::VecPalletInfo), + PalletsInfo( + runtime_types::bounded_collections::bounded_vec::BoundedVec< + runtime_types::xcm::v3::PalletInfo, + >, + ), #[codec(index = 5)] DispatchResult(runtime_types::xcm::v3::MaybeErrorCode), } @@ -44967,16 +42157,6 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct VecPalletInfo(pub ::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 WeightLimit { #[codec(index = 0)] Unlimited,