From e1b854ea75e726428743be7c5f9d5a664cdc3d37 Mon Sep 17 00:00:00 2001 From: Veronika Romashkina Date: Fri, 8 Aug 2025 18:14:49 +0100 Subject: [PATCH 1/6] Implement wormhole generate address command --- Cargo.lock | 22 ++++++++++ Cargo.toml | 4 ++ src/cli/mod.rs | 6 +++ src/cli/wormhole.rs | 98 +++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 130 insertions(+) create mode 100644 src/cli/wormhole.rs diff --git a/Cargo.lock b/Cargo.lock index 325de0d..0742ff2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3264,6 +3264,8 @@ dependencies = [ "thiserror 2.0.12", "tokio", "toml 0.9.4", + "wormhole-circuit", + "zk-circuits-common", ] [[package]] @@ -5942,6 +5944,17 @@ dependencies = [ "bitflags 2.9.1", ] +[[package]] +name = "wormhole-circuit" +version = "0.1.0" +source = "git+https://github.com/Quantus-Network/zk-circuits#547cd0d2514aa2a849af85368b4f89f4132cdb97" +dependencies = [ + "anyhow", + "hex", + "plonky2", + "zk-circuits-common", +] + [[package]] name = "writeable" version = "0.6.1" @@ -6092,3 +6105,12 @@ dependencies = [ "quote", "syn 2.0.104", ] + +[[package]] +name = "zk-circuits-common" +version = "0.1.0" +source = "git+https://github.com/Quantus-Network/zk-circuits#547cd0d2514aa2a849af85368b4f89f4132cdb97" +dependencies = [ + "anyhow", + "plonky2", +] diff --git a/Cargo.toml b/Cargo.toml index 53b7097..a35a1db 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -47,6 +47,10 @@ poseidon-resonance = { git = "https://github.com/Quantus-Network/poseidon-resona ] } dilithium-crypto = { git = "https://github.com/Quantus-Network/chain", package = "dilithium-crypto" } +# Wormhole and zk-circuits +wormhole-circuit = { git = "https://github.com/Quantus-Network/zk-circuits", package = "wormhole-circuit" } +zk-circuits-common = { git = "https://github.com/Quantus-Network/zk-circuits", package = "zk-circuits-common" } + # Blockchain and RPC client codec = { package = "parity-scale-codec", version = "3.7", features = [ "derive", diff --git a/src/cli/mod.rs b/src/cli/mod.rs index e4caa47..b8368c9 100644 --- a/src/cli/mod.rs +++ b/src/cli/mod.rs @@ -15,6 +15,7 @@ pub mod storage; pub mod system; pub mod tech_collective; pub mod wallet; +pub mod wormhole; /// Main CLI commands #[derive(Subcommand, Debug)] @@ -66,6 +67,10 @@ pub enum Commands { #[command(subcommand)] TechCollective(tech_collective::TechCollectiveCommands), + /// Wormhole commands + #[command(subcommand)] + Wormhole(wormhole::WormholeCommands), + /// Runtime management commands (requires root/sudo permissions) #[command(subcommand)] Runtime(runtime::RuntimeCommands), @@ -211,6 +216,7 @@ pub async fn execute_command( storage::handle_storage_command(storage_cmd, node_url).await, Commands::TechCollective(tech_collective_cmd) => tech_collective::handle_tech_collective_command(tech_collective_cmd, node_url).await, + Commands::Wormhole(wormhole_cmd) => wormhole::handle_wormhole_command(wormhole_cmd).await, Commands::Runtime(runtime_cmd) => runtime::handle_runtime_command(runtime_cmd, node_url).await, Commands::Call { diff --git a/src/cli/wormhole.rs b/src/cli/wormhole.rs new file mode 100644 index 0000000..d51c0c6 --- /dev/null +++ b/src/cli/wormhole.rs @@ -0,0 +1,98 @@ +use crate::{error::Result, log_print, log_success}; +use clap::Subcommand; +use colored::Colorize; +use hex; +use rusty_crystals_hdwallet::wormhole::WormholePair; +use sp_core::crypto::{AccountId32, Ss58Codec}; + +use wormhole_circuit::unspendable_account::UnspendableAccount; +use zk_circuits_common::utils::felts_to_bytes; + +/// Wormhole commands +#[derive(Subcommand, Debug)] +pub enum WormholeCommands { + /// Generate a new wormhole address and secret + GenerateAddress, + + /// Spend funds from a wormhole address + Spend { + /// The hex-encoded secret key for the wormhole address + #[arg(long)] + secret: String, + + /// Recipient's on-chain address + #[arg(short, long)] + to: String, + + /// Amount to send (e.g., "10", "10.5", "0.0001") + #[arg(short, long)] + amount: String, + + /// Wallet name to sign the bridge transaction + #[arg(short, long)] + from: String, + + /// Password for the wallet + #[arg(short, long)] + password: Option, + + /// Read password from file + #[arg(long)] + password_file: Option, + }, +} + +/// Handle wormhole commands +pub async fn handle_wormhole_command(command: WormholeCommands) -> Result<()> { + match command { + WormholeCommands::GenerateAddress => { + log_print!("Generating new wormhole address..."); + + let wormhole_pair = WormholePair::generate_new().map_err(|e| { + crate::error::QuantusError::Generic(format!("Wormhole generation error: {:?}", e)) + })?; + + // The on-chain address for funding MUST be the unspendable account derived + // from the secret key. The ZK proof verifies transfers to this address. + let unspendable_account = UnspendableAccount::from_secret(&wormhole_pair.secret); + let account_id_bytes: [u8; 32] = felts_to_bytes(&unspendable_account.account_id) + .try_into() + .expect("Failed to convert Vec to [u8; 32]"); + let account_id: AccountId32 = account_id_bytes.into(); + + log_print!("{}", "XXXXXXXXXXXXXXX Quantus Wormhole Details XXXXXXXXXXXXXXXXX".yellow()); + log_print!( + "{}: {}", + "On-chain Address".green(), + account_id.to_ss58check().bright_cyan() + ); + log_print!( + "{}: 0x{}", + "Wormhole Address".green(), + hex::encode(wormhole_pair.address).bright_cyan() + ); + log_print!( + "{}: 0x{}", + "Secret Key ".green(), + hex::encode(wormhole_pair.secret).bright_cyan() + ); + log_print!( + "{}", + "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX".yellow() + ); + + log_success!("Wormhole address generated successfully!"); + }, + WormholeCommands::Spend { + secret: _, + to: _, + amount: _, + from: _, + password: _, + password_file: _, + } => { + log_print!("🚀 Initiating wormhole spend..."); + }, + } + Ok(()) +} From 54280019aba7df169b74ef11ee4f455cb247dd44 Mon Sep 17 00:00:00 2001 From: Ethan Date: Fri, 29 Aug 2025 18:11:13 -0500 Subject: [PATCH 2/6] *generate proof wormhole command. --- Cargo.lock | 684 +- Cargo.toml | 15 +- src/chain/client.rs | 59 +- src/chain/quantus_subxt.rs | 30659 ++++++++++++++++------------------- src/cli/mod.rs | 3 +- src/cli/storage.rs | 11 +- src/cli/wormhole.rs | 474 +- src/quantus_metadata.scale | Bin 149277 -> 136090 bytes 8 files changed, 15509 insertions(+), 16396 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0742ff2..cd8caf6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -180,9 +180,9 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb00293ba84f51ce3bd026bd0de55899c4e68f0a39a5728cebae3a73ffdc0a4f" dependencies = [ - "ark-ec", - "ark-ff", - "ark-std", + "ark-ec 0.4.2", + "ark-ff 0.4.2", + "ark-std 0.4.0", ] [[package]] @@ -191,10 +191,22 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c775f0d12169cba7aae4caeb547bb6a50781c7449a8aa53793827c9ec4abf488" dependencies = [ - "ark-ec", - "ark-ff", - "ark-serialize", - "ark-std", + "ark-ec 0.4.2", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", +] + +[[package]] +name = "ark-bls12-381" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3df4dcc01ff89867cd86b0da835f23c3f02738353aaee7dde7495af71363b8d5" +dependencies = [ + "ark-ec 0.5.0", + "ark-ff 0.5.0", + "ark-serialize 0.5.0", + "ark-std 0.5.0", ] [[package]] @@ -203,10 +215,10 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" dependencies = [ - "ark-ff", - "ark-poly", - "ark-serialize", - "ark-std", + "ark-ff 0.4.2", + "ark-poly 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", "derivative", "hashbrown 0.13.2", "itertools 0.10.5", @@ -214,16 +226,49 @@ dependencies = [ "zeroize", ] +[[package]] +name = "ark-ec" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43d68f2d516162846c1238e755a7c4d131b892b70cc70c471a8e3ca3ed818fce" +dependencies = [ + "ahash", + "ark-ff 0.5.0", + "ark-poly 0.5.0", + "ark-serialize 0.5.0", + "ark-std 0.5.0", + "educe", + "fnv", + "hashbrown 0.15.4", + "itertools 0.13.0", + "num-bigint", + "num-integer", + "num-traits", + "zeroize", +] + +[[package]] +name = "ark-ed-on-bls12-381-bandersnatch" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1786b2e3832f6f0f7c8d62d5d5a282f6952a1ab99981c54cd52b6ac1d8f02df5" +dependencies = [ + "ark-bls12-381 0.5.0", + "ark-ec 0.5.0", + "ark-ff 0.5.0", + "ark-std 0.5.0", +] + [[package]] name = "ark-ff" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" dependencies = [ - "ark-ff-asm", - "ark-ff-macros", - "ark-serialize", - "ark-std", + "ark-ff-asm 0.4.2", + "ark-ff-macros 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", "derivative", "digest 0.10.7", "itertools 0.10.5", @@ -234,6 +279,26 @@ dependencies = [ "zeroize", ] +[[package]] +name = "ark-ff" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a177aba0ed1e0fbb62aa9f6d0502e9b46dad8c2eab04c14258a1212d2557ea70" +dependencies = [ + "ark-ff-asm 0.5.0", + "ark-ff-macros 0.5.0", + "ark-serialize 0.5.0", + "ark-std 0.5.0", + "arrayvec 0.7.6", + "digest 0.10.7", + "educe", + "itertools 0.13.0", + "num-bigint", + "num-traits", + "paste", + "zeroize", +] + [[package]] name = "ark-ff-asm" version = "0.4.2" @@ -244,6 +309,16 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "ark-ff-asm" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62945a2f7e6de02a31fe400aa489f0e0f5b2502e69f95f853adb82a96c7a6b60" +dependencies = [ + "quote", + "syn 2.0.104", +] + [[package]] name = "ark-ff-macros" version = "0.4.2" @@ -257,27 +332,68 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "ark-ff-macros" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09be120733ee33f7693ceaa202ca41accd5653b779563608f1234f78ae07c4b3" +dependencies = [ + "num-bigint", + "num-traits", + "proc-macro2", + "quote", + "syn 2.0.104", +] + [[package]] name = "ark-poly" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" dependencies = [ - "ark-ff", - "ark-serialize", - "ark-std", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", "derivative", "hashbrown 0.13.2", ] +[[package]] +name = "ark-poly" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "579305839da207f02b89cd1679e50e67b4331e2f9294a57693e5051b7703fe27" +dependencies = [ + "ahash", + "ark-ff 0.5.0", + "ark-serialize 0.5.0", + "ark-std 0.5.0", + "educe", + "fnv", + "hashbrown 0.15.4", +] + [[package]] name = "ark-serialize" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" dependencies = [ - "ark-serialize-derive", - "ark-std", + "ark-serialize-derive 0.4.2", + "ark-std 0.4.0", + "digest 0.10.7", + "num-bigint", +] + +[[package]] +name = "ark-serialize" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f4d068aaf107ebcd7dfb52bc748f8030e0fc930ac8e360146ca54c1203088f7" +dependencies = [ + "ark-serialize-derive 0.5.0", + "ark-std 0.5.0", + "arrayvec 0.7.6", "digest 0.10.7", "num-bigint", ] @@ -293,6 +409,17 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "ark-serialize-derive" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "213888f660fddcca0d257e88e54ac05bca01885f258ccdf695bafd77031bb69d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + [[package]] name = "ark-std" version = "0.4.0" @@ -303,6 +430,49 @@ dependencies = [ "rand 0.8.5", ] +[[package]] +name = "ark-std" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "246a225cc6131e9ee4f24619af0f19d67761fff15d7ccc22e42b80846e69449a" +dependencies = [ + "num-traits", + "rand 0.8.5", +] + +[[package]] +name = "ark-transcript" +version = "0.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47c1c928edb9d8ff24cb5dcb7651d3a98494fff3099eee95c2404cd813a9139f" +dependencies = [ + "ark-ff 0.5.0", + "ark-serialize 0.5.0", + "ark-std 0.5.0", + "digest 0.10.7", + "rand_core 0.6.4", + "sha3", +] + +[[package]] +name = "ark-vrf" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9501da18569b2afe0eb934fb7afd5a247d238b94116155af4dd068f319adfe6d" +dependencies = [ + "ark-bls12-381 0.5.0", + "ark-ec 0.5.0", + "ark-ed-on-bls12-381-bandersnatch", + "ark-ff 0.5.0", + "ark-serialize 0.5.0", + "ark-std 0.5.0", + "digest 0.10.7", + "rand_chacha 0.3.1", + "sha2 0.10.9", + "w3f-ring-proof", + "zeroize", +] + [[package]] name = "array-bytes" version = "6.2.3" @@ -1155,19 +1325,17 @@ dependencies = [ [[package]] name = "dilithium-crypto" version = "0.1.0" -source = "git+https://github.com/Quantus-Network/chain#6d36c461770cb77252566956992284af0d988e70" +source = "git+https://github.com/Quantus-Network/chain#baeb1928f1ea443f781f5825dd1b77d8b88e9985" dependencies = [ "log", "parity-scale-codec", - "poseidon-resonance", - "rusty-crystals-dilithium", + "poseidon-resonance 0.9.0 (git+https://github.com/Quantus-Network/poseidon-resonance)", + "rusty-crystals-dilithium 1.0.0 (git+https://github.com/Quantus-Network/rusty-crystals)", "scale-info", - "sp-core", + "sp-core 37.0.0", "sp-io", "sp-runtime", - "sp-runtime-interface", - "sp-std", - "thiserror 2.0.12", + "thiserror 1.0.69", ] [[package]] @@ -1316,6 +1484,18 @@ dependencies = [ "zeroize", ] +[[package]] +name = "educe" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d7bc049e1bd8cdeb31b68bbd586a9464ecf9f3944af3958a7a9d0f8b9799417" +dependencies = [ + "enum-ordinalize", + "proc-macro2", + "quote", + "syn 2.0.104", +] + [[package]] name = "either" version = "1.15.0" @@ -1342,6 +1522,26 @@ dependencies = [ "zeroize", ] +[[package]] +name = "enum-ordinalize" +version = "4.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fea0dcfa4e54eeb516fe454635a95753ddd39acda650ce703031c6973e315dd5" +dependencies = [ + "enum-ordinalize-derive", +] + +[[package]] +name = "enum-ordinalize-derive" +version = "4.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d28318a75d4aead5c4db25382e8ef717932d0346600cacae6357eb5941bc5ff" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + [[package]] name = "environmental" version = "1.1.4" @@ -1922,6 +2122,12 @@ version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + [[package]] name = "hyper" version = "1.6.0" @@ -1935,6 +2141,7 @@ dependencies = [ "http", "http-body", "httparse", + "httpdate", "itoa", "pin-project-lite", "smallvec", @@ -2220,6 +2427,15 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + [[package]] name = "itertools" version = "0.14.0" @@ -2573,6 +2789,17 @@ dependencies = [ "hash-db", ] +[[package]] +name = "memory-db" +version = "0.34.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e300c54e3239a86f9c61cc63ab0f03862eb40b1c6e065dc6fd6ceaeff6da93d" +dependencies = [ + "foldhash", + "hash-db", + "hashbrown 0.15.4", +] + [[package]] name = "memzero" version = "0.1.0" @@ -3011,41 +3238,41 @@ source = "git+https://github.com/Quantus-Network/plonky2#80a10007d8359b54843acb8 [[package]] name = "polkavm-common" -version = "0.9.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d9428a5cfcc85c5d7b9fc4b6a18c4b802d0173d768182a51cc7751640f08b92" +checksum = "31ff33982a807d8567645d4784b9b5d7ab87bcb494f534a57cadd9012688e102" [[package]] name = "polkavm-common" -version = "0.18.0" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31ff33982a807d8567645d4784b9b5d7ab87bcb494f534a57cadd9012688e102" +checksum = "d91ed9e5af472f729fcf3b3c1cf17508ddbb3505259dd6e2ee0fb5a29e105d22" [[package]] name = "polkavm-derive" -version = "0.9.1" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae8c4bea6f3e11cd89bb18bcdddac10bd9a24015399bd1c485ad68a985a19606" +checksum = "c2eb703f3b6404c13228402e98a5eae063fd16b8f58afe334073ec105ee4117e" dependencies = [ - "polkavm-derive-impl-macro 0.9.0", + "polkavm-derive-impl-macro 0.18.0", ] [[package]] name = "polkavm-derive" -version = "0.18.0" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2eb703f3b6404c13228402e98a5eae063fd16b8f58afe334073ec105ee4117e" +checksum = "176144f8661117ea95fa7cf868c9a62d6b143e8a2ebcb7582464c3faade8669a" dependencies = [ - "polkavm-derive-impl-macro 0.18.0", + "polkavm-derive-impl-macro 0.24.0", ] [[package]] name = "polkavm-derive-impl" -version = "0.9.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c4fdfc49717fb9a196e74a5d28e0bc764eb394a2c803eb11133a31ac996c60c" +checksum = "2f2116a92e6e96220a398930f4c8a6cda1264206f3e2034fc9982bfd93f261f7" dependencies = [ - "polkavm-common 0.9.0", + "polkavm-common 0.18.0", "proc-macro2", "quote", "syn 2.0.104", @@ -3053,11 +3280,11 @@ dependencies = [ [[package]] name = "polkavm-derive-impl" -version = "0.18.1" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f2116a92e6e96220a398930f4c8a6cda1264206f3e2034fc9982bfd93f261f7" +checksum = "c5a21844afdfcc10c92b9ef288ccb926211af27478d1730fcd55e4aec710179d" dependencies = [ - "polkavm-common 0.18.0", + "polkavm-common 0.24.0", "proc-macro2", "quote", "syn 2.0.104", @@ -3065,21 +3292,21 @@ dependencies = [ [[package]] name = "polkavm-derive-impl-macro" -version = "0.9.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ba81f7b5faac81e528eb6158a6f3c9e0bb1008e0ffa19653bc8dea925ecb429" +checksum = "48c16669ddc7433e34c1007d31080b80901e3e8e523cb9d4b441c3910cf9294b" dependencies = [ - "polkavm-derive-impl 0.9.0", + "polkavm-derive-impl 0.18.1", "syn 2.0.104", ] [[package]] name = "polkavm-derive-impl-macro" -version = "0.18.0" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48c16669ddc7433e34c1007d31080b80901e3e8e523cb9d4b441c3910cf9294b" +checksum = "ba0ef0f17ad81413ea1ca5b1b67553aedf5650c88269b673d3ba015c83bc2651" dependencies = [ - "polkavm-derive-impl 0.18.1", + "polkavm-derive-impl 0.24.0", "syn 2.0.104", ] @@ -3122,18 +3349,34 @@ dependencies = [ [[package]] name = "poseidon-resonance" -version = "0.8.0" -source = "git+https://github.com/Quantus-Network/poseidon-resonance#12e43a0f956b0378c87543a48eec64814235ae6d" +version = "0.9.0" +source = "git+https://github.com/Quantus-Network/poseidon-resonance?branch=injective-felt-embeddings#6f0606efe421f3695d7ff29b4ba6cf269a925188" dependencies = [ "log", "parity-scale-codec", "plonky2", "scale-info", "serde", - "sp-core", + "sp-core 37.0.0", "sp-runtime", "sp-storage", - "sp-trie", + "sp-trie 40.0.0", +] + +[[package]] +name = "poseidon-resonance" +version = "0.9.0" +source = "git+https://github.com/Quantus-Network/poseidon-resonance#2663eb5819ac36eac2a74ee3debfd642262c1c54" +dependencies = [ + "log", + "parity-scale-codec", + "plonky2", + "scale-info", + "serde", + "sp-core 37.0.0", + "sp-runtime", + "sp-storage", + "sp-trie 40.0.0", ] [[package]] @@ -3234,6 +3477,20 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "prometheus" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d33c28a30771f7f96db69893f78b857f7450d7e0237e9c8fc6427a81bae7ed1" +dependencies = [ + "cfg-if", + "fnv", + "lazy_static", + "memchr", + "parking_lot", + "thiserror 1.0.69", +] + [[package]] name = "quantus-cli" version = "0.1.0" @@ -3248,22 +3505,26 @@ dependencies = [ "hex", "jsonrpsee", "parity-scale-codec", - "poseidon-resonance", + "poseidon-resonance 0.9.0 (git+https://github.com/Quantus-Network/poseidon-resonance?branch=injective-felt-embeddings)", "rand 0.9.2", "rpassword", - "rusty-crystals-dilithium", + "rusty-crystals-dilithium 1.0.0 (git+https://github.com/Quantus-Network/rusty-crystals.git?branch=injective-felt-embeddings)", "rusty-crystals-hdwallet", "serde", "serde_json", "sha2 0.10.9", - "sp-core", + "sp-core 37.0.0", "sp-runtime", + "sp-state-machine 0.44.0", + "sp-storage", + "sp-trie 38.0.0", "subxt", "subxt-metadata", "tempfile", "thiserror 2.0.12", "tokio", "toml 0.9.4", + "trie-db 0.29.1", "wormhole-circuit", "zk-circuits-common", ] @@ -3641,31 +3902,39 @@ checksum = "8a0d197bd2c9dc6e53b84da9556a69ba4cdfab8619eb41a8bd1cc2027a0f6b1d" [[package]] name = "rusty-crystals-dilithium" version = "1.0.0" -source = "git+https://github.com/Quantus-Network/rusty-crystals.git#5f24db84210217ba8643020be55550eb52e2323a" +source = "git+https://github.com/Quantus-Network/rusty-crystals.git?branch=injective-felt-embeddings#660deceaa250e4c33081553747dd0e48fba68adf" dependencies = [ "rand 0.7.3", "sha2 0.10.9", ] +[[package]] +name = "rusty-crystals-dilithium" +version = "1.0.0" +source = "git+https://github.com/Quantus-Network/rusty-crystals#b6afb061350f5ae03fdfd52b90227b7c627646ed" +dependencies = [ + "sha2 0.10.9", +] + [[package]] name = "rusty-crystals-hdwallet" version = "0.1.1" -source = "git+https://github.com/Quantus-Network/rusty-crystals.git#5f24db84210217ba8643020be55550eb52e2323a" +source = "git+https://github.com/Quantus-Network/rusty-crystals.git?branch=injective-felt-embeddings#660deceaa250e4c33081553747dd0e48fba68adf" dependencies = [ "bip39", "hex", "hex-literal", "hmac 0.12.1", "nam-tiny-hderive", - "poseidon-resonance", + "poseidon-resonance 0.9.0 (git+https://github.com/Quantus-Network/poseidon-resonance?branch=injective-felt-embeddings)", "rand 0.8.5", "rand_chacha 0.9.0", "rand_core 0.6.4", - "rusty-crystals-dilithium", + "rusty-crystals-dilithium 1.0.0 (git+https://github.com/Quantus-Network/rusty-crystals.git?branch=injective-felt-embeddings)", "serde", "serde_json", "sha2 0.10.9", - "sp-core", + "sp-core 37.0.0", "thiserror 2.0.12", ] @@ -4253,22 +4522,22 @@ dependencies = [ [[package]] name = "sp-application-crypto" -version = "39.0.0" +version = "41.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f6850bd745fe9c0a200a8e729a82c8036250e1ad1ef24ed7498b2289935c974" +checksum = "28c668f1ce424bc131f40ade33fa4c0bd4dcd2428479e1e291aad66d4b00c74f" dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core", + "sp-core 37.0.0", "sp-io", ] [[package]] name = "sp-arithmetic" -version = "26.1.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9971b30935cea3858664965039dabd80f67aca74cc6cc6dd42ff1ab14547bc53" +checksum = "2929fd12ac6ca3cfac7f62885866810ba4e9464814dbaa87592b5b5681b29aee" dependencies = [ "docify", "integer-sqrt", @@ -4315,7 +4584,56 @@ dependencies = [ "sp-crypto-hashing", "sp-debug-derive", "sp-externalities", - "sp-runtime-interface", + "sp-runtime-interface 29.0.1", + "sp-std", + "sp-storage", + "ss58-registry", + "substrate-bip39", + "thiserror 1.0.69", + "tracing", + "w3f-bls", + "zeroize", +] + +[[package]] +name = "sp-core" +version = "37.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e1a46a6b2323401e4489184846a7fb7d89091b42602a2391cd3ef652ede2850" +dependencies = [ + "ark-vrf", + "array-bytes", + "bitflags 1.3.2", + "blake2", + "bounded-collections", + "bs58", + "dyn-clone", + "ed25519-zebra", + "futures", + "hash-db", + "hash256-std-hasher", + "impl-serde", + "itertools 0.11.0", + "k256", + "libsecp256k1", + "log", + "merlin", + "parity-bip39", + "parity-scale-codec", + "parking_lot", + "paste", + "primitive-types 0.13.1", + "rand 0.8.5", + "scale-info", + "schnorrkel", + "secp256k1", + "secrecy", + "serde", + "sha2 0.10.9", + "sp-crypto-hashing", + "sp-debug-derive", + "sp-externalities", + "sp-runtime-interface 30.0.0", "sp-std", "sp-storage", "ss58-registry", @@ -4364,9 +4682,9 @@ dependencies = [ [[package]] name = "sp-io" -version = "39.0.1" +version = "41.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "594a1c12ec7a1514caa878c2370902d116e6d7606a449c805bc91a4e62ef1ecf" +checksum = "f3f244e9a2818d21220ceb0915ac73a462814a92d0c354a124a818abdb7f4f66" dependencies = [ "bytes", "docify", @@ -4374,30 +4692,30 @@ dependencies = [ "libsecp256k1", "log", "parity-scale-codec", - "polkavm-derive 0.9.1", + "polkavm-derive 0.24.0", "rustversion", "secp256k1", - "sp-core", + "sp-core 37.0.0", "sp-crypto-hashing", "sp-externalities", "sp-keystore", - "sp-runtime-interface", - "sp-state-machine", + "sp-runtime-interface 30.0.0", + "sp-state-machine 0.46.0", "sp-tracing", - "sp-trie", + "sp-trie 40.0.0", "tracing", "tracing-core", ] [[package]] name = "sp-keystore" -version = "0.41.0" +version = "0.43.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1d41475fcdf253f9f0da839564c1b7f8a95c6a293ddfffd6e48e3671e76f33b" +checksum = "269d0ee360f6d072f9203485afea35583ac151521a525cc48b2a107fc576c2d9" dependencies = [ "parity-scale-codec", "parking_lot", - "sp-core", + "sp-core 37.0.0", "sp-externalities", ] @@ -4413,9 +4731,9 @@ dependencies = [ [[package]] name = "sp-runtime" -version = "40.1.0" +version = "42.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d1356c519f12de28847f57638490b298b0bb35d7df032c6b2948c8a9a168abe" +checksum = "b25d4d3811410317175ff121b3ff8c8b723504dadf37cd418b5192a5098d11bf" dependencies = [ "binary-merkle-tree", "docify", @@ -4432,10 +4750,10 @@ dependencies = [ "simple-mermaid", "sp-application-crypto", "sp-arithmetic", - "sp-core", + "sp-core 37.0.0", "sp-io", "sp-std", - "sp-trie", + "sp-trie 40.0.0", "sp-weights", "tracing", "tuplex", @@ -4453,11 +4771,31 @@ dependencies = [ "polkavm-derive 0.18.0", "primitive-types 0.13.1", "sp-externalities", - "sp-runtime-interface-proc-macro", + "sp-runtime-interface-proc-macro 18.0.0", + "sp-std", + "sp-storage", + "sp-tracing", + "sp-wasm-interface 21.0.1", + "static_assertions", +] + +[[package]] +name = "sp-runtime-interface" +version = "30.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fcd9c219da8c85d45d5ae1ce80e73863a872ac27424880322903c6ac893c06e" +dependencies = [ + "bytes", + "impl-trait-for-tuples", + "parity-scale-codec", + "polkavm-derive 0.24.0", + "primitive-types 0.13.1", + "sp-externalities", + "sp-runtime-interface-proc-macro 19.0.0", "sp-std", "sp-storage", "sp-tracing", - "sp-wasm-interface", + "sp-wasm-interface 22.0.0", "static_assertions", ] @@ -4475,11 +4813,45 @@ dependencies = [ "syn 2.0.104", ] +[[package]] +name = "sp-runtime-interface-proc-macro" +version = "19.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca35431af10a450787ebfdcb6d7a91c23fa91eafe73a3f9d37db05c9ab36154b" +dependencies = [ + "Inflector", + "expander", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.104", +] + [[package]] name = "sp-state-machine" version = "0.44.0" +source = "git+https://github.com/Quantus-Network/zk-state-machine#06d1e9545428b57aa56e8997c7bf24eaeb48a103" +dependencies = [ + "hash-db", + "log", + "parity-scale-codec", + "parking_lot", + "rand 0.8.5", + "smallvec", + "sp-core 35.0.0", + "sp-externalities", + "sp-panic-handler", + "sp-trie 38.0.0", + "thiserror 1.0.69", + "tracing", + "trie-db 0.29.1", +] + +[[package]] +name = "sp-state-machine" +version = "0.46.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bce4ee5ee6c614994077e6e317270eab6fde2bc346b028290286cbf9d0011b7e" +checksum = "483422b016ee9ddba949db6d3092961ed58526520f0586df74dc07defd922a58" dependencies = [ "hash-db", "log", @@ -4487,13 +4859,13 @@ dependencies = [ "parking_lot", "rand 0.8.5", "smallvec", - "sp-core", + "sp-core 37.0.0", "sp-externalities", "sp-panic-handler", - "sp-trie", + "sp-trie 40.0.0", "thiserror 1.0.69", "tracing", - "trie-db", + "trie-db 0.30.0", ] [[package]] @@ -4530,23 +4902,49 @@ dependencies = [ [[package]] name = "sp-trie" version = "38.0.0" +source = "git+https://github.com/Quantus-Network/zk-trie#bb1c142115ef1c7cae9378dd438b179d113d29cb" +dependencies = [ + "ahash", + "hash-db", + "log", + "memory-db 0.32.0", + "nohash-hasher", + "parity-scale-codec", + "parking_lot", + "rand 0.8.5", + "scale-info", + "schnellru", + "sp-core 35.0.0", + "sp-externalities", + "thiserror 1.0.69", + "tracing", + "trie-db 0.29.1", + "trie-root", +] + +[[package]] +name = "sp-trie" +version = "40.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1851c4929ae88932c6bcdb9e60f4063e478ca612012af3b6d365c7dc9c591f7f" +checksum = "6b2e157c9cf44a1a9d20f3c69322e302db70399bf3f218211387fe009dd4041c" dependencies = [ "ahash", + "foldhash", "hash-db", - "memory-db", + "hashbrown 0.15.4", + "memory-db 0.34.0", "nohash-hasher", "parity-scale-codec", "parking_lot", "rand 0.8.5", "scale-info", "schnellru", - "sp-core", + "sp-core 37.0.0", "sp-externalities", + "substrate-prometheus-endpoint", "thiserror 1.0.69", "tracing", - "trie-db", + "trie-db 0.30.0", "trie-root", ] @@ -4562,11 +4960,23 @@ dependencies = [ "parity-scale-codec", ] +[[package]] +name = "sp-wasm-interface" +version = "22.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffdbc579c72fc03263894a0077383f543a093020d75741092511bb05a440ada6" +dependencies = [ + "anyhow", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", +] + [[package]] name = "sp-weights" -version = "31.1.0" +version = "32.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "515aa194eabac059041df2dbee75b059b99981213ec680e9de85b45b6988346a" +checksum = "c8a1d448faceb064bb114df31fc45ff86ea2ee8fd17810c4357a578d081f7732" dependencies = [ "bounded-collections", "parity-scale-codec", @@ -4639,6 +5049,21 @@ dependencies = [ "zeroize", ] +[[package]] +name = "substrate-prometheus-endpoint" +version = "0.17.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73389cae0245dee48633a2346fa7b82b5c77e586ff44493ea54f4e0ffa0ef827" +dependencies = [ + "http-body-util", + "hyper", + "hyper-util", + "log", + "prometheus", + "thiserror 1.0.69", + "tokio", +] + [[package]] name = "subtle" version = "2.6.1" @@ -5236,6 +5661,18 @@ dependencies = [ "smallvec", ] +[[package]] +name = "trie-db" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c0670ab45a6b7002c7df369fee950a27cf29ae0474343fd3a15aa15f691e7a6" +dependencies = [ + "hash-db", + "log", + "rustc-hex", + "smallvec", +] + [[package]] name = "trie-root" version = "0.18.0" @@ -5400,11 +5837,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6bfb937b3d12077654a9e43e32a4e9c20177dd9fea0f3aba673e7840bb54f32" dependencies = [ "ark-bls12-377", - "ark-bls12-381", - "ark-ec", - "ark-ff", - "ark-serialize", - "ark-serialize-derive", + "ark-bls12-381 0.4.0", + "ark-ec 0.4.2", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-serialize-derive 0.4.2", "arrayref", "digest 0.10.7", "rand 0.8.5", @@ -5415,6 +5852,52 @@ dependencies = [ "zeroize", ] +[[package]] +name = "w3f-pcs" +version = "0.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbe7a8d5c914b69392ab3b267f679a2e546fe29afaddce47981772ac71bd02e1" +dependencies = [ + "ark-ec 0.5.0", + "ark-ff 0.5.0", + "ark-poly 0.5.0", + "ark-serialize 0.5.0", + "ark-std 0.5.0", + "merlin", +] + +[[package]] +name = "w3f-plonk-common" +version = "0.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1aca389e494fe08c5c108b512e2328309036ee1c0bc7bdfdb743fef54d448c8c" +dependencies = [ + "ark-ec 0.5.0", + "ark-ff 0.5.0", + "ark-poly 0.5.0", + "ark-serialize 0.5.0", + "ark-std 0.5.0", + "getrandom_or_panic", + "rand_core 0.6.4", + "w3f-pcs", +] + +[[package]] +name = "w3f-ring-proof" +version = "0.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a639379402ad51504575dbd258740383291ac8147d3b15859bdf1ea48c677de" +dependencies = [ + "ark-ec 0.5.0", + "ark-ff 0.5.0", + "ark-poly 0.5.0", + "ark-serialize 0.5.0", + "ark-std 0.5.0", + "ark-transcript", + "w3f-pcs", + "w3f-plonk-common", +] + [[package]] name = "walkdir" version = "2.5.0" @@ -5947,7 +6430,7 @@ dependencies = [ [[package]] name = "wormhole-circuit" version = "0.1.0" -source = "git+https://github.com/Quantus-Network/zk-circuits#547cd0d2514aa2a849af85368b4f89f4132cdb97" +source = "git+https://github.com/Quantus-Network/zk-circuits#825b2abcfdc86d01d0cadce2545837549079f252" dependencies = [ "anyhow", "hex", @@ -6109,8 +6592,9 @@ dependencies = [ [[package]] name = "zk-circuits-common" version = "0.1.0" -source = "git+https://github.com/Quantus-Network/zk-circuits#547cd0d2514aa2a849af85368b4f89f4132cdb97" +source = "git+https://github.com/Quantus-Network/zk-circuits#825b2abcfdc86d01d0cadce2545837549079f252" dependencies = [ "anyhow", "plonky2", + "serde", ] diff --git a/Cargo.toml b/Cargo.toml index a35a1db..9b2d5f6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -39,10 +39,9 @@ argon2 = "0.5" # Password-based key derivation (quantum-safe) rand = "0.9" aes-gcm = "0.10" # AES-256-GCM (quantum-safe with 256-bit keys) -# Quantus crypto dependencies -rusty-crystals-dilithium = { git = "https://github.com/Quantus-Network/rusty-crystals.git", package = "rusty-crystals-dilithium" } -rusty-crystals-hdwallet = { git = "https://github.com/Quantus-Network/rusty-crystals.git", package = "rusty-crystals-hdwallet" } -poseidon-resonance = { git = "https://github.com/Quantus-Network/poseidon-resonance", features = [ +rusty-crystals-dilithium = { git = "https://github.com/Quantus-Network/rusty-crystals.git", branch = "injective-felt-embeddings", package = "rusty-crystals-dilithium" } +rusty-crystals-hdwallet = { git = "https://github.com/Quantus-Network/rusty-crystals.git", branch = "injective-felt-embeddings", package = "rusty-crystals-hdwallet" } +poseidon-resonance = { git = "https://github.com/Quantus-Network/poseidon-resonance", branch = "injective-felt-embeddings", features = [ "serde", ] } dilithium-crypto = { git = "https://github.com/Quantus-Network/chain", package = "dilithium-crypto" } @@ -50,13 +49,17 @@ dilithium-crypto = { git = "https://github.com/Quantus-Network/chain", package = # Wormhole and zk-circuits wormhole-circuit = { git = "https://github.com/Quantus-Network/zk-circuits", package = "wormhole-circuit" } zk-circuits-common = { git = "https://github.com/Quantus-Network/zk-circuits", package = "zk-circuits-common" } +trie-db = { version = "0.29.1", default-features = false } +sp-trie = { git = "https://github.com/Quantus-Network/zk-trie" } # Blockchain and RPC client codec = { package = "parity-scale-codec", version = "3.7", features = [ "derive", ] } -sp-core = { version = "35.0" } -sp-runtime = { version = "40.1" } +sp-core = { version = "37.0.0" } +sp-runtime = { version = "42.0.0" } +sp-storage = { version = "22.0.0", default-features = false } +sp-state-machine = { git = "https://github.com/Quantus-Network/zk-state-machine" } subxt = "0.43.0" jsonrpsee = { version = "0.24", features = ["client"] } diff --git a/src/chain/client.rs b/src/chain/client.rs index 115f088..1a94509 100644 --- a/src/chain/client.rs +++ b/src/chain/client.rs @@ -5,10 +5,16 @@ use crate::{error::QuantusError, log_verbose}; use dilithium_crypto::types::DilithiumSignatureScheme; -use jsonrpsee::ws_client::{WsClient, WsClientBuilder}; +use jsonrpsee::{ + core::{client::ClientT, traits::ToRpcParams}, + rpc_params, + ws_client::{WsClient, WsClientBuilder}, +}; use poseidon_resonance::PoseidonHasher; -use sp_core::{crypto::AccountId32, ByteArray}; +use serde::{Deserialize, Serialize}; +use sp_core::{crypto::AccountId32, ByteArray, Bytes, H256}; use sp_runtime::{traits::IdentifyAccount, MultiAddress}; +use sp_storage::StorageKey; use std::{sync::Arc, time::Duration}; use subxt::{ backend::rpc::RpcClient, @@ -44,6 +50,14 @@ impl Config for ChainConfig { type ExtrinsicParams = DefaultExtrinsicParams; } +// Exact structure from +// https://github.com/paritytech/substrate/blob/master/client/rpc-api/src/state/helpers.rs +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ReadProof { + pub at: Hash, + pub proof: Vec, +} + /// Wrapper around OnlineClient that also stores the node URL and RPC client pub struct QuantusClient { client: OnlineClient, @@ -155,6 +169,47 @@ impl QuantusClient { Ok(latest_hash) } + pub async fn get_storage_proof_by_keys( + &self, + storage_keys: Vec, + at_block: Option, + ) -> crate::error::Result> { + // Optional: debug the exact JSON we're sending + // use jsonrpsee::core::client::ClientT; + let params: jsonrpsee::core::params::ArrayParams = rpc_params![storage_keys, at_block]; + let params_clone = params.clone().to_rpc_params()?; + println!("Sending RPC request with params: {:?}", params_clone); + + let proof: ReadProof = + self.rpc_client.request("state_getReadProof", params).await.map_err(|e| { + crate::error::QuantusError::NetworkError(format!( + "Failed to fetch storage proof: {e:?}" + )) + })?; + Ok(proof) + } + + pub async fn get_block_header( + &self, + block_hash: H256, + ) -> crate::error::Result { + log_verbose!("🔍 Fetching block header for block: {:?}", block_hash); + + let header: serde_json::Value = self + .rpc_client + .request("chain_getHeader", rpc_params![block_hash]) + .await + .map_err(|e| { + crate::error::QuantusError::NetworkError(format!( + "Failed to fetch block header: {:?}", + e + )) + })?; + + log_verbose!("📦 Block header: {:?}", header); + Ok(header) + } + /// Get account nonce from the best block (latest) using direct RPC call /// This bypasses SubXT's default behavior of using finalized blocks pub async fn get_account_nonce_from_best_block( diff --git a/src/chain/quantus_subxt.rs b/src/chain/quantus_subxt.rs index 33ed194..4417832 100644 --- a/src/chain/quantus_subxt.rs +++ b/src/chain/quantus_subxt.rs @@ -6,7 +6,7 @@ pub mod api { mod root_mod { pub use super::*; } - pub static PALLETS: [&str; 22usize] = [ + pub static PALLETS: [&str; 21usize] = [ "System", "Timestamp", "Balances", @@ -28,9 +28,20 @@ pub mod api { "TreasuryPallet", "Origins", "Recovery", - "Assets", ]; - pub static RUNTIME_APIS: [&str; 0usize] = []; + pub static RUNTIME_APIS: [&str; 11usize] = [ + "Core", + "Metadata", + "BlockBuilder", + "TaggedTransactionQueue", + "OffchainWorkerApi", + "SessionKeys", + "QPoWApi", + "AccountNonceApi", + "TransactionPaymentApi", + "TransactionPaymentCallApi", + "GenesisBuilder", + ]; #[doc = r" The error type that is returned when there is a runtime issue."] pub type DispatchError = runtime_types::sp_runtime::DispatchError; #[doc = r" The outer event enum."] @@ -55,220 +66,118 @@ pub mod api { use super::{root_mod, runtime_types}; use ::subxt::ext::subxt_core::ext::codec::Encode; pub struct RuntimeApi; - impl RuntimeApi {} - } - pub fn view_functions() -> ViewFunctionsApi { - ViewFunctionsApi - } - pub fn custom() -> CustomValuesApi { - CustomValuesApi - } - pub struct CustomValuesApi; - impl CustomValuesApi {} - pub struct ConstantsApi; - impl ConstantsApi { - pub fn system(&self) -> system::constants::ConstantsApi { - system::constants::ConstantsApi - } - pub fn timestamp(&self) -> timestamp::constants::ConstantsApi { - timestamp::constants::ConstantsApi - } - pub fn balances(&self) -> balances::constants::ConstantsApi { - balances::constants::ConstantsApi - } - pub fn transaction_payment(&self) -> transaction_payment::constants::ConstantsApi { - transaction_payment::constants::ConstantsApi - } - pub fn q_po_w(&self) -> q_po_w::constants::ConstantsApi { - q_po_w::constants::ConstantsApi - } - pub fn wormhole(&self) -> wormhole::constants::ConstantsApi { - wormhole::constants::ConstantsApi - } - pub fn mining_rewards(&self) -> mining_rewards::constants::ConstantsApi { - mining_rewards::constants::ConstantsApi - } - pub fn vesting(&self) -> vesting::constants::ConstantsApi { - vesting::constants::ConstantsApi - } - pub fn scheduler(&self) -> scheduler::constants::ConstantsApi { - scheduler::constants::ConstantsApi - } - pub fn utility(&self) -> utility::constants::ConstantsApi { - utility::constants::ConstantsApi - } - pub fn referenda(&self) -> referenda::constants::ConstantsApi { - referenda::constants::ConstantsApi - } - pub fn reversible_transfers(&self) -> reversible_transfers::constants::ConstantsApi { - reversible_transfers::constants::ConstantsApi - } - pub fn conviction_voting(&self) -> conviction_voting::constants::ConstantsApi { - conviction_voting::constants::ConstantsApi - } - pub fn tech_referenda(&self) -> tech_referenda::constants::ConstantsApi { - tech_referenda::constants::ConstantsApi - } - pub fn merkle_airdrop(&self) -> merkle_airdrop::constants::ConstantsApi { - merkle_airdrop::constants::ConstantsApi - } - pub fn treasury_pallet(&self) -> treasury_pallet::constants::ConstantsApi { - treasury_pallet::constants::ConstantsApi - } - pub fn recovery(&self) -> recovery::constants::ConstantsApi { - recovery::constants::ConstantsApi - } - pub fn assets(&self) -> assets::constants::ConstantsApi { - assets::constants::ConstantsApi - } - } - pub struct StorageApi; - impl StorageApi { - pub fn system(&self) -> system::storage::StorageApi { - system::storage::StorageApi - } - pub fn timestamp(&self) -> timestamp::storage::StorageApi { - timestamp::storage::StorageApi - } - pub fn balances(&self) -> balances::storage::StorageApi { - balances::storage::StorageApi - } - pub fn transaction_payment(&self) -> transaction_payment::storage::StorageApi { - transaction_payment::storage::StorageApi - } - pub fn sudo(&self) -> sudo::storage::StorageApi { - sudo::storage::StorageApi - } - pub fn q_po_w(&self) -> q_po_w::storage::StorageApi { - q_po_w::storage::StorageApi - } - pub fn wormhole(&self) -> wormhole::storage::StorageApi { - wormhole::storage::StorageApi - } - pub fn mining_rewards(&self) -> mining_rewards::storage::StorageApi { - mining_rewards::storage::StorageApi - } - pub fn vesting(&self) -> vesting::storage::StorageApi { - vesting::storage::StorageApi - } - pub fn preimage(&self) -> preimage::storage::StorageApi { - preimage::storage::StorageApi - } - pub fn scheduler(&self) -> scheduler::storage::StorageApi { - scheduler::storage::StorageApi - } - pub fn referenda(&self) -> referenda::storage::StorageApi { - referenda::storage::StorageApi - } - pub fn reversible_transfers(&self) -> reversible_transfers::storage::StorageApi { - reversible_transfers::storage::StorageApi - } - pub fn conviction_voting(&self) -> conviction_voting::storage::StorageApi { - conviction_voting::storage::StorageApi - } - pub fn tech_collective(&self) -> tech_collective::storage::StorageApi { - tech_collective::storage::StorageApi - } - pub fn tech_referenda(&self) -> tech_referenda::storage::StorageApi { - tech_referenda::storage::StorageApi - } - pub fn merkle_airdrop(&self) -> merkle_airdrop::storage::StorageApi { - merkle_airdrop::storage::StorageApi - } - pub fn treasury_pallet(&self) -> treasury_pallet::storage::StorageApi { - treasury_pallet::storage::StorageApi - } - pub fn recovery(&self) -> recovery::storage::StorageApi { - recovery::storage::StorageApi - } - pub fn assets(&self) -> assets::storage::StorageApi { - assets::storage::StorageApi - } - } - pub struct TransactionApi; - impl TransactionApi { - pub fn system(&self) -> system::calls::TransactionApi { - system::calls::TransactionApi - } - pub fn timestamp(&self) -> timestamp::calls::TransactionApi { - timestamp::calls::TransactionApi - } - pub fn balances(&self) -> balances::calls::TransactionApi { - balances::calls::TransactionApi - } - pub fn sudo(&self) -> sudo::calls::TransactionApi { - sudo::calls::TransactionApi - } - pub fn wormhole(&self) -> wormhole::calls::TransactionApi { - wormhole::calls::TransactionApi - } - pub fn vesting(&self) -> vesting::calls::TransactionApi { - vesting::calls::TransactionApi - } - pub fn preimage(&self) -> preimage::calls::TransactionApi { - preimage::calls::TransactionApi - } - pub fn scheduler(&self) -> scheduler::calls::TransactionApi { - scheduler::calls::TransactionApi - } - pub fn utility(&self) -> utility::calls::TransactionApi { - utility::calls::TransactionApi - } - pub fn referenda(&self) -> referenda::calls::TransactionApi { - referenda::calls::TransactionApi - } - pub fn reversible_transfers(&self) -> reversible_transfers::calls::TransactionApi { - reversible_transfers::calls::TransactionApi - } - pub fn conviction_voting(&self) -> conviction_voting::calls::TransactionApi { - conviction_voting::calls::TransactionApi - } - pub fn tech_collective(&self) -> tech_collective::calls::TransactionApi { - tech_collective::calls::TransactionApi - } - pub fn tech_referenda(&self) -> tech_referenda::calls::TransactionApi { - tech_referenda::calls::TransactionApi - } - pub fn merkle_airdrop(&self) -> merkle_airdrop::calls::TransactionApi { - merkle_airdrop::calls::TransactionApi - } - pub fn treasury_pallet(&self) -> treasury_pallet::calls::TransactionApi { - treasury_pallet::calls::TransactionApi - } - pub fn recovery(&self) -> recovery::calls::TransactionApi { - recovery::calls::TransactionApi - } - pub fn assets(&self) -> assets::calls::TransactionApi { - assets::calls::TransactionApi + impl RuntimeApi { + pub fn core(&self) -> core::Core { + core::Core + } + pub fn metadata(&self) -> metadata::Metadata { + metadata::Metadata + } + pub fn block_builder(&self) -> block_builder::BlockBuilder { + block_builder::BlockBuilder + } + pub fn tagged_transaction_queue( + &self, + ) -> tagged_transaction_queue::TaggedTransactionQueue { + tagged_transaction_queue::TaggedTransactionQueue + } + pub fn offchain_worker_api(&self) -> offchain_worker_api::OffchainWorkerApi { + offchain_worker_api::OffchainWorkerApi + } + pub fn session_keys(&self) -> session_keys::SessionKeys { + session_keys::SessionKeys + } + pub fn q_po_w_api(&self) -> q_po_w_api::QPoWApi { + q_po_w_api::QPoWApi + } + pub fn account_nonce_api(&self) -> account_nonce_api::AccountNonceApi { + account_nonce_api::AccountNonceApi + } + pub fn transaction_payment_api( + &self, + ) -> transaction_payment_api::TransactionPaymentApi { + transaction_payment_api::TransactionPaymentApi + } + pub fn transaction_payment_call_api( + &self, + ) -> transaction_payment_call_api::TransactionPaymentCallApi { + transaction_payment_call_api::TransactionPaymentCallApi + } + pub fn genesis_builder(&self) -> genesis_builder::GenesisBuilder { + genesis_builder::GenesisBuilder + } } - } - pub struct ViewFunctionsApi; - impl ViewFunctionsApi {} - #[doc = r" check whether the metadata provided is aligned with this statically generated code."] - pub fn is_codegen_valid_for(metadata: &::subxt::ext::subxt_core::Metadata) -> bool { - let runtime_metadata_hash = metadata - .hasher() - .only_these_pallets(&PALLETS) - .only_these_runtime_apis(&RUNTIME_APIS) - .hash(); - runtime_metadata_hash == - [ - 194u8, 234u8, 109u8, 25u8, 240u8, 103u8, 143u8, 152u8, 152u8, 123u8, 135u8, 34u8, - 95u8, 169u8, 221u8, 115u8, 28u8, 211u8, 56u8, 222u8, 194u8, 231u8, 21u8, 105u8, - 64u8, 35u8, 195u8, 72u8, 212u8, 35u8, 16u8, 95u8, - ] - } - pub mod system { - use super::{root_mod, runtime_types}; - #[doc = "Error for the System pallet"] - pub type Error = runtime_types::frame_system::pallet::Error; - #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] - pub type Call = runtime_types::frame_system::pallet::Call; - pub mod calls { + pub mod core { use super::{root_mod, runtime_types}; - type DispatchError = runtime_types::sp_runtime::DispatchError; + #[doc = " The `Core` runtime api that every Substrate runtime needs to implement."] + pub struct Core; + impl Core { + #[doc = " Returns the version of the runtime."] + pub fn version( + &self, + ) -> ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload< + types::Version, + types::version::output::Output, + > { + ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload::new_static( + "Core", + "version", + types::Version {}, + [ + 79u8, 22u8, 137u8, 4u8, 40u8, 64u8, 30u8, 180u8, 49u8, 222u8, 114u8, + 125u8, 44u8, 25u8, 33u8, 152u8, 98u8, 42u8, 72u8, 178u8, 240u8, 103u8, + 34u8, 187u8, 81u8, 161u8, 183u8, 6u8, 120u8, 2u8, 146u8, 0u8, + ], + ) + } + #[doc = " Execute the given block."] + pub fn execute_block( + &self, + block: types::execute_block::Block, + ) -> ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload< + types::ExecuteBlock, + types::execute_block::output::Output, + > { + ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload::new_static( + "Core", + "execute_block", + types::ExecuteBlock { block }, + [ + 133u8, 135u8, 228u8, 65u8, 106u8, 27u8, 85u8, 158u8, 112u8, 254u8, + 93u8, 26u8, 102u8, 201u8, 118u8, 216u8, 249u8, 247u8, 91u8, 74u8, 56u8, + 208u8, 231u8, 115u8, 131u8, 29u8, 209u8, 6u8, 65u8, 57u8, 214u8, 125u8, + ], + ) + } + #[doc = " Initialize a block with the given header and return the runtime executive mode."] + pub fn initialize_block( + &self, + header: types::initialize_block::Header, + ) -> ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload< + types::InitializeBlock, + types::initialize_block::output::Output, + > { + ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload::new_static( + "Core", + "initialize_block", + types::InitializeBlock { header }, + [ + 132u8, 169u8, 113u8, 112u8, 80u8, 139u8, 113u8, 35u8, 41u8, 81u8, 36u8, + 35u8, 37u8, 202u8, 29u8, 207u8, 205u8, 229u8, 145u8, 7u8, 133u8, 94u8, + 25u8, 108u8, 233u8, 86u8, 234u8, 29u8, 236u8, 57u8, 56u8, 186u8, + ], + ) + } + } pub mod types { use super::runtime_types; + pub mod version { + use super::runtime_types; + pub mod output { + use super::runtime_types; + pub type Output = runtime_types::sp_version::RuntimeVersion; + } + } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, @@ -280,20 +189,14 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Make some on-chain remark."] - #[doc = ""] - #[doc = "Can be executed by every `origin`."] - pub struct Remark { - pub remark: remark::Remark, - } - pub mod remark { + pub struct Version {} + pub mod execute_block { use super::runtime_types; - pub type Remark = - ::subxt::ext::subxt_core::alloc::vec::Vec<::core::primitive::u8>; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for Remark { - const PALLET: &'static str = "System"; - const CALL: &'static str = "remark"; + pub type Block = runtime_types :: sp_runtime :: generic :: block :: Block < runtime_types :: sp_runtime :: generic :: header :: Header < :: core :: primitive :: u32 > , :: subxt :: ext :: subxt_core :: utils :: UncheckedExtrinsic < :: subxt :: ext :: subxt_core :: utils :: MultiAddress < :: subxt :: ext :: subxt_core :: utils :: AccountId32 , () > , runtime_types :: quantus_runtime :: RuntimeCall , runtime_types :: dilithium_crypto :: types :: DilithiumSignatureScheme , (runtime_types :: frame_system :: extensions :: check_non_zero_sender :: CheckNonZeroSender , runtime_types :: frame_system :: extensions :: check_spec_version :: CheckSpecVersion , runtime_types :: frame_system :: extensions :: check_tx_version :: CheckTxVersion , runtime_types :: frame_system :: extensions :: check_genesis :: CheckGenesis , runtime_types :: frame_system :: extensions :: check_mortality :: CheckMortality , runtime_types :: frame_system :: extensions :: check_nonce :: CheckNonce , runtime_types :: frame_system :: extensions :: check_weight :: CheckWeight , runtime_types :: pallet_transaction_payment :: ChargeTransactionPayment , runtime_types :: frame_metadata_hash_extension :: CheckMetadataHash , runtime_types :: quantus_runtime :: transaction_extensions :: ReversibleTransactionExtension ,) > > ; + pub mod output { + use super::runtime_types; + pub type Output = (); + } } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -306,17 +209,17 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Set the number of pages in the WebAssembly environment's heap."] - pub struct SetHeapPages { - pub pages: set_heap_pages::Pages, + pub struct ExecuteBlock { + pub block: execute_block::Block, } - pub mod set_heap_pages { + pub mod initialize_block { use super::runtime_types; - pub type Pages = ::core::primitive::u64; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for SetHeapPages { - const PALLET: &'static str = "System"; - const CALL: &'static str = "set_heap_pages"; + pub type Header = + runtime_types::sp_runtime::generic::header::Header<::core::primitive::u32>; + pub mod output { + use super::runtime_types; + pub type Output = runtime_types::sp_runtime::ExtrinsicInclusionMode; + } } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -329,18 +232,87 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Set the new runtime code."] - pub struct SetCode { - pub code: set_code::Code, + pub struct InitializeBlock { + pub header: initialize_block::Header, } - pub mod set_code { - use super::runtime_types; - pub type Code = - ::subxt::ext::subxt_core::alloc::vec::Vec<::core::primitive::u8>; + } + } + pub mod metadata { + use super::{root_mod, runtime_types}; + #[doc = " The `Metadata` api trait that returns metadata for the runtime."] + pub struct Metadata; + impl Metadata { + #[doc = " Returns the metadata of a runtime."] + pub fn metadata( + &self, + ) -> ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload< + types::Metadata, + types::metadata::output::Output, + > { + ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload::new_static( + "Metadata", + "metadata", + types::Metadata {}, + [ + 231u8, 24u8, 67u8, 152u8, 23u8, 26u8, 188u8, 82u8, 229u8, 6u8, 185u8, + 27u8, 175u8, 68u8, 83u8, 122u8, 69u8, 89u8, 185u8, 74u8, 248u8, 87u8, + 217u8, 124u8, 193u8, 252u8, 199u8, 186u8, 196u8, 179u8, 179u8, 96u8, + ], + ) } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for SetCode { - const PALLET: &'static str = "System"; - const CALL: &'static str = "set_code"; + #[doc = " Returns the metadata at a given version."] + #[doc = ""] + #[doc = " If the given `version` isn't supported, this will return `None`."] + #[doc = " Use [`Self::metadata_versions`] to find out about supported metadata version of the runtime."] + pub fn metadata_at_version( + &self, + version: types::metadata_at_version::Version, + ) -> ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload< + types::MetadataAtVersion, + types::metadata_at_version::output::Output, + > { + ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload::new_static( + "Metadata", + "metadata_at_version", + types::MetadataAtVersion { version }, + [ + 131u8, 53u8, 212u8, 234u8, 16u8, 25u8, 120u8, 252u8, 153u8, 153u8, + 216u8, 28u8, 54u8, 113u8, 52u8, 236u8, 146u8, 68u8, 142u8, 8u8, 10u8, + 169u8, 131u8, 142u8, 204u8, 38u8, 48u8, 108u8, 134u8, 86u8, 226u8, + 61u8, + ], + ) + } + #[doc = " Returns the supported metadata versions."] + #[doc = ""] + #[doc = " This can be used to call `metadata_at_version`."] + pub fn metadata_versions( + &self, + ) -> ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload< + types::MetadataVersions, + types::metadata_versions::output::Output, + > { + ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload::new_static( + "Metadata", + "metadata_versions", + types::MetadataVersions {}, + [ + 23u8, 144u8, 137u8, 91u8, 188u8, 39u8, 231u8, 208u8, 252u8, 218u8, + 224u8, 176u8, 77u8, 32u8, 130u8, 212u8, 223u8, 76u8, 100u8, 190u8, + 82u8, 94u8, 190u8, 8u8, 82u8, 244u8, 225u8, 179u8, 85u8, 176u8, 56u8, + 16u8, + ], + ) + } + } + pub mod types { + use super::runtime_types; + pub mod metadata { + use super::runtime_types; + pub mod output { + use super::runtime_types; + pub type Output = runtime_types::sp_core::OpaqueMetadata; + } } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -353,21 +325,15 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Set the new runtime code without doing any checks of the given `code`."] - #[doc = ""] - #[doc = "Note that runtime upgrades will not run if this is called with a not-increasing spec"] - #[doc = "version!"] - pub struct SetCodeWithoutChecks { - pub code: set_code_without_checks::Code, - } - pub mod set_code_without_checks { + pub struct Metadata {} + pub mod metadata_at_version { use super::runtime_types; - pub type Code = - ::subxt::ext::subxt_core::alloc::vec::Vec<::core::primitive::u8>; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for SetCodeWithoutChecks { - const PALLET: &'static str = "System"; - const CALL: &'static str = "set_code_without_checks"; + pub type Version = ::core::primitive::u32; + pub mod output { + use super::runtime_types; + pub type Output = + ::core::option::Option; + } } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -380,20 +346,16 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Set some items of storage."] - pub struct SetStorage { - pub items: set_storage::Items, + pub struct MetadataAtVersion { + pub version: metadata_at_version::Version, } - pub mod set_storage { + pub mod metadata_versions { use super::runtime_types; - pub type Items = ::subxt::ext::subxt_core::alloc::vec::Vec<( - ::subxt::ext::subxt_core::alloc::vec::Vec<::core::primitive::u8>, - ::subxt::ext::subxt_core::alloc::vec::Vec<::core::primitive::u8>, - )>; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for SetStorage { - const PALLET: &'static str = "System"; - const CALL: &'static str = "set_storage"; + pub mod output { + use super::runtime_types; + pub type Output = + ::subxt::ext::subxt_core::alloc::vec::Vec<::core::primitive::u32>; + } } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -406,19 +368,105 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Kill some items from storage."] - pub struct KillStorage { - pub keys: kill_storage::Keys, + pub struct MetadataVersions {} + } + } + pub mod block_builder { + use super::{root_mod, runtime_types}; + #[doc = " The `BlockBuilder` api trait that provides the required functionality for building a block."] + pub struct BlockBuilder; + impl BlockBuilder { + #[doc = " Apply the given extrinsic."] + #[doc = ""] + #[doc = " Returns an inclusion outcome which specifies if this extrinsic is included in"] + #[doc = " this block or not."] + pub fn apply_extrinsic( + &self, + extrinsic: types::apply_extrinsic::Extrinsic, + ) -> ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload< + types::ApplyExtrinsic, + types::apply_extrinsic::output::Output, + > { + ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload::new_static( + "BlockBuilder", + "apply_extrinsic", + types::ApplyExtrinsic { extrinsic }, + [ + 192u8, 184u8, 199u8, 4u8, 85u8, 136u8, 214u8, 205u8, 29u8, 29u8, 98u8, + 145u8, 172u8, 92u8, 168u8, 161u8, 150u8, 133u8, 100u8, 243u8, 100u8, + 100u8, 118u8, 28u8, 104u8, 82u8, 93u8, 63u8, 79u8, 36u8, 149u8, 144u8, + ], + ) } - pub mod kill_storage { - use super::runtime_types; - pub type Keys = ::subxt::ext::subxt_core::alloc::vec::Vec< - ::subxt::ext::subxt_core::alloc::vec::Vec<::core::primitive::u8>, - >; + #[doc = " Finish the current block."] + pub fn finalize_block( + &self, + ) -> ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload< + types::FinalizeBlock, + types::finalize_block::output::Output, + > { + ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload::new_static( + "BlockBuilder", + "finalize_block", + types::FinalizeBlock {}, + [ + 244u8, 207u8, 24u8, 33u8, 13u8, 69u8, 9u8, 249u8, 145u8, 143u8, 122u8, + 96u8, 197u8, 55u8, 64u8, 111u8, 238u8, 224u8, 34u8, 201u8, 27u8, 146u8, + 232u8, 99u8, 191u8, 30u8, 114u8, 16u8, 32u8, 220u8, 58u8, 62u8, + ], + ) } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for KillStorage { - const PALLET: &'static str = "System"; - const CALL: &'static str = "kill_storage"; + #[doc = " Generate inherent extrinsics. The inherent data will vary from chain to chain."] + pub fn inherent_extrinsics( + &self, + inherent: types::inherent_extrinsics::Inherent, + ) -> ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload< + types::InherentExtrinsics, + types::inherent_extrinsics::output::Output, + > { + ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload::new_static( + "BlockBuilder", + "inherent_extrinsics", + types::InherentExtrinsics { inherent }, + [ + 254u8, 110u8, 245u8, 201u8, 250u8, 192u8, 27u8, 228u8, 151u8, 213u8, + 166u8, 89u8, 94u8, 81u8, 189u8, 234u8, 64u8, 18u8, 245u8, 80u8, 29u8, + 18u8, 140u8, 129u8, 113u8, 236u8, 135u8, 55u8, 79u8, 159u8, 175u8, + 183u8, + ], + ) + } + #[doc = " Check that the inherents are valid. The inherent data will vary from chain to chain."] + pub fn check_inherents( + &self, + block: types::check_inherents::Block, + data: types::check_inherents::Data, + ) -> ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload< + types::CheckInherents, + types::check_inherents::output::Output, + > { + ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload::new_static( + "BlockBuilder", + "check_inherents", + types::CheckInherents { block, data }, + [ + 153u8, 134u8, 1u8, 215u8, 139u8, 11u8, 53u8, 51u8, 210u8, 175u8, 197u8, + 28u8, 38u8, 209u8, 175u8, 247u8, 142u8, 157u8, 50u8, 151u8, 164u8, + 191u8, 181u8, 118u8, 80u8, 97u8, 160u8, 248u8, 110u8, 217u8, 181u8, + 234u8, + ], + ) + } + } + pub mod types { + use super::runtime_types; + pub mod apply_extrinsic { + use super::runtime_types; + pub type Extrinsic = :: subxt :: ext :: subxt_core :: utils :: UncheckedExtrinsic < :: subxt :: ext :: subxt_core :: utils :: MultiAddress < :: subxt :: ext :: subxt_core :: utils :: AccountId32 , () > , runtime_types :: quantus_runtime :: RuntimeCall , runtime_types :: dilithium_crypto :: types :: DilithiumSignatureScheme , (runtime_types :: frame_system :: extensions :: check_non_zero_sender :: CheckNonZeroSender , runtime_types :: frame_system :: extensions :: check_spec_version :: CheckSpecVersion , runtime_types :: frame_system :: extensions :: check_tx_version :: CheckTxVersion , runtime_types :: frame_system :: extensions :: check_genesis :: CheckGenesis , runtime_types :: frame_system :: extensions :: check_mortality :: CheckMortality , runtime_types :: frame_system :: extensions :: check_nonce :: CheckNonce , runtime_types :: frame_system :: extensions :: check_weight :: CheckWeight , runtime_types :: pallet_transaction_payment :: ChargeTransactionPayment , runtime_types :: frame_metadata_hash_extension :: CheckMetadataHash , runtime_types :: quantus_runtime :: transaction_extensions :: ReversibleTransactionExtension ,) > ; + pub mod output { + use super::runtime_types; + pub type Output = :: core :: result :: Result < :: core :: result :: Result < () , runtime_types :: sp_runtime :: DispatchError > , runtime_types :: sp_runtime :: transaction_validity :: TransactionValidityError > ; + } } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -431,23 +479,17 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Kill all storage items with a key that starts with the given prefix."] - #[doc = ""] - #[doc = "**NOTE:** We rely on the Root origin to provide us the number of subkeys under"] - #[doc = "the prefix we are removing to accurately calculate the weight of this function."] - pub struct KillPrefix { - pub prefix: kill_prefix::Prefix, - pub subkeys: kill_prefix::Subkeys, + pub struct ApplyExtrinsic { + pub extrinsic: apply_extrinsic::Extrinsic, } - pub mod kill_prefix { + pub mod finalize_block { use super::runtime_types; - pub type Prefix = - ::subxt::ext::subxt_core::alloc::vec::Vec<::core::primitive::u8>; - pub type Subkeys = ::core::primitive::u32; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for KillPrefix { - const PALLET: &'static str = "System"; - const CALL: &'static str = "kill_prefix"; + pub mod output { + use super::runtime_types; + pub type Output = runtime_types::sp_runtime::generic::header::Header< + ::core::primitive::u32, + >; + } } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -460,18 +502,14 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Make some on-chain remark and emit event."] - pub struct RemarkWithEvent { - pub remark: remark_with_event::Remark, - } - pub mod remark_with_event { + pub struct FinalizeBlock {} + pub mod inherent_extrinsics { use super::runtime_types; - pub type Remark = - ::subxt::ext::subxt_core::alloc::vec::Vec<::core::primitive::u8>; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for RemarkWithEvent { - const PALLET: &'static str = "System"; - const CALL: &'static str = "remark_with_event"; + pub type Inherent = runtime_types::sp_inherents::InherentData; + pub mod output { + use super::runtime_types; + pub type Output = :: subxt :: ext :: subxt_core :: alloc :: vec :: Vec < :: subxt :: ext :: subxt_core :: utils :: UncheckedExtrinsic < :: subxt :: ext :: subxt_core :: utils :: MultiAddress < :: subxt :: ext :: subxt_core :: utils :: AccountId32 , () > , runtime_types :: quantus_runtime :: RuntimeCall , runtime_types :: dilithium_crypto :: types :: DilithiumSignatureScheme , (runtime_types :: frame_system :: extensions :: check_non_zero_sender :: CheckNonZeroSender , runtime_types :: frame_system :: extensions :: check_spec_version :: CheckSpecVersion , runtime_types :: frame_system :: extensions :: check_tx_version :: CheckTxVersion , runtime_types :: frame_system :: extensions :: check_genesis :: CheckGenesis , runtime_types :: frame_system :: extensions :: check_mortality :: CheckMortality , runtime_types :: frame_system :: extensions :: check_nonce :: CheckNonce , runtime_types :: frame_system :: extensions :: check_weight :: CheckWeight , runtime_types :: pallet_transaction_payment :: ChargeTransactionPayment , runtime_types :: frame_metadata_hash_extension :: CheckMetadataHash , runtime_types :: quantus_runtime :: transaction_extensions :: ReversibleTransactionExtension ,) > > ; + } } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -484,20 +522,17 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Authorize an upgrade to a given `code_hash` for the runtime. The runtime can be supplied"] - #[doc = "later."] - #[doc = ""] - #[doc = "This call requires Root origin."] - pub struct AuthorizeUpgrade { - pub code_hash: authorize_upgrade::CodeHash, + pub struct InherentExtrinsics { + pub inherent: inherent_extrinsics::Inherent, } - pub mod authorize_upgrade { + pub mod check_inherents { use super::runtime_types; - pub type CodeHash = ::subxt::ext::subxt_core::utils::H256; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for AuthorizeUpgrade { - const PALLET: &'static str = "System"; - const CALL: &'static str = "authorize_upgrade"; + pub type Block = runtime_types :: sp_runtime :: generic :: block :: Block < runtime_types :: sp_runtime :: generic :: header :: Header < :: core :: primitive :: u32 > , :: subxt :: ext :: subxt_core :: utils :: UncheckedExtrinsic < :: subxt :: ext :: subxt_core :: utils :: MultiAddress < :: subxt :: ext :: subxt_core :: utils :: AccountId32 , () > , runtime_types :: quantus_runtime :: RuntimeCall , runtime_types :: dilithium_crypto :: types :: DilithiumSignatureScheme , (runtime_types :: frame_system :: extensions :: check_non_zero_sender :: CheckNonZeroSender , runtime_types :: frame_system :: extensions :: check_spec_version :: CheckSpecVersion , runtime_types :: frame_system :: extensions :: check_tx_version :: CheckTxVersion , runtime_types :: frame_system :: extensions :: check_genesis :: CheckGenesis , runtime_types :: frame_system :: extensions :: check_mortality :: CheckMortality , runtime_types :: frame_system :: extensions :: check_nonce :: CheckNonce , runtime_types :: frame_system :: extensions :: check_weight :: CheckWeight , runtime_types :: pallet_transaction_payment :: ChargeTransactionPayment , runtime_types :: frame_metadata_hash_extension :: CheckMetadataHash , runtime_types :: quantus_runtime :: transaction_extensions :: ReversibleTransactionExtension ,) > > ; + pub type Data = runtime_types::sp_inherents::InherentData; + pub mod output { + use super::runtime_types; + pub type Output = runtime_types::sp_inherents::CheckInherentsResult; + } } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -510,24 +545,60 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Authorize an upgrade to a given `code_hash` for the runtime. The runtime can be supplied"] - #[doc = "later."] - #[doc = ""] - #[doc = "WARNING: This authorizes an upgrade that will take place without any safety checks, for"] - #[doc = "example that the spec name remains the same and that the version number increases. Not"] - #[doc = "recommended for normal use. Use `authorize_upgrade` instead."] - #[doc = ""] - #[doc = "This call requires Root origin."] - pub struct AuthorizeUpgradeWithoutChecks { - pub code_hash: authorize_upgrade_without_checks::CodeHash, + pub struct CheckInherents { + pub block: check_inherents::Block, + pub data: check_inherents::Data, } - pub mod authorize_upgrade_without_checks { - use super::runtime_types; - pub type CodeHash = ::subxt::ext::subxt_core::utils::H256; + } + } + pub mod tagged_transaction_queue { + use super::{root_mod, runtime_types}; + #[doc = " The `TaggedTransactionQueue` api trait for interfering with the transaction queue."] + pub struct TaggedTransactionQueue; + impl TaggedTransactionQueue { + #[doc = " Validate the transaction."] + #[doc = ""] + #[doc = " This method is invoked by the transaction pool to learn details about given transaction."] + #[doc = " The implementation should make sure to verify the correctness of the transaction"] + #[doc = " against current state. The given `block_hash` corresponds to the hash of the block"] + #[doc = " that is used as current state."] + #[doc = ""] + #[doc = " Note that this call may be performed by the pool multiple times and transactions"] + #[doc = " might be verified in any possible order."] + pub fn validate_transaction( + &self, + source: types::validate_transaction::Source, + tx: types::validate_transaction::Tx, + block_hash: types::validate_transaction::BlockHash, + ) -> ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload< + types::ValidateTransaction, + types::validate_transaction::output::Output, + > { + ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload::new_static( + "TaggedTransactionQueue", + "validate_transaction", + types::ValidateTransaction { source, tx, block_hash }, + [ + 19u8, 53u8, 170u8, 115u8, 75u8, 121u8, 231u8, 50u8, 199u8, 181u8, + 243u8, 170u8, 163u8, 224u8, 213u8, 134u8, 206u8, 207u8, 88u8, 242u8, + 80u8, 139u8, 233u8, 87u8, 175u8, 249u8, 178u8, 169u8, 255u8, 171u8, + 4u8, 125u8, + ], + ) } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for AuthorizeUpgradeWithoutChecks { - const PALLET: &'static str = "System"; - const CALL: &'static str = "authorize_upgrade_without_checks"; + } + pub mod types { + use super::runtime_types; + pub mod validate_transaction { + use super::runtime_types; + pub type Source = + runtime_types::sp_runtime::transaction_validity::TransactionSource; + pub type Tx = :: subxt :: ext :: subxt_core :: utils :: UncheckedExtrinsic < :: subxt :: ext :: subxt_core :: utils :: MultiAddress < :: subxt :: ext :: subxt_core :: utils :: AccountId32 , () > , runtime_types :: quantus_runtime :: RuntimeCall , runtime_types :: dilithium_crypto :: types :: DilithiumSignatureScheme , (runtime_types :: frame_system :: extensions :: check_non_zero_sender :: CheckNonZeroSender , runtime_types :: frame_system :: extensions :: check_spec_version :: CheckSpecVersion , runtime_types :: frame_system :: extensions :: check_tx_version :: CheckTxVersion , runtime_types :: frame_system :: extensions :: check_genesis :: CheckGenesis , runtime_types :: frame_system :: extensions :: check_mortality :: CheckMortality , runtime_types :: frame_system :: extensions :: check_nonce :: CheckNonce , runtime_types :: frame_system :: extensions :: check_weight :: CheckWeight , runtime_types :: pallet_transaction_payment :: ChargeTransactionPayment , runtime_types :: frame_metadata_hash_extension :: CheckMetadataHash , runtime_types :: quantus_runtime :: transaction_extensions :: ReversibleTransactionExtension ,) > ; + pub type BlockHash = ::subxt::ext::subxt_core::utils::H256; + pub mod output { + use super::runtime_types; + pub type Output = :: core :: result :: Result < runtime_types :: sp_runtime :: transaction_validity :: ValidTransaction , runtime_types :: sp_runtime :: transaction_validity :: TransactionValidityError > ; + } } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -540,1114 +611,1445 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Provide the preimage (runtime binary) `code` for an upgrade that has been authorized."] - #[doc = ""] - #[doc = "If the authorization required a version check, this call will ensure the spec name"] - #[doc = "remains unchanged and that the spec version has increased."] - #[doc = ""] - #[doc = "Depending on the runtime's `OnSetCode` configuration, this function may directly apply"] - #[doc = "the new `code` in the same block or attempt to schedule the upgrade."] - #[doc = ""] - #[doc = "All origins are allowed."] - pub struct ApplyAuthorizedUpgrade { - pub code: apply_authorized_upgrade::Code, + pub struct ValidateTransaction { + pub source: validate_transaction::Source, + pub tx: validate_transaction::Tx, + pub block_hash: validate_transaction::BlockHash, } - pub mod apply_authorized_upgrade { + } + } + pub mod offchain_worker_api { + use super::{root_mod, runtime_types}; + #[doc = " The offchain worker api."] + pub struct OffchainWorkerApi; + impl OffchainWorkerApi { + #[doc = " Starts the off-chain task for given block header."] + pub fn offchain_worker( + &self, + header: types::offchain_worker::Header, + ) -> ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload< + types::OffchainWorker, + types::offchain_worker::output::Output, + > { + ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload::new_static( + "OffchainWorkerApi", + "offchain_worker", + types::OffchainWorker { header }, + [ + 10u8, 135u8, 19u8, 153u8, 33u8, 216u8, 18u8, 242u8, 33u8, 140u8, 4u8, + 223u8, 200u8, 130u8, 103u8, 118u8, 137u8, 24u8, 19u8, 127u8, 161u8, + 29u8, 184u8, 111u8, 222u8, 111u8, 253u8, 73u8, 45u8, 31u8, 79u8, 60u8, + ], + ) + } + } + pub mod types { + use super::runtime_types; + pub mod offchain_worker { use super::runtime_types; - pub type Code = - ::subxt::ext::subxt_core::alloc::vec::Vec<::core::primitive::u8>; + pub type Header = + runtime_types::sp_runtime::generic::header::Header<::core::primitive::u32>; + pub mod output { + use super::runtime_types; + pub type Output = (); + } } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for ApplyAuthorizedUpgrade { - const PALLET: &'static str = "System"; - const CALL: &'static str = "apply_authorized_upgrade"; + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + pub struct OffchainWorker { + pub header: offchain_worker::Header, } } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Make some on-chain remark."] + } + pub mod session_keys { + use super::{root_mod, runtime_types}; + #[doc = " Session keys runtime api."] + pub struct SessionKeys; + impl SessionKeys { + #[doc = " Generate a set of session keys with optionally using the given seed."] + #[doc = " The keys should be stored within the keystore exposed via runtime"] + #[doc = " externalities."] + #[doc = ""] + #[doc = " The seed needs to be a valid `utf8` string."] + #[doc = ""] + #[doc = " Returns the concatenated SCALE encoded public keys."] + pub fn generate_session_keys( + &self, + seed: types::generate_session_keys::Seed, + ) -> ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload< + types::GenerateSessionKeys, + types::generate_session_keys::output::Output, + > { + ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload::new_static( + "SessionKeys", + "generate_session_keys", + types::GenerateSessionKeys { seed }, + [ + 96u8, 171u8, 164u8, 166u8, 175u8, 102u8, 101u8, 47u8, 133u8, 95u8, + 102u8, 202u8, 83u8, 26u8, 238u8, 47u8, 126u8, 132u8, 22u8, 11u8, 33u8, + 190u8, 175u8, 94u8, 58u8, 245u8, 46u8, 80u8, 195u8, 184u8, 107u8, 65u8, + ], + ) + } + #[doc = " Decode the given public session keys."] #[doc = ""] - #[doc = "Can be executed by every `origin`."] - pub fn remark( + #[doc = " Returns the list of public raw public keys + key type."] + pub fn decode_session_keys( &self, - remark: types::remark::Remark, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "System", - "remark", - types::Remark { remark }, + encoded: types::decode_session_keys::Encoded, + ) -> ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload< + types::DecodeSessionKeys, + types::decode_session_keys::output::Output, + > { + ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload::new_static( + "SessionKeys", + "decode_session_keys", + types::DecodeSessionKeys { encoded }, [ - 43u8, 126u8, 180u8, 174u8, 141u8, 48u8, 52u8, 125u8, 166u8, 212u8, - 216u8, 98u8, 100u8, 24u8, 132u8, 71u8, 101u8, 64u8, 246u8, 169u8, 33u8, - 250u8, 147u8, 208u8, 2u8, 40u8, 129u8, 209u8, 232u8, 207u8, 207u8, - 13u8, + 57u8, 242u8, 18u8, 51u8, 132u8, 110u8, 238u8, 255u8, 39u8, 194u8, 8u8, + 54u8, 198u8, 178u8, 75u8, 151u8, 148u8, 176u8, 144u8, 197u8, 87u8, + 29u8, 179u8, 235u8, 176u8, 78u8, 252u8, 103u8, 72u8, 203u8, 151u8, + 248u8, ], ) } - #[doc = "Set the number of pages in the WebAssembly environment's heap."] - pub fn set_heap_pages( + } + pub mod types { + use super::runtime_types; + pub mod generate_session_keys { + use super::runtime_types; + pub type Seed = ::core::option::Option< + ::subxt::ext::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + >; + pub mod output { + use super::runtime_types; + pub type Output = + ::subxt::ext::subxt_core::alloc::vec::Vec<::core::primitive::u8>; + } + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + pub struct GenerateSessionKeys { + pub seed: generate_session_keys::Seed, + } + pub mod decode_session_keys { + use super::runtime_types; + pub type Encoded = + ::subxt::ext::subxt_core::alloc::vec::Vec<::core::primitive::u8>; + pub mod output { + use super::runtime_types; + pub type Output = ::core::option::Option< + ::subxt::ext::subxt_core::alloc::vec::Vec<( + ::subxt::ext::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + runtime_types::sp_core::crypto::KeyTypeId, + )>, + >; + } + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + pub struct DecodeSessionKeys { + pub encoded: decode_session_keys::Encoded, + } + } + } + pub mod q_po_w_api { + use super::{root_mod, runtime_types}; + pub struct QPoWApi; + impl QPoWApi { + #[doc = " Verify a nonce for a historical block that's already in the chain"] + pub fn verify_historical_block( + &self, + header: types::verify_historical_block::Header, + nonce: types::verify_historical_block::Nonce, + block_number: types::verify_historical_block::BlockNumber, + ) -> ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload< + types::VerifyHistoricalBlock, + types::verify_historical_block::output::Output, + > { + ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload::new_static( + "QPoWApi", + "verify_historical_block", + types::VerifyHistoricalBlock { header, nonce, block_number }, + [ + 110u8, 10u8, 34u8, 119u8, 84u8, 17u8, 127u8, 204u8, 198u8, 160u8, + 190u8, 122u8, 224u8, 127u8, 150u8, 62u8, 227u8, 220u8, 49u8, 212u8, + 211u8, 96u8, 227u8, 95u8, 212u8, 124u8, 124u8, 159u8, 93u8, 74u8, 62u8, + 203u8, + ], + ) + } + #[doc = " calculate distance header with nonce to with nonce"] + pub fn get_nonce_distance( &self, - pages: types::set_heap_pages::Pages, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "System", - "set_heap_pages", - types::SetHeapPages { pages }, + block_hash: types::get_nonce_distance::BlockHash, + nonce: types::get_nonce_distance::Nonce, + ) -> ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload< + types::GetNonceDistance, + types::get_nonce_distance::output::Output, + > { + ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload::new_static( + "QPoWApi", + "get_nonce_distance", + types::GetNonceDistance { block_hash, nonce }, [ - 188u8, 191u8, 99u8, 216u8, 219u8, 109u8, 141u8, 50u8, 78u8, 235u8, - 215u8, 242u8, 195u8, 24u8, 111u8, 76u8, 229u8, 64u8, 99u8, 225u8, - 134u8, 121u8, 81u8, 209u8, 127u8, 223u8, 98u8, 215u8, 150u8, 70u8, - 57u8, 147u8, + 129u8, 114u8, 220u8, 23u8, 229u8, 124u8, 105u8, 65u8, 77u8, 91u8, 9u8, + 2u8, 2u8, 177u8, 124u8, 108u8, 143u8, 100u8, 174u8, 61u8, 29u8, 55u8, + 166u8, 162u8, 16u8, 61u8, 75u8, 213u8, 182u8, 125u8, 7u8, 120u8, ], ) } - #[doc = "Set the new runtime code."] - pub fn set_code( + #[doc = " Get the max possible reorg depth"] + pub fn get_max_reorg_depth( &self, - code: types::set_code::Code, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "System", - "set_code", - types::SetCode { code }, + ) -> ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload< + types::GetMaxReorgDepth, + types::get_max_reorg_depth::output::Output, + > { + ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload::new_static( + "QPoWApi", + "get_max_reorg_depth", + types::GetMaxReorgDepth {}, + [ + 95u8, 253u8, 190u8, 31u8, 75u8, 182u8, 224u8, 166u8, 3u8, 9u8, 29u8, + 200u8, 89u8, 143u8, 104u8, 126u8, 178u8, 83u8, 156u8, 109u8, 140u8, + 177u8, 70u8, 113u8, 23u8, 182u8, 236u8, 236u8, 111u8, 145u8, 237u8, + 148u8, + ], + ) + } + #[doc = " Get the max possible distance_threshold for work calculation"] + pub fn get_max_distance( + &self, + ) -> ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload< + types::GetMaxDistance, + types::get_max_distance::output::Output, + > { + ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload::new_static( + "QPoWApi", + "get_max_distance", + types::GetMaxDistance {}, [ - 233u8, 248u8, 88u8, 245u8, 28u8, 65u8, 25u8, 169u8, 35u8, 237u8, 19u8, - 203u8, 136u8, 160u8, 18u8, 3u8, 20u8, 197u8, 81u8, 169u8, 244u8, 188u8, - 27u8, 147u8, 147u8, 236u8, 65u8, 25u8, 3u8, 143u8, 182u8, 22u8, + 228u8, 221u8, 157u8, 71u8, 206u8, 66u8, 16u8, 79u8, 17u8, 1u8, 0u8, + 134u8, 36u8, 195u8, 232u8, 254u8, 165u8, 162u8, 169u8, 184u8, 85u8, + 136u8, 11u8, 10u8, 40u8, 197u8, 225u8, 249u8, 240u8, 43u8, 120u8, 45u8, ], ) } - #[doc = "Set the new runtime code without doing any checks of the given `code`."] - #[doc = ""] - #[doc = "Note that runtime upgrades will not run if this is called with a not-increasing spec"] - #[doc = "version!"] - pub fn set_code_without_checks( + #[doc = " Get the current difficulty (max_distance / distance_threshold)"] + pub fn get_difficulty( &self, - code: types::set_code_without_checks::Code, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload - { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "System", - "set_code_without_checks", - types::SetCodeWithoutChecks { code }, + ) -> ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload< + types::GetDifficulty, + types::get_difficulty::output::Output, + > { + ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload::new_static( + "QPoWApi", + "get_difficulty", + types::GetDifficulty {}, [ - 82u8, 212u8, 157u8, 44u8, 70u8, 0u8, 143u8, 15u8, 109u8, 109u8, 107u8, - 157u8, 141u8, 42u8, 169u8, 11u8, 15u8, 186u8, 252u8, 138u8, 10u8, - 147u8, 15u8, 178u8, 247u8, 229u8, 213u8, 98u8, 207u8, 231u8, 119u8, - 115u8, + 180u8, 101u8, 92u8, 73u8, 15u8, 146u8, 167u8, 45u8, 127u8, 230u8, + 148u8, 6u8, 174u8, 121u8, 38u8, 103u8, 46u8, 5u8, 235u8, 20u8, 133u8, + 207u8, 67u8, 211u8, 25u8, 112u8, 83u8, 196u8, 118u8, 66u8, 118u8, + 179u8, ], ) } - #[doc = "Set some items of storage."] - pub fn set_storage( + #[doc = " Get the current distance_threshold target for proof generation"] + pub fn get_distance_threshold( &self, - items: types::set_storage::Items, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "System", - "set_storage", - types::SetStorage { items }, + ) -> ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload< + types::GetDistanceThreshold, + types::get_distance_threshold::output::Output, + > { + ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload::new_static( + "QPoWApi", + "get_distance_threshold", + types::GetDistanceThreshold {}, [ - 141u8, 216u8, 52u8, 222u8, 223u8, 136u8, 123u8, 181u8, 19u8, 75u8, - 163u8, 102u8, 229u8, 189u8, 158u8, 142u8, 95u8, 235u8, 240u8, 49u8, - 150u8, 76u8, 78u8, 137u8, 126u8, 88u8, 183u8, 88u8, 231u8, 146u8, - 234u8, 43u8, + 84u8, 236u8, 60u8, 104u8, 10u8, 61u8, 150u8, 165u8, 61u8, 214u8, 204u8, + 210u8, 47u8, 211u8, 67u8, 136u8, 243u8, 72u8, 252u8, 132u8, 128u8, + 28u8, 166u8, 87u8, 131u8, 48u8, 61u8, 109u8, 115u8, 66u8, 190u8, 201u8, ], ) } - #[doc = "Kill some items from storage."] - pub fn kill_storage( + #[doc = " Get distance_threshold at block"] + pub fn get_distance_threshold_at_block( &self, - keys: types::kill_storage::Keys, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "System", - "kill_storage", - types::KillStorage { keys }, + block_number: types::get_distance_threshold_at_block::BlockNumber, + ) -> ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload< + types::GetDistanceThresholdAtBlock, + types::get_distance_threshold_at_block::output::Output, + > { + ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload::new_static( + "QPoWApi", + "get_distance_threshold_at_block", + types::GetDistanceThresholdAtBlock { block_number }, [ - 73u8, 63u8, 196u8, 36u8, 144u8, 114u8, 34u8, 213u8, 108u8, 93u8, 209u8, - 234u8, 153u8, 185u8, 33u8, 91u8, 187u8, 195u8, 223u8, 130u8, 58u8, - 156u8, 63u8, 47u8, 228u8, 249u8, 216u8, 139u8, 143u8, 177u8, 41u8, - 35u8, + 22u8, 139u8, 170u8, 164u8, 154u8, 98u8, 153u8, 248u8, 43u8, 220u8, + 56u8, 38u8, 101u8, 236u8, 112u8, 68u8, 45u8, 57u8, 158u8, 156u8, 252u8, + 177u8, 112u8, 188u8, 176u8, 200u8, 221u8, 206u8, 144u8, 8u8, 98u8, + 106u8, ], ) } - #[doc = "Kill all storage items with a key that starts with the given prefix."] - #[doc = ""] - #[doc = "**NOTE:** We rely on the Root origin to provide us the number of subkeys under"] - #[doc = "the prefix we are removing to accurately calculate the weight of this function."] - pub fn kill_prefix( + #[doc = " Get total work"] + pub fn get_total_work( &self, - prefix: types::kill_prefix::Prefix, - subkeys: types::kill_prefix::Subkeys, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "System", - "kill_prefix", - types::KillPrefix { prefix, subkeys }, + ) -> ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload< + types::GetTotalWork, + types::get_total_work::output::Output, + > { + ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload::new_static( + "QPoWApi", + "get_total_work", + types::GetTotalWork {}, [ - 184u8, 57u8, 139u8, 24u8, 208u8, 87u8, 108u8, 215u8, 198u8, 189u8, - 175u8, 242u8, 167u8, 215u8, 97u8, 63u8, 110u8, 166u8, 238u8, 98u8, - 67u8, 236u8, 111u8, 110u8, 234u8, 81u8, 102u8, 5u8, 182u8, 5u8, 214u8, - 85u8, + 1u8, 91u8, 59u8, 140u8, 203u8, 250u8, 8u8, 65u8, 208u8, 35u8, 187u8, + 190u8, 255u8, 125u8, 190u8, 111u8, 216u8, 168u8, 83u8, 32u8, 37u8, + 203u8, 102u8, 226u8, 88u8, 207u8, 253u8, 59u8, 86u8, 72u8, 30u8, 171u8, ], ) } - #[doc = "Make some on-chain remark and emit event."] - pub fn remark_with_event( + #[doc = " Get sum of block times in rolling history"] + pub fn get_block_time_sum( &self, - remark: types::remark_with_event::Remark, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload - { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "System", - "remark_with_event", - types::RemarkWithEvent { remark }, + ) -> ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload< + types::GetBlockTimeSum, + types::get_block_time_sum::output::Output, + > { + ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload::new_static( + "QPoWApi", + "get_block_time_sum", + types::GetBlockTimeSum {}, + [ + 135u8, 226u8, 38u8, 138u8, 155u8, 194u8, 162u8, 121u8, 106u8, 22u8, + 48u8, 208u8, 71u8, 14u8, 50u8, 123u8, 66u8, 153u8, 169u8, 95u8, 75u8, + 70u8, 237u8, 160u8, 129u8, 81u8, 117u8, 200u8, 238u8, 102u8, 138u8, + 98u8, + ], + ) + } + #[doc = " Get median block time for preconfigured list of elements"] + pub fn get_median_block_time( + &self, + ) -> ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload< + types::GetMedianBlockTime, + types::get_median_block_time::output::Output, + > { + ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload::new_static( + "QPoWApi", + "get_median_block_time", + types::GetMedianBlockTime {}, [ - 120u8, 120u8, 153u8, 92u8, 184u8, 85u8, 34u8, 2u8, 174u8, 206u8, 105u8, - 228u8, 233u8, 130u8, 80u8, 246u8, 228u8, 59u8, 234u8, 240u8, 4u8, 49u8, - 147u8, 170u8, 115u8, 91u8, 149u8, 200u8, 228u8, 181u8, 8u8, 154u8, + 202u8, 211u8, 53u8, 71u8, 198u8, 56u8, 32u8, 243u8, 236u8, 124u8, + 116u8, 100u8, 215u8, 111u8, 101u8, 20u8, 4u8, 55u8, 98u8, 187u8, 90u8, + 224u8, 167u8, 20u8, 175u8, 252u8, 50u8, 220u8, 146u8, 87u8, 245u8, + 52u8, ], ) } - #[doc = "Authorize an upgrade to a given `code_hash` for the runtime. The runtime can be supplied"] - #[doc = "later."] - #[doc = ""] - #[doc = "This call requires Root origin."] - pub fn authorize_upgrade( + #[doc = " Get last block timestamp"] + pub fn get_last_block_time( &self, - code_hash: types::authorize_upgrade::CodeHash, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload - { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "System", - "authorize_upgrade", - types::AuthorizeUpgrade { code_hash }, + ) -> ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload< + types::GetLastBlockTime, + types::get_last_block_time::output::Output, + > { + ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload::new_static( + "QPoWApi", + "get_last_block_time", + types::GetLastBlockTime {}, [ - 4u8, 14u8, 76u8, 107u8, 209u8, 129u8, 9u8, 39u8, 193u8, 17u8, 84u8, - 254u8, 170u8, 214u8, 24u8, 155u8, 29u8, 184u8, 249u8, 241u8, 109u8, - 58u8, 145u8, 131u8, 109u8, 63u8, 38u8, 165u8, 107u8, 215u8, 217u8, - 172u8, + 207u8, 192u8, 227u8, 7u8, 154u8, 92u8, 133u8, 111u8, 21u8, 9u8, 21u8, + 171u8, 235u8, 117u8, 143u8, 199u8, 19u8, 67u8, 76u8, 35u8, 220u8, 32u8, + 221u8, 166u8, 0u8, 234u8, 107u8, 217u8, 122u8, 89u8, 91u8, 144u8, ], ) } - #[doc = "Authorize an upgrade to a given `code_hash` for the runtime. The runtime can be supplied"] - #[doc = "later."] - #[doc = ""] - #[doc = "WARNING: This authorizes an upgrade that will take place without any safety checks, for"] - #[doc = "example that the spec name remains the same and that the version number increases. Not"] - #[doc = "recommended for normal use. Use `authorize_upgrade` instead."] - #[doc = ""] - #[doc = "This call requires Root origin."] - pub fn authorize_upgrade_without_checks( + pub fn get_last_block_duration( &self, - code_hash: types::authorize_upgrade_without_checks::CodeHash, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload< - types::AuthorizeUpgradeWithoutChecks, + ) -> ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload< + types::GetLastBlockDuration, + types::get_last_block_duration::output::Output, > { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "System", - "authorize_upgrade_without_checks", - types::AuthorizeUpgradeWithoutChecks { code_hash }, + ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload::new_static( + "QPoWApi", + "get_last_block_duration", + types::GetLastBlockDuration {}, [ - 126u8, 126u8, 55u8, 26u8, 47u8, 55u8, 66u8, 8u8, 167u8, 18u8, 29u8, - 136u8, 146u8, 14u8, 189u8, 117u8, 16u8, 227u8, 162u8, 61u8, 149u8, - 197u8, 104u8, 184u8, 185u8, 161u8, 99u8, 154u8, 80u8, 125u8, 181u8, - 233u8, + 103u8, 98u8, 123u8, 21u8, 125u8, 171u8, 88u8, 46u8, 187u8, 94u8, 96u8, + 238u8, 16u8, 122u8, 81u8, 108u8, 157u8, 204u8, 79u8, 43u8, 170u8, + 235u8, 176u8, 238u8, 174u8, 235u8, 47u8, 152u8, 167u8, 245u8, 243u8, + 157u8, ], ) } - #[doc = "Provide the preimage (runtime binary) `code` for an upgrade that has been authorized."] - #[doc = ""] - #[doc = "If the authorization required a version check, this call will ensure the spec name"] - #[doc = "remains unchanged and that the spec version has increased."] - #[doc = ""] - #[doc = "Depending on the runtime's `OnSetCode` configuration, this function may directly apply"] - #[doc = "the new `code` in the same block or attempt to schedule the upgrade."] - #[doc = ""] - #[doc = "All origins are allowed."] - pub fn apply_authorized_upgrade( + pub fn get_chain_height( &self, - code: types::apply_authorized_upgrade::Code, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload< - types::ApplyAuthorizedUpgrade, + ) -> ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload< + types::GetChainHeight, + types::get_chain_height::output::Output, > { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "System", - "apply_authorized_upgrade", - types::ApplyAuthorizedUpgrade { code }, + ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload::new_static( + "QPoWApi", + "get_chain_height", + types::GetChainHeight {}, [ - 232u8, 107u8, 127u8, 38u8, 230u8, 29u8, 97u8, 4u8, 160u8, 191u8, 222u8, - 156u8, 245u8, 102u8, 196u8, 141u8, 44u8, 163u8, 98u8, 68u8, 125u8, - 32u8, 124u8, 101u8, 108u8, 93u8, 211u8, 52u8, 0u8, 231u8, 33u8, 227u8, + 249u8, 203u8, 37u8, 234u8, 170u8, 203u8, 200u8, 147u8, 30u8, 193u8, + 91u8, 97u8, 96u8, 104u8, 39u8, 96u8, 171u8, 69u8, 119u8, 30u8, 112u8, + 81u8, 132u8, 33u8, 69u8, 168u8, 70u8, 33u8, 196u8, 16u8, 215u8, 113u8, + ], + ) + } + pub fn get_random_rsa( + &self, + block_hash: types::get_random_rsa::BlockHash, + ) -> ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload< + types::GetRandomRsa, + types::get_random_rsa::output::Output, + > { + ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload::new_static( + "QPoWApi", + "get_random_rsa", + types::GetRandomRsa { block_hash }, + [ + 179u8, 195u8, 121u8, 252u8, 235u8, 176u8, 160u8, 58u8, 188u8, 236u8, + 106u8, 222u8, 47u8, 7u8, 73u8, 89u8, 186u8, 175u8, 25u8, 77u8, 196u8, + 68u8, 111u8, 186u8, 181u8, 178u8, 2u8, 205u8, 215u8, 142u8, 157u8, + 160u8, + ], + ) + } + pub fn hash_to_group_bigint( + &self, + h: types::hash_to_group_bigint::H, + m: types::hash_to_group_bigint::M, + n: types::hash_to_group_bigint::N, + solution: types::hash_to_group_bigint::Solution, + ) -> ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload< + types::HashToGroupBigint, + types::hash_to_group_bigint::output::Output, + > { + ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload::new_static( + "QPoWApi", + "hash_to_group_bigint", + types::HashToGroupBigint { h, m, n, solution }, + [ + 117u8, 71u8, 148u8, 115u8, 194u8, 210u8, 59u8, 139u8, 102u8, 255u8, + 55u8, 207u8, 118u8, 114u8, 98u8, 151u8, 147u8, 99u8, 142u8, 158u8, + 185u8, 151u8, 118u8, 31u8, 192u8, 26u8, 63u8, 150u8, 50u8, 123u8, 40u8, + 163u8, + ], + ) + } + pub fn verify_nonce_on_import_block( + &self, + block_hash: types::verify_nonce_on_import_block::BlockHash, + nonce: types::verify_nonce_on_import_block::Nonce, + ) -> ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload< + types::VerifyNonceOnImportBlock, + types::verify_nonce_on_import_block::output::Output, + > { + ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload::new_static( + "QPoWApi", + "verify_nonce_on_import_block", + types::VerifyNonceOnImportBlock { block_hash, nonce }, + [ + 178u8, 216u8, 20u8, 254u8, 253u8, 202u8, 63u8, 238u8, 164u8, 135u8, + 163u8, 28u8, 170u8, 44u8, 183u8, 157u8, 211u8, 62u8, 4u8, 77u8, 30u8, + 32u8, 68u8, 166u8, 42u8, 161u8, 111u8, 79u8, 54u8, 54u8, 40u8, 15u8, + ], + ) + } + pub fn verify_nonce_local_mining( + &self, + block_hash: types::verify_nonce_local_mining::BlockHash, + nonce: types::verify_nonce_local_mining::Nonce, + ) -> ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload< + types::VerifyNonceLocalMining, + types::verify_nonce_local_mining::output::Output, + > { + ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload::new_static( + "QPoWApi", + "verify_nonce_local_mining", + types::VerifyNonceLocalMining { block_hash, nonce }, + [ + 10u8, 191u8, 243u8, 4u8, 31u8, 132u8, 202u8, 157u8, 183u8, 189u8, 49u8, + 76u8, 201u8, 182u8, 52u8, 197u8, 34u8, 248u8, 253u8, 226u8, 64u8, + 100u8, 108u8, 2u8, 119u8, 85u8, 184u8, 96u8, 25u8, 156u8, 108u8, 240u8, ], ) } } - } - #[doc = "Event for the System pallet."] - pub type Event = runtime_types::frame_system::pallet::Event; - pub mod events { - use super::runtime_types; - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "An extrinsic completed successfully."] - pub struct ExtrinsicSuccess { - pub dispatch_info: extrinsic_success::DispatchInfo, - } - pub mod extrinsic_success { - use super::runtime_types; - pub type DispatchInfo = runtime_types::frame_system::DispatchEventInfo; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for ExtrinsicSuccess { - const PALLET: &'static str = "System"; - const EVENT: &'static str = "ExtrinsicSuccess"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "An extrinsic failed."] - pub struct ExtrinsicFailed { - pub dispatch_error: extrinsic_failed::DispatchError, - pub dispatch_info: extrinsic_failed::DispatchInfo, - } - pub mod extrinsic_failed { - use super::runtime_types; - pub type DispatchError = runtime_types::sp_runtime::DispatchError; - pub type DispatchInfo = runtime_types::frame_system::DispatchEventInfo; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for ExtrinsicFailed { - const PALLET: &'static str = "System"; - const EVENT: &'static str = "ExtrinsicFailed"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "`:code` was updated."] - pub struct CodeUpdated; - impl ::subxt::ext::subxt_core::events::StaticEvent for CodeUpdated { - const PALLET: &'static str = "System"; - const EVENT: &'static str = "CodeUpdated"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "A new account was created."] - pub struct NewAccount { - pub account: new_account::Account, - } - pub mod new_account { - use super::runtime_types; - pub type Account = ::subxt::ext::subxt_core::utils::AccountId32; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for NewAccount { - const PALLET: &'static str = "System"; - const EVENT: &'static str = "NewAccount"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "An account was reaped."] - pub struct KilledAccount { - pub account: killed_account::Account, - } - pub mod killed_account { - use super::runtime_types; - pub type Account = ::subxt::ext::subxt_core::utils::AccountId32; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for KilledAccount { - const PALLET: &'static str = "System"; - const EVENT: &'static str = "KilledAccount"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "On on-chain remark happened."] - pub struct Remarked { - pub sender: remarked::Sender, - pub hash: remarked::Hash, - } - pub mod remarked { - use super::runtime_types; - pub type Sender = ::subxt::ext::subxt_core::utils::AccountId32; - pub type Hash = ::subxt::ext::subxt_core::utils::H256; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for Remarked { - const PALLET: &'static str = "System"; - const EVENT: &'static str = "Remarked"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "An upgrade was authorized."] - pub struct UpgradeAuthorized { - pub code_hash: upgrade_authorized::CodeHash, - pub check_version: upgrade_authorized::CheckVersion, - } - pub mod upgrade_authorized { - use super::runtime_types; - pub type CodeHash = ::subxt::ext::subxt_core::utils::H256; - pub type CheckVersion = ::core::primitive::bool; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for UpgradeAuthorized { - const PALLET: &'static str = "System"; - const EVENT: &'static str = "UpgradeAuthorized"; - } - } - pub mod storage { - use super::runtime_types; pub mod types { use super::runtime_types; - pub mod account { + pub mod verify_historical_block { use super::runtime_types; - pub type Account = runtime_types::frame_system::AccountInfo< - ::core::primitive::u32, - runtime_types::pallet_balances::types::AccountData<::core::primitive::u128>, - >; - pub type Param0 = ::subxt::ext::subxt_core::utils::AccountId32; + pub type Header = [::core::primitive::u8; 32usize]; + pub type Nonce = [::core::primitive::u8; 64usize]; + pub type BlockNumber = ::core::primitive::u32; + pub mod output { + use super::runtime_types; + pub type Output = ::core::primitive::bool; + } } - pub mod extrinsic_count { - use super::runtime_types; - pub type ExtrinsicCount = ::core::primitive::u32; + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + pub struct VerifyHistoricalBlock { + pub header: verify_historical_block::Header, + pub nonce: verify_historical_block::Nonce, + pub block_number: verify_historical_block::BlockNumber, } - pub mod inherents_applied { + pub mod get_nonce_distance { use super::runtime_types; - pub type InherentsApplied = ::core::primitive::bool; + pub type BlockHash = [::core::primitive::u8; 32usize]; + pub type Nonce = [::core::primitive::u8; 64usize]; + pub mod output { + use super::runtime_types; + pub type Output = runtime_types::primitive_types::U512; + } } - pub mod block_weight { - use super::runtime_types; - pub type BlockWeight = runtime_types::frame_support::dispatch::PerDispatchClass< - runtime_types::sp_weights::weight_v2::Weight, - >; + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + pub struct GetNonceDistance { + pub block_hash: get_nonce_distance::BlockHash, + pub nonce: get_nonce_distance::Nonce, } - pub mod all_extrinsics_len { + pub mod get_max_reorg_depth { use super::runtime_types; - pub type AllExtrinsicsLen = ::core::primitive::u32; + pub mod output { + use super::runtime_types; + pub type Output = ::core::primitive::u32; + } } - pub mod block_hash { + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + pub struct GetMaxReorgDepth {} + pub mod get_max_distance { use super::runtime_types; - pub type BlockHash = ::subxt::ext::subxt_core::utils::H256; - pub type Param0 = ::core::primitive::u32; + pub mod output { + use super::runtime_types; + pub type Output = runtime_types::primitive_types::U512; + } } - pub mod extrinsic_data { + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + pub struct GetMaxDistance {} + pub mod get_difficulty { use super::runtime_types; - pub type ExtrinsicData = - ::subxt::ext::subxt_core::alloc::vec::Vec<::core::primitive::u8>; - pub type Param0 = ::core::primitive::u32; + pub mod output { + use super::runtime_types; + pub type Output = runtime_types::primitive_types::U512; + } } - pub mod number { + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + pub struct GetDifficulty {} + pub mod get_distance_threshold { use super::runtime_types; - pub type Number = ::core::primitive::u32; + pub mod output { + use super::runtime_types; + pub type Output = runtime_types::primitive_types::U512; + } } - pub mod parent_hash { + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + pub struct GetDistanceThreshold {} + pub mod get_distance_threshold_at_block { use super::runtime_types; - pub type ParentHash = ::subxt::ext::subxt_core::utils::H256; + pub type BlockNumber = ::core::primitive::u32; + pub mod output { + use super::runtime_types; + pub type Output = runtime_types::primitive_types::U512; + } } - pub mod digest { - use super::runtime_types; - pub type Digest = runtime_types::sp_runtime::generic::digest::Digest; + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + pub struct GetDistanceThresholdAtBlock { + pub block_number: get_distance_threshold_at_block::BlockNumber, } - pub mod events { + pub mod get_total_work { use super::runtime_types; - pub type Events = ::subxt::ext::subxt_core::alloc::vec::Vec< - runtime_types::frame_system::EventRecord< - runtime_types::quantus_runtime::RuntimeEvent, - ::subxt::ext::subxt_core::utils::H256, - >, - >; + pub mod output { + use super::runtime_types; + pub type Output = runtime_types::primitive_types::U512; + } } - pub mod event_count { + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + pub struct GetTotalWork {} + pub mod get_block_time_sum { use super::runtime_types; - pub type EventCount = ::core::primitive::u32; + pub mod output { + use super::runtime_types; + pub type Output = ::core::primitive::u64; + } } - pub mod event_topics { + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + pub struct GetBlockTimeSum {} + pub mod get_median_block_time { use super::runtime_types; - pub type EventTopics = ::subxt::ext::subxt_core::alloc::vec::Vec<( - ::core::primitive::u32, - ::core::primitive::u32, - )>; - pub type Param0 = ::subxt::ext::subxt_core::utils::H256; + pub mod output { + use super::runtime_types; + pub type Output = ::core::primitive::u64; + } } - pub mod last_runtime_upgrade { + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + pub struct GetMedianBlockTime {} + pub mod get_last_block_time { use super::runtime_types; - pub type LastRuntimeUpgrade = - runtime_types::frame_system::LastRuntimeUpgradeInfo; + pub mod output { + use super::runtime_types; + pub type Output = ::core::primitive::u64; + } } - pub mod upgraded_to_u32_ref_count { + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + pub struct GetLastBlockTime {} + pub mod get_last_block_duration { use super::runtime_types; - pub type UpgradedToU32RefCount = ::core::primitive::bool; + pub mod output { + use super::runtime_types; + pub type Output = ::core::primitive::u64; + } } - pub mod upgraded_to_triple_ref_count { + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + pub struct GetLastBlockDuration {} + pub mod get_chain_height { use super::runtime_types; - pub type UpgradedToTripleRefCount = ::core::primitive::bool; + pub mod output { + use super::runtime_types; + pub type Output = ::core::primitive::u32; + } } - pub mod execution_phase { + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + pub struct GetChainHeight {} + pub mod get_random_rsa { use super::runtime_types; - pub type ExecutionPhase = runtime_types::frame_system::Phase; + pub type BlockHash = [::core::primitive::u8; 32usize]; + pub mod output { + use super::runtime_types; + pub type Output = ( + runtime_types::primitive_types::U512, + runtime_types::primitive_types::U512, + ); + } } - pub mod authorized_upgrade { + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + pub struct GetRandomRsa { + pub block_hash: get_random_rsa::BlockHash, + } + pub mod hash_to_group_bigint { use super::runtime_types; - pub type AuthorizedUpgrade = - runtime_types::frame_system::CodeUpgradeAuthorization; + pub type H = runtime_types::primitive_types::U512; + pub type M = runtime_types::primitive_types::U512; + pub type N = runtime_types::primitive_types::U512; + pub type Solution = runtime_types::primitive_types::U512; + pub mod output { + use super::runtime_types; + pub type Output = runtime_types::primitive_types::U512; + } + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + pub struct HashToGroupBigint { + pub h: hash_to_group_bigint::H, + pub m: hash_to_group_bigint::M, + pub n: hash_to_group_bigint::N, + pub solution: hash_to_group_bigint::Solution, + } + pub mod verify_nonce_on_import_block { + use super::runtime_types; + pub type BlockHash = [::core::primitive::u8; 32usize]; + pub type Nonce = [::core::primitive::u8; 64usize]; + pub mod output { + use super::runtime_types; + pub type Output = ::core::primitive::bool; + } + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + pub struct VerifyNonceOnImportBlock { + pub block_hash: verify_nonce_on_import_block::BlockHash, + pub nonce: verify_nonce_on_import_block::Nonce, + } + pub mod verify_nonce_local_mining { + use super::runtime_types; + pub type BlockHash = [::core::primitive::u8; 32usize]; + pub type Nonce = [::core::primitive::u8; 64usize]; + pub mod output { + use super::runtime_types; + pub type Output = ::core::primitive::bool; + } + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + pub struct VerifyNonceLocalMining { + pub block_hash: verify_nonce_local_mining::BlockHash, + pub nonce: verify_nonce_local_mining::Nonce, } } - pub struct StorageApi; - impl StorageApi { - #[doc = " The full account information for a particular account ID."] - pub fn account_iter( - &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::account::Account, - (), - ::subxt::ext::subxt_core::utils::Yes, - ::subxt::ext::subxt_core::utils::Yes, + } + pub mod account_nonce_api { + use super::{root_mod, runtime_types}; + #[doc = " The API to query account nonce."] + pub struct AccountNonceApi; + impl AccountNonceApi { + #[doc = " Get current account nonce of given `AccountId`."] + pub fn account_nonce( + &self, + account: types::account_nonce::Account, + ) -> ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload< + types::AccountNonce, + types::account_nonce::output::Output, > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "System", - "Account", - (), - [ - 14u8, 233u8, 115u8, 214u8, 0u8, 109u8, 222u8, 121u8, 162u8, 65u8, 60u8, - 175u8, 209u8, 79u8, 222u8, 124u8, 22u8, 235u8, 138u8, 176u8, 133u8, - 124u8, 90u8, 158u8, 85u8, 45u8, 37u8, 174u8, 47u8, 79u8, 47u8, 166u8, + ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload::new_static( + "AccountNonceApi", + "account_nonce", + types::AccountNonce { account }, + [ + 231u8, 82u8, 7u8, 227u8, 131u8, 2u8, 215u8, 252u8, 173u8, 82u8, 11u8, + 103u8, 200u8, 25u8, 114u8, 116u8, 79u8, 229u8, 152u8, 150u8, 236u8, + 37u8, 101u8, 26u8, 220u8, 146u8, 182u8, 101u8, 73u8, 55u8, 191u8, + 171u8, ], ) } - #[doc = " The full account information for a particular account ID."] - pub fn account( - &self, - _0: types::account::Param0, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::account::Param0, - >, - types::account::Account, - ::subxt::ext::subxt_core::utils::Yes, - ::subxt::ext::subxt_core::utils::Yes, - (), + } + pub mod types { + use super::runtime_types; + pub mod account_nonce { + use super::runtime_types; + pub type Account = ::subxt::ext::subxt_core::utils::AccountId32; + pub mod output { + use super::runtime_types; + pub type Output = ::core::primitive::u32; + } + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + pub struct AccountNonce { + pub account: account_nonce::Account, + } + } + } + pub mod transaction_payment_api { + use super::{root_mod, runtime_types}; + pub struct TransactionPaymentApi; + impl TransactionPaymentApi { + pub fn query_info( + &self, + uxt: types::query_info::Uxt, + len: types::query_info::Len, + ) -> ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload< + types::QueryInfo, + types::query_info::output::Output, > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "System", - "Account", - ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), + ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload::new_static( + "TransactionPaymentApi", + "query_info", + types::QueryInfo { uxt, len }, [ - 14u8, 233u8, 115u8, 214u8, 0u8, 109u8, 222u8, 121u8, 162u8, 65u8, 60u8, - 175u8, 209u8, 79u8, 222u8, 124u8, 22u8, 235u8, 138u8, 176u8, 133u8, - 124u8, 90u8, 158u8, 85u8, 45u8, 37u8, 174u8, 47u8, 79u8, 47u8, 166u8, + 56u8, 30u8, 174u8, 34u8, 202u8, 24u8, 177u8, 189u8, 145u8, 36u8, 1u8, + 156u8, 98u8, 209u8, 178u8, 49u8, 198u8, 23u8, 150u8, 173u8, 35u8, + 205u8, 147u8, 129u8, 42u8, 22u8, 69u8, 3u8, 129u8, 8u8, 196u8, 139u8, ], ) } - #[doc = " Total extrinsics count for the current block."] - pub fn extrinsic_count( + pub fn query_fee_details( &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::extrinsic_count::ExtrinsicCount, - ::subxt::ext::subxt_core::utils::Yes, - (), - (), + uxt: types::query_fee_details::Uxt, + len: types::query_fee_details::Len, + ) -> ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload< + types::QueryFeeDetails, + types::query_fee_details::output::Output, > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "System", - "ExtrinsicCount", - (), + ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload::new_static( + "TransactionPaymentApi", + "query_fee_details", + types::QueryFeeDetails { uxt, len }, [ - 102u8, 76u8, 236u8, 42u8, 40u8, 231u8, 33u8, 222u8, 123u8, 147u8, - 153u8, 148u8, 234u8, 203u8, 181u8, 119u8, 6u8, 187u8, 177u8, 199u8, - 120u8, 47u8, 137u8, 254u8, 96u8, 100u8, 165u8, 182u8, 249u8, 230u8, - 159u8, 79u8, + 117u8, 60u8, 137u8, 159u8, 237u8, 252u8, 216u8, 238u8, 232u8, 1u8, + 100u8, 152u8, 26u8, 185u8, 145u8, 125u8, 68u8, 189u8, 4u8, 30u8, 125u8, + 7u8, 196u8, 153u8, 235u8, 51u8, 219u8, 108u8, 185u8, 254u8, 100u8, + 201u8, ], ) } - #[doc = " Whether all inherents have been applied."] - pub fn inherents_applied( + pub fn query_weight_to_fee( &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::inherents_applied::InherentsApplied, - ::subxt::ext::subxt_core::utils::Yes, - ::subxt::ext::subxt_core::utils::Yes, - (), + weight: types::query_weight_to_fee::Weight, + ) -> ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload< + types::QueryWeightToFee, + types::query_weight_to_fee::output::Output, > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "System", - "InherentsApplied", - (), + ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload::new_static( + "TransactionPaymentApi", + "query_weight_to_fee", + types::QueryWeightToFee { weight }, [ - 132u8, 249u8, 142u8, 252u8, 8u8, 103u8, 80u8, 120u8, 50u8, 6u8, 188u8, - 223u8, 101u8, 55u8, 165u8, 189u8, 172u8, 249u8, 165u8, 230u8, 183u8, - 109u8, 34u8, 65u8, 185u8, 150u8, 29u8, 8u8, 186u8, 129u8, 135u8, 239u8, + 206u8, 243u8, 189u8, 83u8, 231u8, 244u8, 247u8, 52u8, 126u8, 208u8, + 224u8, 5u8, 163u8, 108u8, 254u8, 114u8, 214u8, 156u8, 227u8, 217u8, + 211u8, 198u8, 121u8, 164u8, 110u8, 54u8, 181u8, 146u8, 50u8, 146u8, + 146u8, 23u8, ], ) } - #[doc = " The current weight for the block."] - pub fn block_weight( + pub fn query_length_to_fee( &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::block_weight::BlockWeight, - ::subxt::ext::subxt_core::utils::Yes, - ::subxt::ext::subxt_core::utils::Yes, - (), + length: types::query_length_to_fee::Length, + ) -> ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload< + types::QueryLengthToFee, + types::query_length_to_fee::output::Output, > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "System", - "BlockWeight", - (), + ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload::new_static( + "TransactionPaymentApi", + "query_length_to_fee", + types::QueryLengthToFee { length }, [ - 158u8, 46u8, 228u8, 89u8, 210u8, 214u8, 84u8, 154u8, 50u8, 68u8, 63u8, - 62u8, 43u8, 42u8, 99u8, 27u8, 54u8, 42u8, 146u8, 44u8, 241u8, 216u8, - 229u8, 30u8, 216u8, 255u8, 165u8, 238u8, 181u8, 130u8, 36u8, 102u8, + 92u8, 132u8, 29u8, 119u8, 66u8, 11u8, 196u8, 224u8, 129u8, 23u8, 249u8, + 12u8, 32u8, 28u8, 92u8, 50u8, 188u8, 101u8, 203u8, 229u8, 248u8, 216u8, + 130u8, 150u8, 212u8, 161u8, 81u8, 254u8, 116u8, 89u8, 162u8, 48u8, ], ) } - #[doc = " Total length (in bytes) for all extrinsics put together, for the current block."] - pub fn all_extrinsics_len( + } + pub mod types { + use super::runtime_types; + pub mod query_info { + use super::runtime_types; + pub type Uxt = :: subxt :: ext :: subxt_core :: utils :: UncheckedExtrinsic < :: subxt :: ext :: subxt_core :: utils :: MultiAddress < :: subxt :: ext :: subxt_core :: utils :: AccountId32 , () > , runtime_types :: quantus_runtime :: RuntimeCall , runtime_types :: dilithium_crypto :: types :: DilithiumSignatureScheme , (runtime_types :: frame_system :: extensions :: check_non_zero_sender :: CheckNonZeroSender , runtime_types :: frame_system :: extensions :: check_spec_version :: CheckSpecVersion , runtime_types :: frame_system :: extensions :: check_tx_version :: CheckTxVersion , runtime_types :: frame_system :: extensions :: check_genesis :: CheckGenesis , runtime_types :: frame_system :: extensions :: check_mortality :: CheckMortality , runtime_types :: frame_system :: extensions :: check_nonce :: CheckNonce , runtime_types :: frame_system :: extensions :: check_weight :: CheckWeight , runtime_types :: pallet_transaction_payment :: ChargeTransactionPayment , runtime_types :: frame_metadata_hash_extension :: CheckMetadataHash , runtime_types :: quantus_runtime :: transaction_extensions :: ReversibleTransactionExtension ,) > ; + pub type Len = ::core::primitive::u32; + pub mod output { + use super::runtime_types; + pub type Output = + runtime_types::pallet_transaction_payment::types::RuntimeDispatchInfo< + ::core::primitive::u128, + runtime_types::sp_weights::weight_v2::Weight, + >; + } + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + pub struct QueryInfo { + pub uxt: query_info::Uxt, + pub len: query_info::Len, + } + pub mod query_fee_details { + use super::runtime_types; + pub type Uxt = :: subxt :: ext :: subxt_core :: utils :: UncheckedExtrinsic < :: subxt :: ext :: subxt_core :: utils :: MultiAddress < :: subxt :: ext :: subxt_core :: utils :: AccountId32 , () > , runtime_types :: quantus_runtime :: RuntimeCall , runtime_types :: dilithium_crypto :: types :: DilithiumSignatureScheme , (runtime_types :: frame_system :: extensions :: check_non_zero_sender :: CheckNonZeroSender , runtime_types :: frame_system :: extensions :: check_spec_version :: CheckSpecVersion , runtime_types :: frame_system :: extensions :: check_tx_version :: CheckTxVersion , runtime_types :: frame_system :: extensions :: check_genesis :: CheckGenesis , runtime_types :: frame_system :: extensions :: check_mortality :: CheckMortality , runtime_types :: frame_system :: extensions :: check_nonce :: CheckNonce , runtime_types :: frame_system :: extensions :: check_weight :: CheckWeight , runtime_types :: pallet_transaction_payment :: ChargeTransactionPayment , runtime_types :: frame_metadata_hash_extension :: CheckMetadataHash , runtime_types :: quantus_runtime :: transaction_extensions :: ReversibleTransactionExtension ,) > ; + pub type Len = ::core::primitive::u32; + pub mod output { + use super::runtime_types; + pub type Output = + runtime_types::pallet_transaction_payment::types::FeeDetails< + ::core::primitive::u128, + >; + } + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + pub struct QueryFeeDetails { + pub uxt: query_fee_details::Uxt, + pub len: query_fee_details::Len, + } + pub mod query_weight_to_fee { + use super::runtime_types; + pub type Weight = runtime_types::sp_weights::weight_v2::Weight; + pub mod output { + use super::runtime_types; + pub type Output = ::core::primitive::u128; + } + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + pub struct QueryWeightToFee { + pub weight: query_weight_to_fee::Weight, + } + pub mod query_length_to_fee { + use super::runtime_types; + pub type Length = ::core::primitive::u32; + pub mod output { + use super::runtime_types; + pub type Output = ::core::primitive::u128; + } + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + pub struct QueryLengthToFee { + pub length: query_length_to_fee::Length, + } + } + } + pub mod transaction_payment_call_api { + use super::{root_mod, runtime_types}; + pub struct TransactionPaymentCallApi; + impl TransactionPaymentCallApi { + #[doc = " Query information of a dispatch class, weight, and fee of a given encoded `Call`."] + pub fn query_call_info( + &self, + call: types::query_call_info::Call, + len: types::query_call_info::Len, + ) -> ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload< + types::QueryCallInfo, + types::query_call_info::output::Output, + > { + ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload::new_static( + "TransactionPaymentCallApi", + "query_call_info", + types::QueryCallInfo { call, len }, + [ + 137u8, 213u8, 145u8, 74u8, 243u8, 30u8, 225u8, 181u8, 84u8, 222u8, + 242u8, 134u8, 217u8, 218u8, 177u8, 114u8, 170u8, 117u8, 198u8, 36u8, + 95u8, 74u8, 139u8, 114u8, 200u8, 128u8, 88u8, 95u8, 202u8, 132u8, 54u8, + 110u8, + ], + ) + } + #[doc = " Query fee details of a given encoded `Call`."] + pub fn query_call_fee_details( &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::all_extrinsics_len::AllExtrinsicsLen, - ::subxt::ext::subxt_core::utils::Yes, - (), - (), + call: types::query_call_fee_details::Call, + len: types::query_call_fee_details::Len, + ) -> ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload< + types::QueryCallFeeDetails, + types::query_call_fee_details::output::Output, > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "System", - "AllExtrinsicsLen", - (), + ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload::new_static( + "TransactionPaymentCallApi", + "query_call_fee_details", + types::QueryCallFeeDetails { call, len }, [ - 117u8, 86u8, 61u8, 243u8, 41u8, 51u8, 102u8, 214u8, 137u8, 100u8, - 243u8, 185u8, 122u8, 174u8, 187u8, 117u8, 86u8, 189u8, 63u8, 135u8, - 101u8, 218u8, 203u8, 201u8, 237u8, 254u8, 128u8, 183u8, 169u8, 221u8, - 242u8, 65u8, + 186u8, 20u8, 221u8, 69u8, 0u8, 177u8, 162u8, 164u8, 64u8, 67u8, 14u8, + 41u8, 60u8, 200u8, 55u8, 223u8, 35u8, 255u8, 96u8, 173u8, 29u8, 211u8, + 90u8, 140u8, 122u8, 108u8, 249u8, 199u8, 22u8, 52u8, 226u8, 124u8, ], ) } - #[doc = " Map of block numbers to block hashes."] - pub fn block_hash_iter( + #[doc = " Query the output of the current `WeightToFee` given some input."] + pub fn query_weight_to_fee( &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::block_hash::BlockHash, - (), - ::subxt::ext::subxt_core::utils::Yes, - ::subxt::ext::subxt_core::utils::Yes, + weight: types::query_weight_to_fee::Weight, + ) -> ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload< + types::QueryWeightToFee, + types::query_weight_to_fee::output::Output, > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "System", - "BlockHash", - (), + ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload::new_static( + "TransactionPaymentCallApi", + "query_weight_to_fee", + types::QueryWeightToFee { weight }, [ - 217u8, 32u8, 215u8, 253u8, 24u8, 182u8, 207u8, 178u8, 157u8, 24u8, - 103u8, 100u8, 195u8, 165u8, 69u8, 152u8, 112u8, 181u8, 56u8, 192u8, - 164u8, 16u8, 20u8, 222u8, 28u8, 214u8, 144u8, 142u8, 146u8, 69u8, - 202u8, 118u8, + 117u8, 91u8, 94u8, 22u8, 248u8, 212u8, 15u8, 23u8, 97u8, 116u8, 64u8, + 228u8, 83u8, 123u8, 87u8, 77u8, 97u8, 7u8, 98u8, 181u8, 6u8, 165u8, + 114u8, 141u8, 164u8, 113u8, 126u8, 88u8, 174u8, 171u8, 224u8, 35u8, ], ) } - #[doc = " Map of block numbers to block hashes."] - pub fn block_hash( + #[doc = " Query the output of the current `LengthToFee` given some input."] + pub fn query_length_to_fee( &self, - _0: types::block_hash::Param0, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::block_hash::Param0, - >, - types::block_hash::BlockHash, - ::subxt::ext::subxt_core::utils::Yes, - ::subxt::ext::subxt_core::utils::Yes, - (), + length: types::query_length_to_fee::Length, + ) -> ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload< + types::QueryLengthToFee, + types::query_length_to_fee::output::Output, > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "System", - "BlockHash", - ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), + ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload::new_static( + "TransactionPaymentCallApi", + "query_length_to_fee", + types::QueryLengthToFee { length }, [ - 217u8, 32u8, 215u8, 253u8, 24u8, 182u8, 207u8, 178u8, 157u8, 24u8, - 103u8, 100u8, 195u8, 165u8, 69u8, 152u8, 112u8, 181u8, 56u8, 192u8, - 164u8, 16u8, 20u8, 222u8, 28u8, 214u8, 144u8, 142u8, 146u8, 69u8, - 202u8, 118u8, + 246u8, 40u8, 4u8, 160u8, 152u8, 94u8, 170u8, 53u8, 205u8, 122u8, 5u8, + 69u8, 70u8, 25u8, 128u8, 156u8, 119u8, 134u8, 116u8, 147u8, 14u8, + 164u8, 65u8, 140u8, 86u8, 13u8, 250u8, 218u8, 89u8, 95u8, 234u8, 228u8, ], ) } - #[doc = " Extrinsics data for the current block (maps an extrinsic's index to its data)."] - pub fn extrinsic_data_iter( - &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::extrinsic_data::ExtrinsicData, - (), - ::subxt::ext::subxt_core::utils::Yes, - ::subxt::ext::subxt_core::utils::Yes, + } + pub mod types { + use super::runtime_types; + pub mod query_call_info { + use super::runtime_types; + pub type Call = runtime_types::quantus_runtime::RuntimeCall; + pub type Len = ::core::primitive::u32; + pub mod output { + use super::runtime_types; + pub type Output = + runtime_types::pallet_transaction_payment::types::RuntimeDispatchInfo< + ::core::primitive::u128, + runtime_types::sp_weights::weight_v2::Weight, + >; + } + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + pub struct QueryCallInfo { + pub call: query_call_info::Call, + pub len: query_call_info::Len, + } + pub mod query_call_fee_details { + use super::runtime_types; + pub type Call = runtime_types::quantus_runtime::RuntimeCall; + pub type Len = ::core::primitive::u32; + pub mod output { + use super::runtime_types; + pub type Output = + runtime_types::pallet_transaction_payment::types::FeeDetails< + ::core::primitive::u128, + >; + } + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + pub struct QueryCallFeeDetails { + pub call: query_call_fee_details::Call, + pub len: query_call_fee_details::Len, + } + pub mod query_weight_to_fee { + use super::runtime_types; + pub type Weight = runtime_types::sp_weights::weight_v2::Weight; + pub mod output { + use super::runtime_types; + pub type Output = ::core::primitive::u128; + } + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + pub struct QueryWeightToFee { + pub weight: query_weight_to_fee::Weight, + } + pub mod query_length_to_fee { + use super::runtime_types; + pub type Length = ::core::primitive::u32; + pub mod output { + use super::runtime_types; + pub type Output = ::core::primitive::u128; + } + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + pub struct QueryLengthToFee { + pub length: query_length_to_fee::Length, + } + } + } + pub mod genesis_builder { + use super::{root_mod, runtime_types}; + #[doc = " API to interact with `RuntimeGenesisConfig` for the runtime"] + pub struct GenesisBuilder; + impl GenesisBuilder { + #[doc = " Build `RuntimeGenesisConfig` from a JSON blob not using any defaults and store it in the"] + #[doc = " storage."] + #[doc = ""] + #[doc = " In the case of a FRAME-based runtime, this function deserializes the full"] + #[doc = " `RuntimeGenesisConfig` from the given JSON blob and puts it into the storage. If the"] + #[doc = " provided JSON blob is incorrect or incomplete or the deserialization fails, an error"] + #[doc = " is returned."] + #[doc = ""] + #[doc = " Please note that provided JSON blob must contain all `RuntimeGenesisConfig` fields, no"] + #[doc = " defaults will be used."] + pub fn build_state( + &self, + json: types::build_state::Json, + ) -> ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload< + types::BuildState, + types::build_state::output::Output, > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "System", - "ExtrinsicData", - (), + ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload::new_static( + "GenesisBuilder", + "build_state", + types::BuildState { json }, [ - 160u8, 180u8, 122u8, 18u8, 196u8, 26u8, 2u8, 37u8, 115u8, 232u8, 133u8, - 220u8, 106u8, 245u8, 4u8, 129u8, 42u8, 84u8, 241u8, 45u8, 199u8, 179u8, - 128u8, 61u8, 170u8, 137u8, 231u8, 156u8, 247u8, 57u8, 47u8, 38u8, + 203u8, 233u8, 104u8, 116u8, 111u8, 131u8, 201u8, 235u8, 117u8, 116u8, + 140u8, 185u8, 93u8, 25u8, 155u8, 210u8, 56u8, 49u8, 23u8, 32u8, 253u8, + 92u8, 149u8, 241u8, 85u8, 245u8, 137u8, 45u8, 209u8, 189u8, 81u8, 2u8, ], ) } - #[doc = " Extrinsics data for the current block (maps an extrinsic's index to its data)."] - pub fn extrinsic_data( + #[doc = " Returns a JSON blob representation of the built-in `RuntimeGenesisConfig` identified by"] + #[doc = " `id`."] + #[doc = ""] + #[doc = " If `id` is `None` the function should return JSON blob representation of the default"] + #[doc = " `RuntimeGenesisConfig` struct of the runtime. Implementation must provide default"] + #[doc = " `RuntimeGenesisConfig`."] + #[doc = ""] + #[doc = " Otherwise function returns a JSON representation of the built-in, named"] + #[doc = " `RuntimeGenesisConfig` preset identified by `id`, or `None` if such preset does not"] + #[doc = " exist. Returned `Vec` contains bytes of JSON blob (patch) which comprises a list of"] + #[doc = " (potentially nested) key-value pairs that are intended for customizing the default"] + #[doc = " runtime genesis config. The patch shall be merged (rfc7386) with the JSON representation"] + #[doc = " of the default `RuntimeGenesisConfig` to create a comprehensive genesis config that can"] + #[doc = " be used in `build_state` method."] + pub fn get_preset( &self, - _0: types::extrinsic_data::Param0, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::extrinsic_data::Param0, - >, - types::extrinsic_data::ExtrinsicData, - ::subxt::ext::subxt_core::utils::Yes, - ::subxt::ext::subxt_core::utils::Yes, - (), + id: types::get_preset::Id, + ) -> ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload< + types::GetPreset, + types::get_preset::output::Output, > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "System", - "ExtrinsicData", - ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), + ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload::new_static( + "GenesisBuilder", + "get_preset", + types::GetPreset { id }, [ - 160u8, 180u8, 122u8, 18u8, 196u8, 26u8, 2u8, 37u8, 115u8, 232u8, 133u8, - 220u8, 106u8, 245u8, 4u8, 129u8, 42u8, 84u8, 241u8, 45u8, 199u8, 179u8, - 128u8, 61u8, 170u8, 137u8, 231u8, 156u8, 247u8, 57u8, 47u8, 38u8, + 43u8, 153u8, 23u8, 52u8, 113u8, 161u8, 227u8, 122u8, 169u8, 135u8, + 119u8, 8u8, 128u8, 33u8, 143u8, 235u8, 13u8, 173u8, 58u8, 121u8, 178u8, + 223u8, 66u8, 217u8, 22u8, 244u8, 168u8, 113u8, 202u8, 186u8, 241u8, + 124u8, ], ) } - #[doc = " The current block number being processed. Set by `execute_block`."] - pub fn number( - &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::number::Number, - ::subxt::ext::subxt_core::utils::Yes, - ::subxt::ext::subxt_core::utils::Yes, - (), - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "System", - "Number", - (), - [ - 30u8, 194u8, 177u8, 90u8, 194u8, 232u8, 46u8, 180u8, 85u8, 129u8, 14u8, - 9u8, 8u8, 8u8, 23u8, 95u8, 230u8, 5u8, 13u8, 105u8, 125u8, 2u8, 22u8, - 200u8, 78u8, 93u8, 115u8, 28u8, 150u8, 113u8, 48u8, 53u8, - ], - ) - } - #[doc = " Hash of the previous block."] - pub fn parent_hash( - &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::parent_hash::ParentHash, - ::subxt::ext::subxt_core::utils::Yes, - ::subxt::ext::subxt_core::utils::Yes, - (), - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "System", - "ParentHash", - (), - [ - 26u8, 130u8, 11u8, 216u8, 155u8, 71u8, 128u8, 170u8, 30u8, 153u8, 21u8, - 192u8, 62u8, 93u8, 137u8, 80u8, 120u8, 81u8, 202u8, 94u8, 248u8, 125u8, - 71u8, 82u8, 141u8, 229u8, 32u8, 56u8, 73u8, 50u8, 101u8, 78u8, - ], - ) - } - #[doc = " Digest of the current block, also part of the block header."] - pub fn digest( - &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::digest::Digest, - ::subxt::ext::subxt_core::utils::Yes, - ::subxt::ext::subxt_core::utils::Yes, - (), - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "System", - "Digest", - (), - [ - 61u8, 64u8, 237u8, 91u8, 145u8, 232u8, 17u8, 254u8, 181u8, 16u8, 234u8, - 91u8, 51u8, 140u8, 254u8, 131u8, 98u8, 135u8, 21u8, 37u8, 251u8, 20u8, - 58u8, 92u8, 123u8, 141u8, 14u8, 227u8, 146u8, 46u8, 222u8, 117u8, - ], - ) - } - #[doc = " Events deposited for the current block."] - #[doc = ""] - #[doc = " NOTE: The item is unbound and should therefore never be read on chain."] - #[doc = " It could otherwise inflate the PoV size of a block."] + #[doc = " Returns a list of identifiers for available builtin `RuntimeGenesisConfig` presets."] #[doc = ""] - #[doc = " Events have a large in-memory size. Box the events to not go out-of-memory"] - #[doc = " just in case someone still reads them from within the runtime."] - pub fn events( + #[doc = " The presets from the list can be queried with [`GenesisBuilder::get_preset`] method. If"] + #[doc = " no named presets are provided by the runtime the list is empty."] + pub fn preset_names( &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::events::Events, - ::subxt::ext::subxt_core::utils::Yes, - ::subxt::ext::subxt_core::utils::Yes, - (), + ) -> ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload< + types::PresetNames, + types::preset_names::output::Output, > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "System", - "Events", - (), - [ - 95u8, 60u8, 238u8, 49u8, 111u8, 173u8, 121u8, 142u8, 243u8, 9u8, 153u8, - 23u8, 166u8, 110u8, 208u8, 76u8, 235u8, 221u8, 246u8, 174u8, 90u8, - 109u8, 149u8, 184u8, 200u8, 47u8, 95u8, 75u8, 180u8, 130u8, 124u8, - 112u8, + ::subxt::ext::subxt_core::runtime_api::payload::StaticPayload::new_static( + "GenesisBuilder", + "preset_names", + types::PresetNames {}, + [ + 150u8, 117u8, 54u8, 129u8, 221u8, 130u8, 186u8, 71u8, 13u8, 140u8, + 77u8, 180u8, 141u8, 37u8, 22u8, 219u8, 149u8, 218u8, 186u8, 206u8, + 80u8, 42u8, 165u8, 41u8, 99u8, 184u8, 73u8, 37u8, 125u8, 188u8, 167u8, + 122u8, ], ) } - #[doc = " The number of events in the `Events` list."] - pub fn event_count( - &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::event_count::EventCount, - ::subxt::ext::subxt_core::utils::Yes, - ::subxt::ext::subxt_core::utils::Yes, - (), - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "System", - "EventCount", - (), - [ - 175u8, 24u8, 252u8, 184u8, 210u8, 167u8, 146u8, 143u8, 164u8, 80u8, - 151u8, 205u8, 189u8, 189u8, 55u8, 220u8, 47u8, 101u8, 181u8, 33u8, - 254u8, 131u8, 13u8, 143u8, 3u8, 244u8, 245u8, 45u8, 2u8, 210u8, 79u8, - 133u8, - ], - ) + } + pub mod types { + use super::runtime_types; + pub mod build_state { + use super::runtime_types; + pub type Json = + ::subxt::ext::subxt_core::alloc::vec::Vec<::core::primitive::u8>; + pub mod output { + use super::runtime_types; + pub type Output = ::core::result::Result< + (), + ::subxt::ext::subxt_core::alloc::string::String, + >; + } } - #[doc = " Mapping between a topic (represented by T::Hash) and a vector of indexes"] - #[doc = " of events in the `>` list."] - #[doc = ""] - #[doc = " All topic vectors have deterministic storage locations depending on the topic. This"] - #[doc = " allows light-clients to leverage the changes trie storage tracking mechanism and"] - #[doc = " in case of changes fetch the list of events of interest."] - #[doc = ""] - #[doc = " The value has the type `(BlockNumberFor, EventIndex)` because if we used only just"] - #[doc = " the `EventIndex` then in case if the topic has the same contents on the next block"] - #[doc = " no notification will be triggered thus the event might be lost."] - pub fn event_topics_iter( - &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::event_topics::EventTopics, - (), - ::subxt::ext::subxt_core::utils::Yes, - ::subxt::ext::subxt_core::utils::Yes, - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "System", - "EventTopics", - (), - [ - 40u8, 225u8, 14u8, 75u8, 44u8, 176u8, 76u8, 34u8, 143u8, 107u8, 69u8, - 133u8, 114u8, 13u8, 172u8, 250u8, 141u8, 73u8, 12u8, 65u8, 217u8, 63u8, - 120u8, 241u8, 48u8, 106u8, 143u8, 161u8, 128u8, 100u8, 166u8, 59u8, - ], - ) + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + pub struct BuildState { + pub json: build_state::Json, } - #[doc = " Mapping between a topic (represented by T::Hash) and a vector of indexes"] - #[doc = " of events in the `>` list."] - #[doc = ""] - #[doc = " All topic vectors have deterministic storage locations depending on the topic. This"] - #[doc = " allows light-clients to leverage the changes trie storage tracking mechanism and"] - #[doc = " in case of changes fetch the list of events of interest."] - #[doc = ""] - #[doc = " The value has the type `(BlockNumberFor, EventIndex)` because if we used only just"] - #[doc = " the `EventIndex` then in case if the topic has the same contents on the next block"] - #[doc = " no notification will be triggered thus the event might be lost."] - pub fn event_topics( - &self, - _0: types::event_topics::Param0, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::event_topics::Param0, - >, - types::event_topics::EventTopics, - ::subxt::ext::subxt_core::utils::Yes, - ::subxt::ext::subxt_core::utils::Yes, - (), - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "System", - "EventTopics", - ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), - [ - 40u8, 225u8, 14u8, 75u8, 44u8, 176u8, 76u8, 34u8, 143u8, 107u8, 69u8, - 133u8, 114u8, 13u8, 172u8, 250u8, 141u8, 73u8, 12u8, 65u8, 217u8, 63u8, - 120u8, 241u8, 48u8, 106u8, 143u8, 161u8, 128u8, 100u8, 166u8, 59u8, - ], - ) + pub mod get_preset { + use super::runtime_types; + pub type Id = + ::core::option::Option<::subxt::ext::subxt_core::alloc::string::String>; + pub mod output { + use super::runtime_types; + pub type Output = ::core::option::Option< + ::subxt::ext::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + >; + } } - #[doc = " Stores the `spec_version` and `spec_name` of when the last runtime upgrade happened."] - pub fn last_runtime_upgrade( - &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::last_runtime_upgrade::LastRuntimeUpgrade, - ::subxt::ext::subxt_core::utils::Yes, - (), - (), - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "System", - "LastRuntimeUpgrade", - (), - [ - 197u8, 212u8, 249u8, 209u8, 79u8, 34u8, 55u8, 203u8, 31u8, 42u8, 199u8, - 242u8, 188u8, 74u8, 234u8, 250u8, 245u8, 44u8, 139u8, 162u8, 45u8, - 150u8, 230u8, 249u8, 135u8, 100u8, 158u8, 167u8, 118u8, 219u8, 28u8, - 98u8, - ], - ) + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + pub struct GetPreset { + pub id: get_preset::Id, } - #[doc = " True if we have upgraded so that `type RefCount` is `u32`. False (default) if not."] - pub fn upgraded_to_u32_ref_count( - &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::upgraded_to_u32_ref_count::UpgradedToU32RefCount, - ::subxt::ext::subxt_core::utils::Yes, - ::subxt::ext::subxt_core::utils::Yes, - (), - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "System", - "UpgradedToU32RefCount", - (), - [ - 229u8, 73u8, 9u8, 132u8, 186u8, 116u8, 151u8, 171u8, 145u8, 29u8, 34u8, - 130u8, 52u8, 146u8, 124u8, 175u8, 79u8, 189u8, 147u8, 230u8, 234u8, - 107u8, 124u8, 31u8, 2u8, 22u8, 86u8, 190u8, 4u8, 147u8, 50u8, 245u8, - ], - ) + pub mod preset_names { + use super::runtime_types; + pub mod output { + use super::runtime_types; + pub type Output = ::subxt::ext::subxt_core::alloc::vec::Vec< + ::subxt::ext::subxt_core::alloc::string::String, + >; + } } - #[doc = " True if we have upgraded so that AccountInfo contains three types of `RefCount`. False"] - #[doc = " (default) if not."] - pub fn upgraded_to_triple_ref_count( - &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::upgraded_to_triple_ref_count::UpgradedToTripleRefCount, - ::subxt::ext::subxt_core::utils::Yes, - ::subxt::ext::subxt_core::utils::Yes, - (), - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "System", - "UpgradedToTripleRefCount", - (), - [ - 97u8, 66u8, 124u8, 243u8, 27u8, 167u8, 147u8, 81u8, 254u8, 201u8, - 101u8, 24u8, 40u8, 231u8, 14u8, 179u8, 154u8, 163u8, 71u8, 81u8, 185u8, - 167u8, 82u8, 254u8, 189u8, 3u8, 101u8, 207u8, 206u8, 194u8, 155u8, - 151u8, - ], - ) - } - #[doc = " The execution phase of the block."] - pub fn execution_phase( - &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::execution_phase::ExecutionPhase, - ::subxt::ext::subxt_core::utils::Yes, - (), - (), - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "System", - "ExecutionPhase", - (), - [ - 191u8, 129u8, 100u8, 134u8, 126u8, 116u8, 154u8, 203u8, 220u8, 200u8, - 0u8, 26u8, 161u8, 250u8, 133u8, 205u8, 146u8, 24u8, 5u8, 156u8, 158u8, - 35u8, 36u8, 253u8, 52u8, 235u8, 86u8, 167u8, 35u8, 100u8, 119u8, 27u8, - ], - ) - } - #[doc = " `Some` if a code upgrade has been authorized."] - pub fn authorized_upgrade( - &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::authorized_upgrade::AuthorizedUpgrade, - ::subxt::ext::subxt_core::utils::Yes, - (), - (), - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "System", - "AuthorizedUpgrade", - (), - [ - 165u8, 97u8, 27u8, 138u8, 2u8, 28u8, 55u8, 92u8, 96u8, 96u8, 168u8, - 169u8, 55u8, 178u8, 44u8, 127u8, 58u8, 140u8, 206u8, 178u8, 1u8, 37u8, - 214u8, 213u8, 251u8, 123u8, 5u8, 111u8, 90u8, 148u8, 217u8, 135u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " Block & extrinsics weights: base values and limits."] - pub fn block_weights( - &self, - ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< - runtime_types::frame_system::limits::BlockWeights, - > { - ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "System", - "BlockWeights", - [ - 176u8, 124u8, 225u8, 136u8, 25u8, 73u8, 247u8, 33u8, 82u8, 206u8, 85u8, - 190u8, 127u8, 102u8, 71u8, 11u8, 185u8, 8u8, 58u8, 0u8, 94u8, 55u8, - 163u8, 177u8, 104u8, 59u8, 60u8, 136u8, 246u8, 116u8, 0u8, 239u8, - ], - ) - } - #[doc = " The maximum length of a block (in bytes)."] - pub fn block_length( - &self, - ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< - runtime_types::frame_system::limits::BlockLength, - > { - ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "System", - "BlockLength", - [ - 23u8, 242u8, 225u8, 39u8, 225u8, 67u8, 152u8, 41u8, 155u8, 104u8, 68u8, - 229u8, 185u8, 133u8, 10u8, 143u8, 184u8, 152u8, 234u8, 44u8, 140u8, - 96u8, 166u8, 235u8, 162u8, 160u8, 72u8, 7u8, 35u8, 194u8, 3u8, 37u8, - ], - ) - } - #[doc = " Maximum number of block number to block hash mappings to keep (oldest pruned first)."] - pub fn block_hash_count( - &self, - ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< - ::core::primitive::u32, - > { - ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "System", - "BlockHashCount", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, - ], - ) - } - #[doc = " The weight of runtime database operations the runtime can invoke."] - pub fn db_weight( - &self, - ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< - runtime_types::sp_weights::RuntimeDbWeight, - > { - ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "System", - "DbWeight", - [ - 42u8, 43u8, 178u8, 142u8, 243u8, 203u8, 60u8, 173u8, 118u8, 111u8, - 200u8, 170u8, 102u8, 70u8, 237u8, 187u8, 198u8, 120u8, 153u8, 232u8, - 183u8, 76u8, 74u8, 10u8, 70u8, 243u8, 14u8, 218u8, 213u8, 126u8, 29u8, - 177u8, - ], - ) - } - #[doc = " Get the chain's in-code version."] - pub fn version( - &self, - ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< - runtime_types::sp_version::RuntimeVersion, - > { - ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "System", - "Version", - [ - 214u8, 43u8, 96u8, 193u8, 96u8, 213u8, 63u8, 124u8, 22u8, 111u8, 41u8, - 78u8, 146u8, 77u8, 34u8, 163u8, 117u8, 100u8, 6u8, 216u8, 238u8, 54u8, - 80u8, 185u8, 219u8, 11u8, 192u8, 200u8, 129u8, 88u8, 161u8, 250u8, - ], - ) - } - #[doc = " The designated SS58 prefix of this chain."] - #[doc = ""] - #[doc = " This replaces the \"ss58Format\" property declared in the chain spec. Reason is"] - #[doc = " that the runtime should know about the prefix in order to make use of it as"] - #[doc = " an identifier of the chain."] - pub fn ss58_prefix( - &self, - ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< - ::core::primitive::u16, - > { - ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "System", - "SS58Prefix", - [ - 116u8, 33u8, 2u8, 170u8, 181u8, 147u8, 171u8, 169u8, 167u8, 227u8, - 41u8, 144u8, 11u8, 236u8, 82u8, 100u8, 74u8, 60u8, 184u8, 72u8, 169u8, - 90u8, 208u8, 135u8, 15u8, 117u8, 10u8, 123u8, 128u8, 193u8, 29u8, 70u8, - ], - ) - } - } - } - } - pub mod timestamp { - use super::{root_mod, runtime_types}; - #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] - pub type Call = runtime_types::pallet_timestamp::pallet::Call; - pub mod calls { - use super::{root_mod, runtime_types}; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub mod types { - use super::runtime_types; #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, @@ -1659,324 +2061,238 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Set the current time."] - #[doc = ""] - #[doc = "This call should be invoked exactly once per block. It will panic at the finalization"] - #[doc = "phase, if this call hasn't been invoked by that time."] - #[doc = ""] - #[doc = "The timestamp should be greater than the previous one by the amount specified by"] - #[doc = "[`Config::MinimumPeriod`]."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _None_."] - #[doc = ""] - #[doc = "This dispatch class is _Mandatory_ to ensure it gets executed in the block. Be aware"] - #[doc = "that changing the complexity of this call could result exhausting the resources in a"] - #[doc = "block to execute any other calls."] - #[doc = ""] - #[doc = "## Complexity"] - #[doc = "- `O(1)` (Note that implementations of `OnTimestampSet` must also be `O(1)`)"] - #[doc = "- 1 storage read and 1 storage mutation (codec `O(1)` because of `DidUpdate::take` in"] - #[doc = " `on_finalize`)"] - #[doc = "- 1 event handler `on_timestamp_set`. Must be `O(1)`."] - pub struct Set { - #[codec(compact)] - pub now: set::Now, - } - pub mod set { - use super::runtime_types; - pub type Now = ::core::primitive::u64; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for Set { - const PALLET: &'static str = "Timestamp"; - const CALL: &'static str = "set"; - } - } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Set the current time."] - #[doc = ""] - #[doc = "This call should be invoked exactly once per block. It will panic at the finalization"] - #[doc = "phase, if this call hasn't been invoked by that time."] - #[doc = ""] - #[doc = "The timestamp should be greater than the previous one by the amount specified by"] - #[doc = "[`Config::MinimumPeriod`]."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _None_."] - #[doc = ""] - #[doc = "This dispatch class is _Mandatory_ to ensure it gets executed in the block. Be aware"] - #[doc = "that changing the complexity of this call could result exhausting the resources in a"] - #[doc = "block to execute any other calls."] - #[doc = ""] - #[doc = "## Complexity"] - #[doc = "- `O(1)` (Note that implementations of `OnTimestampSet` must also be `O(1)`)"] - #[doc = "- 1 storage read and 1 storage mutation (codec `O(1)` because of `DidUpdate::take` in"] - #[doc = " `on_finalize`)"] - #[doc = "- 1 event handler `on_timestamp_set`. Must be `O(1)`."] - pub fn set( - &self, - now: types::set::Now, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Timestamp", - "set", - types::Set { now }, - [ - 37u8, 95u8, 49u8, 218u8, 24u8, 22u8, 0u8, 95u8, 72u8, 35u8, 155u8, - 199u8, 213u8, 54u8, 207u8, 22u8, 185u8, 193u8, 221u8, 70u8, 18u8, - 200u8, 4u8, 231u8, 195u8, 173u8, 6u8, 122u8, 11u8, 203u8, 231u8, 227u8, - ], - ) - } + pub struct PresetNames {} } } - pub mod storage { - use super::runtime_types; - pub mod types { - use super::runtime_types; - pub mod now { - use super::runtime_types; - pub type Now = ::core::primitive::u64; - } - pub mod did_update { - use super::runtime_types; - pub type DidUpdate = ::core::primitive::bool; - } - } - pub struct StorageApi; - impl StorageApi { - #[doc = " The current time for the current block."] - pub fn now( - &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::now::Now, - ::subxt::ext::subxt_core::utils::Yes, - ::subxt::ext::subxt_core::utils::Yes, - (), - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Timestamp", - "Now", - (), - [ - 44u8, 50u8, 80u8, 30u8, 195u8, 146u8, 123u8, 238u8, 8u8, 163u8, 187u8, - 92u8, 61u8, 39u8, 51u8, 29u8, 173u8, 169u8, 217u8, 158u8, 85u8, 187u8, - 141u8, 26u8, 12u8, 115u8, 51u8, 11u8, 200u8, 244u8, 138u8, 152u8, - ], - ) - } - #[doc = " Whether the timestamp has been updated in this block."] - #[doc = ""] - #[doc = " This value is updated to `true` upon successful submission of a timestamp by a node."] - #[doc = " It is then checked at the end of each block execution in the `on_finalize` hook."] - pub fn did_update( - &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::did_update::DidUpdate, - ::subxt::ext::subxt_core::utils::Yes, - ::subxt::ext::subxt_core::utils::Yes, - (), - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Timestamp", - "DidUpdate", - (), - [ - 229u8, 175u8, 246u8, 102u8, 237u8, 158u8, 212u8, 229u8, 238u8, 214u8, - 205u8, 160u8, 164u8, 252u8, 195u8, 75u8, 139u8, 110u8, 22u8, 34u8, - 248u8, 204u8, 107u8, 46u8, 20u8, 200u8, 238u8, 167u8, 71u8, 41u8, - 214u8, 140u8, - ], - ) - } - } + } + pub fn view_functions() -> ViewFunctionsApi { + ViewFunctionsApi + } + pub fn custom() -> CustomValuesApi { + CustomValuesApi + } + pub struct CustomValuesApi; + impl CustomValuesApi {} + pub struct ConstantsApi; + impl ConstantsApi { + pub fn system(&self) -> system::constants::ConstantsApi { + system::constants::ConstantsApi } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " The minimum period between blocks."] - #[doc = ""] - #[doc = " Be aware that this is different to the *expected* period that the block production"] - #[doc = " apparatus provides. Your chosen consensus system will generally work with this to"] - #[doc = " determine a sensible block time. For example, in the Aura pallet it will be double this"] - #[doc = " period on default settings."] - pub fn minimum_period( - &self, - ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< - ::core::primitive::u64, - > { - ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "Timestamp", - "MinimumPeriod", - [ - 128u8, 214u8, 205u8, 242u8, 181u8, 142u8, 124u8, 231u8, 190u8, 146u8, - 59u8, 226u8, 157u8, 101u8, 103u8, 117u8, 249u8, 65u8, 18u8, 191u8, - 103u8, 119u8, 53u8, 85u8, 81u8, 96u8, 220u8, 42u8, 184u8, 239u8, 42u8, - 246u8, - ], - ) - } - } + pub fn timestamp(&self) -> timestamp::constants::ConstantsApi { + timestamp::constants::ConstantsApi + } + pub fn balances(&self) -> balances::constants::ConstantsApi { + balances::constants::ConstantsApi + } + pub fn transaction_payment(&self) -> transaction_payment::constants::ConstantsApi { + transaction_payment::constants::ConstantsApi + } + pub fn q_po_w(&self) -> q_po_w::constants::ConstantsApi { + q_po_w::constants::ConstantsApi + } + pub fn wormhole(&self) -> wormhole::constants::ConstantsApi { + wormhole::constants::ConstantsApi + } + pub fn mining_rewards(&self) -> mining_rewards::constants::ConstantsApi { + mining_rewards::constants::ConstantsApi + } + pub fn vesting(&self) -> vesting::constants::ConstantsApi { + vesting::constants::ConstantsApi + } + pub fn scheduler(&self) -> scheduler::constants::ConstantsApi { + scheduler::constants::ConstantsApi + } + pub fn utility(&self) -> utility::constants::ConstantsApi { + utility::constants::ConstantsApi + } + pub fn referenda(&self) -> referenda::constants::ConstantsApi { + referenda::constants::ConstantsApi + } + pub fn reversible_transfers(&self) -> reversible_transfers::constants::ConstantsApi { + reversible_transfers::constants::ConstantsApi + } + pub fn conviction_voting(&self) -> conviction_voting::constants::ConstantsApi { + conviction_voting::constants::ConstantsApi + } + pub fn tech_referenda(&self) -> tech_referenda::constants::ConstantsApi { + tech_referenda::constants::ConstantsApi + } + pub fn merkle_airdrop(&self) -> merkle_airdrop::constants::ConstantsApi { + merkle_airdrop::constants::ConstantsApi + } + pub fn treasury_pallet(&self) -> treasury_pallet::constants::ConstantsApi { + treasury_pallet::constants::ConstantsApi + } + pub fn recovery(&self) -> recovery::constants::ConstantsApi { + recovery::constants::ConstantsApi } } - pub mod balances { - use super::{root_mod, runtime_types}; - #[doc = "The `Error` enum of this pallet."] - pub type Error = runtime_types::pallet_balances::pallet::Error; - #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] - pub type Call = runtime_types::pallet_balances::pallet::Call; - pub mod calls { - use super::{root_mod, runtime_types}; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub mod types { - use super::runtime_types; - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Transfer some liquid free balance to another account."] - #[doc = ""] - #[doc = "`transfer_allow_death` will set the `FreeBalance` of the sender and receiver."] - #[doc = "If the sender's account is below the existential deposit as a result"] - #[doc = "of the transfer, the account will be reaped."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be `Signed` by the transactor."] - pub struct TransferAllowDeath { - pub dest: transfer_allow_death::Dest, - #[codec(compact)] - pub value: transfer_allow_death::Value, - } - pub mod transfer_allow_death { - use super::runtime_types; - pub type Dest = ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >; - pub type Value = ::core::primitive::u128; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for TransferAllowDeath { - const PALLET: &'static str = "Balances"; - const CALL: &'static str = "transfer_allow_death"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Exactly as `transfer_allow_death`, except the origin must be root and the source account"] - #[doc = "may be specified."] - pub struct ForceTransfer { - pub source: force_transfer::Source, - pub dest: force_transfer::Dest, - #[codec(compact)] - pub value: force_transfer::Value, - } - pub mod force_transfer { - use super::runtime_types; - pub type Source = ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >; - pub type Dest = ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >; - pub type Value = ::core::primitive::u128; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for ForceTransfer { - const PALLET: &'static str = "Balances"; - const CALL: &'static str = "force_transfer"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Same as the [`transfer_allow_death`] call, but with a check that the transfer will not"] - #[doc = "kill the origin account."] - #[doc = ""] - #[doc = "99% of the time you want [`transfer_allow_death`] instead."] - #[doc = ""] - #[doc = "[`transfer_allow_death`]: struct.Pallet.html#method.transfer"] - pub struct TransferKeepAlive { - pub dest: transfer_keep_alive::Dest, - #[codec(compact)] - pub value: transfer_keep_alive::Value, - } - pub mod transfer_keep_alive { - use super::runtime_types; - pub type Dest = ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >; - pub type Value = ::core::primitive::u128; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for TransferKeepAlive { - const PALLET: &'static str = "Balances"; - const CALL: &'static str = "transfer_keep_alive"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + pub struct StorageApi; + impl StorageApi { + pub fn system(&self) -> system::storage::StorageApi { + system::storage::StorageApi + } + pub fn timestamp(&self) -> timestamp::storage::StorageApi { + timestamp::storage::StorageApi + } + pub fn balances(&self) -> balances::storage::StorageApi { + balances::storage::StorageApi + } + pub fn transaction_payment(&self) -> transaction_payment::storage::StorageApi { + transaction_payment::storage::StorageApi + } + pub fn sudo(&self) -> sudo::storage::StorageApi { + sudo::storage::StorageApi + } + pub fn q_po_w(&self) -> q_po_w::storage::StorageApi { + q_po_w::storage::StorageApi + } + pub fn wormhole(&self) -> wormhole::storage::StorageApi { + wormhole::storage::StorageApi + } + pub fn mining_rewards(&self) -> mining_rewards::storage::StorageApi { + mining_rewards::storage::StorageApi + } + pub fn vesting(&self) -> vesting::storage::StorageApi { + vesting::storage::StorageApi + } + pub fn preimage(&self) -> preimage::storage::StorageApi { + preimage::storage::StorageApi + } + pub fn scheduler(&self) -> scheduler::storage::StorageApi { + scheduler::storage::StorageApi + } + pub fn referenda(&self) -> referenda::storage::StorageApi { + referenda::storage::StorageApi + } + pub fn reversible_transfers(&self) -> reversible_transfers::storage::StorageApi { + reversible_transfers::storage::StorageApi + } + pub fn conviction_voting(&self) -> conviction_voting::storage::StorageApi { + conviction_voting::storage::StorageApi + } + pub fn tech_collective(&self) -> tech_collective::storage::StorageApi { + tech_collective::storage::StorageApi + } + pub fn tech_referenda(&self) -> tech_referenda::storage::StorageApi { + tech_referenda::storage::StorageApi + } + pub fn merkle_airdrop(&self) -> merkle_airdrop::storage::StorageApi { + merkle_airdrop::storage::StorageApi + } + pub fn treasury_pallet(&self) -> treasury_pallet::storage::StorageApi { + treasury_pallet::storage::StorageApi + } + pub fn recovery(&self) -> recovery::storage::StorageApi { + recovery::storage::StorageApi + } + } + pub struct TransactionApi; + impl TransactionApi { + pub fn system(&self) -> system::calls::TransactionApi { + system::calls::TransactionApi + } + pub fn timestamp(&self) -> timestamp::calls::TransactionApi { + timestamp::calls::TransactionApi + } + pub fn balances(&self) -> balances::calls::TransactionApi { + balances::calls::TransactionApi + } + pub fn sudo(&self) -> sudo::calls::TransactionApi { + sudo::calls::TransactionApi + } + pub fn wormhole(&self) -> wormhole::calls::TransactionApi { + wormhole::calls::TransactionApi + } + pub fn vesting(&self) -> vesting::calls::TransactionApi { + vesting::calls::TransactionApi + } + pub fn preimage(&self) -> preimage::calls::TransactionApi { + preimage::calls::TransactionApi + } + pub fn scheduler(&self) -> scheduler::calls::TransactionApi { + scheduler::calls::TransactionApi + } + pub fn utility(&self) -> utility::calls::TransactionApi { + utility::calls::TransactionApi + } + pub fn referenda(&self) -> referenda::calls::TransactionApi { + referenda::calls::TransactionApi + } + pub fn reversible_transfers(&self) -> reversible_transfers::calls::TransactionApi { + reversible_transfers::calls::TransactionApi + } + pub fn conviction_voting(&self) -> conviction_voting::calls::TransactionApi { + conviction_voting::calls::TransactionApi + } + pub fn tech_collective(&self) -> tech_collective::calls::TransactionApi { + tech_collective::calls::TransactionApi + } + pub fn tech_referenda(&self) -> tech_referenda::calls::TransactionApi { + tech_referenda::calls::TransactionApi + } + pub fn merkle_airdrop(&self) -> merkle_airdrop::calls::TransactionApi { + merkle_airdrop::calls::TransactionApi + } + pub fn treasury_pallet(&self) -> treasury_pallet::calls::TransactionApi { + treasury_pallet::calls::TransactionApi + } + pub fn recovery(&self) -> recovery::calls::TransactionApi { + recovery::calls::TransactionApi + } + } + pub struct ViewFunctionsApi; + impl ViewFunctionsApi {} + #[doc = r" check whether the metadata provided is aligned with this statically generated code."] + pub fn is_codegen_valid_for(metadata: &::subxt::ext::subxt_core::Metadata) -> bool { + let runtime_metadata_hash = metadata + .hasher() + .only_these_pallets(&PALLETS) + .only_these_runtime_apis(&RUNTIME_APIS) + .hash(); + runtime_metadata_hash == + [ + 240u8, 112u8, 102u8, 204u8, 216u8, 190u8, 219u8, 229u8, 197u8, 118u8, 25u8, 7u8, + 73u8, 111u8, 144u8, 131u8, 85u8, 15u8, 151u8, 63u8, 213u8, 167u8, 202u8, 109u8, + 233u8, 27u8, 76u8, 131u8, 173u8, 48u8, 182u8, 159u8, + ] + } + pub mod system { + use super::{root_mod, runtime_types}; + #[doc = "Error for the System pallet"] + pub type Error = runtime_types::frame_system::pallet::Error; + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub type Call = runtime_types::frame_system::pallet::Call; + pub mod calls { + use super::{root_mod, runtime_types}; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Transfer the entire transferable balance from the caller account."] - #[doc = ""] - #[doc = "NOTE: This function only attempts to transfer _transferable_ balances. This means that"] - #[doc = "any locked, reserved, or existential deposits (when `keep_alive` is `true`), will not be"] - #[doc = "transferred by this function. To ensure that this function results in a killed account,"] - #[doc = "you might need to prepare the account by removing any reference counters, storage"] - #[doc = "deposits, etc..."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be Signed."] + #[doc = "Make some on-chain remark."] #[doc = ""] - #[doc = "- `dest`: The recipient of the transfer."] - #[doc = "- `keep_alive`: A boolean to determine if the `transfer_all` operation should send all"] - #[doc = " of the funds the account has, causing the sender account to be killed (false), or"] - #[doc = " transfer everything except at least the existential deposit, which will guarantee to"] - #[doc = " keep the sender account alive (true)."] - pub struct TransferAll { - pub dest: transfer_all::Dest, - pub keep_alive: transfer_all::KeepAlive, + #[doc = "Can be executed by every `origin`."] + pub struct Remark { + pub remark: remark::Remark, } - pub mod transfer_all { + pub mod remark { use super::runtime_types; - pub type Dest = ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >; - pub type KeepAlive = ::core::primitive::bool; + pub type Remark = + ::subxt::ext::subxt_core::alloc::vec::Vec<::core::primitive::u8>; } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for TransferAll { - const PALLET: &'static str = "Balances"; - const CALL: &'static str = "transfer_all"; + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for Remark { + const PALLET: &'static str = "System"; + const CALL: &'static str = "remark"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -1989,24 +2305,17 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Unreserve some balance from a user by force."] - #[doc = ""] - #[doc = "Can only be called by ROOT."] - pub struct ForceUnreserve { - pub who: force_unreserve::Who, - pub amount: force_unreserve::Amount, + #[doc = "Set the number of pages in the WebAssembly environment's heap."] + pub struct SetHeapPages { + pub pages: set_heap_pages::Pages, } - pub mod force_unreserve { + pub mod set_heap_pages { use super::runtime_types; - pub type Who = ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >; - pub type Amount = ::core::primitive::u128; + pub type Pages = ::core::primitive::u64; } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for ForceUnreserve { - const PALLET: &'static str = "Balances"; - const CALL: &'static str = "force_unreserve"; + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for SetHeapPages { + const PALLET: &'static str = "System"; + const CALL: &'static str = "set_heap_pages"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -2019,26 +2328,18 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Upgrade a specified account."] - #[doc = ""] - #[doc = "- `origin`: Must be `Signed`."] - #[doc = "- `who`: The account to be upgraded."] - #[doc = ""] - #[doc = "This will waive the transaction fee if at least all but 10% of the accounts needed to"] - #[doc = "be upgraded. (We let some not have to be upgraded just in order to allow for the"] - #[doc = "possibility of churn)."] - pub struct UpgradeAccounts { - pub who: upgrade_accounts::Who, + #[doc = "Set the new runtime code."] + pub struct SetCode { + pub code: set_code::Code, } - pub mod upgrade_accounts { + pub mod set_code { use super::runtime_types; - pub type Who = ::subxt::ext::subxt_core::alloc::vec::Vec< - ::subxt::ext::subxt_core::utils::AccountId32, - >; + pub type Code = + ::subxt::ext::subxt_core::alloc::vec::Vec<::core::primitive::u8>; } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for UpgradeAccounts { - const PALLET: &'static str = "Balances"; - const CALL: &'static str = "upgrade_accounts"; + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for SetCode { + const PALLET: &'static str = "System"; + const CALL: &'static str = "set_code"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -2051,25 +2352,21 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Set the regular balance of a given account."] + #[doc = "Set the new runtime code without doing any checks of the given `code`."] #[doc = ""] - #[doc = "The dispatch origin for this call is `root`."] - pub struct ForceSetBalance { - pub who: force_set_balance::Who, - #[codec(compact)] - pub new_free: force_set_balance::NewFree, + #[doc = "Note that runtime upgrades will not run if this is called with a not-increasing spec"] + #[doc = "version!"] + pub struct SetCodeWithoutChecks { + pub code: set_code_without_checks::Code, } - pub mod force_set_balance { + pub mod set_code_without_checks { use super::runtime_types; - pub type Who = ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >; - pub type NewFree = ::core::primitive::u128; + pub type Code = + ::subxt::ext::subxt_core::alloc::vec::Vec<::core::primitive::u8>; } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for ForceSetBalance { - const PALLET: &'static str = "Balances"; - const CALL: &'static str = "force_set_balance"; + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for SetCodeWithoutChecks { + const PALLET: &'static str = "System"; + const CALL: &'static str = "set_code_without_checks"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -2082,24 +2379,124 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Adjust the total issuance in a saturating way."] + #[doc = "Set some items of storage."] + pub struct SetStorage { + pub items: set_storage::Items, + } + pub mod set_storage { + use super::runtime_types; + pub type Items = ::subxt::ext::subxt_core::alloc::vec::Vec<( + ::subxt::ext::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + ::subxt::ext::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + )>; + } + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for SetStorage { + const PALLET: &'static str = "System"; + const CALL: &'static str = "set_storage"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "Kill some items from storage."] + pub struct KillStorage { + pub keys: kill_storage::Keys, + } + pub mod kill_storage { + use super::runtime_types; + pub type Keys = ::subxt::ext::subxt_core::alloc::vec::Vec< + ::subxt::ext::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + >; + } + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for KillStorage { + const PALLET: &'static str = "System"; + const CALL: &'static str = "kill_storage"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "Kill all storage items with a key that starts with the given prefix."] #[doc = ""] - #[doc = "Can only be called by root and always needs a positive `delta`."] + #[doc = "**NOTE:** We rely on the Root origin to provide us the number of subkeys under"] + #[doc = "the prefix we are removing to accurately calculate the weight of this function."] + pub struct KillPrefix { + pub prefix: kill_prefix::Prefix, + pub subkeys: kill_prefix::Subkeys, + } + pub mod kill_prefix { + use super::runtime_types; + pub type Prefix = + ::subxt::ext::subxt_core::alloc::vec::Vec<::core::primitive::u8>; + pub type Subkeys = ::core::primitive::u32; + } + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for KillPrefix { + const PALLET: &'static str = "System"; + const CALL: &'static str = "kill_prefix"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "Make some on-chain remark and emit event."] + pub struct RemarkWithEvent { + pub remark: remark_with_event::Remark, + } + pub mod remark_with_event { + use super::runtime_types; + pub type Remark = + ::subxt::ext::subxt_core::alloc::vec::Vec<::core::primitive::u8>; + } + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for RemarkWithEvent { + const PALLET: &'static str = "System"; + const CALL: &'static str = "remark_with_event"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "Authorize an upgrade to a given `code_hash` for the runtime. The runtime can be supplied"] + #[doc = "later."] #[doc = ""] - #[doc = "# Example"] - pub struct ForceAdjustTotalIssuance { - pub direction: force_adjust_total_issuance::Direction, - #[codec(compact)] - pub delta: force_adjust_total_issuance::Delta, + #[doc = "This call requires Root origin."] + pub struct AuthorizeUpgrade { + pub code_hash: authorize_upgrade::CodeHash, } - pub mod force_adjust_total_issuance { + pub mod authorize_upgrade { use super::runtime_types; - pub type Direction = runtime_types::pallet_balances::types::AdjustmentDirection; - pub type Delta = ::core::primitive::u128; + pub type CodeHash = ::subxt::ext::subxt_core::utils::H256; } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for ForceAdjustTotalIssuance { - const PALLET: &'static str = "Balances"; - const CALL: &'static str = "force_adjust_total_issuance"; + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for AuthorizeUpgrade { + const PALLET: &'static str = "System"; + const CALL: &'static str = "authorize_upgrade"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -2112,245 +2509,282 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Burn the specified liquid free balance from the origin account."] + #[doc = "Authorize an upgrade to a given `code_hash` for the runtime. The runtime can be supplied"] + #[doc = "later."] #[doc = ""] - #[doc = "If the origin's account ends up below the existential deposit as a result"] - #[doc = "of the burn and `keep_alive` is false, the account will be reaped."] + #[doc = "WARNING: This authorizes an upgrade that will take place without any safety checks, for"] + #[doc = "example that the spec name remains the same and that the version number increases. Not"] + #[doc = "recommended for normal use. Use `authorize_upgrade` instead."] #[doc = ""] - #[doc = "Unlike sending funds to a _burn_ address, which merely makes the funds inaccessible,"] - #[doc = "this `burn` operation will reduce total issuance by the amount _burned_."] - pub struct Burn { - #[codec(compact)] - pub value: burn::Value, - pub keep_alive: burn::KeepAlive, + #[doc = "This call requires Root origin."] + pub struct AuthorizeUpgradeWithoutChecks { + pub code_hash: authorize_upgrade_without_checks::CodeHash, } - pub mod burn { + pub mod authorize_upgrade_without_checks { use super::runtime_types; - pub type Value = ::core::primitive::u128; - pub type KeepAlive = ::core::primitive::bool; + pub type CodeHash = ::subxt::ext::subxt_core::utils::H256; } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for Burn { - const PALLET: &'static str = "Balances"; - const CALL: &'static str = "burn"; + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for AuthorizeUpgradeWithoutChecks { + const PALLET: &'static str = "System"; + const CALL: &'static str = "authorize_upgrade_without_checks"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "Provide the preimage (runtime binary) `code` for an upgrade that has been authorized."] + #[doc = ""] + #[doc = "If the authorization required a version check, this call will ensure the spec name"] + #[doc = "remains unchanged and that the spec version has increased."] + #[doc = ""] + #[doc = "Depending on the runtime's `OnSetCode` configuration, this function may directly apply"] + #[doc = "the new `code` in the same block or attempt to schedule the upgrade."] + #[doc = ""] + #[doc = "All origins are allowed."] + pub struct ApplyAuthorizedUpgrade { + pub code: apply_authorized_upgrade::Code, + } + pub mod apply_authorized_upgrade { + use super::runtime_types; + pub type Code = + ::subxt::ext::subxt_core::alloc::vec::Vec<::core::primitive::u8>; + } + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for ApplyAuthorizedUpgrade { + const PALLET: &'static str = "System"; + const CALL: &'static str = "apply_authorized_upgrade"; } } pub struct TransactionApi; impl TransactionApi { - #[doc = "Transfer some liquid free balance to another account."] - #[doc = ""] - #[doc = "`transfer_allow_death` will set the `FreeBalance` of the sender and receiver."] - #[doc = "If the sender's account is below the existential deposit as a result"] - #[doc = "of the transfer, the account will be reaped."] + #[doc = "Make some on-chain remark."] #[doc = ""] - #[doc = "The dispatch origin for this call must be `Signed` by the transactor."] - pub fn transfer_allow_death( + #[doc = "Can be executed by every `origin`."] + pub fn remark( &self, - dest: types::transfer_allow_death::Dest, - value: types::transfer_allow_death::Value, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload - { + remark: types::remark::Remark, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Balances", - "transfer_allow_death", - types::TransferAllowDeath { dest, value }, + "System", + "remark", + types::Remark { remark }, [ - 51u8, 166u8, 195u8, 10u8, 139u8, 218u8, 55u8, 130u8, 6u8, 194u8, 35u8, - 140u8, 27u8, 205u8, 214u8, 222u8, 102u8, 43u8, 143u8, 145u8, 86u8, - 219u8, 210u8, 147u8, 13u8, 39u8, 51u8, 21u8, 237u8, 179u8, 132u8, - 130u8, + 43u8, 126u8, 180u8, 174u8, 141u8, 48u8, 52u8, 125u8, 166u8, 212u8, + 216u8, 98u8, 100u8, 24u8, 132u8, 71u8, 101u8, 64u8, 246u8, 169u8, 33u8, + 250u8, 147u8, 208u8, 2u8, 40u8, 129u8, 209u8, 232u8, 207u8, 207u8, + 13u8, ], ) } - #[doc = "Exactly as `transfer_allow_death`, except the origin must be root and the source account"] - #[doc = "may be specified."] - pub fn force_transfer( + #[doc = "Set the number of pages in the WebAssembly environment's heap."] + pub fn set_heap_pages( &self, - source: types::force_transfer::Source, - dest: types::force_transfer::Dest, - value: types::force_transfer::Value, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload - { + pages: types::set_heap_pages::Pages, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Balances", - "force_transfer", - types::ForceTransfer { source, dest, value }, + "System", + "set_heap_pages", + types::SetHeapPages { pages }, [ - 154u8, 93u8, 222u8, 27u8, 12u8, 248u8, 63u8, 213u8, 224u8, 86u8, 250u8, - 153u8, 249u8, 102u8, 83u8, 160u8, 79u8, 125u8, 105u8, 222u8, 77u8, - 180u8, 90u8, 105u8, 81u8, 217u8, 60u8, 25u8, 213u8, 51u8, 185u8, 96u8, + 188u8, 191u8, 99u8, 216u8, 219u8, 109u8, 141u8, 50u8, 78u8, 235u8, + 215u8, 242u8, 195u8, 24u8, 111u8, 76u8, 229u8, 64u8, 99u8, 225u8, + 134u8, 121u8, 81u8, 209u8, 127u8, 223u8, 98u8, 215u8, 150u8, 70u8, + 57u8, 147u8, ], ) } - #[doc = "Same as the [`transfer_allow_death`] call, but with a check that the transfer will not"] - #[doc = "kill the origin account."] - #[doc = ""] - #[doc = "99% of the time you want [`transfer_allow_death`] instead."] - #[doc = ""] - #[doc = "[`transfer_allow_death`]: struct.Pallet.html#method.transfer"] - pub fn transfer_keep_alive( + #[doc = "Set the new runtime code."] + pub fn set_code( &self, - dest: types::transfer_keep_alive::Dest, - value: types::transfer_keep_alive::Value, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload - { + code: types::set_code::Code, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Balances", - "transfer_keep_alive", - types::TransferKeepAlive { dest, value }, + "System", + "set_code", + types::SetCode { code }, [ - 245u8, 14u8, 190u8, 193u8, 32u8, 210u8, 74u8, 92u8, 25u8, 182u8, 76u8, - 55u8, 247u8, 83u8, 114u8, 75u8, 143u8, 236u8, 117u8, 25u8, 54u8, 157u8, - 208u8, 207u8, 233u8, 89u8, 70u8, 161u8, 235u8, 242u8, 222u8, 59u8, + 233u8, 248u8, 88u8, 245u8, 28u8, 65u8, 25u8, 169u8, 35u8, 237u8, 19u8, + 203u8, 136u8, 160u8, 18u8, 3u8, 20u8, 197u8, 81u8, 169u8, 244u8, 188u8, + 27u8, 147u8, 147u8, 236u8, 65u8, 25u8, 3u8, 143u8, 182u8, 22u8, ], ) } - #[doc = "Transfer the entire transferable balance from the caller account."] - #[doc = ""] - #[doc = "NOTE: This function only attempts to transfer _transferable_ balances. This means that"] - #[doc = "any locked, reserved, or existential deposits (when `keep_alive` is `true`), will not be"] - #[doc = "transferred by this function. To ensure that this function results in a killed account,"] - #[doc = "you might need to prepare the account by removing any reference counters, storage"] - #[doc = "deposits, etc..."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be Signed."] + #[doc = "Set the new runtime code without doing any checks of the given `code`."] #[doc = ""] - #[doc = "- `dest`: The recipient of the transfer."] - #[doc = "- `keep_alive`: A boolean to determine if the `transfer_all` operation should send all"] - #[doc = " of the funds the account has, causing the sender account to be killed (false), or"] - #[doc = " transfer everything except at least the existential deposit, which will guarantee to"] - #[doc = " keep the sender account alive (true)."] - pub fn transfer_all( + #[doc = "Note that runtime upgrades will not run if this is called with a not-increasing spec"] + #[doc = "version!"] + pub fn set_code_without_checks( &self, - dest: types::transfer_all::Dest, - keep_alive: types::transfer_all::KeepAlive, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { + code: types::set_code_without_checks::Code, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload + { ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Balances", - "transfer_all", - types::TransferAll { dest, keep_alive }, + "System", + "set_code_without_checks", + types::SetCodeWithoutChecks { code }, [ - 105u8, 132u8, 49u8, 144u8, 195u8, 250u8, 34u8, 46u8, 213u8, 248u8, - 112u8, 188u8, 81u8, 228u8, 136u8, 18u8, 67u8, 172u8, 37u8, 38u8, 238u8, - 9u8, 34u8, 15u8, 67u8, 34u8, 148u8, 195u8, 223u8, 29u8, 154u8, 6u8, + 82u8, 212u8, 157u8, 44u8, 70u8, 0u8, 143u8, 15u8, 109u8, 109u8, 107u8, + 157u8, 141u8, 42u8, 169u8, 11u8, 15u8, 186u8, 252u8, 138u8, 10u8, + 147u8, 15u8, 178u8, 247u8, 229u8, 213u8, 98u8, 207u8, 231u8, 119u8, + 115u8, ], ) } - #[doc = "Unreserve some balance from a user by force."] - #[doc = ""] - #[doc = "Can only be called by ROOT."] - pub fn force_unreserve( + #[doc = "Set some items of storage."] + pub fn set_storage( &self, - who: types::force_unreserve::Who, - amount: types::force_unreserve::Amount, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload - { + items: types::set_storage::Items, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Balances", - "force_unreserve", - types::ForceUnreserve { who, amount }, + "System", + "set_storage", + types::SetStorage { items }, [ - 142u8, 151u8, 64u8, 205u8, 46u8, 64u8, 62u8, 122u8, 108u8, 49u8, 223u8, - 140u8, 120u8, 153u8, 35u8, 165u8, 187u8, 38u8, 157u8, 200u8, 123u8, - 199u8, 198u8, 168u8, 208u8, 159u8, 39u8, 134u8, 92u8, 103u8, 84u8, - 171u8, + 141u8, 216u8, 52u8, 222u8, 223u8, 136u8, 123u8, 181u8, 19u8, 75u8, + 163u8, 102u8, 229u8, 189u8, 158u8, 142u8, 95u8, 235u8, 240u8, 49u8, + 150u8, 76u8, 78u8, 137u8, 126u8, 88u8, 183u8, 88u8, 231u8, 146u8, + 234u8, 43u8, ], ) } - #[doc = "Upgrade a specified account."] - #[doc = ""] - #[doc = "- `origin`: Must be `Signed`."] - #[doc = "- `who`: The account to be upgraded."] + #[doc = "Kill some items from storage."] + pub fn kill_storage( + &self, + keys: types::kill_storage::Keys, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "System", + "kill_storage", + types::KillStorage { keys }, + [ + 73u8, 63u8, 196u8, 36u8, 144u8, 114u8, 34u8, 213u8, 108u8, 93u8, 209u8, + 234u8, 153u8, 185u8, 33u8, 91u8, 187u8, 195u8, 223u8, 130u8, 58u8, + 156u8, 63u8, 47u8, 228u8, 249u8, 216u8, 139u8, 143u8, 177u8, 41u8, + 35u8, + ], + ) + } + #[doc = "Kill all storage items with a key that starts with the given prefix."] #[doc = ""] - #[doc = "This will waive the transaction fee if at least all but 10% of the accounts needed to"] - #[doc = "be upgraded. (We let some not have to be upgraded just in order to allow for the"] - #[doc = "possibility of churn)."] - pub fn upgrade_accounts( + #[doc = "**NOTE:** We rely on the Root origin to provide us the number of subkeys under"] + #[doc = "the prefix we are removing to accurately calculate the weight of this function."] + pub fn kill_prefix( &self, - who: types::upgrade_accounts::Who, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload + prefix: types::kill_prefix::Prefix, + subkeys: types::kill_prefix::Subkeys, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "System", + "kill_prefix", + types::KillPrefix { prefix, subkeys }, + [ + 184u8, 57u8, 139u8, 24u8, 208u8, 87u8, 108u8, 215u8, 198u8, 189u8, + 175u8, 242u8, 167u8, 215u8, 97u8, 63u8, 110u8, 166u8, 238u8, 98u8, + 67u8, 236u8, 111u8, 110u8, 234u8, 81u8, 102u8, 5u8, 182u8, 5u8, 214u8, + 85u8, + ], + ) + } + #[doc = "Make some on-chain remark and emit event."] + pub fn remark_with_event( + &self, + remark: types::remark_with_event::Remark, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Balances", - "upgrade_accounts", - types::UpgradeAccounts { who }, + "System", + "remark_with_event", + types::RemarkWithEvent { remark }, [ - 66u8, 200u8, 179u8, 104u8, 65u8, 2u8, 101u8, 56u8, 130u8, 161u8, 224u8, - 233u8, 255u8, 124u8, 70u8, 122u8, 8u8, 49u8, 103u8, 178u8, 68u8, 47u8, - 214u8, 166u8, 217u8, 116u8, 178u8, 50u8, 212u8, 164u8, 98u8, 226u8, + 120u8, 120u8, 153u8, 92u8, 184u8, 85u8, 34u8, 2u8, 174u8, 206u8, 105u8, + 228u8, 233u8, 130u8, 80u8, 246u8, 228u8, 59u8, 234u8, 240u8, 4u8, 49u8, + 147u8, 170u8, 115u8, 91u8, 149u8, 200u8, 228u8, 181u8, 8u8, 154u8, ], ) } - #[doc = "Set the regular balance of a given account."] + #[doc = "Authorize an upgrade to a given `code_hash` for the runtime. The runtime can be supplied"] + #[doc = "later."] #[doc = ""] - #[doc = "The dispatch origin for this call is `root`."] - pub fn force_set_balance( + #[doc = "This call requires Root origin."] + pub fn authorize_upgrade( &self, - who: types::force_set_balance::Who, - new_free: types::force_set_balance::NewFree, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload + code_hash: types::authorize_upgrade::CodeHash, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Balances", - "force_set_balance", - types::ForceSetBalance { who, new_free }, + "System", + "authorize_upgrade", + types::AuthorizeUpgrade { code_hash }, [ - 114u8, 229u8, 59u8, 204u8, 180u8, 83u8, 17u8, 4u8, 59u8, 4u8, 55u8, - 39u8, 151u8, 196u8, 124u8, 60u8, 209u8, 65u8, 193u8, 11u8, 44u8, 164u8, - 116u8, 93u8, 169u8, 30u8, 199u8, 165u8, 55u8, 231u8, 223u8, 43u8, + 4u8, 14u8, 76u8, 107u8, 209u8, 129u8, 9u8, 39u8, 193u8, 17u8, 84u8, + 254u8, 170u8, 214u8, 24u8, 155u8, 29u8, 184u8, 249u8, 241u8, 109u8, + 58u8, 145u8, 131u8, 109u8, 63u8, 38u8, 165u8, 107u8, 215u8, 217u8, + 172u8, ], ) } - #[doc = "Adjust the total issuance in a saturating way."] + #[doc = "Authorize an upgrade to a given `code_hash` for the runtime. The runtime can be supplied"] + #[doc = "later."] #[doc = ""] - #[doc = "Can only be called by root and always needs a positive `delta`."] + #[doc = "WARNING: This authorizes an upgrade that will take place without any safety checks, for"] + #[doc = "example that the spec name remains the same and that the version number increases. Not"] + #[doc = "recommended for normal use. Use `authorize_upgrade` instead."] #[doc = ""] - #[doc = "# Example"] - pub fn force_adjust_total_issuance( + #[doc = "This call requires Root origin."] + pub fn authorize_upgrade_without_checks( &self, - direction: types::force_adjust_total_issuance::Direction, - delta: types::force_adjust_total_issuance::Delta, + code_hash: types::authorize_upgrade_without_checks::CodeHash, ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload< - types::ForceAdjustTotalIssuance, + types::AuthorizeUpgradeWithoutChecks, > { ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Balances", - "force_adjust_total_issuance", - types::ForceAdjustTotalIssuance { direction, delta }, + "System", + "authorize_upgrade_without_checks", + types::AuthorizeUpgradeWithoutChecks { code_hash }, [ - 208u8, 134u8, 56u8, 133u8, 232u8, 164u8, 10u8, 213u8, 53u8, 193u8, - 190u8, 63u8, 236u8, 186u8, 96u8, 122u8, 104u8, 87u8, 173u8, 38u8, 58u8, - 176u8, 21u8, 78u8, 42u8, 106u8, 46u8, 248u8, 251u8, 190u8, 150u8, - 202u8, + 126u8, 126u8, 55u8, 26u8, 47u8, 55u8, 66u8, 8u8, 167u8, 18u8, 29u8, + 136u8, 146u8, 14u8, 189u8, 117u8, 16u8, 227u8, 162u8, 61u8, 149u8, + 197u8, 104u8, 184u8, 185u8, 161u8, 99u8, 154u8, 80u8, 125u8, 181u8, + 233u8, ], ) } - #[doc = "Burn the specified liquid free balance from the origin account."] + #[doc = "Provide the preimage (runtime binary) `code` for an upgrade that has been authorized."] #[doc = ""] - #[doc = "If the origin's account ends up below the existential deposit as a result"] - #[doc = "of the burn and `keep_alive` is false, the account will be reaped."] + #[doc = "If the authorization required a version check, this call will ensure the spec name"] + #[doc = "remains unchanged and that the spec version has increased."] #[doc = ""] - #[doc = "Unlike sending funds to a _burn_ address, which merely makes the funds inaccessible,"] - #[doc = "this `burn` operation will reduce total issuance by the amount _burned_."] - pub fn burn( + #[doc = "Depending on the runtime's `OnSetCode` configuration, this function may directly apply"] + #[doc = "the new `code` in the same block or attempt to schedule the upgrade."] + #[doc = ""] + #[doc = "All origins are allowed."] + pub fn apply_authorized_upgrade( &self, - value: types::burn::Value, - keep_alive: types::burn::KeepAlive, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { + code: types::apply_authorized_upgrade::Code, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload< + types::ApplyAuthorizedUpgrade, + > { ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Balances", - "burn", - types::Burn { value, keep_alive }, + "System", + "apply_authorized_upgrade", + types::ApplyAuthorizedUpgrade { code }, [ - 176u8, 64u8, 7u8, 109u8, 16u8, 44u8, 145u8, 125u8, 147u8, 152u8, 130u8, - 114u8, 221u8, 201u8, 150u8, 162u8, 118u8, 71u8, 52u8, 92u8, 240u8, - 116u8, 203u8, 98u8, 5u8, 22u8, 43u8, 102u8, 94u8, 208u8, 101u8, 57u8, + 232u8, 107u8, 127u8, 38u8, 230u8, 29u8, 97u8, 4u8, 160u8, 191u8, 222u8, + 156u8, 245u8, 102u8, 196u8, 141u8, 44u8, 163u8, 98u8, 68u8, 125u8, + 32u8, 124u8, 101u8, 108u8, 93u8, 211u8, 52u8, 0u8, 231u8, 33u8, 227u8, ], ) } } } - #[doc = "The `Event` enum of this pallet"] - pub type Event = runtime_types::pallet_balances::pallet::Event; + #[doc = "Event for the System pallet."] + pub type Event = runtime_types::frame_system::pallet::Event; pub mod events { use super::runtime_types; #[derive( @@ -2360,19 +2794,17 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "An account was created with some free balance."] - pub struct Endowed { - pub account: endowed::Account, - pub free_balance: endowed::FreeBalance, + #[doc = "An extrinsic completed successfully."] + pub struct ExtrinsicSuccess { + pub dispatch_info: extrinsic_success::DispatchInfo, } - pub mod endowed { + pub mod extrinsic_success { use super::runtime_types; - pub type Account = ::subxt::ext::subxt_core::utils::AccountId32; - pub type FreeBalance = ::core::primitive::u128; + pub type DispatchInfo = runtime_types::frame_system::DispatchEventInfo; } - impl ::subxt::ext::subxt_core::events::StaticEvent for Endowed { - const PALLET: &'static str = "Balances"; - const EVENT: &'static str = "Endowed"; + impl ::subxt::ext::subxt_core::events::StaticEvent for ExtrinsicSuccess { + const PALLET: &'static str = "System"; + const EVENT: &'static str = "ExtrinsicSuccess"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -2381,133 +2813,19 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "An account was removed whose balance was non-zero but below ExistentialDeposit,"] - #[doc = "resulting in an outright loss."] - pub struct DustLost { - pub account: dust_lost::Account, - pub amount: dust_lost::Amount, - } - pub mod dust_lost { - use super::runtime_types; - pub type Account = ::subxt::ext::subxt_core::utils::AccountId32; - pub type Amount = ::core::primitive::u128; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for DustLost { - const PALLET: &'static str = "Balances"; - const EVENT: &'static str = "DustLost"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "Transfer succeeded."] - pub struct Transfer { - pub from: transfer::From, - pub to: transfer::To, - pub amount: transfer::Amount, - } - pub mod transfer { - use super::runtime_types; - pub type From = ::subxt::ext::subxt_core::utils::AccountId32; - pub type To = ::subxt::ext::subxt_core::utils::AccountId32; - pub type Amount = ::core::primitive::u128; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for Transfer { - const PALLET: &'static str = "Balances"; - const EVENT: &'static str = "Transfer"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "A balance was set by root."] - pub struct BalanceSet { - pub who: balance_set::Who, - pub free: balance_set::Free, - } - pub mod balance_set { - use super::runtime_types; - pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; - pub type Free = ::core::primitive::u128; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for BalanceSet { - const PALLET: &'static str = "Balances"; - const EVENT: &'static str = "BalanceSet"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "Some balance was reserved (moved from free to reserved)."] - pub struct Reserved { - pub who: reserved::Who, - pub amount: reserved::Amount, - } - pub mod reserved { - use super::runtime_types; - pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; - pub type Amount = ::core::primitive::u128; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for Reserved { - const PALLET: &'static str = "Balances"; - const EVENT: &'static str = "Reserved"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "Some balance was unreserved (moved from reserved to free)."] - pub struct Unreserved { - pub who: unreserved::Who, - pub amount: unreserved::Amount, - } - pub mod unreserved { - use super::runtime_types; - pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; - pub type Amount = ::core::primitive::u128; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for Unreserved { - const PALLET: &'static str = "Balances"; - const EVENT: &'static str = "Unreserved"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "Some balance was moved from the reserve of the first account to the second account."] - #[doc = "Final argument indicates the destination balance type."] - pub struct ReserveRepatriated { - pub from: reserve_repatriated::From, - pub to: reserve_repatriated::To, - pub amount: reserve_repatriated::Amount, - pub destination_status: reserve_repatriated::DestinationStatus, + #[doc = "An extrinsic failed."] + pub struct ExtrinsicFailed { + pub dispatch_error: extrinsic_failed::DispatchError, + pub dispatch_info: extrinsic_failed::DispatchInfo, } - pub mod reserve_repatriated { + pub mod extrinsic_failed { use super::runtime_types; - pub type From = ::subxt::ext::subxt_core::utils::AccountId32; - pub type To = ::subxt::ext::subxt_core::utils::AccountId32; - pub type Amount = ::core::primitive::u128; - pub type DestinationStatus = - runtime_types::frame_support::traits::tokens::misc::BalanceStatus; + pub type DispatchError = runtime_types::sp_runtime::DispatchError; + pub type DispatchInfo = runtime_types::frame_system::DispatchEventInfo; } - impl ::subxt::ext::subxt_core::events::StaticEvent for ReserveRepatriated { - const PALLET: &'static str = "Balances"; - const EVENT: &'static str = "ReserveRepatriated"; + impl ::subxt::ext::subxt_core::events::StaticEvent for ExtrinsicFailed { + const PALLET: &'static str = "System"; + const EVENT: &'static str = "ExtrinsicFailed"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -2516,19 +2834,11 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "Some amount was deposited (e.g. for transaction fees)."] - pub struct Deposit { - pub who: deposit::Who, - pub amount: deposit::Amount, - } - pub mod deposit { - use super::runtime_types; - pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; - pub type Amount = ::core::primitive::u128; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for Deposit { - const PALLET: &'static str = "Balances"; - const EVENT: &'static str = "Deposit"; + #[doc = "`:code` was updated."] + pub struct CodeUpdated; + impl ::subxt::ext::subxt_core::events::StaticEvent for CodeUpdated { + const PALLET: &'static str = "System"; + const EVENT: &'static str = "CodeUpdated"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -2537,19 +2847,17 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "Some amount was withdrawn from the account (e.g. for transaction fees)."] - pub struct Withdraw { - pub who: withdraw::Who, - pub amount: withdraw::Amount, + #[doc = "A new account was created."] + pub struct NewAccount { + pub account: new_account::Account, } - pub mod withdraw { + pub mod new_account { use super::runtime_types; - pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; - pub type Amount = ::core::primitive::u128; + pub type Account = ::subxt::ext::subxt_core::utils::AccountId32; } - impl ::subxt::ext::subxt_core::events::StaticEvent for Withdraw { - const PALLET: &'static str = "Balances"; - const EVENT: &'static str = "Withdraw"; + impl ::subxt::ext::subxt_core::events::StaticEvent for NewAccount { + const PALLET: &'static str = "System"; + const EVENT: &'static str = "NewAccount"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -2558,19 +2866,17 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "Some amount was removed from the account (e.g. for misbehavior)."] - pub struct Slashed { - pub who: slashed::Who, - pub amount: slashed::Amount, + #[doc = "An account was reaped."] + pub struct KilledAccount { + pub account: killed_account::Account, } - pub mod slashed { + pub mod killed_account { use super::runtime_types; - pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; - pub type Amount = ::core::primitive::u128; + pub type Account = ::subxt::ext::subxt_core::utils::AccountId32; } - impl ::subxt::ext::subxt_core::events::StaticEvent for Slashed { - const PALLET: &'static str = "Balances"; - const EVENT: &'static str = "Slashed"; + impl ::subxt::ext::subxt_core::events::StaticEvent for KilledAccount { + const PALLET: &'static str = "System"; + const EVENT: &'static str = "KilledAccount"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -2579,19 +2885,19 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "Some amount was minted into an account."] - pub struct Minted { - pub who: minted::Who, - pub amount: minted::Amount, + #[doc = "On on-chain remark happened."] + pub struct Remarked { + pub sender: remarked::Sender, + pub hash: remarked::Hash, } - pub mod minted { + pub mod remarked { use super::runtime_types; - pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; - pub type Amount = ::core::primitive::u128; + pub type Sender = ::subxt::ext::subxt_core::utils::AccountId32; + pub type Hash = ::subxt::ext::subxt_core::utils::H256; } - impl ::subxt::ext::subxt_core::events::StaticEvent for Minted { - const PALLET: &'static str = "Balances"; - const EVENT: &'static str = "Minted"; + impl ::subxt::ext::subxt_core::events::StaticEvent for Remarked { + const PALLET: &'static str = "System"; + const EVENT: &'static str = "Remarked"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -2600,19 +2906,19 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "Some amount was burned from an account."] - pub struct Burned { - pub who: burned::Who, - pub amount: burned::Amount, + #[doc = "An upgrade was authorized."] + pub struct UpgradeAuthorized { + pub code_hash: upgrade_authorized::CodeHash, + pub check_version: upgrade_authorized::CheckVersion, } - pub mod burned { + pub mod upgrade_authorized { use super::runtime_types; - pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; - pub type Amount = ::core::primitive::u128; + pub type CodeHash = ::subxt::ext::subxt_core::utils::H256; + pub type CheckVersion = ::core::primitive::bool; } - impl ::subxt::ext::subxt_core::events::StaticEvent for Burned { - const PALLET: &'static str = "Balances"; - const EVENT: &'static str = "Burned"; + impl ::subxt::ext::subxt_core::events::StaticEvent for UpgradeAuthorized { + const PALLET: &'static str = "System"; + const EVENT: &'static str = "UpgradeAuthorized"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -2621,346 +2927,126 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "Some amount was suspended from an account (it can be restored later)."] - pub struct Suspended { - pub who: suspended::Who, - pub amount: suspended::Amount, + #[doc = "An invalid authorized upgrade was rejected while trying to apply it."] + pub struct RejectedInvalidAuthorizedUpgrade { + pub code_hash: rejected_invalid_authorized_upgrade::CodeHash, + pub error: rejected_invalid_authorized_upgrade::Error, } - pub mod suspended { + pub mod rejected_invalid_authorized_upgrade { use super::runtime_types; - pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; - pub type Amount = ::core::primitive::u128; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for Suspended { - const PALLET: &'static str = "Balances"; - const EVENT: &'static str = "Suspended"; + pub type CodeHash = ::subxt::ext::subxt_core::utils::H256; + pub type Error = runtime_types::sp_runtime::DispatchError; } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "Some amount was restored into an account."] - pub struct Restored { - pub who: restored::Who, - pub amount: restored::Amount, + impl ::subxt::ext::subxt_core::events::StaticEvent for RejectedInvalidAuthorizedUpgrade { + const PALLET: &'static str = "System"; + const EVENT: &'static str = "RejectedInvalidAuthorizedUpgrade"; } - pub mod restored { + } + pub mod storage { + use super::runtime_types; + pub mod types { use super::runtime_types; - pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; - pub type Amount = ::core::primitive::u128; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for Restored { - const PALLET: &'static str = "Balances"; - const EVENT: &'static str = "Restored"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "An account was upgraded."] - pub struct Upgraded { - pub who: upgraded::Who, - } - pub mod upgraded { - use super::runtime_types; - pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for Upgraded { - const PALLET: &'static str = "Balances"; - const EVENT: &'static str = "Upgraded"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "Total issuance was increased by `amount`, creating a credit to be balanced."] - pub struct Issued { - pub amount: issued::Amount, - } - pub mod issued { - use super::runtime_types; - pub type Amount = ::core::primitive::u128; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for Issued { - const PALLET: &'static str = "Balances"; - const EVENT: &'static str = "Issued"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "Total issuance was decreased by `amount`, creating a debt to be balanced."] - pub struct Rescinded { - pub amount: rescinded::Amount, - } - pub mod rescinded { - use super::runtime_types; - pub type Amount = ::core::primitive::u128; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for Rescinded { - const PALLET: &'static str = "Balances"; - const EVENT: &'static str = "Rescinded"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "Some balance was locked."] - pub struct Locked { - pub who: locked::Who, - pub amount: locked::Amount, - } - pub mod locked { - use super::runtime_types; - pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; - pub type Amount = ::core::primitive::u128; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for Locked { - const PALLET: &'static str = "Balances"; - const EVENT: &'static str = "Locked"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "Some balance was unlocked."] - pub struct Unlocked { - pub who: unlocked::Who, - pub amount: unlocked::Amount, - } - pub mod unlocked { - use super::runtime_types; - pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; - pub type Amount = ::core::primitive::u128; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for Unlocked { - const PALLET: &'static str = "Balances"; - const EVENT: &'static str = "Unlocked"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "Some balance was frozen."] - pub struct Frozen { - pub who: frozen::Who, - pub amount: frozen::Amount, - } - pub mod frozen { - use super::runtime_types; - pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; - pub type Amount = ::core::primitive::u128; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for Frozen { - const PALLET: &'static str = "Balances"; - const EVENT: &'static str = "Frozen"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "Some balance was thawed."] - pub struct Thawed { - pub who: thawed::Who, - pub amount: thawed::Amount, - } - pub mod thawed { - use super::runtime_types; - pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; - pub type Amount = ::core::primitive::u128; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for Thawed { - const PALLET: &'static str = "Balances"; - const EVENT: &'static str = "Thawed"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "The `TotalIssuance` was forcefully changed."] - pub struct TotalIssuanceForced { - pub old: total_issuance_forced::Old, - pub new: total_issuance_forced::New, - } - pub mod total_issuance_forced { - use super::runtime_types; - pub type Old = ::core::primitive::u128; - pub type New = ::core::primitive::u128; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for TotalIssuanceForced { - const PALLET: &'static str = "Balances"; - const EVENT: &'static str = "TotalIssuanceForced"; - } - } - pub mod storage { - use super::runtime_types; - pub mod types { - use super::runtime_types; - pub mod total_issuance { + pub mod account { use super::runtime_types; - pub type TotalIssuance = ::core::primitive::u128; + pub type Account = runtime_types::frame_system::AccountInfo< + ::core::primitive::u32, + runtime_types::pallet_balances::types::AccountData<::core::primitive::u128>, + >; + pub type Param0 = ::subxt::ext::subxt_core::utils::AccountId32; } - pub mod inactive_issuance { + pub mod extrinsic_count { use super::runtime_types; - pub type InactiveIssuance = ::core::primitive::u128; + pub type ExtrinsicCount = ::core::primitive::u32; } - pub mod account { + pub mod inherents_applied { use super::runtime_types; - pub type Account = - runtime_types::pallet_balances::types::AccountData<::core::primitive::u128>; - pub type Param0 = ::subxt::ext::subxt_core::utils::AccountId32; + pub type InherentsApplied = ::core::primitive::bool; } - pub mod locks { + pub mod block_weight { use super::runtime_types; - pub type Locks = - runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec< - runtime_types::pallet_balances::types::BalanceLock< - ::core::primitive::u128, - >, - >; - pub type Param0 = ::subxt::ext::subxt_core::utils::AccountId32; + pub type BlockWeight = runtime_types::frame_support::dispatch::PerDispatchClass< + runtime_types::sp_weights::weight_v2::Weight, + >; } - pub mod reserves { + pub mod all_extrinsics_len { use super::runtime_types; - pub type Reserves = runtime_types::bounded_collections::bounded_vec::BoundedVec< - runtime_types::pallet_balances::types::ReserveData< - [::core::primitive::u8; 8usize], - ::core::primitive::u128, - >, - >; - pub type Param0 = ::subxt::ext::subxt_core::utils::AccountId32; + pub type AllExtrinsicsLen = ::core::primitive::u32; } - pub mod holds { + pub mod block_hash { use super::runtime_types; - pub type Holds = runtime_types::bounded_collections::bounded_vec::BoundedVec< - runtime_types::frame_support::traits::tokens::misc::IdAmount< - runtime_types::quantus_runtime::RuntimeHoldReason, - ::core::primitive::u128, - >, - >; - pub type Param0 = ::subxt::ext::subxt_core::utils::AccountId32; + pub type BlockHash = ::subxt::ext::subxt_core::utils::H256; + pub type Param0 = ::core::primitive::u32; } - pub mod freezes { + pub mod extrinsic_data { use super::runtime_types; - pub type Freezes = runtime_types::bounded_collections::bounded_vec::BoundedVec< - runtime_types::frame_support::traits::tokens::misc::IdAmount< - runtime_types::quantus_runtime::RuntimeFreezeReason, - ::core::primitive::u128, - >, - >; - pub type Param0 = ::subxt::ext::subxt_core::utils::AccountId32; + pub type ExtrinsicData = + ::subxt::ext::subxt_core::alloc::vec::Vec<::core::primitive::u8>; + pub type Param0 = ::core::primitive::u32; } - pub mod transfer_proof { + pub mod number { use super::runtime_types; - pub type TransferProof = (); - pub type Param0 = ( - ::core::primitive::u64, - ::subxt::ext::subxt_core::utils::AccountId32, - ::subxt::ext::subxt_core::utils::AccountId32, - ::core::primitive::u128, - ); + pub type Number = ::core::primitive::u32; } - pub mod transfer_count { + pub mod parent_hash { use super::runtime_types; - pub type TransferCount = ::core::primitive::u64; + pub type ParentHash = ::subxt::ext::subxt_core::utils::H256; } - } - pub struct StorageApi; - impl StorageApi { - #[doc = " The total units issued in the system."] - pub fn total_issuance( - &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::total_issuance::TotalIssuance, - ::subxt::ext::subxt_core::utils::Yes, - ::subxt::ext::subxt_core::utils::Yes, - (), - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Balances", - "TotalIssuance", - (), - [ - 116u8, 70u8, 119u8, 194u8, 69u8, 37u8, 116u8, 206u8, 171u8, 70u8, - 171u8, 210u8, 226u8, 111u8, 184u8, 204u8, 206u8, 11u8, 68u8, 72u8, - 255u8, 19u8, 194u8, 11u8, 27u8, 194u8, 81u8, 204u8, 59u8, 224u8, 202u8, - 185u8, - ], - ) + pub mod digest { + use super::runtime_types; + pub type Digest = runtime_types::sp_runtime::generic::digest::Digest; } - #[doc = " The total units of outstanding deactivated balance in the system."] - pub fn inactive_issuance( - &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::inactive_issuance::InactiveIssuance, - ::subxt::ext::subxt_core::utils::Yes, - ::subxt::ext::subxt_core::utils::Yes, - (), - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Balances", - "InactiveIssuance", - (), - [ - 212u8, 185u8, 19u8, 50u8, 250u8, 72u8, 173u8, 50u8, 4u8, 104u8, 161u8, - 249u8, 77u8, 247u8, 204u8, 248u8, 11u8, 18u8, 57u8, 4u8, 82u8, 110u8, - 30u8, 216u8, 16u8, 37u8, 87u8, 67u8, 189u8, 235u8, 214u8, 155u8, - ], - ) + pub mod events { + use super::runtime_types; + pub type Events = ::subxt::ext::subxt_core::alloc::vec::Vec< + runtime_types::frame_system::EventRecord< + runtime_types::quantus_runtime::RuntimeEvent, + ::subxt::ext::subxt_core::utils::H256, + >, + >; } - #[doc = " The Balances pallet example of storing the balance of an account."] - #[doc = ""] - #[doc = " # Example"] - #[doc = ""] - #[doc = " ```nocompile"] - #[doc = " impl pallet_balances::Config for Runtime {"] - #[doc = " type AccountStore = StorageMapShim, frame_system::Provider, AccountId, Self::AccountData>"] - #[doc = " }"] - #[doc = " ```"] - #[doc = ""] - #[doc = " You can also store the balance of an account in the `System` pallet."] - #[doc = ""] - #[doc = " # Example"] - #[doc = ""] - #[doc = " ```nocompile"] - #[doc = " impl pallet_balances::Config for Runtime {"] - #[doc = " type AccountStore = System"] - #[doc = " }"] - #[doc = " ```"] - #[doc = ""] - #[doc = " But this comes with tradeoffs, storing account balances in the system pallet stores"] - #[doc = " `frame_system` data alongside the account data contrary to storing account balances in the"] - #[doc = " `Balances` pallet, which uses a `StorageMap` to store balances data only."] - #[doc = " NOTE: This is only used in the case that this pallet is used to store balances."] + pub mod event_count { + use super::runtime_types; + pub type EventCount = ::core::primitive::u32; + } + pub mod event_topics { + use super::runtime_types; + pub type EventTopics = ::subxt::ext::subxt_core::alloc::vec::Vec<( + ::core::primitive::u32, + ::core::primitive::u32, + )>; + pub type Param0 = ::subxt::ext::subxt_core::utils::H256; + } + pub mod last_runtime_upgrade { + use super::runtime_types; + pub type LastRuntimeUpgrade = + runtime_types::frame_system::LastRuntimeUpgradeInfo; + } + pub mod upgraded_to_u32_ref_count { + use super::runtime_types; + pub type UpgradedToU32RefCount = ::core::primitive::bool; + } + pub mod upgraded_to_triple_ref_count { + use super::runtime_types; + pub type UpgradedToTripleRefCount = ::core::primitive::bool; + } + pub mod execution_phase { + use super::runtime_types; + pub type ExecutionPhase = runtime_types::frame_system::Phase; + } + pub mod authorized_upgrade { + use super::runtime_types; + pub type AuthorizedUpgrade = + runtime_types::frame_system::CodeUpgradeAuthorization; + } + pub mod extrinsic_weight_reclaimed { + use super::runtime_types; + pub type ExtrinsicWeightReclaimed = + runtime_types::sp_weights::weight_v2::Weight; + } + } + pub struct StorageApi; + impl StorageApi { + #[doc = " The full account information for a particular account ID."] pub fn account_iter( &self, ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< @@ -2971,40 +3057,17 @@ pub mod api { ::subxt::ext::subxt_core::utils::Yes, > { ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Balances", + "System", "Account", (), [ - 213u8, 38u8, 200u8, 69u8, 218u8, 0u8, 112u8, 181u8, 160u8, 23u8, 96u8, - 90u8, 3u8, 88u8, 126u8, 22u8, 103u8, 74u8, 64u8, 69u8, 29u8, 247u8, - 18u8, 17u8, 234u8, 143u8, 189u8, 22u8, 247u8, 194u8, 154u8, 249u8, + 14u8, 233u8, 115u8, 214u8, 0u8, 109u8, 222u8, 121u8, 162u8, 65u8, 60u8, + 175u8, 209u8, 79u8, 222u8, 124u8, 22u8, 235u8, 138u8, 176u8, 133u8, + 124u8, 90u8, 158u8, 85u8, 45u8, 37u8, 174u8, 47u8, 79u8, 47u8, 166u8, ], ) } - #[doc = " The Balances pallet example of storing the balance of an account."] - #[doc = ""] - #[doc = " # Example"] - #[doc = ""] - #[doc = " ```nocompile"] - #[doc = " impl pallet_balances::Config for Runtime {"] - #[doc = " type AccountStore = StorageMapShim, frame_system::Provider, AccountId, Self::AccountData>"] - #[doc = " }"] - #[doc = " ```"] - #[doc = ""] - #[doc = " You can also store the balance of an account in the `System` pallet."] - #[doc = ""] - #[doc = " # Example"] - #[doc = ""] - #[doc = " ```nocompile"] - #[doc = " impl pallet_balances::Config for Runtime {"] - #[doc = " type AccountStore = System"] - #[doc = " }"] - #[doc = " ```"] - #[doc = ""] - #[doc = " But this comes with tradeoffs, storing account balances in the system pallet stores"] - #[doc = " `frame_system` data alongside the account data contrary to storing account balances in the"] - #[doc = " `Balances` pallet, which uses a `StorageMap` to store balances data only."] - #[doc = " NOTE: This is only used in the case that this pallet is used to store balances."] + #[doc = " The full account information for a particular account ID."] pub fn account( &self, _0: types::account::Param0, @@ -3018,448 +3081,503 @@ pub mod api { (), > { ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Balances", + "System", "Account", ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), [ - 213u8, 38u8, 200u8, 69u8, 218u8, 0u8, 112u8, 181u8, 160u8, 23u8, 96u8, - 90u8, 3u8, 88u8, 126u8, 22u8, 103u8, 74u8, 64u8, 69u8, 29u8, 247u8, - 18u8, 17u8, 234u8, 143u8, 189u8, 22u8, 247u8, 194u8, 154u8, 249u8, + 14u8, 233u8, 115u8, 214u8, 0u8, 109u8, 222u8, 121u8, 162u8, 65u8, 60u8, + 175u8, 209u8, 79u8, 222u8, 124u8, 22u8, 235u8, 138u8, 176u8, 133u8, + 124u8, 90u8, 158u8, 85u8, 45u8, 37u8, 174u8, 47u8, 79u8, 47u8, 166u8, ], ) } - #[doc = " Any liquidity locks on some account balances."] - #[doc = " NOTE: Should only be accessed when setting, changing and freeing a lock."] - #[doc = ""] - #[doc = " Use of locks is deprecated in favour of freezes. See `https://github.com/paritytech/substrate/pull/12951/`"] - pub fn locks_iter( + #[doc = " Total extrinsics count for the current block."] + pub fn extrinsic_count( &self, ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< (), - types::locks::Locks, - (), - ::subxt::ext::subxt_core::utils::Yes, + types::extrinsic_count::ExtrinsicCount, ::subxt::ext::subxt_core::utils::Yes, + (), + (), > { ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Balances", - "Locks", + "System", + "ExtrinsicCount", (), [ - 10u8, 223u8, 55u8, 0u8, 249u8, 69u8, 168u8, 41u8, 75u8, 35u8, 120u8, - 167u8, 18u8, 132u8, 9u8, 20u8, 91u8, 51u8, 27u8, 69u8, 136u8, 187u8, - 13u8, 220u8, 163u8, 122u8, 26u8, 141u8, 174u8, 249u8, 85u8, 37u8, + 102u8, 76u8, 236u8, 42u8, 40u8, 231u8, 33u8, 222u8, 123u8, 147u8, + 153u8, 148u8, 234u8, 203u8, 181u8, 119u8, 6u8, 187u8, 177u8, 199u8, + 120u8, 47u8, 137u8, 254u8, 96u8, 100u8, 165u8, 182u8, 249u8, 230u8, + 159u8, 79u8, ], ) } - #[doc = " Any liquidity locks on some account balances."] - #[doc = " NOTE: Should only be accessed when setting, changing and freeing a lock."] - #[doc = ""] - #[doc = " Use of locks is deprecated in favour of freezes. See `https://github.com/paritytech/substrate/pull/12951/`"] - pub fn locks( + #[doc = " Whether all inherents have been applied."] + pub fn inherents_applied( &self, - _0: types::locks::Param0, ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::locks::Param0, - >, - types::locks::Locks, + (), + types::inherents_applied::InherentsApplied, ::subxt::ext::subxt_core::utils::Yes, ::subxt::ext::subxt_core::utils::Yes, (), > { ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Balances", - "Locks", - ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), + "System", + "InherentsApplied", + (), [ - 10u8, 223u8, 55u8, 0u8, 249u8, 69u8, 168u8, 41u8, 75u8, 35u8, 120u8, - 167u8, 18u8, 132u8, 9u8, 20u8, 91u8, 51u8, 27u8, 69u8, 136u8, 187u8, - 13u8, 220u8, 163u8, 122u8, 26u8, 141u8, 174u8, 249u8, 85u8, 37u8, + 132u8, 249u8, 142u8, 252u8, 8u8, 103u8, 80u8, 120u8, 50u8, 6u8, 188u8, + 223u8, 101u8, 55u8, 165u8, 189u8, 172u8, 249u8, 165u8, 230u8, 183u8, + 109u8, 34u8, 65u8, 185u8, 150u8, 29u8, 8u8, 186u8, 129u8, 135u8, 239u8, ], ) } - #[doc = " Named reserves on some account balances."] - #[doc = ""] - #[doc = " Use of reserves is deprecated in favour of holds. See `https://github.com/paritytech/substrate/pull/12951/`"] - pub fn reserves_iter( + #[doc = " The current weight for the block."] + pub fn block_weight( &self, ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< (), - types::reserves::Reserves, - (), + types::block_weight::BlockWeight, ::subxt::ext::subxt_core::utils::Yes, ::subxt::ext::subxt_core::utils::Yes, + (), > { ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Balances", - "Reserves", + "System", + "BlockWeight", (), [ - 112u8, 10u8, 241u8, 77u8, 64u8, 187u8, 106u8, 159u8, 13u8, 153u8, - 140u8, 178u8, 182u8, 50u8, 1u8, 55u8, 149u8, 92u8, 196u8, 229u8, 170u8, - 106u8, 193u8, 88u8, 255u8, 244u8, 2u8, 193u8, 62u8, 235u8, 204u8, 91u8, + 158u8, 46u8, 228u8, 89u8, 210u8, 214u8, 84u8, 154u8, 50u8, 68u8, 63u8, + 62u8, 43u8, 42u8, 99u8, 27u8, 54u8, 42u8, 146u8, 44u8, 241u8, 216u8, + 229u8, 30u8, 216u8, 255u8, 165u8, 238u8, 181u8, 130u8, 36u8, 102u8, ], ) } - #[doc = " Named reserves on some account balances."] - #[doc = ""] - #[doc = " Use of reserves is deprecated in favour of holds. See `https://github.com/paritytech/substrate/pull/12951/`"] - pub fn reserves( + #[doc = " Total length (in bytes) for all extrinsics put together, for the current block."] + pub fn all_extrinsics_len( &self, - _0: types::reserves::Param0, ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::reserves::Param0, - >, - types::reserves::Reserves, - ::subxt::ext::subxt_core::utils::Yes, + (), + types::all_extrinsics_len::AllExtrinsicsLen, ::subxt::ext::subxt_core::utils::Yes, (), + (), > { ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Balances", - "Reserves", - ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), + "System", + "AllExtrinsicsLen", + (), [ - 112u8, 10u8, 241u8, 77u8, 64u8, 187u8, 106u8, 159u8, 13u8, 153u8, - 140u8, 178u8, 182u8, 50u8, 1u8, 55u8, 149u8, 92u8, 196u8, 229u8, 170u8, - 106u8, 193u8, 88u8, 255u8, 244u8, 2u8, 193u8, 62u8, 235u8, 204u8, 91u8, + 117u8, 86u8, 61u8, 243u8, 41u8, 51u8, 102u8, 214u8, 137u8, 100u8, + 243u8, 185u8, 122u8, 174u8, 187u8, 117u8, 86u8, 189u8, 63u8, 135u8, + 101u8, 218u8, 203u8, 201u8, 237u8, 254u8, 128u8, 183u8, 169u8, 221u8, + 242u8, 65u8, ], ) } - #[doc = " Holds on account balances."] - pub fn holds_iter( + #[doc = " Map of block numbers to block hashes."] + pub fn block_hash_iter( &self, ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< (), - types::holds::Holds, + types::block_hash::BlockHash, (), ::subxt::ext::subxt_core::utils::Yes, ::subxt::ext::subxt_core::utils::Yes, > { ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Balances", - "Holds", + "System", + "BlockHash", (), [ - 108u8, 118u8, 163u8, 86u8, 4u8, 174u8, 42u8, 210u8, 139u8, 171u8, 15u8, - 242u8, 10u8, 4u8, 255u8, 205u8, 247u8, 61u8, 236u8, 127u8, 54u8, 175u8, - 182u8, 131u8, 84u8, 129u8, 78u8, 242u8, 92u8, 143u8, 219u8, 35u8, + 217u8, 32u8, 215u8, 253u8, 24u8, 182u8, 207u8, 178u8, 157u8, 24u8, + 103u8, 100u8, 195u8, 165u8, 69u8, 152u8, 112u8, 181u8, 56u8, 192u8, + 164u8, 16u8, 20u8, 222u8, 28u8, 214u8, 144u8, 142u8, 146u8, 69u8, + 202u8, 118u8, ], ) } - #[doc = " Holds on account balances."] - pub fn holds( + #[doc = " Map of block numbers to block hashes."] + pub fn block_hash( &self, - _0: types::holds::Param0, + _0: types::block_hash::Param0, ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::holds::Param0, + types::block_hash::Param0, >, - types::holds::Holds, + types::block_hash::BlockHash, ::subxt::ext::subxt_core::utils::Yes, ::subxt::ext::subxt_core::utils::Yes, (), > { ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Balances", - "Holds", + "System", + "BlockHash", ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), [ - 108u8, 118u8, 163u8, 86u8, 4u8, 174u8, 42u8, 210u8, 139u8, 171u8, 15u8, - 242u8, 10u8, 4u8, 255u8, 205u8, 247u8, 61u8, 236u8, 127u8, 54u8, 175u8, - 182u8, 131u8, 84u8, 129u8, 78u8, 242u8, 92u8, 143u8, 219u8, 35u8, + 217u8, 32u8, 215u8, 253u8, 24u8, 182u8, 207u8, 178u8, 157u8, 24u8, + 103u8, 100u8, 195u8, 165u8, 69u8, 152u8, 112u8, 181u8, 56u8, 192u8, + 164u8, 16u8, 20u8, 222u8, 28u8, 214u8, 144u8, 142u8, 146u8, 69u8, + 202u8, 118u8, ], ) } - #[doc = " Freeze locks on account balances."] - pub fn freezes_iter( + #[doc = " Extrinsics data for the current block (maps an extrinsic's index to its data)."] + pub fn extrinsic_data_iter( &self, ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< (), - types::freezes::Freezes, + types::extrinsic_data::ExtrinsicData, (), ::subxt::ext::subxt_core::utils::Yes, ::subxt::ext::subxt_core::utils::Yes, > { ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Balances", - "Freezes", + "System", + "ExtrinsicData", (), [ - 170u8, 69u8, 116u8, 92u8, 165u8, 14u8, 129u8, 179u8, 165u8, 6u8, 123u8, - 156u8, 4u8, 30u8, 25u8, 181u8, 191u8, 29u8, 3u8, 92u8, 96u8, 167u8, - 102u8, 38u8, 128u8, 140u8, 85u8, 248u8, 114u8, 127u8, 128u8, 40u8, + 160u8, 180u8, 122u8, 18u8, 196u8, 26u8, 2u8, 37u8, 115u8, 232u8, 133u8, + 220u8, 106u8, 245u8, 4u8, 129u8, 42u8, 84u8, 241u8, 45u8, 199u8, 179u8, + 128u8, 61u8, 170u8, 137u8, 231u8, 156u8, 247u8, 57u8, 47u8, 38u8, ], ) } - #[doc = " Freeze locks on account balances."] - pub fn freezes( + #[doc = " Extrinsics data for the current block (maps an extrinsic's index to its data)."] + pub fn extrinsic_data( &self, - _0: types::freezes::Param0, + _0: types::extrinsic_data::Param0, ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::freezes::Param0, + types::extrinsic_data::Param0, >, - types::freezes::Freezes, + types::extrinsic_data::ExtrinsicData, ::subxt::ext::subxt_core::utils::Yes, ::subxt::ext::subxt_core::utils::Yes, (), > { ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Balances", - "Freezes", + "System", + "ExtrinsicData", ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), [ - 170u8, 69u8, 116u8, 92u8, 165u8, 14u8, 129u8, 179u8, 165u8, 6u8, 123u8, - 156u8, 4u8, 30u8, 25u8, 181u8, 191u8, 29u8, 3u8, 92u8, 96u8, 167u8, - 102u8, 38u8, 128u8, 140u8, 85u8, 248u8, 114u8, 127u8, 128u8, 40u8, + 160u8, 180u8, 122u8, 18u8, 196u8, 26u8, 2u8, 37u8, 115u8, 232u8, 133u8, + 220u8, 106u8, 245u8, 4u8, 129u8, 42u8, 84u8, 241u8, 45u8, 199u8, 179u8, + 128u8, 61u8, 170u8, 137u8, 231u8, 156u8, 247u8, 57u8, 47u8, 38u8, ], ) } - #[doc = " Transfer proofs for a wormhole transfers"] - pub fn transfer_proof_iter( + #[doc = " The current block number being processed. Set by `execute_block`."] + pub fn number( &self, ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< (), - types::transfer_proof::TransferProof, - (), - (), + types::number::Number, ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, + (), > { ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Balances", - "TransferProof", + "System", + "Number", (), [ - 210u8, 54u8, 36u8, 79u8, 12u8, 123u8, 227u8, 172u8, 23u8, 232u8, 200u8, - 138u8, 130u8, 99u8, 12u8, 186u8, 77u8, 74u8, 208u8, 111u8, 137u8, - 159u8, 169u8, 112u8, 227u8, 111u8, 65u8, 127u8, 232u8, 57u8, 166u8, - 14u8, + 30u8, 194u8, 177u8, 90u8, 194u8, 232u8, 46u8, 180u8, 85u8, 129u8, 14u8, + 9u8, 8u8, 8u8, 23u8, 95u8, 230u8, 5u8, 13u8, 105u8, 125u8, 2u8, 22u8, + 200u8, 78u8, 93u8, 115u8, 28u8, 150u8, 113u8, 48u8, 53u8, ], ) } - #[doc = " Transfer proofs for a wormhole transfers"] - pub fn transfer_proof( + #[doc = " Hash of the previous block."] + pub fn parent_hash( &self, - _0: types::transfer_proof::Param0, ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::transfer_proof::Param0, - >, - types::transfer_proof::TransferProof, - ::subxt::ext::subxt_core::utils::Yes, (), + types::parent_hash::ParentHash, + ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, (), > { ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Balances", - "TransferProof", - ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), + "System", + "ParentHash", + (), [ - 210u8, 54u8, 36u8, 79u8, 12u8, 123u8, 227u8, 172u8, 23u8, 232u8, 200u8, - 138u8, 130u8, 99u8, 12u8, 186u8, 77u8, 74u8, 208u8, 111u8, 137u8, - 159u8, 169u8, 112u8, 227u8, 111u8, 65u8, 127u8, 232u8, 57u8, 166u8, - 14u8, + 26u8, 130u8, 11u8, 216u8, 155u8, 71u8, 128u8, 170u8, 30u8, 153u8, 21u8, + 192u8, 62u8, 93u8, 137u8, 80u8, 120u8, 81u8, 202u8, 94u8, 248u8, 125u8, + 71u8, 82u8, 141u8, 229u8, 32u8, 56u8, 73u8, 50u8, 101u8, 78u8, ], ) } - pub fn transfer_count( + #[doc = " Digest of the current block, also part of the block header."] + pub fn digest( &self, ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< (), - types::transfer_count::TransferCount, + types::digest::Digest, ::subxt::ext::subxt_core::utils::Yes, ::subxt::ext::subxt_core::utils::Yes, (), > { ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Balances", - "TransferCount", + "System", + "Digest", (), [ - 105u8, 10u8, 160u8, 118u8, 193u8, 131u8, 207u8, 188u8, 78u8, 238u8, - 252u8, 99u8, 31u8, 72u8, 159u8, 128u8, 159u8, 215u8, 110u8, 101u8, - 27u8, 132u8, 12u8, 59u8, 182u8, 107u8, 98u8, 77u8, 189u8, 100u8, 51u8, - 209u8, + 61u8, 64u8, 237u8, 91u8, 145u8, 232u8, 17u8, 254u8, 181u8, 16u8, 234u8, + 91u8, 51u8, 140u8, 254u8, 131u8, 98u8, 135u8, 21u8, 37u8, 251u8, 20u8, + 58u8, 92u8, 123u8, 141u8, 14u8, 227u8, 146u8, 46u8, 222u8, 117u8, ], ) } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " The minimum amount required to keep an account open. MUST BE GREATER THAN ZERO!"] + #[doc = " Events deposited for the current block."] #[doc = ""] - #[doc = " If you *really* need it to be zero, you can enable the feature `insecure_zero_ed` for"] - #[doc = " this pallet. However, you do so at your own risk: this will open up a major DoS vector."] - #[doc = " In case you have multiple sources of provider references, you may also get unexpected"] - #[doc = " behaviour if you set this to zero."] + #[doc = " NOTE: The item is unbound and should therefore never be read on chain."] + #[doc = " It could otherwise inflate the PoV size of a block."] #[doc = ""] - #[doc = " Bottom line: Do yourself a favour and make it at least one!"] - pub fn existential_deposit( + #[doc = " Events have a large in-memory size. Box the events to not go out-of-memory"] + #[doc = " just in case someone still reads them from within the runtime."] + pub fn events( &self, - ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< - ::core::primitive::u128, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::events::Events, + ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, + (), > { - ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "Balances", - "ExistentialDeposit", + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "System", + "Events", + (), [ - 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, + 213u8, 39u8, 192u8, 125u8, 137u8, 244u8, 247u8, 215u8, 104u8, 155u8, + 36u8, 12u8, 160u8, 64u8, 31u8, 103u8, 172u8, 115u8, 193u8, 199u8, + 246u8, 157u8, 255u8, 138u8, 9u8, 166u8, 97u8, 147u8, 65u8, 72u8, 222u8, + 117u8, ], ) } - #[doc = " The maximum number of locks that should exist on an account."] - #[doc = " Not strictly enforced, but used for weight estimation."] - #[doc = ""] - #[doc = " Use of locks is deprecated in favour of freezes. See `https://github.com/paritytech/substrate/pull/12951/`"] - pub fn max_locks( + #[doc = " The number of events in the `Events` list."] + pub fn event_count( &self, - ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< - ::core::primitive::u32, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::event_count::EventCount, + ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, + (), > { - ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "Balances", - "MaxLocks", + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "System", + "EventCount", + (), [ - 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, + 175u8, 24u8, 252u8, 184u8, 210u8, 167u8, 146u8, 143u8, 164u8, 80u8, + 151u8, 205u8, 189u8, 189u8, 55u8, 220u8, 47u8, 101u8, 181u8, 33u8, + 254u8, 131u8, 13u8, 143u8, 3u8, 244u8, 245u8, 45u8, 2u8, 210u8, 79u8, + 133u8, ], ) } - #[doc = " The maximum number of named reserves that can exist on an account."] + #[doc = " Mapping between a topic (represented by T::Hash) and a vector of indexes"] + #[doc = " of events in the `>` list."] #[doc = ""] - #[doc = " Use of reserves is deprecated in favour of holds. See `https://github.com/paritytech/substrate/pull/12951/`"] - pub fn max_reserves( + #[doc = " All topic vectors have deterministic storage locations depending on the topic. This"] + #[doc = " allows light-clients to leverage the changes trie storage tracking mechanism and"] + #[doc = " in case of changes fetch the list of events of interest."] + #[doc = ""] + #[doc = " The value has the type `(BlockNumberFor, EventIndex)` because if we used only just"] + #[doc = " the `EventIndex` then in case if the topic has the same contents on the next block"] + #[doc = " no notification will be triggered thus the event might be lost."] + pub fn event_topics_iter( &self, - ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< - ::core::primitive::u32, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::event_topics::EventTopics, + (), + ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, > { - ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "Balances", - "MaxReserves", + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "System", + "EventTopics", + (), [ - 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, + 40u8, 225u8, 14u8, 75u8, 44u8, 176u8, 76u8, 34u8, 143u8, 107u8, 69u8, + 133u8, 114u8, 13u8, 172u8, 250u8, 141u8, 73u8, 12u8, 65u8, 217u8, 63u8, + 120u8, 241u8, 48u8, 106u8, 143u8, 161u8, 128u8, 100u8, 166u8, 59u8, ], ) } - #[doc = " The maximum number of individual freeze locks that can exist on an account at any time."] - pub fn max_freezes( + #[doc = " Mapping between a topic (represented by T::Hash) and a vector of indexes"] + #[doc = " of events in the `>` list."] + #[doc = ""] + #[doc = " All topic vectors have deterministic storage locations depending on the topic. This"] + #[doc = " allows light-clients to leverage the changes trie storage tracking mechanism and"] + #[doc = " in case of changes fetch the list of events of interest."] + #[doc = ""] + #[doc = " The value has the type `(BlockNumberFor, EventIndex)` because if we used only just"] + #[doc = " the `EventIndex` then in case if the topic has the same contents on the next block"] + #[doc = " no notification will be triggered thus the event might be lost."] + pub fn event_topics( &self, - ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< - ::core::primitive::u32, + _0: types::event_topics::Param0, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + ::subxt::ext::subxt_core::storage::address::StaticStorageKey< + types::event_topics::Param0, + >, + types::event_topics::EventTopics, + ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, + (), > { - ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "Balances", - "MaxFreezes", + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "System", + "EventTopics", + ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), [ - 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, + 40u8, 225u8, 14u8, 75u8, 44u8, 176u8, 76u8, 34u8, 143u8, 107u8, 69u8, + 133u8, 114u8, 13u8, 172u8, 250u8, 141u8, 73u8, 12u8, 65u8, 217u8, 63u8, + 120u8, 241u8, 48u8, 106u8, 143u8, 161u8, 128u8, 100u8, 166u8, 59u8, ], ) } - } - } - } - pub mod transaction_payment { - use super::{root_mod, runtime_types}; - #[doc = "The `Event` enum of this pallet"] - pub type Event = runtime_types::pallet_transaction_payment::pallet::Event; - pub mod events { - use super::runtime_types; - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "A transaction fee `actual_fee`, of which `tip` was added to the minimum inclusion fee,"] - #[doc = "has been paid by `who`."] - pub struct TransactionFeePaid { - pub who: transaction_fee_paid::Who, - pub actual_fee: transaction_fee_paid::ActualFee, - pub tip: transaction_fee_paid::Tip, - } - pub mod transaction_fee_paid { - use super::runtime_types; - pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; - pub type ActualFee = ::core::primitive::u128; - pub type Tip = ::core::primitive::u128; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for TransactionFeePaid { - const PALLET: &'static str = "TransactionPayment"; - const EVENT: &'static str = "TransactionFeePaid"; - } - } - pub mod storage { - use super::runtime_types; - pub mod types { - use super::runtime_types; - pub mod next_fee_multiplier { - use super::runtime_types; - pub type NextFeeMultiplier = - runtime_types::sp_arithmetic::fixed_point::FixedU128; + #[doc = " Stores the `spec_version` and `spec_name` of when the last runtime upgrade happened."] + pub fn last_runtime_upgrade( + &self, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::last_runtime_upgrade::LastRuntimeUpgrade, + ::subxt::ext::subxt_core::utils::Yes, + (), + (), + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "System", + "LastRuntimeUpgrade", + (), + [ + 197u8, 212u8, 249u8, 209u8, 79u8, 34u8, 55u8, 203u8, 31u8, 42u8, 199u8, + 242u8, 188u8, 74u8, 234u8, 250u8, 245u8, 44u8, 139u8, 162u8, 45u8, + 150u8, 230u8, 249u8, 135u8, 100u8, 158u8, 167u8, 118u8, 219u8, 28u8, + 98u8, + ], + ) } - pub mod storage_version { - use super::runtime_types; - pub type StorageVersion = runtime_types::pallet_transaction_payment::Releases; + #[doc = " True if we have upgraded so that `type RefCount` is `u32`. False (default) if not."] + pub fn upgraded_to_u32_ref_count( + &self, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::upgraded_to_u32_ref_count::UpgradedToU32RefCount, + ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, + (), + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "System", + "UpgradedToU32RefCount", + (), + [ + 229u8, 73u8, 9u8, 132u8, 186u8, 116u8, 151u8, 171u8, 145u8, 29u8, 34u8, + 130u8, 52u8, 146u8, 124u8, 175u8, 79u8, 189u8, 147u8, 230u8, 234u8, + 107u8, 124u8, 31u8, 2u8, 22u8, 86u8, 190u8, 4u8, 147u8, 50u8, 245u8, + ], + ) } - } - pub struct StorageApi; - impl StorageApi { - pub fn next_fee_multiplier( + #[doc = " True if we have upgraded so that AccountInfo contains three types of `RefCount`. False"] + #[doc = " (default) if not."] + pub fn upgraded_to_triple_ref_count( &self, ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< (), - types::next_fee_multiplier::NextFeeMultiplier, + types::upgraded_to_triple_ref_count::UpgradedToTripleRefCount, ::subxt::ext::subxt_core::utils::Yes, ::subxt::ext::subxt_core::utils::Yes, (), > { ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "TransactionPayment", - "NextFeeMultiplier", + "System", + "UpgradedToTripleRefCount", (), [ - 247u8, 39u8, 81u8, 170u8, 225u8, 226u8, 82u8, 147u8, 34u8, 113u8, - 147u8, 213u8, 59u8, 80u8, 139u8, 35u8, 36u8, 196u8, 152u8, 19u8, 9u8, - 159u8, 176u8, 79u8, 249u8, 201u8, 170u8, 1u8, 129u8, 79u8, 146u8, - 197u8, + 97u8, 66u8, 124u8, 243u8, 27u8, 167u8, 147u8, 81u8, 254u8, 201u8, + 101u8, 24u8, 40u8, 231u8, 14u8, 179u8, 154u8, 163u8, 71u8, 81u8, 185u8, + 167u8, 82u8, 254u8, 189u8, 3u8, 101u8, 207u8, 206u8, 194u8, 155u8, + 151u8, ], ) } - pub fn storage_version( + #[doc = " The execution phase of the block."] + pub fn execution_phase( &self, ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< (), - types::storage_version::StorageVersion, + types::execution_phase::ExecutionPhase, + ::subxt::ext::subxt_core::utils::Yes, + (), + (), + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "System", + "ExecutionPhase", + (), + [ + 191u8, 129u8, 100u8, 134u8, 126u8, 116u8, 154u8, 203u8, 220u8, 200u8, + 0u8, 26u8, 161u8, 250u8, 133u8, 205u8, 146u8, 24u8, 5u8, 156u8, 158u8, + 35u8, 36u8, 253u8, 52u8, 235u8, 86u8, 167u8, 35u8, 100u8, 119u8, 27u8, + ], + ) + } + #[doc = " `Some` if a code upgrade has been authorized."] + pub fn authorized_upgrade( + &self, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::authorized_upgrade::AuthorizedUpgrade, + ::subxt::ext::subxt_core::utils::Yes, + (), + (), + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "System", + "AuthorizedUpgrade", + (), + [ + 165u8, 97u8, 27u8, 138u8, 2u8, 28u8, 55u8, 92u8, 96u8, 96u8, 168u8, + 169u8, 55u8, 178u8, 44u8, 127u8, 58u8, 140u8, 206u8, 178u8, 1u8, 37u8, + 214u8, 213u8, 251u8, 123u8, 5u8, 111u8, 90u8, 148u8, 217u8, 135u8, + ], + ) + } + #[doc = " The weight reclaimed for the extrinsic."] + #[doc = ""] + #[doc = " This information is available until the end of the extrinsic execution."] + #[doc = " More precisely this information is removed in `note_applied_extrinsic`."] + #[doc = ""] + #[doc = " Logic doing some post dispatch weight reduction must update this storage to avoid duplicate"] + #[doc = " reduction."] + pub fn extrinsic_weight_reclaimed( + &self, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::extrinsic_weight_reclaimed::ExtrinsicWeightReclaimed, ::subxt::ext::subxt_core::utils::Yes, ::subxt::ext::subxt_core::utils::Yes, (), > { ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "TransactionPayment", - "StorageVersion", + "System", + "ExtrinsicWeightReclaimed", (), [ - 105u8, 243u8, 158u8, 241u8, 159u8, 231u8, 253u8, 6u8, 4u8, 32u8, 85u8, - 178u8, 126u8, 31u8, 203u8, 134u8, 154u8, 38u8, 122u8, 155u8, 150u8, - 251u8, 174u8, 15u8, 74u8, 134u8, 216u8, 244u8, 168u8, 175u8, 158u8, - 144u8, + 195u8, 143u8, 164u8, 84u8, 225u8, 194u8, 227u8, 128u8, 196u8, 241u8, + 188u8, 159u8, 59u8, 197u8, 11u8, 12u8, 119u8, 164u8, 46u8, 229u8, 92u8, + 212u8, 236u8, 255u8, 238u8, 54u8, 105u8, 200u8, 229u8, 191u8, 221u8, + 202u8, ], ) } @@ -3469,137 +3587,120 @@ pub mod api { use super::runtime_types; pub struct ConstantsApi; impl ConstantsApi { - #[doc = " A fee multiplier for `Operational` extrinsics to compute \"virtual tip\" to boost their"] - #[doc = " `priority`"] - #[doc = ""] - #[doc = " This value is multiplied by the `final_fee` to obtain a \"virtual tip\" that is later"] - #[doc = " added to a tip component in regular `priority` calculations."] - #[doc = " It means that a `Normal` transaction can front-run a similarly-sized `Operational`"] - #[doc = " extrinsic (with no tip), by including a tip value greater than the virtual tip."] - #[doc = ""] - #[doc = " ```rust,ignore"] - #[doc = " // For `Normal`"] - #[doc = " let priority = priority_calc(tip);"] - #[doc = ""] - #[doc = " // For `Operational`"] - #[doc = " let virtual_tip = (inclusion_fee + tip) * OperationalFeeMultiplier;"] - #[doc = " let priority = priority_calc(tip + virtual_tip);"] - #[doc = " ```"] - #[doc = ""] - #[doc = " Note that since we use `final_fee` the multiplier applies also to the regular `tip`"] - #[doc = " sent with the transaction. So, not only does the transaction get a priority bump based"] - #[doc = " on the `inclusion_fee`, but we also amplify the impact of tips applied to `Operational`"] - #[doc = " transactions."] - pub fn operational_fee_multiplier( + #[doc = " Block & extrinsics weights: base values and limits."] + pub fn block_weights( &self, ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< - ::core::primitive::u8, + runtime_types::frame_system::limits::BlockWeights, > { ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "TransactionPayment", - "OperationalFeeMultiplier", + "System", + "BlockWeights", [ - 141u8, 130u8, 11u8, 35u8, 226u8, 114u8, 92u8, 179u8, 168u8, 110u8, - 28u8, 91u8, 221u8, 64u8, 4u8, 148u8, 201u8, 193u8, 185u8, 66u8, 226u8, - 114u8, 97u8, 79u8, 62u8, 212u8, 202u8, 114u8, 237u8, 228u8, 183u8, - 165u8, + 176u8, 124u8, 225u8, 136u8, 25u8, 73u8, 247u8, 33u8, 82u8, 206u8, 85u8, + 190u8, 127u8, 102u8, 71u8, 11u8, 185u8, 8u8, 58u8, 0u8, 94u8, 55u8, + 163u8, 177u8, 104u8, 59u8, 60u8, 136u8, 246u8, 116u8, 0u8, 239u8, ], ) } - } - } - } - pub mod sudo { - use super::{root_mod, runtime_types}; - #[doc = "Error for the Sudo pallet."] - pub type Error = runtime_types::pallet_sudo::pallet::Error; - #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] - pub type Call = runtime_types::pallet_sudo::pallet::Call; - pub mod calls { - use super::{root_mod, runtime_types}; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub mod types { - use super::runtime_types; - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Authenticates the sudo key and dispatches a function call with `Root` origin."] - pub struct Sudo { - pub call: ::subxt::ext::subxt_core::alloc::boxed::Box, + #[doc = " The maximum length of a block (in bytes)."] + pub fn block_length( + &self, + ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< + runtime_types::frame_system::limits::BlockLength, + > { + ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( + "System", + "BlockLength", + [ + 23u8, 242u8, 225u8, 39u8, 225u8, 67u8, 152u8, 41u8, 155u8, 104u8, 68u8, + 229u8, 185u8, 133u8, 10u8, 143u8, 184u8, 152u8, 234u8, 44u8, 140u8, + 96u8, 166u8, 235u8, 162u8, 160u8, 72u8, 7u8, 35u8, 194u8, 3u8, 37u8, + ], + ) } - pub mod sudo { - use super::runtime_types; - pub type Call = runtime_types::quantus_runtime::RuntimeCall; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for Sudo { - const PALLET: &'static str = "Sudo"; - const CALL: &'static str = "sudo"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Authenticates the sudo key and dispatches a function call with `Root` origin."] - #[doc = "This function does not check the weight of the call, and instead allows the"] - #[doc = "Sudo user to specify the weight of the call."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - pub struct SudoUncheckedWeight { - pub call: - ::subxt::ext::subxt_core::alloc::boxed::Box, - pub weight: sudo_unchecked_weight::Weight, - } - pub mod sudo_unchecked_weight { - use super::runtime_types; - pub type Call = runtime_types::quantus_runtime::RuntimeCall; - pub type Weight = runtime_types::sp_weights::weight_v2::Weight; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for SudoUncheckedWeight { - const PALLET: &'static str = "Sudo"; - const CALL: &'static str = "sudo_unchecked_weight"; + #[doc = " Maximum number of block number to block hash mappings to keep (oldest pruned first)."] + pub fn block_hash_count( + &self, + ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< + ::core::primitive::u32, + > { + ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( + "System", + "BlockHashCount", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo"] - #[doc = "key."] - pub struct SetKey { - pub new: set_key::New, + #[doc = " The weight of runtime database operations the runtime can invoke."] + pub fn db_weight( + &self, + ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< + runtime_types::sp_weights::RuntimeDbWeight, + > { + ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( + "System", + "DbWeight", + [ + 42u8, 43u8, 178u8, 142u8, 243u8, 203u8, 60u8, 173u8, 118u8, 111u8, + 200u8, 170u8, 102u8, 70u8, 237u8, 187u8, 198u8, 120u8, 153u8, 232u8, + 183u8, 76u8, 74u8, 10u8, 70u8, 243u8, 14u8, 218u8, 213u8, 126u8, 29u8, + 177u8, + ], + ) } - pub mod set_key { - use super::runtime_types; - pub type New = ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >; + #[doc = " Get the chain's in-code version."] + pub fn version( + &self, + ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< + runtime_types::sp_version::RuntimeVersion, + > { + ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( + "System", + "Version", + [ + 214u8, 43u8, 96u8, 193u8, 96u8, 213u8, 63u8, 124u8, 22u8, 111u8, 41u8, + 78u8, 146u8, 77u8, 34u8, 163u8, 117u8, 100u8, 6u8, 216u8, 238u8, 54u8, + 80u8, 185u8, 219u8, 11u8, 192u8, 200u8, 129u8, 88u8, 161u8, 250u8, + ], + ) } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for SetKey { - const PALLET: &'static str = "Sudo"; - const CALL: &'static str = "set_key"; + #[doc = " The designated SS58 prefix of this chain."] + #[doc = ""] + #[doc = " This replaces the \"ss58Format\" property declared in the chain spec. Reason is"] + #[doc = " that the runtime should know about the prefix in order to make use of it as"] + #[doc = " an identifier of the chain."] + pub fn ss58_prefix( + &self, + ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< + ::core::primitive::u16, + > { + ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( + "System", + "SS58Prefix", + [ + 116u8, 33u8, 2u8, 170u8, 181u8, 147u8, 171u8, 169u8, 167u8, 227u8, + 41u8, 144u8, 11u8, 236u8, 82u8, 100u8, 74u8, 60u8, 184u8, 72u8, 169u8, + 90u8, 208u8, 135u8, 15u8, 117u8, 10u8, 123u8, 128u8, 193u8, 29u8, 70u8, + ], + ) } + } + } + } + pub mod timestamp { + use super::{root_mod, runtime_types}; + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub type Call = runtime_types::pallet_timestamp::pallet::Call; + pub mod calls { + use super::{root_mod, runtime_types}; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod types { + use super::runtime_types; #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, @@ -3611,818 +3712,698 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Authenticates the sudo key and dispatches a function call with `Signed` origin from"] - #[doc = "a given account."] + #[doc = "Set the current time."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - pub struct SudoAs { - pub who: sudo_as::Who, - pub call: ::subxt::ext::subxt_core::alloc::boxed::Box, + #[doc = "This call should be invoked exactly once per block. It will panic at the finalization"] + #[doc = "phase, if this call hasn't been invoked by that time."] + #[doc = ""] + #[doc = "The timestamp should be greater than the previous one by the amount specified by"] + #[doc = "[`Config::MinimumPeriod`]."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _None_."] + #[doc = ""] + #[doc = "This dispatch class is _Mandatory_ to ensure it gets executed in the block. Be aware"] + #[doc = "that changing the complexity of this call could result exhausting the resources in a"] + #[doc = "block to execute any other calls."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(1)` (Note that implementations of `OnTimestampSet` must also be `O(1)`)"] + #[doc = "- 1 storage read and 1 storage mutation (codec `O(1)` because of `DidUpdate::take` in"] + #[doc = " `on_finalize`)"] + #[doc = "- 1 event handler `on_timestamp_set`. Must be `O(1)`."] + pub struct Set { + #[codec(compact)] + pub now: set::Now, } - pub mod sudo_as { + pub mod set { use super::runtime_types; - pub type Who = ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >; - pub type Call = runtime_types::quantus_runtime::RuntimeCall; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for SudoAs { - const PALLET: &'static str = "Sudo"; - const CALL: &'static str = "sudo_as"; + pub type Now = ::core::primitive::u64; } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Permanently removes the sudo key."] - #[doc = ""] - #[doc = "**This cannot be un-done.**"] - pub struct RemoveKey; - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for RemoveKey { - const PALLET: &'static str = "Sudo"; - const CALL: &'static str = "remove_key"; + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for Set { + const PALLET: &'static str = "Timestamp"; + const CALL: &'static str = "set"; } } pub struct TransactionApi; impl TransactionApi { - #[doc = "Authenticates the sudo key and dispatches a function call with `Root` origin."] - pub fn sudo( - &self, - call: types::sudo::Call, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Sudo", - "sudo", - types::Sudo { - call: ::subxt::ext::subxt_core::alloc::boxed::Box::new(call), - }, - [ - 198u8, 228u8, 153u8, 119u8, 75u8, 89u8, 206u8, 201u8, 30u8, 105u8, - 148u8, 23u8, 81u8, 60u8, 167u8, 228u8, 76u8, 253u8, 232u8, 81u8, 65u8, - 133u8, 196u8, 146u8, 244u8, 80u8, 222u8, 43u8, 218u8, 248u8, 169u8, - 232u8, - ], - ) - } - #[doc = "Authenticates the sudo key and dispatches a function call with `Root` origin."] - #[doc = "This function does not check the weight of the call, and instead allows the"] - #[doc = "Sudo user to specify the weight of the call."] + #[doc = "Set the current time."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - pub fn sudo_unchecked_weight( + #[doc = "This call should be invoked exactly once per block. It will panic at the finalization"] + #[doc = "phase, if this call hasn't been invoked by that time."] + #[doc = ""] + #[doc = "The timestamp should be greater than the previous one by the amount specified by"] + #[doc = "[`Config::MinimumPeriod`]."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _None_."] + #[doc = ""] + #[doc = "This dispatch class is _Mandatory_ to ensure it gets executed in the block. Be aware"] + #[doc = "that changing the complexity of this call could result exhausting the resources in a"] + #[doc = "block to execute any other calls."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(1)` (Note that implementations of `OnTimestampSet` must also be `O(1)`)"] + #[doc = "- 1 storage read and 1 storage mutation (codec `O(1)` because of `DidUpdate::take` in"] + #[doc = " `on_finalize`)"] + #[doc = "- 1 event handler `on_timestamp_set`. Must be `O(1)`."] + pub fn set( &self, - call: types::sudo_unchecked_weight::Call, - weight: types::sudo_unchecked_weight::Weight, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload - { + now: types::set::Now, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Sudo", - "sudo_unchecked_weight", - types::SudoUncheckedWeight { - call: ::subxt::ext::subxt_core::alloc::boxed::Box::new(call), - weight, - }, + "Timestamp", + "set", + types::Set { now }, [ - 91u8, 102u8, 107u8, 163u8, 3u8, 40u8, 188u8, 236u8, 128u8, 119u8, 31u8, - 122u8, 179u8, 114u8, 93u8, 83u8, 63u8, 62u8, 88u8, 200u8, 159u8, 160u8, - 168u8, 129u8, 8u8, 151u8, 35u8, 4u8, 111u8, 248u8, 133u8, 185u8, + 37u8, 95u8, 49u8, 218u8, 24u8, 22u8, 0u8, 95u8, 72u8, 35u8, 155u8, + 199u8, 213u8, 54u8, 207u8, 22u8, 185u8, 193u8, 221u8, 70u8, 18u8, + 200u8, 4u8, 231u8, 195u8, 173u8, 6u8, 122u8, 11u8, 203u8, 231u8, 227u8, ], ) } - #[doc = "Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo"] - #[doc = "key."] - pub fn set_key( - &self, - new: types::set_key::New, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Sudo", - "set_key", - types::SetKey { new }, - [ - 9u8, 73u8, 39u8, 205u8, 188u8, 127u8, 143u8, 54u8, 128u8, 94u8, 8u8, - 227u8, 197u8, 44u8, 70u8, 93u8, 228u8, 196u8, 64u8, 165u8, 226u8, - 158u8, 101u8, 192u8, 22u8, 193u8, 102u8, 84u8, 21u8, 35u8, 92u8, 198u8, - ], - ) - } - #[doc = "Authenticates the sudo key and dispatches a function call with `Signed` origin from"] - #[doc = "a given account."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - pub fn sudo_as( - &self, - who: types::sudo_as::Who, - call: types::sudo_as::Call, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Sudo", - "sudo_as", - types::SudoAs { - who, - call: ::subxt::ext::subxt_core::alloc::boxed::Box::new(call), - }, - [ - 133u8, 191u8, 77u8, 51u8, 251u8, 26u8, 250u8, 53u8, 47u8, 122u8, 117u8, - 43u8, 29u8, 57u8, 45u8, 132u8, 170u8, 47u8, 28u8, 203u8, 203u8, 31u8, - 59u8, 99u8, 192u8, 114u8, 198u8, 126u8, 222u8, 244u8, 206u8, 229u8, - ], - ) - } - #[doc = "Permanently removes the sudo key."] - #[doc = ""] - #[doc = "**This cannot be un-done.**"] - pub fn remove_key( - &self, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Sudo", - "remove_key", - types::RemoveKey {}, - [ - 133u8, 253u8, 54u8, 175u8, 202u8, 239u8, 5u8, 198u8, 180u8, 138u8, - 25u8, 28u8, 109u8, 40u8, 30u8, 56u8, 126u8, 100u8, 52u8, 205u8, 250u8, - 191u8, 61u8, 195u8, 172u8, 142u8, 184u8, 239u8, 247u8, 10u8, 211u8, - 79u8, - ], - ) - } - } - } - #[doc = "The `Event` enum of this pallet"] - pub type Event = runtime_types::pallet_sudo::pallet::Event; - pub mod events { - use super::runtime_types; - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "A sudo call just took place."] - pub struct Sudid { - pub sudo_result: sudid::SudoResult, - } - pub mod sudid { - use super::runtime_types; - pub type SudoResult = - ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for Sudid { - const PALLET: &'static str = "Sudo"; - const EVENT: &'static str = "Sudid"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "The sudo key has been updated."] - pub struct KeyChanged { - pub old: key_changed::Old, - pub new: key_changed::New, - } - pub mod key_changed { - use super::runtime_types; - pub type Old = ::core::option::Option<::subxt::ext::subxt_core::utils::AccountId32>; - pub type New = ::subxt::ext::subxt_core::utils::AccountId32; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for KeyChanged { - const PALLET: &'static str = "Sudo"; - const EVENT: &'static str = "KeyChanged"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "The key was permanently removed."] - pub struct KeyRemoved; - impl ::subxt::ext::subxt_core::events::StaticEvent for KeyRemoved { - const PALLET: &'static str = "Sudo"; - const EVENT: &'static str = "KeyRemoved"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "A [sudo_as](Pallet::sudo_as) call just took place."] - pub struct SudoAsDone { - pub sudo_result: sudo_as_done::SudoResult, - } - pub mod sudo_as_done { - use super::runtime_types; - pub type SudoResult = - ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for SudoAsDone { - const PALLET: &'static str = "Sudo"; - const EVENT: &'static str = "SudoAsDone"; } } pub mod storage { use super::runtime_types; pub mod types { use super::runtime_types; - pub mod key { + pub mod now { use super::runtime_types; - pub type Key = ::subxt::ext::subxt_core::utils::AccountId32; + pub type Now = ::core::primitive::u64; + } + pub mod did_update { + use super::runtime_types; + pub type DidUpdate = ::core::primitive::bool; } } pub struct StorageApi; impl StorageApi { - #[doc = " The `AccountId` of the sudo key."] - pub fn key( + #[doc = " The current time for the current block."] + pub fn now( &self, ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< (), - types::key::Key, + types::now::Now, ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, + (), + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "Timestamp", + "Now", + (), + [ + 44u8, 50u8, 80u8, 30u8, 195u8, 146u8, 123u8, 238u8, 8u8, 163u8, 187u8, + 92u8, 61u8, 39u8, 51u8, 29u8, 173u8, 169u8, 217u8, 158u8, 85u8, 187u8, + 141u8, 26u8, 12u8, 115u8, 51u8, 11u8, 200u8, 244u8, 138u8, 152u8, + ], + ) + } + #[doc = " Whether the timestamp has been updated in this block."] + #[doc = ""] + #[doc = " This value is updated to `true` upon successful submission of a timestamp by a node."] + #[doc = " It is then checked at the end of each block execution in the `on_finalize` hook."] + pub fn did_update( + &self, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< (), + types::did_update::DidUpdate, + ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, (), > { ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Sudo", - "Key", + "Timestamp", + "DidUpdate", (), [ - 72u8, 14u8, 225u8, 162u8, 205u8, 247u8, 227u8, 105u8, 116u8, 57u8, 4u8, - 31u8, 84u8, 137u8, 227u8, 228u8, 133u8, 245u8, 206u8, 227u8, 117u8, - 36u8, 252u8, 151u8, 107u8, 15u8, 180u8, 4u8, 4u8, 152u8, 195u8, 144u8, + 229u8, 175u8, 246u8, 102u8, 237u8, 158u8, 212u8, 229u8, 238u8, 214u8, + 205u8, 160u8, 164u8, 252u8, 195u8, 75u8, 139u8, 110u8, 22u8, 34u8, + 248u8, 204u8, 107u8, 46u8, 20u8, 200u8, 238u8, 167u8, 71u8, 41u8, + 214u8, 140u8, + ], + ) + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The minimum period between blocks."] + #[doc = ""] + #[doc = " Be aware that this is different to the *expected* period that the block production"] + #[doc = " apparatus provides. Your chosen consensus system will generally work with this to"] + #[doc = " determine a sensible block time. For example, in the Aura pallet it will be double this"] + #[doc = " period on default settings."] + pub fn minimum_period( + &self, + ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< + ::core::primitive::u64, + > { + ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( + "Timestamp", + "MinimumPeriod", + [ + 128u8, 214u8, 205u8, 242u8, 181u8, 142u8, 124u8, 231u8, 190u8, 146u8, + 59u8, 226u8, 157u8, 101u8, 103u8, 117u8, 249u8, 65u8, 18u8, 191u8, + 103u8, 119u8, 53u8, 85u8, 81u8, 96u8, 220u8, 42u8, 184u8, 239u8, 42u8, + 246u8, ], ) } } } } - pub mod q_po_w { + pub mod balances { use super::{root_mod, runtime_types}; #[doc = "The `Error` enum of this pallet."] - pub type Error = runtime_types::pallet_qpow::pallet::Error; - #[doc = "The `Event` enum of this pallet"] - pub type Event = runtime_types::pallet_qpow::pallet::Event; - pub mod events { - use super::runtime_types; - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - pub struct ProofSubmitted { - pub nonce: proof_submitted::Nonce, - } - pub mod proof_submitted { - use super::runtime_types; - pub type Nonce = [::core::primitive::u8; 64usize]; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for ProofSubmitted { - const PALLET: &'static str = "QPoW"; - const EVENT: &'static str = "ProofSubmitted"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - pub struct DistanceThresholdAdjusted { - pub old_distance_threshold: distance_threshold_adjusted::OldDistanceThreshold, - pub new_distance_threshold: distance_threshold_adjusted::NewDistanceThreshold, - pub observed_block_time: distance_threshold_adjusted::ObservedBlockTime, - } - pub mod distance_threshold_adjusted { + pub type Error = runtime_types::pallet_balances::pallet::Error; + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub type Call = runtime_types::pallet_balances::pallet::Call; + pub mod calls { + use super::{root_mod, runtime_types}; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod types { use super::runtime_types; - pub type OldDistanceThreshold = runtime_types::primitive_types::U512; - pub type NewDistanceThreshold = runtime_types::primitive_types::U512; - pub type ObservedBlockTime = ::core::primitive::u64; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for DistanceThresholdAdjusted { - const PALLET: &'static str = "QPoW"; - const EVENT: &'static str = "DistanceThresholdAdjusted"; - } - } - pub mod storage { - use super::runtime_types; - pub mod types { - use super::runtime_types; - pub mod block_distance_thresholds { - use super::runtime_types; - pub type BlockDistanceThresholds = runtime_types::primitive_types::U512; - pub type Param0 = ::core::primitive::u32; + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "Transfer some liquid free balance to another account."] + #[doc = ""] + #[doc = "`transfer_allow_death` will set the `FreeBalance` of the sender and receiver."] + #[doc = "If the sender's account is below the existential deposit as a result"] + #[doc = "of the transfer, the account will be reaped."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be `Signed` by the transactor."] + pub struct TransferAllowDeath { + pub dest: transfer_allow_death::Dest, + #[codec(compact)] + pub value: transfer_allow_death::Value, } - pub mod latest_nonce { + pub mod transfer_allow_death { use super::runtime_types; - pub type LatestNonce = [::core::primitive::u8; 64usize]; + pub type Dest = ::subxt::ext::subxt_core::utils::MultiAddress< + ::subxt::ext::subxt_core::utils::AccountId32, + (), + >; + pub type Value = ::core::primitive::u128; } - pub mod last_block_time { - use super::runtime_types; - pub type LastBlockTime = ::core::primitive::u64; + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for TransferAllowDeath { + const PALLET: &'static str = "Balances"; + const CALL: &'static str = "transfer_allow_death"; } - pub mod last_block_duration { - use super::runtime_types; - pub type LastBlockDuration = ::core::primitive::u64; + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "Exactly as `transfer_allow_death`, except the origin must be root and the source account"] + #[doc = "may be specified."] + pub struct ForceTransfer { + pub source: force_transfer::Source, + pub dest: force_transfer::Dest, + #[codec(compact)] + pub value: force_transfer::Value, } - pub mod current_distance_threshold { + pub mod force_transfer { use super::runtime_types; - pub type CurrentDistanceThreshold = runtime_types::primitive_types::U512; + pub type Source = ::subxt::ext::subxt_core::utils::MultiAddress< + ::subxt::ext::subxt_core::utils::AccountId32, + (), + >; + pub type Dest = ::subxt::ext::subxt_core::utils::MultiAddress< + ::subxt::ext::subxt_core::utils::AccountId32, + (), + >; + pub type Value = ::core::primitive::u128; } - pub mod total_work { - use super::runtime_types; - pub type TotalWork = runtime_types::primitive_types::U512; + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for ForceTransfer { + const PALLET: &'static str = "Balances"; + const CALL: &'static str = "force_transfer"; } - pub mod blocks_in_period { - use super::runtime_types; - pub type BlocksInPeriod = ::core::primitive::u32; + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "Same as the [`transfer_allow_death`] call, but with a check that the transfer will not"] + #[doc = "kill the origin account."] + #[doc = ""] + #[doc = "99% of the time you want [`transfer_allow_death`] instead."] + #[doc = ""] + #[doc = "[`transfer_allow_death`]: struct.Pallet.html#method.transfer"] + pub struct TransferKeepAlive { + pub dest: transfer_keep_alive::Dest, + #[codec(compact)] + pub value: transfer_keep_alive::Value, } - pub mod block_time_history { + pub mod transfer_keep_alive { use super::runtime_types; - pub type BlockTimeHistory = ::core::primitive::u64; - pub type Param0 = ::core::primitive::u32; + pub type Dest = ::subxt::ext::subxt_core::utils::MultiAddress< + ::subxt::ext::subxt_core::utils::AccountId32, + (), + >; + pub type Value = ::core::primitive::u128; } - pub mod history_index { - use super::runtime_types; - pub type HistoryIndex = ::core::primitive::u32; + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for TransferKeepAlive { + const PALLET: &'static str = "Balances"; + const CALL: &'static str = "transfer_keep_alive"; } - pub mod history_size { - use super::runtime_types; - pub type HistorySize = ::core::primitive::u32; + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "Transfer the entire transferable balance from the caller account."] + #[doc = ""] + #[doc = "NOTE: This function only attempts to transfer _transferable_ balances. This means that"] + #[doc = "any locked, reserved, or existential deposits (when `keep_alive` is `true`), will not be"] + #[doc = "transferred by this function. To ensure that this function results in a killed account,"] + #[doc = "you might need to prepare the account by removing any reference counters, storage"] + #[doc = "deposits, etc..."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be Signed."] + #[doc = ""] + #[doc = "- `dest`: The recipient of the transfer."] + #[doc = "- `keep_alive`: A boolean to determine if the `transfer_all` operation should send all"] + #[doc = " of the funds the account has, causing the sender account to be killed (false), or"] + #[doc = " transfer everything except at least the existential deposit, which will guarantee to"] + #[doc = " keep the sender account alive (true)."] + pub struct TransferAll { + pub dest: transfer_all::Dest, + pub keep_alive: transfer_all::KeepAlive, } - } - pub struct StorageApi; - impl StorageApi { - pub fn block_distance_thresholds_iter( - &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::block_distance_thresholds::BlockDistanceThresholds, - (), - ::subxt::ext::subxt_core::utils::Yes, - ::subxt::ext::subxt_core::utils::Yes, - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "QPoW", - "BlockDistanceThresholds", + pub mod transfer_all { + use super::runtime_types; + pub type Dest = ::subxt::ext::subxt_core::utils::MultiAddress< + ::subxt::ext::subxt_core::utils::AccountId32, (), - [ - 245u8, 88u8, 219u8, 50u8, 137u8, 246u8, 187u8, 252u8, 181u8, 133u8, - 227u8, 54u8, 166u8, 201u8, 139u8, 81u8, 223u8, 125u8, 243u8, 78u8, 5u8, - 216u8, 42u8, 222u8, 152u8, 140u8, 234u8, 243u8, 47u8, 240u8, 251u8, - 220u8, - ], - ) + >; + pub type KeepAlive = ::core::primitive::bool; } - pub fn block_distance_thresholds( - &self, - _0: types::block_distance_thresholds::Param0, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::block_distance_thresholds::Param0, - >, - types::block_distance_thresholds::BlockDistanceThresholds, - ::subxt::ext::subxt_core::utils::Yes, - ::subxt::ext::subxt_core::utils::Yes, - (), - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "QPoW", - "BlockDistanceThresholds", - ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), - [ - 245u8, 88u8, 219u8, 50u8, 137u8, 246u8, 187u8, 252u8, 181u8, 133u8, - 227u8, 54u8, 166u8, 201u8, 139u8, 81u8, 223u8, 125u8, 243u8, 78u8, 5u8, - 216u8, 42u8, 222u8, 152u8, 140u8, 234u8, 243u8, 47u8, 240u8, 251u8, - 220u8, - ], - ) + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for TransferAll { + const PALLET: &'static str = "Balances"; + const CALL: &'static str = "transfer_all"; } - pub fn latest_nonce( - &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::latest_nonce::LatestNonce, - ::subxt::ext::subxt_core::utils::Yes, - (), - (), - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "QPoW", - "LatestNonce", + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "Unreserve some balance from a user by force."] + #[doc = ""] + #[doc = "Can only be called by ROOT."] + pub struct ForceUnreserve { + pub who: force_unreserve::Who, + pub amount: force_unreserve::Amount, + } + pub mod force_unreserve { + use super::runtime_types; + pub type Who = ::subxt::ext::subxt_core::utils::MultiAddress< + ::subxt::ext::subxt_core::utils::AccountId32, (), - [ - 117u8, 69u8, 169u8, 11u8, 105u8, 55u8, 185u8, 77u8, 68u8, 196u8, 128u8, - 128u8, 81u8, 145u8, 22u8, 154u8, 249u8, 226u8, 39u8, 6u8, 5u8, 205u8, - 220u8, 88u8, 67u8, 72u8, 38u8, 82u8, 60u8, 81u8, 167u8, 242u8, - ], - ) + >; + pub type Amount = ::core::primitive::u128; } - pub fn last_block_time( - &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::last_block_time::LastBlockTime, - ::subxt::ext::subxt_core::utils::Yes, - ::subxt::ext::subxt_core::utils::Yes, - (), - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "QPoW", - "LastBlockTime", + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for ForceUnreserve { + const PALLET: &'static str = "Balances"; + const CALL: &'static str = "force_unreserve"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "Upgrade a specified account."] + #[doc = ""] + #[doc = "- `origin`: Must be `Signed`."] + #[doc = "- `who`: The account to be upgraded."] + #[doc = ""] + #[doc = "This will waive the transaction fee if at least all but 10% of the accounts needed to"] + #[doc = "be upgraded. (We let some not have to be upgraded just in order to allow for the"] + #[doc = "possibility of churn)."] + pub struct UpgradeAccounts { + pub who: upgrade_accounts::Who, + } + pub mod upgrade_accounts { + use super::runtime_types; + pub type Who = ::subxt::ext::subxt_core::alloc::vec::Vec< + ::subxt::ext::subxt_core::utils::AccountId32, + >; + } + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for UpgradeAccounts { + const PALLET: &'static str = "Balances"; + const CALL: &'static str = "upgrade_accounts"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "Set the regular balance of a given account."] + #[doc = ""] + #[doc = "The dispatch origin for this call is `root`."] + pub struct ForceSetBalance { + pub who: force_set_balance::Who, + #[codec(compact)] + pub new_free: force_set_balance::NewFree, + } + pub mod force_set_balance { + use super::runtime_types; + pub type Who = ::subxt::ext::subxt_core::utils::MultiAddress< + ::subxt::ext::subxt_core::utils::AccountId32, (), - [ - 239u8, 229u8, 252u8, 169u8, 178u8, 1u8, 146u8, 236u8, 50u8, 59u8, - 221u8, 169u8, 107u8, 168u8, 203u8, 103u8, 252u8, 189u8, 52u8, 64u8, - 235u8, 110u8, 164u8, 100u8, 85u8, 66u8, 202u8, 71u8, 189u8, 18u8, 4u8, - 217u8, - ], - ) + >; + pub type NewFree = ::core::primitive::u128; } - pub fn last_block_duration( + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for ForceSetBalance { + const PALLET: &'static str = "Balances"; + const CALL: &'static str = "force_set_balance"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "Adjust the total issuance in a saturating way."] + #[doc = ""] + #[doc = "Can only be called by root and always needs a positive `delta`."] + #[doc = ""] + #[doc = "# Example"] + pub struct ForceAdjustTotalIssuance { + pub direction: force_adjust_total_issuance::Direction, + #[codec(compact)] + pub delta: force_adjust_total_issuance::Delta, + } + pub mod force_adjust_total_issuance { + use super::runtime_types; + pub type Direction = runtime_types::pallet_balances::types::AdjustmentDirection; + pub type Delta = ::core::primitive::u128; + } + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for ForceAdjustTotalIssuance { + const PALLET: &'static str = "Balances"; + const CALL: &'static str = "force_adjust_total_issuance"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "Burn the specified liquid free balance from the origin account."] + #[doc = ""] + #[doc = "If the origin's account ends up below the existential deposit as a result"] + #[doc = "of the burn and `keep_alive` is false, the account will be reaped."] + #[doc = ""] + #[doc = "Unlike sending funds to a _burn_ address, which merely makes the funds inaccessible,"] + #[doc = "this `burn` operation will reduce total issuance by the amount _burned_."] + pub struct Burn { + #[codec(compact)] + pub value: burn::Value, + pub keep_alive: burn::KeepAlive, + } + pub mod burn { + use super::runtime_types; + pub type Value = ::core::primitive::u128; + pub type KeepAlive = ::core::primitive::bool; + } + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for Burn { + const PALLET: &'static str = "Balances"; + const CALL: &'static str = "burn"; + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Transfer some liquid free balance to another account."] + #[doc = ""] + #[doc = "`transfer_allow_death` will set the `FreeBalance` of the sender and receiver."] + #[doc = "If the sender's account is below the existential deposit as a result"] + #[doc = "of the transfer, the account will be reaped."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be `Signed` by the transactor."] + pub fn transfer_allow_death( &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::last_block_duration::LastBlockDuration, - ::subxt::ext::subxt_core::utils::Yes, - ::subxt::ext::subxt_core::utils::Yes, - (), - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "QPoW", - "LastBlockDuration", - (), + dest: types::transfer_allow_death::Dest, + value: types::transfer_allow_death::Value, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload + { + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "Balances", + "transfer_allow_death", + types::TransferAllowDeath { dest, value }, [ - 44u8, 139u8, 180u8, 95u8, 43u8, 58u8, 255u8, 71u8, 201u8, 240u8, 61u8, - 131u8, 214u8, 202u8, 118u8, 157u8, 21u8, 52u8, 154u8, 123u8, 253u8, - 160u8, 68u8, 100u8, 91u8, 196u8, 168u8, 14u8, 84u8, 60u8, 160u8, 229u8, + 51u8, 166u8, 195u8, 10u8, 139u8, 218u8, 55u8, 130u8, 6u8, 194u8, 35u8, + 140u8, 27u8, 205u8, 214u8, 222u8, 102u8, 43u8, 143u8, 145u8, 86u8, + 219u8, 210u8, 147u8, 13u8, 39u8, 51u8, 21u8, 237u8, 179u8, 132u8, + 130u8, ], ) } - pub fn current_distance_threshold( + #[doc = "Exactly as `transfer_allow_death`, except the origin must be root and the source account"] + #[doc = "may be specified."] + pub fn force_transfer( &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::current_distance_threshold::CurrentDistanceThreshold, - ::subxt::ext::subxt_core::utils::Yes, - ::subxt::ext::subxt_core::utils::Yes, - (), - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "QPoW", - "CurrentDistanceThreshold", - (), + source: types::force_transfer::Source, + dest: types::force_transfer::Dest, + value: types::force_transfer::Value, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload + { + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "Balances", + "force_transfer", + types::ForceTransfer { source, dest, value }, [ - 241u8, 84u8, 91u8, 177u8, 115u8, 209u8, 7u8, 88u8, 15u8, 186u8, 180u8, - 244u8, 29u8, 198u8, 42u8, 162u8, 144u8, 70u8, 255u8, 39u8, 235u8, - 121u8, 239u8, 136u8, 137u8, 171u8, 183u8, 245u8, 158u8, 225u8, 244u8, - 147u8, + 154u8, 93u8, 222u8, 27u8, 12u8, 248u8, 63u8, 213u8, 224u8, 86u8, 250u8, + 153u8, 249u8, 102u8, 83u8, 160u8, 79u8, 125u8, 105u8, 222u8, 77u8, + 180u8, 90u8, 105u8, 81u8, 217u8, 60u8, 25u8, 213u8, 51u8, 185u8, 96u8, ], ) } - pub fn total_work( + #[doc = "Same as the [`transfer_allow_death`] call, but with a check that the transfer will not"] + #[doc = "kill the origin account."] + #[doc = ""] + #[doc = "99% of the time you want [`transfer_allow_death`] instead."] + #[doc = ""] + #[doc = "[`transfer_allow_death`]: struct.Pallet.html#method.transfer"] + pub fn transfer_keep_alive( &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::total_work::TotalWork, - ::subxt::ext::subxt_core::utils::Yes, - ::subxt::ext::subxt_core::utils::Yes, - (), - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "QPoW", - "TotalWork", - (), + dest: types::transfer_keep_alive::Dest, + value: types::transfer_keep_alive::Value, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload + { + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "Balances", + "transfer_keep_alive", + types::TransferKeepAlive { dest, value }, [ - 184u8, 29u8, 54u8, 146u8, 220u8, 155u8, 103u8, 67u8, 21u8, 188u8, 53u8, - 160u8, 171u8, 107u8, 52u8, 211u8, 251u8, 52u8, 192u8, 227u8, 150u8, - 156u8, 172u8, 1u8, 233u8, 37u8, 49u8, 13u8, 213u8, 104u8, 10u8, 134u8, + 245u8, 14u8, 190u8, 193u8, 32u8, 210u8, 74u8, 92u8, 25u8, 182u8, 76u8, + 55u8, 247u8, 83u8, 114u8, 75u8, 143u8, 236u8, 117u8, 25u8, 54u8, 157u8, + 208u8, 207u8, 233u8, 89u8, 70u8, 161u8, 235u8, 242u8, 222u8, 59u8, ], ) } - pub fn blocks_in_period( - &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::blocks_in_period::BlocksInPeriod, - ::subxt::ext::subxt_core::utils::Yes, - ::subxt::ext::subxt_core::utils::Yes, - (), - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "QPoW", - "BlocksInPeriod", - (), - [ - 151u8, 58u8, 246u8, 176u8, 204u8, 107u8, 224u8, 209u8, 240u8, 52u8, - 246u8, 45u8, 69u8, 123u8, 23u8, 193u8, 126u8, 200u8, 131u8, 199u8, - 65u8, 39u8, 43u8, 20u8, 18u8, 4u8, 13u8, 120u8, 115u8, 31u8, 204u8, - 134u8, - ], - ) - } - pub fn block_time_history_iter( - &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::block_time_history::BlockTimeHistory, - (), - ::subxt::ext::subxt_core::utils::Yes, - ::subxt::ext::subxt_core::utils::Yes, - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "QPoW", - "BlockTimeHistory", - (), - [ - 149u8, 198u8, 140u8, 12u8, 144u8, 112u8, 153u8, 141u8, 207u8, 242u8, - 220u8, 87u8, 63u8, 234u8, 158u8, 87u8, 143u8, 186u8, 111u8, 14u8, 94u8, - 134u8, 215u8, 201u8, 141u8, 196u8, 39u8, 107u8, 113u8, 219u8, 41u8, - 58u8, - ], - ) - } - pub fn block_time_history( - &self, - _0: types::block_time_history::Param0, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::block_time_history::Param0, - >, - types::block_time_history::BlockTimeHistory, - ::subxt::ext::subxt_core::utils::Yes, - ::subxt::ext::subxt_core::utils::Yes, - (), - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "QPoW", - "BlockTimeHistory", - ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), - [ - 149u8, 198u8, 140u8, 12u8, 144u8, 112u8, 153u8, 141u8, 207u8, 242u8, - 220u8, 87u8, 63u8, 234u8, 158u8, 87u8, 143u8, 186u8, 111u8, 14u8, 94u8, - 134u8, 215u8, 201u8, 141u8, 196u8, 39u8, 107u8, 113u8, 219u8, 41u8, - 58u8, - ], - ) - } - pub fn history_index( + #[doc = "Transfer the entire transferable balance from the caller account."] + #[doc = ""] + #[doc = "NOTE: This function only attempts to transfer _transferable_ balances. This means that"] + #[doc = "any locked, reserved, or existential deposits (when `keep_alive` is `true`), will not be"] + #[doc = "transferred by this function. To ensure that this function results in a killed account,"] + #[doc = "you might need to prepare the account by removing any reference counters, storage"] + #[doc = "deposits, etc..."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be Signed."] + #[doc = ""] + #[doc = "- `dest`: The recipient of the transfer."] + #[doc = "- `keep_alive`: A boolean to determine if the `transfer_all` operation should send all"] + #[doc = " of the funds the account has, causing the sender account to be killed (false), or"] + #[doc = " transfer everything except at least the existential deposit, which will guarantee to"] + #[doc = " keep the sender account alive (true)."] + pub fn transfer_all( &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::history_index::HistoryIndex, - ::subxt::ext::subxt_core::utils::Yes, - ::subxt::ext::subxt_core::utils::Yes, - (), - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "QPoW", - "HistoryIndex", - (), + dest: types::transfer_all::Dest, + keep_alive: types::transfer_all::KeepAlive, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "Balances", + "transfer_all", + types::TransferAll { dest, keep_alive }, [ - 86u8, 246u8, 20u8, 135u8, 119u8, 68u8, 164u8, 167u8, 110u8, 235u8, - 121u8, 151u8, 221u8, 179u8, 25u8, 155u8, 187u8, 30u8, 43u8, 45u8, - 220u8, 156u8, 218u8, 20u8, 78u8, 59u8, 41u8, 144u8, 124u8, 166u8, 84u8, - 149u8, + 105u8, 132u8, 49u8, 144u8, 195u8, 250u8, 34u8, 46u8, 213u8, 248u8, + 112u8, 188u8, 81u8, 228u8, 136u8, 18u8, 67u8, 172u8, 37u8, 38u8, 238u8, + 9u8, 34u8, 15u8, 67u8, 34u8, 148u8, 195u8, 223u8, 29u8, 154u8, 6u8, ], ) } - pub fn history_size( + #[doc = "Unreserve some balance from a user by force."] + #[doc = ""] + #[doc = "Can only be called by ROOT."] + pub fn force_unreserve( &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::history_size::HistorySize, - ::subxt::ext::subxt_core::utils::Yes, - ::subxt::ext::subxt_core::utils::Yes, - (), - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "QPoW", - "HistorySize", - (), + who: types::force_unreserve::Who, + amount: types::force_unreserve::Amount, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload + { + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "Balances", + "force_unreserve", + types::ForceUnreserve { who, amount }, [ - 77u8, 208u8, 178u8, 115u8, 101u8, 133u8, 140u8, 3u8, 76u8, 240u8, - 162u8, 223u8, 90u8, 131u8, 243u8, 231u8, 54u8, 101u8, 3u8, 25u8, 126u8, - 93u8, 42u8, 4u8, 82u8, 198u8, 226u8, 198u8, 59u8, 74u8, 205u8, 218u8, + 142u8, 151u8, 64u8, 205u8, 46u8, 64u8, 62u8, 122u8, 108u8, 49u8, 223u8, + 140u8, 120u8, 153u8, 35u8, 165u8, 187u8, 38u8, 157u8, 200u8, 123u8, + 199u8, 198u8, 168u8, 208u8, 159u8, 39u8, 134u8, 92u8, 103u8, 84u8, + 171u8, ], ) } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " Pallet's weight info"] - pub fn initial_distance_threshold_exponent( + #[doc = "Upgrade a specified account."] + #[doc = ""] + #[doc = "- `origin`: Must be `Signed`."] + #[doc = "- `who`: The account to be upgraded."] + #[doc = ""] + #[doc = "This will waive the transaction fee if at least all but 10% of the accounts needed to"] + #[doc = "be upgraded. (We let some not have to be upgraded just in order to allow for the"] + #[doc = "possibility of churn)."] + pub fn upgrade_accounts( &self, - ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< - ::core::primitive::u32, - > { - ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "QPoW", - "InitialDistanceThresholdExponent", + who: types::upgrade_accounts::Who, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload + { + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "Balances", + "upgrade_accounts", + types::UpgradeAccounts { who }, [ - 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, + 66u8, 200u8, 179u8, 104u8, 65u8, 2u8, 101u8, 56u8, 130u8, 161u8, 224u8, + 233u8, 255u8, 124u8, 70u8, 122u8, 8u8, 49u8, 103u8, 178u8, 68u8, 47u8, + 214u8, 166u8, 217u8, 116u8, 178u8, 50u8, 212u8, 164u8, 98u8, 226u8, ], ) } - pub fn difficulty_adjust_percent_clamp( + #[doc = "Set the regular balance of a given account."] + #[doc = ""] + #[doc = "The dispatch origin for this call is `root`."] + pub fn force_set_balance( &self, - ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< - ::core::primitive::u8, - > { - ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "QPoW", - "DifficultyAdjustPercentClamp", + who: types::force_set_balance::Who, + new_free: types::force_set_balance::NewFree, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload + { + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "Balances", + "force_set_balance", + types::ForceSetBalance { who, new_free }, [ - 141u8, 130u8, 11u8, 35u8, 226u8, 114u8, 92u8, 179u8, 168u8, 110u8, - 28u8, 91u8, 221u8, 64u8, 4u8, 148u8, 201u8, 193u8, 185u8, 66u8, 226u8, - 114u8, 97u8, 79u8, 62u8, 212u8, 202u8, 114u8, 237u8, 228u8, 183u8, - 165u8, + 114u8, 229u8, 59u8, 204u8, 180u8, 83u8, 17u8, 4u8, 59u8, 4u8, 55u8, + 39u8, 151u8, 196u8, 124u8, 60u8, 209u8, 65u8, 193u8, 11u8, 44u8, 164u8, + 116u8, 93u8, 169u8, 30u8, 199u8, 165u8, 55u8, 231u8, 223u8, 43u8, ], ) } - pub fn target_block_time( + #[doc = "Adjust the total issuance in a saturating way."] + #[doc = ""] + #[doc = "Can only be called by root and always needs a positive `delta`."] + #[doc = ""] + #[doc = "# Example"] + pub fn force_adjust_total_issuance( &self, - ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< - ::core::primitive::u64, + direction: types::force_adjust_total_issuance::Direction, + delta: types::force_adjust_total_issuance::Delta, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload< + types::ForceAdjustTotalIssuance, > { - ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "QPoW", - "TargetBlockTime", + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "Balances", + "force_adjust_total_issuance", + types::ForceAdjustTotalIssuance { direction, delta }, [ - 128u8, 214u8, 205u8, 242u8, 181u8, 142u8, 124u8, 231u8, 190u8, 146u8, - 59u8, 226u8, 157u8, 101u8, 103u8, 117u8, 249u8, 65u8, 18u8, 191u8, - 103u8, 119u8, 53u8, 85u8, 81u8, 96u8, 220u8, 42u8, 184u8, 239u8, 42u8, - 246u8, + 208u8, 134u8, 56u8, 133u8, 232u8, 164u8, 10u8, 213u8, 53u8, 193u8, + 190u8, 63u8, 236u8, 186u8, 96u8, 122u8, 104u8, 87u8, 173u8, 38u8, 58u8, + 176u8, 21u8, 78u8, 42u8, 106u8, 46u8, 248u8, 251u8, 190u8, 150u8, + 202u8, ], ) } - pub fn adjustment_period( + #[doc = "Burn the specified liquid free balance from the origin account."] + #[doc = ""] + #[doc = "If the origin's account ends up below the existential deposit as a result"] + #[doc = "of the burn and `keep_alive` is false, the account will be reaped."] + #[doc = ""] + #[doc = "Unlike sending funds to a _burn_ address, which merely makes the funds inaccessible,"] + #[doc = "this `burn` operation will reduce total issuance by the amount _burned_."] + pub fn burn( &self, - ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< - ::core::primitive::u32, - > { - ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "QPoW", - "AdjustmentPeriod", + value: types::burn::Value, + keep_alive: types::burn::KeepAlive, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "Balances", + "burn", + types::Burn { value, keep_alive }, [ - 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 block_time_history_size( - &self, - ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< - ::core::primitive::u32, - > { - ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "QPoW", - "BlockTimeHistorySize", - [ - 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_reorg_depth( - &self, - ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< - ::core::primitive::u32, - > { - ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "QPoW", - "MaxReorgDepth", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, - ], - ) - } - #[doc = " Fixed point scale for calculations (default: 10^18)"] - pub fn fixed_u128_scale( - &self, - ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< - ::core::primitive::u128, - > { - ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "QPoW", - "FixedU128Scale", - [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, - 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, - 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, - ], - ) - } - #[doc = " Maximum distance threshold multiplier (default: 4)"] - pub fn max_distance_multiplier( - &self, - ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< - ::core::primitive::u32, - > { - ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "QPoW", - "MaxDistanceMultiplier", - [ - 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 wormhole { - use super::{root_mod, runtime_types}; - #[doc = "The `Error` enum of this pallet."] - pub type Error = runtime_types::pallet_wormhole::pallet::Error; - #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] - pub type Call = runtime_types::pallet_wormhole::pallet::Call; - pub mod calls { - use super::{root_mod, runtime_types}; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub mod types { - use super::runtime_types; - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - pub struct VerifyWormholeProof { - pub proof_bytes: verify_wormhole_proof::ProofBytes, - pub block_number: verify_wormhole_proof::BlockNumber, - } - pub mod verify_wormhole_proof { - use super::runtime_types; - pub type ProofBytes = - ::subxt::ext::subxt_core::alloc::vec::Vec<::core::primitive::u8>; - pub type BlockNumber = ::core::primitive::u32; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for VerifyWormholeProof { - const PALLET: &'static str = "Wormhole"; - const CALL: &'static str = "verify_wormhole_proof"; - } - } - pub struct TransactionApi; - impl TransactionApi { - pub fn verify_wormhole_proof( - &self, - proof_bytes: types::verify_wormhole_proof::ProofBytes, - block_number: types::verify_wormhole_proof::BlockNumber, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload - { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Wormhole", - "verify_wormhole_proof", - types::VerifyWormholeProof { proof_bytes, block_number }, - [ - 243u8, 243u8, 212u8, 153u8, 44u8, 36u8, 106u8, 182u8, 177u8, 104u8, - 202u8, 172u8, 53u8, 111u8, 255u8, 121u8, 131u8, 84u8, 224u8, 250u8, - 104u8, 52u8, 241u8, 228u8, 51u8, 63u8, 233u8, 191u8, 215u8, 100u8, - 166u8, 76u8, + 176u8, 64u8, 7u8, 109u8, 16u8, 44u8, 145u8, 125u8, 147u8, 152u8, 130u8, + 114u8, 221u8, 201u8, 150u8, 162u8, 118u8, 71u8, 52u8, 92u8, 240u8, + 116u8, 203u8, 98u8, 5u8, 22u8, 43u8, 102u8, 94u8, 208u8, 101u8, 57u8, ], ) } } } #[doc = "The `Event` enum of this pallet"] - pub type Event = runtime_types::pallet_wormhole::pallet::Event; + pub type Event = runtime_types::pallet_balances::pallet::Event; pub mod events { use super::runtime_types; #[derive( @@ -4432,107 +4413,20 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - pub struct ProofVerified { - pub exit_amount: proof_verified::ExitAmount, - } - pub mod proof_verified { - use super::runtime_types; - pub type ExitAmount = ::core::primitive::u128; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for ProofVerified { - const PALLET: &'static str = "Wormhole"; - const EVENT: &'static str = "ProofVerified"; + #[doc = "An account was created with some free balance."] + pub struct Endowed { + pub account: endowed::Account, + pub free_balance: endowed::FreeBalance, } - } - pub mod storage { - use super::runtime_types; - pub mod types { + pub mod endowed { use super::runtime_types; - pub mod used_nullifiers { - use super::runtime_types; - pub type UsedNullifiers = ::core::primitive::bool; - pub type Param0 = [::core::primitive::u8; 32usize]; - } - } - pub struct StorageApi; - impl StorageApi { - pub fn used_nullifiers_iter( - &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::used_nullifiers::UsedNullifiers, - (), - ::subxt::ext::subxt_core::utils::Yes, - ::subxt::ext::subxt_core::utils::Yes, - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Wormhole", - "UsedNullifiers", - (), - [ - 111u8, 222u8, 249u8, 87u8, 31u8, 249u8, 120u8, 32u8, 221u8, 33u8, 86u8, - 103u8, 116u8, 235u8, 16u8, 191u8, 73u8, 183u8, 183u8, 77u8, 229u8, - 255u8, 221u8, 186u8, 29u8, 179u8, 110u8, 138u8, 146u8, 113u8, 241u8, - 222u8, - ], - ) - } - pub fn used_nullifiers( - &self, - _0: types::used_nullifiers::Param0, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::used_nullifiers::Param0, - >, - types::used_nullifiers::UsedNullifiers, - ::subxt::ext::subxt_core::utils::Yes, - ::subxt::ext::subxt_core::utils::Yes, - (), - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Wormhole", - "UsedNullifiers", - ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), - [ - 111u8, 222u8, 249u8, 87u8, 31u8, 249u8, 120u8, 32u8, 221u8, 33u8, 86u8, - 103u8, 116u8, 235u8, 16u8, 191u8, 73u8, 183u8, 183u8, 77u8, 229u8, - 255u8, 221u8, 186u8, 29u8, 179u8, 110u8, 138u8, 146u8, 113u8, 241u8, - 222u8, - ], - ) - } + pub type Account = ::subxt::ext::subxt_core::utils::AccountId32; + pub type FreeBalance = ::core::primitive::u128; } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " Account ID used as the \"from\" account when creating transfer proofs for minted tokens"] - pub fn minting_account( - &self, - ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - > { - ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "Wormhole", - "MintingAccount", - [ - 115u8, 233u8, 13u8, 223u8, 88u8, 20u8, 202u8, 139u8, 153u8, 28u8, - 155u8, 157u8, 224u8, 66u8, 3u8, 250u8, 23u8, 53u8, 88u8, 168u8, 211u8, - 204u8, 122u8, 166u8, 248u8, 23u8, 174u8, 225u8, 99u8, 108u8, 89u8, - 135u8, - ], - ) - } + impl ::subxt::ext::subxt_core::events::StaticEvent for Endowed { + const PALLET: &'static str = "Balances"; + const EVENT: &'static str = "Endowed"; } - } - } - pub mod mining_rewards { - use super::{root_mod, runtime_types}; - #[doc = "The `Event` enum of this pallet"] - pub type Event = runtime_types::pallet_mining_rewards::pallet::Event; - pub mod events { - use super::runtime_types; #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, @@ -4540,19 +4434,20 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "A miner has been identified for a block"] - pub struct MinerRewarded { - pub miner: miner_rewarded::Miner, - pub reward: miner_rewarded::Reward, + #[doc = "An account was removed whose balance was non-zero but below ExistentialDeposit,"] + #[doc = "resulting in an outright loss."] + pub struct DustLost { + pub account: dust_lost::Account, + pub amount: dust_lost::Amount, } - pub mod miner_rewarded { + pub mod dust_lost { use super::runtime_types; - pub type Miner = ::subxt::ext::subxt_core::utils::AccountId32; - pub type Reward = ::core::primitive::u128; + pub type Account = ::subxt::ext::subxt_core::utils::AccountId32; + pub type Amount = ::core::primitive::u128; } - impl ::subxt::ext::subxt_core::events::StaticEvent for MinerRewarded { - const PALLET: &'static str = "MiningRewards"; - const EVENT: &'static str = "MinerRewarded"; + impl ::subxt::ext::subxt_core::events::StaticEvent for DustLost { + const PALLET: &'static str = "Balances"; + const EVENT: &'static str = "DustLost"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -4561,19 +4456,21 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "Transaction fees were collected for later distribution"] - pub struct FeesCollected { - pub amount: fees_collected::Amount, - pub total: fees_collected::Total, + #[doc = "Transfer succeeded."] + pub struct Transfer { + pub from: transfer::From, + pub to: transfer::To, + pub amount: transfer::Amount, } - pub mod fees_collected { + pub mod transfer { use super::runtime_types; + pub type From = ::subxt::ext::subxt_core::utils::AccountId32; + pub type To = ::subxt::ext::subxt_core::utils::AccountId32; pub type Amount = ::core::primitive::u128; - pub type Total = ::core::primitive::u128; } - impl ::subxt::ext::subxt_core::events::StaticEvent for FeesCollected { - const PALLET: &'static str = "MiningRewards"; - const EVENT: &'static str = "FeesCollected"; + impl ::subxt::ext::subxt_core::events::StaticEvent for Transfer { + const PALLET: &'static str = "Balances"; + const EVENT: &'static str = "Transfer"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -4582,550 +4479,62 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "Rewards were sent to Treasury when no miner was specified"] - pub struct TreasuryRewarded { - pub reward: treasury_rewarded::Reward, + #[doc = "A balance was set by root."] + pub struct BalanceSet { + pub who: balance_set::Who, + pub free: balance_set::Free, } - pub mod treasury_rewarded { + pub mod balance_set { use super::runtime_types; - pub type Reward = ::core::primitive::u128; + pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; + pub type Free = ::core::primitive::u128; } - impl ::subxt::ext::subxt_core::events::StaticEvent for TreasuryRewarded { - const PALLET: &'static str = "MiningRewards"; - const EVENT: &'static str = "TreasuryRewarded"; + impl ::subxt::ext::subxt_core::events::StaticEvent for BalanceSet { + const PALLET: &'static str = "Balances"; + const EVENT: &'static str = "BalanceSet"; } - } - pub mod storage { - use super::runtime_types; - pub mod types { + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + #[doc = "Some balance was reserved (moved from free to reserved)."] + pub struct Reserved { + pub who: reserved::Who, + pub amount: reserved::Amount, + } + pub mod reserved { use super::runtime_types; - pub mod collected_fees { - use super::runtime_types; - pub type CollectedFees = ::core::primitive::u128; - } + pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; + pub type Amount = ::core::primitive::u128; } - pub struct StorageApi; - impl StorageApi { - pub fn collected_fees( - &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::collected_fees::CollectedFees, - ::subxt::ext::subxt_core::utils::Yes, - ::subxt::ext::subxt_core::utils::Yes, - (), - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "MiningRewards", - "CollectedFees", - (), - [ - 136u8, 52u8, 218u8, 204u8, 2u8, 250u8, 34u8, 8u8, 16u8, 23u8, 171u8, - 3u8, 253u8, 35u8, 59u8, 7u8, 167u8, 227u8, 86u8, 15u8, 155u8, 14u8, - 139u8, 44u8, 208u8, 108u8, 85u8, 131u8, 170u8, 37u8, 211u8, 211u8, - ], - ) - } + impl ::subxt::ext::subxt_core::events::StaticEvent for Reserved { + const PALLET: &'static str = "Balances"; + const EVENT: &'static str = "Reserved"; } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " The base block reward given to miners"] - pub fn miner_block_reward( - &self, - ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< - ::core::primitive::u128, - > { - ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "MiningRewards", - "MinerBlockReward", - [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, - 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, - 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, - ], - ) - } - #[doc = " The base block reward given to treasury"] - pub fn treasury_block_reward( - &self, - ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< - ::core::primitive::u128, - > { - ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "MiningRewards", - "TreasuryBlockReward", - [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, - 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, - 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, - ], - ) - } - #[doc = " The treasury pallet ID"] - pub fn treasury_pallet_id( - &self, - ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< - runtime_types::frame_support::PalletId, - > { - ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "MiningRewards", - "TreasuryPalletId", - [ - 56u8, 243u8, 53u8, 83u8, 154u8, 179u8, 170u8, 80u8, 133u8, 173u8, 61u8, - 161u8, 47u8, 225u8, 146u8, 21u8, 50u8, 229u8, 248u8, 27u8, 104u8, 58u8, - 129u8, 197u8, 102u8, 160u8, 168u8, 205u8, 154u8, 42u8, 217u8, 53u8, - ], - ) - } - #[doc = " Account ID used as the \"from\" account when creating transfer proofs for minted tokens"] - pub fn minting_account( - &self, - ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - > { - ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "MiningRewards", - "MintingAccount", - [ - 115u8, 233u8, 13u8, 223u8, 88u8, 20u8, 202u8, 139u8, 153u8, 28u8, - 155u8, 157u8, 224u8, 66u8, 3u8, 250u8, 23u8, 53u8, 88u8, 168u8, 211u8, - 204u8, 122u8, 166u8, 248u8, 23u8, 174u8, 225u8, 99u8, 108u8, 89u8, - 135u8, - ], - ) - } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + #[doc = "Some balance was unreserved (moved from reserved to free)."] + pub struct Unreserved { + pub who: unreserved::Who, + pub amount: unreserved::Amount, } - } - } - pub mod vesting { - use super::{root_mod, runtime_types}; - #[doc = "Error for the vesting pallet."] - pub type Error = runtime_types::pallet_vesting::pallet::Error; - #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] - pub type Call = runtime_types::pallet_vesting::pallet::Call; - pub mod calls { - use super::{root_mod, runtime_types}; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub mod types { + pub mod unreserved { use super::runtime_types; - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Unlock any vested funds of the sender account."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have funds still"] - #[doc = "locked under this pallet."] - #[doc = ""] - #[doc = "Emits either `VestingCompleted` or `VestingUpdated`."] - #[doc = ""] - #[doc = "## Complexity"] - #[doc = "- `O(1)`."] - pub struct Vest; - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for Vest { - const PALLET: &'static str = "Vesting"; - const CALL: &'static str = "vest"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Unlock any vested funds of a `target` account."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - #[doc = ""] - #[doc = "- `target`: The account whose vested funds should be unlocked. Must have funds still"] - #[doc = "locked under this pallet."] - #[doc = ""] - #[doc = "Emits either `VestingCompleted` or `VestingUpdated`."] - #[doc = ""] - #[doc = "## Complexity"] - #[doc = "- `O(1)`."] - pub struct VestOther { - pub target: vest_other::Target, - } - pub mod vest_other { - use super::runtime_types; - pub type Target = ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for VestOther { - const PALLET: &'static str = "Vesting"; - const CALL: &'static str = "vest_other"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Create a vested transfer."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - #[doc = ""] - #[doc = "- `target`: The account receiving the vested funds."] - #[doc = "- `schedule`: The vesting schedule attached to the transfer."] - #[doc = ""] - #[doc = "Emits `VestingCreated`."] - #[doc = ""] - #[doc = "NOTE: This will unlock all schedules through the current block."] - #[doc = ""] - #[doc = "## Complexity"] - #[doc = "- `O(1)`."] - pub struct VestedTransfer { - pub target: vested_transfer::Target, - pub schedule: vested_transfer::Schedule, - } - pub mod vested_transfer { - use super::runtime_types; - pub type Target = ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >; - pub type Schedule = runtime_types::pallet_vesting::vesting_info::VestingInfo< - ::core::primitive::u128, - ::core::primitive::u32, - >; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for VestedTransfer { - const PALLET: &'static str = "Vesting"; - const CALL: &'static str = "vested_transfer"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Force a vested transfer."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Root_."] - #[doc = ""] - #[doc = "- `source`: The account whose funds should be transferred."] - #[doc = "- `target`: The account that should be transferred the vested funds."] - #[doc = "- `schedule`: The vesting schedule attached to the transfer."] - #[doc = ""] - #[doc = "Emits `VestingCreated`."] - #[doc = ""] - #[doc = "NOTE: This will unlock all schedules through the current block."] - #[doc = ""] - #[doc = "## Complexity"] - #[doc = "- `O(1)`."] - pub struct ForceVestedTransfer { - pub source: force_vested_transfer::Source, - pub target: force_vested_transfer::Target, - pub schedule: force_vested_transfer::Schedule, - } - pub mod force_vested_transfer { - use super::runtime_types; - pub type Source = ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >; - pub type Target = ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >; - pub type Schedule = runtime_types::pallet_vesting::vesting_info::VestingInfo< - ::core::primitive::u128, - ::core::primitive::u32, - >; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for ForceVestedTransfer { - const PALLET: &'static str = "Vesting"; - const CALL: &'static str = "force_vested_transfer"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Merge two vesting schedules together, creating a new vesting schedule that unlocks over"] - #[doc = "the highest possible start and end blocks. If both schedules have already started the"] - #[doc = "current block will be used as the schedule start; with the caveat that if one schedule"] - #[doc = "is finished by the current block, the other will be treated as the new merged schedule,"] - #[doc = "unmodified."] - #[doc = ""] - #[doc = "NOTE: If `schedule1_index == schedule2_index` this is a no-op."] - #[doc = "NOTE: This will unlock all schedules through the current block prior to merging."] - #[doc = "NOTE: If both schedules have ended by the current block, no new schedule will be created"] - #[doc = "and both will be removed."] - #[doc = ""] - #[doc = "Merged schedule attributes:"] - #[doc = "- `starting_block`: `MAX(schedule1.starting_block, scheduled2.starting_block,"] - #[doc = " current_block)`."] - #[doc = "- `ending_block`: `MAX(schedule1.ending_block, schedule2.ending_block)`."] - #[doc = "- `locked`: `schedule1.locked_at(current_block) + schedule2.locked_at(current_block)`."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - #[doc = ""] - #[doc = "- `schedule1_index`: index of the first schedule to merge."] - #[doc = "- `schedule2_index`: index of the second schedule to merge."] - pub struct MergeSchedules { - pub schedule1_index: merge_schedules::Schedule1Index, - pub schedule2_index: merge_schedules::Schedule2Index, - } - pub mod merge_schedules { - use super::runtime_types; - pub type Schedule1Index = ::core::primitive::u32; - pub type Schedule2Index = ::core::primitive::u32; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for MergeSchedules { - const PALLET: &'static str = "Vesting"; - const CALL: &'static str = "merge_schedules"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Force remove a vesting schedule"] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Root_."] - #[doc = ""] - #[doc = "- `target`: An account that has a vesting schedule"] - #[doc = "- `schedule_index`: The vesting schedule index that should be removed"] - pub struct ForceRemoveVestingSchedule { - pub target: force_remove_vesting_schedule::Target, - pub schedule_index: force_remove_vesting_schedule::ScheduleIndex, - } - pub mod force_remove_vesting_schedule { - use super::runtime_types; - pub type Target = ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >; - pub type ScheduleIndex = ::core::primitive::u32; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for ForceRemoveVestingSchedule { - const PALLET: &'static str = "Vesting"; - const CALL: &'static str = "force_remove_vesting_schedule"; - } + pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; + pub type Amount = ::core::primitive::u128; } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Unlock any vested funds of the sender account."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have funds still"] - #[doc = "locked under this pallet."] - #[doc = ""] - #[doc = "Emits either `VestingCompleted` or `VestingUpdated`."] - #[doc = ""] - #[doc = "## Complexity"] - #[doc = "- `O(1)`."] - pub fn vest( - &self, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Vesting", - "vest", - types::Vest {}, - [ - 149u8, 89u8, 178u8, 148u8, 127u8, 127u8, 155u8, 60u8, 114u8, 126u8, - 204u8, 123u8, 166u8, 70u8, 104u8, 208u8, 186u8, 69u8, 139u8, 181u8, - 151u8, 154u8, 235u8, 161u8, 191u8, 35u8, 111u8, 60u8, 21u8, 165u8, - 44u8, 122u8, - ], - ) - } - #[doc = "Unlock any vested funds of a `target` account."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - #[doc = ""] - #[doc = "- `target`: The account whose vested funds should be unlocked. Must have funds still"] - #[doc = "locked under this pallet."] - #[doc = ""] - #[doc = "Emits either `VestingCompleted` or `VestingUpdated`."] - #[doc = ""] - #[doc = "## Complexity"] - #[doc = "- `O(1)`."] - pub fn vest_other( - &self, - target: types::vest_other::Target, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Vesting", - "vest_other", - types::VestOther { target }, - [ - 238u8, 92u8, 25u8, 149u8, 27u8, 211u8, 196u8, 31u8, 211u8, 28u8, 241u8, - 30u8, 128u8, 35u8, 0u8, 227u8, 202u8, 215u8, 186u8, 69u8, 216u8, 110u8, - 199u8, 120u8, 134u8, 141u8, 176u8, 224u8, 234u8, 42u8, 152u8, 128u8, - ], - ) - } - #[doc = "Create a vested transfer."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - #[doc = ""] - #[doc = "- `target`: The account receiving the vested funds."] - #[doc = "- `schedule`: The vesting schedule attached to the transfer."] - #[doc = ""] - #[doc = "Emits `VestingCreated`."] - #[doc = ""] - #[doc = "NOTE: This will unlock all schedules through the current block."] - #[doc = ""] - #[doc = "## Complexity"] - #[doc = "- `O(1)`."] - pub fn vested_transfer( - &self, - target: types::vested_transfer::Target, - schedule: types::vested_transfer::Schedule, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload - { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Vesting", - "vested_transfer", - types::VestedTransfer { target, schedule }, - [ - 198u8, 133u8, 254u8, 5u8, 22u8, 170u8, 205u8, 79u8, 218u8, 30u8, 81u8, - 207u8, 227u8, 121u8, 132u8, 14u8, 217u8, 43u8, 66u8, 206u8, 15u8, 80u8, - 173u8, 208u8, 128u8, 72u8, 223u8, 175u8, 93u8, 69u8, 128u8, 88u8, - ], - ) - } - #[doc = "Force a vested transfer."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Root_."] - #[doc = ""] - #[doc = "- `source`: The account whose funds should be transferred."] - #[doc = "- `target`: The account that should be transferred the vested funds."] - #[doc = "- `schedule`: The vesting schedule attached to the transfer."] - #[doc = ""] - #[doc = "Emits `VestingCreated`."] - #[doc = ""] - #[doc = "NOTE: This will unlock all schedules through the current block."] - #[doc = ""] - #[doc = "## Complexity"] - #[doc = "- `O(1)`."] - pub fn force_vested_transfer( - &self, - source: types::force_vested_transfer::Source, - target: types::force_vested_transfer::Target, - schedule: types::force_vested_transfer::Schedule, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload - { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Vesting", - "force_vested_transfer", - types::ForceVestedTransfer { source, target, schedule }, - [ - 112u8, 17u8, 176u8, 133u8, 169u8, 192u8, 155u8, 217u8, 153u8, 36u8, - 230u8, 45u8, 9u8, 192u8, 2u8, 201u8, 165u8, 60u8, 206u8, 226u8, 95u8, - 86u8, 239u8, 196u8, 109u8, 62u8, 224u8, 237u8, 88u8, 74u8, 209u8, - 251u8, - ], - ) - } - #[doc = "Merge two vesting schedules together, creating a new vesting schedule that unlocks over"] - #[doc = "the highest possible start and end blocks. If both schedules have already started the"] - #[doc = "current block will be used as the schedule start; with the caveat that if one schedule"] - #[doc = "is finished by the current block, the other will be treated as the new merged schedule,"] - #[doc = "unmodified."] - #[doc = ""] - #[doc = "NOTE: If `schedule1_index == schedule2_index` this is a no-op."] - #[doc = "NOTE: This will unlock all schedules through the current block prior to merging."] - #[doc = "NOTE: If both schedules have ended by the current block, no new schedule will be created"] - #[doc = "and both will be removed."] - #[doc = ""] - #[doc = "Merged schedule attributes:"] - #[doc = "- `starting_block`: `MAX(schedule1.starting_block, scheduled2.starting_block,"] - #[doc = " current_block)`."] - #[doc = "- `ending_block`: `MAX(schedule1.ending_block, schedule2.ending_block)`."] - #[doc = "- `locked`: `schedule1.locked_at(current_block) + schedule2.locked_at(current_block)`."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - #[doc = ""] - #[doc = "- `schedule1_index`: index of the first schedule to merge."] - #[doc = "- `schedule2_index`: index of the second schedule to merge."] - pub fn merge_schedules( - &self, - schedule1_index: types::merge_schedules::Schedule1Index, - schedule2_index: types::merge_schedules::Schedule2Index, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload - { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Vesting", - "merge_schedules", - types::MergeSchedules { schedule1_index, schedule2_index }, - [ - 45u8, 24u8, 13u8, 108u8, 26u8, 99u8, 61u8, 117u8, 195u8, 218u8, 182u8, - 23u8, 188u8, 157u8, 181u8, 81u8, 38u8, 136u8, 31u8, 226u8, 8u8, 190u8, - 33u8, 81u8, 86u8, 185u8, 156u8, 77u8, 157u8, 197u8, 41u8, 58u8, - ], - ) - } - #[doc = "Force remove a vesting schedule"] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Root_."] - #[doc = ""] - #[doc = "- `target`: An account that has a vesting schedule"] - #[doc = "- `schedule_index`: The vesting schedule index that should be removed"] - pub fn force_remove_vesting_schedule( - &self, - target: types::force_remove_vesting_schedule::Target, - schedule_index: types::force_remove_vesting_schedule::ScheduleIndex, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload< - types::ForceRemoveVestingSchedule, - > { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Vesting", - "force_remove_vesting_schedule", - types::ForceRemoveVestingSchedule { target, schedule_index }, - [ - 211u8, 253u8, 60u8, 15u8, 20u8, 53u8, 23u8, 13u8, 45u8, 223u8, 136u8, - 183u8, 162u8, 143u8, 196u8, 188u8, 35u8, 64u8, 174u8, 16u8, 47u8, 13u8, - 147u8, 173u8, 120u8, 143u8, 75u8, 89u8, 128u8, 187u8, 9u8, 18u8, - ], - ) - } + impl ::subxt::ext::subxt_core::events::StaticEvent for Unreserved { + const PALLET: &'static str = "Balances"; + const EVENT: &'static str = "Unreserved"; } - } - #[doc = "The `Event` enum of this pallet"] - pub type Event = runtime_types::pallet_vesting::pallet::Event; - pub mod events { - use super::runtime_types; #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, @@ -5133,20 +4542,25 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "The amount vested has been updated. This could indicate a change in funds available."] - #[doc = "The balance given is the amount which is left unvested (and thus locked)."] - pub struct VestingUpdated { - pub account: vesting_updated::Account, - pub unvested: vesting_updated::Unvested, + #[doc = "Some balance was moved from the reserve of the first account to the second account."] + #[doc = "Final argument indicates the destination balance type."] + pub struct ReserveRepatriated { + pub from: reserve_repatriated::From, + pub to: reserve_repatriated::To, + pub amount: reserve_repatriated::Amount, + pub destination_status: reserve_repatriated::DestinationStatus, } - pub mod vesting_updated { + pub mod reserve_repatriated { use super::runtime_types; - pub type Account = ::subxt::ext::subxt_core::utils::AccountId32; - pub type Unvested = ::core::primitive::u128; + pub type From = ::subxt::ext::subxt_core::utils::AccountId32; + pub type To = ::subxt::ext::subxt_core::utils::AccountId32; + pub type Amount = ::core::primitive::u128; + pub type DestinationStatus = + runtime_types::frame_support::traits::tokens::misc::BalanceStatus; } - impl ::subxt::ext::subxt_core::events::StaticEvent for VestingUpdated { - const PALLET: &'static str = "Vesting"; - const EVENT: &'static str = "VestingUpdated"; + impl ::subxt::ext::subxt_core::events::StaticEvent for ReserveRepatriated { + const PALLET: &'static str = "Balances"; + const EVENT: &'static str = "ReserveRepatriated"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -5155,406 +4569,62 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "An \\[account\\] has become fully vested."] - pub struct VestingCompleted { - pub account: vesting_completed::Account, + #[doc = "Some amount was deposited (e.g. for transaction fees)."] + pub struct Deposit { + pub who: deposit::Who, + pub amount: deposit::Amount, } - pub mod vesting_completed { + pub mod deposit { use super::runtime_types; - pub type Account = ::subxt::ext::subxt_core::utils::AccountId32; + pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; + pub type Amount = ::core::primitive::u128; } - impl ::subxt::ext::subxt_core::events::StaticEvent for VestingCompleted { - const PALLET: &'static str = "Vesting"; - const EVENT: &'static str = "VestingCompleted"; + impl ::subxt::ext::subxt_core::events::StaticEvent for Deposit { + const PALLET: &'static str = "Balances"; + const EVENT: &'static str = "Deposit"; } - } - pub mod storage { - use super::runtime_types; - pub mod types { + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + #[doc = "Some amount was withdrawn from the account (e.g. for transaction fees)."] + pub struct Withdraw { + pub who: withdraw::Who, + pub amount: withdraw::Amount, + } + pub mod withdraw { use super::runtime_types; - pub mod vesting { - use super::runtime_types; - pub type Vesting = runtime_types::bounded_collections::bounded_vec::BoundedVec< - runtime_types::pallet_vesting::vesting_info::VestingInfo< - ::core::primitive::u128, - ::core::primitive::u32, - >, - >; - pub type Param0 = ::subxt::ext::subxt_core::utils::AccountId32; - } - pub mod storage_version { - use super::runtime_types; - pub type StorageVersion = runtime_types::pallet_vesting::Releases; - } + pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; + pub type Amount = ::core::primitive::u128; } - pub struct StorageApi; - impl StorageApi { - #[doc = " Information regarding the vesting of a given account."] - pub fn vesting_iter( - &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::vesting::Vesting, - (), - (), - ::subxt::ext::subxt_core::utils::Yes, - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Vesting", - "Vesting", - (), - [ - 95u8, 168u8, 217u8, 248u8, 149u8, 86u8, 195u8, 93u8, 73u8, 206u8, - 105u8, 165u8, 33u8, 173u8, 232u8, 81u8, 147u8, 254u8, 50u8, 228u8, - 156u8, 92u8, 242u8, 149u8, 42u8, 91u8, 58u8, 209u8, 142u8, 221u8, - 230u8, 112u8, - ], - ) - } - #[doc = " Information regarding the vesting of a given account."] - pub fn vesting( - &self, - _0: types::vesting::Param0, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::vesting::Param0, - >, - types::vesting::Vesting, - ::subxt::ext::subxt_core::utils::Yes, - (), - (), - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Vesting", - "Vesting", - ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), - [ - 95u8, 168u8, 217u8, 248u8, 149u8, 86u8, 195u8, 93u8, 73u8, 206u8, - 105u8, 165u8, 33u8, 173u8, 232u8, 81u8, 147u8, 254u8, 50u8, 228u8, - 156u8, 92u8, 242u8, 149u8, 42u8, 91u8, 58u8, 209u8, 142u8, 221u8, - 230u8, 112u8, - ], - ) - } - #[doc = " Storage version of the pallet."] - #[doc = ""] - #[doc = " New networks start with latest version, as determined by the genesis build."] - pub fn storage_version( - &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::storage_version::StorageVersion, - ::subxt::ext::subxt_core::utils::Yes, - ::subxt::ext::subxt_core::utils::Yes, - (), - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Vesting", - "StorageVersion", - (), - [ - 230u8, 137u8, 180u8, 133u8, 142u8, 124u8, 231u8, 234u8, 223u8, 10u8, - 154u8, 98u8, 158u8, 253u8, 228u8, 80u8, 5u8, 9u8, 91u8, 210u8, 252u8, - 9u8, 13u8, 195u8, 193u8, 164u8, 129u8, 113u8, 128u8, 218u8, 8u8, 40u8, - ], - ) - } + impl ::subxt::ext::subxt_core::events::StaticEvent for Withdraw { + const PALLET: &'static str = "Balances"; + const EVENT: &'static str = "Withdraw"; } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " The minimum amount transferred to call `vested_transfer`."] - pub fn min_vested_transfer( - &self, - ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< - ::core::primitive::u128, - > { - ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "Vesting", - "MinVestedTransfer", - [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, - 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, - 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, - ], - ) - } - pub fn max_vesting_schedules( - &self, - ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< - ::core::primitive::u32, - > { - ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "Vesting", - "MaxVestingSchedules", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, - ], - ) - } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + #[doc = "Some amount was removed from the account (e.g. for misbehavior)."] + pub struct Slashed { + pub who: slashed::Who, + pub amount: slashed::Amount, } - } - } - pub mod preimage { - use super::{root_mod, runtime_types}; - #[doc = "The `Error` enum of this pallet."] - pub type Error = runtime_types::pallet_preimage::pallet::Error; - #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] - pub type Call = runtime_types::pallet_preimage::pallet::Call; - pub mod calls { - use super::{root_mod, runtime_types}; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub mod types { + pub mod slashed { use super::runtime_types; - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Register a preimage on-chain."] - #[doc = ""] - #[doc = "If the preimage was previously requested, no fees or deposits are taken for providing"] - #[doc = "the preimage. Otherwise, a deposit is taken proportional to the size of the preimage."] - pub struct NotePreimage { - pub bytes: note_preimage::Bytes, - } - pub mod note_preimage { - use super::runtime_types; - pub type Bytes = - ::subxt::ext::subxt_core::alloc::vec::Vec<::core::primitive::u8>; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for NotePreimage { - const PALLET: &'static str = "Preimage"; - const CALL: &'static str = "note_preimage"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Clear an unrequested preimage from the runtime storage."] - #[doc = ""] - #[doc = "If `len` is provided, then it will be a much cheaper operation."] - #[doc = ""] - #[doc = "- `hash`: The hash of the preimage to be removed from the store."] - #[doc = "- `len`: The length of the preimage of `hash`."] - pub struct UnnotePreimage { - pub hash: unnote_preimage::Hash, - } - pub mod unnote_preimage { - use super::runtime_types; - pub type Hash = ::subxt::ext::subxt_core::utils::H256; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for UnnotePreimage { - const PALLET: &'static str = "Preimage"; - const CALL: &'static str = "unnote_preimage"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Request a preimage be uploaded to the chain without paying any fees or deposits."] - #[doc = ""] - #[doc = "If the preimage requests has already been provided on-chain, we unreserve any deposit"] - #[doc = "a user may have paid, and take the control of the preimage out of their hands."] - pub struct RequestPreimage { - pub hash: request_preimage::Hash, - } - pub mod request_preimage { - use super::runtime_types; - pub type Hash = ::subxt::ext::subxt_core::utils::H256; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for RequestPreimage { - const PALLET: &'static str = "Preimage"; - const CALL: &'static str = "request_preimage"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Clear a previously made request for a preimage."] - #[doc = ""] - #[doc = "NOTE: THIS MUST NOT BE CALLED ON `hash` MORE TIMES THAN `request_preimage`."] - pub struct UnrequestPreimage { - pub hash: unrequest_preimage::Hash, - } - pub mod unrequest_preimage { - use super::runtime_types; - pub type Hash = ::subxt::ext::subxt_core::utils::H256; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for UnrequestPreimage { - const PALLET: &'static str = "Preimage"; - const CALL: &'static str = "unrequest_preimage"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Ensure that the a bulk of pre-images is upgraded."] - #[doc = ""] - #[doc = "The caller pays no fee if at least 90% of pre-images were successfully updated."] - pub struct EnsureUpdated { - pub hashes: ensure_updated::Hashes, - } - pub mod ensure_updated { - use super::runtime_types; - pub type Hashes = ::subxt::ext::subxt_core::alloc::vec::Vec< - ::subxt::ext::subxt_core::utils::H256, - >; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for EnsureUpdated { - const PALLET: &'static str = "Preimage"; - const CALL: &'static str = "ensure_updated"; - } + pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; + pub type Amount = ::core::primitive::u128; } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Register a preimage on-chain."] - #[doc = ""] - #[doc = "If the preimage was previously requested, no fees or deposits are taken for providing"] - #[doc = "the preimage. Otherwise, a deposit is taken proportional to the size of the preimage."] - pub fn note_preimage( - &self, - bytes: types::note_preimage::Bytes, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Preimage", - "note_preimage", - types::NotePreimage { bytes }, - [ - 121u8, 88u8, 18u8, 92u8, 176u8, 15u8, 192u8, 198u8, 146u8, 198u8, 38u8, - 242u8, 213u8, 83u8, 7u8, 230u8, 14u8, 110u8, 235u8, 32u8, 215u8, 26u8, - 192u8, 217u8, 113u8, 224u8, 206u8, 96u8, 177u8, 198u8, 246u8, 33u8, - ], - ) - } - #[doc = "Clear an unrequested preimage from the runtime storage."] - #[doc = ""] - #[doc = "If `len` is provided, then it will be a much cheaper operation."] - #[doc = ""] - #[doc = "- `hash`: The hash of the preimage to be removed from the store."] - #[doc = "- `len`: The length of the preimage of `hash`."] - pub fn unnote_preimage( - &self, - hash: types::unnote_preimage::Hash, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload - { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Preimage", - "unnote_preimage", - types::UnnotePreimage { hash }, - [ - 188u8, 116u8, 222u8, 22u8, 127u8, 215u8, 2u8, 133u8, 96u8, 202u8, - 190u8, 123u8, 203u8, 43u8, 200u8, 161u8, 226u8, 24u8, 49u8, 36u8, - 221u8, 160u8, 130u8, 119u8, 30u8, 138u8, 144u8, 85u8, 5u8, 164u8, - 252u8, 222u8, - ], - ) - } - #[doc = "Request a preimage be uploaded to the chain without paying any fees or deposits."] - #[doc = ""] - #[doc = "If the preimage requests has already been provided on-chain, we unreserve any deposit"] - #[doc = "a user may have paid, and take the control of the preimage out of their hands."] - pub fn request_preimage( - &self, - hash: types::request_preimage::Hash, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload - { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Preimage", - "request_preimage", - types::RequestPreimage { hash }, - [ - 87u8, 0u8, 204u8, 111u8, 43u8, 115u8, 64u8, 209u8, 133u8, 13u8, 83u8, - 45u8, 164u8, 166u8, 233u8, 105u8, 242u8, 238u8, 235u8, 208u8, 113u8, - 134u8, 93u8, 242u8, 86u8, 32u8, 7u8, 152u8, 107u8, 208u8, 79u8, 59u8, - ], - ) - } - #[doc = "Clear a previously made request for a preimage."] - #[doc = ""] - #[doc = "NOTE: THIS MUST NOT BE CALLED ON `hash` MORE TIMES THAN `request_preimage`."] - pub fn unrequest_preimage( - &self, - hash: types::unrequest_preimage::Hash, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload - { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Preimage", - "unrequest_preimage", - types::UnrequestPreimage { hash }, - [ - 55u8, 37u8, 224u8, 149u8, 142u8, 120u8, 8u8, 68u8, 183u8, 225u8, 255u8, - 240u8, 254u8, 111u8, 58u8, 200u8, 113u8, 217u8, 177u8, 203u8, 107u8, - 104u8, 233u8, 87u8, 252u8, 53u8, 33u8, 112u8, 116u8, 254u8, 117u8, - 134u8, - ], - ) - } - #[doc = "Ensure that the a bulk of pre-images is upgraded."] - #[doc = ""] - #[doc = "The caller pays no fee if at least 90% of pre-images were successfully updated."] - pub fn ensure_updated( - &self, - hashes: types::ensure_updated::Hashes, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload - { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Preimage", - "ensure_updated", - types::EnsureUpdated { hashes }, - [ - 254u8, 228u8, 88u8, 44u8, 126u8, 235u8, 188u8, 153u8, 61u8, 27u8, - 103u8, 253u8, 163u8, 161u8, 113u8, 243u8, 87u8, 136u8, 2u8, 231u8, - 209u8, 188u8, 215u8, 106u8, 192u8, 225u8, 75u8, 125u8, 224u8, 96u8, - 221u8, 90u8, - ], - ) - } + impl ::subxt::ext::subxt_core::events::StaticEvent for Slashed { + const PALLET: &'static str = "Balances"; + const EVENT: &'static str = "Slashed"; } - } - #[doc = "The `Event` enum of this pallet"] - pub type Event = runtime_types::pallet_preimage::pallet::Event; - pub mod events { - use super::runtime_types; #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, @@ -5562,17 +4632,19 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "A preimage has been noted."] - pub struct Noted { - pub hash: noted::Hash, + #[doc = "Some amount was minted into an account."] + pub struct Minted { + pub who: minted::Who, + pub amount: minted::Amount, } - pub mod noted { + pub mod minted { use super::runtime_types; - pub type Hash = ::subxt::ext::subxt_core::utils::H256; + pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; + pub type Amount = ::core::primitive::u128; } - impl ::subxt::ext::subxt_core::events::StaticEvent for Noted { - const PALLET: &'static str = "Preimage"; - const EVENT: &'static str = "Noted"; + impl ::subxt::ext::subxt_core::events::StaticEvent for Minted { + const PALLET: &'static str = "Balances"; + const EVENT: &'static str = "Minted"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -5581,17 +4653,19 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "A preimage has been requested."] - pub struct Requested { - pub hash: requested::Hash, + #[doc = "Some amount was burned from an account."] + pub struct Burned { + pub who: burned::Who, + pub amount: burned::Amount, } - pub mod requested { + pub mod burned { use super::runtime_types; - pub type Hash = ::subxt::ext::subxt_core::utils::H256; + pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; + pub type Amount = ::core::primitive::u128; } - impl ::subxt::ext::subxt_core::events::StaticEvent for Requested { - const PALLET: &'static str = "Preimage"; - const EVENT: &'static str = "Requested"; + impl ::subxt::ext::subxt_core::events::StaticEvent for Burned { + const PALLET: &'static str = "Balances"; + const EVENT: &'static str = "Burned"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -5600,836 +4674,765 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "A preimage has ben cleared."] - pub struct Cleared { - pub hash: cleared::Hash, + #[doc = "Some amount was suspended from an account (it can be restored later)."] + pub struct Suspended { + pub who: suspended::Who, + pub amount: suspended::Amount, } - pub mod cleared { + pub mod suspended { use super::runtime_types; - pub type Hash = ::subxt::ext::subxt_core::utils::H256; + pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; + pub type Amount = ::core::primitive::u128; } - impl ::subxt::ext::subxt_core::events::StaticEvent for Cleared { - const PALLET: &'static str = "Preimage"; - const EVENT: &'static str = "Cleared"; + impl ::subxt::ext::subxt_core::events::StaticEvent for Suspended { + const PALLET: &'static str = "Balances"; + const EVENT: &'static str = "Suspended"; } - } - pub mod storage { - use super::runtime_types; - pub mod types { + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + #[doc = "Some amount was restored into an account."] + pub struct Restored { + pub who: restored::Who, + pub amount: restored::Amount, + } + pub mod restored { use super::runtime_types; - pub mod status_for { - use super::runtime_types; - pub type StatusFor = runtime_types::pallet_preimage::OldRequestStatus< - ::subxt::ext::subxt_core::utils::AccountId32, - ::core::primitive::u128, - >; - pub type Param0 = ::subxt::ext::subxt_core::utils::H256; - } - pub mod request_status_for { - use super::runtime_types; - pub type RequestStatusFor = runtime_types::pallet_preimage::RequestStatus< - ::subxt::ext::subxt_core::utils::AccountId32, - runtime_types::quantus_runtime::governance::definitions::PreimageDeposit, - >; - pub type Param0 = ::subxt::ext::subxt_core::utils::H256; - } - pub mod preimage_for { - use super::runtime_types; - pub type PreimageFor = - runtime_types::bounded_collections::bounded_vec::BoundedVec< - ::core::primitive::u8, - >; - pub type Param0 = - (::subxt::ext::subxt_core::utils::H256, ::core::primitive::u32); - } + pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; + pub type Amount = ::core::primitive::u128; } - pub struct StorageApi; - impl StorageApi { - #[doc = " The request status of a given hash."] - pub fn status_for_iter( - &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::status_for::StatusFor, - (), - (), - ::subxt::ext::subxt_core::utils::Yes, - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Preimage", - "StatusFor", - (), - [ - 187u8, 100u8, 54u8, 112u8, 96u8, 129u8, 36u8, 149u8, 127u8, 226u8, - 126u8, 171u8, 72u8, 189u8, 59u8, 126u8, 204u8, 125u8, 67u8, 204u8, - 231u8, 6u8, 212u8, 135u8, 166u8, 252u8, 5u8, 46u8, 111u8, 120u8, 54u8, - 209u8, - ], - ) - } - #[doc = " The request status of a given hash."] - pub fn status_for( - &self, - _0: types::status_for::Param0, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::status_for::Param0, - >, - types::status_for::StatusFor, - ::subxt::ext::subxt_core::utils::Yes, - (), - (), - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Preimage", - "StatusFor", - ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), - [ - 187u8, 100u8, 54u8, 112u8, 96u8, 129u8, 36u8, 149u8, 127u8, 226u8, - 126u8, 171u8, 72u8, 189u8, 59u8, 126u8, 204u8, 125u8, 67u8, 204u8, - 231u8, 6u8, 212u8, 135u8, 166u8, 252u8, 5u8, 46u8, 111u8, 120u8, 54u8, - 209u8, - ], - ) - } - #[doc = " The request status of a given hash."] - pub fn request_status_for_iter( - &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::request_status_for::RequestStatusFor, - (), - (), - ::subxt::ext::subxt_core::utils::Yes, - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Preimage", - "RequestStatusFor", - (), - [ - 113u8, 195u8, 77u8, 23u8, 125u8, 170u8, 77u8, 145u8, 201u8, 168u8, - 39u8, 13u8, 143u8, 50u8, 100u8, 92u8, 25u8, 110u8, 125u8, 20u8, 96u8, - 156u8, 225u8, 200u8, 57u8, 199u8, 226u8, 242u8, 230u8, 126u8, 138u8, - 123u8, - ], - ) - } - #[doc = " The request status of a given hash."] - pub fn request_status_for( - &self, - _0: types::request_status_for::Param0, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::request_status_for::Param0, - >, - types::request_status_for::RequestStatusFor, - ::subxt::ext::subxt_core::utils::Yes, - (), - (), - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Preimage", - "RequestStatusFor", - ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), - [ - 113u8, 195u8, 77u8, 23u8, 125u8, 170u8, 77u8, 145u8, 201u8, 168u8, - 39u8, 13u8, 143u8, 50u8, 100u8, 92u8, 25u8, 110u8, 125u8, 20u8, 96u8, - 156u8, 225u8, 200u8, 57u8, 199u8, 226u8, 242u8, 230u8, 126u8, 138u8, - 123u8, - ], - ) - } - pub fn preimage_for_iter( - &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::preimage_for::PreimageFor, - (), - (), - ::subxt::ext::subxt_core::utils::Yes, - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Preimage", - "PreimageFor", - (), - [ - 106u8, 5u8, 17u8, 46u8, 6u8, 184u8, 177u8, 113u8, 169u8, 34u8, 119u8, - 141u8, 117u8, 40u8, 30u8, 94u8, 187u8, 35u8, 206u8, 216u8, 143u8, - 208u8, 49u8, 156u8, 200u8, 255u8, 109u8, 200u8, 210u8, 134u8, 24u8, - 139u8, - ], - ) - } - pub fn preimage_for( - &self, - _0: types::preimage_for::Param0, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::preimage_for::Param0, - >, - types::preimage_for::PreimageFor, - ::subxt::ext::subxt_core::utils::Yes, - (), - (), - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Preimage", - "PreimageFor", - ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), - [ - 106u8, 5u8, 17u8, 46u8, 6u8, 184u8, 177u8, 113u8, 169u8, 34u8, 119u8, - 141u8, 117u8, 40u8, 30u8, 94u8, 187u8, 35u8, 206u8, 216u8, 143u8, - 208u8, 49u8, 156u8, 200u8, 255u8, 109u8, 200u8, 210u8, 134u8, 24u8, - 139u8, - ], - ) - } + impl ::subxt::ext::subxt_core::events::StaticEvent for Restored { + const PALLET: &'static str = "Balances"; + const EVENT: &'static str = "Restored"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + #[doc = "An account was upgraded."] + pub struct Upgraded { + pub who: upgraded::Who, + } + pub mod upgraded { + use super::runtime_types; + pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; + } + impl ::subxt::ext::subxt_core::events::StaticEvent for Upgraded { + const PALLET: &'static str = "Balances"; + const EVENT: &'static str = "Upgraded"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + #[doc = "Total issuance was increased by `amount`, creating a credit to be balanced."] + pub struct Issued { + pub amount: issued::Amount, + } + pub mod issued { + use super::runtime_types; + pub type Amount = ::core::primitive::u128; + } + impl ::subxt::ext::subxt_core::events::StaticEvent for Issued { + const PALLET: &'static str = "Balances"; + const EVENT: &'static str = "Issued"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + #[doc = "Total issuance was decreased by `amount`, creating a debt to be balanced."] + pub struct Rescinded { + pub amount: rescinded::Amount, + } + pub mod rescinded { + use super::runtime_types; + pub type Amount = ::core::primitive::u128; + } + impl ::subxt::ext::subxt_core::events::StaticEvent for Rescinded { + const PALLET: &'static str = "Balances"; + const EVENT: &'static str = "Rescinded"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + #[doc = "Some balance was locked."] + pub struct Locked { + pub who: locked::Who, + pub amount: locked::Amount, + } + pub mod locked { + use super::runtime_types; + pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; + pub type Amount = ::core::primitive::u128; + } + impl ::subxt::ext::subxt_core::events::StaticEvent for Locked { + const PALLET: &'static str = "Balances"; + const EVENT: &'static str = "Locked"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + #[doc = "Some balance was unlocked."] + pub struct Unlocked { + pub who: unlocked::Who, + pub amount: unlocked::Amount, + } + pub mod unlocked { + use super::runtime_types; + pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; + pub type Amount = ::core::primitive::u128; + } + impl ::subxt::ext::subxt_core::events::StaticEvent for Unlocked { + const PALLET: &'static str = "Balances"; + const EVENT: &'static str = "Unlocked"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + #[doc = "Some balance was frozen."] + pub struct Frozen { + pub who: frozen::Who, + pub amount: frozen::Amount, + } + pub mod frozen { + use super::runtime_types; + pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; + pub type Amount = ::core::primitive::u128; + } + impl ::subxt::ext::subxt_core::events::StaticEvent for Frozen { + const PALLET: &'static str = "Balances"; + const EVENT: &'static str = "Frozen"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + #[doc = "Some balance was thawed."] + pub struct Thawed { + pub who: thawed::Who, + pub amount: thawed::Amount, + } + pub mod thawed { + use super::runtime_types; + pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; + pub type Amount = ::core::primitive::u128; + } + impl ::subxt::ext::subxt_core::events::StaticEvent for Thawed { + const PALLET: &'static str = "Balances"; + const EVENT: &'static str = "Thawed"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + #[doc = "The `TotalIssuance` was forcefully changed."] + pub struct TotalIssuanceForced { + pub old: total_issuance_forced::Old, + pub new: total_issuance_forced::New, + } + pub mod total_issuance_forced { + use super::runtime_types; + pub type Old = ::core::primitive::u128; + pub type New = ::core::primitive::u128; + } + impl ::subxt::ext::subxt_core::events::StaticEvent for TotalIssuanceForced { + const PALLET: &'static str = "Balances"; + const EVENT: &'static str = "TotalIssuanceForced"; } } - } - pub mod scheduler { - use super::{root_mod, runtime_types}; - #[doc = "The `Error` enum of this pallet."] - pub type Error = runtime_types::pallet_scheduler::pallet::Error; - #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] - pub type Call = runtime_types::pallet_scheduler::pallet::Call; - pub mod calls { - use super::{root_mod, runtime_types}; - type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod storage { + use super::runtime_types; pub mod types { use super::runtime_types; - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Anonymously schedule a task."] - pub struct Schedule { - pub when: schedule::When, - pub maybe_periodic: schedule::MaybePeriodic, - pub priority: schedule::Priority, - pub call: ::subxt::ext::subxt_core::alloc::boxed::Box, + pub mod total_issuance { + use super::runtime_types; + pub type TotalIssuance = ::core::primitive::u128; } - pub mod schedule { + pub mod inactive_issuance { use super::runtime_types; - pub type When = ::core::primitive::u32; - pub type MaybePeriodic = ::core::option::Option<( - runtime_types::qp_scheduler::BlockNumberOrTimestamp< - ::core::primitive::u32, - ::core::primitive::u64, - >, - ::core::primitive::u32, - )>; - pub type Priority = ::core::primitive::u8; - pub type Call = runtime_types::quantus_runtime::RuntimeCall; + pub type InactiveIssuance = ::core::primitive::u128; } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for Schedule { - const PALLET: &'static str = "Scheduler"; - const CALL: &'static str = "schedule"; + pub mod account { + use super::runtime_types; + pub type Account = + runtime_types::pallet_balances::types::AccountData<::core::primitive::u128>; + pub type Param0 = ::subxt::ext::subxt_core::utils::AccountId32; } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Cancel an anonymously scheduled task."] - pub struct Cancel { - pub when: cancel::When, - pub index: cancel::Index, + pub mod locks { + use super::runtime_types; + pub type Locks = + runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec< + runtime_types::pallet_balances::types::BalanceLock< + ::core::primitive::u128, + >, + >; + pub type Param0 = ::subxt::ext::subxt_core::utils::AccountId32; } - pub mod cancel { + pub mod reserves { use super::runtime_types; - pub type When = runtime_types::qp_scheduler::BlockNumberOrTimestamp< - ::core::primitive::u32, - ::core::primitive::u64, + pub type Reserves = runtime_types::bounded_collections::bounded_vec::BoundedVec< + runtime_types::pallet_balances::types::ReserveData< + [::core::primitive::u8; 8usize], + ::core::primitive::u128, + >, >; - pub type Index = ::core::primitive::u32; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for Cancel { - const PALLET: &'static str = "Scheduler"; - const CALL: &'static str = "cancel"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Schedule a named task."] - pub struct ScheduleNamed { - pub id: schedule_named::Id, - pub when: schedule_named::When, - pub maybe_periodic: schedule_named::MaybePeriodic, - pub priority: schedule_named::Priority, - pub call: ::subxt::ext::subxt_core::alloc::boxed::Box, + pub type Param0 = ::subxt::ext::subxt_core::utils::AccountId32; } - pub mod schedule_named { + pub mod holds { use super::runtime_types; - pub type Id = [::core::primitive::u8; 32usize]; - pub type When = ::core::primitive::u32; - pub type MaybePeriodic = ::core::option::Option<( - runtime_types::qp_scheduler::BlockNumberOrTimestamp< - ::core::primitive::u32, - ::core::primitive::u64, + pub type Holds = runtime_types::bounded_collections::bounded_vec::BoundedVec< + runtime_types::frame_support::traits::tokens::misc::IdAmount< + runtime_types::quantus_runtime::RuntimeHoldReason, + ::core::primitive::u128, >, - ::core::primitive::u32, - )>; - pub type Priority = ::core::primitive::u8; - pub type Call = runtime_types::quantus_runtime::RuntimeCall; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for ScheduleNamed { - const PALLET: &'static str = "Scheduler"; - const CALL: &'static str = "schedule_named"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Cancel a named scheduled task."] - pub struct CancelNamed { - pub id: cancel_named::Id, + >; + pub type Param0 = ::subxt::ext::subxt_core::utils::AccountId32; } - pub mod cancel_named { + pub mod freezes { use super::runtime_types; - pub type Id = [::core::primitive::u8; 32usize]; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for CancelNamed { - const PALLET: &'static str = "Scheduler"; - const CALL: &'static str = "cancel_named"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Anonymously schedule a task after a delay."] - pub struct ScheduleAfter { - pub after: schedule_after::After, - pub maybe_periodic: schedule_after::MaybePeriodic, - pub priority: schedule_after::Priority, - pub call: ::subxt::ext::subxt_core::alloc::boxed::Box, + pub type Freezes = runtime_types::bounded_collections::bounded_vec::BoundedVec< + runtime_types::frame_support::traits::tokens::misc::IdAmount< + runtime_types::quantus_runtime::RuntimeFreezeReason, + ::core::primitive::u128, + >, + >; + pub type Param0 = ::subxt::ext::subxt_core::utils::AccountId32; } - pub mod schedule_after { + pub mod transfer_proof { use super::runtime_types; - pub type After = runtime_types::qp_scheduler::BlockNumberOrTimestamp< - ::core::primitive::u32, + pub type TransferProof = (); + pub type Param0 = ( ::core::primitive::u64, - >; - pub type MaybePeriodic = ::core::option::Option<( - runtime_types::qp_scheduler::BlockNumberOrTimestamp< - ::core::primitive::u32, - ::core::primitive::u64, - >, - ::core::primitive::u32, - )>; - pub type Priority = ::core::primitive::u8; - pub type Call = runtime_types::quantus_runtime::RuntimeCall; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for ScheduleAfter { - const PALLET: &'static str = "Scheduler"; - const CALL: &'static str = "schedule_after"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Schedule a named task after a delay."] - pub struct ScheduleNamedAfter { - pub id: schedule_named_after::Id, - pub after: schedule_named_after::After, - pub maybe_periodic: schedule_named_after::MaybePeriodic, - pub priority: schedule_named_after::Priority, - pub call: - ::subxt::ext::subxt_core::alloc::boxed::Box, + ::subxt::ext::subxt_core::utils::AccountId32, + ::subxt::ext::subxt_core::utils::AccountId32, + ::core::primitive::u128, + ); } - pub mod schedule_named_after { + pub mod transfer_count { use super::runtime_types; - pub type Id = [::core::primitive::u8; 32usize]; - pub type After = runtime_types::qp_scheduler::BlockNumberOrTimestamp< - ::core::primitive::u32, - ::core::primitive::u64, - >; - pub type MaybePeriodic = ::core::option::Option<( - runtime_types::qp_scheduler::BlockNumberOrTimestamp< - ::core::primitive::u32, - ::core::primitive::u64, - >, - ::core::primitive::u32, - )>; - pub type Priority = ::core::primitive::u8; - pub type Call = runtime_types::quantus_runtime::RuntimeCall; + pub type TransferCount = ::core::primitive::u64; } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for ScheduleNamedAfter { - const PALLET: &'static str = "Scheduler"; - const CALL: &'static str = "schedule_named_after"; + } + pub struct StorageApi; + impl StorageApi { + #[doc = " The total units issued in the system."] + pub fn total_issuance( + &self, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::total_issuance::TotalIssuance, + ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, + (), + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "Balances", + "TotalIssuance", + (), + [ + 116u8, 70u8, 119u8, 194u8, 69u8, 37u8, 116u8, 206u8, 171u8, 70u8, + 171u8, 210u8, 226u8, 111u8, 184u8, 204u8, 206u8, 11u8, 68u8, 72u8, + 255u8, 19u8, 194u8, 11u8, 27u8, 194u8, 81u8, 204u8, 59u8, 224u8, 202u8, + 185u8, + ], + ) } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Set a retry configuration for a task so that, in case its scheduled run fails, it will"] - #[doc = "be retried after `period` blocks, for a total amount of `retries` retries or until it"] - #[doc = "succeeds."] + #[doc = " The total units of outstanding deactivated balance in the system."] + pub fn inactive_issuance( + &self, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::inactive_issuance::InactiveIssuance, + ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, + (), + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "Balances", + "InactiveIssuance", + (), + [ + 212u8, 185u8, 19u8, 50u8, 250u8, 72u8, 173u8, 50u8, 4u8, 104u8, 161u8, + 249u8, 77u8, 247u8, 204u8, 248u8, 11u8, 18u8, 57u8, 4u8, 82u8, 110u8, + 30u8, 216u8, 16u8, 37u8, 87u8, 67u8, 189u8, 235u8, 214u8, 155u8, + ], + ) + } + #[doc = " The Balances pallet example of storing the balance of an account."] #[doc = ""] - #[doc = "Tasks which need to be scheduled for a retry are still subject to weight metering and"] - #[doc = "agenda space, same as a regular task. If a periodic task fails, it will be scheduled"] - #[doc = "normally while the task is retrying."] + #[doc = " # Example"] #[doc = ""] - #[doc = "Tasks scheduled as a result of a retry for a periodic task are unnamed, non-periodic"] - #[doc = "clones of the original task. Their retry configuration will be derived from the"] - #[doc = "original task's configuration, but will have a lower value for `remaining` than the"] - #[doc = "original `total_retries`."] - pub struct SetRetry { - pub task: set_retry::Task, - pub retries: set_retry::Retries, - pub period: set_retry::Period, - } - pub mod set_retry { - use super::runtime_types; - pub type Task = ( - runtime_types::qp_scheduler::BlockNumberOrTimestamp< - ::core::primitive::u32, - ::core::primitive::u64, - >, - ::core::primitive::u32, - ); - pub type Retries = ::core::primitive::u8; - pub type Period = runtime_types::qp_scheduler::BlockNumberOrTimestamp< - ::core::primitive::u32, - ::core::primitive::u64, - >; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for SetRetry { - const PALLET: &'static str = "Scheduler"; - const CALL: &'static str = "set_retry"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Set a retry configuration for a named task so that, in case its scheduled run fails, it"] - #[doc = "will be retried after `period` blocks, for a total amount of `retries` retries or until"] - #[doc = "it succeeds."] + #[doc = " ```nocompile"] + #[doc = " impl pallet_balances::Config for Runtime {"] + #[doc = " type AccountStore = StorageMapShim, frame_system::Provider, AccountId, Self::AccountData>"] + #[doc = " }"] + #[doc = " ```"] #[doc = ""] - #[doc = "Tasks which need to be scheduled for a retry are still subject to weight metering and"] - #[doc = "agenda space, same as a regular task. If a periodic task fails, it will be scheduled"] - #[doc = "normally while the task is retrying."] + #[doc = " You can also store the balance of an account in the `System` pallet."] #[doc = ""] - #[doc = "Tasks scheduled as a result of a retry for a periodic task are unnamed, non-periodic"] - #[doc = "clones of the original task. Their retry configuration will be derived from the"] - #[doc = "original task's configuration, but will have a lower value for `remaining` than the"] - #[doc = "original `total_retries`."] - pub struct SetRetryNamed { - pub id: set_retry_named::Id, - pub retries: set_retry_named::Retries, - pub period: set_retry_named::Period, - } - pub mod set_retry_named { - use super::runtime_types; - pub type Id = [::core::primitive::u8; 32usize]; - pub type Retries = ::core::primitive::u8; - pub type Period = runtime_types::qp_scheduler::BlockNumberOrTimestamp< - ::core::primitive::u32, - ::core::primitive::u64, - >; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for SetRetryNamed { - const PALLET: &'static str = "Scheduler"; - const CALL: &'static str = "set_retry_named"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Removes the retry configuration of a task."] - pub struct CancelRetry { - pub task: cancel_retry::Task, - } - pub mod cancel_retry { - use super::runtime_types; - pub type Task = ( - runtime_types::qp_scheduler::BlockNumberOrTimestamp< - ::core::primitive::u32, - ::core::primitive::u64, - >, - ::core::primitive::u32, - ); - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for CancelRetry { - const PALLET: &'static str = "Scheduler"; - const CALL: &'static str = "cancel_retry"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Cancel the retry configuration of a named task."] - pub struct CancelRetryNamed { - pub id: cancel_retry_named::Id, - } - pub mod cancel_retry_named { - use super::runtime_types; - pub type Id = [::core::primitive::u8; 32usize]; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for CancelRetryNamed { - const PALLET: &'static str = "Scheduler"; - const CALL: &'static str = "cancel_retry_named"; - } - } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Anonymously schedule a task."] - pub fn schedule( + #[doc = " # Example"] + #[doc = ""] + #[doc = " ```nocompile"] + #[doc = " impl pallet_balances::Config for Runtime {"] + #[doc = " type AccountStore = System"] + #[doc = " }"] + #[doc = " ```"] + #[doc = ""] + #[doc = " But this comes with tradeoffs, storing account balances in the system pallet stores"] + #[doc = " `frame_system` data alongside the account data contrary to storing account balances in the"] + #[doc = " `Balances` pallet, which uses a `StorageMap` to store balances data only."] + #[doc = " NOTE: This is only used in the case that this pallet is used to store balances."] + pub fn account_iter( &self, - when: types::schedule::When, - maybe_periodic: types::schedule::MaybePeriodic, - priority: types::schedule::Priority, - call: types::schedule::Call, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Scheduler", - "schedule", - types::Schedule { - when, - maybe_periodic, - priority, - call: ::subxt::ext::subxt_core::alloc::boxed::Box::new(call), - }, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::account::Account, + (), + ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "Balances", + "Account", + (), [ - 47u8, 177u8, 243u8, 244u8, 65u8, 140u8, 198u8, 118u8, 141u8, 171u8, - 97u8, 208u8, 200u8, 86u8, 90u8, 129u8, 54u8, 225u8, 118u8, 107u8, 45u8, - 183u8, 0u8, 129u8, 122u8, 99u8, 169u8, 214u8, 239u8, 187u8, 173u8, - 112u8, + 213u8, 38u8, 200u8, 69u8, 218u8, 0u8, 112u8, 181u8, 160u8, 23u8, 96u8, + 90u8, 3u8, 88u8, 126u8, 22u8, 103u8, 74u8, 64u8, 69u8, 29u8, 247u8, + 18u8, 17u8, 234u8, 143u8, 189u8, 22u8, 247u8, 194u8, 154u8, 249u8, ], ) } - #[doc = "Cancel an anonymously scheduled task."] - pub fn cancel( + #[doc = " The Balances pallet example of storing the balance of an account."] + #[doc = ""] + #[doc = " # Example"] + #[doc = ""] + #[doc = " ```nocompile"] + #[doc = " impl pallet_balances::Config for Runtime {"] + #[doc = " type AccountStore = StorageMapShim, frame_system::Provider, AccountId, Self::AccountData>"] + #[doc = " }"] + #[doc = " ```"] + #[doc = ""] + #[doc = " You can also store the balance of an account in the `System` pallet."] + #[doc = ""] + #[doc = " # Example"] + #[doc = ""] + #[doc = " ```nocompile"] + #[doc = " impl pallet_balances::Config for Runtime {"] + #[doc = " type AccountStore = System"] + #[doc = " }"] + #[doc = " ```"] + #[doc = ""] + #[doc = " But this comes with tradeoffs, storing account balances in the system pallet stores"] + #[doc = " `frame_system` data alongside the account data contrary to storing account balances in the"] + #[doc = " `Balances` pallet, which uses a `StorageMap` to store balances data only."] + #[doc = " NOTE: This is only used in the case that this pallet is used to store balances."] + pub fn account( &self, - when: types::cancel::When, - index: types::cancel::Index, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Scheduler", - "cancel", - types::Cancel { when, index }, + _0: types::account::Param0, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + ::subxt::ext::subxt_core::storage::address::StaticStorageKey< + types::account::Param0, + >, + types::account::Account, + ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, + (), + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "Balances", + "Account", + ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), [ - 134u8, 77u8, 15u8, 56u8, 137u8, 12u8, 58u8, 147u8, 164u8, 204u8, 221u8, - 150u8, 103u8, 42u8, 36u8, 79u8, 146u8, 115u8, 13u8, 194u8, 39u8, 73u8, - 109u8, 10u8, 168u8, 164u8, 190u8, 173u8, 30u8, 17u8, 35u8, 17u8, + 213u8, 38u8, 200u8, 69u8, 218u8, 0u8, 112u8, 181u8, 160u8, 23u8, 96u8, + 90u8, 3u8, 88u8, 126u8, 22u8, 103u8, 74u8, 64u8, 69u8, 29u8, 247u8, + 18u8, 17u8, 234u8, 143u8, 189u8, 22u8, 247u8, 194u8, 154u8, 249u8, ], ) } - #[doc = "Schedule a named task."] - pub fn schedule_named( + #[doc = " Any liquidity locks on some account balances."] + #[doc = " NOTE: Should only be accessed when setting, changing and freeing a lock."] + #[doc = ""] + #[doc = " Use of locks is deprecated in favour of freezes. See `https://github.com/paritytech/substrate/pull/12951/`"] + pub fn locks_iter( &self, - id: types::schedule_named::Id, - when: types::schedule_named::When, - maybe_periodic: types::schedule_named::MaybePeriodic, - priority: types::schedule_named::Priority, - call: types::schedule_named::Call, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload - { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Scheduler", - "schedule_named", - types::ScheduleNamed { - id, - when, - maybe_periodic, - priority, - call: ::subxt::ext::subxt_core::alloc::boxed::Box::new(call), - }, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::locks::Locks, + (), + ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "Balances", + "Locks", + (), [ - 221u8, 20u8, 219u8, 119u8, 223u8, 96u8, 88u8, 226u8, 245u8, 137u8, 9u8, - 127u8, 51u8, 199u8, 95u8, 80u8, 228u8, 156u8, 102u8, 239u8, 165u8, - 28u8, 41u8, 17u8, 139u8, 211u8, 23u8, 170u8, 97u8, 163u8, 57u8, 102u8, + 10u8, 223u8, 55u8, 0u8, 249u8, 69u8, 168u8, 41u8, 75u8, 35u8, 120u8, + 167u8, 18u8, 132u8, 9u8, 20u8, 91u8, 51u8, 27u8, 69u8, 136u8, 187u8, + 13u8, 220u8, 163u8, 122u8, 26u8, 141u8, 174u8, 249u8, 85u8, 37u8, ], ) } - #[doc = "Cancel a named scheduled task."] - pub fn cancel_named( + #[doc = " Any liquidity locks on some account balances."] + #[doc = " NOTE: Should only be accessed when setting, changing and freeing a lock."] + #[doc = ""] + #[doc = " Use of locks is deprecated in favour of freezes. See `https://github.com/paritytech/substrate/pull/12951/`"] + pub fn locks( &self, - id: types::cancel_named::Id, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Scheduler", - "cancel_named", - types::CancelNamed { id }, + _0: types::locks::Param0, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + ::subxt::ext::subxt_core::storage::address::StaticStorageKey< + types::locks::Param0, + >, + types::locks::Locks, + ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, + (), + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "Balances", + "Locks", + ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), [ - 205u8, 35u8, 28u8, 57u8, 224u8, 7u8, 49u8, 233u8, 236u8, 163u8, 93u8, - 236u8, 103u8, 69u8, 65u8, 51u8, 121u8, 84u8, 9u8, 196u8, 147u8, 122u8, - 227u8, 200u8, 181u8, 233u8, 62u8, 240u8, 174u8, 83u8, 129u8, 193u8, + 10u8, 223u8, 55u8, 0u8, 249u8, 69u8, 168u8, 41u8, 75u8, 35u8, 120u8, + 167u8, 18u8, 132u8, 9u8, 20u8, 91u8, 51u8, 27u8, 69u8, 136u8, 187u8, + 13u8, 220u8, 163u8, 122u8, 26u8, 141u8, 174u8, 249u8, 85u8, 37u8, ], ) } - #[doc = "Anonymously schedule a task after a delay."] - pub fn schedule_after( + #[doc = " Named reserves on some account balances."] + #[doc = ""] + #[doc = " Use of reserves is deprecated in favour of holds. See `https://github.com/paritytech/substrate/pull/12951/`"] + pub fn reserves_iter( &self, - after: types::schedule_after::After, - maybe_periodic: types::schedule_after::MaybePeriodic, - priority: types::schedule_after::Priority, - call: types::schedule_after::Call, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload - { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Scheduler", - "schedule_after", - types::ScheduleAfter { - after, - maybe_periodic, - priority, - call: ::subxt::ext::subxt_core::alloc::boxed::Box::new(call), - }, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::reserves::Reserves, + (), + ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "Balances", + "Reserves", + (), [ - 98u8, 112u8, 95u8, 200u8, 64u8, 199u8, 162u8, 207u8, 168u8, 219u8, - 235u8, 78u8, 224u8, 210u8, 130u8, 195u8, 135u8, 253u8, 67u8, 48u8, - 39u8, 19u8, 94u8, 184u8, 195u8, 52u8, 47u8, 35u8, 101u8, 202u8, 121u8, - 165u8, + 112u8, 10u8, 241u8, 77u8, 64u8, 187u8, 106u8, 159u8, 13u8, 153u8, + 140u8, 178u8, 182u8, 50u8, 1u8, 55u8, 149u8, 92u8, 196u8, 229u8, 170u8, + 106u8, 193u8, 88u8, 255u8, 244u8, 2u8, 193u8, 62u8, 235u8, 204u8, 91u8, ], ) } - #[doc = "Schedule a named task after a delay."] - pub fn schedule_named_after( + #[doc = " Named reserves on some account balances."] + #[doc = ""] + #[doc = " Use of reserves is deprecated in favour of holds. See `https://github.com/paritytech/substrate/pull/12951/`"] + pub fn reserves( &self, - id: types::schedule_named_after::Id, - after: types::schedule_named_after::After, - maybe_periodic: types::schedule_named_after::MaybePeriodic, - priority: types::schedule_named_after::Priority, - call: types::schedule_named_after::Call, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload - { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Scheduler", - "schedule_named_after", - types::ScheduleNamedAfter { - id, - after, - maybe_periodic, - priority, - call: ::subxt::ext::subxt_core::alloc::boxed::Box::new(call), - }, + _0: types::reserves::Param0, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + ::subxt::ext::subxt_core::storage::address::StaticStorageKey< + types::reserves::Param0, + >, + types::reserves::Reserves, + ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, + (), + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "Balances", + "Reserves", + ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), [ - 30u8, 107u8, 131u8, 175u8, 133u8, 185u8, 140u8, 81u8, 238u8, 253u8, - 141u8, 65u8, 91u8, 29u8, 190u8, 234u8, 191u8, 130u8, 183u8, 43u8, - 131u8, 159u8, 248u8, 86u8, 204u8, 26u8, 81u8, 88u8, 34u8, 99u8, 69u8, - 209u8, + 112u8, 10u8, 241u8, 77u8, 64u8, 187u8, 106u8, 159u8, 13u8, 153u8, + 140u8, 178u8, 182u8, 50u8, 1u8, 55u8, 149u8, 92u8, 196u8, 229u8, 170u8, + 106u8, 193u8, 88u8, 255u8, 244u8, 2u8, 193u8, 62u8, 235u8, 204u8, 91u8, ], ) } - #[doc = "Set a retry configuration for a task so that, in case its scheduled run fails, it will"] - #[doc = "be retried after `period` blocks, for a total amount of `retries` retries or until it"] - #[doc = "succeeds."] - #[doc = ""] - #[doc = "Tasks which need to be scheduled for a retry are still subject to weight metering and"] - #[doc = "agenda space, same as a regular task. If a periodic task fails, it will be scheduled"] - #[doc = "normally while the task is retrying."] - #[doc = ""] - #[doc = "Tasks scheduled as a result of a retry for a periodic task are unnamed, non-periodic"] - #[doc = "clones of the original task. Their retry configuration will be derived from the"] - #[doc = "original task's configuration, but will have a lower value for `remaining` than the"] - #[doc = "original `total_retries`."] - pub fn set_retry( + #[doc = " Holds on account balances."] + pub fn holds_iter( &self, - task: types::set_retry::Task, - retries: types::set_retry::Retries, - period: types::set_retry::Period, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Scheduler", - "set_retry", - types::SetRetry { task, retries, period }, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::holds::Holds, + (), + ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "Balances", + "Holds", + (), [ - 31u8, 128u8, 255u8, 13u8, 13u8, 252u8, 74u8, 151u8, 60u8, 242u8, 152u8, - 58u8, 190u8, 155u8, 132u8, 65u8, 139u8, 208u8, 222u8, 175u8, 89u8, - 222u8, 186u8, 98u8, 53u8, 125u8, 71u8, 55u8, 95u8, 2u8, 76u8, 248u8, + 108u8, 118u8, 163u8, 86u8, 4u8, 174u8, 42u8, 210u8, 139u8, 171u8, 15u8, + 242u8, 10u8, 4u8, 255u8, 205u8, 247u8, 61u8, 236u8, 127u8, 54u8, 175u8, + 182u8, 131u8, 84u8, 129u8, 78u8, 242u8, 92u8, 143u8, 219u8, 35u8, ], ) } - #[doc = "Set a retry configuration for a named task so that, in case its scheduled run fails, it"] - #[doc = "will be retried after `period` blocks, for a total amount of `retries` retries or until"] - #[doc = "it succeeds."] - #[doc = ""] - #[doc = "Tasks which need to be scheduled for a retry are still subject to weight metering and"] - #[doc = "agenda space, same as a regular task. If a periodic task fails, it will be scheduled"] - #[doc = "normally while the task is retrying."] - #[doc = ""] - #[doc = "Tasks scheduled as a result of a retry for a periodic task are unnamed, non-periodic"] - #[doc = "clones of the original task. Their retry configuration will be derived from the"] - #[doc = "original task's configuration, but will have a lower value for `remaining` than the"] - #[doc = "original `total_retries`."] - pub fn set_retry_named( + #[doc = " Holds on account balances."] + pub fn holds( &self, - id: types::set_retry_named::Id, - retries: types::set_retry_named::Retries, - period: types::set_retry_named::Period, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload - { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Scheduler", - "set_retry_named", - types::SetRetryNamed { id, retries, period }, + _0: types::holds::Param0, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + ::subxt::ext::subxt_core::storage::address::StaticStorageKey< + types::holds::Param0, + >, + types::holds::Holds, + ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, + (), + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "Balances", + "Holds", + ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), [ - 102u8, 70u8, 114u8, 48u8, 180u8, 194u8, 107u8, 81u8, 104u8, 117u8, - 33u8, 169u8, 43u8, 172u8, 61u8, 129u8, 143u8, 221u8, 44u8, 101u8, - 235u8, 228u8, 224u8, 71u8, 65u8, 223u8, 180u8, 130u8, 83u8, 89u8, - 157u8, 75u8, + 108u8, 118u8, 163u8, 86u8, 4u8, 174u8, 42u8, 210u8, 139u8, 171u8, 15u8, + 242u8, 10u8, 4u8, 255u8, 205u8, 247u8, 61u8, 236u8, 127u8, 54u8, 175u8, + 182u8, 131u8, 84u8, 129u8, 78u8, 242u8, 92u8, 143u8, 219u8, 35u8, ], ) } - #[doc = "Removes the retry configuration of a task."] - pub fn cancel_retry( + #[doc = " Freeze locks on account balances."] + pub fn freezes_iter( &self, - task: types::cancel_retry::Task, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Scheduler", - "cancel_retry", - types::CancelRetry { task }, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::freezes::Freezes, + (), + ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "Balances", + "Freezes", + (), [ - 153u8, 252u8, 168u8, 142u8, 100u8, 114u8, 25u8, 46u8, 225u8, 95u8, - 243u8, 78u8, 160u8, 175u8, 17u8, 33u8, 27u8, 241u8, 149u8, 187u8, - 228u8, 182u8, 233u8, 74u8, 10u8, 228u8, 117u8, 218u8, 210u8, 127u8, - 245u8, 105u8, + 170u8, 69u8, 116u8, 92u8, 165u8, 14u8, 129u8, 179u8, 165u8, 6u8, 123u8, + 156u8, 4u8, 30u8, 25u8, 181u8, 191u8, 29u8, 3u8, 92u8, 96u8, 167u8, + 102u8, 38u8, 128u8, 140u8, 85u8, 248u8, 114u8, 127u8, 128u8, 40u8, ], ) } - #[doc = "Cancel the retry configuration of a named task."] - pub fn cancel_retry_named( + #[doc = " Freeze locks on account balances."] + pub fn freezes( &self, - id: types::cancel_retry_named::Id, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload - { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Scheduler", - "cancel_retry_named", - types::CancelRetryNamed { id }, + _0: types::freezes::Param0, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + ::subxt::ext::subxt_core::storage::address::StaticStorageKey< + types::freezes::Param0, + >, + types::freezes::Freezes, + ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, + (), + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "Balances", + "Freezes", + ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), [ - 76u8, 157u8, 253u8, 113u8, 162u8, 54u8, 98u8, 21u8, 62u8, 44u8, 155u8, - 202u8, 2u8, 28u8, 153u8, 219u8, 67u8, 166u8, 206u8, 79u8, 139u8, 3u8, - 119u8, 182u8, 254u8, 134u8, 143u8, 121u8, 155u8, 220u8, 192u8, 209u8, + 170u8, 69u8, 116u8, 92u8, 165u8, 14u8, 129u8, 179u8, 165u8, 6u8, 123u8, + 156u8, 4u8, 30u8, 25u8, 181u8, 191u8, 29u8, 3u8, 92u8, 96u8, 167u8, + 102u8, 38u8, 128u8, 140u8, 85u8, 248u8, 114u8, 127u8, 128u8, 40u8, + ], + ) + } + #[doc = " Transfer proofs for a wormhole transfers"] + pub fn transfer_proof_iter( + &self, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::transfer_proof::TransferProof, + (), + (), + ::subxt::ext::subxt_core::utils::Yes, + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "Balances", + "TransferProof", + (), + [ + 210u8, 54u8, 36u8, 79u8, 12u8, 123u8, 227u8, 172u8, 23u8, 232u8, 200u8, + 138u8, 130u8, 99u8, 12u8, 186u8, 77u8, 74u8, 208u8, 111u8, 137u8, + 159u8, 169u8, 112u8, 227u8, 111u8, 65u8, 127u8, 232u8, 57u8, 166u8, + 14u8, + ], + ) + } + #[doc = " Transfer proofs for a wormhole transfers"] + pub fn transfer_proof( + &self, + _0: types::transfer_proof::Param0, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + ::subxt::ext::subxt_core::storage::address::StaticStorageKey< + types::transfer_proof::Param0, + >, + types::transfer_proof::TransferProof, + ::subxt::ext::subxt_core::utils::Yes, + (), + (), + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "Balances", + "TransferProof", + ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), + [ + 210u8, 54u8, 36u8, 79u8, 12u8, 123u8, 227u8, 172u8, 23u8, 232u8, 200u8, + 138u8, 130u8, 99u8, 12u8, 186u8, 77u8, 74u8, 208u8, 111u8, 137u8, + 159u8, 169u8, 112u8, 227u8, 111u8, 65u8, 127u8, 232u8, 57u8, 166u8, + 14u8, + ], + ) + } + pub fn transfer_count( + &self, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::transfer_count::TransferCount, + ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, + (), + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "Balances", + "TransferCount", + (), + [ + 105u8, 10u8, 160u8, 118u8, 193u8, 131u8, 207u8, 188u8, 78u8, 238u8, + 252u8, 99u8, 31u8, 72u8, 159u8, 128u8, 159u8, 215u8, 110u8, 101u8, + 27u8, 132u8, 12u8, 59u8, 182u8, 107u8, 98u8, 77u8, 189u8, 100u8, 51u8, + 209u8, ], ) } } - } - #[doc = "Events type."] - pub type Event = runtime_types::pallet_scheduler::pallet::Event; - pub mod events { - use super::runtime_types; - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "Scheduled some task."] - pub struct Scheduled { - pub when: scheduled::When, - pub index: scheduled::Index, - } - pub mod scheduled { - use super::runtime_types; - pub type When = runtime_types::qp_scheduler::BlockNumberOrTimestamp< - ::core::primitive::u32, - ::core::primitive::u64, - >; - pub type Index = ::core::primitive::u32; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for Scheduled { - const PALLET: &'static str = "Scheduler"; - const EVENT: &'static str = "Scheduled"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "Canceled some task."] - pub struct Canceled { - pub when: canceled::When, - pub index: canceled::Index, - } - pub mod canceled { - use super::runtime_types; - pub type When = runtime_types::qp_scheduler::BlockNumberOrTimestamp< + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The minimum amount required to keep an account open. MUST BE GREATER THAN ZERO!"] + #[doc = ""] + #[doc = " If you *really* need it to be zero, you can enable the feature `insecure_zero_ed` for"] + #[doc = " this pallet. However, you do so at your own risk: this will open up a major DoS vector."] + #[doc = " In case you have multiple sources of provider references, you may also get unexpected"] + #[doc = " behaviour if you set this to zero."] + #[doc = ""] + #[doc = " Bottom line: Do yourself a favour and make it at least one!"] + pub fn existential_deposit( + &self, + ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< + ::core::primitive::u128, + > { + ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( + "Balances", + "ExistentialDeposit", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, + 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) + } + #[doc = " The maximum number of locks that should exist on an account."] + #[doc = " Not strictly enforced, but used for weight estimation."] + #[doc = ""] + #[doc = " Use of locks is deprecated in favour of freezes. See `https://github.com/paritytech/substrate/pull/12951/`"] + pub fn max_locks( + &self, + ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< ::core::primitive::u32, - ::core::primitive::u64, - >; - pub type Index = ::core::primitive::u32; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for Canceled { - const PALLET: &'static str = "Scheduler"; - const EVENT: &'static str = "Canceled"; + > { + ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( + "Balances", + "MaxLocks", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " The maximum number of named reserves that can exist on an account."] + #[doc = ""] + #[doc = " Use of reserves is deprecated in favour of holds. See `https://github.com/paritytech/substrate/pull/12951/`"] + pub fn max_reserves( + &self, + ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< + ::core::primitive::u32, + > { + ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( + "Balances", + "MaxReserves", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " The maximum number of individual freeze locks that can exist on an account at any time."] + pub fn max_freezes( + &self, + ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< + ::core::primitive::u32, + > { + ::subxt::ext::subxt_core::constants::address::StaticAddress::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, + ], + ) + } } + } + } + pub mod transaction_payment { + use super::{root_mod, runtime_types}; + #[doc = "The `Event` enum of this pallet"] + pub type Event = runtime_types::pallet_transaction_payment::pallet::Event; + pub mod events { + use super::runtime_types; #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, @@ -6437,475 +5440,79 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "Dispatched some task."] - pub struct Dispatched { - pub task: dispatched::Task, - pub id: dispatched::Id, - pub result: dispatched::Result, + #[doc = "A transaction fee `actual_fee`, of which `tip` was added to the minimum inclusion fee,"] + #[doc = "has been paid by `who`."] + pub struct TransactionFeePaid { + pub who: transaction_fee_paid::Who, + pub actual_fee: transaction_fee_paid::ActualFee, + pub tip: transaction_fee_paid::Tip, } - pub mod dispatched { + pub mod transaction_fee_paid { use super::runtime_types; - pub type Task = ( - runtime_types::qp_scheduler::BlockNumberOrTimestamp< - ::core::primitive::u32, - ::core::primitive::u64, - >, - ::core::primitive::u32, - ); - pub type Id = ::core::option::Option<[::core::primitive::u8; 32usize]>; - pub type Result = - ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for Dispatched { - const PALLET: &'static str = "Scheduler"; - const EVENT: &'static str = "Dispatched"; + pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; + pub type ActualFee = ::core::primitive::u128; + pub type Tip = ::core::primitive::u128; } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "Set a retry configuration for some task."] - pub struct RetrySet { - pub task: retry_set::Task, - pub id: retry_set::Id, - pub period: retry_set::Period, - pub retries: retry_set::Retries, + impl ::subxt::ext::subxt_core::events::StaticEvent for TransactionFeePaid { + const PALLET: &'static str = "TransactionPayment"; + const EVENT: &'static str = "TransactionFeePaid"; } - pub mod retry_set { + } + pub mod storage { + use super::runtime_types; + pub mod types { use super::runtime_types; - pub type Task = ( - runtime_types::qp_scheduler::BlockNumberOrTimestamp< - ::core::primitive::u32, - ::core::primitive::u64, - >, - ::core::primitive::u32, - ); - pub type Id = ::core::option::Option<[::core::primitive::u8; 32usize]>; - pub type Period = runtime_types::qp_scheduler::BlockNumberOrTimestamp< - ::core::primitive::u32, - ::core::primitive::u64, - >; - pub type Retries = ::core::primitive::u8; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for RetrySet { - const PALLET: &'static str = "Scheduler"; - const EVENT: &'static str = "RetrySet"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "Cancel a retry configuration for some task."] - pub struct RetryCancelled { - pub task: retry_cancelled::Task, - pub id: retry_cancelled::Id, - } - pub mod retry_cancelled { - use super::runtime_types; - pub type Task = ( - runtime_types::qp_scheduler::BlockNumberOrTimestamp< - ::core::primitive::u32, - ::core::primitive::u64, - >, - ::core::primitive::u32, - ); - pub type Id = ::core::option::Option<[::core::primitive::u8; 32usize]>; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for RetryCancelled { - const PALLET: &'static str = "Scheduler"; - const EVENT: &'static str = "RetryCancelled"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "The call for the provided hash was not found so the task has been aborted."] - pub struct CallUnavailable { - pub task: call_unavailable::Task, - pub id: call_unavailable::Id, - } - pub mod call_unavailable { - use super::runtime_types; - pub type Task = ( - runtime_types::qp_scheduler::BlockNumberOrTimestamp< - ::core::primitive::u32, - ::core::primitive::u64, - >, - ::core::primitive::u32, - ); - pub type Id = ::core::option::Option<[::core::primitive::u8; 32usize]>; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for CallUnavailable { - const PALLET: &'static str = "Scheduler"; - const EVENT: &'static str = "CallUnavailable"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "The given task was unable to be renewed since the agenda is full at that block."] - pub struct PeriodicFailed { - pub task: periodic_failed::Task, - pub id: periodic_failed::Id, - } - pub mod periodic_failed { - use super::runtime_types; - pub type Task = ( - runtime_types::qp_scheduler::BlockNumberOrTimestamp< - ::core::primitive::u32, - ::core::primitive::u64, - >, - ::core::primitive::u32, - ); - pub type Id = ::core::option::Option<[::core::primitive::u8; 32usize]>; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for PeriodicFailed { - const PALLET: &'static str = "Scheduler"; - const EVENT: &'static str = "PeriodicFailed"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "The given task was unable to be retried since the agenda is full at that block or there"] - #[doc = "was not enough weight to reschedule it."] - pub struct RetryFailed { - pub task: retry_failed::Task, - pub id: retry_failed::Id, - } - pub mod retry_failed { - use super::runtime_types; - pub type Task = ( - runtime_types::qp_scheduler::BlockNumberOrTimestamp< - ::core::primitive::u32, - ::core::primitive::u64, - >, - ::core::primitive::u32, - ); - pub type Id = ::core::option::Option<[::core::primitive::u8; 32usize]>; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for RetryFailed { - const PALLET: &'static str = "Scheduler"; - const EVENT: &'static str = "RetryFailed"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "The given task can never be executed since it is overweight."] - pub struct PermanentlyOverweight { - pub task: permanently_overweight::Task, - pub id: permanently_overweight::Id, - } - pub mod permanently_overweight { - use super::runtime_types; - pub type Task = ( - runtime_types::qp_scheduler::BlockNumberOrTimestamp< - ::core::primitive::u32, - ::core::primitive::u64, - >, - ::core::primitive::u32, - ); - pub type Id = ::core::option::Option<[::core::primitive::u8; 32usize]>; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for PermanentlyOverweight { - const PALLET: &'static str = "Scheduler"; - const EVENT: &'static str = "PermanentlyOverweight"; - } - } - pub mod storage { - use super::runtime_types; - pub mod types { - use super::runtime_types; - pub mod incomplete_block_since { - use super::runtime_types; - pub type IncompleteBlockSince = ::core::primitive::u32; - } - pub mod incomplete_timestamp_since { - use super::runtime_types; - pub type IncompleteTimestampSince = ::core::primitive::u64; - } - pub mod last_processed_timestamp { - use super::runtime_types; - pub type LastProcessedTimestamp = ::core::primitive::u64; - } - pub mod agenda { - use super::runtime_types; - pub type Agenda = runtime_types::bounded_collections::bounded_vec::BoundedVec< - ::core::option::Option< - runtime_types::pallet_scheduler::Scheduled< - [::core::primitive::u8; 32usize], - runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::quantus_runtime::RuntimeCall, - runtime_types::poseidon_resonance::PoseidonHasher, - >, - ::core::primitive::u32, - runtime_types::quantus_runtime::OriginCaller, - ::subxt::ext::subxt_core::utils::AccountId32, - ::core::primitive::u64, - >, - >, - >; - pub type Param0 = runtime_types::qp_scheduler::BlockNumberOrTimestamp< - ::core::primitive::u32, - ::core::primitive::u64, - >; - } - pub mod retries { - use super::runtime_types; - pub type Retries = runtime_types::pallet_scheduler::RetryConfig< - runtime_types::qp_scheduler::BlockNumberOrTimestamp< - ::core::primitive::u32, - ::core::primitive::u64, - >, - >; - pub type Param0 = ( - runtime_types::qp_scheduler::BlockNumberOrTimestamp< - ::core::primitive::u32, - ::core::primitive::u64, - >, - ::core::primitive::u32, - ); - } - pub mod lookup { - use super::runtime_types; - pub type Lookup = ( - runtime_types::qp_scheduler::BlockNumberOrTimestamp< - ::core::primitive::u32, - ::core::primitive::u64, - >, - ::core::primitive::u32, - ); - pub type Param0 = [::core::primitive::u8; 32usize]; - } + pub mod next_fee_multiplier { + use super::runtime_types; + pub type NextFeeMultiplier = + runtime_types::sp_arithmetic::fixed_point::FixedU128; + } + pub mod storage_version { + use super::runtime_types; + pub type StorageVersion = runtime_types::pallet_transaction_payment::Releases; + } } pub struct StorageApi; impl StorageApi { - #[doc = " Tracks incomplete block-based agendas that need to be processed in a later block."] - pub fn incomplete_block_since( + pub fn next_fee_multiplier( &self, ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< (), - types::incomplete_block_since::IncompleteBlockSince, + types::next_fee_multiplier::NextFeeMultiplier, + ::subxt::ext::subxt_core::utils::Yes, ::subxt::ext::subxt_core::utils::Yes, - (), (), > { ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Scheduler", - "IncompleteBlockSince", + "TransactionPayment", + "NextFeeMultiplier", (), [ - 134u8, 34u8, 161u8, 236u8, 176u8, 35u8, 218u8, 109u8, 229u8, 93u8, - 29u8, 95u8, 81u8, 106u8, 98u8, 65u8, 132u8, 91u8, 237u8, 225u8, 75u8, - 125u8, 81u8, 218u8, 72u8, 215u8, 20u8, 66u8, 160u8, 196u8, 68u8, 34u8, + 247u8, 39u8, 81u8, 170u8, 225u8, 226u8, 82u8, 147u8, 34u8, 113u8, + 147u8, 213u8, 59u8, 80u8, 139u8, 35u8, 36u8, 196u8, 152u8, 19u8, 9u8, + 159u8, 176u8, 79u8, 249u8, 201u8, 170u8, 1u8, 129u8, 79u8, 146u8, + 197u8, ], ) } - #[doc = " Tracks incomplete timestamp-based agendas that need to be processed in a later block."] - pub fn incomplete_timestamp_since( + pub fn storage_version( &self, ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< (), - types::incomplete_timestamp_since::IncompleteTimestampSince, + types::storage_version::StorageVersion, + ::subxt::ext::subxt_core::utils::Yes, ::subxt::ext::subxt_core::utils::Yes, - (), (), > { ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Scheduler", - "IncompleteTimestampSince", + "TransactionPayment", + "StorageVersion", (), [ - 223u8, 125u8, 99u8, 28u8, 81u8, 135u8, 125u8, 26u8, 3u8, 20u8, 32u8, - 125u8, 141u8, 114u8, 100u8, 38u8, 219u8, 191u8, 30u8, 88u8, 82u8, 33u8, - 140u8, 223u8, 168u8, 84u8, 144u8, 85u8, 57u8, 241u8, 97u8, 141u8, - ], - ) - } - #[doc = " Tracks the last timestamp bucket that was fully processed."] - #[doc = " Used to avoid reprocessing all buckets from 0 on every run."] - pub fn last_processed_timestamp( - &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::last_processed_timestamp::LastProcessedTimestamp, - ::subxt::ext::subxt_core::utils::Yes, - (), - (), - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Scheduler", - "LastProcessedTimestamp", - (), - [ - 172u8, 193u8, 6u8, 47u8, 185u8, 134u8, 179u8, 132u8, 178u8, 0u8, 228u8, - 198u8, 232u8, 24u8, 85u8, 199u8, 102u8, 222u8, 246u8, 178u8, 8u8, - 221u8, 51u8, 188u8, 239u8, 218u8, 112u8, 245u8, 46u8, 146u8, 65u8, - 119u8, - ], - ) - } - #[doc = " Items to be executed, indexed by the block number that they should be executed on."] - pub fn agenda_iter( - &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::agenda::Agenda, - (), - ::subxt::ext::subxt_core::utils::Yes, - ::subxt::ext::subxt_core::utils::Yes, - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Scheduler", - "Agenda", - (), - [ - 40u8, 202u8, 246u8, 38u8, 132u8, 7u8, 46u8, 62u8, 12u8, 89u8, 165u8, - 174u8, 22u8, 19u8, 15u8, 179u8, 152u8, 131u8, 221u8, 249u8, 122u8, - 142u8, 58u8, 183u8, 157u8, 17u8, 63u8, 243u8, 101u8, 160u8, 200u8, - 96u8, - ], - ) - } - #[doc = " Items to be executed, indexed by the block number that they should be executed on."] - pub fn agenda( - &self, - _0: types::agenda::Param0, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::agenda::Param0, - >, - types::agenda::Agenda, - ::subxt::ext::subxt_core::utils::Yes, - ::subxt::ext::subxt_core::utils::Yes, - (), - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Scheduler", - "Agenda", - ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), - [ - 40u8, 202u8, 246u8, 38u8, 132u8, 7u8, 46u8, 62u8, 12u8, 89u8, 165u8, - 174u8, 22u8, 19u8, 15u8, 179u8, 152u8, 131u8, 221u8, 249u8, 122u8, - 142u8, 58u8, 183u8, 157u8, 17u8, 63u8, 243u8, 101u8, 160u8, 200u8, - 96u8, - ], - ) - } - #[doc = " Retry configurations for items to be executed, indexed by task address."] - pub fn retries_iter( - &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::retries::Retries, - (), - (), - ::subxt::ext::subxt_core::utils::Yes, - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Scheduler", - "Retries", - (), - [ - 94u8, 54u8, 136u8, 189u8, 244u8, 118u8, 102u8, 67u8, 203u8, 238u8, - 109u8, 130u8, 229u8, 246u8, 244u8, 68u8, 59u8, 132u8, 12u8, 9u8, 219u8, - 176u8, 251u8, 1u8, 216u8, 200u8, 205u8, 176u8, 145u8, 201u8, 206u8, - 108u8, - ], - ) - } - #[doc = " Retry configurations for items to be executed, indexed by task address."] - pub fn retries( - &self, - _0: types::retries::Param0, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::retries::Param0, - >, - types::retries::Retries, - ::subxt::ext::subxt_core::utils::Yes, - (), - (), - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Scheduler", - "Retries", - ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), - [ - 94u8, 54u8, 136u8, 189u8, 244u8, 118u8, 102u8, 67u8, 203u8, 238u8, - 109u8, 130u8, 229u8, 246u8, 244u8, 68u8, 59u8, 132u8, 12u8, 9u8, 219u8, - 176u8, 251u8, 1u8, 216u8, 200u8, 205u8, 176u8, 145u8, 201u8, 206u8, - 108u8, - ], - ) - } - #[doc = " Lookup from a name to the block number and index of the task."] - #[doc = ""] - #[doc = " For v3 -> v4 the previously unbounded identities are Blake2-256 hashed to form the v4"] - #[doc = " identities."] - pub fn lookup_iter( - &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::lookup::Lookup, - (), - (), - ::subxt::ext::subxt_core::utils::Yes, - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Scheduler", - "Lookup", - (), - [ - 133u8, 194u8, 6u8, 16u8, 27u8, 10u8, 159u8, 62u8, 113u8, 59u8, 58u8, - 225u8, 244u8, 206u8, 35u8, 113u8, 41u8, 40u8, 89u8, 71u8, 133u8, 117u8, - 33u8, 192u8, 106u8, 85u8, 83u8, 186u8, 36u8, 160u8, 144u8, 221u8, - ], - ) - } - #[doc = " Lookup from a name to the block number and index of the task."] - #[doc = ""] - #[doc = " For v3 -> v4 the previously unbounded identities are Blake2-256 hashed to form the v4"] - #[doc = " identities."] - pub fn lookup( - &self, - _0: types::lookup::Param0, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::lookup::Param0, - >, - types::lookup::Lookup, - ::subxt::ext::subxt_core::utils::Yes, - (), - (), - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Scheduler", - "Lookup", - ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), - [ - 133u8, 194u8, 6u8, 16u8, 27u8, 10u8, 159u8, 62u8, 113u8, 59u8, 58u8, - 225u8, 244u8, 206u8, 35u8, 113u8, 41u8, 40u8, 89u8, 71u8, 133u8, 117u8, - 33u8, 192u8, 106u8, 85u8, 83u8, 186u8, 36u8, 160u8, 144u8, 221u8, + 105u8, 243u8, 158u8, 241u8, 159u8, 231u8, 253u8, 6u8, 4u8, 32u8, 85u8, + 178u8, 126u8, 31u8, 203u8, 134u8, 154u8, 38u8, 122u8, 155u8, 150u8, + 251u8, 174u8, 15u8, 74u8, 134u8, 216u8, 244u8, 168u8, 175u8, 158u8, + 144u8, ], ) } @@ -6915,72 +5522,52 @@ pub mod api { use super::runtime_types; pub struct ConstantsApi; impl ConstantsApi { - #[doc = " The maximum weight that may be scheduled per block for any dispatchables."] - pub fn maximum_weight( - &self, - ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< - runtime_types::sp_weights::weight_v2::Weight, - > { - ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "Scheduler", - "MaximumWeight", - [ - 149u8, 252u8, 129u8, 80u8, 169u8, 36u8, 79u8, 127u8, 240u8, 156u8, - 56u8, 202u8, 219u8, 86u8, 5u8, 65u8, 245u8, 148u8, 138u8, 243u8, 210u8, - 128u8, 234u8, 216u8, 240u8, 219u8, 123u8, 235u8, 21u8, 158u8, 237u8, - 112u8, - ], - ) - } - #[doc = " The maximum number of scheduled calls in the queue for a single block."] + #[doc = " A fee multiplier for `Operational` extrinsics to compute \"virtual tip\" to boost their"] + #[doc = " `priority`"] #[doc = ""] - #[doc = " NOTE:"] - #[doc = " + Dependent pallets' benchmarks might require a higher limit for the setting. Set a"] - #[doc = " higher limit under `runtime-benchmarks` feature."] - pub fn max_scheduled_per_block( - &self, - ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< - ::core::primitive::u32, - > { - ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "Scheduler", - "MaxScheduledPerBlock", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, - ], - ) - } - #[doc = " Precision of the timestamp buckets."] + #[doc = " This value is multiplied by the `final_fee` to obtain a \"virtual tip\" that is later"] + #[doc = " added to a tip component in regular `priority` calculations."] + #[doc = " It means that a `Normal` transaction can front-run a similarly-sized `Operational`"] + #[doc = " extrinsic (with no tip), by including a tip value greater than the virtual tip."] #[doc = ""] - #[doc = " Timestamp based dispatches are rounded to the nearest bucket of this precision."] - pub fn timestamp_bucket_size( + #[doc = " ```rust,ignore"] + #[doc = " // For `Normal`"] + #[doc = " let priority = priority_calc(tip);"] + #[doc = ""] + #[doc = " // For `Operational`"] + #[doc = " let virtual_tip = (inclusion_fee + tip) * OperationalFeeMultiplier;"] + #[doc = " let priority = priority_calc(tip + virtual_tip);"] + #[doc = " ```"] + #[doc = ""] + #[doc = " Note that since we use `final_fee` the multiplier applies also to the regular `tip`"] + #[doc = " sent with the transaction. So, not only does the transaction get a priority bump based"] + #[doc = " on the `inclusion_fee`, but we also amplify the impact of tips applied to `Operational`"] + #[doc = " transactions."] + pub fn operational_fee_multiplier( &self, ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< - ::core::primitive::u64, + ::core::primitive::u8, > { ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "Scheduler", - "TimestampBucketSize", + "TransactionPayment", + "OperationalFeeMultiplier", [ - 128u8, 214u8, 205u8, 242u8, 181u8, 142u8, 124u8, 231u8, 190u8, 146u8, - 59u8, 226u8, 157u8, 101u8, 103u8, 117u8, 249u8, 65u8, 18u8, 191u8, - 103u8, 119u8, 53u8, 85u8, 81u8, 96u8, 220u8, 42u8, 184u8, 239u8, 42u8, - 246u8, + 141u8, 130u8, 11u8, 35u8, 226u8, 114u8, 92u8, 179u8, 168u8, 110u8, + 28u8, 91u8, 221u8, 64u8, 4u8, 148u8, 201u8, 193u8, 185u8, 66u8, 226u8, + 114u8, 97u8, 79u8, 62u8, 212u8, 202u8, 114u8, 237u8, 228u8, 183u8, + 165u8, ], ) } } } } - pub mod utility { + pub mod sudo { use super::{root_mod, runtime_types}; - #[doc = "The `Error` enum of this pallet."] - pub type Error = runtime_types::pallet_utility::pallet::Error; + #[doc = "Error for the Sudo pallet."] + pub type Error = runtime_types::pallet_sudo::pallet::Error; #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] - pub type Call = runtime_types::pallet_utility::pallet::Call; + pub type Call = runtime_types::pallet_sudo::pallet::Call; pub mod calls { use super::{root_mod, runtime_types}; type DispatchError = runtime_types::sp_runtime::DispatchError; @@ -6997,36 +5584,17 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Send a batch of dispatch calls."] - #[doc = ""] - #[doc = "May be called from any origin except `None`."] - #[doc = ""] - #[doc = "- `calls`: The calls to be dispatched from the same origin. The number of call must not"] - #[doc = " exceed the constant: `batched_calls_limit` (available in constant metadata)."] - #[doc = ""] - #[doc = "If origin is root then the calls are dispatched without checking origin filter. (This"] - #[doc = "includes bypassing `frame_system::Config::BaseCallFilter`)."] - #[doc = ""] - #[doc = "## Complexity"] - #[doc = "- O(C) where C is the number of calls to be batched."] - #[doc = ""] - #[doc = "This will return `Ok` in all circumstances. To determine the success of the batch, an"] - #[doc = "event is deposited. If a call failed and the batch was interrupted, then the"] - #[doc = "`BatchInterrupted` event is deposited, along with the number of successful calls made"] - #[doc = "and the error of the failed call. If all were successful, then the `BatchCompleted`"] - #[doc = "event is deposited."] - pub struct Batch { - pub calls: batch::Calls, + #[doc = "Authenticates the sudo key and dispatches a function call with `Root` origin."] + pub struct Sudo { + pub call: ::subxt::ext::subxt_core::alloc::boxed::Box, } - pub mod batch { + pub mod sudo { use super::runtime_types; - pub type Calls = ::subxt::ext::subxt_core::alloc::vec::Vec< - runtime_types::quantus_runtime::RuntimeCall, - >; + pub type Call = runtime_types::quantus_runtime::RuntimeCall; } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for Batch { - const PALLET: &'static str = "Utility"; - const CALL: &'static str = "batch"; + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for Sudo { + const PALLET: &'static str = "Sudo"; + const CALL: &'static str = "sudo"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -7039,31 +5607,24 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Send a call through an indexed pseudonym of the sender."] - #[doc = ""] - #[doc = "Filter from origin are passed along. The call will be dispatched with an origin which"] - #[doc = "use the same filter as the origin of this call."] - #[doc = ""] - #[doc = "NOTE: If you need to ensure that any account-based filtering is not honored (i.e."] - #[doc = "because you expect `proxy` to have been used prior in the call stack and you do not want"] - #[doc = "the call restrictions to apply to any sub-accounts), then use `as_multi_threshold_1`"] - #[doc = "in the Multisig pallet instead."] - #[doc = ""] - #[doc = "NOTE: Prior to version *12, this was called `as_limited_sub`."] + #[doc = "Authenticates the sudo key and dispatches a function call with `Root` origin."] + #[doc = "This function does not check the weight of the call, and instead allows the"] + #[doc = "Sudo user to specify the weight of the call."] #[doc = ""] #[doc = "The dispatch origin for this call must be _Signed_."] - pub struct AsDerivative { - pub index: as_derivative::Index, - pub call: ::subxt::ext::subxt_core::alloc::boxed::Box, + pub struct SudoUncheckedWeight { + pub call: + ::subxt::ext::subxt_core::alloc::boxed::Box, + pub weight: sudo_unchecked_weight::Weight, } - pub mod as_derivative { + pub mod sudo_unchecked_weight { use super::runtime_types; - pub type Index = ::core::primitive::u16; pub type Call = runtime_types::quantus_runtime::RuntimeCall; + pub type Weight = runtime_types::sp_weights::weight_v2::Weight; } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for AsDerivative { - const PALLET: &'static str = "Utility"; - const CALL: &'static str = "as_derivative"; + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for SudoUncheckedWeight { + const PALLET: &'static str = "Sudo"; + const CALL: &'static str = "sudo_unchecked_weight"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -7076,62 +5637,21 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Send a batch of dispatch calls and atomically execute them."] - #[doc = "The whole transaction will rollback and fail if any of the calls failed."] - #[doc = ""] - #[doc = "May be called from any origin except `None`."] - #[doc = ""] - #[doc = "- `calls`: The calls to be dispatched from the same origin. The number of call must not"] - #[doc = " exceed the constant: `batched_calls_limit` (available in constant metadata)."] - #[doc = ""] - #[doc = "If origin is root then the calls are dispatched without checking origin filter. (This"] - #[doc = "includes bypassing `frame_system::Config::BaseCallFilter`)."] - #[doc = ""] - #[doc = "## Complexity"] - #[doc = "- O(C) where C is the number of calls to be batched."] - pub struct BatchAll { - pub calls: batch_all::Calls, + #[doc = "Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo"] + #[doc = "key."] + pub struct SetKey { + pub new: set_key::New, } - pub mod batch_all { + pub mod set_key { use super::runtime_types; - pub type Calls = ::subxt::ext::subxt_core::alloc::vec::Vec< - runtime_types::quantus_runtime::RuntimeCall, + pub type New = ::subxt::ext::subxt_core::utils::MultiAddress< + ::subxt::ext::subxt_core::utils::AccountId32, + (), >; } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for BatchAll { - const PALLET: &'static str = "Utility"; - const CALL: &'static str = "batch_all"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Dispatches a function call with a provided origin."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Root_."] - #[doc = ""] - #[doc = "## Complexity"] - #[doc = "- O(1)."] - pub struct DispatchAs { - pub as_origin: - ::subxt::ext::subxt_core::alloc::boxed::Box, - pub call: ::subxt::ext::subxt_core::alloc::boxed::Box, - } - pub mod dispatch_as { - use super::runtime_types; - pub type AsOrigin = runtime_types::quantus_runtime::OriginCaller; - pub type Call = runtime_types::quantus_runtime::RuntimeCall; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for DispatchAs { - const PALLET: &'static str = "Utility"; - const CALL: &'static str = "dispatch_as"; + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for SetKey { + const PALLET: &'static str = "Sudo"; + const CALL: &'static str = "set_key"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -7144,31 +5664,25 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Send a batch of dispatch calls."] - #[doc = "Unlike `batch`, it allows errors and won't interrupt."] - #[doc = ""] - #[doc = "May be called from any origin except `None`."] - #[doc = ""] - #[doc = "- `calls`: The calls to be dispatched from the same origin. The number of call must not"] - #[doc = " exceed the constant: `batched_calls_limit` (available in constant metadata)."] - #[doc = ""] - #[doc = "If origin is root then the calls are dispatch without checking origin filter. (This"] - #[doc = "includes bypassing `frame_system::Config::BaseCallFilter`)."] + #[doc = "Authenticates the sudo key and dispatches a function call with `Signed` origin from"] + #[doc = "a given account."] #[doc = ""] - #[doc = "## Complexity"] - #[doc = "- O(C) where C is the number of calls to be batched."] - pub struct ForceBatch { - pub calls: force_batch::Calls, + #[doc = "The dispatch origin for this call must be _Signed_."] + pub struct SudoAs { + pub who: sudo_as::Who, + pub call: ::subxt::ext::subxt_core::alloc::boxed::Box, } - pub mod force_batch { + pub mod sudo_as { use super::runtime_types; - pub type Calls = ::subxt::ext::subxt_core::alloc::vec::Vec< - runtime_types::quantus_runtime::RuntimeCall, + pub type Who = ::subxt::ext::subxt_core::utils::MultiAddress< + ::subxt::ext::subxt_core::utils::AccountId32, + (), >; + pub type Call = runtime_types::quantus_runtime::RuntimeCall; } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for ForceBatch { - const PALLET: &'static str = "Utility"; - const CALL: &'static str = "force_batch"; + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for SudoAs { + const PALLET: &'static str = "Sudo"; + const CALL: &'static str = "sudo_as"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -7181,206 +5695,123 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Dispatch a function call with a specified weight."] - #[doc = ""] - #[doc = "This function does not check the weight of the call, and instead allows the"] - #[doc = "Root origin to specify the weight of the call."] + #[doc = "Permanently removes the sudo key."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Root_."] - pub struct WithWeight { - pub call: ::subxt::ext::subxt_core::alloc::boxed::Box, - pub weight: with_weight::Weight, - } - pub mod with_weight { - use super::runtime_types; - pub type Call = runtime_types::quantus_runtime::RuntimeCall; - pub type Weight = runtime_types::sp_weights::weight_v2::Weight; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for WithWeight { - const PALLET: &'static str = "Utility"; - const CALL: &'static str = "with_weight"; + #[doc = "**This cannot be un-done.**"] + pub struct RemoveKey; + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for RemoveKey { + const PALLET: &'static str = "Sudo"; + const CALL: &'static str = "remove_key"; } } pub struct TransactionApi; impl TransactionApi { - #[doc = "Send a batch of dispatch calls."] - #[doc = ""] - #[doc = "May be called from any origin except `None`."] - #[doc = ""] - #[doc = "- `calls`: The calls to be dispatched from the same origin. The number of call must not"] - #[doc = " exceed the constant: `batched_calls_limit` (available in constant metadata)."] - #[doc = ""] - #[doc = "If origin is root then the calls are dispatched without checking origin filter. (This"] - #[doc = "includes bypassing `frame_system::Config::BaseCallFilter`)."] - #[doc = ""] - #[doc = "## Complexity"] - #[doc = "- O(C) where C is the number of calls to be batched."] - #[doc = ""] - #[doc = "This will return `Ok` in all circumstances. To determine the success of the batch, an"] - #[doc = "event is deposited. If a call failed and the batch was interrupted, then the"] - #[doc = "`BatchInterrupted` event is deposited, along with the number of successful calls made"] - #[doc = "and the error of the failed call. If all were successful, then the `BatchCompleted`"] - #[doc = "event is deposited."] - pub fn batch( + #[doc = "Authenticates the sudo key and dispatches a function call with `Root` origin."] + pub fn sudo( &self, - calls: types::batch::Calls, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { + call: types::sudo::Call, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Utility", - "batch", - types::Batch { calls }, + "Sudo", + "sudo", + types::Sudo { + call: ::subxt::ext::subxt_core::alloc::boxed::Box::new(call), + }, [ - 19u8, 206u8, 118u8, 149u8, 51u8, 183u8, 56u8, 103u8, 145u8, 193u8, - 181u8, 39u8, 61u8, 254u8, 153u8, 220u8, 111u8, 101u8, 210u8, 167u8, - 130u8, 15u8, 179u8, 34u8, 118u8, 49u8, 254u8, 143u8, 99u8, 232u8, - 249u8, 59u8, + 87u8, 23u8, 4u8, 4u8, 159u8, 106u8, 223u8, 190u8, 133u8, 103u8, 103u8, + 160u8, 232u8, 245u8, 96u8, 170u8, 192u8, 161u8, 52u8, 60u8, 226u8, 3u8, + 183u8, 40u8, 122u8, 117u8, 19u8, 237u8, 41u8, 230u8, 159u8, 79u8, ], ) } - #[doc = "Send a call through an indexed pseudonym of the sender."] - #[doc = ""] - #[doc = "Filter from origin are passed along. The call will be dispatched with an origin which"] - #[doc = "use the same filter as the origin of this call."] - #[doc = ""] - #[doc = "NOTE: If you need to ensure that any account-based filtering is not honored (i.e."] - #[doc = "because you expect `proxy` to have been used prior in the call stack and you do not want"] - #[doc = "the call restrictions to apply to any sub-accounts), then use `as_multi_threshold_1`"] - #[doc = "in the Multisig pallet instead."] - #[doc = ""] - #[doc = "NOTE: Prior to version *12, this was called `as_limited_sub`."] + #[doc = "Authenticates the sudo key and dispatches a function call with `Root` origin."] + #[doc = "This function does not check the weight of the call, and instead allows the"] + #[doc = "Sudo user to specify the weight of the call."] #[doc = ""] #[doc = "The dispatch origin for this call must be _Signed_."] - pub fn as_derivative( + pub fn sudo_unchecked_weight( &self, - index: types::as_derivative::Index, - call: types::as_derivative::Call, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { + call: types::sudo_unchecked_weight::Call, + weight: types::sudo_unchecked_weight::Weight, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload + { ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Utility", - "as_derivative", - types::AsDerivative { - index, + "Sudo", + "sudo_unchecked_weight", + types::SudoUncheckedWeight { call: ::subxt::ext::subxt_core::alloc::boxed::Box::new(call), + weight, }, [ - 125u8, 52u8, 89u8, 91u8, 77u8, 219u8, 217u8, 39u8, 39u8, 253u8, 115u8, - 163u8, 228u8, 120u8, 15u8, 130u8, 192u8, 253u8, 79u8, 167u8, 198u8, - 207u8, 90u8, 233u8, 246u8, 39u8, 165u8, 47u8, 68u8, 200u8, 33u8, 175u8, + 72u8, 236u8, 99u8, 180u8, 204u8, 84u8, 167u8, 177u8, 89u8, 249u8, + 181u8, 211u8, 177u8, 64u8, 167u8, 164u8, 254u8, 237u8, 247u8, 109u8, + 194u8, 194u8, 174u8, 134u8, 252u8, 112u8, 68u8, 160u8, 240u8, 228u8, + 195u8, 117u8, ], ) } - #[doc = "Send a batch of dispatch calls and atomically execute them."] - #[doc = "The whole transaction will rollback and fail if any of the calls failed."] - #[doc = ""] - #[doc = "May be called from any origin except `None`."] - #[doc = ""] - #[doc = "- `calls`: The calls to be dispatched from the same origin. The number of call must not"] - #[doc = " exceed the constant: `batched_calls_limit` (available in constant metadata)."] - #[doc = ""] - #[doc = "If origin is root then the calls are dispatched without checking origin filter. (This"] - #[doc = "includes bypassing `frame_system::Config::BaseCallFilter`)."] - #[doc = ""] - #[doc = "## Complexity"] - #[doc = "- O(C) where C is the number of calls to be batched."] - pub fn batch_all( + #[doc = "Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo"] + #[doc = "key."] + pub fn set_key( &self, - calls: types::batch_all::Calls, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { + new: types::set_key::New, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Utility", - "batch_all", - types::BatchAll { calls }, + "Sudo", + "set_key", + types::SetKey { new }, [ - 253u8, 128u8, 115u8, 70u8, 86u8, 186u8, 16u8, 72u8, 37u8, 159u8, 23u8, - 253u8, 105u8, 138u8, 186u8, 196u8, 108u8, 126u8, 4u8, 239u8, 11u8, - 47u8, 125u8, 85u8, 222u8, 195u8, 135u8, 98u8, 163u8, 242u8, 181u8, - 161u8, + 9u8, 73u8, 39u8, 205u8, 188u8, 127u8, 143u8, 54u8, 128u8, 94u8, 8u8, + 227u8, 197u8, 44u8, 70u8, 93u8, 228u8, 196u8, 64u8, 165u8, 226u8, + 158u8, 101u8, 192u8, 22u8, 193u8, 102u8, 84u8, 21u8, 35u8, 92u8, 198u8, ], ) } - #[doc = "Dispatches a function call with a provided origin."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Root_."] + #[doc = "Authenticates the sudo key and dispatches a function call with `Signed` origin from"] + #[doc = "a given account."] #[doc = ""] - #[doc = "## Complexity"] - #[doc = "- O(1)."] - pub fn dispatch_as( + #[doc = "The dispatch origin for this call must be _Signed_."] + pub fn sudo_as( &self, - as_origin: types::dispatch_as::AsOrigin, - call: types::dispatch_as::Call, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { + who: types::sudo_as::Who, + call: types::sudo_as::Call, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Utility", - "dispatch_as", - types::DispatchAs { - as_origin: ::subxt::ext::subxt_core::alloc::boxed::Box::new(as_origin), + "Sudo", + "sudo_as", + types::SudoAs { + who, call: ::subxt::ext::subxt_core::alloc::boxed::Box::new(call), }, [ - 166u8, 235u8, 27u8, 28u8, 121u8, 227u8, 130u8, 155u8, 124u8, 143u8, - 89u8, 234u8, 97u8, 80u8, 76u8, 5u8, 198u8, 66u8, 189u8, 134u8, 78u8, - 36u8, 179u8, 47u8, 210u8, 56u8, 104u8, 170u8, 60u8, 8u8, 31u8, 103u8, - ], - ) - } - #[doc = "Send a batch of dispatch calls."] - #[doc = "Unlike `batch`, it allows errors and won't interrupt."] - #[doc = ""] - #[doc = "May be called from any origin except `None`."] - #[doc = ""] - #[doc = "- `calls`: The calls to be dispatched from the same origin. The number of call must not"] - #[doc = " exceed the constant: `batched_calls_limit` (available in constant metadata)."] - #[doc = ""] - #[doc = "If origin is root then the calls are dispatch without checking origin filter. (This"] - #[doc = "includes bypassing `frame_system::Config::BaseCallFilter`)."] - #[doc = ""] - #[doc = "## Complexity"] - #[doc = "- O(C) where C is the number of calls to be batched."] - pub fn force_batch( - &self, - calls: types::force_batch::Calls, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Utility", - "force_batch", - types::ForceBatch { calls }, - [ - 122u8, 151u8, 216u8, 201u8, 80u8, 153u8, 253u8, 115u8, 15u8, 11u8, - 58u8, 182u8, 48u8, 133u8, 2u8, 107u8, 202u8, 249u8, 2u8, 135u8, 135u8, - 253u8, 150u8, 165u8, 152u8, 135u8, 136u8, 191u8, 37u8, 155u8, 37u8, - 243u8, + 149u8, 140u8, 96u8, 188u8, 16u8, 180u8, 19u8, 117u8, 237u8, 4u8, 72u8, + 145u8, 88u8, 188u8, 167u8, 117u8, 240u8, 63u8, 242u8, 55u8, 53u8, + 226u8, 7u8, 46u8, 116u8, 200u8, 216u8, 196u8, 183u8, 20u8, 49u8, 127u8, ], ) } - #[doc = "Dispatch a function call with a specified weight."] - #[doc = ""] - #[doc = "This function does not check the weight of the call, and instead allows the"] - #[doc = "Root origin to specify the weight of the call."] + #[doc = "Permanently removes the sudo key."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Root_."] - pub fn with_weight( + #[doc = "**This cannot be un-done.**"] + pub fn remove_key( &self, - call: types::with_weight::Call, - weight: types::with_weight::Weight, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Utility", - "with_weight", - types::WithWeight { - call: ::subxt::ext::subxt_core::alloc::boxed::Box::new(call), - weight, - }, + "Sudo", + "remove_key", + types::RemoveKey {}, [ - 21u8, 81u8, 80u8, 83u8, 118u8, 162u8, 108u8, 192u8, 200u8, 210u8, 62u8, - 7u8, 18u8, 76u8, 102u8, 77u8, 122u8, 52u8, 182u8, 146u8, 145u8, 243u8, - 231u8, 141u8, 89u8, 165u8, 39u8, 32u8, 8u8, 63u8, 1u8, 28u8, + 133u8, 253u8, 54u8, 175u8, 202u8, 239u8, 5u8, 198u8, 180u8, 138u8, + 25u8, 28u8, 109u8, 40u8, 30u8, 56u8, 126u8, 100u8, 52u8, 205u8, 250u8, + 191u8, 61u8, 195u8, 172u8, 142u8, 184u8, 239u8, 247u8, 10u8, 211u8, + 79u8, ], ) } } } #[doc = "The `Event` enum of this pallet"] - pub type Event = runtime_types::pallet_utility::pallet::Event; + pub type Event = runtime_types::pallet_sudo::pallet::Event; pub mod events { use super::runtime_types; #[derive( @@ -7390,20 +5821,18 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "Batch of dispatches did not complete fully. Index of first failing dispatch given, as"] - #[doc = "well as the error."] - pub struct BatchInterrupted { - pub index: batch_interrupted::Index, - pub error: batch_interrupted::Error, + #[doc = "A sudo call just took place."] + pub struct Sudid { + pub sudo_result: sudid::SudoResult, } - pub mod batch_interrupted { + pub mod sudid { use super::runtime_types; - pub type Index = ::core::primitive::u32; - pub type Error = runtime_types::sp_runtime::DispatchError; + pub type SudoResult = + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>; } - impl ::subxt::ext::subxt_core::events::StaticEvent for BatchInterrupted { - const PALLET: &'static str = "Utility"; - const EVENT: &'static str = "BatchInterrupted"; + impl ::subxt::ext::subxt_core::events::StaticEvent for Sudid { + const PALLET: &'static str = "Sudo"; + const EVENT: &'static str = "Sudid"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -7412,11 +5841,19 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "Batch of dispatches completed fully with no error."] - pub struct BatchCompleted; - impl ::subxt::ext::subxt_core::events::StaticEvent for BatchCompleted { - const PALLET: &'static str = "Utility"; - const EVENT: &'static str = "BatchCompleted"; + #[doc = "The sudo key has been updated."] + pub struct KeyChanged { + pub old: key_changed::Old, + pub new: key_changed::New, + } + pub mod key_changed { + use super::runtime_types; + pub type Old = ::core::option::Option<::subxt::ext::subxt_core::utils::AccountId32>; + pub type New = ::subxt::ext::subxt_core::utils::AccountId32; + } + impl ::subxt::ext::subxt_core::events::StaticEvent for KeyChanged { + const PALLET: &'static str = "Sudo"; + const EVENT: &'static str = "KeyChanged"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -7425,11 +5862,11 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "Batch of dispatches completed but has errors."] - pub struct BatchCompletedWithErrors; - impl ::subxt::ext::subxt_core::events::StaticEvent for BatchCompletedWithErrors { - const PALLET: &'static str = "Utility"; - const EVENT: &'static str = "BatchCompletedWithErrors"; + #[doc = "The key was permanently removed."] + pub struct KeyRemoved; + impl ::subxt::ext::subxt_core::events::StaticEvent for KeyRemoved { + const PALLET: &'static str = "Sudo"; + const EVENT: &'static str = "KeyRemoved"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -7438,12 +5875,63 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "A single item within a Batch of dispatches has completed with no error."] - pub struct ItemCompleted; - impl ::subxt::ext::subxt_core::events::StaticEvent for ItemCompleted { - const PALLET: &'static str = "Utility"; - const EVENT: &'static str = "ItemCompleted"; + #[doc = "A [sudo_as](Pallet::sudo_as) call just took place."] + pub struct SudoAsDone { + pub sudo_result: sudo_as_done::SudoResult, } + pub mod sudo_as_done { + use super::runtime_types; + pub type SudoResult = + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>; + } + impl ::subxt::ext::subxt_core::events::StaticEvent for SudoAsDone { + const PALLET: &'static str = "Sudo"; + const EVENT: &'static str = "SudoAsDone"; + } + } + pub mod storage { + use super::runtime_types; + pub mod types { + use super::runtime_types; + pub mod key { + use super::runtime_types; + pub type Key = ::subxt::ext::subxt_core::utils::AccountId32; + } + } + pub struct StorageApi; + impl StorageApi { + #[doc = " The `AccountId` of the sudo key."] + pub fn key( + &self, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::key::Key, + ::subxt::ext::subxt_core::utils::Yes, + (), + (), + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "Sudo", + "Key", + (), + [ + 72u8, 14u8, 225u8, 162u8, 205u8, 247u8, 227u8, 105u8, 116u8, 57u8, 4u8, + 31u8, 84u8, 137u8, 227u8, 228u8, 133u8, 245u8, 206u8, 227u8, 117u8, + 36u8, 252u8, 151u8, 107u8, 15u8, 180u8, 4u8, 4u8, 152u8, 195u8, 144u8, + ], + ) + } + } + } + } + pub mod q_po_w { + use super::{root_mod, runtime_types}; + #[doc = "The `Error` enum of this pallet."] + pub type Error = runtime_types::pallet_qpow::pallet::Error; + #[doc = "The `Event` enum of this pallet"] + pub type Event = runtime_types::pallet_qpow::pallet::Event; + pub mod events { + use super::runtime_types; #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, @@ -7451,17 +5939,20 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "A single item within a Batch of dispatches has completed with error."] - pub struct ItemFailed { - pub error: item_failed::Error, + pub struct ProofSubmitted { + pub nonce: proof_submitted::Nonce, + pub difficulty: proof_submitted::Difficulty, + pub distance_achieved: proof_submitted::DistanceAchieved, } - pub mod item_failed { + pub mod proof_submitted { use super::runtime_types; - pub type Error = runtime_types::sp_runtime::DispatchError; + pub type Nonce = [::core::primitive::u8; 64usize]; + pub type Difficulty = runtime_types::primitive_types::U512; + pub type DistanceAchieved = runtime_types::primitive_types::U512; } - impl ::subxt::ext::subxt_core::events::StaticEvent for ItemFailed { - const PALLET: &'static str = "Utility"; - const EVENT: &'static str = "ItemFailed"; + impl ::subxt::ext::subxt_core::events::StaticEvent for ProofSubmitted { + const PALLET: &'static str = "QPoW"; + const EVENT: &'static str = "ProofSubmitted"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -7470,717 +5961,503 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "A call was dispatched."] - pub struct DispatchedAs { - pub result: dispatched_as::Result, + pub struct DistanceThresholdAdjusted { + pub old_distance_threshold: distance_threshold_adjusted::OldDistanceThreshold, + pub new_distance_threshold: distance_threshold_adjusted::NewDistanceThreshold, + pub observed_block_time: distance_threshold_adjusted::ObservedBlockTime, } - pub mod dispatched_as { + pub mod distance_threshold_adjusted { use super::runtime_types; - pub type Result = - ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>; + pub type OldDistanceThreshold = runtime_types::primitive_types::U512; + pub type NewDistanceThreshold = runtime_types::primitive_types::U512; + pub type ObservedBlockTime = ::core::primitive::u64; } - impl ::subxt::ext::subxt_core::events::StaticEvent for DispatchedAs { - const PALLET: &'static str = "Utility"; - const EVENT: &'static str = "DispatchedAs"; + impl ::subxt::ext::subxt_core::events::StaticEvent for DistanceThresholdAdjusted { + const PALLET: &'static str = "QPoW"; + const EVENT: &'static str = "DistanceThresholdAdjusted"; } } - pub mod constants { + pub mod storage { use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " The limit on the number of batched calls."] - pub fn batched_calls_limit( - &self, - ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< - ::core::primitive::u32, - > { - ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "Utility", - "batched_calls_limit", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, - ], - ) - } - } - } - } - pub mod referenda { - use super::{root_mod, runtime_types}; - #[doc = "The `Error` enum of this pallet."] - pub type Error = runtime_types::pallet_referenda::pallet::Error; - #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] - pub type Call = runtime_types::pallet_referenda::pallet::Call; - pub mod calls { - use super::{root_mod, runtime_types}; - type DispatchError = runtime_types::sp_runtime::DispatchError; pub mod types { use super::runtime_types; - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Propose a referendum on a privileged action."] - #[doc = ""] - #[doc = "- `origin`: must be `SubmitOrigin` and the account must have `SubmissionDeposit` funds"] - #[doc = " available."] - #[doc = "- `proposal_origin`: The origin from which the proposal should be executed."] - #[doc = "- `proposal`: The proposal."] - #[doc = "- `enactment_moment`: The moment that the proposal should be enacted."] - #[doc = ""] - #[doc = "Emits `Submitted`."] - pub struct Submit { - pub proposal_origin: - ::subxt::ext::subxt_core::alloc::boxed::Box, - pub proposal: submit::Proposal, - pub enactment_moment: submit::EnactmentMoment, - } - pub mod submit { + pub mod block_distance_thresholds { use super::runtime_types; - pub type ProposalOrigin = runtime_types::quantus_runtime::OriginCaller; - pub type Proposal = runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::quantus_runtime::RuntimeCall, - runtime_types::poseidon_resonance::PoseidonHasher, - >; - pub type EnactmentMoment = - runtime_types::frame_support::traits::schedule::DispatchTime< - ::core::primitive::u32, - >; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for Submit { - const PALLET: &'static str = "Referenda"; - const CALL: &'static str = "submit"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Post the Decision Deposit for a referendum."] - #[doc = ""] - #[doc = "- `origin`: must be `Signed` and the account must have funds available for the"] - #[doc = " referendum's track's Decision Deposit."] - #[doc = "- `index`: The index of the submitted referendum whose Decision Deposit is yet to be"] - #[doc = " posted."] - #[doc = ""] - #[doc = "Emits `DecisionDepositPlaced`."] - pub struct PlaceDecisionDeposit { - pub index: place_decision_deposit::Index, + pub type BlockDistanceThresholds = runtime_types::primitive_types::U512; + pub type Param0 = ::core::primitive::u32; } - pub mod place_decision_deposit { + pub mod last_block_time { use super::runtime_types; - pub type Index = ::core::primitive::u32; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for PlaceDecisionDeposit { - const PALLET: &'static str = "Referenda"; - const CALL: &'static str = "place_decision_deposit"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Refund the Decision Deposit for a closed referendum back to the depositor."] - #[doc = ""] - #[doc = "- `origin`: must be `Signed` or `Root`."] - #[doc = "- `index`: The index of a closed referendum whose Decision Deposit has not yet been"] - #[doc = " refunded."] - #[doc = ""] - #[doc = "Emits `DecisionDepositRefunded`."] - pub struct RefundDecisionDeposit { - pub index: refund_decision_deposit::Index, + pub type LastBlockTime = ::core::primitive::u64; } - pub mod refund_decision_deposit { + pub mod last_block_duration { use super::runtime_types; - pub type Index = ::core::primitive::u32; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for RefundDecisionDeposit { - const PALLET: &'static str = "Referenda"; - const CALL: &'static str = "refund_decision_deposit"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Cancel an ongoing referendum."] - #[doc = ""] - #[doc = "- `origin`: must be the `CancelOrigin`."] - #[doc = "- `index`: The index of the referendum to be cancelled."] - #[doc = ""] - #[doc = "Emits `Cancelled`."] - pub struct Cancel { - pub index: cancel::Index, + pub type LastBlockDuration = ::core::primitive::u64; } - pub mod cancel { + pub mod current_distance_threshold { use super::runtime_types; - pub type Index = ::core::primitive::u32; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for Cancel { - const PALLET: &'static str = "Referenda"; - const CALL: &'static str = "cancel"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Cancel an ongoing referendum and slash the deposits."] - #[doc = ""] - #[doc = "- `origin`: must be the `KillOrigin`."] - #[doc = "- `index`: The index of the referendum to be cancelled."] - #[doc = ""] - #[doc = "Emits `Killed` and `DepositSlashed`."] - pub struct Kill { - pub index: kill::Index, + pub type CurrentDistanceThreshold = runtime_types::primitive_types::U512; } - pub mod kill { + pub mod total_work { use super::runtime_types; - pub type Index = ::core::primitive::u32; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for Kill { - const PALLET: &'static str = "Referenda"; - const CALL: &'static str = "kill"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Advance a referendum onto its next logical state. Only used internally."] - #[doc = ""] - #[doc = "- `origin`: must be `Root`."] - #[doc = "- `index`: the referendum to be advanced."] - pub struct NudgeReferendum { - pub index: nudge_referendum::Index, + pub type TotalWork = runtime_types::primitive_types::U512; } - pub mod nudge_referendum { + pub mod blocks_in_period { use super::runtime_types; - pub type Index = ::core::primitive::u32; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for NudgeReferendum { - const PALLET: &'static str = "Referenda"; - const CALL: &'static str = "nudge_referendum"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Advance a track onto its next logical state. Only used internally."] - #[doc = ""] - #[doc = "- `origin`: must be `Root`."] - #[doc = "- `track`: the track to be advanced."] - #[doc = ""] - #[doc = "Action item for when there is now one fewer referendum in the deciding phase and the"] - #[doc = "`DecidingCount` is not yet updated. This means that we should either:"] - #[doc = "- begin deciding another referendum (and leave `DecidingCount` alone); or"] - #[doc = "- decrement `DecidingCount`."] - pub struct OneFewerDeciding { - pub track: one_fewer_deciding::Track, + pub type BlocksInPeriod = ::core::primitive::u32; } - pub mod one_fewer_deciding { + pub mod block_time_history { use super::runtime_types; - pub type Track = ::core::primitive::u16; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for OneFewerDeciding { - const PALLET: &'static str = "Referenda"; - const CALL: &'static str = "one_fewer_deciding"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Refund the Submission Deposit for a closed referendum back to the depositor."] - #[doc = ""] - #[doc = "- `origin`: must be `Signed` or `Root`."] - #[doc = "- `index`: The index of a closed referendum whose Submission Deposit has not yet been"] - #[doc = " refunded."] - #[doc = ""] - #[doc = "Emits `SubmissionDepositRefunded`."] - pub struct RefundSubmissionDeposit { - pub index: refund_submission_deposit::Index, + pub type BlockTimeHistory = ::core::primitive::u64; + pub type Param0 = ::core::primitive::u32; } - pub mod refund_submission_deposit { + pub mod history_index { use super::runtime_types; - pub type Index = ::core::primitive::u32; + pub type HistoryIndex = ::core::primitive::u32; } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for RefundSubmissionDeposit { - const PALLET: &'static str = "Referenda"; - const CALL: &'static str = "refund_submission_deposit"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Set or clear metadata of a referendum."] - #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `origin`: Must be `Signed` by a creator of a referendum or by anyone to clear a"] - #[doc = " metadata of a finished referendum."] - #[doc = "- `index`: The index of a referendum to set or clear metadata for."] - #[doc = "- `maybe_hash`: The hash of an on-chain stored preimage. `None` to clear a metadata."] - pub struct SetMetadata { - pub index: set_metadata::Index, - pub maybe_hash: set_metadata::MaybeHash, - } - pub mod set_metadata { - use super::runtime_types; - pub type Index = ::core::primitive::u32; - pub type MaybeHash = - ::core::option::Option<::subxt::ext::subxt_core::utils::H256>; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for SetMetadata { - const PALLET: &'static str = "Referenda"; - const CALL: &'static str = "set_metadata"; + pub mod history_size { + use super::runtime_types; + pub type HistorySize = ::core::primitive::u32; } } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Propose a referendum on a privileged action."] - #[doc = ""] - #[doc = "- `origin`: must be `SubmitOrigin` and the account must have `SubmissionDeposit` funds"] - #[doc = " available."] - #[doc = "- `proposal_origin`: The origin from which the proposal should be executed."] - #[doc = "- `proposal`: The proposal."] - #[doc = "- `enactment_moment`: The moment that the proposal should be enacted."] - #[doc = ""] - #[doc = "Emits `Submitted`."] - pub fn submit( + pub struct StorageApi; + impl StorageApi { + pub fn block_distance_thresholds_iter( &self, - proposal_origin: types::submit::ProposalOrigin, - proposal: types::submit::Proposal, - enactment_moment: types::submit::EnactmentMoment, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Referenda", - "submit", - types::Submit { - proposal_origin: ::subxt::ext::subxt_core::alloc::boxed::Box::new( - proposal_origin, - ), - proposal, - enactment_moment, - }, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::block_distance_thresholds::BlockDistanceThresholds, + (), + ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "QPoW", + "BlockDistanceThresholds", + (), [ - 140u8, 121u8, 244u8, 4u8, 5u8, 245u8, 133u8, 203u8, 193u8, 24u8, 133u8, - 222u8, 208u8, 74u8, 248u8, 59u8, 153u8, 154u8, 194u8, 226u8, 101u8, - 232u8, 174u8, 79u8, 177u8, 183u8, 39u8, 178u8, 178u8, 229u8, 0u8, - 188u8, + 245u8, 88u8, 219u8, 50u8, 137u8, 246u8, 187u8, 252u8, 181u8, 133u8, + 227u8, 54u8, 166u8, 201u8, 139u8, 81u8, 223u8, 125u8, 243u8, 78u8, 5u8, + 216u8, 42u8, 222u8, 152u8, 140u8, 234u8, 243u8, 47u8, 240u8, 251u8, + 220u8, ], ) } - #[doc = "Post the Decision Deposit for a referendum."] - #[doc = ""] - #[doc = "- `origin`: must be `Signed` and the account must have funds available for the"] - #[doc = " referendum's track's Decision Deposit."] - #[doc = "- `index`: The index of the submitted referendum whose Decision Deposit is yet to be"] - #[doc = " posted."] - #[doc = ""] - #[doc = "Emits `DecisionDepositPlaced`."] - pub fn place_decision_deposit( + pub fn block_distance_thresholds( &self, - index: types::place_decision_deposit::Index, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload - { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Referenda", - "place_decision_deposit", - types::PlaceDecisionDeposit { index }, + _0: types::block_distance_thresholds::Param0, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + ::subxt::ext::subxt_core::storage::address::StaticStorageKey< + types::block_distance_thresholds::Param0, + >, + types::block_distance_thresholds::BlockDistanceThresholds, + ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, + (), + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "QPoW", + "BlockDistanceThresholds", + ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), [ - 247u8, 158u8, 55u8, 191u8, 188u8, 200u8, 3u8, 47u8, 20u8, 175u8, 86u8, - 203u8, 52u8, 253u8, 91u8, 131u8, 21u8, 213u8, 56u8, 68u8, 40u8, 84u8, - 184u8, 30u8, 9u8, 193u8, 63u8, 182u8, 178u8, 241u8, 247u8, 220u8, + 245u8, 88u8, 219u8, 50u8, 137u8, 246u8, 187u8, 252u8, 181u8, 133u8, + 227u8, 54u8, 166u8, 201u8, 139u8, 81u8, 223u8, 125u8, 243u8, 78u8, 5u8, + 216u8, 42u8, 222u8, 152u8, 140u8, 234u8, 243u8, 47u8, 240u8, 251u8, + 220u8, ], ) } - #[doc = "Refund the Decision Deposit for a closed referendum back to the depositor."] - #[doc = ""] - #[doc = "- `origin`: must be `Signed` or `Root`."] - #[doc = "- `index`: The index of a closed referendum whose Decision Deposit has not yet been"] - #[doc = " refunded."] - #[doc = ""] - #[doc = "Emits `DecisionDepositRefunded`."] - pub fn refund_decision_deposit( + pub fn last_block_time( &self, - index: types::refund_decision_deposit::Index, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload< - types::RefundDecisionDeposit, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::last_block_time::LastBlockTime, + ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, + (), > { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Referenda", - "refund_decision_deposit", - types::RefundDecisionDeposit { index }, + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "QPoW", + "LastBlockTime", + (), [ - 159u8, 19u8, 35u8, 216u8, 114u8, 105u8, 18u8, 42u8, 148u8, 151u8, - 136u8, 92u8, 117u8, 30u8, 29u8, 41u8, 238u8, 58u8, 195u8, 91u8, 115u8, - 135u8, 96u8, 99u8, 154u8, 233u8, 8u8, 249u8, 145u8, 165u8, 77u8, 164u8, + 239u8, 229u8, 252u8, 169u8, 178u8, 1u8, 146u8, 236u8, 50u8, 59u8, + 221u8, 169u8, 107u8, 168u8, 203u8, 103u8, 252u8, 189u8, 52u8, 64u8, + 235u8, 110u8, 164u8, 100u8, 85u8, 66u8, 202u8, 71u8, 189u8, 18u8, 4u8, + 217u8, ], ) } - #[doc = "Cancel an ongoing referendum."] - #[doc = ""] - #[doc = "- `origin`: must be the `CancelOrigin`."] - #[doc = "- `index`: The index of the referendum to be cancelled."] - #[doc = ""] - #[doc = "Emits `Cancelled`."] - pub fn cancel( + pub fn last_block_duration( &self, - index: types::cancel::Index, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Referenda", - "cancel", - types::Cancel { index }, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::last_block_duration::LastBlockDuration, + ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, + (), + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "QPoW", + "LastBlockDuration", + (), [ - 55u8, 206u8, 119u8, 156u8, 238u8, 165u8, 193u8, 73u8, 242u8, 13u8, - 212u8, 75u8, 136u8, 156u8, 151u8, 14u8, 35u8, 41u8, 156u8, 107u8, 60u8, - 190u8, 39u8, 216u8, 8u8, 74u8, 213u8, 130u8, 160u8, 131u8, 237u8, - 122u8, + 44u8, 139u8, 180u8, 95u8, 43u8, 58u8, 255u8, 71u8, 201u8, 240u8, 61u8, + 131u8, 214u8, 202u8, 118u8, 157u8, 21u8, 52u8, 154u8, 123u8, 253u8, + 160u8, 68u8, 100u8, 91u8, 196u8, 168u8, 14u8, 84u8, 60u8, 160u8, 229u8, ], ) } - #[doc = "Cancel an ongoing referendum and slash the deposits."] - #[doc = ""] - #[doc = "- `origin`: must be the `KillOrigin`."] - #[doc = "- `index`: The index of the referendum to be cancelled."] - #[doc = ""] - #[doc = "Emits `Killed` and `DepositSlashed`."] - pub fn kill( + pub fn current_distance_threshold( &self, - index: types::kill::Index, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Referenda", - "kill", - types::Kill { index }, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::current_distance_threshold::CurrentDistanceThreshold, + ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, + (), + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "QPoW", + "CurrentDistanceThreshold", + (), [ - 50u8, 89u8, 57u8, 0u8, 87u8, 129u8, 113u8, 140u8, 179u8, 178u8, 126u8, - 198u8, 92u8, 92u8, 189u8, 64u8, 123u8, 232u8, 57u8, 227u8, 223u8, - 219u8, 73u8, 217u8, 179u8, 44u8, 210u8, 125u8, 180u8, 10u8, 143u8, - 48u8, + 241u8, 84u8, 91u8, 177u8, 115u8, 209u8, 7u8, 88u8, 15u8, 186u8, 180u8, + 244u8, 29u8, 198u8, 42u8, 162u8, 144u8, 70u8, 255u8, 39u8, 235u8, + 121u8, 239u8, 136u8, 137u8, 171u8, 183u8, 245u8, 158u8, 225u8, 244u8, + 147u8, ], ) } - #[doc = "Advance a referendum onto its next logical state. Only used internally."] - #[doc = ""] - #[doc = "- `origin`: must be `Root`."] - #[doc = "- `index`: the referendum to be advanced."] - pub fn nudge_referendum( + pub fn total_work( &self, - index: types::nudge_referendum::Index, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload - { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Referenda", - "nudge_referendum", - types::NudgeReferendum { index }, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::total_work::TotalWork, + ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, + (), + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "QPoW", + "TotalWork", + (), [ - 75u8, 99u8, 172u8, 30u8, 170u8, 150u8, 211u8, 229u8, 249u8, 128u8, - 194u8, 246u8, 100u8, 142u8, 193u8, 184u8, 232u8, 81u8, 29u8, 17u8, - 99u8, 91u8, 236u8, 85u8, 230u8, 226u8, 57u8, 115u8, 45u8, 170u8, 54u8, - 213u8, + 184u8, 29u8, 54u8, 146u8, 220u8, 155u8, 103u8, 67u8, 21u8, 188u8, 53u8, + 160u8, 171u8, 107u8, 52u8, 211u8, 251u8, 52u8, 192u8, 227u8, 150u8, + 156u8, 172u8, 1u8, 233u8, 37u8, 49u8, 13u8, 213u8, 104u8, 10u8, 134u8, ], ) } - #[doc = "Advance a track onto its next logical state. Only used internally."] - #[doc = ""] - #[doc = "- `origin`: must be `Root`."] - #[doc = "- `track`: the track to be advanced."] - #[doc = ""] - #[doc = "Action item for when there is now one fewer referendum in the deciding phase and the"] - #[doc = "`DecidingCount` is not yet updated. This means that we should either:"] - #[doc = "- begin deciding another referendum (and leave `DecidingCount` alone); or"] - #[doc = "- decrement `DecidingCount`."] - pub fn one_fewer_deciding( + pub fn blocks_in_period( &self, - track: types::one_fewer_deciding::Track, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload - { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Referenda", - "one_fewer_deciding", - types::OneFewerDeciding { track }, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::blocks_in_period::BlocksInPeriod, + ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, + (), + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "QPoW", + "BlocksInPeriod", + (), [ - 15u8, 84u8, 79u8, 231u8, 21u8, 239u8, 244u8, 143u8, 183u8, 215u8, - 181u8, 25u8, 225u8, 195u8, 95u8, 171u8, 17u8, 156u8, 182u8, 128u8, - 111u8, 40u8, 151u8, 102u8, 196u8, 55u8, 36u8, 212u8, 89u8, 190u8, - 131u8, 167u8, + 151u8, 58u8, 246u8, 176u8, 204u8, 107u8, 224u8, 209u8, 240u8, 52u8, + 246u8, 45u8, 69u8, 123u8, 23u8, 193u8, 126u8, 200u8, 131u8, 199u8, + 65u8, 39u8, 43u8, 20u8, 18u8, 4u8, 13u8, 120u8, 115u8, 31u8, 204u8, + 134u8, ], ) } - #[doc = "Refund the Submission Deposit for a closed referendum back to the depositor."] - #[doc = ""] - #[doc = "- `origin`: must be `Signed` or `Root`."] - #[doc = "- `index`: The index of a closed referendum whose Submission Deposit has not yet been"] - #[doc = " refunded."] - #[doc = ""] - #[doc = "Emits `SubmissionDepositRefunded`."] - pub fn refund_submission_deposit( + pub fn block_time_history_iter( &self, - index: types::refund_submission_deposit::Index, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload< - types::RefundSubmissionDeposit, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::block_time_history::BlockTimeHistory, + (), + ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, > { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Referenda", - "refund_submission_deposit", - types::RefundSubmissionDeposit { index }, + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "QPoW", + "BlockTimeHistory", + (), [ - 20u8, 217u8, 115u8, 6u8, 1u8, 60u8, 54u8, 136u8, 35u8, 41u8, 38u8, - 23u8, 85u8, 100u8, 141u8, 126u8, 30u8, 160u8, 61u8, 46u8, 134u8, 98u8, - 82u8, 38u8, 211u8, 124u8, 208u8, 222u8, 210u8, 10u8, 155u8, 122u8, + 149u8, 198u8, 140u8, 12u8, 144u8, 112u8, 153u8, 141u8, 207u8, 242u8, + 220u8, 87u8, 63u8, 234u8, 158u8, 87u8, 143u8, 186u8, 111u8, 14u8, 94u8, + 134u8, 215u8, 201u8, 141u8, 196u8, 39u8, 107u8, 113u8, 219u8, 41u8, + 58u8, ], ) } - #[doc = "Set or clear metadata of a referendum."] - #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `origin`: Must be `Signed` by a creator of a referendum or by anyone to clear a"] - #[doc = " metadata of a finished referendum."] - #[doc = "- `index`: The index of a referendum to set or clear metadata for."] - #[doc = "- `maybe_hash`: The hash of an on-chain stored preimage. `None` to clear a metadata."] - pub fn set_metadata( + pub fn block_time_history( &self, - index: types::set_metadata::Index, - maybe_hash: types::set_metadata::MaybeHash, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Referenda", - "set_metadata", - types::SetMetadata { index, maybe_hash }, + _0: types::block_time_history::Param0, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + ::subxt::ext::subxt_core::storage::address::StaticStorageKey< + types::block_time_history::Param0, + >, + types::block_time_history::BlockTimeHistory, + ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, + (), + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "QPoW", + "BlockTimeHistory", + ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), [ - 207u8, 29u8, 146u8, 233u8, 219u8, 205u8, 88u8, 118u8, 106u8, 61u8, - 124u8, 101u8, 2u8, 41u8, 169u8, 70u8, 114u8, 189u8, 162u8, 118u8, 1u8, - 108u8, 234u8, 98u8, 245u8, 245u8, 183u8, 126u8, 89u8, 13u8, 112u8, - 88u8, + 149u8, 198u8, 140u8, 12u8, 144u8, 112u8, 153u8, 141u8, 207u8, 242u8, + 220u8, 87u8, 63u8, 234u8, 158u8, 87u8, 143u8, 186u8, 111u8, 14u8, 94u8, + 134u8, 215u8, 201u8, 141u8, 196u8, 39u8, 107u8, 113u8, 219u8, 41u8, + 58u8, + ], + ) + } + pub fn history_index( + &self, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::history_index::HistoryIndex, + ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, + (), + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "QPoW", + "HistoryIndex", + (), + [ + 86u8, 246u8, 20u8, 135u8, 119u8, 68u8, 164u8, 167u8, 110u8, 235u8, + 121u8, 151u8, 221u8, 179u8, 25u8, 155u8, 187u8, 30u8, 43u8, 45u8, + 220u8, 156u8, 218u8, 20u8, 78u8, 59u8, 41u8, 144u8, 124u8, 166u8, 84u8, + 149u8, + ], + ) + } + pub fn history_size( + &self, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::history_size::HistorySize, + ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, + (), + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "QPoW", + "HistorySize", + (), + [ + 77u8, 208u8, 178u8, 115u8, 101u8, 133u8, 140u8, 3u8, 76u8, 240u8, + 162u8, 223u8, 90u8, 131u8, 243u8, 231u8, 54u8, 101u8, 3u8, 25u8, 126u8, + 93u8, 42u8, 4u8, 82u8, 198u8, 226u8, 198u8, 59u8, 74u8, 205u8, 218u8, ], ) } } } - #[doc = "The `Event` enum of this pallet"] - pub type Event = runtime_types::pallet_referenda::pallet::Event1; - pub mod events { + pub mod constants { use super::runtime_types; - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "A referendum has been submitted."] - pub struct Submitted { - pub index: submitted::Index, - pub track: submitted::Track, - pub proposal: submitted::Proposal, - } - pub mod submitted { - use super::runtime_types; - pub type Index = ::core::primitive::u32; - pub type Track = ::core::primitive::u16; - pub type Proposal = runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::quantus_runtime::RuntimeCall, - runtime_types::poseidon_resonance::PoseidonHasher, - >; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for Submitted { - const PALLET: &'static str = "Referenda"; - const EVENT: &'static str = "Submitted"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "The decision deposit has been placed."] - pub struct DecisionDepositPlaced { - pub index: decision_deposit_placed::Index, - pub who: decision_deposit_placed::Who, - pub amount: decision_deposit_placed::Amount, - } - pub mod decision_deposit_placed { - use super::runtime_types; - pub type Index = ::core::primitive::u32; - pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; - pub type Amount = ::core::primitive::u128; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for DecisionDepositPlaced { - const PALLET: &'static str = "Referenda"; - const EVENT: &'static str = "DecisionDepositPlaced"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "The decision deposit has been refunded."] - pub struct DecisionDepositRefunded { - pub index: decision_deposit_refunded::Index, - pub who: decision_deposit_refunded::Who, - pub amount: decision_deposit_refunded::Amount, - } - pub mod decision_deposit_refunded { - use super::runtime_types; - pub type Index = ::core::primitive::u32; - pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; - pub type Amount = ::core::primitive::u128; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for DecisionDepositRefunded { - const PALLET: &'static str = "Referenda"; - const EVENT: &'static str = "DecisionDepositRefunded"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "A deposit has been slashed."] - pub struct DepositSlashed { - pub who: deposit_slashed::Who, - pub amount: deposit_slashed::Amount, - } - pub mod deposit_slashed { - use super::runtime_types; - pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; - pub type Amount = ::core::primitive::u128; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for DepositSlashed { - const PALLET: &'static str = "Referenda"; - const EVENT: &'static str = "DepositSlashed"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "A referendum has moved into the deciding phase."] - pub struct DecisionStarted { - pub index: decision_started::Index, - pub track: decision_started::Track, - pub proposal: decision_started::Proposal, - pub tally: decision_started::Tally, - } - pub mod decision_started { - use super::runtime_types; - pub type Index = ::core::primitive::u32; - pub type Track = ::core::primitive::u16; - pub type Proposal = runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::quantus_runtime::RuntimeCall, - runtime_types::poseidon_resonance::PoseidonHasher, - >; - pub type Tally = - runtime_types::pallet_conviction_voting::types::Tally<::core::primitive::u128>; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for DecisionStarted { - const PALLET: &'static str = "Referenda"; - const EVENT: &'static str = "DecisionStarted"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - pub struct ConfirmStarted { - pub index: confirm_started::Index, - } - pub mod confirm_started { - use super::runtime_types; - pub type Index = ::core::primitive::u32; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for ConfirmStarted { - const PALLET: &'static str = "Referenda"; - const EVENT: &'static str = "ConfirmStarted"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - pub struct ConfirmAborted { - pub index: confirm_aborted::Index, + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " Pallet's weight info"] + pub fn initial_distance_threshold_exponent( + &self, + ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< + ::core::primitive::u32, + > { + ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( + "QPoW", + "InitialDistanceThresholdExponent", + [ + 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 difficulty_adjust_percent_clamp( + &self, + ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< + ::core::primitive::u8, + > { + ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( + "QPoW", + "DifficultyAdjustPercentClamp", + [ + 141u8, 130u8, 11u8, 35u8, 226u8, 114u8, 92u8, 179u8, 168u8, 110u8, + 28u8, 91u8, 221u8, 64u8, 4u8, 148u8, 201u8, 193u8, 185u8, 66u8, 226u8, + 114u8, 97u8, 79u8, 62u8, 212u8, 202u8, 114u8, 237u8, 228u8, 183u8, + 165u8, + ], + ) + } + pub fn target_block_time( + &self, + ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< + ::core::primitive::u64, + > { + ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( + "QPoW", + "TargetBlockTime", + [ + 128u8, 214u8, 205u8, 242u8, 181u8, 142u8, 124u8, 231u8, 190u8, 146u8, + 59u8, 226u8, 157u8, 101u8, 103u8, 117u8, 249u8, 65u8, 18u8, 191u8, + 103u8, 119u8, 53u8, 85u8, 81u8, 96u8, 220u8, 42u8, 184u8, 239u8, 42u8, + 246u8, + ], + ) + } + pub fn adjustment_period( + &self, + ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< + ::core::primitive::u32, + > { + ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( + "QPoW", + "AdjustmentPeriod", + [ + 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 block_time_history_size( + &self, + ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< + ::core::primitive::u32, + > { + ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( + "QPoW", + "BlockTimeHistorySize", + [ + 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_reorg_depth( + &self, + ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< + ::core::primitive::u32, + > { + ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( + "QPoW", + "MaxReorgDepth", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " Fixed point scale for calculations (default: 10^18)"] + pub fn fixed_u128_scale( + &self, + ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< + ::core::primitive::u128, + > { + ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( + "QPoW", + "FixedU128Scale", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, + 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) + } + #[doc = " Maximum distance threshold multiplier (default: 4)"] + pub fn max_distance_multiplier( + &self, + ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< + ::core::primitive::u32, + > { + ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( + "QPoW", + "MaxDistanceMultiplier", + [ + 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 confirm_aborted { + } + } + pub mod wormhole { + use super::{root_mod, runtime_types}; + #[doc = "The `Error` enum of this pallet."] + pub type Error = runtime_types::pallet_wormhole::pallet::Error; + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub type Call = runtime_types::pallet_wormhole::pallet::Call; + pub mod calls { + use super::{root_mod, runtime_types}; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod types { use super::runtime_types; - pub type Index = ::core::primitive::u32; + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + pub struct VerifyWormholeProof { + pub proof_bytes: verify_wormhole_proof::ProofBytes, + pub block_number: verify_wormhole_proof::BlockNumber, + } + pub mod verify_wormhole_proof { + use super::runtime_types; + pub type ProofBytes = + ::subxt::ext::subxt_core::alloc::vec::Vec<::core::primitive::u8>; + pub type BlockNumber = ::core::primitive::u32; + } + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for VerifyWormholeProof { + const PALLET: &'static str = "Wormhole"; + const CALL: &'static str = "verify_wormhole_proof"; + } } - impl ::subxt::ext::subxt_core::events::StaticEvent for ConfirmAborted { - const PALLET: &'static str = "Referenda"; - const EVENT: &'static str = "ConfirmAborted"; + pub struct TransactionApi; + impl TransactionApi { + pub fn verify_wormhole_proof( + &self, + proof_bytes: types::verify_wormhole_proof::ProofBytes, + block_number: types::verify_wormhole_proof::BlockNumber, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload + { + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "Wormhole", + "verify_wormhole_proof", + types::VerifyWormholeProof { proof_bytes, block_number }, + [ + 243u8, 243u8, 212u8, 153u8, 44u8, 36u8, 106u8, 182u8, 177u8, 104u8, + 202u8, 172u8, 53u8, 111u8, 255u8, 121u8, 131u8, 84u8, 224u8, 250u8, + 104u8, 52u8, 241u8, 228u8, 51u8, 63u8, 233u8, 191u8, 215u8, 100u8, + 166u8, 76u8, + ], + ) + } } + } + #[doc = "The `Event` enum of this pallet"] + pub type Event = runtime_types::pallet_wormhole::pallet::Event; + pub mod events { + use super::runtime_types; #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, @@ -8188,106 +6465,107 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "A referendum has ended its confirmation phase and is ready for approval."] - pub struct Confirmed { - pub index: confirmed::Index, - pub tally: confirmed::Tally, + pub struct ProofVerified { + pub exit_amount: proof_verified::ExitAmount, } - pub mod confirmed { + pub mod proof_verified { use super::runtime_types; - pub type Index = ::core::primitive::u32; - pub type Tally = - runtime_types::pallet_conviction_voting::types::Tally<::core::primitive::u128>; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for Confirmed { - const PALLET: &'static str = "Referenda"; - const EVENT: &'static str = "Confirmed"; + pub type ExitAmount = ::core::primitive::u128; } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "A referendum has been approved and its proposal has been scheduled."] - pub struct Approved { - pub index: approved::Index, + impl ::subxt::ext::subxt_core::events::StaticEvent for ProofVerified { + const PALLET: &'static str = "Wormhole"; + const EVENT: &'static str = "ProofVerified"; } - pub mod approved { + } + pub mod storage { + use super::runtime_types; + pub mod types { use super::runtime_types; - pub type Index = ::core::primitive::u32; + pub mod used_nullifiers { + use super::runtime_types; + pub type UsedNullifiers = ::core::primitive::bool; + pub type Param0 = [::core::primitive::u8; 32usize]; + } } - impl ::subxt::ext::subxt_core::events::StaticEvent for Approved { - const PALLET: &'static str = "Referenda"; - const EVENT: &'static str = "Approved"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "A proposal has been rejected by referendum."] - pub struct Rejected { - pub index: rejected::Index, - pub tally: rejected::Tally, - } - pub mod rejected { - use super::runtime_types; - pub type Index = ::core::primitive::u32; - pub type Tally = - runtime_types::pallet_conviction_voting::types::Tally<::core::primitive::u128>; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for Rejected { - const PALLET: &'static str = "Referenda"; - const EVENT: &'static str = "Rejected"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "A referendum has been timed out without being decided."] - pub struct TimedOut { - pub index: timed_out::Index, - pub tally: timed_out::Tally, - } - pub mod timed_out { - use super::runtime_types; - pub type Index = ::core::primitive::u32; - pub type Tally = - runtime_types::pallet_conviction_voting::types::Tally<::core::primitive::u128>; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for TimedOut { - const PALLET: &'static str = "Referenda"; - const EVENT: &'static str = "TimedOut"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "A referendum has been cancelled."] - pub struct Cancelled { - pub index: cancelled::Index, - pub tally: cancelled::Tally, - } - pub mod cancelled { - use super::runtime_types; - pub type Index = ::core::primitive::u32; - pub type Tally = - runtime_types::pallet_conviction_voting::types::Tally<::core::primitive::u128>; + pub struct StorageApi; + impl StorageApi { + pub fn used_nullifiers_iter( + &self, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::used_nullifiers::UsedNullifiers, + (), + ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "Wormhole", + "UsedNullifiers", + (), + [ + 111u8, 222u8, 249u8, 87u8, 31u8, 249u8, 120u8, 32u8, 221u8, 33u8, 86u8, + 103u8, 116u8, 235u8, 16u8, 191u8, 73u8, 183u8, 183u8, 77u8, 229u8, + 255u8, 221u8, 186u8, 29u8, 179u8, 110u8, 138u8, 146u8, 113u8, 241u8, + 222u8, + ], + ) + } + pub fn used_nullifiers( + &self, + _0: types::used_nullifiers::Param0, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + ::subxt::ext::subxt_core::storage::address::StaticStorageKey< + types::used_nullifiers::Param0, + >, + types::used_nullifiers::UsedNullifiers, + ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, + (), + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "Wormhole", + "UsedNullifiers", + ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), + [ + 111u8, 222u8, 249u8, 87u8, 31u8, 249u8, 120u8, 32u8, 221u8, 33u8, 86u8, + 103u8, 116u8, 235u8, 16u8, 191u8, 73u8, 183u8, 183u8, 77u8, 229u8, + 255u8, 221u8, 186u8, 29u8, 179u8, 110u8, 138u8, 146u8, 113u8, 241u8, + 222u8, + ], + ) + } } - impl ::subxt::ext::subxt_core::events::StaticEvent for Cancelled { - const PALLET: &'static str = "Referenda"; - const EVENT: &'static str = "Cancelled"; + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " Account ID used as the \"from\" account when creating transfer proofs for minted tokens"] + pub fn minting_account( + &self, + ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< + ::subxt::ext::subxt_core::utils::AccountId32, + > { + ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( + "Wormhole", + "MintingAccount", + [ + 115u8, 233u8, 13u8, 223u8, 88u8, 20u8, 202u8, 139u8, 153u8, 28u8, + 155u8, 157u8, 224u8, 66u8, 3u8, 250u8, 23u8, 53u8, 88u8, 168u8, 211u8, + 204u8, 122u8, 166u8, 248u8, 23u8, 174u8, 225u8, 99u8, 108u8, 89u8, + 135u8, + ], + ) + } } + } + } + pub mod mining_rewards { + use super::{root_mod, runtime_types}; + #[doc = "The `Event` enum of this pallet"] + pub type Event = runtime_types::pallet_mining_rewards::pallet::Event; + pub mod events { + use super::runtime_types; #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, @@ -8295,20 +6573,19 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "A referendum has been killed."] - pub struct Killed { - pub index: killed::Index, - pub tally: killed::Tally, + #[doc = "A miner has been identified for a block"] + pub struct MinerRewarded { + pub miner: miner_rewarded::Miner, + pub reward: miner_rewarded::Reward, } - pub mod killed { + pub mod miner_rewarded { use super::runtime_types; - pub type Index = ::core::primitive::u32; - pub type Tally = - runtime_types::pallet_conviction_voting::types::Tally<::core::primitive::u128>; + pub type Miner = ::subxt::ext::subxt_core::utils::AccountId32; + pub type Reward = ::core::primitive::u128; } - impl ::subxt::ext::subxt_core::events::StaticEvent for Killed { - const PALLET: &'static str = "Referenda"; - const EVENT: &'static str = "Killed"; + impl ::subxt::ext::subxt_core::events::StaticEvent for MinerRewarded { + const PALLET: &'static str = "MiningRewards"; + const EVENT: &'static str = "MinerRewarded"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -8317,42 +6594,19 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "The submission deposit has been refunded."] - pub struct SubmissionDepositRefunded { - pub index: submission_deposit_refunded::Index, - pub who: submission_deposit_refunded::Who, - pub amount: submission_deposit_refunded::Amount, + #[doc = "Transaction fees were collected for later distribution"] + pub struct FeesCollected { + pub amount: fees_collected::Amount, + pub total: fees_collected::Total, } - pub mod submission_deposit_refunded { + pub mod fees_collected { use super::runtime_types; - pub type Index = ::core::primitive::u32; - pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; pub type Amount = ::core::primitive::u128; + pub type Total = ::core::primitive::u128; } - impl ::subxt::ext::subxt_core::events::StaticEvent for SubmissionDepositRefunded { - const PALLET: &'static str = "Referenda"; - const EVENT: &'static str = "SubmissionDepositRefunded"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "Metadata for a referendum has been set."] - pub struct MetadataSet { - pub index: metadata_set::Index, - pub hash: metadata_set::Hash, - } - pub mod metadata_set { - use super::runtime_types; - pub type Index = ::core::primitive::u32; - pub type Hash = ::subxt::ext::subxt_core::utils::H256; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for MetadataSet { - const PALLET: &'static str = "Referenda"; - const EVENT: &'static str = "MetadataSet"; + impl ::subxt::ext::subxt_core::events::StaticEvent for FeesCollected { + const PALLET: &'static str = "MiningRewards"; + const EVENT: &'static str = "FeesCollected"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -8361,298 +6615,47 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "Metadata for a referendum has been cleared."] - pub struct MetadataCleared { - pub index: metadata_cleared::Index, - pub hash: metadata_cleared::Hash, + #[doc = "Rewards were sent to Treasury when no miner was specified"] + pub struct TreasuryRewarded { + pub reward: treasury_rewarded::Reward, } - pub mod metadata_cleared { + pub mod treasury_rewarded { use super::runtime_types; - pub type Index = ::core::primitive::u32; - pub type Hash = ::subxt::ext::subxt_core::utils::H256; + pub type Reward = ::core::primitive::u128; } - impl ::subxt::ext::subxt_core::events::StaticEvent for MetadataCleared { - const PALLET: &'static str = "Referenda"; - const EVENT: &'static str = "MetadataCleared"; + impl ::subxt::ext::subxt_core::events::StaticEvent for TreasuryRewarded { + const PALLET: &'static str = "MiningRewards"; + const EVENT: &'static str = "TreasuryRewarded"; } } pub mod storage { use super::runtime_types; pub mod types { use super::runtime_types; - pub mod referendum_count { - use super::runtime_types; - pub type ReferendumCount = ::core::primitive::u32; - } - pub mod referendum_info_for { + pub mod collected_fees { use super::runtime_types; - pub type ReferendumInfoFor = - runtime_types::pallet_referenda::types::ReferendumInfo< - ::core::primitive::u16, - runtime_types::quantus_runtime::OriginCaller, - ::core::primitive::u32, - runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::quantus_runtime::RuntimeCall, - runtime_types::poseidon_resonance::PoseidonHasher, - >, - ::core::primitive::u128, - runtime_types::pallet_conviction_voting::types::Tally< - ::core::primitive::u128, - >, - ::subxt::ext::subxt_core::utils::AccountId32, - ( - runtime_types::qp_scheduler::BlockNumberOrTimestamp< - ::core::primitive::u32, - ::core::primitive::u64, - >, - ::core::primitive::u32, - ), - >; - pub type Param0 = ::core::primitive::u32; - } - pub mod track_queue { - use super::runtime_types; - pub type TrackQueue = - runtime_types::bounded_collections::bounded_vec::BoundedVec<( - ::core::primitive::u32, - ::core::primitive::u128, - )>; - pub type Param0 = ::core::primitive::u16; - } - pub mod deciding_count { - use super::runtime_types; - pub type DecidingCount = ::core::primitive::u32; - pub type Param0 = ::core::primitive::u16; - } - pub mod metadata_of { - use super::runtime_types; - pub type MetadataOf = ::subxt::ext::subxt_core::utils::H256; - pub type Param0 = ::core::primitive::u32; + pub type CollectedFees = ::core::primitive::u128; } } pub struct StorageApi; impl StorageApi { - #[doc = " The next free referendum index, aka the number of referenda started so far."] - pub fn referendum_count( - &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::referendum_count::ReferendumCount, - ::subxt::ext::subxt_core::utils::Yes, - ::subxt::ext::subxt_core::utils::Yes, - (), - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Referenda", - "ReferendumCount", - (), - [ - 64u8, 145u8, 232u8, 153u8, 121u8, 87u8, 128u8, 253u8, 170u8, 192u8, - 139u8, 18u8, 0u8, 33u8, 243u8, 11u8, 238u8, 222u8, 244u8, 5u8, 247u8, - 198u8, 149u8, 31u8, 122u8, 208u8, 86u8, 179u8, 166u8, 167u8, 93u8, - 67u8, - ], - ) - } - #[doc = " Information concerning any given referendum."] - pub fn referendum_info_for_iter( - &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::referendum_info_for::ReferendumInfoFor, - (), - (), - ::subxt::ext::subxt_core::utils::Yes, - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Referenda", - "ReferendumInfoFor", - (), - [ - 150u8, 135u8, 148u8, 14u8, 234u8, 44u8, 147u8, 114u8, 210u8, 214u8, - 53u8, 21u8, 27u8, 74u8, 105u8, 144u8, 164u8, 60u8, 59u8, 206u8, 51u8, - 137u8, 152u8, 240u8, 99u8, 171u8, 224u8, 210u8, 109u8, 85u8, 243u8, - 89u8, - ], - ) - } - #[doc = " Information concerning any given referendum."] - pub fn referendum_info_for( - &self, - _0: types::referendum_info_for::Param0, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::referendum_info_for::Param0, - >, - types::referendum_info_for::ReferendumInfoFor, - ::subxt::ext::subxt_core::utils::Yes, - (), - (), - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Referenda", - "ReferendumInfoFor", - ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), - [ - 150u8, 135u8, 148u8, 14u8, 234u8, 44u8, 147u8, 114u8, 210u8, 214u8, - 53u8, 21u8, 27u8, 74u8, 105u8, 144u8, 164u8, 60u8, 59u8, 206u8, 51u8, - 137u8, 152u8, 240u8, 99u8, 171u8, 224u8, 210u8, 109u8, 85u8, 243u8, - 89u8, - ], - ) - } - #[doc = " The sorted list of referenda ready to be decided but not yet being decided, ordered by"] - #[doc = " conviction-weighted approvals."] - #[doc = ""] - #[doc = " This should be empty if `DecidingCount` is less than `TrackInfo::max_deciding`."] - pub fn track_queue_iter( - &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::track_queue::TrackQueue, - (), - ::subxt::ext::subxt_core::utils::Yes, - ::subxt::ext::subxt_core::utils::Yes, - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Referenda", - "TrackQueue", - (), - [ - 125u8, 59u8, 111u8, 68u8, 27u8, 236u8, 82u8, 55u8, 83u8, 159u8, 105u8, - 20u8, 241u8, 118u8, 58u8, 141u8, 103u8, 60u8, 246u8, 49u8, 121u8, - 183u8, 7u8, 203u8, 225u8, 67u8, 132u8, 79u8, 150u8, 107u8, 71u8, 89u8, - ], - ) - } - #[doc = " The sorted list of referenda ready to be decided but not yet being decided, ordered by"] - #[doc = " conviction-weighted approvals."] - #[doc = ""] - #[doc = " This should be empty if `DecidingCount` is less than `TrackInfo::max_deciding`."] - pub fn track_queue( - &self, - _0: types::track_queue::Param0, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::track_queue::Param0, - >, - types::track_queue::TrackQueue, - ::subxt::ext::subxt_core::utils::Yes, - ::subxt::ext::subxt_core::utils::Yes, - (), - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Referenda", - "TrackQueue", - ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), - [ - 125u8, 59u8, 111u8, 68u8, 27u8, 236u8, 82u8, 55u8, 83u8, 159u8, 105u8, - 20u8, 241u8, 118u8, 58u8, 141u8, 103u8, 60u8, 246u8, 49u8, 121u8, - 183u8, 7u8, 203u8, 225u8, 67u8, 132u8, 79u8, 150u8, 107u8, 71u8, 89u8, - ], - ) - } - #[doc = " The number of referenda being decided currently."] - pub fn deciding_count_iter( + pub fn collected_fees( &self, ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< (), - types::deciding_count::DecidingCount, - (), - ::subxt::ext::subxt_core::utils::Yes, - ::subxt::ext::subxt_core::utils::Yes, - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Referenda", - "DecidingCount", - (), - [ - 203u8, 89u8, 158u8, 179u8, 194u8, 82u8, 248u8, 162u8, 93u8, 140u8, - 146u8, 51u8, 110u8, 232u8, 51u8, 1u8, 128u8, 212u8, 199u8, 14u8, 182u8, - 103u8, 47u8, 252u8, 126u8, 108u8, 166u8, 69u8, 252u8, 179u8, 126u8, - 245u8, - ], - ) - } - #[doc = " The number of referenda being decided currently."] - pub fn deciding_count( - &self, - _0: types::deciding_count::Param0, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::deciding_count::Param0, - >, - types::deciding_count::DecidingCount, + types::collected_fees::CollectedFees, ::subxt::ext::subxt_core::utils::Yes, ::subxt::ext::subxt_core::utils::Yes, (), > { ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Referenda", - "DecidingCount", - ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), - [ - 203u8, 89u8, 158u8, 179u8, 194u8, 82u8, 248u8, 162u8, 93u8, 140u8, - 146u8, 51u8, 110u8, 232u8, 51u8, 1u8, 128u8, 212u8, 199u8, 14u8, 182u8, - 103u8, 47u8, 252u8, 126u8, 108u8, 166u8, 69u8, 252u8, 179u8, 126u8, - 245u8, - ], - ) - } - #[doc = " The metadata is a general information concerning the referendum."] - #[doc = " The `Hash` refers to the preimage of the `Preimages` provider which can be a JSON"] - #[doc = " dump or IPFS hash of a JSON file."] - #[doc = ""] - #[doc = " Consider a garbage collection for a metadata of finished referendums to `unrequest` (remove)"] - #[doc = " large preimages."] - pub fn metadata_of_iter( - &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::metadata_of::MetadataOf, - (), - (), - ::subxt::ext::subxt_core::utils::Yes, - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Referenda", - "MetadataOf", + "MiningRewards", + "CollectedFees", (), [ - 159u8, 250u8, 56u8, 189u8, 247u8, 165u8, 206u8, 166u8, 91u8, 139u8, - 124u8, 164u8, 25u8, 246u8, 199u8, 36u8, 159u8, 56u8, 227u8, 136u8, 4u8, - 45u8, 193u8, 72u8, 200u8, 164u8, 39u8, 207u8, 224u8, 124u8, 191u8, - 110u8, - ], - ) - } - #[doc = " The metadata is a general information concerning the referendum."] - #[doc = " The `Hash` refers to the preimage of the `Preimages` provider which can be a JSON"] - #[doc = " dump or IPFS hash of a JSON file."] - #[doc = ""] - #[doc = " Consider a garbage collection for a metadata of finished referendums to `unrequest` (remove)"] - #[doc = " large preimages."] - pub fn metadata_of( - &self, - _0: types::metadata_of::Param0, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::metadata_of::Param0, - >, - types::metadata_of::MetadataOf, - ::subxt::ext::subxt_core::utils::Yes, - (), - (), - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Referenda", - "MetadataOf", - ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), - [ - 159u8, 250u8, 56u8, 189u8, 247u8, 165u8, 206u8, 166u8, 91u8, 139u8, - 124u8, 164u8, 25u8, 246u8, 199u8, 36u8, 159u8, 56u8, 227u8, 136u8, 4u8, - 45u8, 193u8, 72u8, 200u8, 164u8, 39u8, 207u8, 224u8, 124u8, 191u8, - 110u8, + 136u8, 52u8, 218u8, 204u8, 2u8, 250u8, 34u8, 8u8, 16u8, 23u8, 171u8, + 3u8, 253u8, 35u8, 59u8, 7u8, 167u8, 227u8, 86u8, 15u8, 155u8, 14u8, + 139u8, 44u8, 208u8, 108u8, 85u8, 131u8, 170u8, 37u8, 211u8, 211u8, ], ) } @@ -8662,15 +6665,15 @@ pub mod api { use super::runtime_types; pub struct ConstantsApi; impl ConstantsApi { - #[doc = " The minimum amount to be used as a deposit for a public referendum proposal."] - pub fn submission_deposit( + #[doc = " The base block reward given to miners"] + pub fn miner_block_reward( &self, ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< ::core::primitive::u128, > { ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "Referenda", - "SubmissionDeposit", + "MiningRewards", + "MinerBlockReward", [ 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, @@ -8678,92 +6681,64 @@ pub mod api { ], ) } - #[doc = " Maximum size of the referendum queue for a single track."] - pub fn max_queued( + #[doc = " The base block reward given to treasury"] + pub fn treasury_block_reward( &self, ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< - ::core::primitive::u32, + ::core::primitive::u128, > { ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "Referenda", - "MaxQueued", + "MiningRewards", + "TreasuryBlockReward", [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, + 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, ], ) } - #[doc = " The number of blocks after submission that a referendum must begin being decided by."] - #[doc = " Once this passes, then anyone may cancel the referendum."] - pub fn undeciding_timeout( - &self, - ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< - ::core::primitive::u32, - > { - ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "Referenda", - "UndecidingTimeout", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, - ], - ) - } - #[doc = " Quantization level for the referendum wakeup scheduler. A higher number will result in"] - #[doc = " fewer storage reads/writes needed for smaller voters, but also result in delays to the"] - #[doc = " automatic referendum status changes. Explicit servicing instructions are unaffected."] - pub fn alarm_interval( + #[doc = " The treasury pallet ID"] + pub fn treasury_pallet_id( &self, ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< - ::core::primitive::u32, + runtime_types::frame_support::PalletId, > { ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "Referenda", - "AlarmInterval", + "MiningRewards", + "TreasuryPalletId", [ - 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, + 56u8, 243u8, 53u8, 83u8, 154u8, 179u8, 170u8, 80u8, 133u8, 173u8, 61u8, + 161u8, 47u8, 225u8, 146u8, 21u8, 50u8, 229u8, 248u8, 27u8, 104u8, 58u8, + 129u8, 197u8, 102u8, 160u8, 168u8, 205u8, 154u8, 42u8, 217u8, 53u8, ], ) } - #[doc = " Information concerning the different referendum tracks."] - pub fn tracks( + #[doc = " Account ID used as the \"from\" account when creating transfer proofs for minted tokens"] + pub fn minting_account( &self, ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< - ::subxt::ext::subxt_core::alloc::vec::Vec<( - ::core::primitive::u16, - runtime_types::pallet_referenda::types::TrackInfo< - ::core::primitive::u128, - ::core::primitive::u32, - >, - )>, + ::subxt::ext::subxt_core::utils::AccountId32, > { ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "Referenda", - "Tracks", + "MiningRewards", + "MintingAccount", [ - 35u8, 226u8, 207u8, 234u8, 184u8, 139u8, 187u8, 184u8, 128u8, 199u8, - 227u8, 15u8, 31u8, 196u8, 5u8, 207u8, 138u8, 174u8, 130u8, 201u8, - 200u8, 113u8, 86u8, 93u8, 221u8, 243u8, 229u8, 24u8, 18u8, 150u8, 56u8, - 159u8, + 115u8, 233u8, 13u8, 223u8, 88u8, 20u8, 202u8, 139u8, 153u8, 28u8, + 155u8, 157u8, 224u8, 66u8, 3u8, 250u8, 23u8, 53u8, 88u8, 168u8, 211u8, + 204u8, 122u8, 166u8, 248u8, 23u8, 174u8, 225u8, 99u8, 108u8, 89u8, + 135u8, ], ) } } } } - pub mod reversible_transfers { + pub mod vesting { use super::{root_mod, runtime_types}; - #[doc = "The `Error` enum of this pallet."] - pub type Error = runtime_types::pallet_reversible_transfers::pallet::Error; + #[doc = "Error for the vesting pallet."] + pub type Error = runtime_types::pallet_vesting::pallet::Error; #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] - pub type Call = runtime_types::pallet_reversible_transfers::pallet::Call; + pub type Call = runtime_types::pallet_vesting::pallet::Call; pub mod calls { use super::{root_mod, runtime_types}; type DispatchError = runtime_types::sp_runtime::DispatchError; @@ -8780,26 +6755,19 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Enable high-security for the calling account with a specified delay"] + #[doc = "Unlock any vested funds of the sender account."] #[doc = ""] - #[doc = "- `delay`: The time (in milliseconds) after submission before the transaction executes."] - pub struct SetHighSecurity { - pub delay: set_high_security::Delay, - pub interceptor: set_high_security::Interceptor, - pub recoverer: set_high_security::Recoverer, - } - pub mod set_high_security { - use super::runtime_types; - pub type Delay = runtime_types::qp_scheduler::BlockNumberOrTimestamp< - ::core::primitive::u32, - ::core::primitive::u64, - >; - pub type Interceptor = ::subxt::ext::subxt_core::utils::AccountId32; - pub type Recoverer = ::subxt::ext::subxt_core::utils::AccountId32; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for SetHighSecurity { - const PALLET: &'static str = "ReversibleTransfers"; - const CALL: &'static str = "set_high_security"; + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have funds still"] + #[doc = "locked under this pallet."] + #[doc = ""] + #[doc = "Emits either `VestingCompleted` or `VestingUpdated`."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(1)`."] + pub struct Vest; + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for Vest { + const PALLET: &'static str = "Vesting"; + const CALL: &'static str = "vest"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -8812,19 +6780,30 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Cancel a pending reversible transaction scheduled by the caller."] + #[doc = "Unlock any vested funds of a `target` account."] #[doc = ""] - #[doc = "- `tx_id`: The unique identifier of the transaction to cancel."] - pub struct Cancel { - pub tx_id: cancel::TxId, + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "- `target`: The account whose vested funds should be unlocked. Must have funds still"] + #[doc = "locked under this pallet."] + #[doc = ""] + #[doc = "Emits either `VestingCompleted` or `VestingUpdated`."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(1)`."] + pub struct VestOther { + pub target: vest_other::Target, } - pub mod cancel { + pub mod vest_other { use super::runtime_types; - pub type TxId = ::subxt::ext::subxt_core::utils::H256; + pub type Target = ::subxt::ext::subxt_core::utils::MultiAddress< + ::subxt::ext::subxt_core::utils::AccountId32, + (), + >; } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for Cancel { - const PALLET: &'static str = "ReversibleTransfers"; - const CALL: &'static str = "cancel"; + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for VestOther { + const PALLET: &'static str = "Vesting"; + const CALL: &'static str = "vest_other"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -8837,19 +6816,37 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Called by the Scheduler to finalize the scheduled task/call"] + #[doc = "Create a vested transfer."] #[doc = ""] - #[doc = "- `tx_id`: The unique id of the transaction to finalize and dispatch."] - pub struct ExecuteTransfer { - pub tx_id: execute_transfer::TxId, + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "- `target`: The account receiving the vested funds."] + #[doc = "- `schedule`: The vesting schedule attached to the transfer."] + #[doc = ""] + #[doc = "Emits `VestingCreated`."] + #[doc = ""] + #[doc = "NOTE: This will unlock all schedules through the current block."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(1)`."] + pub struct VestedTransfer { + pub target: vested_transfer::Target, + pub schedule: vested_transfer::Schedule, } - pub mod execute_transfer { + pub mod vested_transfer { use super::runtime_types; - pub type TxId = ::subxt::ext::subxt_core::utils::H256; + pub type Target = ::subxt::ext::subxt_core::utils::MultiAddress< + ::subxt::ext::subxt_core::utils::AccountId32, + (), + >; + pub type Schedule = runtime_types::pallet_vesting::vesting_info::VestingInfo< + ::core::primitive::u128, + ::core::primitive::u32, + >; } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for ExecuteTransfer { - const PALLET: &'static str = "ReversibleTransfers"; - const CALL: &'static str = "execute_transfer"; + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for VestedTransfer { + const PALLET: &'static str = "Vesting"; + const CALL: &'static str = "vested_transfer"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -8862,22 +6859,43 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Schedule a transaction for delayed execution."] - pub struct ScheduleTransfer { - pub dest: schedule_transfer::Dest, - pub amount: schedule_transfer::Amount, + #[doc = "Force a vested transfer."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Root_."] + #[doc = ""] + #[doc = "- `source`: The account whose funds should be transferred."] + #[doc = "- `target`: The account that should be transferred the vested funds."] + #[doc = "- `schedule`: The vesting schedule attached to the transfer."] + #[doc = ""] + #[doc = "Emits `VestingCreated`."] + #[doc = ""] + #[doc = "NOTE: This will unlock all schedules through the current block."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(1)`."] + pub struct ForceVestedTransfer { + pub source: force_vested_transfer::Source, + pub target: force_vested_transfer::Target, + pub schedule: force_vested_transfer::Schedule, } - pub mod schedule_transfer { + pub mod force_vested_transfer { use super::runtime_types; - pub type Dest = ::subxt::ext::subxt_core::utils::MultiAddress< + pub type Source = ::subxt::ext::subxt_core::utils::MultiAddress< ::subxt::ext::subxt_core::utils::AccountId32, (), >; - pub type Amount = ::core::primitive::u128; + pub type Target = ::subxt::ext::subxt_core::utils::MultiAddress< + ::subxt::ext::subxt_core::utils::AccountId32, + (), + >; + pub type Schedule = runtime_types::pallet_vesting::vesting_info::VestingInfo< + ::core::primitive::u128, + ::core::primitive::u32, + >; } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for ScheduleTransfer { - const PALLET: &'static str = "ReversibleTransfers"; - const CALL: &'static str = "schedule_transfer"; + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for ForceVestedTransfer { + const PALLET: &'static str = "Vesting"; + const CALL: &'static str = "force_vested_transfer"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -8890,144 +6908,255 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Schedule a transaction for delayed execution with a custom, one-time delay."] + #[doc = "Merge two vesting schedules together, creating a new vesting schedule that unlocks over"] + #[doc = "the highest possible start and end blocks. If both schedules have already started the"] + #[doc = "current block will be used as the schedule start; with the caveat that if one schedule"] + #[doc = "is finished by the current block, the other will be treated as the new merged schedule,"] + #[doc = "unmodified."] #[doc = ""] - #[doc = "This can only be used by accounts that have *not* set up a persistent"] - #[doc = "reversibility configuration with `set_reversibility`."] + #[doc = "NOTE: If `schedule1_index == schedule2_index` this is a no-op."] + #[doc = "NOTE: This will unlock all schedules through the current block prior to merging."] + #[doc = "NOTE: If both schedules have ended by the current block, no new schedule will be created"] + #[doc = "and both will be removed."] #[doc = ""] - #[doc = "- `delay`: The time (in blocks or milliseconds) before the transaction executes."] - pub struct ScheduleTransferWithDelay { - pub dest: schedule_transfer_with_delay::Dest, - pub amount: schedule_transfer_with_delay::Amount, - pub delay: schedule_transfer_with_delay::Delay, + #[doc = "Merged schedule attributes:"] + #[doc = "- `starting_block`: `MAX(schedule1.starting_block, scheduled2.starting_block,"] + #[doc = " current_block)`."] + #[doc = "- `ending_block`: `MAX(schedule1.ending_block, schedule2.ending_block)`."] + #[doc = "- `locked`: `schedule1.locked_at(current_block) + schedule2.locked_at(current_block)`."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "- `schedule1_index`: index of the first schedule to merge."] + #[doc = "- `schedule2_index`: index of the second schedule to merge."] + pub struct MergeSchedules { + pub schedule1_index: merge_schedules::Schedule1Index, + pub schedule2_index: merge_schedules::Schedule2Index, } - pub mod schedule_transfer_with_delay { + pub mod merge_schedules { use super::runtime_types; - pub type Dest = ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >; - pub type Amount = ::core::primitive::u128; - pub type Delay = runtime_types::qp_scheduler::BlockNumberOrTimestamp< - ::core::primitive::u32, - ::core::primitive::u64, - >; + pub type Schedule1Index = ::core::primitive::u32; + pub type Schedule2Index = ::core::primitive::u32; } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for ScheduleTransferWithDelay { - const PALLET: &'static str = "ReversibleTransfers"; - const CALL: &'static str = "schedule_transfer_with_delay"; + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for MergeSchedules { + const PALLET: &'static str = "Vesting"; + const CALL: &'static str = "merge_schedules"; } - } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Enable high-security for the calling account with a specified delay"] - #[doc = ""] - #[doc = "- `delay`: The time (in milliseconds) after submission before the transaction executes."] - pub fn set_high_security( + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "Force remove a vesting schedule"] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Root_."] + #[doc = ""] + #[doc = "- `target`: An account that has a vesting schedule"] + #[doc = "- `schedule_index`: The vesting schedule index that should be removed"] + pub struct ForceRemoveVestingSchedule { + pub target: force_remove_vesting_schedule::Target, + pub schedule_index: force_remove_vesting_schedule::ScheduleIndex, + } + pub mod force_remove_vesting_schedule { + use super::runtime_types; + pub type Target = ::subxt::ext::subxt_core::utils::MultiAddress< + ::subxt::ext::subxt_core::utils::AccountId32, + (), + >; + pub type ScheduleIndex = ::core::primitive::u32; + } + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for ForceRemoveVestingSchedule { + const PALLET: &'static str = "Vesting"; + const CALL: &'static str = "force_remove_vesting_schedule"; + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Unlock any vested funds of the sender account."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have funds still"] + #[doc = "locked under this pallet."] + #[doc = ""] + #[doc = "Emits either `VestingCompleted` or `VestingUpdated`."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(1)`."] + pub fn vest( &self, - delay: types::set_high_security::Delay, - interceptor: types::set_high_security::Interceptor, - recoverer: types::set_high_security::Recoverer, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload - { + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "ReversibleTransfers", - "set_high_security", - types::SetHighSecurity { delay, interceptor, recoverer }, + "Vesting", + "vest", + types::Vest {}, [ - 84u8, 79u8, 110u8, 9u8, 173u8, 78u8, 144u8, 58u8, 220u8, 161u8, 42u8, - 121u8, 88u8, 168u8, 178u8, 42u8, 29u8, 253u8, 161u8, 83u8, 45u8, 204u8, - 155u8, 136u8, 209u8, 33u8, 200u8, 13u8, 46u8, 162u8, 223u8, 171u8, + 149u8, 89u8, 178u8, 148u8, 127u8, 127u8, 155u8, 60u8, 114u8, 126u8, + 204u8, 123u8, 166u8, 70u8, 104u8, 208u8, 186u8, 69u8, 139u8, 181u8, + 151u8, 154u8, 235u8, 161u8, 191u8, 35u8, 111u8, 60u8, 21u8, 165u8, + 44u8, 122u8, ], ) } - #[doc = "Cancel a pending reversible transaction scheduled by the caller."] + #[doc = "Unlock any vested funds of a `target` account."] #[doc = ""] - #[doc = "- `tx_id`: The unique identifier of the transaction to cancel."] - pub fn cancel( + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "- `target`: The account whose vested funds should be unlocked. Must have funds still"] + #[doc = "locked under this pallet."] + #[doc = ""] + #[doc = "Emits either `VestingCompleted` or `VestingUpdated`."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(1)`."] + pub fn vest_other( &self, - tx_id: types::cancel::TxId, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { + target: types::vest_other::Target, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "ReversibleTransfers", - "cancel", - types::Cancel { tx_id }, + "Vesting", + "vest_other", + types::VestOther { target }, [ - 228u8, 150u8, 194u8, 119u8, 243u8, 126u8, 112u8, 227u8, 70u8, 160u8, - 132u8, 82u8, 146u8, 162u8, 195u8, 149u8, 236u8, 98u8, 18u8, 44u8, - 151u8, 249u8, 193u8, 176u8, 186u8, 98u8, 224u8, 103u8, 191u8, 165u8, - 37u8, 47u8, + 238u8, 92u8, 25u8, 149u8, 27u8, 211u8, 196u8, 31u8, 211u8, 28u8, 241u8, + 30u8, 128u8, 35u8, 0u8, 227u8, 202u8, 215u8, 186u8, 69u8, 216u8, 110u8, + 199u8, 120u8, 134u8, 141u8, 176u8, 224u8, 234u8, 42u8, 152u8, 128u8, ], ) } - #[doc = "Called by the Scheduler to finalize the scheduled task/call"] + #[doc = "Create a vested transfer."] #[doc = ""] - #[doc = "- `tx_id`: The unique id of the transaction to finalize and dispatch."] - pub fn execute_transfer( + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "- `target`: The account receiving the vested funds."] + #[doc = "- `schedule`: The vesting schedule attached to the transfer."] + #[doc = ""] + #[doc = "Emits `VestingCreated`."] + #[doc = ""] + #[doc = "NOTE: This will unlock all schedules through the current block."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(1)`."] + pub fn vested_transfer( &self, - tx_id: types::execute_transfer::TxId, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload + target: types::vested_transfer::Target, + schedule: types::vested_transfer::Schedule, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "ReversibleTransfers", - "execute_transfer", - types::ExecuteTransfer { tx_id }, + "Vesting", + "vested_transfer", + types::VestedTransfer { target, schedule }, [ - 164u8, 38u8, 166u8, 81u8, 63u8, 235u8, 167u8, 178u8, 97u8, 80u8, 62u8, - 147u8, 3u8, 163u8, 129u8, 25u8, 98u8, 59u8, 17u8, 137u8, 6u8, 183u8, - 189u8, 51u8, 24u8, 211u8, 157u8, 108u8, 229u8, 253u8, 37u8, 78u8, + 198u8, 133u8, 254u8, 5u8, 22u8, 170u8, 205u8, 79u8, 218u8, 30u8, 81u8, + 207u8, 227u8, 121u8, 132u8, 14u8, 217u8, 43u8, 66u8, 206u8, 15u8, 80u8, + 173u8, 208u8, 128u8, 72u8, 223u8, 175u8, 93u8, 69u8, 128u8, 88u8, ], ) } - #[doc = "Schedule a transaction for delayed execution."] - pub fn schedule_transfer( + #[doc = "Force a vested transfer."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Root_."] + #[doc = ""] + #[doc = "- `source`: The account whose funds should be transferred."] + #[doc = "- `target`: The account that should be transferred the vested funds."] + #[doc = "- `schedule`: The vesting schedule attached to the transfer."] + #[doc = ""] + #[doc = "Emits `VestingCreated`."] + #[doc = ""] + #[doc = "NOTE: This will unlock all schedules through the current block."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(1)`."] + pub fn force_vested_transfer( &self, - dest: types::schedule_transfer::Dest, - amount: types::schedule_transfer::Amount, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload + source: types::force_vested_transfer::Source, + target: types::force_vested_transfer::Target, + schedule: types::force_vested_transfer::Schedule, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "ReversibleTransfers", - "schedule_transfer", - types::ScheduleTransfer { dest, amount }, + "Vesting", + "force_vested_transfer", + types::ForceVestedTransfer { source, target, schedule }, [ - 38u8, 219u8, 206u8, 56u8, 252u8, 195u8, 52u8, 74u8, 113u8, 125u8, - 107u8, 35u8, 236u8, 39u8, 31u8, 18u8, 250u8, 177u8, 174u8, 154u8, - 149u8, 122u8, 183u8, 50u8, 45u8, 111u8, 100u8, 249u8, 102u8, 82u8, - 72u8, 130u8, + 112u8, 17u8, 176u8, 133u8, 169u8, 192u8, 155u8, 217u8, 153u8, 36u8, + 230u8, 45u8, 9u8, 192u8, 2u8, 201u8, 165u8, 60u8, 206u8, 226u8, 95u8, + 86u8, 239u8, 196u8, 109u8, 62u8, 224u8, 237u8, 88u8, 74u8, 209u8, + 251u8, ], ) } - #[doc = "Schedule a transaction for delayed execution with a custom, one-time delay."] + #[doc = "Merge two vesting schedules together, creating a new vesting schedule that unlocks over"] + #[doc = "the highest possible start and end blocks. If both schedules have already started the"] + #[doc = "current block will be used as the schedule start; with the caveat that if one schedule"] + #[doc = "is finished by the current block, the other will be treated as the new merged schedule,"] + #[doc = "unmodified."] #[doc = ""] - #[doc = "This can only be used by accounts that have *not* set up a persistent"] - #[doc = "reversibility configuration with `set_reversibility`."] + #[doc = "NOTE: If `schedule1_index == schedule2_index` this is a no-op."] + #[doc = "NOTE: This will unlock all schedules through the current block prior to merging."] + #[doc = "NOTE: If both schedules have ended by the current block, no new schedule will be created"] + #[doc = "and both will be removed."] #[doc = ""] - #[doc = "- `delay`: The time (in blocks or milliseconds) before the transaction executes."] - pub fn schedule_transfer_with_delay( + #[doc = "Merged schedule attributes:"] + #[doc = "- `starting_block`: `MAX(schedule1.starting_block, scheduled2.starting_block,"] + #[doc = " current_block)`."] + #[doc = "- `ending_block`: `MAX(schedule1.ending_block, schedule2.ending_block)`."] + #[doc = "- `locked`: `schedule1.locked_at(current_block) + schedule2.locked_at(current_block)`."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "- `schedule1_index`: index of the first schedule to merge."] + #[doc = "- `schedule2_index`: index of the second schedule to merge."] + pub fn merge_schedules( &self, - dest: types::schedule_transfer_with_delay::Dest, - amount: types::schedule_transfer_with_delay::Amount, - delay: types::schedule_transfer_with_delay::Delay, + schedule1_index: types::merge_schedules::Schedule1Index, + schedule2_index: types::merge_schedules::Schedule2Index, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload + { + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "Vesting", + "merge_schedules", + types::MergeSchedules { schedule1_index, schedule2_index }, + [ + 45u8, 24u8, 13u8, 108u8, 26u8, 99u8, 61u8, 117u8, 195u8, 218u8, 182u8, + 23u8, 188u8, 157u8, 181u8, 81u8, 38u8, 136u8, 31u8, 226u8, 8u8, 190u8, + 33u8, 81u8, 86u8, 185u8, 156u8, 77u8, 157u8, 197u8, 41u8, 58u8, + ], + ) + } + #[doc = "Force remove a vesting schedule"] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Root_."] + #[doc = ""] + #[doc = "- `target`: An account that has a vesting schedule"] + #[doc = "- `schedule_index`: The vesting schedule index that should be removed"] + pub fn force_remove_vesting_schedule( + &self, + target: types::force_remove_vesting_schedule::Target, + schedule_index: types::force_remove_vesting_schedule::ScheduleIndex, ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload< - types::ScheduleTransferWithDelay, + types::ForceRemoveVestingSchedule, > { ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "ReversibleTransfers", - "schedule_transfer_with_delay", - types::ScheduleTransferWithDelay { dest, amount, delay }, + "Vesting", + "force_remove_vesting_schedule", + types::ForceRemoveVestingSchedule { target, schedule_index }, [ - 254u8, 158u8, 173u8, 217u8, 107u8, 80u8, 229u8, 252u8, 123u8, 46u8, - 177u8, 40u8, 25u8, 15u8, 32u8, 22u8, 224u8, 52u8, 242u8, 48u8, 242u8, - 84u8, 242u8, 143u8, 111u8, 12u8, 82u8, 161u8, 129u8, 86u8, 161u8, - 216u8, + 211u8, 253u8, 60u8, 15u8, 20u8, 53u8, 23u8, 13u8, 45u8, 223u8, 136u8, + 183u8, 162u8, 143u8, 196u8, 188u8, 35u8, 64u8, 174u8, 16u8, 47u8, 13u8, + 147u8, 173u8, 120u8, 143u8, 75u8, 89u8, 128u8, 187u8, 9u8, 18u8, ], ) } } } #[doc = "The `Event` enum of this pallet"] - pub type Event = runtime_types::pallet_reversible_transfers::pallet::Event; + pub type Event = runtime_types::pallet_vesting::pallet::Event; pub mod events { use super::runtime_types; #[derive( @@ -9037,60 +7166,19 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "A user has enabled their high-security settings."] - #[doc = "[who, interceptor, recoverer, delay]"] - pub struct HighSecuritySet { - pub who: high_security_set::Who, - pub interceptor: high_security_set::Interceptor, - pub recoverer: high_security_set::Recoverer, - pub delay: high_security_set::Delay, + #[doc = "A vesting schedule has been created."] + pub struct VestingCreated { + pub account: vesting_created::Account, + pub schedule_index: vesting_created::ScheduleIndex, } - pub mod high_security_set { + pub mod vesting_created { use super::runtime_types; - pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; - pub type Interceptor = ::subxt::ext::subxt_core::utils::AccountId32; - pub type Recoverer = ::subxt::ext::subxt_core::utils::AccountId32; - pub type Delay = runtime_types::qp_scheduler::BlockNumberOrTimestamp< - ::core::primitive::u32, - ::core::primitive::u64, - >; + pub type Account = ::subxt::ext::subxt_core::utils::AccountId32; + pub type ScheduleIndex = ::core::primitive::u32; } - impl ::subxt::ext::subxt_core::events::StaticEvent for HighSecuritySet { - const PALLET: &'static str = "ReversibleTransfers"; - const EVENT: &'static str = "HighSecuritySet"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "A transaction has been intercepted and scheduled for delayed execution."] - #[doc = "[from, to, interceptor, amount, tx_id, execute_at_moment]"] - pub struct TransactionScheduled { - pub from: transaction_scheduled::From, - pub to: transaction_scheduled::To, - pub interceptor: transaction_scheduled::Interceptor, - pub amount: transaction_scheduled::Amount, - pub tx_id: transaction_scheduled::TxId, - pub execute_at: transaction_scheduled::ExecuteAt, - } - pub mod transaction_scheduled { - use super::runtime_types; - pub type From = ::subxt::ext::subxt_core::utils::AccountId32; - pub type To = ::subxt::ext::subxt_core::utils::AccountId32; - pub type Interceptor = ::subxt::ext::subxt_core::utils::AccountId32; - pub type Amount = ::core::primitive::u128; - pub type TxId = ::subxt::ext::subxt_core::utils::H256; - pub type ExecuteAt = runtime_types::qp_scheduler::DispatchTime< - ::core::primitive::u32, - ::core::primitive::u64, - >; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for TransactionScheduled { - const PALLET: &'static str = "ReversibleTransfers"; - const EVENT: &'static str = "TransactionScheduled"; + impl ::subxt::ext::subxt_core::events::StaticEvent for VestingCreated { + const PALLET: &'static str = "Vesting"; + const EVENT: &'static str = "VestingCreated"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -9099,20 +7187,20 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "A scheduled transaction has been successfully cancelled by the owner."] - #[doc = "[who, tx_id]"] - pub struct TransactionCancelled { - pub who: transaction_cancelled::Who, - pub tx_id: transaction_cancelled::TxId, + #[doc = "The amount vested has been updated. This could indicate a change in funds available."] + #[doc = "The balance given is the amount which is left unvested (and thus locked)."] + pub struct VestingUpdated { + pub account: vesting_updated::Account, + pub unvested: vesting_updated::Unvested, } - pub mod transaction_cancelled { + pub mod vesting_updated { use super::runtime_types; - pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; - pub type TxId = ::subxt::ext::subxt_core::utils::H256; + pub type Account = ::subxt::ext::subxt_core::utils::AccountId32; + pub type Unvested = ::core::primitive::u128; } - impl ::subxt::ext::subxt_core::events::StaticEvent for TransactionCancelled { - const PALLET: &'static str = "ReversibleTransfers"; - const EVENT: &'static str = "TransactionCancelled"; + impl ::subxt::ext::subxt_core::events::StaticEvent for VestingUpdated { + const PALLET: &'static str = "Vesting"; + const EVENT: &'static str = "VestingUpdated"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -9121,507 +7209,644 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "A scheduled transaction was executed by the scheduler."] - #[doc = "[tx_id, dispatch_result]"] - pub struct TransactionExecuted { - pub tx_id: transaction_executed::TxId, - pub result: transaction_executed::Result, + #[doc = "An \\[account\\] has become fully vested."] + pub struct VestingCompleted { + pub account: vesting_completed::Account, } - pub mod transaction_executed { + pub mod vesting_completed { use super::runtime_types; - pub type TxId = ::subxt::ext::subxt_core::utils::H256; - pub type Result = ::core::result::Result< - runtime_types::frame_support::dispatch::PostDispatchInfo, - runtime_types::sp_runtime::DispatchErrorWithPostInfo< - runtime_types::frame_support::dispatch::PostDispatchInfo, - >, - >; + pub type Account = ::subxt::ext::subxt_core::utils::AccountId32; } - impl ::subxt::ext::subxt_core::events::StaticEvent for TransactionExecuted { - const PALLET: &'static str = "ReversibleTransfers"; - const EVENT: &'static str = "TransactionExecuted"; + impl ::subxt::ext::subxt_core::events::StaticEvent for VestingCompleted { + const PALLET: &'static str = "Vesting"; + const EVENT: &'static str = "VestingCompleted"; } } pub mod storage { use super::runtime_types; pub mod types { use super::runtime_types; - pub mod high_security_accounts { - use super::runtime_types; - pub type HighSecurityAccounts = - runtime_types::pallet_reversible_transfers::HighSecurityAccountData< - ::subxt::ext::subxt_core::utils::AccountId32, - runtime_types::qp_scheduler::BlockNumberOrTimestamp< - ::core::primitive::u32, - ::core::primitive::u64, - >, - >; - pub type Param0 = ::subxt::ext::subxt_core::utils::AccountId32; - } - pub mod pending_transfers { + pub mod vesting { use super::runtime_types; - pub type PendingTransfers = - runtime_types::pallet_reversible_transfers::PendingTransfer< - ::subxt::ext::subxt_core::utils::AccountId32, + pub type Vesting = runtime_types::bounded_collections::bounded_vec::BoundedVec< + runtime_types::pallet_vesting::vesting_info::VestingInfo< ::core::primitive::u128, - runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::quantus_runtime::RuntimeCall, - runtime_types::poseidon_resonance::PoseidonHasher, - >, - >; - pub type Param0 = ::subxt::ext::subxt_core::utils::H256; - } - pub mod account_pending_index { - use super::runtime_types; - pub type AccountPendingIndex = ::core::primitive::u32; - pub type Param0 = ::subxt::ext::subxt_core::utils::AccountId32; - } - pub mod pending_transfers_by_sender { - use super::runtime_types; - pub type PendingTransfersBySender = - runtime_types::bounded_collections::bounded_vec::BoundedVec< - ::subxt::ext::subxt_core::utils::H256, - >; - pub type Param0 = ::subxt::ext::subxt_core::utils::AccountId32; - } - pub mod pending_transfers_by_recipient { - use super::runtime_types; - pub type PendingTransfersByRecipient = - runtime_types::bounded_collections::bounded_vec::BoundedVec< - ::subxt::ext::subxt_core::utils::H256, - >; - pub type Param0 = ::subxt::ext::subxt_core::utils::AccountId32; - } - pub mod interceptor_index { - use super::runtime_types; - pub type InterceptorIndex = - runtime_types::bounded_collections::bounded_vec::BoundedVec< - ::subxt::ext::subxt_core::utils::AccountId32, - >; + ::core::primitive::u32, + >, + >; pub type Param0 = ::subxt::ext::subxt_core::utils::AccountId32; } - pub mod global_nonce { + pub mod storage_version { use super::runtime_types; - pub type GlobalNonce = ::core::primitive::u64; + pub type StorageVersion = runtime_types::pallet_vesting::Releases; } } pub struct StorageApi; impl StorageApi { - #[doc = " Maps accounts to their chosen reversibility delay period (in milliseconds)."] - #[doc = " Accounts present in this map have reversibility enabled."] - pub fn high_security_accounts_iter( + #[doc = " Information regarding the vesting of a given account."] + pub fn vesting_iter( &self, ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< (), - types::high_security_accounts::HighSecurityAccounts, + types::vesting::Vesting, (), (), ::subxt::ext::subxt_core::utils::Yes, > { ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "ReversibleTransfers", - "HighSecurityAccounts", + "Vesting", + "Vesting", (), [ - 246u8, 192u8, 145u8, 222u8, 167u8, 131u8, 248u8, 22u8, 219u8, 213u8, - 41u8, 3u8, 152u8, 132u8, 180u8, 251u8, 193u8, 91u8, 139u8, 164u8, - 142u8, 208u8, 122u8, 16u8, 40u8, 140u8, 15u8, 38u8, 145u8, 193u8, 77u8, - 165u8, + 95u8, 168u8, 217u8, 248u8, 149u8, 86u8, 195u8, 93u8, 73u8, 206u8, + 105u8, 165u8, 33u8, 173u8, 232u8, 81u8, 147u8, 254u8, 50u8, 228u8, + 156u8, 92u8, 242u8, 149u8, 42u8, 91u8, 58u8, 209u8, 142u8, 221u8, + 230u8, 112u8, ], ) } - #[doc = " Maps accounts to their chosen reversibility delay period (in milliseconds)."] - #[doc = " Accounts present in this map have reversibility enabled."] - pub fn high_security_accounts( + #[doc = " Information regarding the vesting of a given account."] + pub fn vesting( &self, - _0: types::high_security_accounts::Param0, + _0: types::vesting::Param0, ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::high_security_accounts::Param0, + types::vesting::Param0, >, - types::high_security_accounts::HighSecurityAccounts, + types::vesting::Vesting, ::subxt::ext::subxt_core::utils::Yes, (), (), > { ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "ReversibleTransfers", - "HighSecurityAccounts", + "Vesting", + "Vesting", ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), [ - 246u8, 192u8, 145u8, 222u8, 167u8, 131u8, 248u8, 22u8, 219u8, 213u8, - 41u8, 3u8, 152u8, 132u8, 180u8, 251u8, 193u8, 91u8, 139u8, 164u8, - 142u8, 208u8, 122u8, 16u8, 40u8, 140u8, 15u8, 38u8, 145u8, 193u8, 77u8, - 165u8, + 95u8, 168u8, 217u8, 248u8, 149u8, 86u8, 195u8, 93u8, 73u8, 206u8, + 105u8, 165u8, 33u8, 173u8, 232u8, 81u8, 147u8, 254u8, 50u8, 228u8, + 156u8, 92u8, 242u8, 149u8, 42u8, 91u8, 58u8, 209u8, 142u8, 221u8, + 230u8, 112u8, ], ) } - #[doc = " Stores the details of pending transactions scheduled for delayed execution."] - #[doc = " Keyed by the unique transaction ID."] - pub fn pending_transfers_iter( + #[doc = " Storage version of the pallet."] + #[doc = ""] + #[doc = " New networks start with latest version, as determined by the genesis build."] + pub fn storage_version( &self, ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< (), - types::pending_transfers::PendingTransfers, - (), - (), + types::storage_version::StorageVersion, ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, + (), > { ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "ReversibleTransfers", - "PendingTransfers", + "Vesting", + "StorageVersion", (), [ - 226u8, 148u8, 100u8, 60u8, 9u8, 160u8, 164u8, 177u8, 53u8, 236u8, 65u8, - 38u8, 207u8, 31u8, 170u8, 79u8, 15u8, 237u8, 127u8, 189u8, 203u8, - 147u8, 4u8, 146u8, 13u8, 87u8, 158u8, 163u8, 159u8, 87u8, 98u8, 211u8, + 230u8, 137u8, 180u8, 133u8, 142u8, 124u8, 231u8, 234u8, 223u8, 10u8, + 154u8, 98u8, 158u8, 253u8, 228u8, 80u8, 5u8, 9u8, 91u8, 210u8, 252u8, + 9u8, 13u8, 195u8, 193u8, 164u8, 129u8, 113u8, 128u8, 218u8, 8u8, 40u8, ], ) } - #[doc = " Stores the details of pending transactions scheduled for delayed execution."] - #[doc = " Keyed by the unique transaction ID."] - pub fn pending_transfers( + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The minimum amount transferred to call `vested_transfer`."] + pub fn min_vested_transfer( &self, - _0: types::pending_transfers::Param0, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::pending_transfers::Param0, - >, - types::pending_transfers::PendingTransfers, - ::subxt::ext::subxt_core::utils::Yes, - (), - (), + ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< + ::core::primitive::u128, > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "ReversibleTransfers", - "PendingTransfers", - ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), + ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( + "Vesting", + "MinVestedTransfer", [ - 226u8, 148u8, 100u8, 60u8, 9u8, 160u8, 164u8, 177u8, 53u8, 236u8, 65u8, - 38u8, 207u8, 31u8, 170u8, 79u8, 15u8, 237u8, 127u8, 189u8, 203u8, - 147u8, 4u8, 146u8, 13u8, 87u8, 158u8, 163u8, 159u8, 87u8, 98u8, 211u8, + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, + 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, ], ) } - #[doc = " Indexes pending transaction IDs per account for efficient lookup and cancellation."] - #[doc = " Also enforces the maximum pending transactions limit per account."] - pub fn account_pending_index_iter( + pub fn max_vesting_schedules( &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::account_pending_index::AccountPendingIndex, - (), - ::subxt::ext::subxt_core::utils::Yes, - ::subxt::ext::subxt_core::utils::Yes, + ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< + ::core::primitive::u32, > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "ReversibleTransfers", - "AccountPendingIndex", - (), + ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( + "Vesting", + "MaxVestingSchedules", [ - 142u8, 255u8, 15u8, 41u8, 210u8, 84u8, 93u8, 230u8, 194u8, 31u8, 164u8, - 88u8, 155u8, 106u8, 130u8, 110u8, 199u8, 137u8, 153u8, 99u8, 154u8, - 210u8, 108u8, 136u8, 70u8, 141u8, 242u8, 255u8, 246u8, 19u8, 247u8, - 136u8, + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, ], ) } - #[doc = " Indexes pending transaction IDs per account for efficient lookup and cancellation."] - #[doc = " Also enforces the maximum pending transactions limit per account."] - pub fn account_pending_index( - &self, - _0: types::account_pending_index::Param0, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::account_pending_index::Param0, - >, - types::account_pending_index::AccountPendingIndex, - ::subxt::ext::subxt_core::utils::Yes, - ::subxt::ext::subxt_core::utils::Yes, - (), - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "ReversibleTransfers", - "AccountPendingIndex", - ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), - [ - 142u8, 255u8, 15u8, 41u8, 210u8, 84u8, 93u8, 230u8, 194u8, 31u8, 164u8, - 88u8, 155u8, 106u8, 130u8, 110u8, 199u8, 137u8, 153u8, 99u8, 154u8, - 210u8, 108u8, 136u8, 70u8, 141u8, 242u8, 255u8, 246u8, 19u8, 247u8, - 136u8, - ], - ) + } + } + } + pub mod preimage { + use super::{root_mod, runtime_types}; + #[doc = "The `Error` enum of this pallet."] + pub type Error = runtime_types::pallet_preimage::pallet::Error; + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub type Call = runtime_types::pallet_preimage::pallet::Call; + pub mod calls { + use super::{root_mod, runtime_types}; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "Register a preimage on-chain."] + #[doc = ""] + #[doc = "If the preimage was previously requested, no fees or deposits are taken for providing"] + #[doc = "the preimage. Otherwise, a deposit is taken proportional to the size of the preimage."] + pub struct NotePreimage { + pub bytes: note_preimage::Bytes, } - #[doc = " Maps sender accounts to their list of pending transaction IDs."] - #[doc = " This allows users to query all their outgoing pending transfers."] - pub fn pending_transfers_by_sender_iter( + pub mod note_preimage { + use super::runtime_types; + pub type Bytes = + ::subxt::ext::subxt_core::alloc::vec::Vec<::core::primitive::u8>; + } + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for NotePreimage { + const PALLET: &'static str = "Preimage"; + const CALL: &'static str = "note_preimage"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "Clear an unrequested preimage from the runtime storage."] + #[doc = ""] + #[doc = "If `len` is provided, then it will be a much cheaper operation."] + #[doc = ""] + #[doc = "- `hash`: The hash of the preimage to be removed from the store."] + #[doc = "- `len`: The length of the preimage of `hash`."] + pub struct UnnotePreimage { + pub hash: unnote_preimage::Hash, + } + pub mod unnote_preimage { + use super::runtime_types; + pub type Hash = ::subxt::ext::subxt_core::utils::H256; + } + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for UnnotePreimage { + const PALLET: &'static str = "Preimage"; + const CALL: &'static str = "unnote_preimage"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "Request a preimage be uploaded to the chain without paying any fees or deposits."] + #[doc = ""] + #[doc = "If the preimage requests has already been provided on-chain, we unreserve any deposit"] + #[doc = "a user may have paid, and take the control of the preimage out of their hands."] + pub struct RequestPreimage { + pub hash: request_preimage::Hash, + } + pub mod request_preimage { + use super::runtime_types; + pub type Hash = ::subxt::ext::subxt_core::utils::H256; + } + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for RequestPreimage { + const PALLET: &'static str = "Preimage"; + const CALL: &'static str = "request_preimage"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "Clear a previously made request for a preimage."] + #[doc = ""] + #[doc = "NOTE: THIS MUST NOT BE CALLED ON `hash` MORE TIMES THAN `request_preimage`."] + pub struct UnrequestPreimage { + pub hash: unrequest_preimage::Hash, + } + pub mod unrequest_preimage { + use super::runtime_types; + pub type Hash = ::subxt::ext::subxt_core::utils::H256; + } + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for UnrequestPreimage { + const PALLET: &'static str = "Preimage"; + const CALL: &'static str = "unrequest_preimage"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "Ensure that the bulk of pre-images is upgraded."] + #[doc = ""] + #[doc = "The caller pays no fee if at least 90% of pre-images were successfully updated."] + pub struct EnsureUpdated { + pub hashes: ensure_updated::Hashes, + } + pub mod ensure_updated { + use super::runtime_types; + pub type Hashes = ::subxt::ext::subxt_core::alloc::vec::Vec< + ::subxt::ext::subxt_core::utils::H256, + >; + } + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for EnsureUpdated { + const PALLET: &'static str = "Preimage"; + const CALL: &'static str = "ensure_updated"; + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Register a preimage on-chain."] + #[doc = ""] + #[doc = "If the preimage was previously requested, no fees or deposits are taken for providing"] + #[doc = "the preimage. Otherwise, a deposit is taken proportional to the size of the preimage."] + pub fn note_preimage( &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::pending_transfers_by_sender::PendingTransfersBySender, - (), - ::subxt::ext::subxt_core::utils::Yes, - ::subxt::ext::subxt_core::utils::Yes, - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "ReversibleTransfers", - "PendingTransfersBySender", - (), + bytes: types::note_preimage::Bytes, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "Preimage", + "note_preimage", + types::NotePreimage { bytes }, [ - 183u8, 43u8, 139u8, 203u8, 182u8, 219u8, 60u8, 129u8, 67u8, 30u8, 65u8, - 47u8, 105u8, 196u8, 228u8, 154u8, 26u8, 74u8, 84u8, 72u8, 154u8, 220u8, - 216u8, 134u8, 207u8, 240u8, 7u8, 190u8, 236u8, 242u8, 184u8, 224u8, + 121u8, 88u8, 18u8, 92u8, 176u8, 15u8, 192u8, 198u8, 146u8, 198u8, 38u8, + 242u8, 213u8, 83u8, 7u8, 230u8, 14u8, 110u8, 235u8, 32u8, 215u8, 26u8, + 192u8, 217u8, 113u8, 224u8, 206u8, 96u8, 177u8, 198u8, 246u8, 33u8, ], ) } - #[doc = " Maps sender accounts to their list of pending transaction IDs."] - #[doc = " This allows users to query all their outgoing pending transfers."] - pub fn pending_transfers_by_sender( + #[doc = "Clear an unrequested preimage from the runtime storage."] + #[doc = ""] + #[doc = "If `len` is provided, then it will be a much cheaper operation."] + #[doc = ""] + #[doc = "- `hash`: The hash of the preimage to be removed from the store."] + #[doc = "- `len`: The length of the preimage of `hash`."] + pub fn unnote_preimage( &self, - _0: types::pending_transfers_by_sender::Param0, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::pending_transfers_by_sender::Param0, - >, - types::pending_transfers_by_sender::PendingTransfersBySender, - ::subxt::ext::subxt_core::utils::Yes, - ::subxt::ext::subxt_core::utils::Yes, - (), - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "ReversibleTransfers", - "PendingTransfersBySender", - ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), + hash: types::unnote_preimage::Hash, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload + { + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "Preimage", + "unnote_preimage", + types::UnnotePreimage { hash }, [ - 183u8, 43u8, 139u8, 203u8, 182u8, 219u8, 60u8, 129u8, 67u8, 30u8, 65u8, - 47u8, 105u8, 196u8, 228u8, 154u8, 26u8, 74u8, 84u8, 72u8, 154u8, 220u8, - 216u8, 134u8, 207u8, 240u8, 7u8, 190u8, 236u8, 242u8, 184u8, 224u8, + 188u8, 116u8, 222u8, 22u8, 127u8, 215u8, 2u8, 133u8, 96u8, 202u8, + 190u8, 123u8, 203u8, 43u8, 200u8, 161u8, 226u8, 24u8, 49u8, 36u8, + 221u8, 160u8, 130u8, 119u8, 30u8, 138u8, 144u8, 85u8, 5u8, 164u8, + 252u8, 222u8, ], ) } - #[doc = " Maps recipient accounts to their list of pending incoming transaction IDs."] - #[doc = " This allows users to query all their incoming pending transfers."] - pub fn pending_transfers_by_recipient_iter( + #[doc = "Request a preimage be uploaded to the chain without paying any fees or deposits."] + #[doc = ""] + #[doc = "If the preimage requests has already been provided on-chain, we unreserve any deposit"] + #[doc = "a user may have paid, and take the control of the preimage out of their hands."] + pub fn request_preimage( + &self, + hash: types::request_preimage::Hash, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload + { + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "Preimage", + "request_preimage", + types::RequestPreimage { hash }, + [ + 87u8, 0u8, 204u8, 111u8, 43u8, 115u8, 64u8, 209u8, 133u8, 13u8, 83u8, + 45u8, 164u8, 166u8, 233u8, 105u8, 242u8, 238u8, 235u8, 208u8, 113u8, + 134u8, 93u8, 242u8, 86u8, 32u8, 7u8, 152u8, 107u8, 208u8, 79u8, 59u8, + ], + ) + } + #[doc = "Clear a previously made request for a preimage."] + #[doc = ""] + #[doc = "NOTE: THIS MUST NOT BE CALLED ON `hash` MORE TIMES THAN `request_preimage`."] + pub fn unrequest_preimage( + &self, + hash: types::unrequest_preimage::Hash, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload + { + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "Preimage", + "unrequest_preimage", + types::UnrequestPreimage { hash }, + [ + 55u8, 37u8, 224u8, 149u8, 142u8, 120u8, 8u8, 68u8, 183u8, 225u8, 255u8, + 240u8, 254u8, 111u8, 58u8, 200u8, 113u8, 217u8, 177u8, 203u8, 107u8, + 104u8, 233u8, 87u8, 252u8, 53u8, 33u8, 112u8, 116u8, 254u8, 117u8, + 134u8, + ], + ) + } + #[doc = "Ensure that the bulk of pre-images is upgraded."] + #[doc = ""] + #[doc = "The caller pays no fee if at least 90% of pre-images were successfully updated."] + pub fn ensure_updated( + &self, + hashes: types::ensure_updated::Hashes, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload + { + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "Preimage", + "ensure_updated", + types::EnsureUpdated { hashes }, + [ + 254u8, 228u8, 88u8, 44u8, 126u8, 235u8, 188u8, 153u8, 61u8, 27u8, + 103u8, 253u8, 163u8, 161u8, 113u8, 243u8, 87u8, 136u8, 2u8, 231u8, + 209u8, 188u8, 215u8, 106u8, 192u8, 225u8, 75u8, 125u8, 224u8, 96u8, + 221u8, 90u8, + ], + ) + } + } + } + #[doc = "The `Event` enum of this pallet"] + pub type Event = runtime_types::pallet_preimage::pallet::Event; + pub mod events { + use super::runtime_types; + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + #[doc = "A preimage has been noted."] + pub struct Noted { + pub hash: noted::Hash, + } + pub mod noted { + use super::runtime_types; + pub type Hash = ::subxt::ext::subxt_core::utils::H256; + } + impl ::subxt::ext::subxt_core::events::StaticEvent for Noted { + const PALLET: &'static str = "Preimage"; + const EVENT: &'static str = "Noted"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + #[doc = "A preimage has been requested."] + pub struct Requested { + pub hash: requested::Hash, + } + pub mod requested { + use super::runtime_types; + pub type Hash = ::subxt::ext::subxt_core::utils::H256; + } + impl ::subxt::ext::subxt_core::events::StaticEvent for Requested { + const PALLET: &'static str = "Preimage"; + const EVENT: &'static str = "Requested"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + #[doc = "A preimage has ben cleared."] + pub struct Cleared { + pub hash: cleared::Hash, + } + pub mod cleared { + use super::runtime_types; + pub type Hash = ::subxt::ext::subxt_core::utils::H256; + } + impl ::subxt::ext::subxt_core::events::StaticEvent for Cleared { + const PALLET: &'static str = "Preimage"; + const EVENT: &'static str = "Cleared"; + } + } + pub mod storage { + use super::runtime_types; + pub mod types { + use super::runtime_types; + pub mod status_for { + use super::runtime_types; + pub type StatusFor = runtime_types::pallet_preimage::OldRequestStatus< + ::subxt::ext::subxt_core::utils::AccountId32, + ::core::primitive::u128, + >; + pub type Param0 = ::subxt::ext::subxt_core::utils::H256; + } + pub mod request_status_for { + use super::runtime_types; + pub type RequestStatusFor = runtime_types::pallet_preimage::RequestStatus< + ::subxt::ext::subxt_core::utils::AccountId32, + runtime_types::quantus_runtime::governance::definitions::PreimageDeposit, + >; + pub type Param0 = ::subxt::ext::subxt_core::utils::H256; + } + pub mod preimage_for { + use super::runtime_types; + pub type PreimageFor = + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >; + pub type Param0 = + (::subxt::ext::subxt_core::utils::H256, ::core::primitive::u32); + } + } + pub struct StorageApi; + impl StorageApi { + #[doc = " The request status of a given hash."] + pub fn status_for_iter( &self, ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< (), - types::pending_transfers_by_recipient::PendingTransfersByRecipient, + types::status_for::StatusFor, + (), (), - ::subxt::ext::subxt_core::utils::Yes, ::subxt::ext::subxt_core::utils::Yes, > { ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "ReversibleTransfers", - "PendingTransfersByRecipient", + "Preimage", + "StatusFor", (), [ - 63u8, 141u8, 24u8, 239u8, 201u8, 143u8, 36u8, 152u8, 35u8, 110u8, - 112u8, 157u8, 29u8, 61u8, 221u8, 79u8, 209u8, 192u8, 183u8, 29u8, - 145u8, 166u8, 238u8, 156u8, 131u8, 203u8, 124u8, 233u8, 210u8, 201u8, - 91u8, 212u8, + 187u8, 100u8, 54u8, 112u8, 96u8, 129u8, 36u8, 149u8, 127u8, 226u8, + 126u8, 171u8, 72u8, 189u8, 59u8, 126u8, 204u8, 125u8, 67u8, 204u8, + 231u8, 6u8, 212u8, 135u8, 166u8, 252u8, 5u8, 46u8, 111u8, 120u8, 54u8, + 209u8, ], ) } - #[doc = " Maps recipient accounts to their list of pending incoming transaction IDs."] - #[doc = " This allows users to query all their incoming pending transfers."] - pub fn pending_transfers_by_recipient( + #[doc = " The request status of a given hash."] + pub fn status_for( &self, - _0: types::pending_transfers_by_recipient::Param0, + _0: types::status_for::Param0, ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::pending_transfers_by_recipient::Param0, + types::status_for::Param0, >, - types::pending_transfers_by_recipient::PendingTransfersByRecipient, - ::subxt::ext::subxt_core::utils::Yes, + types::status_for::StatusFor, ::subxt::ext::subxt_core::utils::Yes, (), + (), > { ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "ReversibleTransfers", - "PendingTransfersByRecipient", + "Preimage", + "StatusFor", ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), [ - 63u8, 141u8, 24u8, 239u8, 201u8, 143u8, 36u8, 152u8, 35u8, 110u8, - 112u8, 157u8, 29u8, 61u8, 221u8, 79u8, 209u8, 192u8, 183u8, 29u8, - 145u8, 166u8, 238u8, 156u8, 131u8, 203u8, 124u8, 233u8, 210u8, 201u8, - 91u8, 212u8, + 187u8, 100u8, 54u8, 112u8, 96u8, 129u8, 36u8, 149u8, 127u8, 226u8, + 126u8, 171u8, 72u8, 189u8, 59u8, 126u8, 204u8, 125u8, 67u8, 204u8, + 231u8, 6u8, 212u8, 135u8, 166u8, 252u8, 5u8, 46u8, 111u8, 120u8, 54u8, + 209u8, ], ) } - #[doc = " Maps interceptor accounts to the list of accounts they can intercept for."] - #[doc = " This allows the UI to efficiently query all accounts for which a given account is an interceptor."] - pub fn interceptor_index_iter( + #[doc = " The request status of a given hash."] + pub fn request_status_for_iter( &self, ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< (), - types::interceptor_index::InterceptorIndex, + types::request_status_for::RequestStatusFor, + (), (), - ::subxt::ext::subxt_core::utils::Yes, ::subxt::ext::subxt_core::utils::Yes, > { ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "ReversibleTransfers", - "InterceptorIndex", + "Preimage", + "RequestStatusFor", (), [ - 7u8, 184u8, 75u8, 107u8, 42u8, 84u8, 188u8, 86u8, 2u8, 227u8, 4u8, - 136u8, 109u8, 69u8, 64u8, 123u8, 253u8, 28u8, 174u8, 121u8, 183u8, - 154u8, 135u8, 91u8, 125u8, 0u8, 58u8, 132u8, 164u8, 236u8, 182u8, - 133u8, + 113u8, 195u8, 77u8, 23u8, 125u8, 170u8, 77u8, 145u8, 201u8, 168u8, + 39u8, 13u8, 143u8, 50u8, 100u8, 92u8, 25u8, 110u8, 125u8, 20u8, 96u8, + 156u8, 225u8, 200u8, 57u8, 199u8, 226u8, 242u8, 230u8, 126u8, 138u8, + 123u8, ], ) } - #[doc = " Maps interceptor accounts to the list of accounts they can intercept for."] - #[doc = " This allows the UI to efficiently query all accounts for which a given account is an interceptor."] - pub fn interceptor_index( + #[doc = " The request status of a given hash."] + pub fn request_status_for( &self, - _0: types::interceptor_index::Param0, + _0: types::request_status_for::Param0, ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::interceptor_index::Param0, + types::request_status_for::Param0, >, - types::interceptor_index::InterceptorIndex, - ::subxt::ext::subxt_core::utils::Yes, + types::request_status_for::RequestStatusFor, ::subxt::ext::subxt_core::utils::Yes, (), + (), > { ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "ReversibleTransfers", - "InterceptorIndex", + "Preimage", + "RequestStatusFor", ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), [ - 7u8, 184u8, 75u8, 107u8, 42u8, 84u8, 188u8, 86u8, 2u8, 227u8, 4u8, - 136u8, 109u8, 69u8, 64u8, 123u8, 253u8, 28u8, 174u8, 121u8, 183u8, - 154u8, 135u8, 91u8, 125u8, 0u8, 58u8, 132u8, 164u8, 236u8, 182u8, - 133u8, + 113u8, 195u8, 77u8, 23u8, 125u8, 170u8, 77u8, 145u8, 201u8, 168u8, + 39u8, 13u8, 143u8, 50u8, 100u8, 92u8, 25u8, 110u8, 125u8, 20u8, 96u8, + 156u8, 225u8, 200u8, 57u8, 199u8, 226u8, 242u8, 230u8, 126u8, 138u8, + 123u8, ], ) } - #[doc = " Global nonce for generating unique transaction IDs."] - pub fn global_nonce( + pub fn preimage_for_iter( &self, ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< (), - types::global_nonce::GlobalNonce, - ::subxt::ext::subxt_core::utils::Yes, - ::subxt::ext::subxt_core::utils::Yes, + types::preimage_for::PreimageFor, (), + (), + ::subxt::ext::subxt_core::utils::Yes, > { ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "ReversibleTransfers", - "GlobalNonce", + "Preimage", + "PreimageFor", (), [ - 119u8, 119u8, 84u8, 141u8, 83u8, 67u8, 42u8, 83u8, 51u8, 196u8, 185u8, - 39u8, 227u8, 125u8, 142u8, 154u8, 107u8, 62u8, 127u8, 13u8, 54u8, - 114u8, 201u8, 6u8, 100u8, 28u8, 202u8, 152u8, 246u8, 202u8, 9u8, 29u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " Maximum pending reversible transactions allowed per account. Used for BoundedVec."] - pub fn max_pending_per_account( - &self, - ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< - ::core::primitive::u32, - > { - ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "ReversibleTransfers", - "MaxPendingPerAccount", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, - ], - ) - } - #[doc = " Maximum number of accounts an interceptor can intercept for. Used for BoundedVec."] - pub fn max_interceptor_accounts( - &self, - ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< - ::core::primitive::u32, - > { - ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "ReversibleTransfers", - "MaxInterceptorAccounts", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, + 106u8, 5u8, 17u8, 46u8, 6u8, 184u8, 177u8, 113u8, 169u8, 34u8, 119u8, + 141u8, 117u8, 40u8, 30u8, 94u8, 187u8, 35u8, 206u8, 216u8, 143u8, + 208u8, 49u8, 156u8, 200u8, 255u8, 109u8, 200u8, 210u8, 134u8, 24u8, + 139u8, ], ) } - #[doc = " The default delay period for reversible transactions if none is specified."] - #[doc = ""] - #[doc = " NOTE: default delay is always in blocks."] - pub fn default_delay( + pub fn preimage_for( &self, - ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< - runtime_types::qp_scheduler::BlockNumberOrTimestamp< - ::core::primitive::u32, - ::core::primitive::u64, + _0: types::preimage_for::Param0, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + ::subxt::ext::subxt_core::storage::address::StaticStorageKey< + types::preimage_for::Param0, >, + types::preimage_for::PreimageFor, + ::subxt::ext::subxt_core::utils::Yes, + (), + (), > { - ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "ReversibleTransfers", - "DefaultDelay", - [ - 245u8, 29u8, 3u8, 65u8, 154u8, 12u8, 172u8, 71u8, 67u8, 134u8, 71u8, - 180u8, 4u8, 9u8, 54u8, 89u8, 6u8, 19u8, 3u8, 168u8, 67u8, 122u8, 197u8, - 109u8, 1u8, 228u8, 44u8, 243u8, 228u8, 194u8, 241u8, 227u8, - ], - ) - } - #[doc = " The minimum delay period allowed for reversible transactions, in blocks."] - pub fn min_delay_period_blocks( - &self, - ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< - ::core::primitive::u32, - > { - ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "ReversibleTransfers", - "MinDelayPeriodBlocks", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, - ], - ) - } - #[doc = " The minimum delay period allowed for reversible transactions, in milliseconds."] - pub fn min_delay_period_moment( - &self, - ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< - ::core::primitive::u64, - > { - ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "ReversibleTransfers", - "MinDelayPeriodMoment", + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "Preimage", + "PreimageFor", + ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), [ - 128u8, 214u8, 205u8, 242u8, 181u8, 142u8, 124u8, 231u8, 190u8, 146u8, - 59u8, 226u8, 157u8, 101u8, 103u8, 117u8, 249u8, 65u8, 18u8, 191u8, - 103u8, 119u8, 53u8, 85u8, 81u8, 96u8, 220u8, 42u8, 184u8, 239u8, 42u8, - 246u8, + 106u8, 5u8, 17u8, 46u8, 6u8, 184u8, 177u8, 113u8, 169u8, 34u8, 119u8, + 141u8, 117u8, 40u8, 30u8, 94u8, 187u8, 35u8, 206u8, 216u8, 143u8, + 208u8, 49u8, 156u8, 200u8, 255u8, 109u8, 200u8, 210u8, 134u8, 24u8, + 139u8, ], ) } } } } - pub mod conviction_voting { + pub mod scheduler { use super::{root_mod, runtime_types}; #[doc = "The `Error` enum of this pallet."] - pub type Error = runtime_types::pallet_conviction_voting::pallet::Error; + pub type Error = runtime_types::pallet_scheduler::pallet::Error; #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] - pub type Call = runtime_types::pallet_conviction_voting::pallet::Call; + pub type Call = runtime_types::pallet_scheduler::pallet::Call; pub mod calls { use super::{root_mod, runtime_types}; type DispatchError = runtime_types::sp_runtime::DispatchError; @@ -9638,30 +7863,29 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Vote in a poll. If `vote.is_aye()`, the vote is to enact the proposal;"] - #[doc = "otherwise it is a vote to keep the status quo."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be _Signed_."] - #[doc = ""] - #[doc = "- `poll_index`: The index of the poll to vote for."] - #[doc = "- `vote`: The vote configuration."] - #[doc = ""] - #[doc = "Weight: `O(R)` where R is the number of polls the voter has voted on."] - pub struct Vote { - #[codec(compact)] - pub poll_index: vote::PollIndex, - pub vote: vote::Vote, + #[doc = "Anonymously schedule a task."] + pub struct Schedule { + pub when: schedule::When, + pub maybe_periodic: schedule::MaybePeriodic, + pub priority: schedule::Priority, + pub call: ::subxt::ext::subxt_core::alloc::boxed::Box, } - pub mod vote { + pub mod schedule { use super::runtime_types; - pub type PollIndex = ::core::primitive::u32; - pub type Vote = runtime_types::pallet_conviction_voting::vote::AccountVote< - ::core::primitive::u128, - >; + pub type When = ::core::primitive::u32; + pub type MaybePeriodic = ::core::option::Option<( + runtime_types::qp_scheduler::BlockNumberOrTimestamp< + ::core::primitive::u32, + ::core::primitive::u64, + >, + ::core::primitive::u32, + )>; + pub type Priority = ::core::primitive::u8; + pub type Call = runtime_types::quantus_runtime::RuntimeCall; } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for Vote { - const PALLET: &'static str = "ConvictionVoting"; - const CALL: &'static str = "vote"; + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for Schedule { + const PALLET: &'static str = "Scheduler"; + const CALL: &'static str = "schedule"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -9674,49 +7898,22 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Delegate the voting power (with some given conviction) of the sending account for a"] - #[doc = "particular class of polls."] - #[doc = ""] - #[doc = "The balance delegated is locked for as long as it's delegated, and thereafter for the"] - #[doc = "time appropriate for the conviction's lock period."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be _Signed_, and the signing account must either:"] - #[doc = " - be delegating already; or"] - #[doc = " - have no voting activity (if there is, then it will need to be removed through"] - #[doc = " `remove_vote`)."] - #[doc = ""] - #[doc = "- `to`: The account whose voting the `target` account's voting power will follow."] - #[doc = "- `class`: The class of polls to delegate. To delegate multiple classes, multiple calls"] - #[doc = " to this function are required."] - #[doc = "- `conviction`: The conviction that will be attached to the delegated votes. When the"] - #[doc = " account is undelegated, the funds will be locked for the corresponding period."] - #[doc = "- `balance`: The amount of the account's balance to be used in delegating. This must not"] - #[doc = " be more than the account's current balance."] - #[doc = ""] - #[doc = "Emits `Delegated`."] - #[doc = ""] - #[doc = "Weight: `O(R)` where R is the number of polls the voter delegating to has"] - #[doc = " voted on. Weight is initially charged as if maximum votes, but is refunded later."] - pub struct Delegate { - pub class: delegate::Class, - pub to: delegate::To, - pub conviction: delegate::Conviction, - pub balance: delegate::Balance, + #[doc = "Cancel an anonymously scheduled task."] + pub struct Cancel { + pub when: cancel::When, + pub index: cancel::Index, } - pub mod delegate { + pub mod cancel { use super::runtime_types; - pub type Class = ::core::primitive::u16; - pub type To = ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), + pub type When = runtime_types::qp_scheduler::BlockNumberOrTimestamp< + ::core::primitive::u32, + ::core::primitive::u64, >; - pub type Conviction = - runtime_types::pallet_conviction_voting::conviction::Conviction; - pub type Balance = ::core::primitive::u128; + pub type Index = ::core::primitive::u32; } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for Delegate { - const PALLET: &'static str = "ConvictionVoting"; - const CALL: &'static str = "delegate"; + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for Cancel { + const PALLET: &'static str = "Scheduler"; + const CALL: &'static str = "cancel"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -9729,30 +7926,31 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Undelegate the voting power of the sending account for a particular class of polls."] - #[doc = ""] - #[doc = "Tokens may be unlocked following once an amount of time consistent with the lock period"] - #[doc = "of the conviction with which the delegation was issued has passed."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be _Signed_ and the signing account must be"] - #[doc = "currently delegating."] - #[doc = ""] - #[doc = "- `class`: The class of polls to remove the delegation from."] - #[doc = ""] - #[doc = "Emits `Undelegated`."] - #[doc = ""] - #[doc = "Weight: `O(R)` where R is the number of polls the voter delegating to has"] - #[doc = " voted on. Weight is initially charged as if maximum votes, but is refunded later."] - pub struct Undelegate { - pub class: undelegate::Class, + #[doc = "Schedule a named task."] + pub struct ScheduleNamed { + pub id: schedule_named::Id, + pub when: schedule_named::When, + pub maybe_periodic: schedule_named::MaybePeriodic, + pub priority: schedule_named::Priority, + pub call: ::subxt::ext::subxt_core::alloc::boxed::Box, } - pub mod undelegate { + pub mod schedule_named { use super::runtime_types; - pub type Class = ::core::primitive::u16; + pub type Id = [::core::primitive::u8; 32usize]; + pub type When = ::core::primitive::u32; + pub type MaybePeriodic = ::core::option::Option<( + runtime_types::qp_scheduler::BlockNumberOrTimestamp< + ::core::primitive::u32, + ::core::primitive::u64, + >, + ::core::primitive::u32, + )>; + pub type Priority = ::core::primitive::u8; + pub type Call = runtime_types::quantus_runtime::RuntimeCall; } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for Undelegate { - const PALLET: &'static str = "ConvictionVoting"; - const CALL: &'static str = "undelegate"; + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for ScheduleNamed { + const PALLET: &'static str = "Scheduler"; + const CALL: &'static str = "schedule_named"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -9765,30 +7963,55 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Remove the lock caused by prior voting/delegating which has expired within a particular"] - #[doc = "class."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be _Signed_."] - #[doc = ""] - #[doc = "- `class`: The class of polls to unlock."] - #[doc = "- `target`: The account to remove the lock on."] - #[doc = ""] - #[doc = "Weight: `O(R)` with R number of vote of target."] - pub struct Unlock { - pub class: unlock::Class, - pub target: unlock::Target, + #[doc = "Cancel a named scheduled task."] + pub struct CancelNamed { + pub id: cancel_named::Id, } - pub mod unlock { + pub mod cancel_named { use super::runtime_types; - pub type Class = ::core::primitive::u16; - pub type Target = ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), + pub type Id = [::core::primitive::u8; 32usize]; + } + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for CancelNamed { + const PALLET: &'static str = "Scheduler"; + const CALL: &'static str = "cancel_named"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "Anonymously schedule a task after a delay."] + pub struct ScheduleAfter { + pub after: schedule_after::After, + pub maybe_periodic: schedule_after::MaybePeriodic, + pub priority: schedule_after::Priority, + pub call: ::subxt::ext::subxt_core::alloc::boxed::Box, + } + pub mod schedule_after { + use super::runtime_types; + pub type After = runtime_types::qp_scheduler::BlockNumberOrTimestamp< + ::core::primitive::u32, + ::core::primitive::u64, >; + pub type MaybePeriodic = ::core::option::Option<( + runtime_types::qp_scheduler::BlockNumberOrTimestamp< + ::core::primitive::u32, + ::core::primitive::u64, + >, + ::core::primitive::u32, + )>; + pub type Priority = ::core::primitive::u8; + pub type Call = runtime_types::quantus_runtime::RuntimeCall; } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for Unlock { - const PALLET: &'static str = "ConvictionVoting"; - const CALL: &'static str = "unlock"; + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for ScheduleAfter { + const PALLET: &'static str = "Scheduler"; + const CALL: &'static str = "schedule_after"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -9801,47 +8024,35 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Remove a vote for a poll."] - #[doc = ""] - #[doc = "If:"] - #[doc = "- the poll was cancelled, or"] - #[doc = "- the poll is ongoing, or"] - #[doc = "- the poll has ended such that"] - #[doc = " - the vote of the account was in opposition to the result; or"] - #[doc = " - there was no conviction to the account's vote; or"] - #[doc = " - the account made a split vote"] - #[doc = "...then the vote is removed cleanly and a following call to `unlock` may result in more"] - #[doc = "funds being available."] - #[doc = ""] - #[doc = "If, however, the poll has ended and:"] - #[doc = "- it finished corresponding to the vote of the account, and"] - #[doc = "- the account made a standard vote with conviction, and"] - #[doc = "- the lock period of the conviction is not over"] - #[doc = "...then the lock will be aggregated into the overall account's lock, which may involve"] - #[doc = "*overlocking* (where the two locks are combined into a single lock that is the maximum"] - #[doc = "of both the amount locked and the time is it locked for)."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be _Signed_, and the signer must have a vote"] - #[doc = "registered for poll `index`."] - #[doc = ""] - #[doc = "- `index`: The index of poll of the vote to be removed."] - #[doc = "- `class`: Optional parameter, if given it indicates the class of the poll. For polls"] - #[doc = " which have finished or are cancelled, this must be `Some`."] - #[doc = ""] - #[doc = "Weight: `O(R + log R)` where R is the number of polls that `target` has voted on."] - #[doc = " Weight is calculated for the maximum number of vote."] - pub struct RemoveVote { - pub class: remove_vote::Class, - pub index: remove_vote::Index, + #[doc = "Schedule a named task after a delay."] + pub struct ScheduleNamedAfter { + pub id: schedule_named_after::Id, + pub after: schedule_named_after::After, + pub maybe_periodic: schedule_named_after::MaybePeriodic, + pub priority: schedule_named_after::Priority, + pub call: + ::subxt::ext::subxt_core::alloc::boxed::Box, } - pub mod remove_vote { + pub mod schedule_named_after { use super::runtime_types; - pub type Class = ::core::option::Option<::core::primitive::u16>; - pub type Index = ::core::primitive::u32; + pub type Id = [::core::primitive::u8; 32usize]; + pub type After = runtime_types::qp_scheduler::BlockNumberOrTimestamp< + ::core::primitive::u32, + ::core::primitive::u64, + >; + pub type MaybePeriodic = ::core::option::Option<( + runtime_types::qp_scheduler::BlockNumberOrTimestamp< + ::core::primitive::u32, + ::core::primitive::u64, + >, + ::core::primitive::u32, + )>; + pub type Priority = ::core::primitive::u8; + pub type Call = runtime_types::quantus_runtime::RuntimeCall; } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for RemoveVote { - const PALLET: &'static str = "ConvictionVoting"; - const CALL: &'static str = "remove_vote"; + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for ScheduleNamedAfter { + const PALLET: &'static str = "Scheduler"; + const CALL: &'static str = "schedule_named_after"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -9854,250 +8065,375 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Remove a vote for a poll."] - #[doc = ""] - #[doc = "If the `target` is equal to the signer, then this function is exactly equivalent to"] - #[doc = "`remove_vote`. If not equal to the signer, then the vote must have expired,"] - #[doc = "either because the poll was cancelled, because the voter lost the poll or"] - #[doc = "because the conviction period is over."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be _Signed_."] + #[doc = "Set a retry configuration for a task so that, in case its scheduled run fails, it will"] + #[doc = "be retried after `period` blocks, for a total amount of `retries` retries or until it"] + #[doc = "succeeds."] #[doc = ""] - #[doc = "- `target`: The account of the vote to be removed; this account must have voted for poll"] - #[doc = " `index`."] - #[doc = "- `index`: The index of poll of the vote to be removed."] - #[doc = "- `class`: The class of the poll."] + #[doc = "Tasks which need to be scheduled for a retry are still subject to weight metering and"] + #[doc = "agenda space, same as a regular task. If a periodic task fails, it will be scheduled"] + #[doc = "normally while the task is retrying."] #[doc = ""] - #[doc = "Weight: `O(R + log R)` where R is the number of polls that `target` has voted on."] - #[doc = " Weight is calculated for the maximum number of vote."] - pub struct RemoveOtherVote { - pub target: remove_other_vote::Target, - pub class: remove_other_vote::Class, - pub index: remove_other_vote::Index, + #[doc = "Tasks scheduled as a result of a retry for a periodic task are unnamed, non-periodic"] + #[doc = "clones of the original task. Their retry configuration will be derived from the"] + #[doc = "original task's configuration, but will have a lower value for `remaining` than the"] + #[doc = "original `total_retries`."] + pub struct SetRetry { + pub task: set_retry::Task, + pub retries: set_retry::Retries, + pub period: set_retry::Period, } - pub mod remove_other_vote { + pub mod set_retry { use super::runtime_types; - pub type Target = ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), + pub type Task = ( + runtime_types::qp_scheduler::BlockNumberOrTimestamp< + ::core::primitive::u32, + ::core::primitive::u64, + >, + ::core::primitive::u32, + ); + pub type Retries = ::core::primitive::u8; + pub type Period = runtime_types::qp_scheduler::BlockNumberOrTimestamp< + ::core::primitive::u32, + ::core::primitive::u64, >; - pub type Class = ::core::primitive::u16; - pub type Index = ::core::primitive::u32; } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for RemoveOtherVote { - const PALLET: &'static str = "ConvictionVoting"; - const CALL: &'static str = "remove_other_vote"; + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for SetRetry { + const PALLET: &'static str = "Scheduler"; + const CALL: &'static str = "set_retry"; } - } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Vote in a poll. If `vote.is_aye()`, the vote is to enact the proposal;"] - #[doc = "otherwise it is a vote to keep the status quo."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be _Signed_."] + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "Set a retry configuration for a named task so that, in case its scheduled run fails, it"] + #[doc = "will be retried after `period` blocks, for a total amount of `retries` retries or until"] + #[doc = "it succeeds."] #[doc = ""] - #[doc = "- `poll_index`: The index of the poll to vote for."] - #[doc = "- `vote`: The vote configuration."] + #[doc = "Tasks which need to be scheduled for a retry are still subject to weight metering and"] + #[doc = "agenda space, same as a regular task. If a periodic task fails, it will be scheduled"] + #[doc = "normally while the task is retrying."] #[doc = ""] - #[doc = "Weight: `O(R)` where R is the number of polls the voter has voted on."] - pub fn vote( - &self, - poll_index: types::vote::PollIndex, - vote: types::vote::Vote, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "ConvictionVoting", - "vote", - types::Vote { poll_index, vote }, - [ - 57u8, 170u8, 177u8, 168u8, 158u8, 43u8, 87u8, 242u8, 176u8, 85u8, - 230u8, 64u8, 103u8, 239u8, 190u8, 6u8, 228u8, 165u8, 248u8, 77u8, - 231u8, 221u8, 186u8, 107u8, 249u8, 201u8, 226u8, 52u8, 129u8, 90u8, - 142u8, 159u8, - ], - ) + #[doc = "Tasks scheduled as a result of a retry for a periodic task are unnamed, non-periodic"] + #[doc = "clones of the original task. Their retry configuration will be derived from the"] + #[doc = "original task's configuration, but will have a lower value for `remaining` than the"] + #[doc = "original `total_retries`."] + pub struct SetRetryNamed { + pub id: set_retry_named::Id, + pub retries: set_retry_named::Retries, + pub period: set_retry_named::Period, } - #[doc = "Delegate the voting power (with some given conviction) of the sending account for a"] - #[doc = "particular class of polls."] - #[doc = ""] - #[doc = "The balance delegated is locked for as long as it's delegated, and thereafter for the"] - #[doc = "time appropriate for the conviction's lock period."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be _Signed_, and the signing account must either:"] - #[doc = " - be delegating already; or"] - #[doc = " - have no voting activity (if there is, then it will need to be removed through"] - #[doc = " `remove_vote`)."] - #[doc = ""] - #[doc = "- `to`: The account whose voting the `target` account's voting power will follow."] - #[doc = "- `class`: The class of polls to delegate. To delegate multiple classes, multiple calls"] - #[doc = " to this function are required."] - #[doc = "- `conviction`: The conviction that will be attached to the delegated votes. When the"] - #[doc = " account is undelegated, the funds will be locked for the corresponding period."] - #[doc = "- `balance`: The amount of the account's balance to be used in delegating. This must not"] - #[doc = " be more than the account's current balance."] - #[doc = ""] - #[doc = "Emits `Delegated`."] - #[doc = ""] - #[doc = "Weight: `O(R)` where R is the number of polls the voter delegating to has"] - #[doc = " voted on. Weight is initially charged as if maximum votes, but is refunded later."] - pub fn delegate( + pub mod set_retry_named { + use super::runtime_types; + pub type Id = [::core::primitive::u8; 32usize]; + pub type Retries = ::core::primitive::u8; + pub type Period = runtime_types::qp_scheduler::BlockNumberOrTimestamp< + ::core::primitive::u32, + ::core::primitive::u64, + >; + } + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for SetRetryNamed { + const PALLET: &'static str = "Scheduler"; + const CALL: &'static str = "set_retry_named"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "Removes the retry configuration of a task."] + pub struct CancelRetry { + pub task: cancel_retry::Task, + } + pub mod cancel_retry { + use super::runtime_types; + pub type Task = ( + runtime_types::qp_scheduler::BlockNumberOrTimestamp< + ::core::primitive::u32, + ::core::primitive::u64, + >, + ::core::primitive::u32, + ); + } + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for CancelRetry { + const PALLET: &'static str = "Scheduler"; + const CALL: &'static str = "cancel_retry"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "Cancel the retry configuration of a named task."] + pub struct CancelRetryNamed { + pub id: cancel_retry_named::Id, + } + pub mod cancel_retry_named { + use super::runtime_types; + pub type Id = [::core::primitive::u8; 32usize]; + } + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for CancelRetryNamed { + const PALLET: &'static str = "Scheduler"; + const CALL: &'static str = "cancel_retry_named"; + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Anonymously schedule a task."] + pub fn schedule( &self, - class: types::delegate::Class, - to: types::delegate::To, - conviction: types::delegate::Conviction, - balance: types::delegate::Balance, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { + when: types::schedule::When, + maybe_periodic: types::schedule::MaybePeriodic, + priority: types::schedule::Priority, + call: types::schedule::Call, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "ConvictionVoting", - "delegate", - types::Delegate { class, to, conviction, balance }, + "Scheduler", + "schedule", + types::Schedule { + when, + maybe_periodic, + priority, + call: ::subxt::ext::subxt_core::alloc::boxed::Box::new(call), + }, [ - 223u8, 143u8, 33u8, 94u8, 32u8, 156u8, 43u8, 40u8, 142u8, 134u8, 209u8, - 134u8, 255u8, 179u8, 97u8, 46u8, 8u8, 140u8, 5u8, 29u8, 76u8, 22u8, - 36u8, 7u8, 108u8, 190u8, 220u8, 151u8, 10u8, 47u8, 89u8, 55u8, + 216u8, 88u8, 145u8, 193u8, 191u8, 130u8, 243u8, 81u8, 132u8, 179u8, + 170u8, 148u8, 127u8, 79u8, 183u8, 62u8, 168u8, 91u8, 241u8, 9u8, 155u8, + 82u8, 12u8, 34u8, 194u8, 188u8, 108u8, 147u8, 205u8, 133u8, 97u8, + 246u8, ], ) } - #[doc = "Undelegate the voting power of the sending account for a particular class of polls."] - #[doc = ""] - #[doc = "Tokens may be unlocked following once an amount of time consistent with the lock period"] - #[doc = "of the conviction with which the delegation was issued has passed."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be _Signed_ and the signing account must be"] - #[doc = "currently delegating."] - #[doc = ""] - #[doc = "- `class`: The class of polls to remove the delegation from."] - #[doc = ""] - #[doc = "Emits `Undelegated`."] - #[doc = ""] - #[doc = "Weight: `O(R)` where R is the number of polls the voter delegating to has"] - #[doc = " voted on. Weight is initially charged as if maximum votes, but is refunded later."] - pub fn undelegate( + #[doc = "Cancel an anonymously scheduled task."] + pub fn cancel( &self, - class: types::undelegate::Class, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { + when: types::cancel::When, + index: types::cancel::Index, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "ConvictionVoting", - "undelegate", - types::Undelegate { class }, + "Scheduler", + "cancel", + types::Cancel { when, index }, [ - 140u8, 232u8, 6u8, 53u8, 228u8, 8u8, 131u8, 144u8, 65u8, 66u8, 245u8, - 247u8, 147u8, 135u8, 198u8, 57u8, 82u8, 212u8, 89u8, 46u8, 236u8, - 168u8, 200u8, 220u8, 93u8, 168u8, 101u8, 29u8, 110u8, 76u8, 67u8, - 181u8, + 134u8, 77u8, 15u8, 56u8, 137u8, 12u8, 58u8, 147u8, 164u8, 204u8, 221u8, + 150u8, 103u8, 42u8, 36u8, 79u8, 146u8, 115u8, 13u8, 194u8, 39u8, 73u8, + 109u8, 10u8, 168u8, 164u8, 190u8, 173u8, 30u8, 17u8, 35u8, 17u8, ], ) } - #[doc = "Remove the lock caused by prior voting/delegating which has expired within a particular"] - #[doc = "class."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be _Signed_."] - #[doc = ""] - #[doc = "- `class`: The class of polls to unlock."] - #[doc = "- `target`: The account to remove the lock on."] - #[doc = ""] - #[doc = "Weight: `O(R)` with R number of vote of target."] - pub fn unlock( + #[doc = "Schedule a named task."] + pub fn schedule_named( &self, - class: types::unlock::Class, - target: types::unlock::Target, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { + id: types::schedule_named::Id, + when: types::schedule_named::When, + maybe_periodic: types::schedule_named::MaybePeriodic, + priority: types::schedule_named::Priority, + call: types::schedule_named::Call, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload + { ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "ConvictionVoting", - "unlock", - types::Unlock { class, target }, + "Scheduler", + "schedule_named", + types::ScheduleNamed { + id, + when, + maybe_periodic, + priority, + call: ::subxt::ext::subxt_core::alloc::boxed::Box::new(call), + }, [ - 79u8, 5u8, 252u8, 237u8, 109u8, 238u8, 157u8, 237u8, 125u8, 171u8, - 65u8, 160u8, 102u8, 192u8, 5u8, 141u8, 179u8, 249u8, 253u8, 213u8, - 105u8, 251u8, 241u8, 145u8, 186u8, 177u8, 244u8, 139u8, 71u8, 140u8, - 173u8, 108u8, + 6u8, 221u8, 216u8, 145u8, 84u8, 222u8, 174u8, 166u8, 197u8, 130u8, + 223u8, 50u8, 208u8, 143u8, 3u8, 159u8, 116u8, 11u8, 159u8, 171u8, + 144u8, 7u8, 221u8, 184u8, 84u8, 43u8, 46u8, 113u8, 23u8, 35u8, 212u8, + 120u8, ], ) } - #[doc = "Remove a vote for a poll."] - #[doc = ""] - #[doc = "If:"] - #[doc = "- the poll was cancelled, or"] - #[doc = "- the poll is ongoing, or"] - #[doc = "- the poll has ended such that"] - #[doc = " - the vote of the account was in opposition to the result; or"] - #[doc = " - there was no conviction to the account's vote; or"] - #[doc = " - the account made a split vote"] - #[doc = "...then the vote is removed cleanly and a following call to `unlock` may result in more"] - #[doc = "funds being available."] - #[doc = ""] - #[doc = "If, however, the poll has ended and:"] - #[doc = "- it finished corresponding to the vote of the account, and"] - #[doc = "- the account made a standard vote with conviction, and"] - #[doc = "- the lock period of the conviction is not over"] - #[doc = "...then the lock will be aggregated into the overall account's lock, which may involve"] - #[doc = "*overlocking* (where the two locks are combined into a single lock that is the maximum"] - #[doc = "of both the amount locked and the time is it locked for)."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be _Signed_, and the signer must have a vote"] - #[doc = "registered for poll `index`."] - #[doc = ""] - #[doc = "- `index`: The index of poll of the vote to be removed."] - #[doc = "- `class`: Optional parameter, if given it indicates the class of the poll. For polls"] - #[doc = " which have finished or are cancelled, this must be `Some`."] - #[doc = ""] - #[doc = "Weight: `O(R + log R)` where R is the number of polls that `target` has voted on."] - #[doc = " Weight is calculated for the maximum number of vote."] - pub fn remove_vote( + #[doc = "Cancel a named scheduled task."] + pub fn cancel_named( &self, - class: types::remove_vote::Class, - index: types::remove_vote::Index, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { + id: types::cancel_named::Id, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "ConvictionVoting", - "remove_vote", - types::RemoveVote { class, index }, + "Scheduler", + "cancel_named", + types::CancelNamed { id }, [ - 255u8, 108u8, 211u8, 146u8, 168u8, 231u8, 207u8, 44u8, 76u8, 24u8, - 235u8, 60u8, 23u8, 79u8, 192u8, 192u8, 46u8, 40u8, 134u8, 27u8, 125u8, - 114u8, 125u8, 247u8, 85u8, 102u8, 76u8, 159u8, 34u8, 167u8, 152u8, - 148u8, + 205u8, 35u8, 28u8, 57u8, 224u8, 7u8, 49u8, 233u8, 236u8, 163u8, 93u8, + 236u8, 103u8, 69u8, 65u8, 51u8, 121u8, 84u8, 9u8, 196u8, 147u8, 122u8, + 227u8, 200u8, 181u8, 233u8, 62u8, 240u8, 174u8, 83u8, 129u8, 193u8, ], ) } - #[doc = "Remove a vote for a poll."] - #[doc = ""] - #[doc = "If the `target` is equal to the signer, then this function is exactly equivalent to"] - #[doc = "`remove_vote`. If not equal to the signer, then the vote must have expired,"] - #[doc = "either because the poll was cancelled, because the voter lost the poll or"] - #[doc = "because the conviction period is over."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be _Signed_."] - #[doc = ""] - #[doc = "- `target`: The account of the vote to be removed; this account must have voted for poll"] - #[doc = " `index`."] - #[doc = "- `index`: The index of poll of the vote to be removed."] - #[doc = "- `class`: The class of the poll."] - #[doc = ""] - #[doc = "Weight: `O(R + log R)` where R is the number of polls that `target` has voted on."] - #[doc = " Weight is calculated for the maximum number of vote."] - pub fn remove_other_vote( + #[doc = "Anonymously schedule a task after a delay."] + pub fn schedule_after( &self, - target: types::remove_other_vote::Target, - class: types::remove_other_vote::Class, - index: types::remove_other_vote::Index, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload + after: types::schedule_after::After, + maybe_periodic: types::schedule_after::MaybePeriodic, + priority: types::schedule_after::Priority, + call: types::schedule_after::Call, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "ConvictionVoting", - "remove_other_vote", - types::RemoveOtherVote { target, class, index }, - [ - 165u8, 26u8, 166u8, 37u8, 10u8, 174u8, 243u8, 10u8, 73u8, 93u8, 213u8, - 69u8, 200u8, 16u8, 48u8, 146u8, 160u8, 92u8, 28u8, 26u8, 158u8, 55u8, - 6u8, 251u8, 36u8, 132u8, 46u8, 195u8, 107u8, 34u8, 0u8, 100u8, - ], - ) + "Scheduler", + "schedule_after", + types::ScheduleAfter { + after, + maybe_periodic, + priority, + call: ::subxt::ext::subxt_core::alloc::boxed::Box::new(call), + }, + [ + 239u8, 195u8, 20u8, 34u8, 177u8, 205u8, 131u8, 51u8, 116u8, 199u8, + 94u8, 248u8, 35u8, 183u8, 134u8, 253u8, 193u8, 74u8, 218u8, 106u8, + 231u8, 225u8, 166u8, 157u8, 216u8, 15u8, 110u8, 24u8, 28u8, 67u8, 1u8, + 160u8, + ], + ) + } + #[doc = "Schedule a named task after a delay."] + pub fn schedule_named_after( + &self, + id: types::schedule_named_after::Id, + after: types::schedule_named_after::After, + maybe_periodic: types::schedule_named_after::MaybePeriodic, + priority: types::schedule_named_after::Priority, + call: types::schedule_named_after::Call, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload + { + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "Scheduler", + "schedule_named_after", + types::ScheduleNamedAfter { + id, + after, + maybe_periodic, + priority, + call: ::subxt::ext::subxt_core::alloc::boxed::Box::new(call), + }, + [ + 107u8, 174u8, 73u8, 0u8, 141u8, 214u8, 253u8, 93u8, 53u8, 22u8, 203u8, + 101u8, 77u8, 245u8, 67u8, 214u8, 219u8, 150u8, 90u8, 21u8, 211u8, + 179u8, 195u8, 194u8, 111u8, 49u8, 85u8, 67u8, 246u8, 9u8, 165u8, 251u8, + ], + ) + } + #[doc = "Set a retry configuration for a task so that, in case its scheduled run fails, it will"] + #[doc = "be retried after `period` blocks, for a total amount of `retries` retries or until it"] + #[doc = "succeeds."] + #[doc = ""] + #[doc = "Tasks which need to be scheduled for a retry are still subject to weight metering and"] + #[doc = "agenda space, same as a regular task. If a periodic task fails, it will be scheduled"] + #[doc = "normally while the task is retrying."] + #[doc = ""] + #[doc = "Tasks scheduled as a result of a retry for a periodic task are unnamed, non-periodic"] + #[doc = "clones of the original task. Their retry configuration will be derived from the"] + #[doc = "original task's configuration, but will have a lower value for `remaining` than the"] + #[doc = "original `total_retries`."] + pub fn set_retry( + &self, + task: types::set_retry::Task, + retries: types::set_retry::Retries, + period: types::set_retry::Period, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "Scheduler", + "set_retry", + types::SetRetry { task, retries, period }, + [ + 31u8, 128u8, 255u8, 13u8, 13u8, 252u8, 74u8, 151u8, 60u8, 242u8, 152u8, + 58u8, 190u8, 155u8, 132u8, 65u8, 139u8, 208u8, 222u8, 175u8, 89u8, + 222u8, 186u8, 98u8, 53u8, 125u8, 71u8, 55u8, 95u8, 2u8, 76u8, 248u8, + ], + ) + } + #[doc = "Set a retry configuration for a named task so that, in case its scheduled run fails, it"] + #[doc = "will be retried after `period` blocks, for a total amount of `retries` retries or until"] + #[doc = "it succeeds."] + #[doc = ""] + #[doc = "Tasks which need to be scheduled for a retry are still subject to weight metering and"] + #[doc = "agenda space, same as a regular task. If a periodic task fails, it will be scheduled"] + #[doc = "normally while the task is retrying."] + #[doc = ""] + #[doc = "Tasks scheduled as a result of a retry for a periodic task are unnamed, non-periodic"] + #[doc = "clones of the original task. Their retry configuration will be derived from the"] + #[doc = "original task's configuration, but will have a lower value for `remaining` than the"] + #[doc = "original `total_retries`."] + pub fn set_retry_named( + &self, + id: types::set_retry_named::Id, + retries: types::set_retry_named::Retries, + period: types::set_retry_named::Period, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload + { + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "Scheduler", + "set_retry_named", + types::SetRetryNamed { id, retries, period }, + [ + 102u8, 70u8, 114u8, 48u8, 180u8, 194u8, 107u8, 81u8, 104u8, 117u8, + 33u8, 169u8, 43u8, 172u8, 61u8, 129u8, 143u8, 221u8, 44u8, 101u8, + 235u8, 228u8, 224u8, 71u8, 65u8, 223u8, 180u8, 130u8, 83u8, 89u8, + 157u8, 75u8, + ], + ) + } + #[doc = "Removes the retry configuration of a task."] + pub fn cancel_retry( + &self, + task: types::cancel_retry::Task, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "Scheduler", + "cancel_retry", + types::CancelRetry { task }, + [ + 153u8, 252u8, 168u8, 142u8, 100u8, 114u8, 25u8, 46u8, 225u8, 95u8, + 243u8, 78u8, 160u8, 175u8, 17u8, 33u8, 27u8, 241u8, 149u8, 187u8, + 228u8, 182u8, 233u8, 74u8, 10u8, 228u8, 117u8, 218u8, 210u8, 127u8, + 245u8, 105u8, + ], + ) + } + #[doc = "Cancel the retry configuration of a named task."] + pub fn cancel_retry_named( + &self, + id: types::cancel_retry_named::Id, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload + { + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "Scheduler", + "cancel_retry_named", + types::CancelRetryNamed { id }, + [ + 76u8, 157u8, 253u8, 113u8, 162u8, 54u8, 98u8, 21u8, 62u8, 44u8, 155u8, + 202u8, 2u8, 28u8, 153u8, 219u8, 67u8, 166u8, 206u8, 79u8, 139u8, 3u8, + 119u8, 182u8, 254u8, 134u8, 143u8, 121u8, 155u8, 220u8, 192u8, 209u8, + ], + ) } } } - #[doc = "The `Event` enum of this pallet"] - pub type Event = runtime_types::pallet_conviction_voting::pallet::Event; + #[doc = "Events type."] + pub type Event = runtime_types::pallet_scheduler::pallet::Event; pub mod events { use super::runtime_types; #[derive( @@ -10107,16 +8443,22 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "An account has delegated their vote to another account. \\[who, target\\]"] - pub struct Delegated(pub delegated::Field0, pub delegated::Field1); - pub mod delegated { + #[doc = "Scheduled some task."] + pub struct Scheduled { + pub when: scheduled::When, + pub index: scheduled::Index, + } + pub mod scheduled { use super::runtime_types; - pub type Field0 = ::subxt::ext::subxt_core::utils::AccountId32; - pub type Field1 = ::subxt::ext::subxt_core::utils::AccountId32; + pub type When = runtime_types::qp_scheduler::BlockNumberOrTimestamp< + ::core::primitive::u32, + ::core::primitive::u64, + >; + pub type Index = ::core::primitive::u32; } - impl ::subxt::ext::subxt_core::events::StaticEvent for Delegated { - const PALLET: &'static str = "ConvictionVoting"; - const EVENT: &'static str = "Delegated"; + impl ::subxt::ext::subxt_core::events::StaticEvent for Scheduled { + const PALLET: &'static str = "Scheduler"; + const EVENT: &'static str = "Scheduled"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -10125,15 +8467,22 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "An \\[account\\] has cancelled a previous delegation operation."] - pub struct Undelegated(pub undelegated::Field0); - pub mod undelegated { + #[doc = "Canceled some task."] + pub struct Canceled { + pub when: canceled::When, + pub index: canceled::Index, + } + pub mod canceled { use super::runtime_types; - pub type Field0 = ::subxt::ext::subxt_core::utils::AccountId32; + pub type When = runtime_types::qp_scheduler::BlockNumberOrTimestamp< + ::core::primitive::u32, + ::core::primitive::u64, + >; + pub type Index = ::core::primitive::u32; } - impl ::subxt::ext::subxt_core::events::StaticEvent for Undelegated { - const PALLET: &'static str = "ConvictionVoting"; - const EVENT: &'static str = "Undelegated"; + impl ::subxt::ext::subxt_core::events::StaticEvent for Canceled { + const PALLET: &'static str = "Scheduler"; + const EVENT: &'static str = "Canceled"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -10142,21 +8491,28 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "An account that has voted"] - pub struct Voted { - pub who: voted::Who, - pub vote: voted::Vote, + #[doc = "Dispatched some task."] + pub struct Dispatched { + pub task: dispatched::Task, + pub id: dispatched::Id, + pub result: dispatched::Result, } - pub mod voted { + pub mod dispatched { use super::runtime_types; - pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; - pub type Vote = runtime_types::pallet_conviction_voting::vote::AccountVote< - ::core::primitive::u128, - >; + pub type Task = ( + runtime_types::qp_scheduler::BlockNumberOrTimestamp< + ::core::primitive::u32, + ::core::primitive::u64, + >, + ::core::primitive::u32, + ); + pub type Id = ::core::option::Option<[::core::primitive::u8; 32usize]>; + pub type Result = + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>; } - impl ::subxt::ext::subxt_core::events::StaticEvent for Voted { - const PALLET: &'static str = "ConvictionVoting"; - const EVENT: &'static str = "Voted"; + impl ::subxt::ext::subxt_core::events::StaticEvent for Dispatched { + const PALLET: &'static str = "Scheduler"; + const EVENT: &'static str = "Dispatched"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -10165,177 +8521,443 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "A vote that been removed"] - pub struct VoteRemoved { - pub who: vote_removed::Who, - pub vote: vote_removed::Vote, + #[doc = "Set a retry configuration for some task."] + pub struct RetrySet { + pub task: retry_set::Task, + pub id: retry_set::Id, + pub period: retry_set::Period, + pub retries: retry_set::Retries, } - pub mod vote_removed { + pub mod retry_set { use super::runtime_types; - pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; - pub type Vote = runtime_types::pallet_conviction_voting::vote::AccountVote< - ::core::primitive::u128, + pub type Task = ( + runtime_types::qp_scheduler::BlockNumberOrTimestamp< + ::core::primitive::u32, + ::core::primitive::u64, + >, + ::core::primitive::u32, + ); + pub type Id = ::core::option::Option<[::core::primitive::u8; 32usize]>; + pub type Period = runtime_types::qp_scheduler::BlockNumberOrTimestamp< + ::core::primitive::u32, + ::core::primitive::u64, >; + pub type Retries = ::core::primitive::u8; } - impl ::subxt::ext::subxt_core::events::StaticEvent for VoteRemoved { - const PALLET: &'static str = "ConvictionVoting"; - const EVENT: &'static str = "VoteRemoved"; + impl ::subxt::ext::subxt_core::events::StaticEvent for RetrySet { + const PALLET: &'static str = "Scheduler"; + const EVENT: &'static str = "RetrySet"; } - } - pub mod storage { - use super::runtime_types; - pub mod types { + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + #[doc = "Cancel a retry configuration for some task."] + pub struct RetryCancelled { + pub task: retry_cancelled::Task, + pub id: retry_cancelled::Id, + } + pub mod retry_cancelled { use super::runtime_types; - pub mod voting_for { - use super::runtime_types; - pub type VotingFor = runtime_types::pallet_conviction_voting::vote::Voting< - ::core::primitive::u128, - ::subxt::ext::subxt_core::utils::AccountId32, + pub type Task = ( + runtime_types::qp_scheduler::BlockNumberOrTimestamp< + ::core::primitive::u32, + ::core::primitive::u64, + >, + ::core::primitive::u32, + ); + pub type Id = ::core::option::Option<[::core::primitive::u8; 32usize]>; + } + impl ::subxt::ext::subxt_core::events::StaticEvent for RetryCancelled { + const PALLET: &'static str = "Scheduler"; + const EVENT: &'static str = "RetryCancelled"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + #[doc = "The call for the provided hash was not found so the task has been aborted."] + pub struct CallUnavailable { + pub task: call_unavailable::Task, + pub id: call_unavailable::Id, + } + pub mod call_unavailable { + use super::runtime_types; + pub type Task = ( + runtime_types::qp_scheduler::BlockNumberOrTimestamp< + ::core::primitive::u32, + ::core::primitive::u64, + >, + ::core::primitive::u32, + ); + pub type Id = ::core::option::Option<[::core::primitive::u8; 32usize]>; + } + impl ::subxt::ext::subxt_core::events::StaticEvent for CallUnavailable { + const PALLET: &'static str = "Scheduler"; + const EVENT: &'static str = "CallUnavailable"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + #[doc = "The given task was unable to be renewed since the agenda is full at that block."] + pub struct PeriodicFailed { + pub task: periodic_failed::Task, + pub id: periodic_failed::Id, + } + pub mod periodic_failed { + use super::runtime_types; + pub type Task = ( + runtime_types::qp_scheduler::BlockNumberOrTimestamp< + ::core::primitive::u32, + ::core::primitive::u64, + >, + ::core::primitive::u32, + ); + pub type Id = ::core::option::Option<[::core::primitive::u8; 32usize]>; + } + impl ::subxt::ext::subxt_core::events::StaticEvent for PeriodicFailed { + const PALLET: &'static str = "Scheduler"; + const EVENT: &'static str = "PeriodicFailed"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + #[doc = "The given task was unable to be retried since the agenda is full at that block or there"] + #[doc = "was not enough weight to reschedule it."] + pub struct RetryFailed { + pub task: retry_failed::Task, + pub id: retry_failed::Id, + } + pub mod retry_failed { + use super::runtime_types; + pub type Task = ( + runtime_types::qp_scheduler::BlockNumberOrTimestamp< + ::core::primitive::u32, + ::core::primitive::u64, + >, + ::core::primitive::u32, + ); + pub type Id = ::core::option::Option<[::core::primitive::u8; 32usize]>; + } + impl ::subxt::ext::subxt_core::events::StaticEvent for RetryFailed { + const PALLET: &'static str = "Scheduler"; + const EVENT: &'static str = "RetryFailed"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + #[doc = "The given task can never be executed since it is overweight."] + pub struct PermanentlyOverweight { + pub task: permanently_overweight::Task, + pub id: permanently_overweight::Id, + } + pub mod permanently_overweight { + use super::runtime_types; + pub type Task = ( + runtime_types::qp_scheduler::BlockNumberOrTimestamp< ::core::primitive::u32, + ::core::primitive::u64, + >, + ::core::primitive::u32, + ); + pub type Id = ::core::option::Option<[::core::primitive::u8; 32usize]>; + } + impl ::subxt::ext::subxt_core::events::StaticEvent for PermanentlyOverweight { + const PALLET: &'static str = "Scheduler"; + const EVENT: &'static str = "PermanentlyOverweight"; + } + } + pub mod storage { + use super::runtime_types; + pub mod types { + use super::runtime_types; + pub mod incomplete_block_since { + use super::runtime_types; + pub type IncompleteBlockSince = ::core::primitive::u32; + } + pub mod incomplete_timestamp_since { + use super::runtime_types; + pub type IncompleteTimestampSince = ::core::primitive::u64; + } + pub mod last_processed_timestamp { + use super::runtime_types; + pub type LastProcessedTimestamp = ::core::primitive::u64; + } + pub mod agenda { + use super::runtime_types; + pub type Agenda = runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::option::Option< + runtime_types::pallet_scheduler::Scheduled< + [::core::primitive::u8; 32usize], + runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::quantus_runtime::RuntimeCall, + runtime_types::poseidon_resonance::PoseidonHasher, + >, + ::core::primitive::u32, + runtime_types::quantus_runtime::OriginCaller, + ::subxt::ext::subxt_core::utils::AccountId32, + ::core::primitive::u64, + >, + >, + >; + pub type Param0 = runtime_types::qp_scheduler::BlockNumberOrTimestamp< ::core::primitive::u32, + ::core::primitive::u64, >; - pub type Param0 = ::subxt::ext::subxt_core::utils::AccountId32; - pub type Param1 = ::core::primitive::u16; } - pub mod class_locks_for { + pub mod retries { use super::runtime_types; - pub type ClassLocksFor = - runtime_types::bounded_collections::bounded_vec::BoundedVec<( - ::core::primitive::u16, - ::core::primitive::u128, - )>; - pub type Param0 = ::subxt::ext::subxt_core::utils::AccountId32; + pub type Retries = runtime_types::pallet_scheduler::RetryConfig< + runtime_types::qp_scheduler::BlockNumberOrTimestamp< + ::core::primitive::u32, + ::core::primitive::u64, + >, + >; + pub type Param0 = ( + runtime_types::qp_scheduler::BlockNumberOrTimestamp< + ::core::primitive::u32, + ::core::primitive::u64, + >, + ::core::primitive::u32, + ); + } + pub mod lookup { + use super::runtime_types; + pub type Lookup = ( + runtime_types::qp_scheduler::BlockNumberOrTimestamp< + ::core::primitive::u32, + ::core::primitive::u64, + >, + ::core::primitive::u32, + ); + pub type Param0 = [::core::primitive::u8; 32usize]; } } pub struct StorageApi; impl StorageApi { - #[doc = " All voting for a particular voter in a particular voting class. We store the balance for the"] - #[doc = " number of votes that we have recorded."] - pub fn voting_for_iter( + #[doc = " Tracks incomplete block-based agendas that need to be processed in a later block."] + pub fn incomplete_block_since( &self, ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< (), - types::voting_for::VotingFor, - (), - ::subxt::ext::subxt_core::utils::Yes, + types::incomplete_block_since::IncompleteBlockSince, ::subxt::ext::subxt_core::utils::Yes, + (), + (), > { ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "ConvictionVoting", - "VotingFor", + "Scheduler", + "IncompleteBlockSince", (), [ - 76u8, 63u8, 153u8, 193u8, 39u8, 137u8, 186u8, 29u8, 202u8, 56u8, 169u8, - 56u8, 103u8, 138u8, 192u8, 18u8, 179u8, 114u8, 56u8, 121u8, 197u8, - 12u8, 29u8, 239u8, 220u8, 231u8, 24u8, 46u8, 134u8, 99u8, 53u8, 206u8, + 134u8, 34u8, 161u8, 236u8, 176u8, 35u8, 218u8, 109u8, 229u8, 93u8, + 29u8, 95u8, 81u8, 106u8, 98u8, 65u8, 132u8, 91u8, 237u8, 225u8, 75u8, + 125u8, 81u8, 218u8, 72u8, 215u8, 20u8, 66u8, 160u8, 196u8, 68u8, 34u8, ], ) } - #[doc = " All voting for a particular voter in a particular voting class. We store the balance for the"] - #[doc = " number of votes that we have recorded."] - pub fn voting_for_iter1( + #[doc = " Tracks incomplete timestamp-based agendas that need to be processed in a later block."] + pub fn incomplete_timestamp_since( &self, - _0: types::voting_for::Param0, ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::voting_for::Param0, - >, - types::voting_for::VotingFor, (), + types::incomplete_timestamp_since::IncompleteTimestampSince, ::subxt::ext::subxt_core::utils::Yes, - ::subxt::ext::subxt_core::utils::Yes, + (), + (), > { ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "ConvictionVoting", - "VotingFor", - ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), + "Scheduler", + "IncompleteTimestampSince", + (), [ - 76u8, 63u8, 153u8, 193u8, 39u8, 137u8, 186u8, 29u8, 202u8, 56u8, 169u8, - 56u8, 103u8, 138u8, 192u8, 18u8, 179u8, 114u8, 56u8, 121u8, 197u8, - 12u8, 29u8, 239u8, 220u8, 231u8, 24u8, 46u8, 134u8, 99u8, 53u8, 206u8, + 223u8, 125u8, 99u8, 28u8, 81u8, 135u8, 125u8, 26u8, 3u8, 20u8, 32u8, + 125u8, 141u8, 114u8, 100u8, 38u8, 219u8, 191u8, 30u8, 88u8, 82u8, 33u8, + 140u8, 223u8, 168u8, 84u8, 144u8, 85u8, 57u8, 241u8, 97u8, 141u8, ], ) } - #[doc = " All voting for a particular voter in a particular voting class. We store the balance for the"] - #[doc = " number of votes that we have recorded."] - pub fn voting_for( + #[doc = " Tracks the last timestamp bucket that was fully processed."] + #[doc = " Used to avoid reprocessing all buckets from 0 on every run."] + pub fn last_processed_timestamp( &self, - _0: types::voting_for::Param0, - _1: types::voting_for::Param1, ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - ( - ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::voting_for::Param0, - >, - ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::voting_for::Param1, - >, - ), - types::voting_for::VotingFor, - ::subxt::ext::subxt_core::utils::Yes, + (), + types::last_processed_timestamp::LastProcessedTimestamp, ::subxt::ext::subxt_core::utils::Yes, (), + (), > { ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "ConvictionVoting", - "VotingFor", - ( - ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), - ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_1), - ), + "Scheduler", + "LastProcessedTimestamp", + (), [ - 76u8, 63u8, 153u8, 193u8, 39u8, 137u8, 186u8, 29u8, 202u8, 56u8, 169u8, - 56u8, 103u8, 138u8, 192u8, 18u8, 179u8, 114u8, 56u8, 121u8, 197u8, - 12u8, 29u8, 239u8, 220u8, 231u8, 24u8, 46u8, 134u8, 99u8, 53u8, 206u8, + 172u8, 193u8, 6u8, 47u8, 185u8, 134u8, 179u8, 132u8, 178u8, 0u8, 228u8, + 198u8, 232u8, 24u8, 85u8, 199u8, 102u8, 222u8, 246u8, 178u8, 8u8, + 221u8, 51u8, 188u8, 239u8, 218u8, 112u8, 245u8, 46u8, 146u8, 65u8, + 119u8, ], ) } - #[doc = " The voting classes which have a non-zero lock requirement and the lock amounts which they"] - #[doc = " require. The actual amount locked on behalf of this pallet should always be the maximum of"] - #[doc = " this list."] - pub fn class_locks_for_iter( + #[doc = " Items to be executed, indexed by the block number that they should be executed on."] + pub fn agenda_iter( &self, ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< (), - types::class_locks_for::ClassLocksFor, + types::agenda::Agenda, (), ::subxt::ext::subxt_core::utils::Yes, ::subxt::ext::subxt_core::utils::Yes, > { ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "ConvictionVoting", - "ClassLocksFor", + "Scheduler", + "Agenda", (), [ - 74u8, 74u8, 8u8, 82u8, 215u8, 61u8, 13u8, 9u8, 44u8, 222u8, 33u8, - 245u8, 195u8, 124u8, 6u8, 174u8, 65u8, 245u8, 71u8, 42u8, 47u8, 46u8, - 164u8, 231u8, 11u8, 245u8, 115u8, 207u8, 209u8, 137u8, 90u8, 6u8, + 188u8, 177u8, 84u8, 167u8, 206u8, 4u8, 136u8, 133u8, 67u8, 121u8, + 247u8, 186u8, 6u8, 46u8, 115u8, 104u8, 239u8, 41u8, 75u8, 143u8, 24u8, + 155u8, 212u8, 196u8, 166u8, 82u8, 63u8, 39u8, 104u8, 21u8, 19u8, 93u8, ], ) } - #[doc = " The voting classes which have a non-zero lock requirement and the lock amounts which they"] - #[doc = " require. The actual amount locked on behalf of this pallet should always be the maximum of"] - #[doc = " this list."] - pub fn class_locks_for( + #[doc = " Items to be executed, indexed by the block number that they should be executed on."] + pub fn agenda( &self, - _0: types::class_locks_for::Param0, + _0: types::agenda::Param0, ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::class_locks_for::Param0, + types::agenda::Param0, >, - types::class_locks_for::ClassLocksFor, + types::agenda::Agenda, ::subxt::ext::subxt_core::utils::Yes, ::subxt::ext::subxt_core::utils::Yes, (), > { ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "ConvictionVoting", - "ClassLocksFor", + "Scheduler", + "Agenda", ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), [ - 74u8, 74u8, 8u8, 82u8, 215u8, 61u8, 13u8, 9u8, 44u8, 222u8, 33u8, - 245u8, 195u8, 124u8, 6u8, 174u8, 65u8, 245u8, 71u8, 42u8, 47u8, 46u8, - 164u8, 231u8, 11u8, 245u8, 115u8, 207u8, 209u8, 137u8, 90u8, 6u8, + 188u8, 177u8, 84u8, 167u8, 206u8, 4u8, 136u8, 133u8, 67u8, 121u8, + 247u8, 186u8, 6u8, 46u8, 115u8, 104u8, 239u8, 41u8, 75u8, 143u8, 24u8, + 155u8, 212u8, 196u8, 166u8, 82u8, 63u8, 39u8, 104u8, 21u8, 19u8, 93u8, + ], + ) + } + #[doc = " Retry configurations for items to be executed, indexed by task address."] + pub fn retries_iter( + &self, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::retries::Retries, + (), + (), + ::subxt::ext::subxt_core::utils::Yes, + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "Scheduler", + "Retries", + (), + [ + 94u8, 54u8, 136u8, 189u8, 244u8, 118u8, 102u8, 67u8, 203u8, 238u8, + 109u8, 130u8, 229u8, 246u8, 244u8, 68u8, 59u8, 132u8, 12u8, 9u8, 219u8, + 176u8, 251u8, 1u8, 216u8, 200u8, 205u8, 176u8, 145u8, 201u8, 206u8, + 108u8, + ], + ) + } + #[doc = " Retry configurations for items to be executed, indexed by task address."] + pub fn retries( + &self, + _0: types::retries::Param0, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + ::subxt::ext::subxt_core::storage::address::StaticStorageKey< + types::retries::Param0, + >, + types::retries::Retries, + ::subxt::ext::subxt_core::utils::Yes, + (), + (), + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "Scheduler", + "Retries", + ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), + [ + 94u8, 54u8, 136u8, 189u8, 244u8, 118u8, 102u8, 67u8, 203u8, 238u8, + 109u8, 130u8, 229u8, 246u8, 244u8, 68u8, 59u8, 132u8, 12u8, 9u8, 219u8, + 176u8, 251u8, 1u8, 216u8, 200u8, 205u8, 176u8, 145u8, 201u8, 206u8, + 108u8, + ], + ) + } + #[doc = " Lookup from a name to the block number and index of the task."] + #[doc = ""] + #[doc = " For v3 -> v4 the previously unbounded identities are Blake2-256 hashed to form the v4"] + #[doc = " identities."] + pub fn lookup_iter( + &self, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::lookup::Lookup, + (), + (), + ::subxt::ext::subxt_core::utils::Yes, + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "Scheduler", + "Lookup", + (), + [ + 133u8, 194u8, 6u8, 16u8, 27u8, 10u8, 159u8, 62u8, 113u8, 59u8, 58u8, + 225u8, 244u8, 206u8, 35u8, 113u8, 41u8, 40u8, 89u8, 71u8, 133u8, 117u8, + 33u8, 192u8, 106u8, 85u8, 83u8, 186u8, 36u8, 160u8, 144u8, 221u8, + ], + ) + } + #[doc = " Lookup from a name to the block number and index of the task."] + #[doc = ""] + #[doc = " For v3 -> v4 the previously unbounded identities are Blake2-256 hashed to form the v4"] + #[doc = " identities."] + pub fn lookup( + &self, + _0: types::lookup::Param0, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + ::subxt::ext::subxt_core::storage::address::StaticStorageKey< + types::lookup::Param0, + >, + types::lookup::Lookup, + ::subxt::ext::subxt_core::utils::Yes, + (), + (), + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "Scheduler", + "Lookup", + ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), + [ + 133u8, 194u8, 6u8, 16u8, 27u8, 10u8, 159u8, 62u8, 113u8, 59u8, 58u8, + 225u8, 244u8, 206u8, 35u8, 113u8, 41u8, 40u8, 89u8, 71u8, 133u8, 117u8, + 33u8, 192u8, 106u8, 85u8, 83u8, 186u8, 36u8, 160u8, 144u8, 221u8, ], ) } @@ -10345,18 +8967,36 @@ pub mod api { use super::runtime_types; pub struct ConstantsApi; impl ConstantsApi { - #[doc = " The maximum number of concurrent votes an account may have."] + #[doc = " The maximum weight that may be scheduled per block for any dispatchables."] + pub fn maximum_weight( + &self, + ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< + runtime_types::sp_weights::weight_v2::Weight, + > { + ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( + "Scheduler", + "MaximumWeight", + [ + 149u8, 252u8, 129u8, 80u8, 169u8, 36u8, 79u8, 127u8, 240u8, 156u8, + 56u8, 202u8, 219u8, 86u8, 5u8, 65u8, 245u8, 148u8, 138u8, 243u8, 210u8, + 128u8, 234u8, 216u8, 240u8, 219u8, 123u8, 235u8, 21u8, 158u8, 237u8, + 112u8, + ], + ) + } + #[doc = " The maximum number of scheduled calls in the queue for a single block."] #[doc = ""] - #[doc = " Also used to compute weight, an overly large value can lead to extrinsics with large"] - #[doc = " weight estimation: see `delegate` for instance."] - pub fn max_votes( + #[doc = " NOTE:"] + #[doc = " + Dependent pallets' benchmarks might require a higher limit for the setting. Set a"] + #[doc = " higher limit under `runtime-benchmarks` feature."] + pub fn max_scheduled_per_block( &self, ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< ::core::primitive::u32, > { ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "ConvictionVoting", - "MaxVotes", + "Scheduler", + "MaxScheduledPerBlock", [ 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, @@ -10365,35 +9005,34 @@ pub mod api { ], ) } - #[doc = " The minimum period of vote locking."] + #[doc = " Precision of the timestamp buckets."] #[doc = ""] - #[doc = " It should be no shorter than enactment period to ensure that in the case of an approval,"] - #[doc = " those successful voters are locked into the consequences that their votes entail."] - pub fn vote_locking_period( + #[doc = " Timestamp based dispatches are rounded to the nearest bucket of this precision."] + pub fn timestamp_bucket_size( &self, ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< - ::core::primitive::u32, + ::core::primitive::u64, > { ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "ConvictionVoting", - "VoteLockingPeriod", + "Scheduler", + "TimestampBucketSize", [ - 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, + 128u8, 214u8, 205u8, 242u8, 181u8, 142u8, 124u8, 231u8, 190u8, 146u8, + 59u8, 226u8, 157u8, 101u8, 103u8, 117u8, 249u8, 65u8, 18u8, 191u8, + 103u8, 119u8, 53u8, 85u8, 81u8, 96u8, 220u8, 42u8, 184u8, 239u8, 42u8, + 246u8, ], ) } } } } - pub mod tech_collective { + pub mod utility { use super::{root_mod, runtime_types}; #[doc = "The `Error` enum of this pallet."] - pub type Error = runtime_types::pallet_ranked_collective::pallet::Error; + pub type Error = runtime_types::pallet_utility::pallet::Error; #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] - pub type Call = runtime_types::pallet_ranked_collective::pallet::Call; + pub type Call = runtime_types::pallet_utility::pallet::Call; pub mod calls { use super::{root_mod, runtime_types}; type DispatchError = runtime_types::sp_runtime::DispatchError; @@ -10410,25 +9049,36 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Introduce a new member."] + #[doc = "Send a batch of dispatch calls."] #[doc = ""] - #[doc = "- `origin`: Must be the `AddOrigin`."] - #[doc = "- `who`: Account of non-member which will become a member."] + #[doc = "May be called from any origin except `None`."] #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub struct AddMember { - pub who: add_member::Who, + #[doc = "- `calls`: The calls to be dispatched from the same origin. The number of call must not"] + #[doc = " exceed the constant: `batched_calls_limit` (available in constant metadata)."] + #[doc = ""] + #[doc = "If origin is root then the calls are dispatched without checking origin filter. (This"] + #[doc = "includes bypassing `frame_system::Config::BaseCallFilter`)."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- O(C) where C is the number of calls to be batched."] + #[doc = ""] + #[doc = "This will return `Ok` in all circumstances. To determine the success of the batch, an"] + #[doc = "event is deposited. If a call failed and the batch was interrupted, then the"] + #[doc = "`BatchInterrupted` event is deposited, along with the number of successful calls made"] + #[doc = "and the error of the failed call. If all were successful, then the `BatchCompleted`"] + #[doc = "event is deposited."] + pub struct Batch { + pub calls: batch::Calls, } - pub mod add_member { + pub mod batch { use super::runtime_types; - pub type Who = ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), + pub type Calls = ::subxt::ext::subxt_core::alloc::vec::Vec< + runtime_types::quantus_runtime::RuntimeCall, >; } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for AddMember { - const PALLET: &'static str = "TechCollective"; - const CALL: &'static str = "add_member"; + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for Batch { + const PALLET: &'static str = "Utility"; + const CALL: &'static str = "batch"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -10441,25 +9091,31 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Increment the rank of an existing member by one."] + #[doc = "Send a call through an indexed pseudonym of the sender."] #[doc = ""] - #[doc = "- `origin`: Must be the `PromoteOrigin`."] - #[doc = "- `who`: Account of existing member."] + #[doc = "Filter from origin are passed along. The call will be dispatched with an origin which"] + #[doc = "use the same filter as the origin of this call."] #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub struct PromoteMember { - pub who: promote_member::Who, + #[doc = "NOTE: If you need to ensure that any account-based filtering is not honored (i.e."] + #[doc = "because you expect `proxy` to have been used prior in the call stack and you do not want"] + #[doc = "the call restrictions to apply to any sub-accounts), then use `as_multi_threshold_1`"] + #[doc = "in the Multisig pallet instead."] + #[doc = ""] + #[doc = "NOTE: Prior to version *12, this was called `as_limited_sub`."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + pub struct AsDerivative { + pub index: as_derivative::Index, + pub call: ::subxt::ext::subxt_core::alloc::boxed::Box, } - pub mod promote_member { + pub mod as_derivative { use super::runtime_types; - pub type Who = ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >; + pub type Index = ::core::primitive::u16; + pub type Call = runtime_types::quantus_runtime::RuntimeCall; } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for PromoteMember { - const PALLET: &'static str = "TechCollective"; - const CALL: &'static str = "promote_member"; + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for AsDerivative { + const PALLET: &'static str = "Utility"; + const CALL: &'static str = "as_derivative"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -10472,26 +9128,31 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Decrement the rank of an existing member by one. If the member is already at rank zero,"] - #[doc = "then they are removed entirely."] + #[doc = "Send a batch of dispatch calls and atomically execute them."] + #[doc = "The whole transaction will rollback and fail if any of the calls failed."] #[doc = ""] - #[doc = "- `origin`: Must be the `DemoteOrigin`."] - #[doc = "- `who`: Account of existing member of rank greater than zero."] + #[doc = "May be called from any origin except `None`."] #[doc = ""] - #[doc = "Weight: `O(1)`, less if the member's index is highest in its rank."] - pub struct DemoteMember { - pub who: demote_member::Who, + #[doc = "- `calls`: The calls to be dispatched from the same origin. The number of call must not"] + #[doc = " exceed the constant: `batched_calls_limit` (available in constant metadata)."] + #[doc = ""] + #[doc = "If origin is root then the calls are dispatched without checking origin filter. (This"] + #[doc = "includes bypassing `frame_system::Config::BaseCallFilter`)."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- O(C) where C is the number of calls to be batched."] + pub struct BatchAll { + pub calls: batch_all::Calls, } - pub mod demote_member { + pub mod batch_all { use super::runtime_types; - pub type Who = ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), + pub type Calls = ::subxt::ext::subxt_core::alloc::vec::Vec< + runtime_types::quantus_runtime::RuntimeCall, >; } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for DemoteMember { - const PALLET: &'static str = "TechCollective"; - const CALL: &'static str = "demote_member"; + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for BatchAll { + const PALLET: &'static str = "Utility"; + const CALL: &'static str = "batch_all"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -10504,28 +9165,25 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Remove the member entirely."] + #[doc = "Dispatches a function call with a provided origin."] #[doc = ""] - #[doc = "- `origin`: Must be the `RemoveOrigin`."] - #[doc = "- `who`: Account of existing member of rank greater than zero."] - #[doc = "- `min_rank`: The rank of the member or greater."] + #[doc = "The dispatch origin for this call must be _Root_."] #[doc = ""] - #[doc = "Weight: `O(min_rank)`."] - pub struct RemoveMember { - pub who: remove_member::Who, - pub min_rank: remove_member::MinRank, + #[doc = "## Complexity"] + #[doc = "- O(1)."] + pub struct DispatchAs { + pub as_origin: + ::subxt::ext::subxt_core::alloc::boxed::Box, + pub call: ::subxt::ext::subxt_core::alloc::boxed::Box, } - pub mod remove_member { + pub mod dispatch_as { use super::runtime_types; - pub type Who = ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >; - pub type MinRank = ::core::primitive::u16; + pub type AsOrigin = runtime_types::quantus_runtime::OriginCaller; + pub type Call = runtime_types::quantus_runtime::RuntimeCall; } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for RemoveMember { - const PALLET: &'static str = "TechCollective"; - const CALL: &'static str = "remove_member"; + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for DispatchAs { + const PALLET: &'static str = "Utility"; + const CALL: &'static str = "dispatch_as"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -10538,29 +9196,31 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Add an aye or nay vote for the sender to the given proposal."] + #[doc = "Send a batch of dispatch calls."] + #[doc = "Unlike `batch`, it allows errors and won't interrupt."] #[doc = ""] - #[doc = "- `origin`: Must be `Signed` by a member account."] - #[doc = "- `poll`: Index of a poll which is ongoing."] - #[doc = "- `aye`: `true` if the vote is to approve the proposal, `false` otherwise."] + #[doc = "May be called from any origin except `None`."] #[doc = ""] - #[doc = "Transaction fees are be waived if the member is voting on any particular proposal"] - #[doc = "for the first time and the call is successful. Subsequent vote changes will charge a"] - #[doc = "fee."] + #[doc = "- `calls`: The calls to be dispatched from the same origin. The number of call must not"] + #[doc = " exceed the constant: `batched_calls_limit` (available in constant metadata)."] #[doc = ""] - #[doc = "Weight: `O(1)`, less if there was no previous vote on the poll by the member."] - pub struct Vote { - pub poll: vote::Poll, - pub aye: vote::Aye, + #[doc = "If origin is root then the calls are dispatch without checking origin filter. (This"] + #[doc = "includes bypassing `frame_system::Config::BaseCallFilter`)."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- O(C) where C is the number of calls to be batched."] + pub struct ForceBatch { + pub calls: force_batch::Calls, } - pub mod vote { + pub mod force_batch { use super::runtime_types; - pub type Poll = ::core::primitive::u32; - pub type Aye = ::core::primitive::bool; + pub type Calls = ::subxt::ext::subxt_core::alloc::vec::Vec< + runtime_types::quantus_runtime::RuntimeCall, + >; } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for Vote { - const PALLET: &'static str = "TechCollective"; - const CALL: &'static str = "vote"; + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for ForceBatch { + const PALLET: &'static str = "Utility"; + const CALL: &'static str = "force_batch"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -10573,28 +9233,71 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Remove votes from the given poll. It must have ended."] + #[doc = "Dispatch a function call with a specified weight."] #[doc = ""] - #[doc = "- `origin`: Must be `Signed` by any account."] - #[doc = "- `poll_index`: Index of a poll which is completed and for which votes continue to"] - #[doc = " exist."] - #[doc = "- `max`: Maximum number of vote items from remove in this call."] + #[doc = "This function does not check the weight of the call, and instead allows the"] + #[doc = "Root origin to specify the weight of the call."] #[doc = ""] - #[doc = "Transaction fees are waived if the operation is successful."] + #[doc = "The dispatch origin for this call must be _Root_."] + pub struct WithWeight { + pub call: ::subxt::ext::subxt_core::alloc::boxed::Box, + pub weight: with_weight::Weight, + } + pub mod with_weight { + use super::runtime_types; + pub type Call = runtime_types::quantus_runtime::RuntimeCall; + pub type Weight = runtime_types::sp_weights::weight_v2::Weight; + } + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for WithWeight { + const PALLET: &'static str = "Utility"; + const CALL: &'static str = "with_weight"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "Dispatch a fallback call in the event the main call fails to execute."] + #[doc = "May be called from any origin except `None`."] #[doc = ""] - #[doc = "Weight `O(max)` (less if there are fewer items to remove than `max`)."] - pub struct CleanupPoll { - pub poll_index: cleanup_poll::PollIndex, - pub max: cleanup_poll::Max, + #[doc = "This function first attempts to dispatch the `main` call."] + #[doc = "If the `main` call fails, the `fallback` is attemted."] + #[doc = "if the fallback is successfully dispatched, the weights of both calls"] + #[doc = "are accumulated and an event containing the main call error is deposited."] + #[doc = ""] + #[doc = "In the event of a fallback failure the whole call fails"] + #[doc = "with the weights returned."] + #[doc = ""] + #[doc = "- `main`: The main call to be dispatched. This is the primary action to execute."] + #[doc = "- `fallback`: The fallback call to be dispatched in case the `main` call fails."] + #[doc = ""] + #[doc = "## Dispatch Logic"] + #[doc = "- If the origin is `root`, both the main and fallback calls are executed without"] + #[doc = " applying any origin filters."] + #[doc = "- If the origin is not `root`, the origin filter is applied to both the `main` and"] + #[doc = " `fallback` calls."] + #[doc = ""] + #[doc = "## Use Case"] + #[doc = "- Some use cases might involve submitting a `batch` type call in either main, fallback"] + #[doc = " or both."] + pub struct IfElse { + pub main: ::subxt::ext::subxt_core::alloc::boxed::Box, + pub fallback: ::subxt::ext::subxt_core::alloc::boxed::Box, } - pub mod cleanup_poll { + pub mod if_else { use super::runtime_types; - pub type PollIndex = ::core::primitive::u32; - pub type Max = ::core::primitive::u32; + pub type Main = runtime_types::quantus_runtime::RuntimeCall; + pub type Fallback = runtime_types::quantus_runtime::RuntimeCall; } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for CleanupPoll { - const PALLET: &'static str = "TechCollective"; - const CALL: &'static str = "cleanup_poll"; + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for IfElse { + const PALLET: &'static str = "Utility"; + const CALL: &'static str = "if_else"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -10607,205 +9310,274 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Exchanges a member with a new account and the same existing rank."] + #[doc = "Dispatches a function call with a provided origin."] #[doc = ""] - #[doc = "- `origin`: Must be the `ExchangeOrigin`."] - #[doc = "- `who`: Account of existing member of rank greater than zero to be exchanged."] - #[doc = "- `new_who`: New Account of existing member of rank greater than zero to exchanged to."] - pub struct ExchangeMember { - pub who: exchange_member::Who, - pub new_who: exchange_member::NewWho, + #[doc = "Almost the same as [`Pallet::dispatch_as`] but forwards any error of the inner call."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Root_."] + pub struct DispatchAsFallible { + pub as_origin: + ::subxt::ext::subxt_core::alloc::boxed::Box, + pub call: + ::subxt::ext::subxt_core::alloc::boxed::Box, } - pub mod exchange_member { + pub mod dispatch_as_fallible { use super::runtime_types; - pub type Who = ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >; - pub type NewWho = ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >; + pub type AsOrigin = runtime_types::quantus_runtime::OriginCaller; + pub type Call = runtime_types::quantus_runtime::RuntimeCall; } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for ExchangeMember { - const PALLET: &'static str = "TechCollective"; - const CALL: &'static str = "exchange_member"; + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for DispatchAsFallible { + const PALLET: &'static str = "Utility"; + const CALL: &'static str = "dispatch_as_fallible"; } } pub struct TransactionApi; impl TransactionApi { - #[doc = "Introduce a new member."] + #[doc = "Send a batch of dispatch calls."] #[doc = ""] - #[doc = "- `origin`: Must be the `AddOrigin`."] - #[doc = "- `who`: Account of non-member which will become a member."] + #[doc = "May be called from any origin except `None`."] #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn add_member( + #[doc = "- `calls`: The calls to be dispatched from the same origin. The number of call must not"] + #[doc = " exceed the constant: `batched_calls_limit` (available in constant metadata)."] + #[doc = ""] + #[doc = "If origin is root then the calls are dispatched without checking origin filter. (This"] + #[doc = "includes bypassing `frame_system::Config::BaseCallFilter`)."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- O(C) where C is the number of calls to be batched."] + #[doc = ""] + #[doc = "This will return `Ok` in all circumstances. To determine the success of the batch, an"] + #[doc = "event is deposited. If a call failed and the batch was interrupted, then the"] + #[doc = "`BatchInterrupted` event is deposited, along with the number of successful calls made"] + #[doc = "and the error of the failed call. If all were successful, then the `BatchCompleted`"] + #[doc = "event is deposited."] + pub fn batch( &self, - who: types::add_member::Who, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { + calls: types::batch::Calls, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "TechCollective", - "add_member", - types::AddMember { who }, + "Utility", + "batch", + types::Batch { calls }, [ - 2u8, 131u8, 37u8, 217u8, 112u8, 46u8, 86u8, 165u8, 248u8, 244u8, 33u8, - 236u8, 155u8, 28u8, 163u8, 169u8, 213u8, 32u8, 70u8, 217u8, 97u8, - 194u8, 138u8, 77u8, 133u8, 97u8, 188u8, 49u8, 49u8, 31u8, 177u8, 206u8, + 95u8, 49u8, 63u8, 6u8, 99u8, 141u8, 102u8, 196u8, 12u8, 24u8, 80u8, + 166u8, 12u8, 184u8, 52u8, 205u8, 241u8, 116u8, 122u8, 20u8, 172u8, + 197u8, 253u8, 63u8, 171u8, 19u8, 58u8, 121u8, 104u8, 55u8, 146u8, + 123u8, ], ) } - #[doc = "Increment the rank of an existing member by one."] + #[doc = "Send a call through an indexed pseudonym of the sender."] #[doc = ""] - #[doc = "- `origin`: Must be the `PromoteOrigin`."] - #[doc = "- `who`: Account of existing member."] + #[doc = "Filter from origin are passed along. The call will be dispatched with an origin which"] + #[doc = "use the same filter as the origin of this call."] #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn promote_member( - &self, - who: types::promote_member::Who, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload - { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "TechCollective", - "promote_member", - types::PromoteMember { who }, + #[doc = "NOTE: If you need to ensure that any account-based filtering is not honored (i.e."] + #[doc = "because you expect `proxy` to have been used prior in the call stack and you do not want"] + #[doc = "the call restrictions to apply to any sub-accounts), then use `as_multi_threshold_1`"] + #[doc = "in the Multisig pallet instead."] + #[doc = ""] + #[doc = "NOTE: Prior to version *12, this was called `as_limited_sub`."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + pub fn as_derivative( + &self, + index: types::as_derivative::Index, + call: types::as_derivative::Call, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "Utility", + "as_derivative", + types::AsDerivative { + index, + call: ::subxt::ext::subxt_core::alloc::boxed::Box::new(call), + }, [ - 169u8, 155u8, 9u8, 50u8, 144u8, 133u8, 230u8, 60u8, 216u8, 147u8, 3u8, - 236u8, 94u8, 185u8, 106u8, 139u8, 235u8, 143u8, 189u8, 135u8, 208u8, - 176u8, 126u8, 124u8, 85u8, 140u8, 189u8, 125u8, 87u8, 56u8, 57u8, - 246u8, + 0u8, 169u8, 255u8, 58u8, 170u8, 161u8, 177u8, 170u8, 78u8, 235u8, + 115u8, 55u8, 145u8, 164u8, 214u8, 14u8, 4u8, 26u8, 175u8, 195u8, 145u8, + 25u8, 233u8, 162u8, 234u8, 135u8, 156u8, 250u8, 140u8, 45u8, 139u8, + 50u8, ], ) } - #[doc = "Decrement the rank of an existing member by one. If the member is already at rank zero,"] - #[doc = "then they are removed entirely."] + #[doc = "Send a batch of dispatch calls and atomically execute them."] + #[doc = "The whole transaction will rollback and fail if any of the calls failed."] #[doc = ""] - #[doc = "- `origin`: Must be the `DemoteOrigin`."] - #[doc = "- `who`: Account of existing member of rank greater than zero."] + #[doc = "May be called from any origin except `None`."] #[doc = ""] - #[doc = "Weight: `O(1)`, less if the member's index is highest in its rank."] - pub fn demote_member( + #[doc = "- `calls`: The calls to be dispatched from the same origin. The number of call must not"] + #[doc = " exceed the constant: `batched_calls_limit` (available in constant metadata)."] + #[doc = ""] + #[doc = "If origin is root then the calls are dispatched without checking origin filter. (This"] + #[doc = "includes bypassing `frame_system::Config::BaseCallFilter`)."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- O(C) where C is the number of calls to be batched."] + pub fn batch_all( &self, - who: types::demote_member::Who, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { + calls: types::batch_all::Calls, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "TechCollective", - "demote_member", - types::DemoteMember { who }, + "Utility", + "batch_all", + types::BatchAll { calls }, [ - 21u8, 185u8, 71u8, 166u8, 106u8, 88u8, 74u8, 251u8, 78u8, 28u8, 205u8, - 171u8, 199u8, 195u8, 97u8, 149u8, 175u8, 229u8, 25u8, 113u8, 96u8, - 25u8, 240u8, 64u8, 109u8, 246u8, 203u8, 45u8, 110u8, 205u8, 115u8, - 178u8, + 211u8, 135u8, 169u8, 155u8, 41u8, 244u8, 13u8, 144u8, 165u8, 230u8, + 142u8, 34u8, 10u8, 93u8, 240u8, 61u8, 32u8, 143u8, 186u8, 191u8, 151u8, + 52u8, 129u8, 33u8, 110u8, 88u8, 43u8, 156u8, 130u8, 143u8, 19u8, 121u8, ], ) } - #[doc = "Remove the member entirely."] + #[doc = "Dispatches a function call with a provided origin."] #[doc = ""] - #[doc = "- `origin`: Must be the `RemoveOrigin`."] - #[doc = "- `who`: Account of existing member of rank greater than zero."] - #[doc = "- `min_rank`: The rank of the member or greater."] + #[doc = "The dispatch origin for this call must be _Root_."] #[doc = ""] - #[doc = "Weight: `O(min_rank)`."] - pub fn remove_member( + #[doc = "## Complexity"] + #[doc = "- O(1)."] + pub fn dispatch_as( &self, - who: types::remove_member::Who, - min_rank: types::remove_member::MinRank, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { + as_origin: types::dispatch_as::AsOrigin, + call: types::dispatch_as::Call, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "TechCollective", - "remove_member", - types::RemoveMember { who, min_rank }, + "Utility", + "dispatch_as", + types::DispatchAs { + as_origin: ::subxt::ext::subxt_core::alloc::boxed::Box::new(as_origin), + call: ::subxt::ext::subxt_core::alloc::boxed::Box::new(call), + }, [ - 23u8, 156u8, 32u8, 64u8, 158u8, 50u8, 64u8, 199u8, 108u8, 67u8, 133u8, - 128u8, 138u8, 241u8, 14u8, 238u8, 192u8, 173u8, 250u8, 11u8, 124u8, - 119u8, 177u8, 190u8, 152u8, 116u8, 134u8, 42u8, 216u8, 49u8, 113u8, - 49u8, + 219u8, 206u8, 50u8, 176u8, 112u8, 195u8, 114u8, 10u8, 1u8, 242u8, 71u8, + 206u8, 56u8, 67u8, 180u8, 7u8, 15u8, 69u8, 186u8, 118u8, 156u8, 241u8, + 254u8, 210u8, 189u8, 106u8, 142u8, 12u8, 224u8, 119u8, 92u8, 177u8, ], ) } - #[doc = "Add an aye or nay vote for the sender to the given proposal."] + #[doc = "Send a batch of dispatch calls."] + #[doc = "Unlike `batch`, it allows errors and won't interrupt."] #[doc = ""] - #[doc = "- `origin`: Must be `Signed` by a member account."] - #[doc = "- `poll`: Index of a poll which is ongoing."] - #[doc = "- `aye`: `true` if the vote is to approve the proposal, `false` otherwise."] + #[doc = "May be called from any origin except `None`."] #[doc = ""] - #[doc = "Transaction fees are be waived if the member is voting on any particular proposal"] - #[doc = "for the first time and the call is successful. Subsequent vote changes will charge a"] - #[doc = "fee."] + #[doc = "- `calls`: The calls to be dispatched from the same origin. The number of call must not"] + #[doc = " exceed the constant: `batched_calls_limit` (available in constant metadata)."] #[doc = ""] - #[doc = "Weight: `O(1)`, less if there was no previous vote on the poll by the member."] - pub fn vote( + #[doc = "If origin is root then the calls are dispatch without checking origin filter. (This"] + #[doc = "includes bypassing `frame_system::Config::BaseCallFilter`)."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- O(C) where C is the number of calls to be batched."] + pub fn force_batch( &self, - poll: types::vote::Poll, - aye: types::vote::Aye, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { + calls: types::force_batch::Calls, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "TechCollective", - "vote", - types::Vote { poll, aye }, + "Utility", + "force_batch", + types::ForceBatch { calls }, [ - 54u8, 116u8, 81u8, 239u8, 223u8, 35u8, 11u8, 244u8, 245u8, 94u8, 23u8, - 241u8, 125u8, 231u8, 56u8, 150u8, 105u8, 125u8, 100u8, 171u8, 182u8, - 186u8, 134u8, 40u8, 4u8, 121u8, 119u8, 11u8, 93u8, 158u8, 59u8, 209u8, + 77u8, 186u8, 47u8, 91u8, 16u8, 107u8, 105u8, 61u8, 244u8, 114u8, 50u8, + 239u8, 239u8, 218u8, 166u8, 191u8, 240u8, 255u8, 211u8, 248u8, 82u8, + 10u8, 133u8, 108u8, 40u8, 181u8, 146u8, 19u8, 152u8, 45u8, 12u8, 176u8, ], ) } - #[doc = "Remove votes from the given poll. It must have ended."] + #[doc = "Dispatch a function call with a specified weight."] #[doc = ""] - #[doc = "- `origin`: Must be `Signed` by any account."] - #[doc = "- `poll_index`: Index of a poll which is completed and for which votes continue to"] - #[doc = " exist."] - #[doc = "- `max`: Maximum number of vote items from remove in this call."] + #[doc = "This function does not check the weight of the call, and instead allows the"] + #[doc = "Root origin to specify the weight of the call."] #[doc = ""] - #[doc = "Transaction fees are waived if the operation is successful."] + #[doc = "The dispatch origin for this call must be _Root_."] + pub fn with_weight( + &self, + call: types::with_weight::Call, + weight: types::with_weight::Weight, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "Utility", + "with_weight", + types::WithWeight { + call: ::subxt::ext::subxt_core::alloc::boxed::Box::new(call), + weight, + }, + [ + 199u8, 132u8, 168u8, 103u8, 83u8, 203u8, 42u8, 197u8, 2u8, 67u8, 107u8, + 242u8, 123u8, 62u8, 62u8, 206u8, 239u8, 210u8, 63u8, 234u8, 127u8, + 18u8, 177u8, 42u8, 200u8, 101u8, 101u8, 242u8, 98u8, 228u8, 227u8, + 85u8, + ], + ) + } + #[doc = "Dispatch a fallback call in the event the main call fails to execute."] + #[doc = "May be called from any origin except `None`."] #[doc = ""] - #[doc = "Weight `O(max)` (less if there are fewer items to remove than `max`)."] - pub fn cleanup_poll( + #[doc = "This function first attempts to dispatch the `main` call."] + #[doc = "If the `main` call fails, the `fallback` is attemted."] + #[doc = "if the fallback is successfully dispatched, the weights of both calls"] + #[doc = "are accumulated and an event containing the main call error is deposited."] + #[doc = ""] + #[doc = "In the event of a fallback failure the whole call fails"] + #[doc = "with the weights returned."] + #[doc = ""] + #[doc = "- `main`: The main call to be dispatched. This is the primary action to execute."] + #[doc = "- `fallback`: The fallback call to be dispatched in case the `main` call fails."] + #[doc = ""] + #[doc = "## Dispatch Logic"] + #[doc = "- If the origin is `root`, both the main and fallback calls are executed without"] + #[doc = " applying any origin filters."] + #[doc = "- If the origin is not `root`, the origin filter is applied to both the `main` and"] + #[doc = " `fallback` calls."] + #[doc = ""] + #[doc = "## Use Case"] + #[doc = "- Some use cases might involve submitting a `batch` type call in either main, fallback"] + #[doc = " or both."] + pub fn if_else( &self, - poll_index: types::cleanup_poll::PollIndex, - max: types::cleanup_poll::Max, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { + main: types::if_else::Main, + fallback: types::if_else::Fallback, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "TechCollective", - "cleanup_poll", - types::CleanupPoll { poll_index, max }, + "Utility", + "if_else", + types::IfElse { + main: ::subxt::ext::subxt_core::alloc::boxed::Box::new(main), + fallback: ::subxt::ext::subxt_core::alloc::boxed::Box::new(fallback), + }, [ - 157u8, 109u8, 86u8, 253u8, 62u8, 107u8, 235u8, 255u8, 171u8, 68u8, - 103u8, 92u8, 245u8, 25u8, 252u8, 158u8, 174u8, 137u8, 77u8, 251u8, - 105u8, 113u8, 165u8, 46u8, 39u8, 55u8, 166u8, 79u8, 103u8, 81u8, 121u8, - 37u8, + 4u8, 167u8, 93u8, 56u8, 207u8, 104u8, 113u8, 182u8, 74u8, 2u8, 167u8, + 104u8, 247u8, 231u8, 148u8, 50u8, 180u8, 121u8, 72u8, 181u8, 154u8, + 188u8, 73u8, 171u8, 73u8, 18u8, 12u8, 248u8, 12u8, 45u8, 234u8, 106u8, ], ) } - #[doc = "Exchanges a member with a new account and the same existing rank."] + #[doc = "Dispatches a function call with a provided origin."] #[doc = ""] - #[doc = "- `origin`: Must be the `ExchangeOrigin`."] - #[doc = "- `who`: Account of existing member of rank greater than zero to be exchanged."] - #[doc = "- `new_who`: New Account of existing member of rank greater than zero to exchanged to."] - pub fn exchange_member( + #[doc = "Almost the same as [`Pallet::dispatch_as`] but forwards any error of the inner call."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Root_."] + pub fn dispatch_as_fallible( &self, - who: types::exchange_member::Who, - new_who: types::exchange_member::NewWho, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload + as_origin: types::dispatch_as_fallible::AsOrigin, + call: types::dispatch_as_fallible::Call, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "TechCollective", - "exchange_member", - types::ExchangeMember { who, new_who }, + "Utility", + "dispatch_as_fallible", + types::DispatchAsFallible { + as_origin: ::subxt::ext::subxt_core::alloc::boxed::Box::new(as_origin), + call: ::subxt::ext::subxt_core::alloc::boxed::Box::new(call), + }, [ - 240u8, 208u8, 76u8, 147u8, 117u8, 23u8, 91u8, 37u8, 22u8, 101u8, 53u8, - 247u8, 161u8, 94u8, 109u8, 233u8, 104u8, 129u8, 67u8, 31u8, 223u8, - 182u8, 50u8, 233u8, 120u8, 129u8, 224u8, 135u8, 52u8, 162u8, 26u8, - 189u8, + 34u8, 70u8, 71u8, 147u8, 94u8, 186u8, 226u8, 233u8, 176u8, 83u8, 76u8, + 44u8, 6u8, 137u8, 81u8, 142u8, 229u8, 190u8, 17u8, 110u8, 106u8, 155u8, + 32u8, 0u8, 166u8, 90u8, 226u8, 239u8, 42u8, 155u8, 223u8, 195u8, ], ) } } } #[doc = "The `Event` enum of this pallet"] - pub type Event = runtime_types::pallet_ranked_collective::pallet::Event; + pub type Event = runtime_types::pallet_utility::pallet::Event; pub mod events { use super::runtime_types; #[derive( @@ -10815,17 +9587,20 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "A member `who` has been added."] - pub struct MemberAdded { - pub who: member_added::Who, + #[doc = "Batch of dispatches did not complete fully. Index of first failing dispatch given, as"] + #[doc = "well as the error."] + pub struct BatchInterrupted { + pub index: batch_interrupted::Index, + pub error: batch_interrupted::Error, } - pub mod member_added { + pub mod batch_interrupted { use super::runtime_types; - pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; + pub type Index = ::core::primitive::u32; + pub type Error = runtime_types::sp_runtime::DispatchError; } - impl ::subxt::ext::subxt_core::events::StaticEvent for MemberAdded { - const PALLET: &'static str = "TechCollective"; - const EVENT: &'static str = "MemberAdded"; + impl ::subxt::ext::subxt_core::events::StaticEvent for BatchInterrupted { + const PALLET: &'static str = "Utility"; + const EVENT: &'static str = "BatchInterrupted"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -10834,19 +9609,11 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "The member `who`se rank has been changed to the given `rank`."] - pub struct RankChanged { - pub who: rank_changed::Who, - pub rank: rank_changed::Rank, - } - pub mod rank_changed { - use super::runtime_types; - pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; - pub type Rank = ::core::primitive::u16; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for RankChanged { - const PALLET: &'static str = "TechCollective"; - const EVENT: &'static str = "RankChanged"; + #[doc = "Batch of dispatches completed fully with no error."] + pub struct BatchCompleted; + impl ::subxt::ext::subxt_core::events::StaticEvent for BatchCompleted { + const PALLET: &'static str = "Utility"; + const EVENT: &'static str = "BatchCompleted"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -10855,19 +9622,24 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "The member `who` of given `rank` has been removed from the collective."] - pub struct MemberRemoved { - pub who: member_removed::Who, - pub rank: member_removed::Rank, - } - pub mod member_removed { - use super::runtime_types; - pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; - pub type Rank = ::core::primitive::u16; + #[doc = "Batch of dispatches completed but has errors."] + pub struct BatchCompletedWithErrors; + impl ::subxt::ext::subxt_core::events::StaticEvent for BatchCompletedWithErrors { + const PALLET: &'static str = "Utility"; + const EVENT: &'static str = "BatchCompletedWithErrors"; } - impl ::subxt::ext::subxt_core::events::StaticEvent for MemberRemoved { - const PALLET: &'static str = "TechCollective"; - const EVENT: &'static str = "MemberRemoved"; + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + #[doc = "A single item within a Batch of dispatches has completed with no error."] + pub struct ItemCompleted; + impl ::subxt::ext::subxt_core::events::StaticEvent for ItemCompleted { + const PALLET: &'static str = "Utility"; + const EVENT: &'static str = "ItemCompleted"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -10876,24 +9648,17 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "The member `who` has voted for the `poll` with the given `vote` leading to an updated"] - #[doc = "`tally`."] - pub struct Voted { - pub who: voted::Who, - pub poll: voted::Poll, - pub vote: voted::Vote, - pub tally: voted::Tally, + #[doc = "A single item within a Batch of dispatches has completed with error."] + pub struct ItemFailed { + pub error: item_failed::Error, } - pub mod voted { + pub mod item_failed { use super::runtime_types; - pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; - pub type Poll = ::core::primitive::u32; - pub type Vote = runtime_types::pallet_ranked_collective::VoteRecord; - pub type Tally = runtime_types::pallet_ranked_collective::Tally; + pub type Error = runtime_types::sp_runtime::DispatchError; } - impl ::subxt::ext::subxt_core::events::StaticEvent for Voted { - const PALLET: &'static str = "TechCollective"; - const EVENT: &'static str = "Voted"; + impl ::subxt::ext::subxt_core::events::StaticEvent for ItemFailed { + const PALLET: &'static str = "Utility"; + const EVENT: &'static str = "ItemFailed"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -10902,986 +9667,614 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "The member `who` had their `AccountId` changed to `new_who`."] - pub struct MemberExchanged { - pub who: member_exchanged::Who, - pub new_who: member_exchanged::NewWho, + #[doc = "A call was dispatched."] + pub struct DispatchedAs { + pub result: dispatched_as::Result, } - pub mod member_exchanged { + pub mod dispatched_as { use super::runtime_types; - pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; - pub type NewWho = ::subxt::ext::subxt_core::utils::AccountId32; + pub type Result = + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>; } - impl ::subxt::ext::subxt_core::events::StaticEvent for MemberExchanged { - const PALLET: &'static str = "TechCollective"; - const EVENT: &'static str = "MemberExchanged"; + impl ::subxt::ext::subxt_core::events::StaticEvent for DispatchedAs { + const PALLET: &'static str = "Utility"; + const EVENT: &'static str = "DispatchedAs"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + #[doc = "Main call was dispatched."] + pub struct IfElseMainSuccess; + impl ::subxt::ext::subxt_core::events::StaticEvent for IfElseMainSuccess { + const PALLET: &'static str = "Utility"; + const EVENT: &'static str = "IfElseMainSuccess"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + #[doc = "The fallback call was dispatched."] + pub struct IfElseFallbackCalled { + pub main_error: if_else_fallback_called::MainError, + } + pub mod if_else_fallback_called { + use super::runtime_types; + pub type MainError = runtime_types::sp_runtime::DispatchError; + } + impl ::subxt::ext::subxt_core::events::StaticEvent for IfElseFallbackCalled { + const PALLET: &'static str = "Utility"; + const EVENT: &'static str = "IfElseFallbackCalled"; } } - pub mod storage { + pub mod constants { use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The limit on the number of batched calls."] + pub fn batched_calls_limit( + &self, + ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< + ::core::primitive::u32, + > { + ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( + "Utility", + "batched_calls_limit", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + } + } + } + pub mod referenda { + use super::{root_mod, runtime_types}; + #[doc = "The `Error` enum of this pallet."] + pub type Error = runtime_types::pallet_referenda::pallet::Error; + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub type Call = runtime_types::pallet_referenda::pallet::Call; + pub mod calls { + use super::{root_mod, runtime_types}; + type DispatchError = runtime_types::sp_runtime::DispatchError; pub mod types { use super::runtime_types; - pub mod member_count { - use super::runtime_types; - pub type MemberCount = ::core::primitive::u32; - pub type Param0 = ::core::primitive::u16; + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "Propose a referendum on a privileged action."] + #[doc = ""] + #[doc = "- `origin`: must be `SubmitOrigin` and the account must have `SubmissionDeposit` funds"] + #[doc = " available."] + #[doc = "- `proposal_origin`: The origin from which the proposal should be executed."] + #[doc = "- `proposal`: The proposal."] + #[doc = "- `enactment_moment`: The moment that the proposal should be enacted."] + #[doc = ""] + #[doc = "Emits `Submitted`."] + pub struct Submit { + pub proposal_origin: + ::subxt::ext::subxt_core::alloc::boxed::Box, + pub proposal: submit::Proposal, + pub enactment_moment: submit::EnactmentMoment, } - pub mod members { + pub mod submit { use super::runtime_types; - pub type Members = runtime_types::pallet_ranked_collective::MemberRecord; - pub type Param0 = ::subxt::ext::subxt_core::utils::AccountId32; + pub type ProposalOrigin = runtime_types::quantus_runtime::OriginCaller; + pub type Proposal = runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::quantus_runtime::RuntimeCall, + runtime_types::poseidon_resonance::PoseidonHasher, + >; + pub type EnactmentMoment = + runtime_types::frame_support::traits::schedule::DispatchTime< + ::core::primitive::u32, + >; } - pub mod id_to_index { - use super::runtime_types; - pub type IdToIndex = ::core::primitive::u32; - pub type Param0 = ::core::primitive::u16; - pub type Param1 = ::subxt::ext::subxt_core::utils::AccountId32; + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for Submit { + const PALLET: &'static str = "Referenda"; + const CALL: &'static str = "submit"; } - pub mod index_to_id { - use super::runtime_types; - pub type IndexToId = ::subxt::ext::subxt_core::utils::AccountId32; - pub type Param0 = ::core::primitive::u16; - pub type Param1 = ::core::primitive::u32; + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "Post the Decision Deposit for a referendum."] + #[doc = ""] + #[doc = "- `origin`: must be `Signed` and the account must have funds available for the"] + #[doc = " referendum's track's Decision Deposit."] + #[doc = "- `index`: The index of the submitted referendum whose Decision Deposit is yet to be"] + #[doc = " posted."] + #[doc = ""] + #[doc = "Emits `DecisionDepositPlaced`."] + pub struct PlaceDecisionDeposit { + pub index: place_decision_deposit::Index, } - pub mod voting { + pub mod place_decision_deposit { use super::runtime_types; - pub type Voting = runtime_types::pallet_ranked_collective::VoteRecord; - pub type Param0 = ::core::primitive::u32; - pub type Param1 = ::subxt::ext::subxt_core::utils::AccountId32; + pub type Index = ::core::primitive::u32; } - pub mod voting_cleanup { + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for PlaceDecisionDeposit { + const PALLET: &'static str = "Referenda"; + const CALL: &'static str = "place_decision_deposit"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "Refund the Decision Deposit for a closed referendum back to the depositor."] + #[doc = ""] + #[doc = "- `origin`: must be `Signed` or `Root`."] + #[doc = "- `index`: The index of a closed referendum whose Decision Deposit has not yet been"] + #[doc = " refunded."] + #[doc = ""] + #[doc = "Emits `DecisionDepositRefunded`."] + pub struct RefundDecisionDeposit { + pub index: refund_decision_deposit::Index, + } + pub mod refund_decision_deposit { use super::runtime_types; - pub type VotingCleanup = - runtime_types::bounded_collections::bounded_vec::BoundedVec< - ::core::primitive::u8, - >; - pub type Param0 = ::core::primitive::u32; + pub type Index = ::core::primitive::u32; } - } - pub struct StorageApi; - impl StorageApi { - #[doc = " The number of members in the collective who have at least the rank according to the index"] - #[doc = " of the vec."] - pub fn member_count_iter( - &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::member_count::MemberCount, - (), - ::subxt::ext::subxt_core::utils::Yes, - ::subxt::ext::subxt_core::utils::Yes, - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "TechCollective", - "MemberCount", - (), - [ - 0u8, 141u8, 66u8, 91u8, 155u8, 74u8, 17u8, 191u8, 143u8, 41u8, 231u8, - 56u8, 123u8, 219u8, 145u8, 27u8, 197u8, 62u8, 118u8, 237u8, 30u8, 7u8, - 107u8, 96u8, 95u8, 17u8, 242u8, 206u8, 246u8, 79u8, 53u8, 214u8, - ], - ) + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for RefundDecisionDeposit { + const PALLET: &'static str = "Referenda"; + const CALL: &'static str = "refund_decision_deposit"; } - #[doc = " The number of members in the collective who have at least the rank according to the index"] - #[doc = " of the vec."] - pub fn member_count( - &self, - _0: types::member_count::Param0, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::member_count::Param0, - >, - types::member_count::MemberCount, - ::subxt::ext::subxt_core::utils::Yes, - ::subxt::ext::subxt_core::utils::Yes, - (), - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "TechCollective", - "MemberCount", - ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "Cancel an ongoing referendum."] + #[doc = ""] + #[doc = "- `origin`: must be the `CancelOrigin`."] + #[doc = "- `index`: The index of the referendum to be cancelled."] + #[doc = ""] + #[doc = "Emits `Cancelled`."] + pub struct Cancel { + pub index: cancel::Index, + } + pub mod cancel { + use super::runtime_types; + pub type Index = ::core::primitive::u32; + } + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for Cancel { + const PALLET: &'static str = "Referenda"; + const CALL: &'static str = "cancel"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "Cancel an ongoing referendum and slash the deposits."] + #[doc = ""] + #[doc = "- `origin`: must be the `KillOrigin`."] + #[doc = "- `index`: The index of the referendum to be cancelled."] + #[doc = ""] + #[doc = "Emits `Killed` and `DepositSlashed`."] + pub struct Kill { + pub index: kill::Index, + } + pub mod kill { + use super::runtime_types; + pub type Index = ::core::primitive::u32; + } + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for Kill { + const PALLET: &'static str = "Referenda"; + const CALL: &'static str = "kill"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "Advance a referendum onto its next logical state. Only used internally."] + #[doc = ""] + #[doc = "- `origin`: must be `Root`."] + #[doc = "- `index`: the referendum to be advanced."] + pub struct NudgeReferendum { + pub index: nudge_referendum::Index, + } + pub mod nudge_referendum { + use super::runtime_types; + pub type Index = ::core::primitive::u32; + } + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for NudgeReferendum { + const PALLET: &'static str = "Referenda"; + const CALL: &'static str = "nudge_referendum"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "Advance a track onto its next logical state. Only used internally."] + #[doc = ""] + #[doc = "- `origin`: must be `Root`."] + #[doc = "- `track`: the track to be advanced."] + #[doc = ""] + #[doc = "Action item for when there is now one fewer referendum in the deciding phase and the"] + #[doc = "`DecidingCount` is not yet updated. This means that we should either:"] + #[doc = "- begin deciding another referendum (and leave `DecidingCount` alone); or"] + #[doc = "- decrement `DecidingCount`."] + pub struct OneFewerDeciding { + pub track: one_fewer_deciding::Track, + } + pub mod one_fewer_deciding { + use super::runtime_types; + pub type Track = ::core::primitive::u16; + } + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for OneFewerDeciding { + const PALLET: &'static str = "Referenda"; + const CALL: &'static str = "one_fewer_deciding"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "Refund the Submission Deposit for a closed referendum back to the depositor."] + #[doc = ""] + #[doc = "- `origin`: must be `Signed` or `Root`."] + #[doc = "- `index`: The index of a closed referendum whose Submission Deposit has not yet been"] + #[doc = " refunded."] + #[doc = ""] + #[doc = "Emits `SubmissionDepositRefunded`."] + pub struct RefundSubmissionDeposit { + pub index: refund_submission_deposit::Index, + } + pub mod refund_submission_deposit { + use super::runtime_types; + pub type Index = ::core::primitive::u32; + } + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for RefundSubmissionDeposit { + const PALLET: &'static str = "Referenda"; + const CALL: &'static str = "refund_submission_deposit"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "Set or clear metadata of a referendum."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `origin`: Must be `Signed` by a creator of a referendum or by anyone to clear a"] + #[doc = " metadata of a finished referendum."] + #[doc = "- `index`: The index of a referendum to set or clear metadata for."] + #[doc = "- `maybe_hash`: The hash of an on-chain stored preimage. `None` to clear a metadata."] + pub struct SetMetadata { + pub index: set_metadata::Index, + pub maybe_hash: set_metadata::MaybeHash, + } + pub mod set_metadata { + use super::runtime_types; + pub type Index = ::core::primitive::u32; + pub type MaybeHash = + ::core::option::Option<::subxt::ext::subxt_core::utils::H256>; + } + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for SetMetadata { + const PALLET: &'static str = "Referenda"; + const CALL: &'static str = "set_metadata"; + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Propose a referendum on a privileged action."] + #[doc = ""] + #[doc = "- `origin`: must be `SubmitOrigin` and the account must have `SubmissionDeposit` funds"] + #[doc = " available."] + #[doc = "- `proposal_origin`: The origin from which the proposal should be executed."] + #[doc = "- `proposal`: The proposal."] + #[doc = "- `enactment_moment`: The moment that the proposal should be enacted."] + #[doc = ""] + #[doc = "Emits `Submitted`."] + pub fn submit( + &self, + proposal_origin: types::submit::ProposalOrigin, + proposal: types::submit::Proposal, + enactment_moment: types::submit::EnactmentMoment, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "Referenda", + "submit", + types::Submit { + proposal_origin: ::subxt::ext::subxt_core::alloc::boxed::Box::new( + proposal_origin, + ), + proposal, + enactment_moment, + }, [ - 0u8, 141u8, 66u8, 91u8, 155u8, 74u8, 17u8, 191u8, 143u8, 41u8, 231u8, - 56u8, 123u8, 219u8, 145u8, 27u8, 197u8, 62u8, 118u8, 237u8, 30u8, 7u8, - 107u8, 96u8, 95u8, 17u8, 242u8, 206u8, 246u8, 79u8, 53u8, 214u8, + 30u8, 232u8, 132u8, 0u8, 199u8, 166u8, 49u8, 94u8, 238u8, 61u8, 236u8, + 207u8, 2u8, 136u8, 37u8, 81u8, 67u8, 133u8, 2u8, 147u8, 177u8, 176u8, + 178u8, 113u8, 155u8, 180u8, 104u8, 176u8, 215u8, 255u8, 240u8, 100u8, ], ) } - #[doc = " The current members of the collective."] - pub fn members_iter( + #[doc = "Post the Decision Deposit for a referendum."] + #[doc = ""] + #[doc = "- `origin`: must be `Signed` and the account must have funds available for the"] + #[doc = " referendum's track's Decision Deposit."] + #[doc = "- `index`: The index of the submitted referendum whose Decision Deposit is yet to be"] + #[doc = " posted."] + #[doc = ""] + #[doc = "Emits `DecisionDepositPlaced`."] + pub fn place_decision_deposit( &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::members::Members, - (), - (), - ::subxt::ext::subxt_core::utils::Yes, - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "TechCollective", - "Members", - (), + index: types::place_decision_deposit::Index, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload + { + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "Referenda", + "place_decision_deposit", + types::PlaceDecisionDeposit { index }, [ - 101u8, 183u8, 36u8, 241u8, 67u8, 8u8, 252u8, 116u8, 110u8, 153u8, - 117u8, 210u8, 128u8, 80u8, 130u8, 163u8, 38u8, 76u8, 230u8, 107u8, - 112u8, 90u8, 102u8, 24u8, 217u8, 2u8, 244u8, 197u8, 103u8, 215u8, - 247u8, 133u8, + 247u8, 158u8, 55u8, 191u8, 188u8, 200u8, 3u8, 47u8, 20u8, 175u8, 86u8, + 203u8, 52u8, 253u8, 91u8, 131u8, 21u8, 213u8, 56u8, 68u8, 40u8, 84u8, + 184u8, 30u8, 9u8, 193u8, 63u8, 182u8, 178u8, 241u8, 247u8, 220u8, ], ) } - #[doc = " The current members of the collective."] - pub fn members( + #[doc = "Refund the Decision Deposit for a closed referendum back to the depositor."] + #[doc = ""] + #[doc = "- `origin`: must be `Signed` or `Root`."] + #[doc = "- `index`: The index of a closed referendum whose Decision Deposit has not yet been"] + #[doc = " refunded."] + #[doc = ""] + #[doc = "Emits `DecisionDepositRefunded`."] + pub fn refund_decision_deposit( &self, - _0: types::members::Param0, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::members::Param0, - >, - types::members::Members, - ::subxt::ext::subxt_core::utils::Yes, - (), - (), + index: types::refund_decision_deposit::Index, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload< + types::RefundDecisionDeposit, > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "TechCollective", - "Members", - ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "Referenda", + "refund_decision_deposit", + types::RefundDecisionDeposit { index }, [ - 101u8, 183u8, 36u8, 241u8, 67u8, 8u8, 252u8, 116u8, 110u8, 153u8, - 117u8, 210u8, 128u8, 80u8, 130u8, 163u8, 38u8, 76u8, 230u8, 107u8, - 112u8, 90u8, 102u8, 24u8, 217u8, 2u8, 244u8, 197u8, 103u8, 215u8, - 247u8, 133u8, + 159u8, 19u8, 35u8, 216u8, 114u8, 105u8, 18u8, 42u8, 148u8, 151u8, + 136u8, 92u8, 117u8, 30u8, 29u8, 41u8, 238u8, 58u8, 195u8, 91u8, 115u8, + 135u8, 96u8, 99u8, 154u8, 233u8, 8u8, 249u8, 145u8, 165u8, 77u8, 164u8, ], ) } - #[doc = " The index of each ranks's member into the group of members who have at least that rank."] - pub fn id_to_index_iter( + #[doc = "Cancel an ongoing referendum."] + #[doc = ""] + #[doc = "- `origin`: must be the `CancelOrigin`."] + #[doc = "- `index`: The index of the referendum to be cancelled."] + #[doc = ""] + #[doc = "Emits `Cancelled`."] + pub fn cancel( &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::id_to_index::IdToIndex, - (), - (), - ::subxt::ext::subxt_core::utils::Yes, - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "TechCollective", - "IdToIndex", - (), + index: types::cancel::Index, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "Referenda", + "cancel", + types::Cancel { index }, [ - 121u8, 225u8, 69u8, 131u8, 194u8, 3u8, 82u8, 27u8, 129u8, 152u8, 157u8, - 45u8, 39u8, 47u8, 166u8, 28u8, 42u8, 92u8, 217u8, 189u8, 160u8, 102u8, - 153u8, 196u8, 94u8, 48u8, 248u8, 113u8, 164u8, 111u8, 27u8, 9u8, + 55u8, 206u8, 119u8, 156u8, 238u8, 165u8, 193u8, 73u8, 242u8, 13u8, + 212u8, 75u8, 136u8, 156u8, 151u8, 14u8, 35u8, 41u8, 156u8, 107u8, 60u8, + 190u8, 39u8, 216u8, 8u8, 74u8, 213u8, 130u8, 160u8, 131u8, 237u8, + 122u8, ], ) } - #[doc = " The index of each ranks's member into the group of members who have at least that rank."] - pub fn id_to_index_iter1( + #[doc = "Cancel an ongoing referendum and slash the deposits."] + #[doc = ""] + #[doc = "- `origin`: must be the `KillOrigin`."] + #[doc = "- `index`: The index of the referendum to be cancelled."] + #[doc = ""] + #[doc = "Emits `Killed` and `DepositSlashed`."] + pub fn kill( &self, - _0: types::id_to_index::Param0, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::id_to_index::Param0, - >, - types::id_to_index::IdToIndex, - (), - (), - ::subxt::ext::subxt_core::utils::Yes, - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "TechCollective", - "IdToIndex", - ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), + index: types::kill::Index, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "Referenda", + "kill", + types::Kill { index }, [ - 121u8, 225u8, 69u8, 131u8, 194u8, 3u8, 82u8, 27u8, 129u8, 152u8, 157u8, - 45u8, 39u8, 47u8, 166u8, 28u8, 42u8, 92u8, 217u8, 189u8, 160u8, 102u8, - 153u8, 196u8, 94u8, 48u8, 248u8, 113u8, 164u8, 111u8, 27u8, 9u8, + 50u8, 89u8, 57u8, 0u8, 87u8, 129u8, 113u8, 140u8, 179u8, 178u8, 126u8, + 198u8, 92u8, 92u8, 189u8, 64u8, 123u8, 232u8, 57u8, 227u8, 223u8, + 219u8, 73u8, 217u8, 179u8, 44u8, 210u8, 125u8, 180u8, 10u8, 143u8, + 48u8, ], ) } - #[doc = " The index of each ranks's member into the group of members who have at least that rank."] - pub fn id_to_index( + #[doc = "Advance a referendum onto its next logical state. Only used internally."] + #[doc = ""] + #[doc = "- `origin`: must be `Root`."] + #[doc = "- `index`: the referendum to be advanced."] + pub fn nudge_referendum( &self, - _0: types::id_to_index::Param0, - _1: types::id_to_index::Param1, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - ( - ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::id_to_index::Param0, - >, - ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::id_to_index::Param1, - >, - ), - types::id_to_index::IdToIndex, - ::subxt::ext::subxt_core::utils::Yes, - (), - (), - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "TechCollective", - "IdToIndex", - ( - ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), - ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_1), - ), + index: types::nudge_referendum::Index, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload + { + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "Referenda", + "nudge_referendum", + types::NudgeReferendum { index }, [ - 121u8, 225u8, 69u8, 131u8, 194u8, 3u8, 82u8, 27u8, 129u8, 152u8, 157u8, - 45u8, 39u8, 47u8, 166u8, 28u8, 42u8, 92u8, 217u8, 189u8, 160u8, 102u8, - 153u8, 196u8, 94u8, 48u8, 248u8, 113u8, 164u8, 111u8, 27u8, 9u8, + 75u8, 99u8, 172u8, 30u8, 170u8, 150u8, 211u8, 229u8, 249u8, 128u8, + 194u8, 246u8, 100u8, 142u8, 193u8, 184u8, 232u8, 81u8, 29u8, 17u8, + 99u8, 91u8, 236u8, 85u8, 230u8, 226u8, 57u8, 115u8, 45u8, 170u8, 54u8, + 213u8, ], ) } - #[doc = " The members in the collective by index. All indices in the range `0..MemberCount` will"] - #[doc = " return `Some`, however a member's index is not guaranteed to remain unchanged over time."] - pub fn index_to_id_iter( + #[doc = "Advance a track onto its next logical state. Only used internally."] + #[doc = ""] + #[doc = "- `origin`: must be `Root`."] + #[doc = "- `track`: the track to be advanced."] + #[doc = ""] + #[doc = "Action item for when there is now one fewer referendum in the deciding phase and the"] + #[doc = "`DecidingCount` is not yet updated. This means that we should either:"] + #[doc = "- begin deciding another referendum (and leave `DecidingCount` alone); or"] + #[doc = "- decrement `DecidingCount`."] + pub fn one_fewer_deciding( &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::index_to_id::IndexToId, - (), - (), - ::subxt::ext::subxt_core::utils::Yes, - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "TechCollective", - "IndexToId", - (), + track: types::one_fewer_deciding::Track, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload + { + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "Referenda", + "one_fewer_deciding", + types::OneFewerDeciding { track }, [ - 110u8, 48u8, 214u8, 224u8, 56u8, 195u8, 186u8, 24u8, 111u8, 37u8, 15u8, - 153u8, 245u8, 101u8, 229u8, 149u8, 216u8, 185u8, 7u8, 242u8, 196u8, - 29u8, 205u8, 243u8, 162u8, 92u8, 71u8, 253u8, 102u8, 152u8, 137u8, - 70u8, + 15u8, 84u8, 79u8, 231u8, 21u8, 239u8, 244u8, 143u8, 183u8, 215u8, + 181u8, 25u8, 225u8, 195u8, 95u8, 171u8, 17u8, 156u8, 182u8, 128u8, + 111u8, 40u8, 151u8, 102u8, 196u8, 55u8, 36u8, 212u8, 89u8, 190u8, + 131u8, 167u8, ], ) } - #[doc = " The members in the collective by index. All indices in the range `0..MemberCount` will"] - #[doc = " return `Some`, however a member's index is not guaranteed to remain unchanged over time."] - pub fn index_to_id_iter1( + #[doc = "Refund the Submission Deposit for a closed referendum back to the depositor."] + #[doc = ""] + #[doc = "- `origin`: must be `Signed` or `Root`."] + #[doc = "- `index`: The index of a closed referendum whose Submission Deposit has not yet been"] + #[doc = " refunded."] + #[doc = ""] + #[doc = "Emits `SubmissionDepositRefunded`."] + pub fn refund_submission_deposit( &self, - _0: types::index_to_id::Param0, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::index_to_id::Param0, - >, - types::index_to_id::IndexToId, - (), - (), - ::subxt::ext::subxt_core::utils::Yes, + index: types::refund_submission_deposit::Index, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload< + types::RefundSubmissionDeposit, > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "TechCollective", - "IndexToId", - ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "Referenda", + "refund_submission_deposit", + types::RefundSubmissionDeposit { index }, [ - 110u8, 48u8, 214u8, 224u8, 56u8, 195u8, 186u8, 24u8, 111u8, 37u8, 15u8, - 153u8, 245u8, 101u8, 229u8, 149u8, 216u8, 185u8, 7u8, 242u8, 196u8, - 29u8, 205u8, 243u8, 162u8, 92u8, 71u8, 253u8, 102u8, 152u8, 137u8, - 70u8, + 20u8, 217u8, 115u8, 6u8, 1u8, 60u8, 54u8, 136u8, 35u8, 41u8, 38u8, + 23u8, 85u8, 100u8, 141u8, 126u8, 30u8, 160u8, 61u8, 46u8, 134u8, 98u8, + 82u8, 38u8, 211u8, 124u8, 208u8, 222u8, 210u8, 10u8, 155u8, 122u8, ], ) } - #[doc = " The members in the collective by index. All indices in the range `0..MemberCount` will"] - #[doc = " return `Some`, however a member's index is not guaranteed to remain unchanged over time."] - pub fn index_to_id( + #[doc = "Set or clear metadata of a referendum."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `origin`: Must be `Signed` by a creator of a referendum or by anyone to clear a"] + #[doc = " metadata of a finished referendum."] + #[doc = "- `index`: The index of a referendum to set or clear metadata for."] + #[doc = "- `maybe_hash`: The hash of an on-chain stored preimage. `None` to clear a metadata."] + pub fn set_metadata( &self, - _0: types::index_to_id::Param0, - _1: types::index_to_id::Param1, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - ( - ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::index_to_id::Param0, - >, - ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::index_to_id::Param1, - >, - ), - types::index_to_id::IndexToId, - ::subxt::ext::subxt_core::utils::Yes, - (), - (), - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "TechCollective", - "IndexToId", - ( - ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), - ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_1), - ), + index: types::set_metadata::Index, + maybe_hash: types::set_metadata::MaybeHash, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "Referenda", + "set_metadata", + types::SetMetadata { index, maybe_hash }, [ - 110u8, 48u8, 214u8, 224u8, 56u8, 195u8, 186u8, 24u8, 111u8, 37u8, 15u8, - 153u8, 245u8, 101u8, 229u8, 149u8, 216u8, 185u8, 7u8, 242u8, 196u8, - 29u8, 205u8, 243u8, 162u8, 92u8, 71u8, 253u8, 102u8, 152u8, 137u8, - 70u8, - ], - ) - } - #[doc = " Votes on a given proposal, if it is ongoing."] - pub fn voting_iter( - &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::voting::Voting, - (), - (), - ::subxt::ext::subxt_core::utils::Yes, - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "TechCollective", - "Voting", - (), - [ - 180u8, 146u8, 236u8, 178u8, 30u8, 50u8, 161u8, 50u8, 140u8, 110u8, - 220u8, 1u8, 109u8, 209u8, 17u8, 94u8, 234u8, 223u8, 222u8, 177u8, - 243u8, 194u8, 246u8, 48u8, 178u8, 86u8, 30u8, 185u8, 56u8, 206u8, - 175u8, 18u8, - ], - ) - } - #[doc = " Votes on a given proposal, if it is ongoing."] - pub fn voting_iter1( - &self, - _0: types::voting::Param0, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::voting::Param0, - >, - types::voting::Voting, - (), - (), - ::subxt::ext::subxt_core::utils::Yes, - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "TechCollective", - "Voting", - ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), - [ - 180u8, 146u8, 236u8, 178u8, 30u8, 50u8, 161u8, 50u8, 140u8, 110u8, - 220u8, 1u8, 109u8, 209u8, 17u8, 94u8, 234u8, 223u8, 222u8, 177u8, - 243u8, 194u8, 246u8, 48u8, 178u8, 86u8, 30u8, 185u8, 56u8, 206u8, - 175u8, 18u8, - ], - ) - } - #[doc = " Votes on a given proposal, if it is ongoing."] - pub fn voting( - &self, - _0: types::voting::Param0, - _1: types::voting::Param1, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - ( - ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::voting::Param0, - >, - ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::voting::Param1, - >, - ), - types::voting::Voting, - ::subxt::ext::subxt_core::utils::Yes, - (), - (), - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "TechCollective", - "Voting", - ( - ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), - ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_1), - ), - [ - 180u8, 146u8, 236u8, 178u8, 30u8, 50u8, 161u8, 50u8, 140u8, 110u8, - 220u8, 1u8, 109u8, 209u8, 17u8, 94u8, 234u8, 223u8, 222u8, 177u8, - 243u8, 194u8, 246u8, 48u8, 178u8, 86u8, 30u8, 185u8, 56u8, 206u8, - 175u8, 18u8, - ], - ) - } - pub fn voting_cleanup_iter( - &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::voting_cleanup::VotingCleanup, - (), - (), - ::subxt::ext::subxt_core::utils::Yes, - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "TechCollective", - "VotingCleanup", - (), - [ - 223u8, 130u8, 79u8, 104u8, 94u8, 221u8, 222u8, 72u8, 187u8, 95u8, - 231u8, 59u8, 28u8, 119u8, 191u8, 63u8, 40u8, 186u8, 58u8, 254u8, 14u8, - 233u8, 152u8, 36u8, 2u8, 231u8, 120u8, 13u8, 120u8, 211u8, 232u8, 11u8, - ], - ) - } - pub fn voting_cleanup( - &self, - _0: types::voting_cleanup::Param0, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::voting_cleanup::Param0, - >, - types::voting_cleanup::VotingCleanup, - ::subxt::ext::subxt_core::utils::Yes, - (), - (), - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "TechCollective", - "VotingCleanup", - ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), - [ - 223u8, 130u8, 79u8, 104u8, 94u8, 221u8, 222u8, 72u8, 187u8, 95u8, - 231u8, 59u8, 28u8, 119u8, 191u8, 63u8, 40u8, 186u8, 58u8, 254u8, 14u8, - 233u8, 152u8, 36u8, 2u8, 231u8, 120u8, 13u8, 120u8, 211u8, 232u8, 11u8, + 207u8, 29u8, 146u8, 233u8, 219u8, 205u8, 88u8, 118u8, 106u8, 61u8, + 124u8, 101u8, 2u8, 41u8, 169u8, 70u8, 114u8, 189u8, 162u8, 118u8, 1u8, + 108u8, 234u8, 98u8, 245u8, 245u8, 183u8, 126u8, 89u8, 13u8, 112u8, + 88u8, ], ) } } } - } - pub mod tech_referenda { - use super::{root_mod, runtime_types}; - #[doc = "The `Error` enum of this pallet."] - pub type Error = runtime_types::pallet_referenda::pallet::Error; - #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] - pub type Call = runtime_types::pallet_referenda::pallet::Call; - pub mod calls { - use super::{root_mod, runtime_types}; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub mod types { + #[doc = "The `Event` enum of this pallet"] + pub type Event = runtime_types::pallet_referenda::pallet::Event1; + pub mod events { + use super::runtime_types; + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + #[doc = "A referendum has been submitted."] + pub struct Submitted { + pub index: submitted::Index, + pub track: submitted::Track, + pub proposal: submitted::Proposal, + } + pub mod submitted { use super::runtime_types; - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Propose a referendum on a privileged action."] - #[doc = ""] - #[doc = "- `origin`: must be `SubmitOrigin` and the account must have `SubmissionDeposit` funds"] - #[doc = " available."] - #[doc = "- `proposal_origin`: The origin from which the proposal should be executed."] - #[doc = "- `proposal`: The proposal."] - #[doc = "- `enactment_moment`: The moment that the proposal should be enacted."] - #[doc = ""] - #[doc = "Emits `Submitted`."] - pub struct Submit { - pub proposal_origin: - ::subxt::ext::subxt_core::alloc::boxed::Box, - pub proposal: submit::Proposal, - pub enactment_moment: submit::EnactmentMoment, - } - pub mod submit { - use super::runtime_types; - pub type ProposalOrigin = runtime_types::quantus_runtime::OriginCaller; - pub type Proposal = runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::quantus_runtime::RuntimeCall, - runtime_types::poseidon_resonance::PoseidonHasher, - >; - pub type EnactmentMoment = - runtime_types::frame_support::traits::schedule::DispatchTime< - ::core::primitive::u32, - >; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for Submit { - const PALLET: &'static str = "TechReferenda"; - const CALL: &'static str = "submit"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Post the Decision Deposit for a referendum."] - #[doc = ""] - #[doc = "- `origin`: must be `Signed` and the account must have funds available for the"] - #[doc = " referendum's track's Decision Deposit."] - #[doc = "- `index`: The index of the submitted referendum whose Decision Deposit is yet to be"] - #[doc = " posted."] - #[doc = ""] - #[doc = "Emits `DecisionDepositPlaced`."] - pub struct PlaceDecisionDeposit { - pub index: place_decision_deposit::Index, - } - pub mod place_decision_deposit { - use super::runtime_types; - pub type Index = ::core::primitive::u32; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for PlaceDecisionDeposit { - const PALLET: &'static str = "TechReferenda"; - const CALL: &'static str = "place_decision_deposit"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Refund the Decision Deposit for a closed referendum back to the depositor."] - #[doc = ""] - #[doc = "- `origin`: must be `Signed` or `Root`."] - #[doc = "- `index`: The index of a closed referendum whose Decision Deposit has not yet been"] - #[doc = " refunded."] - #[doc = ""] - #[doc = "Emits `DecisionDepositRefunded`."] - pub struct RefundDecisionDeposit { - pub index: refund_decision_deposit::Index, - } - pub mod refund_decision_deposit { - use super::runtime_types; - pub type Index = ::core::primitive::u32; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for RefundDecisionDeposit { - const PALLET: &'static str = "TechReferenda"; - const CALL: &'static str = "refund_decision_deposit"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Cancel an ongoing referendum."] - #[doc = ""] - #[doc = "- `origin`: must be the `CancelOrigin`."] - #[doc = "- `index`: The index of the referendum to be cancelled."] - #[doc = ""] - #[doc = "Emits `Cancelled`."] - pub struct Cancel { - pub index: cancel::Index, - } - pub mod cancel { - use super::runtime_types; - pub type Index = ::core::primitive::u32; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for Cancel { - const PALLET: &'static str = "TechReferenda"; - const CALL: &'static str = "cancel"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Cancel an ongoing referendum and slash the deposits."] - #[doc = ""] - #[doc = "- `origin`: must be the `KillOrigin`."] - #[doc = "- `index`: The index of the referendum to be cancelled."] - #[doc = ""] - #[doc = "Emits `Killed` and `DepositSlashed`."] - pub struct Kill { - pub index: kill::Index, - } - pub mod kill { - use super::runtime_types; - pub type Index = ::core::primitive::u32; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for Kill { - const PALLET: &'static str = "TechReferenda"; - const CALL: &'static str = "kill"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Advance a referendum onto its next logical state. Only used internally."] - #[doc = ""] - #[doc = "- `origin`: must be `Root`."] - #[doc = "- `index`: the referendum to be advanced."] - pub struct NudgeReferendum { - pub index: nudge_referendum::Index, - } - pub mod nudge_referendum { - use super::runtime_types; - pub type Index = ::core::primitive::u32; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for NudgeReferendum { - const PALLET: &'static str = "TechReferenda"; - const CALL: &'static str = "nudge_referendum"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Advance a track onto its next logical state. Only used internally."] - #[doc = ""] - #[doc = "- `origin`: must be `Root`."] - #[doc = "- `track`: the track to be advanced."] - #[doc = ""] - #[doc = "Action item for when there is now one fewer referendum in the deciding phase and the"] - #[doc = "`DecidingCount` is not yet updated. This means that we should either:"] - #[doc = "- begin deciding another referendum (and leave `DecidingCount` alone); or"] - #[doc = "- decrement `DecidingCount`."] - pub struct OneFewerDeciding { - pub track: one_fewer_deciding::Track, - } - pub mod one_fewer_deciding { - use super::runtime_types; - pub type Track = ::core::primitive::u16; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for OneFewerDeciding { - const PALLET: &'static str = "TechReferenda"; - const CALL: &'static str = "one_fewer_deciding"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Refund the Submission Deposit for a closed referendum back to the depositor."] - #[doc = ""] - #[doc = "- `origin`: must be `Signed` or `Root`."] - #[doc = "- `index`: The index of a closed referendum whose Submission Deposit has not yet been"] - #[doc = " refunded."] - #[doc = ""] - #[doc = "Emits `SubmissionDepositRefunded`."] - pub struct RefundSubmissionDeposit { - pub index: refund_submission_deposit::Index, - } - pub mod refund_submission_deposit { - use super::runtime_types; - pub type Index = ::core::primitive::u32; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for RefundSubmissionDeposit { - const PALLET: &'static str = "TechReferenda"; - const CALL: &'static str = "refund_submission_deposit"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Set or clear metadata of a referendum."] - #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `origin`: Must be `Signed` by a creator of a referendum or by anyone to clear a"] - #[doc = " metadata of a finished referendum."] - #[doc = "- `index`: The index of a referendum to set or clear metadata for."] - #[doc = "- `maybe_hash`: The hash of an on-chain stored preimage. `None` to clear a metadata."] - pub struct SetMetadata { - pub index: set_metadata::Index, - pub maybe_hash: set_metadata::MaybeHash, - } - pub mod set_metadata { - use super::runtime_types; - pub type Index = ::core::primitive::u32; - pub type MaybeHash = - ::core::option::Option<::subxt::ext::subxt_core::utils::H256>; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for SetMetadata { - const PALLET: &'static str = "TechReferenda"; - const CALL: &'static str = "set_metadata"; - } - } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Propose a referendum on a privileged action."] - #[doc = ""] - #[doc = "- `origin`: must be `SubmitOrigin` and the account must have `SubmissionDeposit` funds"] - #[doc = " available."] - #[doc = "- `proposal_origin`: The origin from which the proposal should be executed."] - #[doc = "- `proposal`: The proposal."] - #[doc = "- `enactment_moment`: The moment that the proposal should be enacted."] - #[doc = ""] - #[doc = "Emits `Submitted`."] - pub fn submit( - &self, - proposal_origin: types::submit::ProposalOrigin, - proposal: types::submit::Proposal, - enactment_moment: types::submit::EnactmentMoment, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "TechReferenda", - "submit", - types::Submit { - proposal_origin: ::subxt::ext::subxt_core::alloc::boxed::Box::new( - proposal_origin, - ), - proposal, - enactment_moment, - }, - [ - 140u8, 121u8, 244u8, 4u8, 5u8, 245u8, 133u8, 203u8, 193u8, 24u8, 133u8, - 222u8, 208u8, 74u8, 248u8, 59u8, 153u8, 154u8, 194u8, 226u8, 101u8, - 232u8, 174u8, 79u8, 177u8, 183u8, 39u8, 178u8, 178u8, 229u8, 0u8, - 188u8, - ], - ) - } - #[doc = "Post the Decision Deposit for a referendum."] - #[doc = ""] - #[doc = "- `origin`: must be `Signed` and the account must have funds available for the"] - #[doc = " referendum's track's Decision Deposit."] - #[doc = "- `index`: The index of the submitted referendum whose Decision Deposit is yet to be"] - #[doc = " posted."] - #[doc = ""] - #[doc = "Emits `DecisionDepositPlaced`."] - pub fn place_decision_deposit( - &self, - index: types::place_decision_deposit::Index, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload - { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "TechReferenda", - "place_decision_deposit", - types::PlaceDecisionDeposit { index }, - [ - 247u8, 158u8, 55u8, 191u8, 188u8, 200u8, 3u8, 47u8, 20u8, 175u8, 86u8, - 203u8, 52u8, 253u8, 91u8, 131u8, 21u8, 213u8, 56u8, 68u8, 40u8, 84u8, - 184u8, 30u8, 9u8, 193u8, 63u8, 182u8, 178u8, 241u8, 247u8, 220u8, - ], - ) - } - #[doc = "Refund the Decision Deposit for a closed referendum back to the depositor."] - #[doc = ""] - #[doc = "- `origin`: must be `Signed` or `Root`."] - #[doc = "- `index`: The index of a closed referendum whose Decision Deposit has not yet been"] - #[doc = " refunded."] - #[doc = ""] - #[doc = "Emits `DecisionDepositRefunded`."] - pub fn refund_decision_deposit( - &self, - index: types::refund_decision_deposit::Index, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload< - types::RefundDecisionDeposit, - > { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "TechReferenda", - "refund_decision_deposit", - types::RefundDecisionDeposit { index }, - [ - 159u8, 19u8, 35u8, 216u8, 114u8, 105u8, 18u8, 42u8, 148u8, 151u8, - 136u8, 92u8, 117u8, 30u8, 29u8, 41u8, 238u8, 58u8, 195u8, 91u8, 115u8, - 135u8, 96u8, 99u8, 154u8, 233u8, 8u8, 249u8, 145u8, 165u8, 77u8, 164u8, - ], - ) - } - #[doc = "Cancel an ongoing referendum."] - #[doc = ""] - #[doc = "- `origin`: must be the `CancelOrigin`."] - #[doc = "- `index`: The index of the referendum to be cancelled."] - #[doc = ""] - #[doc = "Emits `Cancelled`."] - pub fn cancel( - &self, - index: types::cancel::Index, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "TechReferenda", - "cancel", - types::Cancel { index }, - [ - 55u8, 206u8, 119u8, 156u8, 238u8, 165u8, 193u8, 73u8, 242u8, 13u8, - 212u8, 75u8, 136u8, 156u8, 151u8, 14u8, 35u8, 41u8, 156u8, 107u8, 60u8, - 190u8, 39u8, 216u8, 8u8, 74u8, 213u8, 130u8, 160u8, 131u8, 237u8, - 122u8, - ], - ) - } - #[doc = "Cancel an ongoing referendum and slash the deposits."] - #[doc = ""] - #[doc = "- `origin`: must be the `KillOrigin`."] - #[doc = "- `index`: The index of the referendum to be cancelled."] - #[doc = ""] - #[doc = "Emits `Killed` and `DepositSlashed`."] - pub fn kill( - &self, - index: types::kill::Index, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "TechReferenda", - "kill", - types::Kill { index }, - [ - 50u8, 89u8, 57u8, 0u8, 87u8, 129u8, 113u8, 140u8, 179u8, 178u8, 126u8, - 198u8, 92u8, 92u8, 189u8, 64u8, 123u8, 232u8, 57u8, 227u8, 223u8, - 219u8, 73u8, 217u8, 179u8, 44u8, 210u8, 125u8, 180u8, 10u8, 143u8, - 48u8, - ], - ) - } - #[doc = "Advance a referendum onto its next logical state. Only used internally."] - #[doc = ""] - #[doc = "- `origin`: must be `Root`."] - #[doc = "- `index`: the referendum to be advanced."] - pub fn nudge_referendum( - &self, - index: types::nudge_referendum::Index, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload - { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "TechReferenda", - "nudge_referendum", - types::NudgeReferendum { index }, - [ - 75u8, 99u8, 172u8, 30u8, 170u8, 150u8, 211u8, 229u8, 249u8, 128u8, - 194u8, 246u8, 100u8, 142u8, 193u8, 184u8, 232u8, 81u8, 29u8, 17u8, - 99u8, 91u8, 236u8, 85u8, 230u8, 226u8, 57u8, 115u8, 45u8, 170u8, 54u8, - 213u8, - ], - ) - } - #[doc = "Advance a track onto its next logical state. Only used internally."] - #[doc = ""] - #[doc = "- `origin`: must be `Root`."] - #[doc = "- `track`: the track to be advanced."] - #[doc = ""] - #[doc = "Action item for when there is now one fewer referendum in the deciding phase and the"] - #[doc = "`DecidingCount` is not yet updated. This means that we should either:"] - #[doc = "- begin deciding another referendum (and leave `DecidingCount` alone); or"] - #[doc = "- decrement `DecidingCount`."] - pub fn one_fewer_deciding( - &self, - track: types::one_fewer_deciding::Track, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload - { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "TechReferenda", - "one_fewer_deciding", - types::OneFewerDeciding { track }, - [ - 15u8, 84u8, 79u8, 231u8, 21u8, 239u8, 244u8, 143u8, 183u8, 215u8, - 181u8, 25u8, 225u8, 195u8, 95u8, 171u8, 17u8, 156u8, 182u8, 128u8, - 111u8, 40u8, 151u8, 102u8, 196u8, 55u8, 36u8, 212u8, 89u8, 190u8, - 131u8, 167u8, - ], - ) - } - #[doc = "Refund the Submission Deposit for a closed referendum back to the depositor."] - #[doc = ""] - #[doc = "- `origin`: must be `Signed` or `Root`."] - #[doc = "- `index`: The index of a closed referendum whose Submission Deposit has not yet been"] - #[doc = " refunded."] - #[doc = ""] - #[doc = "Emits `SubmissionDepositRefunded`."] - pub fn refund_submission_deposit( - &self, - index: types::refund_submission_deposit::Index, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload< - types::RefundSubmissionDeposit, - > { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "TechReferenda", - "refund_submission_deposit", - types::RefundSubmissionDeposit { index }, - [ - 20u8, 217u8, 115u8, 6u8, 1u8, 60u8, 54u8, 136u8, 35u8, 41u8, 38u8, - 23u8, 85u8, 100u8, 141u8, 126u8, 30u8, 160u8, 61u8, 46u8, 134u8, 98u8, - 82u8, 38u8, 211u8, 124u8, 208u8, 222u8, 210u8, 10u8, 155u8, 122u8, - ], - ) - } - #[doc = "Set or clear metadata of a referendum."] - #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `origin`: Must be `Signed` by a creator of a referendum or by anyone to clear a"] - #[doc = " metadata of a finished referendum."] - #[doc = "- `index`: The index of a referendum to set or clear metadata for."] - #[doc = "- `maybe_hash`: The hash of an on-chain stored preimage. `None` to clear a metadata."] - pub fn set_metadata( - &self, - index: types::set_metadata::Index, - maybe_hash: types::set_metadata::MaybeHash, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "TechReferenda", - "set_metadata", - types::SetMetadata { index, maybe_hash }, - [ - 207u8, 29u8, 146u8, 233u8, 219u8, 205u8, 88u8, 118u8, 106u8, 61u8, - 124u8, 101u8, 2u8, 41u8, 169u8, 70u8, 114u8, 189u8, 162u8, 118u8, 1u8, - 108u8, 234u8, 98u8, 245u8, 245u8, 183u8, 126u8, 89u8, 13u8, 112u8, - 88u8, - ], - ) - } - } - } - #[doc = "The `Event` enum of this pallet"] - pub type Event = runtime_types::pallet_referenda::pallet::Event2; - pub mod events { - use super::runtime_types; - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "A referendum has been submitted."] - pub struct Submitted { - pub index: submitted::Index, - pub track: submitted::Track, - pub proposal: submitted::Proposal, - } - pub mod submitted { - use super::runtime_types; - pub type Index = ::core::primitive::u32; - pub type Track = ::core::primitive::u16; - pub type Proposal = runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::quantus_runtime::RuntimeCall, - runtime_types::poseidon_resonance::PoseidonHasher, - >; + pub type Index = ::core::primitive::u32; + pub type Track = ::core::primitive::u16; + pub type Proposal = runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::quantus_runtime::RuntimeCall, + runtime_types::poseidon_resonance::PoseidonHasher, + >; } impl ::subxt::ext::subxt_core::events::StaticEvent for Submitted { - const PALLET: &'static str = "TechReferenda"; + const PALLET: &'static str = "Referenda"; const EVENT: &'static str = "Submitted"; } #[derive( @@ -11904,7 +10297,7 @@ pub mod api { pub type Amount = ::core::primitive::u128; } impl ::subxt::ext::subxt_core::events::StaticEvent for DecisionDepositPlaced { - const PALLET: &'static str = "TechReferenda"; + const PALLET: &'static str = "Referenda"; const EVENT: &'static str = "DecisionDepositPlaced"; } #[derive( @@ -11927,7 +10320,7 @@ pub mod api { pub type Amount = ::core::primitive::u128; } impl ::subxt::ext::subxt_core::events::StaticEvent for DecisionDepositRefunded { - const PALLET: &'static str = "TechReferenda"; + const PALLET: &'static str = "Referenda"; const EVENT: &'static str = "DecisionDepositRefunded"; } #[derive( @@ -11948,7 +10341,7 @@ pub mod api { pub type Amount = ::core::primitive::u128; } impl ::subxt::ext::subxt_core::events::StaticEvent for DepositSlashed { - const PALLET: &'static str = "TechReferenda"; + const PALLET: &'static str = "Referenda"; const EVENT: &'static str = "DepositSlashed"; } #[derive( @@ -11973,10 +10366,11 @@ pub mod api { runtime_types::quantus_runtime::RuntimeCall, runtime_types::poseidon_resonance::PoseidonHasher, >; - pub type Tally = runtime_types::pallet_ranked_collective::Tally; + pub type Tally = + runtime_types::pallet_conviction_voting::types::Tally<::core::primitive::u128>; } impl ::subxt::ext::subxt_core::events::StaticEvent for DecisionStarted { - const PALLET: &'static str = "TechReferenda"; + const PALLET: &'static str = "Referenda"; const EVENT: &'static str = "DecisionStarted"; } #[derive( @@ -11994,7 +10388,7 @@ pub mod api { pub type Index = ::core::primitive::u32; } impl ::subxt::ext::subxt_core::events::StaticEvent for ConfirmStarted { - const PALLET: &'static str = "TechReferenda"; + const PALLET: &'static str = "Referenda"; const EVENT: &'static str = "ConfirmStarted"; } #[derive( @@ -12012,7 +10406,7 @@ pub mod api { pub type Index = ::core::primitive::u32; } impl ::subxt::ext::subxt_core::events::StaticEvent for ConfirmAborted { - const PALLET: &'static str = "TechReferenda"; + const PALLET: &'static str = "Referenda"; const EVENT: &'static str = "ConfirmAborted"; } #[derive( @@ -12030,10 +10424,11 @@ pub mod api { pub mod confirmed { use super::runtime_types; pub type Index = ::core::primitive::u32; - pub type Tally = runtime_types::pallet_ranked_collective::Tally; + pub type Tally = + runtime_types::pallet_conviction_voting::types::Tally<::core::primitive::u128>; } impl ::subxt::ext::subxt_core::events::StaticEvent for Confirmed { - const PALLET: &'static str = "TechReferenda"; + const PALLET: &'static str = "Referenda"; const EVENT: &'static str = "Confirmed"; } #[derive( @@ -12052,7 +10447,7 @@ pub mod api { pub type Index = ::core::primitive::u32; } impl ::subxt::ext::subxt_core::events::StaticEvent for Approved { - const PALLET: &'static str = "TechReferenda"; + const PALLET: &'static str = "Referenda"; const EVENT: &'static str = "Approved"; } #[derive( @@ -12070,10 +10465,11 @@ pub mod api { pub mod rejected { use super::runtime_types; pub type Index = ::core::primitive::u32; - pub type Tally = runtime_types::pallet_ranked_collective::Tally; + pub type Tally = + runtime_types::pallet_conviction_voting::types::Tally<::core::primitive::u128>; } impl ::subxt::ext::subxt_core::events::StaticEvent for Rejected { - const PALLET: &'static str = "TechReferenda"; + const PALLET: &'static str = "Referenda"; const EVENT: &'static str = "Rejected"; } #[derive( @@ -12091,10 +10487,11 @@ pub mod api { pub mod timed_out { use super::runtime_types; pub type Index = ::core::primitive::u32; - pub type Tally = runtime_types::pallet_ranked_collective::Tally; + pub type Tally = + runtime_types::pallet_conviction_voting::types::Tally<::core::primitive::u128>; } impl ::subxt::ext::subxt_core::events::StaticEvent for TimedOut { - const PALLET: &'static str = "TechReferenda"; + const PALLET: &'static str = "Referenda"; const EVENT: &'static str = "TimedOut"; } #[derive( @@ -12112,10 +10509,11 @@ pub mod api { pub mod cancelled { use super::runtime_types; pub type Index = ::core::primitive::u32; - pub type Tally = runtime_types::pallet_ranked_collective::Tally; + pub type Tally = + runtime_types::pallet_conviction_voting::types::Tally<::core::primitive::u128>; } impl ::subxt::ext::subxt_core::events::StaticEvent for Cancelled { - const PALLET: &'static str = "TechReferenda"; + const PALLET: &'static str = "Referenda"; const EVENT: &'static str = "Cancelled"; } #[derive( @@ -12133,10 +10531,11 @@ pub mod api { pub mod killed { use super::runtime_types; pub type Index = ::core::primitive::u32; - pub type Tally = runtime_types::pallet_ranked_collective::Tally; + pub type Tally = + runtime_types::pallet_conviction_voting::types::Tally<::core::primitive::u128>; } impl ::subxt::ext::subxt_core::events::StaticEvent for Killed { - const PALLET: &'static str = "TechReferenda"; + const PALLET: &'static str = "Referenda"; const EVENT: &'static str = "Killed"; } #[derive( @@ -12159,7 +10558,7 @@ pub mod api { pub type Amount = ::core::primitive::u128; } impl ::subxt::ext::subxt_core::events::StaticEvent for SubmissionDepositRefunded { - const PALLET: &'static str = "TechReferenda"; + const PALLET: &'static str = "Referenda"; const EVENT: &'static str = "SubmissionDepositRefunded"; } #[derive( @@ -12180,7 +10579,7 @@ pub mod api { pub type Hash = ::subxt::ext::subxt_core::utils::H256; } impl ::subxt::ext::subxt_core::events::StaticEvent for MetadataSet { - const PALLET: &'static str = "TechReferenda"; + const PALLET: &'static str = "Referenda"; const EVENT: &'static str = "MetadataSet"; } #[derive( @@ -12201,7 +10600,7 @@ pub mod api { pub type Hash = ::subxt::ext::subxt_core::utils::H256; } impl ::subxt::ext::subxt_core::events::StaticEvent for MetadataCleared { - const PALLET: &'static str = "TechReferenda"; + const PALLET: &'static str = "Referenda"; const EVENT: &'static str = "MetadataCleared"; } } @@ -12225,7 +10624,9 @@ pub mod api { runtime_types::poseidon_resonance::PoseidonHasher, >, ::core::primitive::u128, - runtime_types::pallet_ranked_collective::Tally, + runtime_types::pallet_conviction_voting::types::Tally< + ::core::primitive::u128, + >, ::subxt::ext::subxt_core::utils::AccountId32, ( runtime_types::qp_scheduler::BlockNumberOrTimestamp< @@ -12242,7 +10643,7 @@ pub mod api { pub type TrackQueue = runtime_types::bounded_collections::bounded_vec::BoundedVec<( ::core::primitive::u32, - ::core::primitive::u32, + ::core::primitive::u128, )>; pub type Param0 = ::core::primitive::u16; } @@ -12270,7 +10671,7 @@ pub mod api { (), > { ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "TechReferenda", + "Referenda", "ReferendumCount", (), [ @@ -12292,13 +10693,13 @@ pub mod api { ::subxt::ext::subxt_core::utils::Yes, > { ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "TechReferenda", + "Referenda", "ReferendumInfoFor", (), [ - 192u8, 180u8, 68u8, 141u8, 53u8, 224u8, 151u8, 105u8, 99u8, 45u8, - 177u8, 250u8, 11u8, 236u8, 98u8, 81u8, 52u8, 44u8, 71u8, 238u8, 77u8, - 139u8, 182u8, 93u8, 241u8, 238u8, 66u8, 73u8, 10u8, 96u8, 129u8, 162u8, + 141u8, 184u8, 126u8, 61u8, 215u8, 190u8, 148u8, 93u8, 186u8, 72u8, + 110u8, 37u8, 82u8, 237u8, 65u8, 197u8, 69u8, 83u8, 173u8, 114u8, 117u8, + 72u8, 146u8, 28u8, 235u8, 60u8, 188u8, 247u8, 80u8, 240u8, 16u8, 194u8, ], ) } @@ -12316,13 +10717,13 @@ pub mod api { (), > { ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "TechReferenda", + "Referenda", "ReferendumInfoFor", ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), [ - 192u8, 180u8, 68u8, 141u8, 53u8, 224u8, 151u8, 105u8, 99u8, 45u8, - 177u8, 250u8, 11u8, 236u8, 98u8, 81u8, 52u8, 44u8, 71u8, 238u8, 77u8, - 139u8, 182u8, 93u8, 241u8, 238u8, 66u8, 73u8, 10u8, 96u8, 129u8, 162u8, + 141u8, 184u8, 126u8, 61u8, 215u8, 190u8, 148u8, 93u8, 186u8, 72u8, + 110u8, 37u8, 82u8, 237u8, 65u8, 197u8, 69u8, 83u8, 173u8, 114u8, 117u8, + 72u8, 146u8, 28u8, 235u8, 60u8, 188u8, 247u8, 80u8, 240u8, 16u8, 194u8, ], ) } @@ -12340,14 +10741,13 @@ pub mod api { ::subxt::ext::subxt_core::utils::Yes, > { ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "TechReferenda", + "Referenda", "TrackQueue", (), [ - 187u8, 113u8, 225u8, 99u8, 159u8, 207u8, 182u8, 41u8, 116u8, 136u8, - 119u8, 196u8, 152u8, 50u8, 192u8, 22u8, 171u8, 182u8, 237u8, 228u8, - 80u8, 255u8, 227u8, 141u8, 155u8, 83u8, 71u8, 131u8, 118u8, 109u8, - 186u8, 65u8, + 125u8, 59u8, 111u8, 68u8, 27u8, 236u8, 82u8, 55u8, 83u8, 159u8, 105u8, + 20u8, 241u8, 118u8, 58u8, 141u8, 103u8, 60u8, 246u8, 49u8, 121u8, + 183u8, 7u8, 203u8, 225u8, 67u8, 132u8, 79u8, 150u8, 107u8, 71u8, 89u8, ], ) } @@ -12368,14 +10768,13 @@ pub mod api { (), > { ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "TechReferenda", + "Referenda", "TrackQueue", ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), [ - 187u8, 113u8, 225u8, 99u8, 159u8, 207u8, 182u8, 41u8, 116u8, 136u8, - 119u8, 196u8, 152u8, 50u8, 192u8, 22u8, 171u8, 182u8, 237u8, 228u8, - 80u8, 255u8, 227u8, 141u8, 155u8, 83u8, 71u8, 131u8, 118u8, 109u8, - 186u8, 65u8, + 125u8, 59u8, 111u8, 68u8, 27u8, 236u8, 82u8, 55u8, 83u8, 159u8, 105u8, + 20u8, 241u8, 118u8, 58u8, 141u8, 103u8, 60u8, 246u8, 49u8, 121u8, + 183u8, 7u8, 203u8, 225u8, 67u8, 132u8, 79u8, 150u8, 107u8, 71u8, 89u8, ], ) } @@ -12390,7 +10789,7 @@ pub mod api { ::subxt::ext::subxt_core::utils::Yes, > { ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "TechReferenda", + "Referenda", "DecidingCount", (), [ @@ -12415,7 +10814,7 @@ pub mod api { (), > { ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "TechReferenda", + "Referenda", "DecidingCount", ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), [ @@ -12442,7 +10841,7 @@ pub mod api { ::subxt::ext::subxt_core::utils::Yes, > { ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "TechReferenda", + "Referenda", "MetadataOf", (), [ @@ -12472,7 +10871,7 @@ pub mod api { (), > { ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "TechReferenda", + "Referenda", "MetadataOf", ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), [ @@ -12496,7 +10895,7 @@ pub mod api { ::core::primitive::u128, > { ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "TechReferenda", + "Referenda", "SubmissionDeposit", [ 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, @@ -12512,7 +10911,7 @@ pub mod api { ::core::primitive::u32, > { ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "TechReferenda", + "Referenda", "MaxQueued", [ 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, @@ -12530,7 +10929,7 @@ pub mod api { ::core::primitive::u32, > { ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "TechReferenda", + "Referenda", "UndecidingTimeout", [ 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, @@ -12549,7 +10948,7 @@ pub mod api { ::core::primitive::u32, > { ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "TechReferenda", + "Referenda", "AlarmInterval", [ 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, @@ -12559,20 +10958,23 @@ pub mod api { ], ) } - #[doc = " Information concerning the different referendum tracks."] + #[doc = " A list of tracks."] + #[doc = ""] + #[doc = " Note: if the tracks are dynamic, the value in the static metadata might be inaccurate."] pub fn tracks( &self, ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< ::subxt::ext::subxt_core::alloc::vec::Vec<( ::core::primitive::u16, - runtime_types::pallet_referenda::types::TrackInfo< + runtime_types::pallet_referenda::types::TrackDetails< ::core::primitive::u128, ::core::primitive::u32, + ::subxt::ext::subxt_core::alloc::string::String, >, )>, > { ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "TechReferenda", + "Referenda", "Tracks", [ 35u8, 226u8, 207u8, 234u8, 184u8, 139u8, 187u8, 184u8, 128u8, 199u8, @@ -12585,12 +10987,12 @@ pub mod api { } } } - pub mod merkle_airdrop { + pub mod reversible_transfers { use super::{root_mod, runtime_types}; #[doc = "The `Error` enum of this pallet."] - pub type Error = runtime_types::pallet_merkle_airdrop::pallet::Error; + pub type Error = runtime_types::pallet_reversible_transfers::pallet::Error; #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] - pub type Call = runtime_types::pallet_merkle_airdrop::pallet::Call; + pub type Call = runtime_types::pallet_reversible_transfers::pallet::Call; pub mod calls { use super::{root_mod, runtime_types}; type DispatchError = runtime_types::sp_runtime::DispatchError; @@ -12607,32 +11009,26 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Create a new airdrop with a Merkle root."] - #[doc = ""] - #[doc = "The Merkle root is a cryptographic hash that represents all valid claims"] - #[doc = "for this airdrop. Users will later provide Merkle proofs to verify their"] - #[doc = "eligibility to claim tokens."] - #[doc = ""] - #[doc = "# Parameters"] + #[doc = "Enable high-security for the calling account with a specified delay"] #[doc = ""] - #[doc = "* `origin` - The origin of the call (must be signed)"] - #[doc = "* `merkle_root` - The Merkle root hash representing all valid claims"] - #[doc = "* `vesting_period` - Optional vesting period for the airdrop"] - #[doc = "* `vesting_delay` - Optional delay before vesting starts"] - pub struct CreateAirdrop { - pub merkle_root: create_airdrop::MerkleRoot, - pub vesting_period: create_airdrop::VestingPeriod, - pub vesting_delay: create_airdrop::VestingDelay, + #[doc = "- `delay`: The time (in milliseconds) after submission before the transaction executes."] + pub struct SetHighSecurity { + pub delay: set_high_security::Delay, + pub interceptor: set_high_security::Interceptor, + pub recoverer: set_high_security::Recoverer, } - pub mod create_airdrop { + pub mod set_high_security { use super::runtime_types; - pub type MerkleRoot = [::core::primitive::u8; 32usize]; - pub type VestingPeriod = ::core::option::Option<::core::primitive::u32>; - pub type VestingDelay = ::core::option::Option<::core::primitive::u32>; + pub type Delay = runtime_types::qp_scheduler::BlockNumberOrTimestamp< + ::core::primitive::u32, + ::core::primitive::u64, + >; + pub type Interceptor = ::subxt::ext::subxt_core::utils::AccountId32; + pub type Recoverer = ::subxt::ext::subxt_core::utils::AccountId32; } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for CreateAirdrop { - const PALLET: &'static str = "MerkleAirdrop"; - const CALL: &'static str = "create_airdrop"; + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for SetHighSecurity { + const PALLET: &'static str = "ReversibleTransfers"; + const CALL: &'static str = "set_high_security"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -12645,32 +11041,19 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Fund an existing airdrop with tokens."] - #[doc = ""] - #[doc = "This function transfers tokens from the caller to the airdrop's account,"] - #[doc = "making them available for users to claim."] - #[doc = ""] - #[doc = "# Parameters"] - #[doc = ""] - #[doc = "* `origin` - The origin of the call (must be signed)"] - #[doc = "* `airdrop_id` - The ID of the airdrop to fund"] - #[doc = "* `amount` - The amount of tokens to add to the airdrop"] - #[doc = ""] - #[doc = "# Errors"] + #[doc = "Cancel a pending reversible transaction scheduled by the caller."] #[doc = ""] - #[doc = "* `AirdropNotFound` - If the specified airdrop does not exist"] - pub struct FundAirdrop { - pub airdrop_id: fund_airdrop::AirdropId, - pub amount: fund_airdrop::Amount, + #[doc = "- `tx_id`: The unique identifier of the transaction to cancel."] + pub struct Cancel { + pub tx_id: cancel::TxId, } - pub mod fund_airdrop { + pub mod cancel { use super::runtime_types; - pub type AirdropId = ::core::primitive::u32; - pub type Amount = ::core::primitive::u128; + pub type TxId = ::subxt::ext::subxt_core::utils::H256; } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for FundAirdrop { - const PALLET: &'static str = "MerkleAirdrop"; - const CALL: &'static str = "fund_airdrop"; + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for Cancel { + const PALLET: &'static str = "ReversibleTransfers"; + const CALL: &'static str = "cancel"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -12683,44 +11066,47 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Claim tokens from an airdrop by providing a Merkle proof."] - #[doc = ""] - #[doc = "Users can claim their tokens by providing a proof of their eligibility."] - #[doc = "The proof is verified against the airdrop's Merkle root."] - #[doc = "Anyone can trigger a claim for any eligible recipient."] - #[doc = ""] - #[doc = "# Parameters"] - #[doc = ""] - #[doc = "* `origin` - The origin of the call"] - #[doc = "* `airdrop_id` - The ID of the airdrop to claim from"] - #[doc = "* `amount` - The amount of tokens to claim"] - #[doc = "* `merkle_proof` - The Merkle proof verifying eligibility"] - #[doc = ""] - #[doc = "# Errors"] + #[doc = "Called by the Scheduler to finalize the scheduled task/call"] #[doc = ""] - #[doc = "* `AirdropNotFound` - If the specified airdrop does not exist"] - #[doc = "* `AlreadyClaimed` - If the recipient has already claimed from this airdrop"] - #[doc = "* `InvalidProof` - If the provided Merkle proof is invalid"] - #[doc = "* `InsufficientAirdropBalance` - If the airdrop doesn't have enough tokens"] - pub struct Claim { - pub airdrop_id: claim::AirdropId, - pub recipient: claim::Recipient, - pub amount: claim::Amount, - pub merkle_proof: claim::MerkleProof, + #[doc = "- `tx_id`: The unique id of the transaction to finalize and dispatch."] + pub struct ExecuteTransfer { + pub tx_id: execute_transfer::TxId, } - pub mod claim { + pub mod execute_transfer { use super::runtime_types; - pub type AirdropId = ::core::primitive::u32; - pub type Recipient = ::subxt::ext::subxt_core::utils::AccountId32; + pub type TxId = ::subxt::ext::subxt_core::utils::H256; + } + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for ExecuteTransfer { + const PALLET: &'static str = "ReversibleTransfers"; + const CALL: &'static str = "execute_transfer"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "Schedule a transaction for delayed execution."] + pub struct ScheduleTransfer { + pub dest: schedule_transfer::Dest, + pub amount: schedule_transfer::Amount, + } + pub mod schedule_transfer { + use super::runtime_types; + pub type Dest = ::subxt::ext::subxt_core::utils::MultiAddress< + ::subxt::ext::subxt_core::utils::AccountId32, + (), + >; pub type Amount = ::core::primitive::u128; - pub type MerkleProof = - runtime_types::bounded_collections::bounded_vec::BoundedVec< - [::core::primitive::u8; 32usize], - >; } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for Claim { - const PALLET: &'static str = "MerkleAirdrop"; - const CALL: &'static str = "claim"; + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for ScheduleTransfer { + const PALLET: &'static str = "ReversibleTransfers"; + const CALL: &'static str = "schedule_transfer"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -12733,165 +11119,144 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Delete an airdrop and reclaim any remaining funds."] - #[doc = ""] - #[doc = "This function allows the creator of an airdrop to delete it and reclaim"] - #[doc = "any remaining tokens that haven't been claimed."] - #[doc = ""] - #[doc = "# Parameters"] - #[doc = ""] - #[doc = "* `origin` - The origin of the call (must be the airdrop creator)"] - #[doc = "* `airdrop_id` - The ID of the airdrop to delete"] + #[doc = "Schedule a transaction for delayed execution with a custom, one-time delay."] #[doc = ""] - #[doc = "# Errors"] + #[doc = "This can only be used by accounts that have *not* set up a persistent"] + #[doc = "reversibility configuration with `set_reversibility`."] #[doc = ""] - #[doc = "* `AirdropNotFound` - If the specified airdrop does not exist"] - #[doc = "* `NotAirdropCreator` - If the caller is not the creator of the airdrop"] - pub struct DeleteAirdrop { - pub airdrop_id: delete_airdrop::AirdropId, + #[doc = "- `delay`: The time (in blocks or milliseconds) before the transaction executes."] + pub struct ScheduleTransferWithDelay { + pub dest: schedule_transfer_with_delay::Dest, + pub amount: schedule_transfer_with_delay::Amount, + pub delay: schedule_transfer_with_delay::Delay, } - pub mod delete_airdrop { + pub mod schedule_transfer_with_delay { use super::runtime_types; - pub type AirdropId = ::core::primitive::u32; + pub type Dest = ::subxt::ext::subxt_core::utils::MultiAddress< + ::subxt::ext::subxt_core::utils::AccountId32, + (), + >; + pub type Amount = ::core::primitive::u128; + pub type Delay = runtime_types::qp_scheduler::BlockNumberOrTimestamp< + ::core::primitive::u32, + ::core::primitive::u64, + >; } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for DeleteAirdrop { - const PALLET: &'static str = "MerkleAirdrop"; - const CALL: &'static str = "delete_airdrop"; + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for ScheduleTransferWithDelay { + const PALLET: &'static str = "ReversibleTransfers"; + const CALL: &'static str = "schedule_transfer_with_delay"; } } pub struct TransactionApi; impl TransactionApi { - #[doc = "Create a new airdrop with a Merkle root."] - #[doc = ""] - #[doc = "The Merkle root is a cryptographic hash that represents all valid claims"] - #[doc = "for this airdrop. Users will later provide Merkle proofs to verify their"] - #[doc = "eligibility to claim tokens."] - #[doc = ""] - #[doc = "# Parameters"] + #[doc = "Enable high-security for the calling account with a specified delay"] #[doc = ""] - #[doc = "* `origin` - The origin of the call (must be signed)"] - #[doc = "* `merkle_root` - The Merkle root hash representing all valid claims"] - #[doc = "* `vesting_period` - Optional vesting period for the airdrop"] - #[doc = "* `vesting_delay` - Optional delay before vesting starts"] - pub fn create_airdrop( + #[doc = "- `delay`: The time (in milliseconds) after submission before the transaction executes."] + pub fn set_high_security( &self, - merkle_root: types::create_airdrop::MerkleRoot, - vesting_period: types::create_airdrop::VestingPeriod, - vesting_delay: types::create_airdrop::VestingDelay, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload + delay: types::set_high_security::Delay, + interceptor: types::set_high_security::Interceptor, + recoverer: types::set_high_security::Recoverer, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "MerkleAirdrop", - "create_airdrop", - types::CreateAirdrop { merkle_root, vesting_period, vesting_delay }, + "ReversibleTransfers", + "set_high_security", + types::SetHighSecurity { delay, interceptor, recoverer }, [ - 18u8, 201u8, 105u8, 56u8, 66u8, 207u8, 57u8, 177u8, 133u8, 38u8, 185u8, - 19u8, 205u8, 119u8, 177u8, 206u8, 188u8, 88u8, 138u8, 33u8, 246u8, - 179u8, 148u8, 0u8, 79u8, 201u8, 89u8, 229u8, 46u8, 77u8, 42u8, 117u8, + 84u8, 79u8, 110u8, 9u8, 173u8, 78u8, 144u8, 58u8, 220u8, 161u8, 42u8, + 121u8, 88u8, 168u8, 178u8, 42u8, 29u8, 253u8, 161u8, 83u8, 45u8, 204u8, + 155u8, 136u8, 209u8, 33u8, 200u8, 13u8, 46u8, 162u8, 223u8, 171u8, ], ) } - #[doc = "Fund an existing airdrop with tokens."] - #[doc = ""] - #[doc = "This function transfers tokens from the caller to the airdrop's account,"] - #[doc = "making them available for users to claim."] - #[doc = ""] - #[doc = "# Parameters"] - #[doc = ""] - #[doc = "* `origin` - The origin of the call (must be signed)"] - #[doc = "* `airdrop_id` - The ID of the airdrop to fund"] - #[doc = "* `amount` - The amount of tokens to add to the airdrop"] - #[doc = ""] - #[doc = "# Errors"] + #[doc = "Cancel a pending reversible transaction scheduled by the caller."] #[doc = ""] - #[doc = "* `AirdropNotFound` - If the specified airdrop does not exist"] - pub fn fund_airdrop( + #[doc = "- `tx_id`: The unique identifier of the transaction to cancel."] + pub fn cancel( &self, - airdrop_id: types::fund_airdrop::AirdropId, - amount: types::fund_airdrop::Amount, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "MerkleAirdrop", - "fund_airdrop", - types::FundAirdrop { airdrop_id, amount }, + tx_id: types::cancel::TxId, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "ReversibleTransfers", + "cancel", + types::Cancel { tx_id }, [ - 11u8, 155u8, 135u8, 152u8, 19u8, 196u8, 79u8, 68u8, 24u8, 46u8, 27u8, - 63u8, 202u8, 242u8, 166u8, 160u8, 81u8, 44u8, 115u8, 247u8, 110u8, - 49u8, 11u8, 204u8, 70u8, 39u8, 7u8, 43u8, 103u8, 78u8, 39u8, 131u8, + 228u8, 150u8, 194u8, 119u8, 243u8, 126u8, 112u8, 227u8, 70u8, 160u8, + 132u8, 82u8, 146u8, 162u8, 195u8, 149u8, 236u8, 98u8, 18u8, 44u8, + 151u8, 249u8, 193u8, 176u8, 186u8, 98u8, 224u8, 103u8, 191u8, 165u8, + 37u8, 47u8, ], ) } - #[doc = "Claim tokens from an airdrop by providing a Merkle proof."] - #[doc = ""] - #[doc = "Users can claim their tokens by providing a proof of their eligibility."] - #[doc = "The proof is verified against the airdrop's Merkle root."] - #[doc = "Anyone can trigger a claim for any eligible recipient."] - #[doc = ""] - #[doc = "# Parameters"] - #[doc = ""] - #[doc = "* `origin` - The origin of the call"] - #[doc = "* `airdrop_id` - The ID of the airdrop to claim from"] - #[doc = "* `amount` - The amount of tokens to claim"] - #[doc = "* `merkle_proof` - The Merkle proof verifying eligibility"] - #[doc = ""] - #[doc = "# Errors"] + #[doc = "Called by the Scheduler to finalize the scheduled task/call"] #[doc = ""] - #[doc = "* `AirdropNotFound` - If the specified airdrop does not exist"] - #[doc = "* `AlreadyClaimed` - If the recipient has already claimed from this airdrop"] - #[doc = "* `InvalidProof` - If the provided Merkle proof is invalid"] - #[doc = "* `InsufficientAirdropBalance` - If the airdrop doesn't have enough tokens"] - pub fn claim( + #[doc = "- `tx_id`: The unique id of the transaction to finalize and dispatch."] + pub fn execute_transfer( &self, - airdrop_id: types::claim::AirdropId, - recipient: types::claim::Recipient, - amount: types::claim::Amount, - merkle_proof: types::claim::MerkleProof, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { + tx_id: types::execute_transfer::TxId, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload + { ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "MerkleAirdrop", - "claim", - types::Claim { airdrop_id, recipient, amount, merkle_proof }, + "ReversibleTransfers", + "execute_transfer", + types::ExecuteTransfer { tx_id }, [ - 137u8, 9u8, 80u8, 195u8, 157u8, 215u8, 158u8, 30u8, 26u8, 104u8, 183u8, - 55u8, 102u8, 100u8, 41u8, 40u8, 26u8, 193u8, 255u8, 95u8, 201u8, 240u8, - 18u8, 253u8, 71u8, 117u8, 88u8, 250u8, 192u8, 67u8, 127u8, 159u8, + 164u8, 38u8, 166u8, 81u8, 63u8, 235u8, 167u8, 178u8, 97u8, 80u8, 62u8, + 147u8, 3u8, 163u8, 129u8, 25u8, 98u8, 59u8, 17u8, 137u8, 6u8, 183u8, + 189u8, 51u8, 24u8, 211u8, 157u8, 108u8, 229u8, 253u8, 37u8, 78u8, ], ) } - #[doc = "Delete an airdrop and reclaim any remaining funds."] - #[doc = ""] - #[doc = "This function allows the creator of an airdrop to delete it and reclaim"] - #[doc = "any remaining tokens that haven't been claimed."] - #[doc = ""] - #[doc = "# Parameters"] - #[doc = ""] - #[doc = "* `origin` - The origin of the call (must be the airdrop creator)"] - #[doc = "* `airdrop_id` - The ID of the airdrop to delete"] + #[doc = "Schedule a transaction for delayed execution."] + pub fn schedule_transfer( + &self, + dest: types::schedule_transfer::Dest, + amount: types::schedule_transfer::Amount, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload + { + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "ReversibleTransfers", + "schedule_transfer", + types::ScheduleTransfer { dest, amount }, + [ + 38u8, 219u8, 206u8, 56u8, 252u8, 195u8, 52u8, 74u8, 113u8, 125u8, + 107u8, 35u8, 236u8, 39u8, 31u8, 18u8, 250u8, 177u8, 174u8, 154u8, + 149u8, 122u8, 183u8, 50u8, 45u8, 111u8, 100u8, 249u8, 102u8, 82u8, + 72u8, 130u8, + ], + ) + } + #[doc = "Schedule a transaction for delayed execution with a custom, one-time delay."] #[doc = ""] - #[doc = "# Errors"] + #[doc = "This can only be used by accounts that have *not* set up a persistent"] + #[doc = "reversibility configuration with `set_reversibility`."] #[doc = ""] - #[doc = "* `AirdropNotFound` - If the specified airdrop does not exist"] - #[doc = "* `NotAirdropCreator` - If the caller is not the creator of the airdrop"] - pub fn delete_airdrop( + #[doc = "- `delay`: The time (in blocks or milliseconds) before the transaction executes."] + pub fn schedule_transfer_with_delay( &self, - airdrop_id: types::delete_airdrop::AirdropId, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload - { + dest: types::schedule_transfer_with_delay::Dest, + amount: types::schedule_transfer_with_delay::Amount, + delay: types::schedule_transfer_with_delay::Delay, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload< + types::ScheduleTransferWithDelay, + > { ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "MerkleAirdrop", - "delete_airdrop", - types::DeleteAirdrop { airdrop_id }, + "ReversibleTransfers", + "schedule_transfer_with_delay", + types::ScheduleTransferWithDelay { dest, amount, delay }, [ - 34u8, 88u8, 199u8, 36u8, 214u8, 19u8, 124u8, 24u8, 29u8, 222u8, 138u8, - 174u8, 47u8, 199u8, 59u8, 155u8, 118u8, 157u8, 82u8, 96u8, 81u8, 186u8, - 27u8, 96u8, 116u8, 99u8, 185u8, 8u8, 100u8, 34u8, 179u8, 185u8, + 254u8, 158u8, 173u8, 217u8, 107u8, 80u8, 229u8, 252u8, 123u8, 46u8, + 177u8, 40u8, 25u8, 15u8, 32u8, 22u8, 224u8, 52u8, 242u8, 48u8, 242u8, + 84u8, 242u8, 143u8, 111u8, 12u8, 82u8, 161u8, 129u8, 86u8, 161u8, + 216u8, ], ) } } } #[doc = "The `Event` enum of this pallet"] - pub type Event = runtime_types::pallet_merkle_airdrop::pallet::Event; + pub type Event = runtime_types::pallet_reversible_transfers::pallet::Event; pub mod events { use super::runtime_types; #[derive( @@ -12901,25 +11266,27 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "A new airdrop has been created."] - #[doc = ""] - #[doc = "Parameters: [airdrop_id, merkle_root]"] - pub struct AirdropCreated { - pub airdrop_id: airdrop_created::AirdropId, - pub airdrop_metadata: airdrop_created::AirdropMetadata, + #[doc = "A user has enabled their high-security settings."] + #[doc = "[who, interceptor, recoverer, delay]"] + pub struct HighSecuritySet { + pub who: high_security_set::Who, + pub interceptor: high_security_set::Interceptor, + pub recoverer: high_security_set::Recoverer, + pub delay: high_security_set::Delay, } - pub mod airdrop_created { + pub mod high_security_set { use super::runtime_types; - pub type AirdropId = ::core::primitive::u32; - pub type AirdropMetadata = runtime_types::pallet_merkle_airdrop::AirdropMetadata< + pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; + pub type Interceptor = ::subxt::ext::subxt_core::utils::AccountId32; + pub type Recoverer = ::subxt::ext::subxt_core::utils::AccountId32; + pub type Delay = runtime_types::qp_scheduler::BlockNumberOrTimestamp< ::core::primitive::u32, - ::core::primitive::u128, - ::subxt::ext::subxt_core::utils::AccountId32, + ::core::primitive::u64, >; } - impl ::subxt::ext::subxt_core::events::StaticEvent for AirdropCreated { - const PALLET: &'static str = "MerkleAirdrop"; - const EVENT: &'static str = "AirdropCreated"; + impl ::subxt::ext::subxt_core::events::StaticEvent for HighSecuritySet { + const PALLET: &'static str = "ReversibleTransfers"; + const EVENT: &'static str = "HighSecuritySet"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -12928,21 +11295,31 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "An airdrop has been funded with tokens."] - #[doc = ""] - #[doc = "Parameters: [airdrop_id, amount]"] - pub struct AirdropFunded { - pub airdrop_id: airdrop_funded::AirdropId, - pub amount: airdrop_funded::Amount, + #[doc = "A transaction has been intercepted and scheduled for delayed execution."] + #[doc = "[from, to, interceptor, amount, tx_id, execute_at_moment]"] + pub struct TransactionScheduled { + pub from: transaction_scheduled::From, + pub to: transaction_scheduled::To, + pub interceptor: transaction_scheduled::Interceptor, + pub amount: transaction_scheduled::Amount, + pub tx_id: transaction_scheduled::TxId, + pub execute_at: transaction_scheduled::ExecuteAt, } - pub mod airdrop_funded { + pub mod transaction_scheduled { use super::runtime_types; - pub type AirdropId = ::core::primitive::u32; + pub type From = ::subxt::ext::subxt_core::utils::AccountId32; + pub type To = ::subxt::ext::subxt_core::utils::AccountId32; + pub type Interceptor = ::subxt::ext::subxt_core::utils::AccountId32; pub type Amount = ::core::primitive::u128; + pub type TxId = ::subxt::ext::subxt_core::utils::H256; + pub type ExecuteAt = runtime_types::qp_scheduler::DispatchTime< + ::core::primitive::u32, + ::core::primitive::u64, + >; } - impl ::subxt::ext::subxt_core::events::StaticEvent for AirdropFunded { - const PALLET: &'static str = "MerkleAirdrop"; - const EVENT: &'static str = "AirdropFunded"; + impl ::subxt::ext::subxt_core::events::StaticEvent for TransactionScheduled { + const PALLET: &'static str = "ReversibleTransfers"; + const EVENT: &'static str = "TransactionScheduled"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -12951,23 +11328,20 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "A user has claimed tokens from an airdrop."] - #[doc = ""] - #[doc = "Parameters: [airdrop_id, account, amount]"] - pub struct Claimed { - pub airdrop_id: claimed::AirdropId, - pub account: claimed::Account, - pub amount: claimed::Amount, + #[doc = "A scheduled transaction has been successfully cancelled by the owner."] + #[doc = "[who, tx_id]"] + pub struct TransactionCancelled { + pub who: transaction_cancelled::Who, + pub tx_id: transaction_cancelled::TxId, } - pub mod claimed { + pub mod transaction_cancelled { use super::runtime_types; - pub type AirdropId = ::core::primitive::u32; - pub type Account = ::subxt::ext::subxt_core::utils::AccountId32; - pub type Amount = ::core::primitive::u128; + pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; + pub type TxId = ::subxt::ext::subxt_core::utils::H256; } - impl ::subxt::ext::subxt_core::events::StaticEvent for Claimed { - const PALLET: &'static str = "MerkleAirdrop"; - const EVENT: &'static str = "Claimed"; + impl ::subxt::ext::subxt_core::events::StaticEvent for TransactionCancelled { + const PALLET: &'static str = "ReversibleTransfers"; + const EVENT: &'static str = "TransactionCancelled"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -12976,243 +11350,492 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "An airdrop has been deleted."] - #[doc = ""] - #[doc = "Parameters: [airdrop_id]"] - pub struct AirdropDeleted { - pub airdrop_id: airdrop_deleted::AirdropId, + #[doc = "A scheduled transaction was executed by the scheduler."] + #[doc = "[tx_id, dispatch_result]"] + pub struct TransactionExecuted { + pub tx_id: transaction_executed::TxId, + pub result: transaction_executed::Result, } - pub mod airdrop_deleted { + pub mod transaction_executed { use super::runtime_types; - pub type AirdropId = ::core::primitive::u32; + pub type TxId = ::subxt::ext::subxt_core::utils::H256; + pub type Result = ::core::result::Result< + runtime_types::frame_support::dispatch::PostDispatchInfo, + runtime_types::sp_runtime::DispatchErrorWithPostInfo< + runtime_types::frame_support::dispatch::PostDispatchInfo, + >, + >; } - impl ::subxt::ext::subxt_core::events::StaticEvent for AirdropDeleted { - const PALLET: &'static str = "MerkleAirdrop"; - const EVENT: &'static str = "AirdropDeleted"; + impl ::subxt::ext::subxt_core::events::StaticEvent for TransactionExecuted { + const PALLET: &'static str = "ReversibleTransfers"; + const EVENT: &'static str = "TransactionExecuted"; } } pub mod storage { use super::runtime_types; pub mod types { use super::runtime_types; - pub mod airdrop_info { + pub mod high_security_accounts { use super::runtime_types; - pub type AirdropInfo = runtime_types::pallet_merkle_airdrop::AirdropMetadata< - ::core::primitive::u32, - ::core::primitive::u128, - ::subxt::ext::subxt_core::utils::AccountId32, - >; - pub type Param0 = ::core::primitive::u32; + pub type HighSecurityAccounts = + runtime_types::pallet_reversible_transfers::HighSecurityAccountData< + ::subxt::ext::subxt_core::utils::AccountId32, + runtime_types::qp_scheduler::BlockNumberOrTimestamp< + ::core::primitive::u32, + ::core::primitive::u64, + >, + >; + pub type Param0 = ::subxt::ext::subxt_core::utils::AccountId32; } - pub mod claimed { + pub mod pending_transfers { use super::runtime_types; - pub type Claimed = (); - pub type Param0 = ::core::primitive::u32; - pub type Param1 = ::subxt::ext::subxt_core::utils::AccountId32; - } - pub mod next_airdrop_id { + pub type PendingTransfers = + runtime_types::pallet_reversible_transfers::PendingTransfer< + ::subxt::ext::subxt_core::utils::AccountId32, + ::core::primitive::u128, + runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::quantus_runtime::RuntimeCall, + runtime_types::poseidon_resonance::PoseidonHasher, + >, + >; + pub type Param0 = ::subxt::ext::subxt_core::utils::H256; + } + pub mod account_pending_index { use super::runtime_types; - pub type NextAirdropId = ::core::primitive::u32; + pub type AccountPendingIndex = ::core::primitive::u32; + pub type Param0 = ::subxt::ext::subxt_core::utils::AccountId32; + } + pub mod pending_transfers_by_sender { + use super::runtime_types; + pub type PendingTransfersBySender = + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::subxt::ext::subxt_core::utils::H256, + >; + pub type Param0 = ::subxt::ext::subxt_core::utils::AccountId32; + } + pub mod pending_transfers_by_recipient { + use super::runtime_types; + pub type PendingTransfersByRecipient = + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::subxt::ext::subxt_core::utils::H256, + >; + pub type Param0 = ::subxt::ext::subxt_core::utils::AccountId32; + } + pub mod interceptor_index { + use super::runtime_types; + pub type InterceptorIndex = + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::subxt::ext::subxt_core::utils::AccountId32, + >; + pub type Param0 = ::subxt::ext::subxt_core::utils::AccountId32; + } + pub mod global_nonce { + use super::runtime_types; + pub type GlobalNonce = ::core::primitive::u64; } } pub struct StorageApi; impl StorageApi { - #[doc = " Stores general info about an airdrop"] - pub fn airdrop_info_iter( + #[doc = " Maps accounts to their chosen reversibility delay period (in milliseconds)."] + #[doc = " Accounts present in this map have reversibility enabled."] + pub fn high_security_accounts_iter( &self, ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< (), - types::airdrop_info::AirdropInfo, + types::high_security_accounts::HighSecurityAccounts, (), (), ::subxt::ext::subxt_core::utils::Yes, > { ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "MerkleAirdrop", - "AirdropInfo", + "ReversibleTransfers", + "HighSecurityAccounts", (), [ - 38u8, 176u8, 25u8, 251u8, 80u8, 201u8, 118u8, 175u8, 89u8, 80u8, 227u8, - 241u8, 250u8, 0u8, 112u8, 71u8, 133u8, 50u8, 137u8, 13u8, 255u8, 24u8, - 253u8, 237u8, 195u8, 1u8, 192u8, 177u8, 167u8, 248u8, 11u8, 160u8, + 246u8, 192u8, 145u8, 222u8, 167u8, 131u8, 248u8, 22u8, 219u8, 213u8, + 41u8, 3u8, 152u8, 132u8, 180u8, 251u8, 193u8, 91u8, 139u8, 164u8, + 142u8, 208u8, 122u8, 16u8, 40u8, 140u8, 15u8, 38u8, 145u8, 193u8, 77u8, + 165u8, ], ) } - #[doc = " Stores general info about an airdrop"] - pub fn airdrop_info( + #[doc = " Maps accounts to their chosen reversibility delay period (in milliseconds)."] + #[doc = " Accounts present in this map have reversibility enabled."] + pub fn high_security_accounts( &self, - _0: types::airdrop_info::Param0, + _0: types::high_security_accounts::Param0, ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::airdrop_info::Param0, + types::high_security_accounts::Param0, >, - types::airdrop_info::AirdropInfo, + types::high_security_accounts::HighSecurityAccounts, ::subxt::ext::subxt_core::utils::Yes, (), (), > { ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "MerkleAirdrop", - "AirdropInfo", + "ReversibleTransfers", + "HighSecurityAccounts", ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), [ - 38u8, 176u8, 25u8, 251u8, 80u8, 201u8, 118u8, 175u8, 89u8, 80u8, 227u8, - 241u8, 250u8, 0u8, 112u8, 71u8, 133u8, 50u8, 137u8, 13u8, 255u8, 24u8, - 253u8, 237u8, 195u8, 1u8, 192u8, 177u8, 167u8, 248u8, 11u8, 160u8, + 246u8, 192u8, 145u8, 222u8, 167u8, 131u8, 248u8, 22u8, 219u8, 213u8, + 41u8, 3u8, 152u8, 132u8, 180u8, 251u8, 193u8, 91u8, 139u8, 164u8, + 142u8, 208u8, 122u8, 16u8, 40u8, 140u8, 15u8, 38u8, 145u8, 193u8, 77u8, + 165u8, ], ) } - #[doc = " Storage for claimed status"] - pub fn claimed_iter( + #[doc = " Stores the details of pending transactions scheduled for delayed execution."] + #[doc = " Keyed by the unique transaction ID."] + pub fn pending_transfers_iter( &self, ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< (), - types::claimed::Claimed, + types::pending_transfers::PendingTransfers, + (), (), - ::subxt::ext::subxt_core::utils::Yes, ::subxt::ext::subxt_core::utils::Yes, > { ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "MerkleAirdrop", - "Claimed", + "ReversibleTransfers", + "PendingTransfers", (), [ - 214u8, 178u8, 109u8, 48u8, 230u8, 120u8, 107u8, 211u8, 179u8, 251u8, - 164u8, 29u8, 197u8, 154u8, 160u8, 230u8, 112u8, 212u8, 14u8, 157u8, - 248u8, 207u8, 101u8, 159u8, 203u8, 82u8, 199u8, 102u8, 99u8, 239u8, - 162u8, 10u8, + 226u8, 148u8, 100u8, 60u8, 9u8, 160u8, 164u8, 177u8, 53u8, 236u8, 65u8, + 38u8, 207u8, 31u8, 170u8, 79u8, 15u8, 237u8, 127u8, 189u8, 203u8, + 147u8, 4u8, 146u8, 13u8, 87u8, 158u8, 163u8, 159u8, 87u8, 98u8, 211u8, ], ) } - #[doc = " Storage for claimed status"] - pub fn claimed_iter1( + #[doc = " Stores the details of pending transactions scheduled for delayed execution."] + #[doc = " Keyed by the unique transaction ID."] + pub fn pending_transfers( &self, - _0: types::claimed::Param0, + _0: types::pending_transfers::Param0, ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::claimed::Param0, + types::pending_transfers::Param0, >, - types::claimed::Claimed, - (), - ::subxt::ext::subxt_core::utils::Yes, + types::pending_transfers::PendingTransfers, ::subxt::ext::subxt_core::utils::Yes, + (), + (), > { ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "MerkleAirdrop", - "Claimed", + "ReversibleTransfers", + "PendingTransfers", ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), [ - 214u8, 178u8, 109u8, 48u8, 230u8, 120u8, 107u8, 211u8, 179u8, 251u8, - 164u8, 29u8, 197u8, 154u8, 160u8, 230u8, 112u8, 212u8, 14u8, 157u8, - 248u8, 207u8, 101u8, 159u8, 203u8, 82u8, 199u8, 102u8, 99u8, 239u8, - 162u8, 10u8, + 226u8, 148u8, 100u8, 60u8, 9u8, 160u8, 164u8, 177u8, 53u8, 236u8, 65u8, + 38u8, 207u8, 31u8, 170u8, 79u8, 15u8, 237u8, 127u8, 189u8, 203u8, + 147u8, 4u8, 146u8, 13u8, 87u8, 158u8, 163u8, 159u8, 87u8, 98u8, 211u8, ], ) } - #[doc = " Storage for claimed status"] - pub fn claimed( + #[doc = " Indexes pending transaction IDs per account for efficient lookup and cancellation."] + #[doc = " Also enforces the maximum pending transactions limit per account."] + pub fn account_pending_index_iter( &self, - _0: types::claimed::Param0, - _1: types::claimed::Param1, ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - ( - ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::claimed::Param0, - >, - ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::claimed::Param1, - >, - ), - types::claimed::Claimed, + (), + types::account_pending_index::AccountPendingIndex, + (), ::subxt::ext::subxt_core::utils::Yes, ::subxt::ext::subxt_core::utils::Yes, - (), > { ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "MerkleAirdrop", - "Claimed", - ( - ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), - ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_1), - ), + "ReversibleTransfers", + "AccountPendingIndex", + (), [ - 214u8, 178u8, 109u8, 48u8, 230u8, 120u8, 107u8, 211u8, 179u8, 251u8, - 164u8, 29u8, 197u8, 154u8, 160u8, 230u8, 112u8, 212u8, 14u8, 157u8, - 248u8, 207u8, 101u8, 159u8, 203u8, 82u8, 199u8, 102u8, 99u8, 239u8, - 162u8, 10u8, + 142u8, 255u8, 15u8, 41u8, 210u8, 84u8, 93u8, 230u8, 194u8, 31u8, 164u8, + 88u8, 155u8, 106u8, 130u8, 110u8, 199u8, 137u8, 153u8, 99u8, 154u8, + 210u8, 108u8, 136u8, 70u8, 141u8, 242u8, 255u8, 246u8, 19u8, 247u8, + 136u8, ], ) } - #[doc = " Counter for airdrop IDs"] - pub fn next_airdrop_id( + #[doc = " Indexes pending transaction IDs per account for efficient lookup and cancellation."] + #[doc = " Also enforces the maximum pending transactions limit per account."] + pub fn account_pending_index( &self, + _0: types::account_pending_index::Param0, ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::next_airdrop_id::NextAirdropId, + ::subxt::ext::subxt_core::storage::address::StaticStorageKey< + types::account_pending_index::Param0, + >, + types::account_pending_index::AccountPendingIndex, ::subxt::ext::subxt_core::utils::Yes, ::subxt::ext::subxt_core::utils::Yes, (), > { ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "MerkleAirdrop", - "NextAirdropId", - (), + "ReversibleTransfers", + "AccountPendingIndex", + ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), [ - 79u8, 145u8, 145u8, 158u8, 86u8, 58u8, 102u8, 216u8, 133u8, 34u8, - 252u8, 224u8, 222u8, 51u8, 170u8, 3u8, 135u8, 29u8, 99u8, 143u8, 93u8, - 176u8, 69u8, 231u8, 74u8, 214u8, 94u8, 126u8, 227u8, 166u8, 242u8, - 98u8, + 142u8, 255u8, 15u8, 41u8, 210u8, 84u8, 93u8, 230u8, 194u8, 31u8, 164u8, + 88u8, 155u8, 106u8, 130u8, 110u8, 199u8, 137u8, 153u8, 99u8, 154u8, + 210u8, 108u8, 136u8, 70u8, 141u8, 242u8, 255u8, 246u8, 19u8, 247u8, + 136u8, ], ) } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " The maximum number of proof elements allowed in a Merkle proof."] - pub fn max_proofs( + #[doc = " Maps sender accounts to their list of pending transaction IDs."] + #[doc = " This allows users to query all their outgoing pending transfers."] + pub fn pending_transfers_by_sender_iter( &self, - ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< - ::core::primitive::u32, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::pending_transfers_by_sender::PendingTransfersBySender, + (), + ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, > { - ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "MerkleAirdrop", - "MaxProofs", + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "ReversibleTransfers", + "PendingTransfersBySender", + (), [ - 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, + 183u8, 43u8, 139u8, 203u8, 182u8, 219u8, 60u8, 129u8, 67u8, 30u8, 65u8, + 47u8, 105u8, 196u8, 228u8, 154u8, 26u8, 74u8, 84u8, 72u8, 154u8, 220u8, + 216u8, 134u8, 207u8, 240u8, 7u8, 190u8, 236u8, 242u8, 184u8, 224u8, ], ) } - #[doc = " The pallet id, used for deriving its sovereign account ID."] - pub fn pallet_id( + #[doc = " Maps sender accounts to their list of pending transaction IDs."] + #[doc = " This allows users to query all their outgoing pending transfers."] + pub fn pending_transfers_by_sender( &self, - ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< - runtime_types::frame_support::PalletId, + _0: types::pending_transfers_by_sender::Param0, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + ::subxt::ext::subxt_core::storage::address::StaticStorageKey< + types::pending_transfers_by_sender::Param0, + >, + types::pending_transfers_by_sender::PendingTransfersBySender, + ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, + (), > { - ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "MerkleAirdrop", - "PalletId", + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "ReversibleTransfers", + "PendingTransfersBySender", + ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), [ - 56u8, 243u8, 53u8, 83u8, 154u8, 179u8, 170u8, 80u8, 133u8, 173u8, 61u8, - 161u8, 47u8, 225u8, 146u8, 21u8, 50u8, 229u8, 248u8, 27u8, 104u8, 58u8, - 129u8, 197u8, 102u8, 160u8, 168u8, 205u8, 154u8, 42u8, 217u8, 53u8, + 183u8, 43u8, 139u8, 203u8, 182u8, 219u8, 60u8, 129u8, 67u8, 30u8, 65u8, + 47u8, 105u8, 196u8, 228u8, 154u8, 26u8, 74u8, 84u8, 72u8, 154u8, 220u8, + 216u8, 134u8, 207u8, 240u8, 7u8, 190u8, 236u8, 242u8, 184u8, 224u8, ], ) } - #[doc = " Priority for unsigned claim transactions."] - pub fn unsigned_claim_priority( + #[doc = " Maps recipient accounts to their list of pending incoming transaction IDs."] + #[doc = " This allows users to query all their incoming pending transfers."] + pub fn pending_transfers_by_recipient_iter( + &self, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::pending_transfers_by_recipient::PendingTransfersByRecipient, + (), + ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "ReversibleTransfers", + "PendingTransfersByRecipient", + (), + [ + 63u8, 141u8, 24u8, 239u8, 201u8, 143u8, 36u8, 152u8, 35u8, 110u8, + 112u8, 157u8, 29u8, 61u8, 221u8, 79u8, 209u8, 192u8, 183u8, 29u8, + 145u8, 166u8, 238u8, 156u8, 131u8, 203u8, 124u8, 233u8, 210u8, 201u8, + 91u8, 212u8, + ], + ) + } + #[doc = " Maps recipient accounts to their list of pending incoming transaction IDs."] + #[doc = " This allows users to query all their incoming pending transfers."] + pub fn pending_transfers_by_recipient( + &self, + _0: types::pending_transfers_by_recipient::Param0, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + ::subxt::ext::subxt_core::storage::address::StaticStorageKey< + types::pending_transfers_by_recipient::Param0, + >, + types::pending_transfers_by_recipient::PendingTransfersByRecipient, + ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, + (), + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "ReversibleTransfers", + "PendingTransfersByRecipient", + ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), + [ + 63u8, 141u8, 24u8, 239u8, 201u8, 143u8, 36u8, 152u8, 35u8, 110u8, + 112u8, 157u8, 29u8, 61u8, 221u8, 79u8, 209u8, 192u8, 183u8, 29u8, + 145u8, 166u8, 238u8, 156u8, 131u8, 203u8, 124u8, 233u8, 210u8, 201u8, + 91u8, 212u8, + ], + ) + } + #[doc = " Maps interceptor accounts to the list of accounts they can intercept for."] + #[doc = " This allows the UI to efficiently query all accounts for which a given account is an"] + #[doc = " interceptor."] + pub fn interceptor_index_iter( + &self, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::interceptor_index::InterceptorIndex, + (), + ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "ReversibleTransfers", + "InterceptorIndex", + (), + [ + 7u8, 184u8, 75u8, 107u8, 42u8, 84u8, 188u8, 86u8, 2u8, 227u8, 4u8, + 136u8, 109u8, 69u8, 64u8, 123u8, 253u8, 28u8, 174u8, 121u8, 183u8, + 154u8, 135u8, 91u8, 125u8, 0u8, 58u8, 132u8, 164u8, 236u8, 182u8, + 133u8, + ], + ) + } + #[doc = " Maps interceptor accounts to the list of accounts they can intercept for."] + #[doc = " This allows the UI to efficiently query all accounts for which a given account is an"] + #[doc = " interceptor."] + pub fn interceptor_index( + &self, + _0: types::interceptor_index::Param0, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + ::subxt::ext::subxt_core::storage::address::StaticStorageKey< + types::interceptor_index::Param0, + >, + types::interceptor_index::InterceptorIndex, + ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, + (), + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "ReversibleTransfers", + "InterceptorIndex", + ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), + [ + 7u8, 184u8, 75u8, 107u8, 42u8, 84u8, 188u8, 86u8, 2u8, 227u8, 4u8, + 136u8, 109u8, 69u8, 64u8, 123u8, 253u8, 28u8, 174u8, 121u8, 183u8, + 154u8, 135u8, 91u8, 125u8, 0u8, 58u8, 132u8, 164u8, 236u8, 182u8, + 133u8, + ], + ) + } + #[doc = " Global nonce for generating unique transaction IDs."] + pub fn global_nonce( + &self, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::global_nonce::GlobalNonce, + ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, + (), + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "ReversibleTransfers", + "GlobalNonce", + (), + [ + 119u8, 119u8, 84u8, 141u8, 83u8, 67u8, 42u8, 83u8, 51u8, 196u8, 185u8, + 39u8, 227u8, 125u8, 142u8, 154u8, 107u8, 62u8, 127u8, 13u8, 54u8, + 114u8, 201u8, 6u8, 100u8, 28u8, 202u8, 152u8, 246u8, 202u8, 9u8, 29u8, + ], + ) + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " Maximum pending reversible transactions allowed per account. Used for BoundedVec."] + pub fn max_pending_per_account( + &self, + ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< + ::core::primitive::u32, + > { + ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( + "ReversibleTransfers", + "MaxPendingPerAccount", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " Maximum number of accounts an interceptor can intercept for. Used for BoundedVec."] + pub fn max_interceptor_accounts( + &self, + ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< + ::core::primitive::u32, + > { + ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( + "ReversibleTransfers", + "MaxInterceptorAccounts", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " The default delay period for reversible transactions if none is specified."] + #[doc = ""] + #[doc = " NOTE: default delay is always in blocks."] + pub fn default_delay( + &self, + ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< + runtime_types::qp_scheduler::BlockNumberOrTimestamp< + ::core::primitive::u32, + ::core::primitive::u64, + >, + > { + ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( + "ReversibleTransfers", + "DefaultDelay", + [ + 245u8, 29u8, 3u8, 65u8, 154u8, 12u8, 172u8, 71u8, 67u8, 134u8, 71u8, + 180u8, 4u8, 9u8, 54u8, 89u8, 6u8, 19u8, 3u8, 168u8, 67u8, 122u8, 197u8, + 109u8, 1u8, 228u8, 44u8, 243u8, 228u8, 194u8, 241u8, 227u8, + ], + ) + } + #[doc = " The minimum delay period allowed for reversible transactions, in blocks."] + pub fn min_delay_period_blocks( + &self, + ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< + ::core::primitive::u32, + > { + ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( + "ReversibleTransfers", + "MinDelayPeriodBlocks", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " The minimum delay period allowed for reversible transactions, in milliseconds."] + pub fn min_delay_period_moment( &self, ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< ::core::primitive::u64, > { ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "MerkleAirdrop", - "UnsignedClaimPriority", + "ReversibleTransfers", + "MinDelayPeriodMoment", [ 128u8, 214u8, 205u8, 242u8, 181u8, 142u8, 124u8, 231u8, 190u8, 146u8, 59u8, 226u8, 157u8, 101u8, 103u8, 117u8, 249u8, 65u8, 18u8, 191u8, @@ -13224,12 +11847,12 @@ pub mod api { } } } - pub mod treasury_pallet { + pub mod conviction_voting { use super::{root_mod, runtime_types}; - #[doc = "Error for the treasury pallet."] - pub type Error = runtime_types::pallet_treasury::pallet::Error; + #[doc = "The `Error` enum of this pallet."] + pub type Error = runtime_types::pallet_conviction_voting::pallet::Error; #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] - pub type Call = runtime_types::pallet_treasury::pallet::Call; + pub type Call = runtime_types::pallet_conviction_voting::pallet::Call; pub mod calls { use super::{root_mod, runtime_types}; type DispatchError = runtime_types::sp_runtime::DispatchError; @@ -13246,39 +11869,30 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Propose and approve a spend of treasury funds."] - #[doc = ""] - #[doc = "## Dispatch Origin"] - #[doc = ""] - #[doc = "Must be [`Config::SpendOrigin`] with the `Success` value being at least `amount`."] - #[doc = ""] - #[doc = "### Details"] - #[doc = "NOTE: For record-keeping purposes, the proposer is deemed to be equivalent to the"] - #[doc = "beneficiary."] + #[doc = "Vote in a poll. If `vote.is_aye()`, the vote is to enact the proposal;"] + #[doc = "otherwise it is a vote to keep the status quo."] #[doc = ""] - #[doc = "### Parameters"] - #[doc = "- `amount`: The amount to be transferred from the treasury to the `beneficiary`."] - #[doc = "- `beneficiary`: The destination account for the transfer."] + #[doc = "The dispatch origin of this call must be _Signed_."] #[doc = ""] - #[doc = "## Events"] + #[doc = "- `poll_index`: The index of the poll to vote for."] + #[doc = "- `vote`: The vote configuration."] #[doc = ""] - #[doc = "Emits [`Event::SpendApproved`] if successful."] - pub struct SpendLocal { + #[doc = "Weight: `O(R)` where R is the number of polls the voter has voted on."] + pub struct Vote { #[codec(compact)] - pub amount: spend_local::Amount, - pub beneficiary: spend_local::Beneficiary, + pub poll_index: vote::PollIndex, + pub vote: vote::Vote, } - pub mod spend_local { + pub mod vote { use super::runtime_types; - pub type Amount = ::core::primitive::u128; - pub type Beneficiary = ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), + pub type PollIndex = ::core::primitive::u32; + pub type Vote = runtime_types::pallet_conviction_voting::vote::AccountVote< + ::core::primitive::u128, >; } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for SpendLocal { - const PALLET: &'static str = "TreasuryPallet"; - const CALL: &'static str = "spend_local"; + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for Vote { + const PALLET: &'static str = "ConvictionVoting"; + const CALL: &'static str = "vote"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -13291,38 +11905,49 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Force a previously approved proposal to be removed from the approval queue."] + #[doc = "Delegate the voting power (with some given conviction) of the sending account for a"] + #[doc = "particular class of polls."] #[doc = ""] - #[doc = "## Dispatch Origin"] + #[doc = "The balance delegated is locked for as long as it's delegated, and thereafter for the"] + #[doc = "time appropriate for the conviction's lock period."] #[doc = ""] - #[doc = "Must be [`Config::RejectOrigin`]."] - #[doc = ""] - #[doc = "## Details"] - #[doc = ""] - #[doc = "The original deposit will no longer be returned."] + #[doc = "The dispatch origin of this call must be _Signed_, and the signing account must either:"] + #[doc = " - be delegating already; or"] + #[doc = " - have no voting activity (if there is, then it will need to be removed through"] + #[doc = " `remove_vote`)."] #[doc = ""] - #[doc = "### Parameters"] - #[doc = "- `proposal_id`: The index of a proposal"] + #[doc = "- `to`: The account whose voting the `target` account's voting power will follow."] + #[doc = "- `class`: The class of polls to delegate. To delegate multiple classes, multiple calls"] + #[doc = " to this function are required."] + #[doc = "- `conviction`: The conviction that will be attached to the delegated votes. When the"] + #[doc = " account is undelegated, the funds will be locked for the corresponding period."] + #[doc = "- `balance`: The amount of the account's balance to be used in delegating. This must not"] + #[doc = " be more than the account's current balance."] #[doc = ""] - #[doc = "### Complexity"] - #[doc = "- O(A) where `A` is the number of approvals"] + #[doc = "Emits `Delegated`."] #[doc = ""] - #[doc = "### Errors"] - #[doc = "- [`Error::ProposalNotApproved`]: The `proposal_id` supplied was not found in the"] - #[doc = " approval queue, i.e., the proposal has not been approved. This could also mean the"] - #[doc = " proposal does not exist altogether, thus there is no way it would have been approved"] - #[doc = " in the first place."] - pub struct RemoveApproval { - #[codec(compact)] - pub proposal_id: remove_approval::ProposalId, + #[doc = "Weight: `O(R)` where R is the number of polls the voter delegating to has"] + #[doc = " voted on. Weight is initially charged as if maximum votes, but is refunded later."] + pub struct Delegate { + pub class: delegate::Class, + pub to: delegate::To, + pub conviction: delegate::Conviction, + pub balance: delegate::Balance, } - pub mod remove_approval { + pub mod delegate { use super::runtime_types; - pub type ProposalId = ::core::primitive::u32; + pub type Class = ::core::primitive::u16; + pub type To = ::subxt::ext::subxt_core::utils::MultiAddress< + ::subxt::ext::subxt_core::utils::AccountId32, + (), + >; + pub type Conviction = + runtime_types::pallet_conviction_voting::conviction::Conviction; + pub type Balance = ::core::primitive::u128; } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for RemoveApproval { - const PALLET: &'static str = "TreasuryPallet"; - const CALL: &'static str = "remove_approval"; + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for Delegate { + const PALLET: &'static str = "ConvictionVoting"; + const CALL: &'static str = "delegate"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -13335,53 +11960,30 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Propose and approve a spend of treasury funds."] - #[doc = ""] - #[doc = "## Dispatch Origin"] - #[doc = ""] - #[doc = "Must be [`Config::SpendOrigin`] with the `Success` value being at least"] - #[doc = "`amount` of `asset_kind` in the native asset. The amount of `asset_kind` is converted"] - #[doc = "for assertion using the [`Config::BalanceConverter`]."] + #[doc = "Undelegate the voting power of the sending account for a particular class of polls."] #[doc = ""] - #[doc = "## Details"] + #[doc = "Tokens may be unlocked following once an amount of time consistent with the lock period"] + #[doc = "of the conviction with which the delegation was issued has passed."] #[doc = ""] - #[doc = "Create an approved spend for transferring a specific `amount` of `asset_kind` to a"] - #[doc = "designated beneficiary. The spend must be claimed using the `payout` dispatchable within"] - #[doc = "the [`Config::PayoutPeriod`]."] + #[doc = "The dispatch origin of this call must be _Signed_ and the signing account must be"] + #[doc = "currently delegating."] #[doc = ""] - #[doc = "### Parameters"] - #[doc = "- `asset_kind`: An indicator of the specific asset class to be spent."] - #[doc = "- `amount`: The amount to be transferred from the treasury to the `beneficiary`."] - #[doc = "- `beneficiary`: The beneficiary of the spend."] - #[doc = "- `valid_from`: The block number from which the spend can be claimed. It can refer to"] - #[doc = " the past if the resulting spend has not yet expired according to the"] - #[doc = " [`Config::PayoutPeriod`]. If `None`, the spend can be claimed immediately after"] - #[doc = " approval."] + #[doc = "- `class`: The class of polls to remove the delegation from."] #[doc = ""] - #[doc = "## Events"] + #[doc = "Emits `Undelegated`."] #[doc = ""] - #[doc = "Emits [`Event::AssetSpendApproved`] if successful."] - pub struct Spend { - pub asset_kind: ::subxt::ext::subxt_core::alloc::boxed::Box, - #[codec(compact)] - pub amount: spend::Amount, - pub beneficiary: - ::subxt::ext::subxt_core::alloc::boxed::Box, - pub valid_from: spend::ValidFrom, + #[doc = "Weight: `O(R)` where R is the number of polls the voter delegating to has"] + #[doc = " voted on. Weight is initially charged as if maximum votes, but is refunded later."] + pub struct Undelegate { + pub class: undelegate::Class, } - pub mod spend { + pub mod undelegate { use super::runtime_types; - pub type AssetKind = (); - pub type Amount = ::core::primitive::u128; - pub type Beneficiary = ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >; - pub type ValidFrom = ::core::option::Option<::core::primitive::u32>; + pub type Class = ::core::primitive::u16; } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for Spend { - const PALLET: &'static str = "TreasuryPallet"; - const CALL: &'static str = "spend"; + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for Undelegate { + const PALLET: &'static str = "ConvictionVoting"; + const CALL: &'static str = "undelegate"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -13394,35 +11996,30 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Claim a spend."] - #[doc = ""] - #[doc = "## Dispatch Origin"] - #[doc = ""] - #[doc = "Must be signed"] - #[doc = ""] - #[doc = "## Details"] - #[doc = ""] - #[doc = "Spends must be claimed within some temporal bounds. A spend may be claimed within one"] - #[doc = "[`Config::PayoutPeriod`] from the `valid_from` block."] - #[doc = "In case of a payout failure, the spend status must be updated with the `check_status`"] - #[doc = "dispatchable before retrying with the current function."] + #[doc = "Remove the lock caused by prior voting/delegating which has expired within a particular"] + #[doc = "class."] #[doc = ""] - #[doc = "### Parameters"] - #[doc = "- `index`: The spend index."] + #[doc = "The dispatch origin of this call must be _Signed_."] #[doc = ""] - #[doc = "## Events"] + #[doc = "- `class`: The class of polls to unlock."] + #[doc = "- `target`: The account to remove the lock on."] #[doc = ""] - #[doc = "Emits [`Event::Paid`] if successful."] - pub struct Payout { - pub index: payout::Index, + #[doc = "Weight: `O(R)` with R number of vote of target."] + pub struct Unlock { + pub class: unlock::Class, + pub target: unlock::Target, } - pub mod payout { + pub mod unlock { use super::runtime_types; - pub type Index = ::core::primitive::u32; + pub type Class = ::core::primitive::u16; + pub type Target = ::subxt::ext::subxt_core::utils::MultiAddress< + ::subxt::ext::subxt_core::utils::AccountId32, + (), + >; } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for Payout { - const PALLET: &'static str = "TreasuryPallet"; - const CALL: &'static str = "payout"; + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for Unlock { + const PALLET: &'static str = "ConvictionVoting"; + const CALL: &'static str = "unlock"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -13435,35 +12032,47 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Check the status of the spend and remove it from the storage if processed."] - #[doc = ""] - #[doc = "## Dispatch Origin"] - #[doc = ""] - #[doc = "Must be signed."] + #[doc = "Remove a vote for a poll."] #[doc = ""] - #[doc = "## Details"] + #[doc = "If:"] + #[doc = "- the poll was cancelled, or"] + #[doc = "- the poll is ongoing, or"] + #[doc = "- the poll has ended such that"] + #[doc = " - the vote of the account was in opposition to the result; or"] + #[doc = " - there was no conviction to the account's vote; or"] + #[doc = " - the account made a split vote"] + #[doc = "...then the vote is removed cleanly and a following call to `unlock` may result in more"] + #[doc = "funds being available."] #[doc = ""] - #[doc = "The status check is a prerequisite for retrying a failed payout."] - #[doc = "If a spend has either succeeded or expired, it is removed from the storage by this"] - #[doc = "function. In such instances, transaction fees are refunded."] + #[doc = "If, however, the poll has ended and:"] + #[doc = "- it finished corresponding to the vote of the account, and"] + #[doc = "- the account made a standard vote with conviction, and"] + #[doc = "- the lock period of the conviction is not over"] + #[doc = "...then the lock will be aggregated into the overall account's lock, which may involve"] + #[doc = "*overlocking* (where the two locks are combined into a single lock that is the maximum"] + #[doc = "of both the amount locked and the time is it locked for)."] #[doc = ""] - #[doc = "### Parameters"] - #[doc = "- `index`: The spend index."] + #[doc = "The dispatch origin of this call must be _Signed_, and the signer must have a vote"] + #[doc = "registered for poll `index`."] #[doc = ""] - #[doc = "## Events"] + #[doc = "- `index`: The index of poll of the vote to be removed."] + #[doc = "- `class`: Optional parameter, if given it indicates the class of the poll. For polls"] + #[doc = " which have finished or are cancelled, this must be `Some`."] #[doc = ""] - #[doc = "Emits [`Event::PaymentFailed`] if the spend payout has failed."] - #[doc = "Emits [`Event::SpendProcessed`] if the spend payout has succeed."] - pub struct CheckStatus { - pub index: check_status::Index, + #[doc = "Weight: `O(R + log R)` where R is the number of polls that `target` has voted on."] + #[doc = " Weight is calculated for the maximum number of vote."] + pub struct RemoveVote { + pub class: remove_vote::Class, + pub index: remove_vote::Index, } - pub mod check_status { + pub mod remove_vote { use super::runtime_types; + pub type Class = ::core::option::Option<::core::primitive::u16>; pub type Index = ::core::primitive::u32; } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for CheckStatus { - const PALLET: &'static str = "TreasuryPallet"; - const CALL: &'static str = "check_status"; + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for RemoveVote { + const PALLET: &'static str = "ConvictionVoting"; + const CALL: &'static str = "remove_vote"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -13476,263 +12085,250 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Void previously approved spend."] - #[doc = ""] - #[doc = "## Dispatch Origin"] - #[doc = ""] - #[doc = "Must be [`Config::RejectOrigin`]."] - #[doc = ""] - #[doc = "## Details"] + #[doc = "Remove a vote for a poll."] #[doc = ""] - #[doc = "A spend void is only possible if the payout has not been attempted yet."] + #[doc = "If the `target` is equal to the signer, then this function is exactly equivalent to"] + #[doc = "`remove_vote`. If not equal to the signer, then the vote must have expired,"] + #[doc = "either because the poll was cancelled, because the voter lost the poll or"] + #[doc = "because the conviction period is over."] #[doc = ""] - #[doc = "### Parameters"] - #[doc = "- `index`: The spend index."] + #[doc = "The dispatch origin of this call must be _Signed_."] #[doc = ""] - #[doc = "## Events"] + #[doc = "- `target`: The account of the vote to be removed; this account must have voted for poll"] + #[doc = " `index`."] + #[doc = "- `index`: The index of poll of the vote to be removed."] + #[doc = "- `class`: The class of the poll."] #[doc = ""] - #[doc = "Emits [`Event::AssetSpendVoided`] if successful."] - pub struct VoidSpend { - pub index: void_spend::Index, + #[doc = "Weight: `O(R + log R)` where R is the number of polls that `target` has voted on."] + #[doc = " Weight is calculated for the maximum number of vote."] + pub struct RemoveOtherVote { + pub target: remove_other_vote::Target, + pub class: remove_other_vote::Class, + pub index: remove_other_vote::Index, } - pub mod void_spend { + pub mod remove_other_vote { use super::runtime_types; + pub type Target = ::subxt::ext::subxt_core::utils::MultiAddress< + ::subxt::ext::subxt_core::utils::AccountId32, + (), + >; + pub type Class = ::core::primitive::u16; pub type Index = ::core::primitive::u32; } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for VoidSpend { - const PALLET: &'static str = "TreasuryPallet"; - const CALL: &'static str = "void_spend"; + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for RemoveOtherVote { + const PALLET: &'static str = "ConvictionVoting"; + const CALL: &'static str = "remove_other_vote"; } } pub struct TransactionApi; impl TransactionApi { - #[doc = "Propose and approve a spend of treasury funds."] - #[doc = ""] - #[doc = "## Dispatch Origin"] + #[doc = "Vote in a poll. If `vote.is_aye()`, the vote is to enact the proposal;"] + #[doc = "otherwise it is a vote to keep the status quo."] #[doc = ""] - #[doc = "Must be [`Config::SpendOrigin`] with the `Success` value being at least `amount`."] + #[doc = "The dispatch origin of this call must be _Signed_."] #[doc = ""] - #[doc = "### Details"] - #[doc = "NOTE: For record-keeping purposes, the proposer is deemed to be equivalent to the"] - #[doc = "beneficiary."] + #[doc = "- `poll_index`: The index of the poll to vote for."] + #[doc = "- `vote`: The vote configuration."] #[doc = ""] - #[doc = "### Parameters"] - #[doc = "- `amount`: The amount to be transferred from the treasury to the `beneficiary`."] - #[doc = "- `beneficiary`: The destination account for the transfer."] - #[doc = ""] - #[doc = "## Events"] - #[doc = ""] - #[doc = "Emits [`Event::SpendApproved`] if successful."] - pub fn spend_local( + #[doc = "Weight: `O(R)` where R is the number of polls the voter has voted on."] + pub fn vote( &self, - amount: types::spend_local::Amount, - beneficiary: types::spend_local::Beneficiary, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { + poll_index: types::vote::PollIndex, + vote: types::vote::Vote, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "TreasuryPallet", - "spend_local", - types::SpendLocal { amount, beneficiary }, + "ConvictionVoting", + "vote", + types::Vote { poll_index, vote }, [ - 137u8, 171u8, 83u8, 247u8, 245u8, 212u8, 152u8, 127u8, 210u8, 71u8, - 254u8, 134u8, 189u8, 26u8, 249u8, 41u8, 214u8, 175u8, 24u8, 64u8, 33u8, - 90u8, 23u8, 134u8, 44u8, 110u8, 63u8, 46u8, 46u8, 146u8, 222u8, 79u8, + 57u8, 170u8, 177u8, 168u8, 158u8, 43u8, 87u8, 242u8, 176u8, 85u8, + 230u8, 64u8, 103u8, 239u8, 190u8, 6u8, 228u8, 165u8, 248u8, 77u8, + 231u8, 221u8, 186u8, 107u8, 249u8, 201u8, 226u8, 52u8, 129u8, 90u8, + 142u8, 159u8, ], ) } - #[doc = "Force a previously approved proposal to be removed from the approval queue."] - #[doc = ""] - #[doc = "## Dispatch Origin"] - #[doc = ""] - #[doc = "Must be [`Config::RejectOrigin`]."] + #[doc = "Delegate the voting power (with some given conviction) of the sending account for a"] + #[doc = "particular class of polls."] #[doc = ""] - #[doc = "## Details"] + #[doc = "The balance delegated is locked for as long as it's delegated, and thereafter for the"] + #[doc = "time appropriate for the conviction's lock period."] #[doc = ""] - #[doc = "The original deposit will no longer be returned."] + #[doc = "The dispatch origin of this call must be _Signed_, and the signing account must either:"] + #[doc = " - be delegating already; or"] + #[doc = " - have no voting activity (if there is, then it will need to be removed through"] + #[doc = " `remove_vote`)."] #[doc = ""] - #[doc = "### Parameters"] - #[doc = "- `proposal_id`: The index of a proposal"] + #[doc = "- `to`: The account whose voting the `target` account's voting power will follow."] + #[doc = "- `class`: The class of polls to delegate. To delegate multiple classes, multiple calls"] + #[doc = " to this function are required."] + #[doc = "- `conviction`: The conviction that will be attached to the delegated votes. When the"] + #[doc = " account is undelegated, the funds will be locked for the corresponding period."] + #[doc = "- `balance`: The amount of the account's balance to be used in delegating. This must not"] + #[doc = " be more than the account's current balance."] #[doc = ""] - #[doc = "### Complexity"] - #[doc = "- O(A) where `A` is the number of approvals"] + #[doc = "Emits `Delegated`."] #[doc = ""] - #[doc = "### Errors"] - #[doc = "- [`Error::ProposalNotApproved`]: The `proposal_id` supplied was not found in the"] - #[doc = " approval queue, i.e., the proposal has not been approved. This could also mean the"] - #[doc = " proposal does not exist altogether, thus there is no way it would have been approved"] - #[doc = " in the first place."] - pub fn remove_approval( + #[doc = "Weight: `O(R)` where R is the number of polls the voter delegating to has"] + #[doc = " voted on. Weight is initially charged as if maximum votes, but is refunded later."] + pub fn delegate( &self, - proposal_id: types::remove_approval::ProposalId, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload - { + class: types::delegate::Class, + to: types::delegate::To, + conviction: types::delegate::Conviction, + balance: types::delegate::Balance, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "TreasuryPallet", - "remove_approval", - types::RemoveApproval { proposal_id }, + "ConvictionVoting", + "delegate", + types::Delegate { class, to, conviction, balance }, [ - 180u8, 20u8, 39u8, 227u8, 29u8, 228u8, 234u8, 36u8, 155u8, 114u8, - 197u8, 135u8, 185u8, 31u8, 56u8, 247u8, 224u8, 168u8, 254u8, 233u8, - 250u8, 134u8, 186u8, 155u8, 108u8, 84u8, 94u8, 226u8, 207u8, 130u8, - 196u8, 100u8, + 223u8, 143u8, 33u8, 94u8, 32u8, 156u8, 43u8, 40u8, 142u8, 134u8, 209u8, + 134u8, 255u8, 179u8, 97u8, 46u8, 8u8, 140u8, 5u8, 29u8, 76u8, 22u8, + 36u8, 7u8, 108u8, 190u8, 220u8, 151u8, 10u8, 47u8, 89u8, 55u8, ], ) } - #[doc = "Propose and approve a spend of treasury funds."] - #[doc = ""] - #[doc = "## Dispatch Origin"] - #[doc = ""] - #[doc = "Must be [`Config::SpendOrigin`] with the `Success` value being at least"] - #[doc = "`amount` of `asset_kind` in the native asset. The amount of `asset_kind` is converted"] - #[doc = "for assertion using the [`Config::BalanceConverter`]."] + #[doc = "Undelegate the voting power of the sending account for a particular class of polls."] #[doc = ""] - #[doc = "## Details"] + #[doc = "Tokens may be unlocked following once an amount of time consistent with the lock period"] + #[doc = "of the conviction with which the delegation was issued has passed."] #[doc = ""] - #[doc = "Create an approved spend for transferring a specific `amount` of `asset_kind` to a"] - #[doc = "designated beneficiary. The spend must be claimed using the `payout` dispatchable within"] - #[doc = "the [`Config::PayoutPeriod`]."] + #[doc = "The dispatch origin of this call must be _Signed_ and the signing account must be"] + #[doc = "currently delegating."] #[doc = ""] - #[doc = "### Parameters"] - #[doc = "- `asset_kind`: An indicator of the specific asset class to be spent."] - #[doc = "- `amount`: The amount to be transferred from the treasury to the `beneficiary`."] - #[doc = "- `beneficiary`: The beneficiary of the spend."] - #[doc = "- `valid_from`: The block number from which the spend can be claimed. It can refer to"] - #[doc = " the past if the resulting spend has not yet expired according to the"] - #[doc = " [`Config::PayoutPeriod`]. If `None`, the spend can be claimed immediately after"] - #[doc = " approval."] + #[doc = "- `class`: The class of polls to remove the delegation from."] #[doc = ""] - #[doc = "## Events"] + #[doc = "Emits `Undelegated`."] #[doc = ""] - #[doc = "Emits [`Event::AssetSpendApproved`] if successful."] - pub fn spend( + #[doc = "Weight: `O(R)` where R is the number of polls the voter delegating to has"] + #[doc = " voted on. Weight is initially charged as if maximum votes, but is refunded later."] + pub fn undelegate( &self, - asset_kind: types::spend::AssetKind, - amount: types::spend::Amount, - beneficiary: types::spend::Beneficiary, - valid_from: types::spend::ValidFrom, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { + class: types::undelegate::Class, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "TreasuryPallet", - "spend", - types::Spend { - asset_kind: ::subxt::ext::subxt_core::alloc::boxed::Box::new( - asset_kind, - ), - amount, - beneficiary: ::subxt::ext::subxt_core::alloc::boxed::Box::new( - beneficiary, - ), - valid_from, - }, + "ConvictionVoting", + "undelegate", + types::Undelegate { class }, [ - 64u8, 121u8, 249u8, 219u8, 22u8, 188u8, 167u8, 85u8, 45u8, 27u8, 200u8, - 219u8, 138u8, 17u8, 230u8, 106u8, 145u8, 39u8, 43u8, 161u8, 69u8, 10u8, - 202u8, 251u8, 127u8, 131u8, 0u8, 194u8, 25u8, 153u8, 169u8, 206u8, + 140u8, 232u8, 6u8, 53u8, 228u8, 8u8, 131u8, 144u8, 65u8, 66u8, 245u8, + 247u8, 147u8, 135u8, 198u8, 57u8, 82u8, 212u8, 89u8, 46u8, 236u8, + 168u8, 200u8, 220u8, 93u8, 168u8, 101u8, 29u8, 110u8, 76u8, 67u8, + 181u8, ], ) } - #[doc = "Claim a spend."] - #[doc = ""] - #[doc = "## Dispatch Origin"] - #[doc = ""] - #[doc = "Must be signed"] - #[doc = ""] - #[doc = "## Details"] - #[doc = ""] - #[doc = "Spends must be claimed within some temporal bounds. A spend may be claimed within one"] - #[doc = "[`Config::PayoutPeriod`] from the `valid_from` block."] - #[doc = "In case of a payout failure, the spend status must be updated with the `check_status`"] - #[doc = "dispatchable before retrying with the current function."] + #[doc = "Remove the lock caused by prior voting/delegating which has expired within a particular"] + #[doc = "class."] #[doc = ""] - #[doc = "### Parameters"] - #[doc = "- `index`: The spend index."] + #[doc = "The dispatch origin of this call must be _Signed_."] #[doc = ""] - #[doc = "## Events"] + #[doc = "- `class`: The class of polls to unlock."] + #[doc = "- `target`: The account to remove the lock on."] #[doc = ""] - #[doc = "Emits [`Event::Paid`] if successful."] - pub fn payout( + #[doc = "Weight: `O(R)` with R number of vote of target."] + pub fn unlock( &self, - index: types::payout::Index, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { + class: types::unlock::Class, + target: types::unlock::Target, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "TreasuryPallet", - "payout", - types::Payout { index }, + "ConvictionVoting", + "unlock", + types::Unlock { class, target }, [ - 179u8, 254u8, 82u8, 94u8, 248u8, 26u8, 6u8, 34u8, 93u8, 244u8, 186u8, - 199u8, 163u8, 32u8, 110u8, 220u8, 78u8, 11u8, 168u8, 182u8, 169u8, - 56u8, 53u8, 194u8, 168u8, 218u8, 131u8, 38u8, 46u8, 156u8, 93u8, 234u8, + 79u8, 5u8, 252u8, 237u8, 109u8, 238u8, 157u8, 237u8, 125u8, 171u8, + 65u8, 160u8, 102u8, 192u8, 5u8, 141u8, 179u8, 249u8, 253u8, 213u8, + 105u8, 251u8, 241u8, 145u8, 186u8, 177u8, 244u8, 139u8, 71u8, 140u8, + 173u8, 108u8, ], ) } - #[doc = "Check the status of the spend and remove it from the storage if processed."] - #[doc = ""] - #[doc = "## Dispatch Origin"] - #[doc = ""] - #[doc = "Must be signed."] + #[doc = "Remove a vote for a poll."] #[doc = ""] - #[doc = "## Details"] + #[doc = "If:"] + #[doc = "- the poll was cancelled, or"] + #[doc = "- the poll is ongoing, or"] + #[doc = "- the poll has ended such that"] + #[doc = " - the vote of the account was in opposition to the result; or"] + #[doc = " - there was no conviction to the account's vote; or"] + #[doc = " - the account made a split vote"] + #[doc = "...then the vote is removed cleanly and a following call to `unlock` may result in more"] + #[doc = "funds being available."] #[doc = ""] - #[doc = "The status check is a prerequisite for retrying a failed payout."] - #[doc = "If a spend has either succeeded or expired, it is removed from the storage by this"] - #[doc = "function. In such instances, transaction fees are refunded."] + #[doc = "If, however, the poll has ended and:"] + #[doc = "- it finished corresponding to the vote of the account, and"] + #[doc = "- the account made a standard vote with conviction, and"] + #[doc = "- the lock period of the conviction is not over"] + #[doc = "...then the lock will be aggregated into the overall account's lock, which may involve"] + #[doc = "*overlocking* (where the two locks are combined into a single lock that is the maximum"] + #[doc = "of both the amount locked and the time is it locked for)."] #[doc = ""] - #[doc = "### Parameters"] - #[doc = "- `index`: The spend index."] + #[doc = "The dispatch origin of this call must be _Signed_, and the signer must have a vote"] + #[doc = "registered for poll `index`."] #[doc = ""] - #[doc = "## Events"] + #[doc = "- `index`: The index of poll of the vote to be removed."] + #[doc = "- `class`: Optional parameter, if given it indicates the class of the poll. For polls"] + #[doc = " which have finished or are cancelled, this must be `Some`."] #[doc = ""] - #[doc = "Emits [`Event::PaymentFailed`] if the spend payout has failed."] - #[doc = "Emits [`Event::SpendProcessed`] if the spend payout has succeed."] - pub fn check_status( + #[doc = "Weight: `O(R + log R)` where R is the number of polls that `target` has voted on."] + #[doc = " Weight is calculated for the maximum number of vote."] + pub fn remove_vote( &self, - index: types::check_status::Index, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { + class: types::remove_vote::Class, + index: types::remove_vote::Index, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "TreasuryPallet", - "check_status", - types::CheckStatus { index }, + "ConvictionVoting", + "remove_vote", + types::RemoveVote { class, index }, [ - 164u8, 111u8, 10u8, 11u8, 104u8, 237u8, 112u8, 240u8, 104u8, 130u8, - 179u8, 221u8, 54u8, 18u8, 8u8, 172u8, 148u8, 245u8, 110u8, 174u8, 75u8, - 38u8, 46u8, 143u8, 101u8, 232u8, 65u8, 252u8, 36u8, 152u8, 29u8, 209u8, + 255u8, 108u8, 211u8, 146u8, 168u8, 231u8, 207u8, 44u8, 76u8, 24u8, + 235u8, 60u8, 23u8, 79u8, 192u8, 192u8, 46u8, 40u8, 134u8, 27u8, 125u8, + 114u8, 125u8, 247u8, 85u8, 102u8, 76u8, 159u8, 34u8, 167u8, 152u8, + 148u8, ], ) } - #[doc = "Void previously approved spend."] + #[doc = "Remove a vote for a poll."] #[doc = ""] - #[doc = "## Dispatch Origin"] + #[doc = "If the `target` is equal to the signer, then this function is exactly equivalent to"] + #[doc = "`remove_vote`. If not equal to the signer, then the vote must have expired,"] + #[doc = "either because the poll was cancelled, because the voter lost the poll or"] + #[doc = "because the conviction period is over."] #[doc = ""] - #[doc = "Must be [`Config::RejectOrigin`]."] + #[doc = "The dispatch origin of this call must be _Signed_."] #[doc = ""] - #[doc = "## Details"] - #[doc = ""] - #[doc = "A spend void is only possible if the payout has not been attempted yet."] - #[doc = ""] - #[doc = "### Parameters"] - #[doc = "- `index`: The spend index."] - #[doc = ""] - #[doc = "## Events"] + #[doc = "- `target`: The account of the vote to be removed; this account must have voted for poll"] + #[doc = " `index`."] + #[doc = "- `index`: The index of poll of the vote to be removed."] + #[doc = "- `class`: The class of the poll."] #[doc = ""] - #[doc = "Emits [`Event::AssetSpendVoided`] if successful."] - pub fn void_spend( + #[doc = "Weight: `O(R + log R)` where R is the number of polls that `target` has voted on."] + #[doc = " Weight is calculated for the maximum number of vote."] + pub fn remove_other_vote( &self, - index: types::void_spend::Index, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { + target: types::remove_other_vote::Target, + class: types::remove_other_vote::Class, + index: types::remove_other_vote::Index, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload + { ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "TreasuryPallet", - "void_spend", - types::VoidSpend { index }, + "ConvictionVoting", + "remove_other_vote", + types::RemoveOtherVote { target, class, index }, [ - 9u8, 212u8, 174u8, 92u8, 43u8, 102u8, 224u8, 124u8, 247u8, 239u8, - 196u8, 68u8, 132u8, 171u8, 116u8, 206u8, 52u8, 23u8, 92u8, 31u8, 156u8, - 160u8, 25u8, 16u8, 125u8, 60u8, 9u8, 109u8, 145u8, 139u8, 102u8, 224u8, + 165u8, 26u8, 166u8, 37u8, 10u8, 174u8, 243u8, 10u8, 73u8, 93u8, 213u8, + 69u8, 200u8, 16u8, 48u8, 146u8, 160u8, 92u8, 28u8, 26u8, 158u8, 55u8, + 6u8, 251u8, 36u8, 132u8, 46u8, 195u8, 107u8, 34u8, 0u8, 100u8, ], ) } } } #[doc = "The `Event` enum of this pallet"] - pub type Event = runtime_types::pallet_treasury::pallet::Event; + pub type Event = runtime_types::pallet_conviction_voting::pallet::Event; pub mod events { use super::runtime_types; #[derive( @@ -13742,97 +12338,16 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "We have ended a spend period and will now allocate funds."] - pub struct Spending { - pub budget_remaining: spending::BudgetRemaining, - } - pub mod spending { - use super::runtime_types; - pub type BudgetRemaining = ::core::primitive::u128; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for Spending { - const PALLET: &'static str = "TreasuryPallet"; - const EVENT: &'static str = "Spending"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "Some funds have been allocated."] - pub struct Awarded { - pub proposal_index: awarded::ProposalIndex, - pub award: awarded::Award, - pub account: awarded::Account, - } - pub mod awarded { - use super::runtime_types; - pub type ProposalIndex = ::core::primitive::u32; - pub type Award = ::core::primitive::u128; - pub type Account = ::subxt::ext::subxt_core::utils::AccountId32; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for Awarded { - const PALLET: &'static str = "TreasuryPallet"; - const EVENT: &'static str = "Awarded"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "Some of our funds have been burnt."] - pub struct Burnt { - pub burnt_funds: burnt::BurntFunds, - } - pub mod burnt { - use super::runtime_types; - pub type BurntFunds = ::core::primitive::u128; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for Burnt { - const PALLET: &'static str = "TreasuryPallet"; - const EVENT: &'static str = "Burnt"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "Spending has finished; this is the amount that rolls over until next spend."] - pub struct Rollover { - pub rollover_balance: rollover::RolloverBalance, - } - pub mod rollover { - use super::runtime_types; - pub type RolloverBalance = ::core::primitive::u128; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for Rollover { - const PALLET: &'static str = "TreasuryPallet"; - const EVENT: &'static str = "Rollover"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "Some funds have been deposited."] - pub struct Deposit { - pub value: deposit::Value, - } - pub mod deposit { + #[doc = "An account has delegated their vote to another account. \\[who, target\\]"] + pub struct Delegated(pub delegated::Field0, pub delegated::Field1); + pub mod delegated { use super::runtime_types; - pub type Value = ::core::primitive::u128; + pub type Field0 = ::subxt::ext::subxt_core::utils::AccountId32; + pub type Field1 = ::subxt::ext::subxt_core::utils::AccountId32; } - impl ::subxt::ext::subxt_core::events::StaticEvent for Deposit { - const PALLET: &'static str = "TreasuryPallet"; - const EVENT: &'static str = "Deposit"; + impl ::subxt::ext::subxt_core::events::StaticEvent for Delegated { + const PALLET: &'static str = "ConvictionVoting"; + const EVENT: &'static str = "Delegated"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -13841,21 +12356,15 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "A new spend proposal has been approved."] - pub struct SpendApproved { - pub proposal_index: spend_approved::ProposalIndex, - pub amount: spend_approved::Amount, - pub beneficiary: spend_approved::Beneficiary, - } - pub mod spend_approved { + #[doc = "An \\[account\\] has cancelled a previous delegation operation."] + pub struct Undelegated(pub undelegated::Field0); + pub mod undelegated { use super::runtime_types; - pub type ProposalIndex = ::core::primitive::u32; - pub type Amount = ::core::primitive::u128; - pub type Beneficiary = ::subxt::ext::subxt_core::utils::AccountId32; + pub type Field0 = ::subxt::ext::subxt_core::utils::AccountId32; } - impl ::subxt::ext::subxt_core::events::StaticEvent for SpendApproved { - const PALLET: &'static str = "TreasuryPallet"; - const EVENT: &'static str = "SpendApproved"; + impl ::subxt::ext::subxt_core::events::StaticEvent for Undelegated { + const PALLET: &'static str = "ConvictionVoting"; + const EVENT: &'static str = "Undelegated"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -13864,19 +12373,21 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "The inactive funds of the pallet have been updated."] - pub struct UpdatedInactive { - pub reactivated: updated_inactive::Reactivated, - pub deactivated: updated_inactive::Deactivated, + #[doc = "An account has voted"] + pub struct Voted { + pub who: voted::Who, + pub vote: voted::Vote, } - pub mod updated_inactive { + pub mod voted { use super::runtime_types; - pub type Reactivated = ::core::primitive::u128; - pub type Deactivated = ::core::primitive::u128; + pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; + pub type Vote = runtime_types::pallet_conviction_voting::vote::AccountVote< + ::core::primitive::u128, + >; } - impl ::subxt::ext::subxt_core::events::StaticEvent for UpdatedInactive { - const PALLET: &'static str = "TreasuryPallet"; - const EVENT: &'static str = "UpdatedInactive"; + impl ::subxt::ext::subxt_core::events::StaticEvent for Voted { + const PALLET: &'static str = "ConvictionVoting"; + const EVENT: &'static str = "Voted"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -13885,27 +12396,21 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "A new asset spend proposal has been approved."] - pub struct AssetSpendApproved { - pub index: asset_spend_approved::Index, - pub asset_kind: asset_spend_approved::AssetKind, - pub amount: asset_spend_approved::Amount, - pub beneficiary: asset_spend_approved::Beneficiary, - pub valid_from: asset_spend_approved::ValidFrom, - pub expire_at: asset_spend_approved::ExpireAt, + #[doc = "A vote has been removed"] + pub struct VoteRemoved { + pub who: vote_removed::Who, + pub vote: vote_removed::Vote, } - pub mod asset_spend_approved { + pub mod vote_removed { use super::runtime_types; - pub type Index = ::core::primitive::u32; - pub type AssetKind = (); - pub type Amount = ::core::primitive::u128; - pub type Beneficiary = ::subxt::ext::subxt_core::utils::AccountId32; - pub type ValidFrom = ::core::primitive::u32; - pub type ExpireAt = ::core::primitive::u32; + pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; + pub type Vote = runtime_types::pallet_conviction_voting::vote::AccountVote< + ::core::primitive::u128, + >; } - impl ::subxt::ext::subxt_core::events::StaticEvent for AssetSpendApproved { - const PALLET: &'static str = "TreasuryPallet"; - const EVENT: &'static str = "AssetSpendApproved"; + impl ::subxt::ext::subxt_core::events::StaticEvent for VoteRemoved { + const PALLET: &'static str = "ConvictionVoting"; + const EVENT: &'static str = "VoteRemoved"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -13914,341 +12419,175 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "An approved spend was voided."] - pub struct AssetSpendVoided { - pub index: asset_spend_voided::Index, + #[doc = "The lockup period of a conviction vote expired, and the funds have been unlocked."] + pub struct VoteUnlocked { + pub who: vote_unlocked::Who, + pub class: vote_unlocked::Class, } - pub mod asset_spend_voided { + pub mod vote_unlocked { use super::runtime_types; - pub type Index = ::core::primitive::u32; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for AssetSpendVoided { - const PALLET: &'static str = "TreasuryPallet"; - const EVENT: &'static str = "AssetSpendVoided"; + pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; + pub type Class = ::core::primitive::u16; } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "A payment happened."] - pub struct Paid { - pub index: paid::Index, - pub payment_id: paid::PaymentId, + impl ::subxt::ext::subxt_core::events::StaticEvent for VoteUnlocked { + const PALLET: &'static str = "ConvictionVoting"; + const EVENT: &'static str = "VoteUnlocked"; } - pub mod paid { + } + pub mod storage { + use super::runtime_types; + pub mod types { use super::runtime_types; - pub type Index = ::core::primitive::u32; - pub type PaymentId = ::core::primitive::u32; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for Paid { - const PALLET: &'static str = "TreasuryPallet"; - const EVENT: &'static str = "Paid"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "A payment failed and can be retried."] - pub struct PaymentFailed { - pub index: payment_failed::Index, - pub payment_id: payment_failed::PaymentId, - } - pub mod payment_failed { - use super::runtime_types; - pub type Index = ::core::primitive::u32; - pub type PaymentId = ::core::primitive::u32; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for PaymentFailed { - const PALLET: &'static str = "TreasuryPallet"; - const EVENT: &'static str = "PaymentFailed"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "A spend was processed and removed from the storage. It might have been successfully"] - #[doc = "paid or it may have expired."] - pub struct SpendProcessed { - pub index: spend_processed::Index, - } - pub mod spend_processed { - use super::runtime_types; - pub type Index = ::core::primitive::u32; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for SpendProcessed { - const PALLET: &'static str = "TreasuryPallet"; - const EVENT: &'static str = "SpendProcessed"; - } - } - pub mod storage { - use super::runtime_types; - pub mod types { - use super::runtime_types; - pub mod proposal_count { - use super::runtime_types; - pub type ProposalCount = ::core::primitive::u32; - } - pub mod proposals { - use super::runtime_types; - pub type Proposals = runtime_types::pallet_treasury::Proposal< - ::subxt::ext::subxt_core::utils::AccountId32, - ::core::primitive::u128, - >; - pub type Param0 = ::core::primitive::u32; - } - pub mod deactivated { - use super::runtime_types; - pub type Deactivated = ::core::primitive::u128; - } - pub mod approvals { - use super::runtime_types; - pub type Approvals = - runtime_types::bounded_collections::bounded_vec::BoundedVec< - ::core::primitive::u32, - >; - } - pub mod spend_count { - use super::runtime_types; - pub type SpendCount = ::core::primitive::u32; - } - pub mod spends { - use super::runtime_types; - pub type Spends = runtime_types::pallet_treasury::SpendStatus< - (), - ::core::primitive::u128, - ::subxt::ext::subxt_core::utils::AccountId32, - ::core::primitive::u32, - ::core::primitive::u32, - >; - pub type Param0 = ::core::primitive::u32; - } - pub mod last_spend_period { - use super::runtime_types; - pub type LastSpendPeriod = ::core::primitive::u32; - } + pub mod voting_for { + use super::runtime_types; + pub type VotingFor = runtime_types::pallet_conviction_voting::vote::Voting< + ::core::primitive::u128, + ::subxt::ext::subxt_core::utils::AccountId32, + ::core::primitive::u32, + ::core::primitive::u32, + >; + pub type Param0 = ::subxt::ext::subxt_core::utils::AccountId32; + pub type Param1 = ::core::primitive::u16; + } + pub mod class_locks_for { + use super::runtime_types; + pub type ClassLocksFor = + runtime_types::bounded_collections::bounded_vec::BoundedVec<( + ::core::primitive::u16, + ::core::primitive::u128, + )>; + pub type Param0 = ::subxt::ext::subxt_core::utils::AccountId32; + } } pub struct StorageApi; impl StorageApi { - #[doc = " DEPRECATED: associated with `spend_local` call and will be removed in May 2025."] - #[doc = " Refer to for migration to `spend`."] - #[doc = ""] - #[doc = " Number of proposals that have been made."] - pub fn proposal_count( - &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::proposal_count::ProposalCount, - ::subxt::ext::subxt_core::utils::Yes, - ::subxt::ext::subxt_core::utils::Yes, - (), - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "TreasuryPallet", - "ProposalCount", - (), - [ - 91u8, 238u8, 246u8, 106u8, 95u8, 66u8, 83u8, 134u8, 1u8, 225u8, 164u8, - 216u8, 113u8, 101u8, 203u8, 200u8, 113u8, 97u8, 246u8, 228u8, 140u8, - 29u8, 29u8, 48u8, 176u8, 137u8, 93u8, 230u8, 56u8, 75u8, 51u8, 149u8, - ], - ) - } - #[doc = " DEPRECATED: associated with `spend_local` call and will be removed in May 2025."] - #[doc = " Refer to for migration to `spend`."] - #[doc = ""] - #[doc = " Proposals that have been made."] - pub fn proposals_iter( + #[doc = " All voting for a particular voter in a particular voting class. We store the balance for the"] + #[doc = " number of votes that we have recorded."] + pub fn voting_for_iter( &self, ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< (), - types::proposals::Proposals, - (), + types::voting_for::VotingFor, (), ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, > { ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "TreasuryPallet", - "Proposals", + "ConvictionVoting", + "VotingFor", (), [ - 207u8, 135u8, 145u8, 146u8, 48u8, 10u8, 252u8, 40u8, 20u8, 115u8, - 205u8, 41u8, 173u8, 83u8, 115u8, 46u8, 106u8, 40u8, 130u8, 157u8, - 213u8, 87u8, 45u8, 23u8, 14u8, 167u8, 99u8, 208u8, 153u8, 163u8, 141u8, - 55u8, + 76u8, 63u8, 153u8, 193u8, 39u8, 137u8, 186u8, 29u8, 202u8, 56u8, 169u8, + 56u8, 103u8, 138u8, 192u8, 18u8, 179u8, 114u8, 56u8, 121u8, 197u8, + 12u8, 29u8, 239u8, 220u8, 231u8, 24u8, 46u8, 134u8, 99u8, 53u8, 206u8, ], ) } - #[doc = " DEPRECATED: associated with `spend_local` call and will be removed in May 2025."] - #[doc = " Refer to for migration to `spend`."] - #[doc = ""] - #[doc = " Proposals that have been made."] - pub fn proposals( + #[doc = " All voting for a particular voter in a particular voting class. We store the balance for the"] + #[doc = " number of votes that we have recorded."] + pub fn voting_for_iter1( &self, - _0: types::proposals::Param0, + _0: types::voting_for::Param0, ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::proposals::Param0, + types::voting_for::Param0, >, - types::proposals::Proposals, - ::subxt::ext::subxt_core::utils::Yes, - (), + types::voting_for::VotingFor, (), + ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, > { ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "TreasuryPallet", - "Proposals", + "ConvictionVoting", + "VotingFor", ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), [ - 207u8, 135u8, 145u8, 146u8, 48u8, 10u8, 252u8, 40u8, 20u8, 115u8, - 205u8, 41u8, 173u8, 83u8, 115u8, 46u8, 106u8, 40u8, 130u8, 157u8, - 213u8, 87u8, 45u8, 23u8, 14u8, 167u8, 99u8, 208u8, 153u8, 163u8, 141u8, - 55u8, + 76u8, 63u8, 153u8, 193u8, 39u8, 137u8, 186u8, 29u8, 202u8, 56u8, 169u8, + 56u8, 103u8, 138u8, 192u8, 18u8, 179u8, 114u8, 56u8, 121u8, 197u8, + 12u8, 29u8, 239u8, 220u8, 231u8, 24u8, 46u8, 134u8, 99u8, 53u8, 206u8, ], ) } - #[doc = " The amount which has been reported as inactive to Currency."] - pub fn deactivated( + #[doc = " All voting for a particular voter in a particular voting class. We store the balance for the"] + #[doc = " number of votes that we have recorded."] + pub fn voting_for( &self, + _0: types::voting_for::Param0, + _1: types::voting_for::Param1, ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::deactivated::Deactivated, + ( + ::subxt::ext::subxt_core::storage::address::StaticStorageKey< + types::voting_for::Param0, + >, + ::subxt::ext::subxt_core::storage::address::StaticStorageKey< + types::voting_for::Param1, + >, + ), + types::voting_for::VotingFor, ::subxt::ext::subxt_core::utils::Yes, ::subxt::ext::subxt_core::utils::Yes, (), > { ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "TreasuryPallet", - "Deactivated", - (), + "ConvictionVoting", + "VotingFor", + ( + ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), + ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_1), + ), [ - 120u8, 221u8, 159u8, 56u8, 161u8, 44u8, 54u8, 233u8, 47u8, 114u8, - 170u8, 150u8, 52u8, 24u8, 137u8, 212u8, 122u8, 247u8, 40u8, 17u8, - 208u8, 130u8, 42u8, 154u8, 33u8, 222u8, 59u8, 116u8, 0u8, 15u8, 79u8, - 123u8, + 76u8, 63u8, 153u8, 193u8, 39u8, 137u8, 186u8, 29u8, 202u8, 56u8, 169u8, + 56u8, 103u8, 138u8, 192u8, 18u8, 179u8, 114u8, 56u8, 121u8, 197u8, + 12u8, 29u8, 239u8, 220u8, 231u8, 24u8, 46u8, 134u8, 99u8, 53u8, 206u8, ], ) } - #[doc = " DEPRECATED: associated with `spend_local` call and will be removed in May 2025."] - #[doc = " Refer to for migration to `spend`."] - #[doc = ""] - #[doc = " Proposal indices that have been approved but not yet awarded."] - pub fn approvals( + #[doc = " The voting classes which have a non-zero lock requirement and the lock amounts which they"] + #[doc = " require. The actual amount locked on behalf of this pallet should always be the maximum of"] + #[doc = " this list."] + pub fn class_locks_for_iter( &self, ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< (), - types::approvals::Approvals, + types::class_locks_for::ClassLocksFor, + (), ::subxt::ext::subxt_core::utils::Yes, ::subxt::ext::subxt_core::utils::Yes, - (), > { ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "TreasuryPallet", - "Approvals", + "ConvictionVoting", + "ClassLocksFor", (), [ - 78u8, 147u8, 186u8, 235u8, 17u8, 40u8, 247u8, 235u8, 67u8, 222u8, 3u8, - 14u8, 248u8, 17u8, 67u8, 180u8, 93u8, 161u8, 64u8, 35u8, 119u8, 194u8, - 187u8, 226u8, 135u8, 162u8, 147u8, 174u8, 139u8, 72u8, 99u8, 212u8, + 74u8, 74u8, 8u8, 82u8, 215u8, 61u8, 13u8, 9u8, 44u8, 222u8, 33u8, + 245u8, 195u8, 124u8, 6u8, 174u8, 65u8, 245u8, 71u8, 42u8, 47u8, 46u8, + 164u8, 231u8, 11u8, 245u8, 115u8, 207u8, 209u8, 137u8, 90u8, 6u8, ], ) } - #[doc = " The count of spends that have been made."] - pub fn spend_count( + #[doc = " The voting classes which have a non-zero lock requirement and the lock amounts which they"] + #[doc = " require. The actual amount locked on behalf of this pallet should always be the maximum of"] + #[doc = " this list."] + pub fn class_locks_for( &self, + _0: types::class_locks_for::Param0, ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::spend_count::SpendCount, + ::subxt::ext::subxt_core::storage::address::StaticStorageKey< + types::class_locks_for::Param0, + >, + types::class_locks_for::ClassLocksFor, ::subxt::ext::subxt_core::utils::Yes, ::subxt::ext::subxt_core::utils::Yes, (), > { ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "TreasuryPallet", - "SpendCount", - (), + "ConvictionVoting", + "ClassLocksFor", + ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), [ - 220u8, 74u8, 248u8, 52u8, 243u8, 209u8, 42u8, 236u8, 27u8, 98u8, 76u8, - 153u8, 129u8, 176u8, 34u8, 177u8, 33u8, 132u8, 21u8, 71u8, 206u8, - 146u8, 222u8, 44u8, 232u8, 246u8, 205u8, 92u8, 240u8, 136u8, 182u8, - 30u8, - ], - ) - } - #[doc = " Spends that have been approved and being processed."] - pub fn spends_iter( - &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::spends::Spends, - (), - (), - ::subxt::ext::subxt_core::utils::Yes, - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "TreasuryPallet", - "Spends", - (), - [ - 140u8, 4u8, 241u8, 80u8, 4u8, 219u8, 107u8, 152u8, 206u8, 175u8, 107u8, - 172u8, 208u8, 71u8, 174u8, 99u8, 198u8, 52u8, 142u8, 126u8, 145u8, - 171u8, 254u8, 9u8, 235u8, 158u8, 186u8, 101u8, 140u8, 200u8, 96u8, - 168u8, - ], - ) - } - #[doc = " Spends that have been approved and being processed."] - pub fn spends( - &self, - _0: types::spends::Param0, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::spends::Param0, - >, - types::spends::Spends, - ::subxt::ext::subxt_core::utils::Yes, - (), - (), - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "TreasuryPallet", - "Spends", - ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), - [ - 140u8, 4u8, 241u8, 80u8, 4u8, 219u8, 107u8, 152u8, 206u8, 175u8, 107u8, - 172u8, 208u8, 71u8, 174u8, 99u8, 198u8, 52u8, 142u8, 126u8, 145u8, - 171u8, 254u8, 9u8, 235u8, 158u8, 186u8, 101u8, 140u8, 200u8, 96u8, - 168u8, - ], - ) - } - #[doc = " The blocknumber for the last triggered spend period."] - pub fn last_spend_period( - &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::last_spend_period::LastSpendPeriod, - ::subxt::ext::subxt_core::utils::Yes, - (), - (), - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "TreasuryPallet", - "LastSpendPeriod", - (), - [ - 6u8, 200u8, 107u8, 132u8, 60u8, 31u8, 24u8, 196u8, 108u8, 227u8, 5u8, - 63u8, 249u8, 139u8, 82u8, 140u8, 169u8, 242u8, 118u8, 93u8, 83u8, - 155u8, 120u8, 175u8, 224u8, 227u8, 39u8, 39u8, 255u8, 247u8, 79u8, - 30u8, + 74u8, 74u8, 8u8, 82u8, 215u8, 61u8, 13u8, 9u8, 44u8, 222u8, 33u8, + 245u8, 195u8, 124u8, 6u8, 174u8, 65u8, 245u8, 71u8, 42u8, 47u8, 46u8, + 164u8, 231u8, 11u8, 245u8, 115u8, 207u8, 209u8, 137u8, 90u8, 6u8, ], ) } @@ -14258,69 +12597,18 @@ pub mod api { use super::runtime_types; pub struct ConstantsApi; impl ConstantsApi { - #[doc = " Period between successive spends."] - pub fn spend_period( - &self, - ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< - ::core::primitive::u32, - > { - ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "TreasuryPallet", - "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, - ], - ) - } - #[doc = " Percentage of spare funds (if any) that are burnt per spend period."] - pub fn burn( - &self, - ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< - runtime_types::sp_arithmetic::per_things::Permill, - > { - ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "TreasuryPallet", - "Burn", - [ - 65u8, 93u8, 120u8, 165u8, 204u8, 81u8, 159u8, 163u8, 93u8, 135u8, - 114u8, 121u8, 147u8, 35u8, 215u8, 213u8, 4u8, 223u8, 83u8, 37u8, 225u8, - 200u8, 189u8, 156u8, 140u8, 36u8, 58u8, 46u8, 42u8, 232u8, 155u8, 0u8, - ], - ) - } - #[doc = " The treasury's pallet id, used for deriving its sovereign account ID."] - pub fn pallet_id( - &self, - ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< - runtime_types::frame_support::PalletId, - > { - ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "TreasuryPallet", - "PalletId", - [ - 56u8, 243u8, 53u8, 83u8, 154u8, 179u8, 170u8, 80u8, 133u8, 173u8, 61u8, - 161u8, 47u8, 225u8, 146u8, 21u8, 50u8, 229u8, 248u8, 27u8, 104u8, 58u8, - 129u8, 197u8, 102u8, 160u8, 168u8, 205u8, 154u8, 42u8, 217u8, 53u8, - ], - ) - } - #[doc = " DEPRECATED: associated with `spend_local` call and will be removed in May 2025."] - #[doc = " Refer to for migration to `spend`."] - #[doc = ""] - #[doc = " The maximum number of approvals that can wait in the spending queue."] + #[doc = " The maximum number of concurrent votes an account may have."] #[doc = ""] - #[doc = " NOTE: This parameter is also used within the Bounties Pallet extension if enabled."] - pub fn max_approvals( + #[doc = " Also used to compute weight, an overly large value can lead to extrinsics with large"] + #[doc = " weight estimation: see `delegate` for instance."] + pub fn max_votes( &self, ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< ::core::primitive::u32, > { ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "TreasuryPallet", - "MaxApprovals", + "ConvictionVoting", + "MaxVotes", [ 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, @@ -14329,15 +12617,18 @@ pub mod api { ], ) } - #[doc = " The period during which an approved treasury spend has to be claimed."] - pub fn payout_period( + #[doc = " The minimum period of vote locking."] + #[doc = ""] + #[doc = " It should be no shorter than enactment period to ensure that in the case of an approval,"] + #[doc = " those successful voters are locked into the consequences that their votes entail."] + pub fn vote_locking_period( &self, ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< ::core::primitive::u32, > { ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "TreasuryPallet", - "PayoutPeriod", + "ConvictionVoting", + "VoteLockingPeriod", [ 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, @@ -14349,15 +12640,12 @@ pub mod api { } } } - pub mod origins { - use super::{root_mod, runtime_types}; - } - pub mod recovery { + pub mod tech_collective { use super::{root_mod, runtime_types}; #[doc = "The `Error` enum of this pallet."] - pub type Error = runtime_types::pallet_recovery::pallet::Error; + pub type Error = runtime_types::pallet_ranked_collective::pallet::Error; #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] - pub type Call = runtime_types::pallet_recovery::pallet::Call; + pub type Call = runtime_types::pallet_ranked_collective::pallet::Call; pub mod calls { use super::{root_mod, runtime_types}; type DispatchError = runtime_types::sp_runtime::DispatchError; @@ -14374,29 +12662,25 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Send a call through a recovered account."] + #[doc = "Introduce a new member."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and registered to"] - #[doc = "be able to make calls on behalf of the recovered account."] + #[doc = "- `origin`: Must be the `AddOrigin`."] + #[doc = "- `who`: Account of non-member which will become a member."] #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `account`: The recovered account you want to make a call on-behalf-of."] - #[doc = "- `call`: The call you want to make with the recovered account."] - pub struct AsRecovered { - pub account: as_recovered::Account, - pub call: ::subxt::ext::subxt_core::alloc::boxed::Box, + #[doc = "Weight: `O(1)`"] + pub struct AddMember { + pub who: add_member::Who, } - pub mod as_recovered { + pub mod add_member { use super::runtime_types; - pub type Account = ::subxt::ext::subxt_core::utils::MultiAddress< + pub type Who = ::subxt::ext::subxt_core::utils::MultiAddress< ::subxt::ext::subxt_core::utils::AccountId32, (), >; - pub type Call = runtime_types::quantus_runtime::RuntimeCall; } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for AsRecovered { - const PALLET: &'static str = "Recovery"; - const CALL: &'static str = "as_recovered"; + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for AddMember { + const PALLET: &'static str = "TechCollective"; + const CALL: &'static str = "add_member"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -14409,32 +12693,25 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Allow ROOT to bypass the recovery process and set an a rescuer account"] - #[doc = "for a lost account directly."] + #[doc = "Increment the rank of an existing member by one."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _ROOT_."] + #[doc = "- `origin`: Must be the `PromoteOrigin`."] + #[doc = "- `who`: Account of existing member."] #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `lost`: The \"lost account\" to be recovered."] - #[doc = "- `rescuer`: The \"rescuer account\" which can call as the lost account."] - pub struct SetRecovered { - pub lost: set_recovered::Lost, - pub rescuer: set_recovered::Rescuer, + #[doc = "Weight: `O(1)`"] + pub struct PromoteMember { + pub who: promote_member::Who, } - pub mod set_recovered { + pub mod promote_member { use super::runtime_types; - pub type Lost = ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >; - pub type Rescuer = ::subxt::ext::subxt_core::utils::MultiAddress< + pub type Who = ::subxt::ext::subxt_core::utils::MultiAddress< ::subxt::ext::subxt_core::utils::AccountId32, (), >; } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for SetRecovered { - const PALLET: &'static str = "Recovery"; - const CALL: &'static str = "set_recovered"; + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for PromoteMember { + const PALLET: &'static str = "TechCollective"; + const CALL: &'static str = "promote_member"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -14447,38 +12724,26 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Create a recovery configuration for your account. This makes your account recoverable."] - #[doc = ""] - #[doc = "Payment: `ConfigDepositBase` + `FriendDepositFactor` * #_of_friends balance"] - #[doc = "will be reserved for storing the recovery configuration. This deposit is returned"] - #[doc = "in full when the user calls `remove_recovery`."] + #[doc = "Decrement the rank of an existing member by one. If the member is already at rank zero,"] + #[doc = "then they are removed entirely."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = "- `origin`: Must be the `DemoteOrigin`."] + #[doc = "- `who`: Account of existing member of rank greater than zero."] #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `friends`: A list of friends you trust to vouch for recovery attempts. Should be"] - #[doc = " ordered and contain no duplicate values."] - #[doc = "- `threshold`: The number of friends that must vouch for a recovery attempt before the"] - #[doc = " account can be recovered. Should be less than or equal to the length of the list of"] - #[doc = " friends."] - #[doc = "- `delay_period`: The number of blocks after a recovery attempt is initialized that"] - #[doc = " needs to pass before the account can be recovered."] - pub struct CreateRecovery { - pub friends: create_recovery::Friends, - pub threshold: create_recovery::Threshold, - pub delay_period: create_recovery::DelayPeriod, + #[doc = "Weight: `O(1)`, less if the member's index is highest in its rank."] + pub struct DemoteMember { + pub who: demote_member::Who, } - pub mod create_recovery { + pub mod demote_member { use super::runtime_types; - pub type Friends = ::subxt::ext::subxt_core::alloc::vec::Vec< + pub type Who = ::subxt::ext::subxt_core::utils::MultiAddress< ::subxt::ext::subxt_core::utils::AccountId32, + (), >; - pub type Threshold = ::core::primitive::u16; - pub type DelayPeriod = ::core::primitive::u32; } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for CreateRecovery { - const PALLET: &'static str = "Recovery"; - const CALL: &'static str = "create_recovery"; + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for DemoteMember { + const PALLET: &'static str = "TechCollective"; + const CALL: &'static str = "demote_member"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -14491,30 +12756,28 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Initiate the process for recovering a recoverable account."] - #[doc = ""] - #[doc = "Payment: `RecoveryDeposit` balance will be reserved for initiating the"] - #[doc = "recovery process. This deposit will always be repatriated to the account"] - #[doc = "trying to be recovered. See `close_recovery`."] + #[doc = "Remove the member entirely."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = "- `origin`: Must be the `RemoveOrigin`."] + #[doc = "- `who`: Account of existing member of rank greater than zero."] + #[doc = "- `min_rank`: The rank of the member or greater."] #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `account`: The lost account that you want to recover. This account needs to be"] - #[doc = " recoverable (i.e. have a recovery configuration)."] - pub struct InitiateRecovery { - pub account: initiate_recovery::Account, - } - pub mod initiate_recovery { - use super::runtime_types; - pub type Account = ::subxt::ext::subxt_core::utils::MultiAddress< + #[doc = "Weight: `O(min_rank)`."] + pub struct RemoveMember { + pub who: remove_member::Who, + pub min_rank: remove_member::MinRank, + } + pub mod remove_member { + use super::runtime_types; + pub type Who = ::subxt::ext::subxt_core::utils::MultiAddress< ::subxt::ext::subxt_core::utils::AccountId32, (), >; + pub type MinRank = ::core::primitive::u16; } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for InitiateRecovery { - const PALLET: &'static str = "Recovery"; - const CALL: &'static str = "initiate_recovery"; + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for RemoveMember { + const PALLET: &'static str = "TechCollective"; + const CALL: &'static str = "remove_member"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -14527,36 +12790,29 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Allow a \"friend\" of a recoverable account to vouch for an active recovery"] - #[doc = "process for that account."] + #[doc = "Add an aye or nay vote for the sender to the given proposal."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and must be a \"friend\""] - #[doc = "for the recoverable account."] + #[doc = "- `origin`: Must be `Signed` by a member account."] + #[doc = "- `poll`: Index of a poll which is ongoing."] + #[doc = "- `aye`: `true` if the vote is to approve the proposal, `false` otherwise."] #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `lost`: The lost account that you want to recover."] - #[doc = "- `rescuer`: The account trying to rescue the lost account that you want to vouch for."] + #[doc = "Transaction fees are be waived if the member is voting on any particular proposal"] + #[doc = "for the first time and the call is successful. Subsequent vote changes will charge a"] + #[doc = "fee."] #[doc = ""] - #[doc = "The combination of these two parameters must point to an active recovery"] - #[doc = "process."] - pub struct VouchRecovery { - pub lost: vouch_recovery::Lost, - pub rescuer: vouch_recovery::Rescuer, + #[doc = "Weight: `O(1)`, less if there was no previous vote on the poll by the member."] + pub struct Vote { + pub poll: vote::Poll, + pub aye: vote::Aye, } - pub mod vouch_recovery { + pub mod vote { use super::runtime_types; - pub type Lost = ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >; - pub type Rescuer = ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >; + pub type Poll = ::core::primitive::u32; + pub type Aye = ::core::primitive::bool; } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for VouchRecovery { - const PALLET: &'static str = "Recovery"; - const CALL: &'static str = "vouch_recovery"; + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for Vote { + const PALLET: &'static str = "TechCollective"; + const CALL: &'static str = "vote"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -14569,28 +12825,28 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Allow a successful rescuer to claim their recovered account."] + #[doc = "Remove votes from the given poll. It must have ended."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and must be a \"rescuer\""] - #[doc = "who has successfully completed the account recovery process: collected"] - #[doc = "`threshold` or more vouches, waited `delay_period` blocks since initiation."] + #[doc = "- `origin`: Must be `Signed` by any account."] + #[doc = "- `poll_index`: Index of a poll which is completed and for which votes continue to"] + #[doc = " exist."] + #[doc = "- `max`: Maximum number of vote items from remove in this call."] #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `account`: The lost account that you want to claim has been successfully recovered by"] - #[doc = " you."] - pub struct ClaimRecovery { - pub account: claim_recovery::Account, + #[doc = "Transaction fees are waived if the operation is successful."] + #[doc = ""] + #[doc = "Weight `O(max)` (less if there are fewer items to remove than `max`)."] + pub struct CleanupPoll { + pub poll_index: cleanup_poll::PollIndex, + pub max: cleanup_poll::Max, } - pub mod claim_recovery { + pub mod cleanup_poll { use super::runtime_types; - pub type Account = ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >; + pub type PollIndex = ::core::primitive::u32; + pub type Max = ::core::primitive::u32; } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for ClaimRecovery { - const PALLET: &'static str = "Recovery"; - const CALL: &'static str = "claim_recovery"; + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for CleanupPoll { + const PALLET: &'static str = "TechCollective"; + const CALL: &'static str = "cleanup_poll"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -14603,343 +12859,205 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "As the controller of a recoverable account, close an active recovery"] - #[doc = "process for your account."] - #[doc = ""] - #[doc = "Payment: By calling this function, the recoverable account will receive"] - #[doc = "the recovery deposit `RecoveryDeposit` placed by the rescuer."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and must be a"] - #[doc = "recoverable account with an active recovery process for it."] + #[doc = "Exchanges a member with a new account and the same existing rank."] #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `rescuer`: The account trying to rescue this recoverable account."] - pub struct CloseRecovery { - pub rescuer: close_recovery::Rescuer, + #[doc = "- `origin`: Must be the `ExchangeOrigin`."] + #[doc = "- `who`: Account of existing member of rank greater than zero to be exchanged."] + #[doc = "- `new_who`: New Account of existing member of rank greater than zero to exchanged to."] + pub struct ExchangeMember { + pub who: exchange_member::Who, + pub new_who: exchange_member::NewWho, } - pub mod close_recovery { + pub mod exchange_member { use super::runtime_types; - pub type Rescuer = ::subxt::ext::subxt_core::utils::MultiAddress< + pub type Who = ::subxt::ext::subxt_core::utils::MultiAddress< ::subxt::ext::subxt_core::utils::AccountId32, (), >; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for CloseRecovery { - const PALLET: &'static str = "Recovery"; - const CALL: &'static str = "close_recovery"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Remove the recovery process for your account. Recovered accounts are still accessible."] - #[doc = ""] - #[doc = "NOTE: The user must make sure to call `close_recovery` on all active"] - #[doc = "recovery attempts before calling this function else it will fail."] - #[doc = ""] - #[doc = "Payment: By calling this function the recoverable account will unreserve"] - #[doc = "their recovery configuration deposit."] - #[doc = "(`ConfigDepositBase` + `FriendDepositFactor` * #_of_friends)"] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and must be a"] - #[doc = "recoverable account (i.e. has a recovery configuration)."] - pub struct RemoveRecovery; - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for RemoveRecovery { - const PALLET: &'static str = "Recovery"; - const CALL: &'static str = "remove_recovery"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Cancel the ability to use `as_recovered` for `account`."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and registered to"] - #[doc = "be able to make calls on behalf of the recovered account."] - #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `account`: The recovered account you are able to call on-behalf-of."] - pub struct CancelRecovered { - pub account: cancel_recovered::Account, - } - pub mod cancel_recovered { - use super::runtime_types; - pub type Account = ::subxt::ext::subxt_core::utils::MultiAddress< + pub type NewWho = ::subxt::ext::subxt_core::utils::MultiAddress< ::subxt::ext::subxt_core::utils::AccountId32, (), >; } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for CancelRecovered { - const PALLET: &'static str = "Recovery"; - const CALL: &'static str = "cancel_recovered"; + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for ExchangeMember { + const PALLET: &'static str = "TechCollective"; + const CALL: &'static str = "exchange_member"; } } pub struct TransactionApi; impl TransactionApi { - #[doc = "Send a call through a recovered account."] + #[doc = "Introduce a new member."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and registered to"] - #[doc = "be able to make calls on behalf of the recovered account."] + #[doc = "- `origin`: Must be the `AddOrigin`."] + #[doc = "- `who`: Account of non-member which will become a member."] #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `account`: The recovered account you want to make a call on-behalf-of."] - #[doc = "- `call`: The call you want to make with the recovered account."] - pub fn as_recovered( + #[doc = "Weight: `O(1)`"] + pub fn add_member( &self, - account: types::as_recovered::Account, - call: types::as_recovered::Call, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { + who: types::add_member::Who, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Recovery", - "as_recovered", - types::AsRecovered { - account, - call: ::subxt::ext::subxt_core::alloc::boxed::Box::new(call), - }, + "TechCollective", + "add_member", + types::AddMember { who }, [ - 73u8, 156u8, 224u8, 32u8, 62u8, 42u8, 40u8, 157u8, 16u8, 250u8, 121u8, - 113u8, 185u8, 125u8, 247u8, 113u8, 58u8, 229u8, 172u8, 209u8, 153u8, - 36u8, 204u8, 24u8, 125u8, 23u8, 195u8, 48u8, 153u8, 32u8, 203u8, 100u8, + 2u8, 131u8, 37u8, 217u8, 112u8, 46u8, 86u8, 165u8, 248u8, 244u8, 33u8, + 236u8, 155u8, 28u8, 163u8, 169u8, 213u8, 32u8, 70u8, 217u8, 97u8, + 194u8, 138u8, 77u8, 133u8, 97u8, 188u8, 49u8, 49u8, 31u8, 177u8, 206u8, ], ) } - #[doc = "Allow ROOT to bypass the recovery process and set an a rescuer account"] - #[doc = "for a lost account directly."] + #[doc = "Increment the rank of an existing member by one."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _ROOT_."] + #[doc = "- `origin`: Must be the `PromoteOrigin`."] + #[doc = "- `who`: Account of existing member."] #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `lost`: The \"lost account\" to be recovered."] - #[doc = "- `rescuer`: The \"rescuer account\" which can call as the lost account."] - pub fn set_recovered( + #[doc = "Weight: `O(1)`"] + pub fn promote_member( &self, - lost: types::set_recovered::Lost, - rescuer: types::set_recovered::Rescuer, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { + who: types::promote_member::Who, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload + { ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Recovery", - "set_recovered", - types::SetRecovered { lost, rescuer }, + "TechCollective", + "promote_member", + types::PromoteMember { who }, [ - 194u8, 147u8, 14u8, 197u8, 132u8, 185u8, 122u8, 81u8, 61u8, 14u8, 10u8, - 177u8, 74u8, 184u8, 150u8, 217u8, 246u8, 149u8, 26u8, 165u8, 196u8, - 83u8, 230u8, 195u8, 213u8, 40u8, 51u8, 180u8, 23u8, 90u8, 3u8, 14u8, + 169u8, 155u8, 9u8, 50u8, 144u8, 133u8, 230u8, 60u8, 216u8, 147u8, 3u8, + 236u8, 94u8, 185u8, 106u8, 139u8, 235u8, 143u8, 189u8, 135u8, 208u8, + 176u8, 126u8, 124u8, 85u8, 140u8, 189u8, 125u8, 87u8, 56u8, 57u8, + 246u8, ], ) } - #[doc = "Create a recovery configuration for your account. This makes your account recoverable."] - #[doc = ""] - #[doc = "Payment: `ConfigDepositBase` + `FriendDepositFactor` * #_of_friends balance"] - #[doc = "will be reserved for storing the recovery configuration. This deposit is returned"] - #[doc = "in full when the user calls `remove_recovery`."] + #[doc = "Decrement the rank of an existing member by one. If the member is already at rank zero,"] + #[doc = "then they are removed entirely."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = "- `origin`: Must be the `DemoteOrigin`."] + #[doc = "- `who`: Account of existing member of rank greater than zero."] #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `friends`: A list of friends you trust to vouch for recovery attempts. Should be"] - #[doc = " ordered and contain no duplicate values."] - #[doc = "- `threshold`: The number of friends that must vouch for a recovery attempt before the"] - #[doc = " account can be recovered. Should be less than or equal to the length of the list of"] - #[doc = " friends."] - #[doc = "- `delay_period`: The number of blocks after a recovery attempt is initialized that"] - #[doc = " needs to pass before the account can be recovered."] - pub fn create_recovery( - &self, - friends: types::create_recovery::Friends, - threshold: types::create_recovery::Threshold, - delay_period: types::create_recovery::DelayPeriod, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload - { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Recovery", - "create_recovery", - types::CreateRecovery { friends, threshold, delay_period }, - [ - 36u8, 175u8, 11u8, 85u8, 95u8, 170u8, 58u8, 193u8, 102u8, 18u8, 117u8, - 27u8, 199u8, 214u8, 70u8, 47u8, 129u8, 130u8, 109u8, 242u8, 240u8, - 255u8, 120u8, 176u8, 40u8, 243u8, 175u8, 71u8, 3u8, 91u8, 186u8, 220u8, - ], - ) - } - #[doc = "Initiate the process for recovering a recoverable account."] - #[doc = ""] - #[doc = "Payment: `RecoveryDeposit` balance will be reserved for initiating the"] - #[doc = "recovery process. This deposit will always be repatriated to the account"] - #[doc = "trying to be recovered. See `close_recovery`."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `account`: The lost account that you want to recover. This account needs to be"] - #[doc = " recoverable (i.e. have a recovery configuration)."] - pub fn initiate_recovery( - &self, - account: types::initiate_recovery::Account, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload - { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Recovery", - "initiate_recovery", - types::InitiateRecovery { account }, - [ - 60u8, 243u8, 229u8, 176u8, 221u8, 52u8, 44u8, 224u8, 233u8, 14u8, 89u8, - 100u8, 174u8, 74u8, 38u8, 32u8, 97u8, 48u8, 53u8, 74u8, 30u8, 242u8, - 19u8, 114u8, 145u8, 74u8, 69u8, 125u8, 227u8, 214u8, 144u8, 58u8, - ], - ) - } - #[doc = "Allow a \"friend\" of a recoverable account to vouch for an active recovery"] - #[doc = "process for that account."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and must be a \"friend\""] - #[doc = "for the recoverable account."] - #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `lost`: The lost account that you want to recover."] - #[doc = "- `rescuer`: The account trying to rescue the lost account that you want to vouch for."] - #[doc = ""] - #[doc = "The combination of these two parameters must point to an active recovery"] - #[doc = "process."] - pub fn vouch_recovery( + #[doc = "Weight: `O(1)`, less if the member's index is highest in its rank."] + pub fn demote_member( &self, - lost: types::vouch_recovery::Lost, - rescuer: types::vouch_recovery::Rescuer, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload - { + who: types::demote_member::Who, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Recovery", - "vouch_recovery", - types::VouchRecovery { lost, rescuer }, + "TechCollective", + "demote_member", + types::DemoteMember { who }, [ - 97u8, 190u8, 60u8, 15u8, 191u8, 117u8, 1u8, 217u8, 62u8, 40u8, 210u8, - 1u8, 237u8, 111u8, 48u8, 196u8, 180u8, 154u8, 198u8, 12u8, 108u8, 42u8, - 6u8, 234u8, 2u8, 113u8, 163u8, 111u8, 80u8, 146u8, 6u8, 73u8, + 21u8, 185u8, 71u8, 166u8, 106u8, 88u8, 74u8, 251u8, 78u8, 28u8, 205u8, + 171u8, 199u8, 195u8, 97u8, 149u8, 175u8, 229u8, 25u8, 113u8, 96u8, + 25u8, 240u8, 64u8, 109u8, 246u8, 203u8, 45u8, 110u8, 205u8, 115u8, + 178u8, ], ) } - #[doc = "Allow a successful rescuer to claim their recovered account."] + #[doc = "Remove the member entirely."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and must be a \"rescuer\""] - #[doc = "who has successfully completed the account recovery process: collected"] - #[doc = "`threshold` or more vouches, waited `delay_period` blocks since initiation."] + #[doc = "- `origin`: Must be the `RemoveOrigin`."] + #[doc = "- `who`: Account of existing member of rank greater than zero."] + #[doc = "- `min_rank`: The rank of the member or greater."] #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `account`: The lost account that you want to claim has been successfully recovered by"] - #[doc = " you."] - pub fn claim_recovery( + #[doc = "Weight: `O(min_rank)`."] + pub fn remove_member( &self, - account: types::claim_recovery::Account, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload - { + who: types::remove_member::Who, + min_rank: types::remove_member::MinRank, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Recovery", - "claim_recovery", - types::ClaimRecovery { account }, + "TechCollective", + "remove_member", + types::RemoveMember { who, min_rank }, [ - 41u8, 47u8, 162u8, 88u8, 13u8, 166u8, 130u8, 146u8, 218u8, 162u8, - 166u8, 33u8, 89u8, 129u8, 177u8, 178u8, 68u8, 128u8, 161u8, 229u8, - 207u8, 3u8, 57u8, 35u8, 211u8, 208u8, 74u8, 155u8, 183u8, 173u8, 74u8, - 56u8, + 23u8, 156u8, 32u8, 64u8, 158u8, 50u8, 64u8, 199u8, 108u8, 67u8, 133u8, + 128u8, 138u8, 241u8, 14u8, 238u8, 192u8, 173u8, 250u8, 11u8, 124u8, + 119u8, 177u8, 190u8, 152u8, 116u8, 134u8, 42u8, 216u8, 49u8, 113u8, + 49u8, ], ) } - #[doc = "As the controller of a recoverable account, close an active recovery"] - #[doc = "process for your account."] + #[doc = "Add an aye or nay vote for the sender to the given proposal."] #[doc = ""] - #[doc = "Payment: By calling this function, the recoverable account will receive"] - #[doc = "the recovery deposit `RecoveryDeposit` placed by the rescuer."] + #[doc = "- `origin`: Must be `Signed` by a member account."] + #[doc = "- `poll`: Index of a poll which is ongoing."] + #[doc = "- `aye`: `true` if the vote is to approve the proposal, `false` otherwise."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and must be a"] - #[doc = "recoverable account with an active recovery process for it."] + #[doc = "Transaction fees are be waived if the member is voting on any particular proposal"] + #[doc = "for the first time and the call is successful. Subsequent vote changes will charge a"] + #[doc = "fee."] #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `rescuer`: The account trying to rescue this recoverable account."] - pub fn close_recovery( + #[doc = "Weight: `O(1)`, less if there was no previous vote on the poll by the member."] + pub fn vote( &self, - rescuer: types::close_recovery::Rescuer, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload - { + poll: types::vote::Poll, + aye: types::vote::Aye, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Recovery", - "close_recovery", - types::CloseRecovery { rescuer }, + "TechCollective", + "vote", + types::Vote { poll, aye }, [ - 161u8, 178u8, 117u8, 209u8, 119u8, 164u8, 135u8, 41u8, 25u8, 108u8, - 194u8, 175u8, 221u8, 65u8, 184u8, 137u8, 171u8, 97u8, 204u8, 61u8, - 159u8, 39u8, 192u8, 53u8, 246u8, 69u8, 113u8, 16u8, 170u8, 232u8, - 163u8, 10u8, + 54u8, 116u8, 81u8, 239u8, 223u8, 35u8, 11u8, 244u8, 245u8, 94u8, 23u8, + 241u8, 125u8, 231u8, 56u8, 150u8, 105u8, 125u8, 100u8, 171u8, 182u8, + 186u8, 134u8, 40u8, 4u8, 121u8, 119u8, 11u8, 93u8, 158u8, 59u8, 209u8, ], ) } - #[doc = "Remove the recovery process for your account. Recovered accounts are still accessible."] + #[doc = "Remove votes from the given poll. It must have ended."] #[doc = ""] - #[doc = "NOTE: The user must make sure to call `close_recovery` on all active"] - #[doc = "recovery attempts before calling this function else it will fail."] + #[doc = "- `origin`: Must be `Signed` by any account."] + #[doc = "- `poll_index`: Index of a poll which is completed and for which votes continue to"] + #[doc = " exist."] + #[doc = "- `max`: Maximum number of vote items from remove in this call."] #[doc = ""] - #[doc = "Payment: By calling this function the recoverable account will unreserve"] - #[doc = "their recovery configuration deposit."] - #[doc = "(`ConfigDepositBase` + `FriendDepositFactor` * #_of_friends)"] + #[doc = "Transaction fees are waived if the operation is successful."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and must be a"] - #[doc = "recoverable account (i.e. has a recovery configuration)."] - pub fn remove_recovery( + #[doc = "Weight `O(max)` (less if there are fewer items to remove than `max`)."] + pub fn cleanup_poll( &self, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload - { + poll_index: types::cleanup_poll::PollIndex, + max: types::cleanup_poll::Max, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Recovery", - "remove_recovery", - types::RemoveRecovery {}, + "TechCollective", + "cleanup_poll", + types::CleanupPoll { poll_index, max }, [ - 11u8, 38u8, 133u8, 172u8, 212u8, 252u8, 57u8, 216u8, 42u8, 202u8, - 206u8, 91u8, 115u8, 91u8, 242u8, 123u8, 95u8, 196u8, 172u8, 243u8, - 164u8, 1u8, 69u8, 180u8, 40u8, 68u8, 208u8, 221u8, 161u8, 250u8, 8u8, - 72u8, + 157u8, 109u8, 86u8, 253u8, 62u8, 107u8, 235u8, 255u8, 171u8, 68u8, + 103u8, 92u8, 245u8, 25u8, 252u8, 158u8, 174u8, 137u8, 77u8, 251u8, + 105u8, 113u8, 165u8, 46u8, 39u8, 55u8, 166u8, 79u8, 103u8, 81u8, 121u8, + 37u8, ], ) } - #[doc = "Cancel the ability to use `as_recovered` for `account`."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and registered to"] - #[doc = "be able to make calls on behalf of the recovered account."] + #[doc = "Exchanges a member with a new account and the same existing rank."] #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `account`: The recovered account you are able to call on-behalf-of."] - pub fn cancel_recovered( + #[doc = "- `origin`: Must be the `ExchangeOrigin`."] + #[doc = "- `who`: Account of existing member of rank greater than zero to be exchanged."] + #[doc = "- `new_who`: New Account of existing member of rank greater than zero to exchanged to."] + pub fn exchange_member( &self, - account: types::cancel_recovered::Account, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload + who: types::exchange_member::Who, + new_who: types::exchange_member::NewWho, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Recovery", - "cancel_recovered", - types::CancelRecovered { account }, + "TechCollective", + "exchange_member", + types::ExchangeMember { who, new_who }, [ - 100u8, 222u8, 80u8, 226u8, 187u8, 188u8, 111u8, 58u8, 190u8, 5u8, - 178u8, 144u8, 37u8, 98u8, 71u8, 145u8, 28u8, 248u8, 222u8, 188u8, 53u8, - 21u8, 127u8, 176u8, 249u8, 166u8, 250u8, 59u8, 170u8, 33u8, 251u8, - 239u8, + 240u8, 208u8, 76u8, 147u8, 117u8, 23u8, 91u8, 37u8, 22u8, 101u8, 53u8, + 247u8, 161u8, 94u8, 109u8, 233u8, 104u8, 129u8, 67u8, 31u8, 223u8, + 182u8, 50u8, 233u8, 120u8, 129u8, 224u8, 135u8, 52u8, 162u8, 26u8, + 189u8, ], ) } } } - #[doc = "Events type."] - pub type Event = runtime_types::pallet_recovery::pallet::Event; + #[doc = "The `Event` enum of this pallet"] + pub type Event = runtime_types::pallet_ranked_collective::pallet::Event; pub mod events { use super::runtime_types; #[derive( @@ -14949,17 +13067,17 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "A recovery process has been set up for an account."] - pub struct RecoveryCreated { - pub account: recovery_created::Account, + #[doc = "A member `who` has been added."] + pub struct MemberAdded { + pub who: member_added::Who, } - pub mod recovery_created { + pub mod member_added { use super::runtime_types; - pub type Account = ::subxt::ext::subxt_core::utils::AccountId32; + pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; } - impl ::subxt::ext::subxt_core::events::StaticEvent for RecoveryCreated { - const PALLET: &'static str = "Recovery"; - const EVENT: &'static str = "RecoveryCreated"; + impl ::subxt::ext::subxt_core::events::StaticEvent for MemberAdded { + const PALLET: &'static str = "TechCollective"; + const EVENT: &'static str = "MemberAdded"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -14968,19 +13086,19 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "A recovery process has been initiated for lost account by rescuer account."] - pub struct RecoveryInitiated { - pub lost_account: recovery_initiated::LostAccount, - pub rescuer_account: recovery_initiated::RescuerAccount, + #[doc = "The member `who`se rank has been changed to the given `rank`."] + pub struct RankChanged { + pub who: rank_changed::Who, + pub rank: rank_changed::Rank, } - pub mod recovery_initiated { + pub mod rank_changed { use super::runtime_types; - pub type LostAccount = ::subxt::ext::subxt_core::utils::AccountId32; - pub type RescuerAccount = ::subxt::ext::subxt_core::utils::AccountId32; + pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; + pub type Rank = ::core::primitive::u16; } - impl ::subxt::ext::subxt_core::events::StaticEvent for RecoveryInitiated { - const PALLET: &'static str = "Recovery"; - const EVENT: &'static str = "RecoveryInitiated"; + impl ::subxt::ext::subxt_core::events::StaticEvent for RankChanged { + const PALLET: &'static str = "TechCollective"; + const EVENT: &'static str = "RankChanged"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -14989,42 +13107,19 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "A recovery process for lost account by rescuer account has been vouched for by sender."] - pub struct RecoveryVouched { - pub lost_account: recovery_vouched::LostAccount, - pub rescuer_account: recovery_vouched::RescuerAccount, - pub sender: recovery_vouched::Sender, - } - pub mod recovery_vouched { - use super::runtime_types; - pub type LostAccount = ::subxt::ext::subxt_core::utils::AccountId32; - pub type RescuerAccount = ::subxt::ext::subxt_core::utils::AccountId32; - pub type Sender = ::subxt::ext::subxt_core::utils::AccountId32; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for RecoveryVouched { - const PALLET: &'static str = "Recovery"; - const EVENT: &'static str = "RecoveryVouched"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "A recovery process for lost account by rescuer account has been closed."] - pub struct RecoveryClosed { - pub lost_account: recovery_closed::LostAccount, - pub rescuer_account: recovery_closed::RescuerAccount, + #[doc = "The member `who` of given `rank` has been removed from the collective."] + pub struct MemberRemoved { + pub who: member_removed::Who, + pub rank: member_removed::Rank, } - pub mod recovery_closed { + pub mod member_removed { use super::runtime_types; - pub type LostAccount = ::subxt::ext::subxt_core::utils::AccountId32; - pub type RescuerAccount = ::subxt::ext::subxt_core::utils::AccountId32; + pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; + pub type Rank = ::core::primitive::u16; } - impl ::subxt::ext::subxt_core::events::StaticEvent for RecoveryClosed { - const PALLET: &'static str = "Recovery"; - const EVENT: &'static str = "RecoveryClosed"; + impl ::subxt::ext::subxt_core::events::StaticEvent for MemberRemoved { + const PALLET: &'static str = "TechCollective"; + const EVENT: &'static str = "MemberRemoved"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -15033,19 +13128,24 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "Lost account has been successfully recovered by rescuer account."] - pub struct AccountRecovered { - pub lost_account: account_recovered::LostAccount, - pub rescuer_account: account_recovered::RescuerAccount, + #[doc = "The member `who` has voted for the `poll` with the given `vote` leading to an updated"] + #[doc = "`tally`."] + pub struct Voted { + pub who: voted::Who, + pub poll: voted::Poll, + pub vote: voted::Vote, + pub tally: voted::Tally, } - pub mod account_recovered { + pub mod voted { use super::runtime_types; - pub type LostAccount = ::subxt::ext::subxt_core::utils::AccountId32; - pub type RescuerAccount = ::subxt::ext::subxt_core::utils::AccountId32; + pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; + pub type Poll = ::core::primitive::u32; + pub type Vote = runtime_types::pallet_ranked_collective::VoteRecord; + pub type Tally = runtime_types::pallet_ranked_collective::Tally; } - impl ::subxt::ext::subxt_core::events::StaticEvent for AccountRecovered { - const PALLET: &'static str = "Recovery"; - const EVENT: &'static str = "AccountRecovered"; + impl ::subxt::ext::subxt_core::events::StaticEvent for Voted { + const PALLET: &'static str = "TechCollective"; + const EVENT: &'static str = "Voted"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -15054,442 +13154,458 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "A recovery process has been removed for an account."] - pub struct RecoveryRemoved { - pub lost_account: recovery_removed::LostAccount, + #[doc = "The member `who` had their `AccountId` changed to `new_who`."] + pub struct MemberExchanged { + pub who: member_exchanged::Who, + pub new_who: member_exchanged::NewWho, } - pub mod recovery_removed { + pub mod member_exchanged { use super::runtime_types; - pub type LostAccount = ::subxt::ext::subxt_core::utils::AccountId32; + pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; + pub type NewWho = ::subxt::ext::subxt_core::utils::AccountId32; } - impl ::subxt::ext::subxt_core::events::StaticEvent for RecoveryRemoved { - const PALLET: &'static str = "Recovery"; - const EVENT: &'static str = "RecoveryRemoved"; + impl ::subxt::ext::subxt_core::events::StaticEvent for MemberExchanged { + const PALLET: &'static str = "TechCollective"; + const EVENT: &'static str = "MemberExchanged"; } } pub mod storage { use super::runtime_types; pub mod types { use super::runtime_types; - pub mod recoverable { + pub mod member_count { use super::runtime_types; - pub type Recoverable = runtime_types::pallet_recovery::RecoveryConfig< - ::core::primitive::u32, - ::core::primitive::u128, - runtime_types::bounded_collections::bounded_vec::BoundedVec< - ::subxt::ext::subxt_core::utils::AccountId32, - >, - >; - pub type Param0 = ::subxt::ext::subxt_core::utils::AccountId32; + pub type MemberCount = ::core::primitive::u32; + pub type Param0 = ::core::primitive::u16; } - pub mod active_recoveries { + pub mod members { use super::runtime_types; - pub type ActiveRecoveries = runtime_types::pallet_recovery::ActiveRecovery< - ::core::primitive::u32, - ::core::primitive::u128, - runtime_types::bounded_collections::bounded_vec::BoundedVec< - ::subxt::ext::subxt_core::utils::AccountId32, - >, - >; + pub type Members = runtime_types::pallet_ranked_collective::MemberRecord; pub type Param0 = ::subxt::ext::subxt_core::utils::AccountId32; + } + pub mod id_to_index { + use super::runtime_types; + pub type IdToIndex = ::core::primitive::u32; + pub type Param0 = ::core::primitive::u16; pub type Param1 = ::subxt::ext::subxt_core::utils::AccountId32; } - pub mod proxy { + pub mod index_to_id { use super::runtime_types; - pub type Proxy = ::subxt::ext::subxt_core::utils::AccountId32; - pub type Param0 = ::subxt::ext::subxt_core::utils::AccountId32; + pub type IndexToId = ::subxt::ext::subxt_core::utils::AccountId32; + pub type Param0 = ::core::primitive::u16; + pub type Param1 = ::core::primitive::u32; + } + pub mod voting { + use super::runtime_types; + pub type Voting = runtime_types::pallet_ranked_collective::VoteRecord; + pub type Param0 = ::core::primitive::u32; + pub type Param1 = ::subxt::ext::subxt_core::utils::AccountId32; + } + pub mod voting_cleanup { + use super::runtime_types; + pub type VotingCleanup = + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >; + pub type Param0 = ::core::primitive::u32; } } pub struct StorageApi; impl StorageApi { - #[doc = " The set of recoverable accounts and their recovery configuration."] - pub fn recoverable_iter( + #[doc = " The number of members in the collective who have at least the rank according to the index"] + #[doc = " of the vec."] + pub fn member_count_iter( &self, ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< (), - types::recoverable::Recoverable, - (), + types::member_count::MemberCount, (), ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, > { ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Recovery", - "Recoverable", + "TechCollective", + "MemberCount", (), [ - 112u8, 7u8, 56u8, 46u8, 138u8, 197u8, 63u8, 234u8, 140u8, 123u8, 145u8, - 106u8, 189u8, 190u8, 247u8, 61u8, 250u8, 67u8, 107u8, 42u8, 170u8, - 79u8, 54u8, 168u8, 33u8, 214u8, 91u8, 227u8, 5u8, 107u8, 38u8, 26u8, + 0u8, 141u8, 66u8, 91u8, 155u8, 74u8, 17u8, 191u8, 143u8, 41u8, 231u8, + 56u8, 123u8, 219u8, 145u8, 27u8, 197u8, 62u8, 118u8, 237u8, 30u8, 7u8, + 107u8, 96u8, 95u8, 17u8, 242u8, 206u8, 246u8, 79u8, 53u8, 214u8, ], ) } - #[doc = " The set of recoverable accounts and their recovery configuration."] - pub fn recoverable( + #[doc = " The number of members in the collective who have at least the rank according to the index"] + #[doc = " of the vec."] + pub fn member_count( &self, - _0: types::recoverable::Param0, + _0: types::member_count::Param0, ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::recoverable::Param0, + types::member_count::Param0, >, - types::recoverable::Recoverable, + types::member_count::MemberCount, + ::subxt::ext::subxt_core::utils::Yes, ::subxt::ext::subxt_core::utils::Yes, - (), (), > { ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Recovery", - "Recoverable", + "TechCollective", + "MemberCount", ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), [ - 112u8, 7u8, 56u8, 46u8, 138u8, 197u8, 63u8, 234u8, 140u8, 123u8, 145u8, - 106u8, 189u8, 190u8, 247u8, 61u8, 250u8, 67u8, 107u8, 42u8, 170u8, - 79u8, 54u8, 168u8, 33u8, 214u8, 91u8, 227u8, 5u8, 107u8, 38u8, 26u8, + 0u8, 141u8, 66u8, 91u8, 155u8, 74u8, 17u8, 191u8, 143u8, 41u8, 231u8, + 56u8, 123u8, 219u8, 145u8, 27u8, 197u8, 62u8, 118u8, 237u8, 30u8, 7u8, + 107u8, 96u8, 95u8, 17u8, 242u8, 206u8, 246u8, 79u8, 53u8, 214u8, ], ) } - #[doc = " Active recovery attempts."] - #[doc = ""] - #[doc = " First account is the account to be recovered, and the second account"] - #[doc = " is the user trying to recover the account."] - pub fn active_recoveries_iter( + #[doc = " The current members of the collective."] + pub fn members_iter( &self, ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< (), - types::active_recoveries::ActiveRecoveries, + types::members::Members, (), (), ::subxt::ext::subxt_core::utils::Yes, > { ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Recovery", - "ActiveRecoveries", + "TechCollective", + "Members", (), [ - 104u8, 252u8, 28u8, 142u8, 48u8, 26u8, 91u8, 201u8, 184u8, 163u8, - 180u8, 197u8, 189u8, 71u8, 144u8, 88u8, 225u8, 13u8, 183u8, 84u8, - 244u8, 41u8, 164u8, 212u8, 153u8, 247u8, 191u8, 25u8, 162u8, 25u8, - 91u8, 123u8, + 101u8, 183u8, 36u8, 241u8, 67u8, 8u8, 252u8, 116u8, 110u8, 153u8, + 117u8, 210u8, 128u8, 80u8, 130u8, 163u8, 38u8, 76u8, 230u8, 107u8, + 112u8, 90u8, 102u8, 24u8, 217u8, 2u8, 244u8, 197u8, 103u8, 215u8, + 247u8, 133u8, ], ) } - #[doc = " Active recovery attempts."] - #[doc = ""] - #[doc = " First account is the account to be recovered, and the second account"] - #[doc = " is the user trying to recover the account."] - pub fn active_recoveries_iter1( + #[doc = " The current members of the collective."] + pub fn members( &self, - _0: types::active_recoveries::Param0, + _0: types::members::Param0, ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::active_recoveries::Param0, + types::members::Param0, >, - types::active_recoveries::ActiveRecoveries, + types::members::Members, + ::subxt::ext::subxt_core::utils::Yes, (), (), - ::subxt::ext::subxt_core::utils::Yes, > { ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Recovery", - "ActiveRecoveries", + "TechCollective", + "Members", ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), [ - 104u8, 252u8, 28u8, 142u8, 48u8, 26u8, 91u8, 201u8, 184u8, 163u8, - 180u8, 197u8, 189u8, 71u8, 144u8, 88u8, 225u8, 13u8, 183u8, 84u8, - 244u8, 41u8, 164u8, 212u8, 153u8, 247u8, 191u8, 25u8, 162u8, 25u8, - 91u8, 123u8, + 101u8, 183u8, 36u8, 241u8, 67u8, 8u8, 252u8, 116u8, 110u8, 153u8, + 117u8, 210u8, 128u8, 80u8, 130u8, 163u8, 38u8, 76u8, 230u8, 107u8, + 112u8, 90u8, 102u8, 24u8, 217u8, 2u8, 244u8, 197u8, 103u8, 215u8, + 247u8, 133u8, ], ) } - #[doc = " Active recovery attempts."] - #[doc = ""] - #[doc = " First account is the account to be recovered, and the second account"] - #[doc = " is the user trying to recover the account."] - pub fn active_recoveries( + #[doc = " The index of each ranks's member into the group of members who have at least that rank."] + pub fn id_to_index_iter( &self, - _0: types::active_recoveries::Param0, - _1: types::active_recoveries::Param1, ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - ( - ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::active_recoveries::Param0, - >, - ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::active_recoveries::Param1, - >, - ), - types::active_recoveries::ActiveRecoveries, - ::subxt::ext::subxt_core::utils::Yes, + (), + types::id_to_index::IdToIndex, (), (), + ::subxt::ext::subxt_core::utils::Yes, > { ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Recovery", - "ActiveRecoveries", - ( - ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), - ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_1), - ), + "TechCollective", + "IdToIndex", + (), [ - 104u8, 252u8, 28u8, 142u8, 48u8, 26u8, 91u8, 201u8, 184u8, 163u8, - 180u8, 197u8, 189u8, 71u8, 144u8, 88u8, 225u8, 13u8, 183u8, 84u8, - 244u8, 41u8, 164u8, 212u8, 153u8, 247u8, 191u8, 25u8, 162u8, 25u8, - 91u8, 123u8, + 121u8, 225u8, 69u8, 131u8, 194u8, 3u8, 82u8, 27u8, 129u8, 152u8, 157u8, + 45u8, 39u8, 47u8, 166u8, 28u8, 42u8, 92u8, 217u8, 189u8, 160u8, 102u8, + 153u8, 196u8, 94u8, 48u8, 248u8, 113u8, 164u8, 111u8, 27u8, 9u8, ], ) } - #[doc = " The list of allowed proxy accounts."] - #[doc = ""] - #[doc = " Map from the user who can access it to the recovered account."] - pub fn proxy_iter( + #[doc = " The index of each ranks's member into the group of members who have at least that rank."] + pub fn id_to_index_iter1( &self, + _0: types::id_to_index::Param0, ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::proxy::Proxy, + ::subxt::ext::subxt_core::storage::address::StaticStorageKey< + types::id_to_index::Param0, + >, + types::id_to_index::IdToIndex, (), (), ::subxt::ext::subxt_core::utils::Yes, > { ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Recovery", - "Proxy", - (), + "TechCollective", + "IdToIndex", + ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), [ - 161u8, 242u8, 17u8, 183u8, 161u8, 47u8, 87u8, 110u8, 201u8, 177u8, - 199u8, 157u8, 30u8, 131u8, 49u8, 89u8, 182u8, 86u8, 152u8, 19u8, 199u8, - 33u8, 12u8, 138u8, 51u8, 215u8, 130u8, 5u8, 251u8, 115u8, 69u8, 159u8, + 121u8, 225u8, 69u8, 131u8, 194u8, 3u8, 82u8, 27u8, 129u8, 152u8, 157u8, + 45u8, 39u8, 47u8, 166u8, 28u8, 42u8, 92u8, 217u8, 189u8, 160u8, 102u8, + 153u8, 196u8, 94u8, 48u8, 248u8, 113u8, 164u8, 111u8, 27u8, 9u8, ], ) } - #[doc = " The list of allowed proxy accounts."] - #[doc = ""] - #[doc = " Map from the user who can access it to the recovered account."] - pub fn proxy( + #[doc = " The index of each ranks's member into the group of members who have at least that rank."] + pub fn id_to_index( &self, - _0: types::proxy::Param0, + _0: types::id_to_index::Param0, + _1: types::id_to_index::Param1, ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::proxy::Param0, - >, - types::proxy::Proxy, + ( + ::subxt::ext::subxt_core::storage::address::StaticStorageKey< + types::id_to_index::Param0, + >, + ::subxt::ext::subxt_core::storage::address::StaticStorageKey< + types::id_to_index::Param1, + >, + ), + types::id_to_index::IdToIndex, ::subxt::ext::subxt_core::utils::Yes, (), (), > { ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Recovery", - "Proxy", - ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), + "TechCollective", + "IdToIndex", + ( + ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), + ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_1), + ), [ - 161u8, 242u8, 17u8, 183u8, 161u8, 47u8, 87u8, 110u8, 201u8, 177u8, - 199u8, 157u8, 30u8, 131u8, 49u8, 89u8, 182u8, 86u8, 152u8, 19u8, 199u8, - 33u8, 12u8, 138u8, 51u8, 215u8, 130u8, 5u8, 251u8, 115u8, 69u8, 159u8, + 121u8, 225u8, 69u8, 131u8, 194u8, 3u8, 82u8, 27u8, 129u8, 152u8, 157u8, + 45u8, 39u8, 47u8, 166u8, 28u8, 42u8, 92u8, 217u8, 189u8, 160u8, 102u8, + 153u8, 196u8, 94u8, 48u8, 248u8, 113u8, 164u8, 111u8, 27u8, 9u8, ], ) } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " The base amount of currency needed to reserve for creating a recovery configuration."] - #[doc = ""] - #[doc = " This is held for an additional storage item whose value size is"] - #[doc = " `2 + sizeof(BlockNumber, Balance)` bytes."] - pub fn config_deposit_base( + #[doc = " The members in the collective by index. All indices in the range `0..MemberCount` will"] + #[doc = " return `Some`, however a member's index is not guaranteed to remain unchanged over time."] + pub fn index_to_id_iter( &self, - ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< - ::core::primitive::u128, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::index_to_id::IndexToId, + (), + (), + ::subxt::ext::subxt_core::utils::Yes, > { - ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "Recovery", - "ConfigDepositBase", + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "TechCollective", + "IndexToId", + (), [ - 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, + 110u8, 48u8, 214u8, 224u8, 56u8, 195u8, 186u8, 24u8, 111u8, 37u8, 15u8, + 153u8, 245u8, 101u8, 229u8, 149u8, 216u8, 185u8, 7u8, 242u8, 196u8, + 29u8, 205u8, 243u8, 162u8, 92u8, 71u8, 253u8, 102u8, 152u8, 137u8, + 70u8, ], ) } - #[doc = " The amount of currency needed per additional user when creating a recovery"] - #[doc = " configuration."] - #[doc = ""] - #[doc = " This is held for adding `sizeof(AccountId)` bytes more into a pre-existing storage"] - #[doc = " value."] - pub fn friend_deposit_factor( + #[doc = " The members in the collective by index. All indices in the range `0..MemberCount` will"] + #[doc = " return `Some`, however a member's index is not guaranteed to remain unchanged over time."] + pub fn index_to_id_iter1( &self, - ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< - ::core::primitive::u128, + _0: types::index_to_id::Param0, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + ::subxt::ext::subxt_core::storage::address::StaticStorageKey< + types::index_to_id::Param0, + >, + types::index_to_id::IndexToId, + (), + (), + ::subxt::ext::subxt_core::utils::Yes, > { - ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "Recovery", - "FriendDepositFactor", + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "TechCollective", + "IndexToId", + ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), [ - 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, + 110u8, 48u8, 214u8, 224u8, 56u8, 195u8, 186u8, 24u8, 111u8, 37u8, 15u8, + 153u8, 245u8, 101u8, 229u8, 149u8, 216u8, 185u8, 7u8, 242u8, 196u8, + 29u8, 205u8, 243u8, 162u8, 92u8, 71u8, 253u8, 102u8, 152u8, 137u8, + 70u8, ], ) } - #[doc = " The maximum amount of friends allowed in a recovery configuration."] - #[doc = ""] - #[doc = " NOTE: The threshold programmed in this Pallet uses u16, so it does"] - #[doc = " not really make sense to have a limit here greater than u16::MAX."] - #[doc = " But also, that is a lot more than you should probably set this value"] - #[doc = " to anyway..."] - pub fn max_friends( + #[doc = " The members in the collective by index. All indices in the range `0..MemberCount` will"] + #[doc = " return `Some`, however a member's index is not guaranteed to remain unchanged over time."] + pub fn index_to_id( &self, - ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< - ::core::primitive::u32, + _0: types::index_to_id::Param0, + _1: types::index_to_id::Param1, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + ( + ::subxt::ext::subxt_core::storage::address::StaticStorageKey< + types::index_to_id::Param0, + >, + ::subxt::ext::subxt_core::storage::address::StaticStorageKey< + types::index_to_id::Param1, + >, + ), + types::index_to_id::IndexToId, + ::subxt::ext::subxt_core::utils::Yes, + (), + (), > { - ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "Recovery", - "MaxFriends", + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "TechCollective", + "IndexToId", + ( + ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), + ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_1), + ), [ - 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, + 110u8, 48u8, 214u8, 224u8, 56u8, 195u8, 186u8, 24u8, 111u8, 37u8, 15u8, + 153u8, 245u8, 101u8, 229u8, 149u8, 216u8, 185u8, 7u8, 242u8, 196u8, + 29u8, 205u8, 243u8, 162u8, 92u8, 71u8, 253u8, 102u8, 152u8, 137u8, + 70u8, ], ) } - #[doc = " The base amount of currency needed to reserve for starting a recovery."] - #[doc = ""] - #[doc = " This is primarily held for deterring malicious recovery attempts, and should"] - #[doc = " have a value large enough that a bad actor would choose not to place this"] - #[doc = " deposit. It also acts to fund additional storage item whose value size is"] - #[doc = " `sizeof(BlockNumber, Balance + T * AccountId)` bytes. Where T is a configurable"] - #[doc = " threshold."] - pub fn recovery_deposit( + #[doc = " Votes on a given proposal, if it is ongoing."] + pub fn voting_iter( &self, - ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< - ::core::primitive::u128, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::voting::Voting, + (), + (), + ::subxt::ext::subxt_core::utils::Yes, > { - ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "Recovery", - "RecoveryDeposit", + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "TechCollective", + "Voting", + (), [ - 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, + 180u8, 146u8, 236u8, 178u8, 30u8, 50u8, 161u8, 50u8, 140u8, 110u8, + 220u8, 1u8, 109u8, 209u8, 17u8, 94u8, 234u8, 223u8, 222u8, 177u8, + 243u8, 194u8, 246u8, 48u8, 178u8, 86u8, 30u8, 185u8, 56u8, 206u8, + 175u8, 18u8, ], ) } - } - } - } - pub mod assets { - use super::{root_mod, runtime_types}; - #[doc = "The `Error` enum of this pallet."] - pub type Error = runtime_types::pallet_assets::pallet::Error; - #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] - pub type Call = runtime_types::pallet_assets::pallet::Call; - pub mod calls { - use super::{root_mod, runtime_types}; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub mod types { - use super::runtime_types; - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Issue a new class of fungible assets from a public origin."] - #[doc = ""] - #[doc = "This new asset class has no assets initially and its owner is the origin."] - #[doc = ""] - #[doc = "The origin must conform to the configured `CreateOrigin` and have sufficient funds free."] - #[doc = ""] - #[doc = "Funds of sender are reserved by `AssetDeposit`."] - #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `id`: The identifier of the new asset. This must not be currently in use to identify"] - #[doc = "an existing asset. If [`NextAssetId`] is set, then this must be equal to it."] - #[doc = "- `admin`: The admin of this class of assets. The admin is the initial address of each"] - #[doc = "member of the asset class's admin team."] - #[doc = "- `min_balance`: The minimum balance of this new asset that any single account must"] - #[doc = "have. If an account's balance is reduced below this, then it collapses to zero."] - #[doc = ""] - #[doc = "Emits `Created` event when successful."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub struct Create { - #[codec(compact)] - pub id: create::Id, - pub admin: create::Admin, - pub min_balance: create::MinBalance, - } - pub mod create { - use super::runtime_types; - pub type Id = ::core::primitive::u32; - pub type Admin = ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >; - pub type MinBalance = ::core::primitive::u128; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for Create { - const PALLET: &'static str = "Assets"; - const CALL: &'static str = "create"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Issue a new class of fungible assets from a privileged origin."] - #[doc = ""] - #[doc = "This new asset class has no assets initially."] - #[doc = ""] - #[doc = "The origin must conform to `ForceOrigin`."] - #[doc = ""] - #[doc = "Unlike `create`, no funds are reserved."] - #[doc = ""] - #[doc = "- `id`: The identifier of the new asset. This must not be currently in use to identify"] - #[doc = "an existing asset. If [`NextAssetId`] is set, then this must be equal to it."] - #[doc = "- `owner`: The owner of this class of assets. The owner has full superuser permissions"] - #[doc = "over this asset, but may later change and configure the permissions using"] - #[doc = "`transfer_ownership` and `set_team`."] - #[doc = "- `min_balance`: The minimum balance of this new asset that any single account must"] - #[doc = "have. If an account's balance is reduced below this, then it collapses to zero."] - #[doc = ""] - #[doc = "Emits `ForceCreated` event when successful."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub struct ForceCreate { - #[codec(compact)] - pub id: force_create::Id, - pub owner: force_create::Owner, - pub is_sufficient: force_create::IsSufficient, - #[codec(compact)] - pub min_balance: force_create::MinBalance, + #[doc = " Votes on a given proposal, if it is ongoing."] + pub fn voting_iter1( + &self, + _0: types::voting::Param0, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + ::subxt::ext::subxt_core::storage::address::StaticStorageKey< + types::voting::Param0, + >, + types::voting::Voting, + (), + (), + ::subxt::ext::subxt_core::utils::Yes, + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "TechCollective", + "Voting", + ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), + [ + 180u8, 146u8, 236u8, 178u8, 30u8, 50u8, 161u8, 50u8, 140u8, 110u8, + 220u8, 1u8, 109u8, 209u8, 17u8, 94u8, 234u8, 223u8, 222u8, 177u8, + 243u8, 194u8, 246u8, 48u8, 178u8, 86u8, 30u8, 185u8, 56u8, 206u8, + 175u8, 18u8, + ], + ) } - pub mod force_create { - use super::runtime_types; - pub type Id = ::core::primitive::u32; - pub type Owner = ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, + #[doc = " Votes on a given proposal, if it is ongoing."] + pub fn voting( + &self, + _0: types::voting::Param0, + _1: types::voting::Param1, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + ( + ::subxt::ext::subxt_core::storage::address::StaticStorageKey< + types::voting::Param0, + >, + ::subxt::ext::subxt_core::storage::address::StaticStorageKey< + types::voting::Param1, + >, + ), + types::voting::Voting, + ::subxt::ext::subxt_core::utils::Yes, + (), + (), + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "TechCollective", + "Voting", + ( + ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), + ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_1), + ), + [ + 180u8, 146u8, 236u8, 178u8, 30u8, 50u8, 161u8, 50u8, 140u8, 110u8, + 220u8, 1u8, 109u8, 209u8, 17u8, 94u8, 234u8, 223u8, 222u8, 177u8, + 243u8, 194u8, 246u8, 48u8, 178u8, 86u8, 30u8, 185u8, 56u8, 206u8, + 175u8, 18u8, + ], + ) + } + pub fn voting_cleanup_iter( + &self, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::voting_cleanup::VotingCleanup, + (), + (), + ::subxt::ext::subxt_core::utils::Yes, + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "TechCollective", + "VotingCleanup", (), - >; - pub type IsSufficient = ::core::primitive::bool; - pub type MinBalance = ::core::primitive::u128; + [ + 223u8, 130u8, 79u8, 104u8, 94u8, 221u8, 222u8, 72u8, 187u8, 95u8, + 231u8, 59u8, 28u8, 119u8, 191u8, 63u8, 40u8, 186u8, 58u8, 254u8, 14u8, + 233u8, 152u8, 36u8, 2u8, 231u8, 120u8, 13u8, 120u8, 211u8, 232u8, 11u8, + ], + ) } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for ForceCreate { - const PALLET: &'static str = "Assets"; - const CALL: &'static str = "force_create"; + pub fn voting_cleanup( + &self, + _0: types::voting_cleanup::Param0, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + ::subxt::ext::subxt_core::storage::address::StaticStorageKey< + types::voting_cleanup::Param0, + >, + types::voting_cleanup::VotingCleanup, + ::subxt::ext::subxt_core::utils::Yes, + (), + (), + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "TechCollective", + "VotingCleanup", + ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), + [ + 223u8, 130u8, 79u8, 104u8, 94u8, 221u8, 222u8, 72u8, 187u8, 95u8, + 231u8, 59u8, 28u8, 119u8, 191u8, 63u8, 40u8, 186u8, 58u8, 254u8, 14u8, + 233u8, 152u8, 36u8, 2u8, 231u8, 120u8, 13u8, 120u8, 211u8, 232u8, 11u8, + ], + ) } + } + } + } + pub mod tech_referenda { + use super::{root_mod, runtime_types}; + #[doc = "The `Error` enum of this pallet."] + pub type Error = runtime_types::pallet_referenda::pallet::Error; + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub type Call = runtime_types::pallet_referenda::pallet::Call; + pub mod calls { + use super::{root_mod, runtime_types}; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod types { + use super::runtime_types; #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, @@ -15501,26 +13617,36 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Start the process of destroying a fungible asset class."] - #[doc = ""] - #[doc = "`start_destroy` is the first in a series of extrinsics that should be called, to allow"] - #[doc = "destruction of an asset class."] + #[doc = "Propose a referendum on a privileged action."] #[doc = ""] - #[doc = "The origin must conform to `ForceOrigin` or must be `Signed` by the asset's `owner`."] + #[doc = "- `origin`: must be `SubmitOrigin` and the account must have `SubmissionDeposit` funds"] + #[doc = " available."] + #[doc = "- `proposal_origin`: The origin from which the proposal should be executed."] + #[doc = "- `proposal`: The proposal."] + #[doc = "- `enactment_moment`: The moment that the proposal should be enacted."] #[doc = ""] - #[doc = "- `id`: The identifier of the asset to be destroyed. This must identify an existing"] - #[doc = " asset."] - pub struct StartDestroy { - #[codec(compact)] - pub id: start_destroy::Id, + #[doc = "Emits `Submitted`."] + pub struct Submit { + pub proposal_origin: + ::subxt::ext::subxt_core::alloc::boxed::Box, + pub proposal: submit::Proposal, + pub enactment_moment: submit::EnactmentMoment, } - pub mod start_destroy { + pub mod submit { use super::runtime_types; - pub type Id = ::core::primitive::u32; + pub type ProposalOrigin = runtime_types::quantus_runtime::OriginCaller; + pub type Proposal = runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::quantus_runtime::RuntimeCall, + runtime_types::poseidon_resonance::PoseidonHasher, + >; + pub type EnactmentMoment = + runtime_types::frame_support::traits::schedule::DispatchTime< + ::core::primitive::u32, + >; } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for StartDestroy { - const PALLET: &'static str = "Assets"; - const CALL: &'static str = "start_destroy"; + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for Submit { + const PALLET: &'static str = "TechReferenda"; + const CALL: &'static str = "submit"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -15533,29 +13659,24 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Destroy all accounts associated with a given asset."] - #[doc = ""] - #[doc = "`destroy_accounts` should only be called after `start_destroy` has been called, and the"] - #[doc = "asset is in a `Destroying` state."] - #[doc = ""] - #[doc = "Due to weight restrictions, this function may need to be called multiple times to fully"] - #[doc = "destroy all accounts. It will destroy `RemoveItemsLimit` accounts at a time."] + #[doc = "Post the Decision Deposit for a referendum."] #[doc = ""] - #[doc = "- `id`: The identifier of the asset to be destroyed. This must identify an existing"] - #[doc = " asset."] + #[doc = "- `origin`: must be `Signed` and the account must have funds available for the"] + #[doc = " referendum's track's Decision Deposit."] + #[doc = "- `index`: The index of the submitted referendum whose Decision Deposit is yet to be"] + #[doc = " posted."] #[doc = ""] - #[doc = "Each call emits the `Event::DestroyedAccounts` event."] - pub struct DestroyAccounts { - #[codec(compact)] - pub id: destroy_accounts::Id, + #[doc = "Emits `DecisionDepositPlaced`."] + pub struct PlaceDecisionDeposit { + pub index: place_decision_deposit::Index, } - pub mod destroy_accounts { + pub mod place_decision_deposit { use super::runtime_types; - pub type Id = ::core::primitive::u32; + pub type Index = ::core::primitive::u32; } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for DestroyAccounts { - const PALLET: &'static str = "Assets"; - const CALL: &'static str = "destroy_accounts"; + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for PlaceDecisionDeposit { + const PALLET: &'static str = "TechReferenda"; + const CALL: &'static str = "place_decision_deposit"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -15568,29 +13689,23 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Destroy all approvals associated with a given asset up to the max (T::RemoveItemsLimit)."] - #[doc = ""] - #[doc = "`destroy_approvals` should only be called after `start_destroy` has been called, and the"] - #[doc = "asset is in a `Destroying` state."] - #[doc = ""] - #[doc = "Due to weight restrictions, this function may need to be called multiple times to fully"] - #[doc = "destroy all approvals. It will destroy `RemoveItemsLimit` approvals at a time."] + #[doc = "Refund the Decision Deposit for a closed referendum back to the depositor."] #[doc = ""] - #[doc = "- `id`: The identifier of the asset to be destroyed. This must identify an existing"] - #[doc = " asset."] + #[doc = "- `origin`: must be `Signed` or `Root`."] + #[doc = "- `index`: The index of a closed referendum whose Decision Deposit has not yet been"] + #[doc = " refunded."] #[doc = ""] - #[doc = "Each call emits the `Event::DestroyedApprovals` event."] - pub struct DestroyApprovals { - #[codec(compact)] - pub id: destroy_approvals::Id, + #[doc = "Emits `DecisionDepositRefunded`."] + pub struct RefundDecisionDeposit { + pub index: refund_decision_deposit::Index, } - pub mod destroy_approvals { + pub mod refund_decision_deposit { use super::runtime_types; - pub type Id = ::core::primitive::u32; + pub type Index = ::core::primitive::u32; } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for DestroyApprovals { - const PALLET: &'static str = "Assets"; - const CALL: &'static str = "destroy_approvals"; + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for RefundDecisionDeposit { + const PALLET: &'static str = "TechReferenda"; + const CALL: &'static str = "refund_decision_deposit"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -15603,27 +13718,22 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Complete destroying asset and unreserve currency."] - #[doc = ""] - #[doc = "`finish_destroy` should only be called after `start_destroy` has been called, and the"] - #[doc = "asset is in a `Destroying` state. All accounts or approvals should be destroyed before"] - #[doc = "hand."] + #[doc = "Cancel an ongoing referendum."] #[doc = ""] - #[doc = "- `id`: The identifier of the asset to be destroyed. This must identify an existing"] - #[doc = " asset."] + #[doc = "- `origin`: must be the `CancelOrigin`."] + #[doc = "- `index`: The index of the referendum to be cancelled."] #[doc = ""] - #[doc = "Each successful call emits the `Event::Destroyed` event."] - pub struct FinishDestroy { - #[codec(compact)] - pub id: finish_destroy::Id, + #[doc = "Emits `Cancelled`."] + pub struct Cancel { + pub index: cancel::Index, } - pub mod finish_destroy { + pub mod cancel { use super::runtime_types; - pub type Id = ::core::primitive::u32; + pub type Index = ::core::primitive::u32; } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for FinishDestroy { - const PALLET: &'static str = "Assets"; - const CALL: &'static str = "finish_destroy"; + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for Cancel { + const PALLET: &'static str = "TechReferenda"; + const CALL: &'static str = "cancel"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -15636,37 +13746,22 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Mint assets of a particular class."] - #[doc = ""] - #[doc = "The origin must be Signed and the sender must be the Issuer of the asset `id`."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to have some amount minted."] - #[doc = "- `beneficiary`: The account to be credited with the minted assets."] - #[doc = "- `amount`: The amount of the asset to be minted."] + #[doc = "Cancel an ongoing referendum and slash the deposits."] #[doc = ""] - #[doc = "Emits `Issued` event when successful."] + #[doc = "- `origin`: must be the `KillOrigin`."] + #[doc = "- `index`: The index of the referendum to be cancelled."] #[doc = ""] - #[doc = "Weight: `O(1)`"] - #[doc = "Modes: Pre-existing balance of `beneficiary`; Account pre-existence of `beneficiary`."] - pub struct Mint { - #[codec(compact)] - pub id: mint::Id, - pub beneficiary: mint::Beneficiary, - #[codec(compact)] - pub amount: mint::Amount, + #[doc = "Emits `Killed` and `DepositSlashed`."] + pub struct Kill { + pub index: kill::Index, } - pub mod mint { + pub mod kill { use super::runtime_types; - pub type Id = ::core::primitive::u32; - pub type Beneficiary = ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >; - pub type Amount = ::core::primitive::u128; + pub type Index = ::core::primitive::u32; } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for Mint { - const PALLET: &'static str = "Assets"; - const CALL: &'static str = "mint"; + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for Kill { + const PALLET: &'static str = "TechReferenda"; + const CALL: &'static str = "kill"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -15679,40 +13774,20 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Reduce the balance of `who` by as much as possible up to `amount` assets of `id`."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Manager of the asset `id`."] - #[doc = ""] - #[doc = "Bails with `NoAccount` if the `who` is already dead."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to have some amount burned."] - #[doc = "- `who`: The account to be debited from."] - #[doc = "- `amount`: The maximum amount by which `who`'s balance should be reduced."] - #[doc = ""] - #[doc = "Emits `Burned` with the actual amount burned. If this takes the balance to below the"] - #[doc = "minimum for the asset, then the amount burned is increased to take it to zero."] + #[doc = "Advance a referendum onto its next logical state. Only used internally."] #[doc = ""] - #[doc = "Weight: `O(1)`"] - #[doc = "Modes: Post-existence of `who`; Pre & post Zombie-status of `who`."] - pub struct Burn { - #[codec(compact)] - pub id: burn::Id, - pub who: burn::Who, - #[codec(compact)] - pub amount: burn::Amount, + #[doc = "- `origin`: must be `Root`."] + #[doc = "- `index`: the referendum to be advanced."] + pub struct NudgeReferendum { + pub index: nudge_referendum::Index, } - pub mod burn { + pub mod nudge_referendum { use super::runtime_types; - pub type Id = ::core::primitive::u32; - pub type Who = ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >; - pub type Amount = ::core::primitive::u128; + pub type Index = ::core::primitive::u32; } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for Burn { - const PALLET: &'static str = "Assets"; - const CALL: &'static str = "burn"; + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for NudgeReferendum { + const PALLET: &'static str = "TechReferenda"; + const CALL: &'static str = "nudge_referendum"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -15725,43 +13800,25 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Move some assets from the sender account to another."] - #[doc = ""] - #[doc = "Origin must be Signed."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to have some amount transferred."] - #[doc = "- `target`: The account to be credited."] - #[doc = "- `amount`: The amount by which the sender's balance of assets should be reduced and"] - #[doc = "`target`'s balance increased. The amount actually transferred may be slightly greater in"] - #[doc = "the case that the transfer would otherwise take the sender balance above zero but below"] - #[doc = "the minimum balance. Must be greater than zero."] + #[doc = "Advance a track onto its next logical state. Only used internally."] #[doc = ""] - #[doc = "Emits `Transferred` with the actual amount transferred. If this takes the source balance"] - #[doc = "to below the minimum for the asset, then the amount transferred is increased to take it"] - #[doc = "to zero."] + #[doc = "- `origin`: must be `Root`."] + #[doc = "- `track`: the track to be advanced."] #[doc = ""] - #[doc = "Weight: `O(1)`"] - #[doc = "Modes: Pre-existence of `target`; Post-existence of sender; Account pre-existence of"] - #[doc = "`target`."] - pub struct Transfer { - #[codec(compact)] - pub id: transfer::Id, - pub target: transfer::Target, - #[codec(compact)] - pub amount: transfer::Amount, + #[doc = "Action item for when there is now one fewer referendum in the deciding phase and the"] + #[doc = "`DecidingCount` is not yet updated. This means that we should either:"] + #[doc = "- begin deciding another referendum (and leave `DecidingCount` alone); or"] + #[doc = "- decrement `DecidingCount`."] + pub struct OneFewerDeciding { + pub track: one_fewer_deciding::Track, } - pub mod transfer { + pub mod one_fewer_deciding { use super::runtime_types; - pub type Id = ::core::primitive::u32; - pub type Target = ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >; - pub type Amount = ::core::primitive::u128; + pub type Track = ::core::primitive::u16; } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for Transfer { - const PALLET: &'static str = "Assets"; - const CALL: &'static str = "transfer"; + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for OneFewerDeciding { + const PALLET: &'static str = "TechReferenda"; + const CALL: &'static str = "one_fewer_deciding"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -15774,43 +13831,23 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Move some assets from the sender account to another, keeping the sender account alive."] - #[doc = ""] - #[doc = "Origin must be Signed."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to have some amount transferred."] - #[doc = "- `target`: The account to be credited."] - #[doc = "- `amount`: The amount by which the sender's balance of assets should be reduced and"] - #[doc = "`target`'s balance increased. The amount actually transferred may be slightly greater in"] - #[doc = "the case that the transfer would otherwise take the sender balance above zero but below"] - #[doc = "the minimum balance. Must be greater than zero."] + #[doc = "Refund the Submission Deposit for a closed referendum back to the depositor."] #[doc = ""] - #[doc = "Emits `Transferred` with the actual amount transferred. If this takes the source balance"] - #[doc = "to below the minimum for the asset, then the amount transferred is increased to take it"] - #[doc = "to zero."] + #[doc = "- `origin`: must be `Signed` or `Root`."] + #[doc = "- `index`: The index of a closed referendum whose Submission Deposit has not yet been"] + #[doc = " refunded."] #[doc = ""] - #[doc = "Weight: `O(1)`"] - #[doc = "Modes: Pre-existence of `target`; Post-existence of sender; Account pre-existence of"] - #[doc = "`target`."] - pub struct TransferKeepAlive { - #[codec(compact)] - pub id: transfer_keep_alive::Id, - pub target: transfer_keep_alive::Target, - #[codec(compact)] - pub amount: transfer_keep_alive::Amount, + #[doc = "Emits `SubmissionDepositRefunded`."] + pub struct RefundSubmissionDeposit { + pub index: refund_submission_deposit::Index, } - pub mod transfer_keep_alive { + pub mod refund_submission_deposit { use super::runtime_types; - pub type Id = ::core::primitive::u32; - pub type Target = ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >; - pub type Amount = ::core::primitive::u128; + pub type Index = ::core::primitive::u32; } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for TransferKeepAlive { - const PALLET: &'static str = "Assets"; - const CALL: &'static str = "transfer_keep_alive"; + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for RefundSubmissionDeposit { + const PALLET: &'static str = "TechReferenda"; + const CALL: &'static str = "refund_submission_deposit"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -15823,4571 +13860,3916 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Move some assets from one account to another."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Admin of the asset `id`."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to have some amount transferred."] - #[doc = "- `source`: The account to be debited."] - #[doc = "- `dest`: The account to be credited."] - #[doc = "- `amount`: The amount by which the `source`'s balance of assets should be reduced and"] - #[doc = "`dest`'s balance increased. The amount actually transferred may be slightly greater in"] - #[doc = "the case that the transfer would otherwise take the `source` balance above zero but"] - #[doc = "below the minimum balance. Must be greater than zero."] - #[doc = ""] - #[doc = "Emits `Transferred` with the actual amount transferred. If this takes the source balance"] - #[doc = "to below the minimum for the asset, then the amount transferred is increased to take it"] - #[doc = "to zero."] + #[doc = "Set or clear metadata of a referendum."] #[doc = ""] - #[doc = "Weight: `O(1)`"] - #[doc = "Modes: Pre-existence of `dest`; Post-existence of `source`; Account pre-existence of"] - #[doc = "`dest`."] - pub struct ForceTransfer { - #[codec(compact)] - pub id: force_transfer::Id, - pub source: force_transfer::Source, - pub dest: force_transfer::Dest, - #[codec(compact)] - pub amount: force_transfer::Amount, + #[doc = "Parameters:"] + #[doc = "- `origin`: Must be `Signed` by a creator of a referendum or by anyone to clear a"] + #[doc = " metadata of a finished referendum."] + #[doc = "- `index`: The index of a referendum to set or clear metadata for."] + #[doc = "- `maybe_hash`: The hash of an on-chain stored preimage. `None` to clear a metadata."] + pub struct SetMetadata { + pub index: set_metadata::Index, + pub maybe_hash: set_metadata::MaybeHash, } - pub mod force_transfer { + pub mod set_metadata { use super::runtime_types; - pub type Id = ::core::primitive::u32; - pub type Source = ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >; - pub type Dest = ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >; - pub type Amount = ::core::primitive::u128; + pub type Index = ::core::primitive::u32; + pub type MaybeHash = + ::core::option::Option<::subxt::ext::subxt_core::utils::H256>; } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for ForceTransfer { - const PALLET: &'static str = "Assets"; - const CALL: &'static str = "force_transfer"; + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for SetMetadata { + const PALLET: &'static str = "TechReferenda"; + const CALL: &'static str = "set_metadata"; } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Disallow further unprivileged transfers of an asset `id` from an account `who`. `who`"] - #[doc = "must already exist as an entry in `Account`s of the asset. If you want to freeze an"] - #[doc = "account that does not have an entry, use `touch_other` first."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Freezer of the asset `id`."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to be frozen."] - #[doc = "- `who`: The account to be frozen."] + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Propose a referendum on a privileged action."] #[doc = ""] - #[doc = "Emits `Frozen`."] + #[doc = "- `origin`: must be `SubmitOrigin` and the account must have `SubmissionDeposit` funds"] + #[doc = " available."] + #[doc = "- `proposal_origin`: The origin from which the proposal should be executed."] + #[doc = "- `proposal`: The proposal."] + #[doc = "- `enactment_moment`: The moment that the proposal should be enacted."] #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub struct Freeze { - #[codec(compact)] - pub id: freeze::Id, - pub who: freeze::Who, - } - pub mod freeze { - use super::runtime_types; - pub type Id = ::core::primitive::u32; - pub type Who = ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for Freeze { - const PALLET: &'static str = "Assets"; - const CALL: &'static str = "freeze"; + #[doc = "Emits `Submitted`."] + pub fn submit( + &self, + proposal_origin: types::submit::ProposalOrigin, + proposal: types::submit::Proposal, + enactment_moment: types::submit::EnactmentMoment, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "TechReferenda", + "submit", + types::Submit { + proposal_origin: ::subxt::ext::subxt_core::alloc::boxed::Box::new( + proposal_origin, + ), + proposal, + enactment_moment, + }, + [ + 30u8, 232u8, 132u8, 0u8, 199u8, 166u8, 49u8, 94u8, 238u8, 61u8, 236u8, + 207u8, 2u8, 136u8, 37u8, 81u8, 67u8, 133u8, 2u8, 147u8, 177u8, 176u8, + 178u8, 113u8, 155u8, 180u8, 104u8, 176u8, 215u8, 255u8, 240u8, 100u8, + ], + ) } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Allow unprivileged transfers to and from an account again."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Admin of the asset `id`."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to be frozen."] - #[doc = "- `who`: The account to be unfrozen."] + #[doc = "Post the Decision Deposit for a referendum."] #[doc = ""] - #[doc = "Emits `Thawed`."] + #[doc = "- `origin`: must be `Signed` and the account must have funds available for the"] + #[doc = " referendum's track's Decision Deposit."] + #[doc = "- `index`: The index of the submitted referendum whose Decision Deposit is yet to be"] + #[doc = " posted."] #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub struct Thaw { - #[codec(compact)] - pub id: thaw::Id, - pub who: thaw::Who, - } - pub mod thaw { - use super::runtime_types; - pub type Id = ::core::primitive::u32; - pub type Who = ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for Thaw { - const PALLET: &'static str = "Assets"; - const CALL: &'static str = "thaw"; + #[doc = "Emits `DecisionDepositPlaced`."] + pub fn place_decision_deposit( + &self, + index: types::place_decision_deposit::Index, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload + { + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "TechReferenda", + "place_decision_deposit", + types::PlaceDecisionDeposit { index }, + [ + 247u8, 158u8, 55u8, 191u8, 188u8, 200u8, 3u8, 47u8, 20u8, 175u8, 86u8, + 203u8, 52u8, 253u8, 91u8, 131u8, 21u8, 213u8, 56u8, 68u8, 40u8, 84u8, + 184u8, 30u8, 9u8, 193u8, 63u8, 182u8, 178u8, 241u8, 247u8, 220u8, + ], + ) } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Disallow further unprivileged transfers for the asset class."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Freezer of the asset `id`."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to be frozen."] + #[doc = "Refund the Decision Deposit for a closed referendum back to the depositor."] #[doc = ""] - #[doc = "Emits `Frozen`."] + #[doc = "- `origin`: must be `Signed` or `Root`."] + #[doc = "- `index`: The index of a closed referendum whose Decision Deposit has not yet been"] + #[doc = " refunded."] #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub struct FreezeAsset { - #[codec(compact)] - pub id: freeze_asset::Id, - } - pub mod freeze_asset { - use super::runtime_types; - pub type Id = ::core::primitive::u32; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for FreezeAsset { - const PALLET: &'static str = "Assets"; - const CALL: &'static str = "freeze_asset"; + #[doc = "Emits `DecisionDepositRefunded`."] + pub fn refund_decision_deposit( + &self, + index: types::refund_decision_deposit::Index, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload< + types::RefundDecisionDeposit, + > { + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "TechReferenda", + "refund_decision_deposit", + types::RefundDecisionDeposit { index }, + [ + 159u8, 19u8, 35u8, 216u8, 114u8, 105u8, 18u8, 42u8, 148u8, 151u8, + 136u8, 92u8, 117u8, 30u8, 29u8, 41u8, 238u8, 58u8, 195u8, 91u8, 115u8, + 135u8, 96u8, 99u8, 154u8, 233u8, 8u8, 249u8, 145u8, 165u8, 77u8, 164u8, + ], + ) } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Allow unprivileged transfers for the asset again."] + #[doc = "Cancel an ongoing referendum."] #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Admin of the asset `id`."] + #[doc = "- `origin`: must be the `CancelOrigin`."] + #[doc = "- `index`: The index of the referendum to be cancelled."] #[doc = ""] - #[doc = "- `id`: The identifier of the asset to be thawed."] + #[doc = "Emits `Cancelled`."] + pub fn cancel( + &self, + index: types::cancel::Index, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "TechReferenda", + "cancel", + types::Cancel { index }, + [ + 55u8, 206u8, 119u8, 156u8, 238u8, 165u8, 193u8, 73u8, 242u8, 13u8, + 212u8, 75u8, 136u8, 156u8, 151u8, 14u8, 35u8, 41u8, 156u8, 107u8, 60u8, + 190u8, 39u8, 216u8, 8u8, 74u8, 213u8, 130u8, 160u8, 131u8, 237u8, + 122u8, + ], + ) + } + #[doc = "Cancel an ongoing referendum and slash the deposits."] #[doc = ""] - #[doc = "Emits `Thawed`."] + #[doc = "- `origin`: must be the `KillOrigin`."] + #[doc = "- `index`: The index of the referendum to be cancelled."] #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub struct ThawAsset { - #[codec(compact)] - pub id: thaw_asset::Id, - } - pub mod thaw_asset { - use super::runtime_types; - pub type Id = ::core::primitive::u32; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for ThawAsset { - const PALLET: &'static str = "Assets"; - const CALL: &'static str = "thaw_asset"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Change the Owner of an asset."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Owner of the asset `id`."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset."] - #[doc = "- `owner`: The new Owner of this asset."] - #[doc = ""] - #[doc = "Emits `OwnerChanged`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub struct TransferOwnership { - #[codec(compact)] - pub id: transfer_ownership::Id, - pub owner: transfer_ownership::Owner, - } - pub mod transfer_ownership { - use super::runtime_types; - pub type Id = ::core::primitive::u32; - pub type Owner = ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for TransferOwnership { - const PALLET: &'static str = "Assets"; - const CALL: &'static str = "transfer_ownership"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Change the Issuer, Admin and Freezer of an asset."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Owner of the asset `id`."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to be frozen."] - #[doc = "- `issuer`: The new Issuer of this asset."] - #[doc = "- `admin`: The new Admin of this asset."] - #[doc = "- `freezer`: The new Freezer of this asset."] - #[doc = ""] - #[doc = "Emits `TeamChanged`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub struct SetTeam { - #[codec(compact)] - pub id: set_team::Id, - pub issuer: set_team::Issuer, - pub admin: set_team::Admin, - pub freezer: set_team::Freezer, - } - pub mod set_team { - use super::runtime_types; - pub type Id = ::core::primitive::u32; - pub type Issuer = ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >; - pub type Admin = ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >; - pub type Freezer = ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for SetTeam { - const PALLET: &'static str = "Assets"; - const CALL: &'static str = "set_team"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Set the metadata for an asset."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Owner of the asset `id`."] - #[doc = ""] - #[doc = "Funds of sender are reserved according to the formula:"] - #[doc = "`MetadataDepositBase + MetadataDepositPerByte * (name.len + symbol.len)` taking into"] - #[doc = "account any already reserved funds."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to update."] - #[doc = "- `name`: The user friendly name of this asset. Limited in length by `StringLimit`."] - #[doc = "- `symbol`: The exchange symbol for this asset. Limited in length by `StringLimit`."] - #[doc = "- `decimals`: The number of decimals this asset uses to represent one unit."] - #[doc = ""] - #[doc = "Emits `MetadataSet`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub struct SetMetadata { - #[codec(compact)] - pub id: set_metadata::Id, - pub name: set_metadata::Name, - pub symbol: set_metadata::Symbol, - pub decimals: set_metadata::Decimals, - } - pub mod set_metadata { - use super::runtime_types; - pub type Id = ::core::primitive::u32; - pub type Name = - ::subxt::ext::subxt_core::alloc::vec::Vec<::core::primitive::u8>; - pub type Symbol = - ::subxt::ext::subxt_core::alloc::vec::Vec<::core::primitive::u8>; - pub type Decimals = ::core::primitive::u8; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for SetMetadata { - const PALLET: &'static str = "Assets"; - const CALL: &'static str = "set_metadata"; + #[doc = "Emits `Killed` and `DepositSlashed`."] + pub fn kill( + &self, + index: types::kill::Index, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "TechReferenda", + "kill", + types::Kill { index }, + [ + 50u8, 89u8, 57u8, 0u8, 87u8, 129u8, 113u8, 140u8, 179u8, 178u8, 126u8, + 198u8, 92u8, 92u8, 189u8, 64u8, 123u8, 232u8, 57u8, 227u8, 223u8, + 219u8, 73u8, 217u8, 179u8, 44u8, 210u8, 125u8, 180u8, 10u8, 143u8, + 48u8, + ], + ) } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Clear the metadata for an asset."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Owner of the asset `id`."] - #[doc = ""] - #[doc = "Any deposit is freed for the asset owner."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to clear."] - #[doc = ""] - #[doc = "Emits `MetadataCleared`."] + #[doc = "Advance a referendum onto its next logical state. Only used internally."] #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub struct ClearMetadata { - #[codec(compact)] - pub id: clear_metadata::Id, - } - pub mod clear_metadata { - use super::runtime_types; - pub type Id = ::core::primitive::u32; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for ClearMetadata { - const PALLET: &'static str = "Assets"; - const CALL: &'static str = "clear_metadata"; + #[doc = "- `origin`: must be `Root`."] + #[doc = "- `index`: the referendum to be advanced."] + pub fn nudge_referendum( + &self, + index: types::nudge_referendum::Index, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload + { + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "TechReferenda", + "nudge_referendum", + types::NudgeReferendum { index }, + [ + 75u8, 99u8, 172u8, 30u8, 170u8, 150u8, 211u8, 229u8, 249u8, 128u8, + 194u8, 246u8, 100u8, 142u8, 193u8, 184u8, 232u8, 81u8, 29u8, 17u8, + 99u8, 91u8, 236u8, 85u8, 230u8, 226u8, 57u8, 115u8, 45u8, 170u8, 54u8, + 213u8, + ], + ) } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Force the metadata for an asset to some value."] - #[doc = ""] - #[doc = "Origin must be ForceOrigin."] - #[doc = ""] - #[doc = "Any deposit is left alone."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to update."] - #[doc = "- `name`: The user friendly name of this asset. Limited in length by `StringLimit`."] - #[doc = "- `symbol`: The exchange symbol for this asset. Limited in length by `StringLimit`."] - #[doc = "- `decimals`: The number of decimals this asset uses to represent one unit."] + #[doc = "Advance a track onto its next logical state. Only used internally."] #[doc = ""] - #[doc = "Emits `MetadataSet`."] + #[doc = "- `origin`: must be `Root`."] + #[doc = "- `track`: the track to be advanced."] #[doc = ""] - #[doc = "Weight: `O(N + S)` where N and S are the length of the name and symbol respectively."] - pub struct ForceSetMetadata { - #[codec(compact)] - pub id: force_set_metadata::Id, - pub name: force_set_metadata::Name, - pub symbol: force_set_metadata::Symbol, - pub decimals: force_set_metadata::Decimals, - pub is_frozen: force_set_metadata::IsFrozen, - } - pub mod force_set_metadata { - use super::runtime_types; - pub type Id = ::core::primitive::u32; - pub type Name = - ::subxt::ext::subxt_core::alloc::vec::Vec<::core::primitive::u8>; - pub type Symbol = - ::subxt::ext::subxt_core::alloc::vec::Vec<::core::primitive::u8>; - pub type Decimals = ::core::primitive::u8; - pub type IsFrozen = ::core::primitive::bool; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for ForceSetMetadata { - const PALLET: &'static str = "Assets"; - const CALL: &'static str = "force_set_metadata"; + #[doc = "Action item for when there is now one fewer referendum in the deciding phase and the"] + #[doc = "`DecidingCount` is not yet updated. This means that we should either:"] + #[doc = "- begin deciding another referendum (and leave `DecidingCount` alone); or"] + #[doc = "- decrement `DecidingCount`."] + pub fn one_fewer_deciding( + &self, + track: types::one_fewer_deciding::Track, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload + { + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "TechReferenda", + "one_fewer_deciding", + types::OneFewerDeciding { track }, + [ + 15u8, 84u8, 79u8, 231u8, 21u8, 239u8, 244u8, 143u8, 183u8, 215u8, + 181u8, 25u8, 225u8, 195u8, 95u8, 171u8, 17u8, 156u8, 182u8, 128u8, + 111u8, 40u8, 151u8, 102u8, 196u8, 55u8, 36u8, 212u8, 89u8, 190u8, + 131u8, 167u8, + ], + ) } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Clear the metadata for an asset."] - #[doc = ""] - #[doc = "Origin must be ForceOrigin."] - #[doc = ""] - #[doc = "Any deposit is returned."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to clear."] + #[doc = "Refund the Submission Deposit for a closed referendum back to the depositor."] #[doc = ""] - #[doc = "Emits `MetadataCleared`."] + #[doc = "- `origin`: must be `Signed` or `Root`."] + #[doc = "- `index`: The index of a closed referendum whose Submission Deposit has not yet been"] + #[doc = " refunded."] #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub struct ForceClearMetadata { - #[codec(compact)] - pub id: force_clear_metadata::Id, - } - pub mod force_clear_metadata { - use super::runtime_types; - pub type Id = ::core::primitive::u32; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for ForceClearMetadata { - const PALLET: &'static str = "Assets"; - const CALL: &'static str = "force_clear_metadata"; + #[doc = "Emits `SubmissionDepositRefunded`."] + pub fn refund_submission_deposit( + &self, + index: types::refund_submission_deposit::Index, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload< + types::RefundSubmissionDeposit, + > { + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "TechReferenda", + "refund_submission_deposit", + types::RefundSubmissionDeposit { index }, + [ + 20u8, 217u8, 115u8, 6u8, 1u8, 60u8, 54u8, 136u8, 35u8, 41u8, 38u8, + 23u8, 85u8, 100u8, 141u8, 126u8, 30u8, 160u8, 61u8, 46u8, 134u8, 98u8, + 82u8, 38u8, 211u8, 124u8, 208u8, 222u8, 210u8, 10u8, 155u8, 122u8, + ], + ) } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Alter the attributes of a given asset."] - #[doc = ""] - #[doc = "Origin must be `ForceOrigin`."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset."] - #[doc = "- `owner`: The new Owner of this asset."] - #[doc = "- `issuer`: The new Issuer of this asset."] - #[doc = "- `admin`: The new Admin of this asset."] - #[doc = "- `freezer`: The new Freezer of this asset."] - #[doc = "- `min_balance`: The minimum balance of this new asset that any single account must"] - #[doc = "have. If an account's balance is reduced below this, then it collapses to zero."] - #[doc = "- `is_sufficient`: Whether a non-zero balance of this asset is deposit of sufficient"] - #[doc = "value to account for the state bloat associated with its balance storage. If set to"] - #[doc = "`true`, then non-zero balances may be stored without a `consumer` reference (and thus"] - #[doc = "an ED in the Balances pallet or whatever else is used to control user-account state"] - #[doc = "growth)."] - #[doc = "- `is_frozen`: Whether this asset class is frozen except for permissioned/admin"] - #[doc = "instructions."] - #[doc = ""] - #[doc = "Emits `AssetStatusChanged` with the identity of the asset."] + #[doc = "Set or clear metadata of a referendum."] #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub struct ForceAssetStatus { - #[codec(compact)] - pub id: force_asset_status::Id, - pub owner: force_asset_status::Owner, - pub issuer: force_asset_status::Issuer, - pub admin: force_asset_status::Admin, - pub freezer: force_asset_status::Freezer, - #[codec(compact)] - pub min_balance: force_asset_status::MinBalance, - pub is_sufficient: force_asset_status::IsSufficient, - pub is_frozen: force_asset_status::IsFrozen, + #[doc = "Parameters:"] + #[doc = "- `origin`: Must be `Signed` by a creator of a referendum or by anyone to clear a"] + #[doc = " metadata of a finished referendum."] + #[doc = "- `index`: The index of a referendum to set or clear metadata for."] + #[doc = "- `maybe_hash`: The hash of an on-chain stored preimage. `None` to clear a metadata."] + pub fn set_metadata( + &self, + index: types::set_metadata::Index, + maybe_hash: types::set_metadata::MaybeHash, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "TechReferenda", + "set_metadata", + types::SetMetadata { index, maybe_hash }, + [ + 207u8, 29u8, 146u8, 233u8, 219u8, 205u8, 88u8, 118u8, 106u8, 61u8, + 124u8, 101u8, 2u8, 41u8, 169u8, 70u8, 114u8, 189u8, 162u8, 118u8, 1u8, + 108u8, 234u8, 98u8, 245u8, 245u8, 183u8, 126u8, 89u8, 13u8, 112u8, + 88u8, + ], + ) } - pub mod force_asset_status { - use super::runtime_types; - pub type Id = ::core::primitive::u32; - pub type Owner = ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >; - pub type Issuer = ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >; - pub type Admin = ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >; - pub type Freezer = ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >; - pub type MinBalance = ::core::primitive::u128; - pub type IsSufficient = ::core::primitive::bool; - pub type IsFrozen = ::core::primitive::bool; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for ForceAssetStatus { - const PALLET: &'static str = "Assets"; - const CALL: &'static str = "force_asset_status"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Approve an amount of asset for transfer by a delegated third-party account."] - #[doc = ""] - #[doc = "Origin must be Signed."] - #[doc = ""] - #[doc = "Ensures that `ApprovalDeposit` worth of `Currency` is reserved from signing account"] - #[doc = "for the purpose of holding the approval. If some non-zero amount of assets is already"] - #[doc = "approved from signing account to `delegate`, then it is topped up or unreserved to"] - #[doc = "meet the right value."] - #[doc = ""] - #[doc = "NOTE: The signing account does not need to own `amount` of assets at the point of"] - #[doc = "making this call."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset."] - #[doc = "- `delegate`: The account to delegate permission to transfer asset."] - #[doc = "- `amount`: The amount of asset that may be transferred by `delegate`. If there is"] - #[doc = "already an approval in place, then this acts additively."] - #[doc = ""] - #[doc = "Emits `ApprovedTransfer` on success."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub struct ApproveTransfer { - #[codec(compact)] - pub id: approve_transfer::Id, - pub delegate: approve_transfer::Delegate, - #[codec(compact)] - pub amount: approve_transfer::Amount, - } - pub mod approve_transfer { - use super::runtime_types; - pub type Id = ::core::primitive::u32; - pub type Delegate = ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >; - pub type Amount = ::core::primitive::u128; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for ApproveTransfer { - const PALLET: &'static str = "Assets"; - const CALL: &'static str = "approve_transfer"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Cancel all of some asset approved for delegated transfer by a third-party account."] - #[doc = ""] - #[doc = "Origin must be Signed and there must be an approval in place between signer and"] - #[doc = "`delegate`."] - #[doc = ""] - #[doc = "Unreserves any deposit previously reserved by `approve_transfer` for the approval."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset."] - #[doc = "- `delegate`: The account delegated permission to transfer asset."] - #[doc = ""] - #[doc = "Emits `ApprovalCancelled` on success."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub struct CancelApproval { - #[codec(compact)] - pub id: cancel_approval::Id, - pub delegate: cancel_approval::Delegate, - } - pub mod cancel_approval { - use super::runtime_types; - pub type Id = ::core::primitive::u32; - pub type Delegate = ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for CancelApproval { - const PALLET: &'static str = "Assets"; - const CALL: &'static str = "cancel_approval"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Cancel all of some asset approved for delegated transfer by a third-party account."] - #[doc = ""] - #[doc = "Origin must be either ForceOrigin or Signed origin with the signer being the Admin"] - #[doc = "account of the asset `id`."] - #[doc = ""] - #[doc = "Unreserves any deposit previously reserved by `approve_transfer` for the approval."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset."] - #[doc = "- `delegate`: The account delegated permission to transfer asset."] - #[doc = ""] - #[doc = "Emits `ApprovalCancelled` on success."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub struct ForceCancelApproval { - #[codec(compact)] - pub id: force_cancel_approval::Id, - pub owner: force_cancel_approval::Owner, - pub delegate: force_cancel_approval::Delegate, - } - pub mod force_cancel_approval { - use super::runtime_types; - pub type Id = ::core::primitive::u32; - pub type Owner = ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >; - pub type Delegate = ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for ForceCancelApproval { - const PALLET: &'static str = "Assets"; - const CALL: &'static str = "force_cancel_approval"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Transfer some asset balance from a previously delegated account to some third-party"] - #[doc = "account."] - #[doc = ""] - #[doc = "Origin must be Signed and there must be an approval in place by the `owner` to the"] - #[doc = "signer."] - #[doc = ""] - #[doc = "If the entire amount approved for transfer is transferred, then any deposit previously"] - #[doc = "reserved by `approve_transfer` is unreserved."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset."] - #[doc = "- `owner`: The account which previously approved for a transfer of at least `amount` and"] - #[doc = "from which the asset balance will be withdrawn."] - #[doc = "- `destination`: The account to which the asset balance of `amount` will be transferred."] - #[doc = "- `amount`: The amount of assets to transfer."] - #[doc = ""] - #[doc = "Emits `TransferredApproved` on success."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub struct TransferApproved { - #[codec(compact)] - pub id: transfer_approved::Id, - pub owner: transfer_approved::Owner, - pub destination: transfer_approved::Destination, - #[codec(compact)] - pub amount: transfer_approved::Amount, - } - pub mod transfer_approved { - use super::runtime_types; - pub type Id = ::core::primitive::u32; - pub type Owner = ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >; - pub type Destination = ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >; - pub type Amount = ::core::primitive::u128; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for TransferApproved { - const PALLET: &'static str = "Assets"; - const CALL: &'static str = "transfer_approved"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Create an asset account for non-provider assets."] - #[doc = ""] - #[doc = "A deposit will be taken from the signer account."] - #[doc = ""] - #[doc = "- `origin`: Must be Signed; the signer account must have sufficient funds for a deposit"] - #[doc = " to be taken."] - #[doc = "- `id`: The identifier of the asset for the account to be created."] - #[doc = ""] - #[doc = "Emits `Touched` event when successful."] - pub struct Touch { - #[codec(compact)] - pub id: touch::Id, - } - pub mod touch { - use super::runtime_types; - pub type Id = ::core::primitive::u32; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for Touch { - const PALLET: &'static str = "Assets"; - const CALL: &'static str = "touch"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Return the deposit (if any) of an asset account or a consumer reference (if any) of an"] - #[doc = "account."] - #[doc = ""] - #[doc = "The origin must be Signed."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset for which the caller would like the deposit"] - #[doc = " refunded."] - #[doc = "- `allow_burn`: If `true` then assets may be destroyed in order to complete the refund."] - #[doc = ""] - #[doc = "Emits `Refunded` event when successful."] - pub struct Refund { - #[codec(compact)] - pub id: refund::Id, - pub allow_burn: refund::AllowBurn, - } - pub mod refund { - use super::runtime_types; - pub type Id = ::core::primitive::u32; - pub type AllowBurn = ::core::primitive::bool; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for Refund { - const PALLET: &'static str = "Assets"; - const CALL: &'static str = "refund"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Sets the minimum balance of an asset."] - #[doc = ""] - #[doc = "Only works if there aren't any accounts that are holding the asset or if"] - #[doc = "the new value of `min_balance` is less than the old one."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender has to be the Owner of the"] - #[doc = "asset `id`."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset."] - #[doc = "- `min_balance`: The new value of `min_balance`."] - #[doc = ""] - #[doc = "Emits `AssetMinBalanceChanged` event when successful."] - pub struct SetMinBalance { - #[codec(compact)] - pub id: set_min_balance::Id, - pub min_balance: set_min_balance::MinBalance, - } - pub mod set_min_balance { - use super::runtime_types; - pub type Id = ::core::primitive::u32; - pub type MinBalance = ::core::primitive::u128; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for SetMinBalance { - const PALLET: &'static str = "Assets"; - const CALL: &'static str = "set_min_balance"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Create an asset account for `who`."] - #[doc = ""] - #[doc = "A deposit will be taken from the signer account."] - #[doc = ""] - #[doc = "- `origin`: Must be Signed by `Freezer` or `Admin` of the asset `id`; the signer account"] - #[doc = " must have sufficient funds for a deposit to be taken."] - #[doc = "- `id`: The identifier of the asset for the account to be created."] - #[doc = "- `who`: The account to be created."] - #[doc = ""] - #[doc = "Emits `Touched` event when successful."] - pub struct TouchOther { - #[codec(compact)] - pub id: touch_other::Id, - pub who: touch_other::Who, - } - pub mod touch_other { - use super::runtime_types; - pub type Id = ::core::primitive::u32; - pub type Who = ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for TouchOther { - const PALLET: &'static str = "Assets"; - const CALL: &'static str = "touch_other"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Return the deposit (if any) of a target asset account. Useful if you are the depositor."] - #[doc = ""] - #[doc = "The origin must be Signed and either the account owner, depositor, or asset `Admin`. In"] - #[doc = "order to burn a non-zero balance of the asset, the caller must be the account and should"] - #[doc = "use `refund`."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset for the account holding a deposit."] - #[doc = "- `who`: The account to refund."] - #[doc = ""] - #[doc = "Emits `Refunded` event when successful."] - pub struct RefundOther { - #[codec(compact)] - pub id: refund_other::Id, - pub who: refund_other::Who, - } - pub mod refund_other { - use super::runtime_types; - pub type Id = ::core::primitive::u32; - pub type Who = ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for RefundOther { - const PALLET: &'static str = "Assets"; - const CALL: &'static str = "refund_other"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Disallow further unprivileged transfers of an asset `id` to and from an account `who`."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Freezer of the asset `id`."] - #[doc = ""] - #[doc = "- `id`: The identifier of the account's asset."] - #[doc = "- `who`: The account to be unblocked."] - #[doc = ""] - #[doc = "Emits `Blocked`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub struct Block { - #[codec(compact)] - pub id: block::Id, - pub who: block::Who, - } - pub mod block { - use super::runtime_types; - pub type Id = ::core::primitive::u32; - pub type Who = ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for Block { - const PALLET: &'static str = "Assets"; - const CALL: &'static str = "block"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Transfer the entire transferable balance from the caller asset account."] - #[doc = ""] - #[doc = "NOTE: This function only attempts to transfer _transferable_ balances. This means that"] - #[doc = "any held, frozen, or minimum balance (when `keep_alive` is `true`), will not be"] - #[doc = "transferred by this function. To ensure that this function results in a killed account,"] - #[doc = "you might need to prepare the account by removing any reference counters, storage"] - #[doc = "deposits, etc..."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be Signed."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset for the account holding a deposit."] - #[doc = "- `dest`: The recipient of the transfer."] - #[doc = "- `keep_alive`: A boolean to determine if the `transfer_all` operation should send all"] - #[doc = " of the funds the asset account has, causing the sender asset account to be killed"] - #[doc = " (false), or transfer everything except at least the minimum balance, which will"] - #[doc = " guarantee to keep the sender asset account alive (true)."] - pub struct TransferAll { - #[codec(compact)] - pub id: transfer_all::Id, - pub dest: transfer_all::Dest, - pub keep_alive: transfer_all::KeepAlive, - } - pub mod transfer_all { - use super::runtime_types; - pub type Id = ::core::primitive::u32; - pub type Dest = ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >; - pub type KeepAlive = ::core::primitive::bool; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for TransferAll { - const PALLET: &'static str = "Assets"; - const CALL: &'static str = "transfer_all"; - } - } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Issue a new class of fungible assets from a public origin."] - #[doc = ""] - #[doc = "This new asset class has no assets initially and its owner is the origin."] - #[doc = ""] - #[doc = "The origin must conform to the configured `CreateOrigin` and have sufficient funds free."] - #[doc = ""] - #[doc = "Funds of sender are reserved by `AssetDeposit`."] - #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `id`: The identifier of the new asset. This must not be currently in use to identify"] - #[doc = "an existing asset. If [`NextAssetId`] is set, then this must be equal to it."] - #[doc = "- `admin`: The admin of this class of assets. The admin is the initial address of each"] - #[doc = "member of the asset class's admin team."] - #[doc = "- `min_balance`: The minimum balance of this new asset that any single account must"] - #[doc = "have. If an account's balance is reduced below this, then it collapses to zero."] - #[doc = ""] - #[doc = "Emits `Created` event when successful."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn create( - &self, - id: types::create::Id, - admin: types::create::Admin, - min_balance: types::create::MinBalance, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Assets", - "create", - types::Create { id, admin, min_balance }, - [ - 120u8, 25u8, 99u8, 39u8, 102u8, 201u8, 14u8, 2u8, 32u8, 139u8, 206u8, - 218u8, 223u8, 161u8, 25u8, 98u8, 159u8, 133u8, 65u8, 105u8, 45u8, 4u8, - 28u8, 49u8, 248u8, 147u8, 2u8, 179u8, 11u8, 195u8, 177u8, 250u8, - ], - ) - } - #[doc = "Issue a new class of fungible assets from a privileged origin."] - #[doc = ""] - #[doc = "This new asset class has no assets initially."] - #[doc = ""] - #[doc = "The origin must conform to `ForceOrigin`."] - #[doc = ""] - #[doc = "Unlike `create`, no funds are reserved."] - #[doc = ""] - #[doc = "- `id`: The identifier of the new asset. This must not be currently in use to identify"] - #[doc = "an existing asset. If [`NextAssetId`] is set, then this must be equal to it."] - #[doc = "- `owner`: The owner of this class of assets. The owner has full superuser permissions"] - #[doc = "over this asset, but may later change and configure the permissions using"] - #[doc = "`transfer_ownership` and `set_team`."] - #[doc = "- `min_balance`: The minimum balance of this new asset that any single account must"] - #[doc = "have. If an account's balance is reduced below this, then it collapses to zero."] - #[doc = ""] - #[doc = "Emits `ForceCreated` event when successful."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn force_create( - &self, - id: types::force_create::Id, - owner: types::force_create::Owner, - is_sufficient: types::force_create::IsSufficient, - min_balance: types::force_create::MinBalance, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Assets", - "force_create", - types::ForceCreate { id, owner, is_sufficient, min_balance }, - [ - 149u8, 41u8, 54u8, 146u8, 18u8, 248u8, 84u8, 52u8, 202u8, 88u8, 192u8, - 208u8, 247u8, 227u8, 254u8, 98u8, 92u8, 46u8, 164u8, 152u8, 143u8, - 20u8, 179u8, 227u8, 197u8, 247u8, 242u8, 153u8, 142u8, 148u8, 40u8, - 184u8, - ], - ) - } - #[doc = "Start the process of destroying a fungible asset class."] - #[doc = ""] - #[doc = "`start_destroy` is the first in a series of extrinsics that should be called, to allow"] - #[doc = "destruction of an asset class."] - #[doc = ""] - #[doc = "The origin must conform to `ForceOrigin` or must be `Signed` by the asset's `owner`."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to be destroyed. This must identify an existing"] - #[doc = " asset."] - pub fn start_destroy( - &self, - id: types::start_destroy::Id, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Assets", - "start_destroy", - types::StartDestroy { id }, - [ - 125u8, 82u8, 151u8, 106u8, 25u8, 49u8, 68u8, 203u8, 247u8, 175u8, - 117u8, 230u8, 84u8, 98u8, 172u8, 73u8, 233u8, 218u8, 212u8, 198u8, - 69u8, 35u8, 15u8, 179u8, 161u8, 205u8, 190u8, 109u8, 198u8, 214u8, - 65u8, 164u8, - ], - ) - } - #[doc = "Destroy all accounts associated with a given asset."] - #[doc = ""] - #[doc = "`destroy_accounts` should only be called after `start_destroy` has been called, and the"] - #[doc = "asset is in a `Destroying` state."] - #[doc = ""] - #[doc = "Due to weight restrictions, this function may need to be called multiple times to fully"] - #[doc = "destroy all accounts. It will destroy `RemoveItemsLimit` accounts at a time."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to be destroyed. This must identify an existing"] - #[doc = " asset."] - #[doc = ""] - #[doc = "Each call emits the `Event::DestroyedAccounts` event."] - pub fn destroy_accounts( - &self, - id: types::destroy_accounts::Id, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload - { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Assets", - "destroy_accounts", - types::DestroyAccounts { id }, - [ - 236u8, 102u8, 233u8, 170u8, 179u8, 46u8, 42u8, 29u8, 200u8, 116u8, - 62u8, 114u8, 233u8, 59u8, 217u8, 215u8, 109u8, 232u8, 147u8, 95u8, - 255u8, 248u8, 119u8, 222u8, 216u8, 165u8, 138u8, 47u8, 28u8, 56u8, - 204u8, 93u8, - ], - ) - } - #[doc = "Destroy all approvals associated with a given asset up to the max (T::RemoveItemsLimit)."] - #[doc = ""] - #[doc = "`destroy_approvals` should only be called after `start_destroy` has been called, and the"] - #[doc = "asset is in a `Destroying` state."] - #[doc = ""] - #[doc = "Due to weight restrictions, this function may need to be called multiple times to fully"] - #[doc = "destroy all approvals. It will destroy `RemoveItemsLimit` approvals at a time."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to be destroyed. This must identify an existing"] - #[doc = " asset."] - #[doc = ""] - #[doc = "Each call emits the `Event::DestroyedApprovals` event."] - pub fn destroy_approvals( - &self, - id: types::destroy_approvals::Id, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload - { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Assets", - "destroy_approvals", - types::DestroyApprovals { id }, - [ - 34u8, 35u8, 15u8, 44u8, 239u8, 232u8, 88u8, 130u8, 130u8, 87u8, 171u8, - 255u8, 247u8, 179u8, 14u8, 35u8, 47u8, 223u8, 32u8, 232u8, 41u8, 105u8, - 207u8, 199u8, 90u8, 136u8, 144u8, 139u8, 252u8, 76u8, 177u8, 106u8, - ], - ) - } - #[doc = "Complete destroying asset and unreserve currency."] - #[doc = ""] - #[doc = "`finish_destroy` should only be called after `start_destroy` has been called, and the"] - #[doc = "asset is in a `Destroying` state. All accounts or approvals should be destroyed before"] - #[doc = "hand."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to be destroyed. This must identify an existing"] - #[doc = " asset."] - #[doc = ""] - #[doc = "Each successful call emits the `Event::Destroyed` event."] - pub fn finish_destroy( - &self, - id: types::finish_destroy::Id, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload - { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Assets", - "finish_destroy", - types::FinishDestroy { id }, - [ - 132u8, 67u8, 78u8, 84u8, 240u8, 51u8, 176u8, 119u8, 48u8, 34u8, 153u8, - 37u8, 25u8, 171u8, 21u8, 164u8, 53u8, 214u8, 36u8, 149u8, 20u8, 240u8, - 123u8, 195u8, 170u8, 162u8, 118u8, 81u8, 176u8, 218u8, 114u8, 113u8, - ], - ) - } - #[doc = "Mint assets of a particular class."] - #[doc = ""] - #[doc = "The origin must be Signed and the sender must be the Issuer of the asset `id`."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to have some amount minted."] - #[doc = "- `beneficiary`: The account to be credited with the minted assets."] - #[doc = "- `amount`: The amount of the asset to be minted."] - #[doc = ""] - #[doc = "Emits `Issued` event when successful."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - #[doc = "Modes: Pre-existing balance of `beneficiary`; Account pre-existence of `beneficiary`."] - pub fn mint( - &self, - id: types::mint::Id, - beneficiary: types::mint::Beneficiary, - amount: types::mint::Amount, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Assets", - "mint", - types::Mint { id, beneficiary, amount }, - [ - 172u8, 131u8, 103u8, 81u8, 206u8, 2u8, 143u8, 114u8, 137u8, 60u8, - 147u8, 67u8, 226u8, 64u8, 71u8, 11u8, 36u8, 145u8, 51u8, 8u8, 0u8, - 110u8, 8u8, 195u8, 103u8, 205u8, 156u8, 43u8, 215u8, 12u8, 150u8, - 135u8, - ], - ) - } - #[doc = "Reduce the balance of `who` by as much as possible up to `amount` assets of `id`."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Manager of the asset `id`."] - #[doc = ""] - #[doc = "Bails with `NoAccount` if the `who` is already dead."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to have some amount burned."] - #[doc = "- `who`: The account to be debited from."] - #[doc = "- `amount`: The maximum amount by which `who`'s balance should be reduced."] - #[doc = ""] - #[doc = "Emits `Burned` with the actual amount burned. If this takes the balance to below the"] - #[doc = "minimum for the asset, then the amount burned is increased to take it to zero."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - #[doc = "Modes: Post-existence of `who`; Pre & post Zombie-status of `who`."] - pub fn burn( - &self, - id: types::burn::Id, - who: types::burn::Who, - amount: types::burn::Amount, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Assets", - "burn", - types::Burn { id, who, amount }, - [ - 105u8, 133u8, 82u8, 100u8, 124u8, 65u8, 174u8, 31u8, 152u8, 45u8, 23u8, - 200u8, 23u8, 199u8, 239u8, 8u8, 187u8, 142u8, 21u8, 192u8, 35u8, 211u8, - 172u8, 130u8, 169u8, 74u8, 167u8, 36u8, 149u8, 7u8, 19u8, 37u8, - ], - ) - } - #[doc = "Move some assets from the sender account to another."] - #[doc = ""] - #[doc = "Origin must be Signed."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to have some amount transferred."] - #[doc = "- `target`: The account to be credited."] - #[doc = "- `amount`: The amount by which the sender's balance of assets should be reduced and"] - #[doc = "`target`'s balance increased. The amount actually transferred may be slightly greater in"] - #[doc = "the case that the transfer would otherwise take the sender balance above zero but below"] - #[doc = "the minimum balance. Must be greater than zero."] - #[doc = ""] - #[doc = "Emits `Transferred` with the actual amount transferred. If this takes the source balance"] - #[doc = "to below the minimum for the asset, then the amount transferred is increased to take it"] - #[doc = "to zero."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - #[doc = "Modes: Pre-existence of `target`; Post-existence of sender; Account pre-existence of"] - #[doc = "`target`."] - pub fn transfer( - &self, - id: types::transfer::Id, - target: types::transfer::Target, - amount: types::transfer::Amount, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Assets", - "transfer", - types::Transfer { id, target, amount }, - [ - 126u8, 31u8, 70u8, 179u8, 222u8, 190u8, 12u8, 19u8, 94u8, 225u8, 217u8, - 109u8, 54u8, 69u8, 124u8, 61u8, 97u8, 199u8, 193u8, 166u8, 39u8, 143u8, - 125u8, 251u8, 87u8, 173u8, 149u8, 91u8, 182u8, 18u8, 184u8, 65u8, - ], - ) - } - #[doc = "Move some assets from the sender account to another, keeping the sender account alive."] - #[doc = ""] - #[doc = "Origin must be Signed."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to have some amount transferred."] - #[doc = "- `target`: The account to be credited."] - #[doc = "- `amount`: The amount by which the sender's balance of assets should be reduced and"] - #[doc = "`target`'s balance increased. The amount actually transferred may be slightly greater in"] - #[doc = "the case that the transfer would otherwise take the sender balance above zero but below"] - #[doc = "the minimum balance. Must be greater than zero."] - #[doc = ""] - #[doc = "Emits `Transferred` with the actual amount transferred. If this takes the source balance"] - #[doc = "to below the minimum for the asset, then the amount transferred is increased to take it"] - #[doc = "to zero."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - #[doc = "Modes: Pre-existence of `target`; Post-existence of sender; Account pre-existence of"] - #[doc = "`target`."] - pub fn transfer_keep_alive( - &self, - id: types::transfer_keep_alive::Id, - target: types::transfer_keep_alive::Target, - amount: types::transfer_keep_alive::Amount, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload - { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Assets", - "transfer_keep_alive", - types::TransferKeepAlive { id, target, amount }, - [ - 99u8, 101u8, 219u8, 188u8, 238u8, 230u8, 141u8, 43u8, 38u8, 175u8, - 46u8, 89u8, 33u8, 23u8, 223u8, 115u8, 108u8, 18u8, 190u8, 213u8, 157u8, - 12u8, 139u8, 97u8, 7u8, 75u8, 196u8, 159u8, 122u8, 32u8, 164u8, 154u8, - ], - ) - } - #[doc = "Move some assets from one account to another."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Admin of the asset `id`."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to have some amount transferred."] - #[doc = "- `source`: The account to be debited."] - #[doc = "- `dest`: The account to be credited."] - #[doc = "- `amount`: The amount by which the `source`'s balance of assets should be reduced and"] - #[doc = "`dest`'s balance increased. The amount actually transferred may be slightly greater in"] - #[doc = "the case that the transfer would otherwise take the `source` balance above zero but"] - #[doc = "below the minimum balance. Must be greater than zero."] - #[doc = ""] - #[doc = "Emits `Transferred` with the actual amount transferred. If this takes the source balance"] - #[doc = "to below the minimum for the asset, then the amount transferred is increased to take it"] - #[doc = "to zero."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - #[doc = "Modes: Pre-existence of `dest`; Post-existence of `source`; Account pre-existence of"] - #[doc = "`dest`."] - pub fn force_transfer( - &self, - id: types::force_transfer::Id, - source: types::force_transfer::Source, - dest: types::force_transfer::Dest, - amount: types::force_transfer::Amount, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload - { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Assets", - "force_transfer", - types::ForceTransfer { id, source, dest, amount }, - [ - 10u8, 210u8, 8u8, 209u8, 8u8, 78u8, 40u8, 213u8, 235u8, 176u8, 144u8, - 145u8, 70u8, 13u8, 75u8, 72u8, 166u8, 137u8, 22u8, 191u8, 226u8, 244u8, - 92u8, 183u8, 129u8, 212u8, 158u8, 179u8, 169u8, 232u8, 177u8, 225u8, - ], - ) - } - #[doc = "Disallow further unprivileged transfers of an asset `id` from an account `who`. `who`"] - #[doc = "must already exist as an entry in `Account`s of the asset. If you want to freeze an"] - #[doc = "account that does not have an entry, use `touch_other` first."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Freezer of the asset `id`."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to be frozen."] - #[doc = "- `who`: The account to be frozen."] - #[doc = ""] - #[doc = "Emits `Frozen`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn freeze( - &self, - id: types::freeze::Id, - who: types::freeze::Who, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Assets", - "freeze", - types::Freeze { id, who }, - [ - 180u8, 124u8, 252u8, 66u8, 205u8, 23u8, 32u8, 217u8, 173u8, 10u8, 91u8, - 57u8, 44u8, 215u8, 234u8, 152u8, 115u8, 38u8, 141u8, 212u8, 57u8, - 217u8, 169u8, 61u8, 215u8, 130u8, 172u8, 58u8, 90u8, 193u8, 25u8, - 249u8, - ], - ) - } - #[doc = "Allow unprivileged transfers to and from an account again."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Admin of the asset `id`."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to be frozen."] - #[doc = "- `who`: The account to be unfrozen."] - #[doc = ""] - #[doc = "Emits `Thawed`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn thaw( - &self, - id: types::thaw::Id, - who: types::thaw::Who, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Assets", - "thaw", - types::Thaw { id, who }, - [ - 187u8, 130u8, 9u8, 152u8, 231u8, 9u8, 245u8, 162u8, 115u8, 19u8, 73u8, - 176u8, 16u8, 230u8, 30u8, 60u8, 180u8, 183u8, 154u8, 160u8, 72u8, - 219u8, 116u8, 57u8, 140u8, 6u8, 105u8, 38u8, 98u8, 90u8, 250u8, 135u8, - ], - ) - } - #[doc = "Disallow further unprivileged transfers for the asset class."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Freezer of the asset `id`."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to be frozen."] - #[doc = ""] - #[doc = "Emits `Frozen`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn freeze_asset( - &self, - id: types::freeze_asset::Id, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Assets", - "freeze_asset", - types::FreezeAsset { id }, - [ - 75u8, 237u8, 183u8, 112u8, 112u8, 123u8, 250u8, 203u8, 169u8, 51u8, - 218u8, 35u8, 159u8, 23u8, 21u8, 10u8, 167u8, 84u8, 161u8, 212u8, 124u8, - 236u8, 88u8, 175u8, 48u8, 195u8, 33u8, 145u8, 141u8, 156u8, 31u8, - 250u8, - ], - ) - } - #[doc = "Allow unprivileged transfers for the asset again."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Admin of the asset `id`."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to be thawed."] - #[doc = ""] - #[doc = "Emits `Thawed`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn thaw_asset( - &self, - id: types::thaw_asset::Id, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Assets", - "thaw_asset", - types::ThawAsset { id }, - [ - 151u8, 6u8, 170u8, 114u8, 55u8, 8u8, 5u8, 194u8, 251u8, 78u8, 232u8, - 181u8, 157u8, 62u8, 16u8, 39u8, 79u8, 119u8, 205u8, 198u8, 199u8, 26u8, - 92u8, 162u8, 169u8, 173u8, 93u8, 51u8, 7u8, 79u8, 198u8, 77u8, - ], - ) - } - #[doc = "Change the Owner of an asset."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Owner of the asset `id`."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset."] - #[doc = "- `owner`: The new Owner of this asset."] - #[doc = ""] - #[doc = "Emits `OwnerChanged`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn transfer_ownership( - &self, - id: types::transfer_ownership::Id, - owner: types::transfer_ownership::Owner, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload - { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Assets", - "transfer_ownership", - types::TransferOwnership { id, owner }, - [ - 65u8, 85u8, 40u8, 202u8, 212u8, 170u8, 130u8, 132u8, 140u8, 90u8, 68u8, - 28u8, 101u8, 154u8, 222u8, 150u8, 244u8, 165u8, 44u8, 22u8, 225u8, - 152u8, 7u8, 162u8, 110u8, 54u8, 173u8, 181u8, 54u8, 215u8, 105u8, - 239u8, - ], - ) - } - #[doc = "Change the Issuer, Admin and Freezer of an asset."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Owner of the asset `id`."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to be frozen."] - #[doc = "- `issuer`: The new Issuer of this asset."] - #[doc = "- `admin`: The new Admin of this asset."] - #[doc = "- `freezer`: The new Freezer of this asset."] - #[doc = ""] - #[doc = "Emits `TeamChanged`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn set_team( - &self, - id: types::set_team::Id, - issuer: types::set_team::Issuer, - admin: types::set_team::Admin, - freezer: types::set_team::Freezer, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Assets", - "set_team", - types::SetTeam { id, issuer, admin, freezer }, - [ - 52u8, 75u8, 50u8, 30u8, 164u8, 161u8, 121u8, 25u8, 135u8, 83u8, 115u8, - 25u8, 103u8, 1u8, 124u8, 206u8, 83u8, 182u8, 41u8, 116u8, 44u8, 37u8, - 75u8, 70u8, 252u8, 225u8, 240u8, 144u8, 96u8, 160u8, 151u8, 4u8, - ], - ) - } - #[doc = "Set the metadata for an asset."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Owner of the asset `id`."] - #[doc = ""] - #[doc = "Funds of sender are reserved according to the formula:"] - #[doc = "`MetadataDepositBase + MetadataDepositPerByte * (name.len + symbol.len)` taking into"] - #[doc = "account any already reserved funds."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to update."] - #[doc = "- `name`: The user friendly name of this asset. Limited in length by `StringLimit`."] - #[doc = "- `symbol`: The exchange symbol for this asset. Limited in length by `StringLimit`."] - #[doc = "- `decimals`: The number of decimals this asset uses to represent one unit."] - #[doc = ""] - #[doc = "Emits `MetadataSet`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn set_metadata( - &self, - id: types::set_metadata::Id, - name: types::set_metadata::Name, - symbol: types::set_metadata::Symbol, - decimals: types::set_metadata::Decimals, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Assets", - "set_metadata", - types::SetMetadata { id, name, symbol, decimals }, - [ - 215u8, 66u8, 15u8, 17u8, 88u8, 174u8, 77u8, 75u8, 229u8, 155u8, 160u8, - 34u8, 108u8, 194u8, 88u8, 238u8, 131u8, 97u8, 234u8, 102u8, 71u8, 56u8, - 70u8, 248u8, 211u8, 85u8, 72u8, 92u8, 71u8, 222u8, 190u8, 91u8, - ], - ) - } - #[doc = "Clear the metadata for an asset."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Owner of the asset `id`."] - #[doc = ""] - #[doc = "Any deposit is freed for the asset owner."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to clear."] - #[doc = ""] - #[doc = "Emits `MetadataCleared`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn clear_metadata( - &self, - id: types::clear_metadata::Id, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload - { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Assets", - "clear_metadata", - types::ClearMetadata { id }, - [ - 68u8, 172u8, 6u8, 158u8, 237u8, 254u8, 22u8, 4u8, 254u8, 157u8, 179u8, - 168u8, 105u8, 114u8, 56u8, 166u8, 213u8, 38u8, 188u8, 195u8, 99u8, - 43u8, 142u8, 220u8, 94u8, 248u8, 51u8, 226u8, 233u8, 114u8, 86u8, 93u8, - ], - ) - } - #[doc = "Force the metadata for an asset to some value."] - #[doc = ""] - #[doc = "Origin must be ForceOrigin."] - #[doc = ""] - #[doc = "Any deposit is left alone."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to update."] - #[doc = "- `name`: The user friendly name of this asset. Limited in length by `StringLimit`."] - #[doc = "- `symbol`: The exchange symbol for this asset. Limited in length by `StringLimit`."] - #[doc = "- `decimals`: The number of decimals this asset uses to represent one unit."] - #[doc = ""] - #[doc = "Emits `MetadataSet`."] - #[doc = ""] - #[doc = "Weight: `O(N + S)` where N and S are the length of the name and symbol respectively."] - pub fn force_set_metadata( - &self, - id: types::force_set_metadata::Id, - name: types::force_set_metadata::Name, - symbol: types::force_set_metadata::Symbol, - decimals: types::force_set_metadata::Decimals, - is_frozen: types::force_set_metadata::IsFrozen, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload - { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Assets", - "force_set_metadata", - types::ForceSetMetadata { id, name, symbol, decimals, is_frozen }, - [ - 76u8, 90u8, 182u8, 13u8, 133u8, 248u8, 94u8, 136u8, 169u8, 114u8, - 151u8, 20u8, 106u8, 89u8, 78u8, 228u8, 22u8, 29u8, 68u8, 8u8, 54u8, - 47u8, 1u8, 186u8, 45u8, 167u8, 14u8, 112u8, 34u8, 43u8, 91u8, 140u8, - ], - ) - } - #[doc = "Clear the metadata for an asset."] - #[doc = ""] - #[doc = "Origin must be ForceOrigin."] - #[doc = ""] - #[doc = "Any deposit is returned."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to clear."] - #[doc = ""] - #[doc = "Emits `MetadataCleared`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn force_clear_metadata( - &self, - id: types::force_clear_metadata::Id, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload - { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Assets", - "force_clear_metadata", - types::ForceClearMetadata { id }, - [ - 2u8, 224u8, 84u8, 48u8, 130u8, 132u8, 79u8, 38u8, 217u8, 17u8, 165u8, - 139u8, 89u8, 53u8, 116u8, 184u8, 32u8, 91u8, 122u8, 39u8, 85u8, 40u8, - 213u8, 216u8, 135u8, 171u8, 50u8, 69u8, 202u8, 28u8, 166u8, 147u8, - ], - ) - } - #[doc = "Alter the attributes of a given asset."] - #[doc = ""] - #[doc = "Origin must be `ForceOrigin`."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset."] - #[doc = "- `owner`: The new Owner of this asset."] - #[doc = "- `issuer`: The new Issuer of this asset."] - #[doc = "- `admin`: The new Admin of this asset."] - #[doc = "- `freezer`: The new Freezer of this asset."] - #[doc = "- `min_balance`: The minimum balance of this new asset that any single account must"] - #[doc = "have. If an account's balance is reduced below this, then it collapses to zero."] - #[doc = "- `is_sufficient`: Whether a non-zero balance of this asset is deposit of sufficient"] - #[doc = "value to account for the state bloat associated with its balance storage. If set to"] - #[doc = "`true`, then non-zero balances may be stored without a `consumer` reference (and thus"] - #[doc = "an ED in the Balances pallet or whatever else is used to control user-account state"] - #[doc = "growth)."] - #[doc = "- `is_frozen`: Whether this asset class is frozen except for permissioned/admin"] - #[doc = "instructions."] - #[doc = ""] - #[doc = "Emits `AssetStatusChanged` with the identity of the asset."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn force_asset_status( - &self, - id: types::force_asset_status::Id, - owner: types::force_asset_status::Owner, - issuer: types::force_asset_status::Issuer, - admin: types::force_asset_status::Admin, - freezer: types::force_asset_status::Freezer, - min_balance: types::force_asset_status::MinBalance, - is_sufficient: types::force_asset_status::IsSufficient, - is_frozen: types::force_asset_status::IsFrozen, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload - { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Assets", - "force_asset_status", - types::ForceAssetStatus { - id, - owner, - issuer, - admin, - freezer, - min_balance, - is_sufficient, - is_frozen, - }, - [ - 149u8, 136u8, 250u8, 33u8, 53u8, 220u8, 207u8, 187u8, 42u8, 118u8, - 93u8, 173u8, 100u8, 243u8, 234u8, 207u8, 88u8, 45u8, 79u8, 221u8, - 113u8, 166u8, 229u8, 171u8, 223u8, 126u8, 20u8, 67u8, 19u8, 77u8, 44u8, - 19u8, - ], - ) - } - #[doc = "Approve an amount of asset for transfer by a delegated third-party account."] - #[doc = ""] - #[doc = "Origin must be Signed."] - #[doc = ""] - #[doc = "Ensures that `ApprovalDeposit` worth of `Currency` is reserved from signing account"] - #[doc = "for the purpose of holding the approval. If some non-zero amount of assets is already"] - #[doc = "approved from signing account to `delegate`, then it is topped up or unreserved to"] - #[doc = "meet the right value."] - #[doc = ""] - #[doc = "NOTE: The signing account does not need to own `amount` of assets at the point of"] - #[doc = "making this call."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset."] - #[doc = "- `delegate`: The account to delegate permission to transfer asset."] - #[doc = "- `amount`: The amount of asset that may be transferred by `delegate`. If there is"] - #[doc = "already an approval in place, then this acts additively."] - #[doc = ""] - #[doc = "Emits `ApprovedTransfer` on success."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn approve_transfer( - &self, - id: types::approve_transfer::Id, - delegate: types::approve_transfer::Delegate, - amount: types::approve_transfer::Amount, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload - { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Assets", - "approve_transfer", - types::ApproveTransfer { id, delegate, amount }, - [ - 39u8, 227u8, 23u8, 143u8, 10u8, 120u8, 227u8, 1u8, 223u8, 78u8, 40u8, - 213u8, 249u8, 175u8, 170u8, 183u8, 10u8, 244u8, 117u8, 111u8, 140u8, - 157u8, 153u8, 212u8, 94u8, 119u8, 213u8, 44u8, 41u8, 8u8, 114u8, 200u8, - ], - ) - } - #[doc = "Cancel all of some asset approved for delegated transfer by a third-party account."] - #[doc = ""] - #[doc = "Origin must be Signed and there must be an approval in place between signer and"] - #[doc = "`delegate`."] - #[doc = ""] - #[doc = "Unreserves any deposit previously reserved by `approve_transfer` for the approval."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset."] - #[doc = "- `delegate`: The account delegated permission to transfer asset."] - #[doc = ""] - #[doc = "Emits `ApprovalCancelled` on success."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn cancel_approval( - &self, - id: types::cancel_approval::Id, - delegate: types::cancel_approval::Delegate, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload - { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Assets", - "cancel_approval", - types::CancelApproval { id, delegate }, - [ - 74u8, 117u8, 101u8, 78u8, 152u8, 208u8, 16u8, 102u8, 34u8, 195u8, 61u8, - 36u8, 85u8, 91u8, 253u8, 182u8, 61u8, 199u8, 12u8, 102u8, 149u8, 20u8, - 238u8, 207u8, 236u8, 50u8, 63u8, 249u8, 34u8, 85u8, 88u8, 229u8, - ], - ) - } - #[doc = "Cancel all of some asset approved for delegated transfer by a third-party account."] - #[doc = ""] - #[doc = "Origin must be either ForceOrigin or Signed origin with the signer being the Admin"] - #[doc = "account of the asset `id`."] - #[doc = ""] - #[doc = "Unreserves any deposit previously reserved by `approve_transfer` for the approval."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset."] - #[doc = "- `delegate`: The account delegated permission to transfer asset."] - #[doc = ""] - #[doc = "Emits `ApprovalCancelled` on success."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn force_cancel_approval( - &self, - id: types::force_cancel_approval::Id, - owner: types::force_cancel_approval::Owner, - delegate: types::force_cancel_approval::Delegate, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload - { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Assets", - "force_cancel_approval", - types::ForceCancelApproval { id, owner, delegate }, - [ - 27u8, 231u8, 85u8, 241u8, 18u8, 151u8, 64u8, 234u8, 11u8, 84u8, 252u8, - 128u8, 44u8, 247u8, 132u8, 82u8, 34u8, 210u8, 202u8, 50u8, 158u8, 45u8, - 239u8, 192u8, 7u8, 24u8, 39u8, 95u8, 57u8, 21u8, 178u8, 113u8, - ], - ) - } - #[doc = "Transfer some asset balance from a previously delegated account to some third-party"] - #[doc = "account."] - #[doc = ""] - #[doc = "Origin must be Signed and there must be an approval in place by the `owner` to the"] - #[doc = "signer."] - #[doc = ""] - #[doc = "If the entire amount approved for transfer is transferred, then any deposit previously"] - #[doc = "reserved by `approve_transfer` is unreserved."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset."] - #[doc = "- `owner`: The account which previously approved for a transfer of at least `amount` and"] - #[doc = "from which the asset balance will be withdrawn."] - #[doc = "- `destination`: The account to which the asset balance of `amount` will be transferred."] - #[doc = "- `amount`: The amount of assets to transfer."] - #[doc = ""] - #[doc = "Emits `TransferredApproved` on success."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn transfer_approved( - &self, - id: types::transfer_approved::Id, - owner: types::transfer_approved::Owner, - destination: types::transfer_approved::Destination, - amount: types::transfer_approved::Amount, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload - { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Assets", - "transfer_approved", - types::TransferApproved { id, owner, destination, amount }, - [ - 214u8, 51u8, 243u8, 129u8, 116u8, 233u8, 199u8, 183u8, 25u8, 5u8, - 109u8, 85u8, 255u8, 68u8, 36u8, 99u8, 99u8, 179u8, 34u8, 66u8, 65u8, - 82u8, 189u8, 174u8, 22u8, 100u8, 211u8, 13u8, 178u8, 19u8, 128u8, - 177u8, - ], - ) - } - #[doc = "Create an asset account for non-provider assets."] - #[doc = ""] - #[doc = "A deposit will be taken from the signer account."] - #[doc = ""] - #[doc = "- `origin`: Must be Signed; the signer account must have sufficient funds for a deposit"] - #[doc = " to be taken."] - #[doc = "- `id`: The identifier of the asset for the account to be created."] - #[doc = ""] - #[doc = "Emits `Touched` event when successful."] - pub fn touch( - &self, - id: types::touch::Id, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Assets", - "touch", - types::Touch { id }, - [ - 50u8, 185u8, 46u8, 134u8, 136u8, 31u8, 191u8, 34u8, 215u8, 150u8, 73u8, - 103u8, 140u8, 36u8, 95u8, 156u8, 201u8, 152u8, 32u8, 165u8, 47u8, 86u8, - 163u8, 255u8, 8u8, 251u8, 176u8, 138u8, 165u8, 48u8, 12u8, 27u8, - ], - ) - } - #[doc = "Return the deposit (if any) of an asset account or a consumer reference (if any) of an"] - #[doc = "account."] - #[doc = ""] - #[doc = "The origin must be Signed."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset for which the caller would like the deposit"] - #[doc = " refunded."] - #[doc = "- `allow_burn`: If `true` then assets may be destroyed in order to complete the refund."] - #[doc = ""] - #[doc = "Emits `Refunded` event when successful."] - pub fn refund( - &self, - id: types::refund::Id, - allow_burn: types::refund::AllowBurn, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Assets", - "refund", - types::Refund { id, allow_burn }, - [ - 218u8, 207u8, 8u8, 41u8, 154u8, 250u8, 117u8, 174u8, 143u8, 133u8, - 34u8, 113u8, 171u8, 18u8, 177u8, 227u8, 146u8, 92u8, 12u8, 226u8, - 101u8, 230u8, 246u8, 162u8, 32u8, 73u8, 138u8, 158u8, 95u8, 226u8, - 75u8, 95u8, - ], - ) - } - #[doc = "Sets the minimum balance of an asset."] - #[doc = ""] - #[doc = "Only works if there aren't any accounts that are holding the asset or if"] - #[doc = "the new value of `min_balance` is less than the old one."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender has to be the Owner of the"] - #[doc = "asset `id`."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset."] - #[doc = "- `min_balance`: The new value of `min_balance`."] - #[doc = ""] - #[doc = "Emits `AssetMinBalanceChanged` event when successful."] - pub fn set_min_balance( - &self, - id: types::set_min_balance::Id, - min_balance: types::set_min_balance::MinBalance, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload - { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Assets", - "set_min_balance", - types::SetMinBalance { id, min_balance }, - [ - 141u8, 241u8, 137u8, 50u8, 232u8, 122u8, 252u8, 104u8, 185u8, 170u8, - 246u8, 0u8, 20u8, 128u8, 136u8, 155u8, 62u8, 243u8, 4u8, 221u8, 42u8, - 225u8, 16u8, 245u8, 58u8, 127u8, 84u8, 193u8, 175u8, 165u8, 35u8, 49u8, - ], - ) - } - #[doc = "Create an asset account for `who`."] - #[doc = ""] - #[doc = "A deposit will be taken from the signer account."] - #[doc = ""] - #[doc = "- `origin`: Must be Signed by `Freezer` or `Admin` of the asset `id`; the signer account"] - #[doc = " must have sufficient funds for a deposit to be taken."] - #[doc = "- `id`: The identifier of the asset for the account to be created."] - #[doc = "- `who`: The account to be created."] - #[doc = ""] - #[doc = "Emits `Touched` event when successful."] - pub fn touch_other( - &self, - id: types::touch_other::Id, - who: types::touch_other::Who, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Assets", - "touch_other", - types::TouchOther { id, who }, - [ - 104u8, 85u8, 80u8, 68u8, 135u8, 149u8, 102u8, 104u8, 188u8, 79u8, 42u8, - 34u8, 241u8, 84u8, 183u8, 176u8, 215u8, 172u8, 78u8, 196u8, 206u8, - 214u8, 138u8, 240u8, 92u8, 65u8, 117u8, 170u8, 140u8, 120u8, 50u8, - 166u8, - ], - ) - } - #[doc = "Return the deposit (if any) of a target asset account. Useful if you are the depositor."] - #[doc = ""] - #[doc = "The origin must be Signed and either the account owner, depositor, or asset `Admin`. In"] - #[doc = "order to burn a non-zero balance of the asset, the caller must be the account and should"] - #[doc = "use `refund`."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset for the account holding a deposit."] - #[doc = "- `who`: The account to refund."] - #[doc = ""] - #[doc = "Emits `Refunded` event when successful."] - pub fn refund_other( - &self, - id: types::refund_other::Id, - who: types::refund_other::Who, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Assets", - "refund_other", - types::RefundOther { id, who }, - [ - 113u8, 58u8, 33u8, 109u8, 233u8, 229u8, 210u8, 40u8, 176u8, 252u8, - 131u8, 80u8, 33u8, 132u8, 19u8, 170u8, 145u8, 146u8, 246u8, 31u8, - 222u8, 120u8, 167u8, 187u8, 8u8, 144u8, 164u8, 251u8, 52u8, 249u8, - 91u8, 136u8, - ], - ) - } - #[doc = "Disallow further unprivileged transfers of an asset `id` to and from an account `who`."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Freezer of the asset `id`."] - #[doc = ""] - #[doc = "- `id`: The identifier of the account's asset."] - #[doc = "- `who`: The account to be unblocked."] - #[doc = ""] - #[doc = "Emits `Blocked`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn block( - &self, - id: types::block::Id, - who: types::block::Who, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Assets", - "block", - types::Block { id, who }, - [ - 224u8, 63u8, 26u8, 229u8, 23u8, 164u8, 212u8, 170u8, 156u8, 104u8, - 63u8, 158u8, 53u8, 162u8, 157u8, 127u8, 183u8, 94u8, 211u8, 123u8, - 228u8, 198u8, 47u8, 80u8, 53u8, 122u8, 46u8, 69u8, 67u8, 170u8, 193u8, - 33u8, - ], - ) - } - #[doc = "Transfer the entire transferable balance from the caller asset account."] - #[doc = ""] - #[doc = "NOTE: This function only attempts to transfer _transferable_ balances. This means that"] - #[doc = "any held, frozen, or minimum balance (when `keep_alive` is `true`), will not be"] - #[doc = "transferred by this function. To ensure that this function results in a killed account,"] - #[doc = "you might need to prepare the account by removing any reference counters, storage"] - #[doc = "deposits, etc..."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be Signed."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset for the account holding a deposit."] - #[doc = "- `dest`: The recipient of the transfer."] - #[doc = "- `keep_alive`: A boolean to determine if the `transfer_all` operation should send all"] - #[doc = " of the funds the asset account has, causing the sender asset account to be killed"] - #[doc = " (false), or transfer everything except at least the minimum balance, which will"] - #[doc = " guarantee to keep the sender asset account alive (true)."] - pub fn transfer_all( - &self, - id: types::transfer_all::Id, - dest: types::transfer_all::Dest, - keep_alive: types::transfer_all::KeepAlive, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Assets", - "transfer_all", - types::TransferAll { id, dest, keep_alive }, - [ - 180u8, 161u8, 252u8, 127u8, 200u8, 117u8, 245u8, 213u8, 170u8, 169u8, - 178u8, 115u8, 156u8, 8u8, 79u8, 50u8, 168u8, 229u8, 87u8, 33u8, 238u8, - 124u8, 13u8, 210u8, 81u8, 132u8, 236u8, 46u8, 101u8, 18u8, 22u8, 61u8, - ], - ) - } - } - } - #[doc = "The `Event` enum of this pallet"] - pub type Event = runtime_types::pallet_assets::pallet::Event; - pub mod events { - use super::runtime_types; - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "Some asset class was created."] - pub struct Created { - pub asset_id: created::AssetId, - pub creator: created::Creator, - pub owner: created::Owner, - } - pub mod created { - use super::runtime_types; - pub type AssetId = ::core::primitive::u32; - pub type Creator = ::subxt::ext::subxt_core::utils::AccountId32; - pub type Owner = ::subxt::ext::subxt_core::utils::AccountId32; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for Created { - const PALLET: &'static str = "Assets"; - const EVENT: &'static str = "Created"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "Some assets were issued."] - pub struct Issued { - pub asset_id: issued::AssetId, - pub owner: issued::Owner, - pub amount: issued::Amount, - } - pub mod issued { - use super::runtime_types; - pub type AssetId = ::core::primitive::u32; - pub type Owner = ::subxt::ext::subxt_core::utils::AccountId32; - pub type Amount = ::core::primitive::u128; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for Issued { - const PALLET: &'static str = "Assets"; - const EVENT: &'static str = "Issued"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "Some assets were transferred."] - pub struct Transferred { - pub asset_id: transferred::AssetId, - pub from: transferred::From, - pub to: transferred::To, - pub amount: transferred::Amount, - } - pub mod transferred { - use super::runtime_types; - pub type AssetId = ::core::primitive::u32; - pub type From = ::subxt::ext::subxt_core::utils::AccountId32; - pub type To = ::subxt::ext::subxt_core::utils::AccountId32; - pub type Amount = ::core::primitive::u128; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for Transferred { - const PALLET: &'static str = "Assets"; - const EVENT: &'static str = "Transferred"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "Some assets were destroyed."] - pub struct Burned { - pub asset_id: burned::AssetId, - pub owner: burned::Owner, - pub balance: burned::Balance, - } - pub mod burned { - use super::runtime_types; - pub type AssetId = ::core::primitive::u32; - pub type Owner = ::subxt::ext::subxt_core::utils::AccountId32; - pub type Balance = ::core::primitive::u128; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for Burned { - const PALLET: &'static str = "Assets"; - const EVENT: &'static str = "Burned"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "The management team changed."] - pub struct TeamChanged { - pub asset_id: team_changed::AssetId, - pub issuer: team_changed::Issuer, - pub admin: team_changed::Admin, - pub freezer: team_changed::Freezer, - } - pub mod team_changed { - use super::runtime_types; - pub type AssetId = ::core::primitive::u32; - pub type Issuer = ::subxt::ext::subxt_core::utils::AccountId32; - pub type Admin = ::subxt::ext::subxt_core::utils::AccountId32; - pub type Freezer = ::subxt::ext::subxt_core::utils::AccountId32; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for TeamChanged { - const PALLET: &'static str = "Assets"; - const EVENT: &'static str = "TeamChanged"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "The owner changed."] - pub struct OwnerChanged { - pub asset_id: owner_changed::AssetId, - pub owner: owner_changed::Owner, - } - pub mod owner_changed { - use super::runtime_types; - pub type AssetId = ::core::primitive::u32; - pub type Owner = ::subxt::ext::subxt_core::utils::AccountId32; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for OwnerChanged { - const PALLET: &'static str = "Assets"; - const EVENT: &'static str = "OwnerChanged"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "Some account `who` was frozen."] - pub struct Frozen { - pub asset_id: frozen::AssetId, - pub who: frozen::Who, - } - pub mod frozen { - use super::runtime_types; - pub type AssetId = ::core::primitive::u32; - pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for Frozen { - const PALLET: &'static str = "Assets"; - const EVENT: &'static str = "Frozen"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "Some account `who` was thawed."] - pub struct Thawed { - pub asset_id: thawed::AssetId, - pub who: thawed::Who, - } - pub mod thawed { - use super::runtime_types; - pub type AssetId = ::core::primitive::u32; - pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for Thawed { - const PALLET: &'static str = "Assets"; - const EVENT: &'static str = "Thawed"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "Some asset `asset_id` was frozen."] - pub struct AssetFrozen { - pub asset_id: asset_frozen::AssetId, - } - pub mod asset_frozen { - use super::runtime_types; - pub type AssetId = ::core::primitive::u32; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for AssetFrozen { - const PALLET: &'static str = "Assets"; - const EVENT: &'static str = "AssetFrozen"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "Some asset `asset_id` was thawed."] - pub struct AssetThawed { - pub asset_id: asset_thawed::AssetId, - } - pub mod asset_thawed { - use super::runtime_types; - pub type AssetId = ::core::primitive::u32; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for AssetThawed { - const PALLET: &'static str = "Assets"; - const EVENT: &'static str = "AssetThawed"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "Accounts were destroyed for given asset."] - pub struct AccountsDestroyed { - pub asset_id: accounts_destroyed::AssetId, - pub accounts_destroyed: accounts_destroyed::AccountsDestroyed, - pub accounts_remaining: accounts_destroyed::AccountsRemaining, - } - pub mod accounts_destroyed { - use super::runtime_types; - pub type AssetId = ::core::primitive::u32; - pub type AccountsDestroyed = ::core::primitive::u32; - pub type AccountsRemaining = ::core::primitive::u32; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for AccountsDestroyed { - const PALLET: &'static str = "Assets"; - const EVENT: &'static str = "AccountsDestroyed"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "Approvals were destroyed for given asset."] - pub struct ApprovalsDestroyed { - pub asset_id: approvals_destroyed::AssetId, - pub approvals_destroyed: approvals_destroyed::ApprovalsDestroyed, - pub approvals_remaining: approvals_destroyed::ApprovalsRemaining, - } - pub mod approvals_destroyed { - use super::runtime_types; - pub type AssetId = ::core::primitive::u32; - pub type ApprovalsDestroyed = ::core::primitive::u32; - pub type ApprovalsRemaining = ::core::primitive::u32; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for ApprovalsDestroyed { - const PALLET: &'static str = "Assets"; - const EVENT: &'static str = "ApprovalsDestroyed"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "An asset class is in the process of being destroyed."] - pub struct DestructionStarted { - pub asset_id: destruction_started::AssetId, - } - pub mod destruction_started { - use super::runtime_types; - pub type AssetId = ::core::primitive::u32; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for DestructionStarted { - const PALLET: &'static str = "Assets"; - const EVENT: &'static str = "DestructionStarted"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "An asset class was destroyed."] - pub struct Destroyed { - pub asset_id: destroyed::AssetId, - } - pub mod destroyed { - use super::runtime_types; - pub type AssetId = ::core::primitive::u32; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for Destroyed { - const PALLET: &'static str = "Assets"; - const EVENT: &'static str = "Destroyed"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "Some asset class was force-created."] - pub struct ForceCreated { - pub asset_id: force_created::AssetId, - pub owner: force_created::Owner, - } - pub mod force_created { - use super::runtime_types; - pub type AssetId = ::core::primitive::u32; - pub type Owner = ::subxt::ext::subxt_core::utils::AccountId32; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for ForceCreated { - const PALLET: &'static str = "Assets"; - const EVENT: &'static str = "ForceCreated"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "New metadata has been set for an asset."] - pub struct MetadataSet { - pub asset_id: metadata_set::AssetId, - pub name: metadata_set::Name, - pub symbol: metadata_set::Symbol, - pub decimals: metadata_set::Decimals, - pub is_frozen: metadata_set::IsFrozen, - } - pub mod metadata_set { - use super::runtime_types; - pub type AssetId = ::core::primitive::u32; - pub type Name = ::subxt::ext::subxt_core::alloc::vec::Vec<::core::primitive::u8>; - pub type Symbol = ::subxt::ext::subxt_core::alloc::vec::Vec<::core::primitive::u8>; - pub type Decimals = ::core::primitive::u8; - pub type IsFrozen = ::core::primitive::bool; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for MetadataSet { - const PALLET: &'static str = "Assets"; - const EVENT: &'static str = "MetadataSet"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "Metadata has been cleared for an asset."] - pub struct MetadataCleared { - pub asset_id: metadata_cleared::AssetId, - } - pub mod metadata_cleared { - use super::runtime_types; - pub type AssetId = ::core::primitive::u32; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for MetadataCleared { - const PALLET: &'static str = "Assets"; - const EVENT: &'static str = "MetadataCleared"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "(Additional) funds have been approved for transfer to a destination account."] - pub struct ApprovedTransfer { - pub asset_id: approved_transfer::AssetId, - pub source: approved_transfer::Source, - pub delegate: approved_transfer::Delegate, - pub amount: approved_transfer::Amount, - } - pub mod approved_transfer { - use super::runtime_types; - pub type AssetId = ::core::primitive::u32; - pub type Source = ::subxt::ext::subxt_core::utils::AccountId32; - pub type Delegate = ::subxt::ext::subxt_core::utils::AccountId32; - pub type Amount = ::core::primitive::u128; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for ApprovedTransfer { - const PALLET: &'static str = "Assets"; - const EVENT: &'static str = "ApprovedTransfer"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "An approval for account `delegate` was cancelled by `owner`."] - pub struct ApprovalCancelled { - pub asset_id: approval_cancelled::AssetId, - pub owner: approval_cancelled::Owner, - pub delegate: approval_cancelled::Delegate, - } - pub mod approval_cancelled { - use super::runtime_types; - pub type AssetId = ::core::primitive::u32; - pub type Owner = ::subxt::ext::subxt_core::utils::AccountId32; - pub type Delegate = ::subxt::ext::subxt_core::utils::AccountId32; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for ApprovalCancelled { - const PALLET: &'static str = "Assets"; - const EVENT: &'static str = "ApprovalCancelled"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "An `amount` was transferred in its entirety from `owner` to `destination` by"] - #[doc = "the approved `delegate`."] - pub struct TransferredApproved { - pub asset_id: transferred_approved::AssetId, - pub owner: transferred_approved::Owner, - pub delegate: transferred_approved::Delegate, - pub destination: transferred_approved::Destination, - pub amount: transferred_approved::Amount, - } - pub mod transferred_approved { - use super::runtime_types; - pub type AssetId = ::core::primitive::u32; - pub type Owner = ::subxt::ext::subxt_core::utils::AccountId32; - pub type Delegate = ::subxt::ext::subxt_core::utils::AccountId32; - pub type Destination = ::subxt::ext::subxt_core::utils::AccountId32; - pub type Amount = ::core::primitive::u128; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for TransferredApproved { - const PALLET: &'static str = "Assets"; - const EVENT: &'static str = "TransferredApproved"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "An asset has had its attributes changed by the `Force` origin."] - pub struct AssetStatusChanged { - pub asset_id: asset_status_changed::AssetId, - } - pub mod asset_status_changed { - use super::runtime_types; - pub type AssetId = ::core::primitive::u32; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for AssetStatusChanged { - const PALLET: &'static str = "Assets"; - const EVENT: &'static str = "AssetStatusChanged"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "The min_balance of an asset has been updated by the asset owner."] - pub struct AssetMinBalanceChanged { - pub asset_id: asset_min_balance_changed::AssetId, - pub new_min_balance: asset_min_balance_changed::NewMinBalance, - } - pub mod asset_min_balance_changed { - use super::runtime_types; - pub type AssetId = ::core::primitive::u32; - pub type NewMinBalance = ::core::primitive::u128; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for AssetMinBalanceChanged { - const PALLET: &'static str = "Assets"; - const EVENT: &'static str = "AssetMinBalanceChanged"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "Some account `who` was created with a deposit from `depositor`."] - pub struct Touched { - pub asset_id: touched::AssetId, - pub who: touched::Who, - pub depositor: touched::Depositor, - } - pub mod touched { - use super::runtime_types; - pub type AssetId = ::core::primitive::u32; - pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; - pub type Depositor = ::subxt::ext::subxt_core::utils::AccountId32; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for Touched { - const PALLET: &'static str = "Assets"; - const EVENT: &'static str = "Touched"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "Some account `who` was blocked."] - pub struct Blocked { - pub asset_id: blocked::AssetId, - pub who: blocked::Who, - } - pub mod blocked { - use super::runtime_types; - pub type AssetId = ::core::primitive::u32; - pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for Blocked { - const PALLET: &'static str = "Assets"; - const EVENT: &'static str = "Blocked"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "Some assets were deposited (e.g. for transaction fees)."] - pub struct Deposited { - pub asset_id: deposited::AssetId, - pub who: deposited::Who, - pub amount: deposited::Amount, - } - pub mod deposited { - use super::runtime_types; - pub type AssetId = ::core::primitive::u32; - pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; - pub type Amount = ::core::primitive::u128; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for Deposited { - const PALLET: &'static str = "Assets"; - const EVENT: &'static str = "Deposited"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "Some assets were withdrawn from the account (e.g. for transaction fees)."] - pub struct Withdrawn { - pub asset_id: withdrawn::AssetId, - pub who: withdrawn::Who, - pub amount: withdrawn::Amount, - } - pub mod withdrawn { - use super::runtime_types; - pub type AssetId = ::core::primitive::u32; - pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; - pub type Amount = ::core::primitive::u128; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for Withdrawn { - const PALLET: &'static str = "Assets"; - const EVENT: &'static str = "Withdrawn"; - } - } - pub mod storage { - use super::runtime_types; - pub mod types { - use super::runtime_types; - pub mod asset { - use super::runtime_types; - pub type Asset = runtime_types::pallet_assets::types::AssetDetails< - ::core::primitive::u128, - ::subxt::ext::subxt_core::utils::AccountId32, - ::core::primitive::u128, - >; - pub type Param0 = ::core::primitive::u32; - } - pub mod account { - use super::runtime_types; - pub type Account = runtime_types::pallet_assets::types::AssetAccount< - ::core::primitive::u128, - ::core::primitive::u128, - (), - ::subxt::ext::subxt_core::utils::AccountId32, - >; - pub type Param0 = ::core::primitive::u32; - pub type Param1 = ::subxt::ext::subxt_core::utils::AccountId32; - } - pub mod approvals { - use super::runtime_types; - pub type Approvals = runtime_types::pallet_assets::types::Approval< - ::core::primitive::u128, - ::core::primitive::u128, - >; - pub type Param0 = ::core::primitive::u32; - pub type Param1 = ::subxt::ext::subxt_core::utils::AccountId32; - pub type Param2 = ::subxt::ext::subxt_core::utils::AccountId32; - } - pub mod metadata { - use super::runtime_types; - pub type Metadata = runtime_types::pallet_assets::types::AssetMetadata< - ::core::primitive::u128, - runtime_types::bounded_collections::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - >; - pub type Param0 = ::core::primitive::u32; - } - pub mod next_asset_id { - use super::runtime_types; - pub type NextAssetId = ::core::primitive::u32; - } - } - pub struct StorageApi; - impl StorageApi { - #[doc = " Details of an asset."] - pub fn asset_iter( - &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::asset::Asset, - (), - (), - ::subxt::ext::subxt_core::utils::Yes, - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Assets", - "Asset", - (), - [ - 159u8, 234u8, 177u8, 31u8, 58u8, 51u8, 173u8, 184u8, 250u8, 169u8, - 246u8, 122u8, 54u8, 19u8, 232u8, 60u8, 0u8, 165u8, 12u8, 101u8, 93u8, - 169u8, 23u8, 34u8, 154u8, 44u8, 134u8, 128u8, 97u8, 71u8, 167u8, 224u8, - ], - ) - } - #[doc = " Details of an asset."] - pub fn asset( - &self, - _0: types::asset::Param0, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::asset::Param0, - >, - types::asset::Asset, - ::subxt::ext::subxt_core::utils::Yes, - (), - (), - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Assets", - "Asset", - ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), - [ - 159u8, 234u8, 177u8, 31u8, 58u8, 51u8, 173u8, 184u8, 250u8, 169u8, - 246u8, 122u8, 54u8, 19u8, 232u8, 60u8, 0u8, 165u8, 12u8, 101u8, 93u8, - 169u8, 23u8, 34u8, 154u8, 44u8, 134u8, 128u8, 97u8, 71u8, 167u8, 224u8, - ], - ) - } - #[doc = " The holdings of a specific account for a specific asset."] - pub fn account_iter( - &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::account::Account, - (), - (), - ::subxt::ext::subxt_core::utils::Yes, - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Assets", - "Account", - (), - [ - 188u8, 242u8, 133u8, 64u8, 0u8, 11u8, 57u8, 146u8, 60u8, 137u8, 35u8, - 23u8, 183u8, 200u8, 242u8, 8u8, 94u8, 158u8, 218u8, 13u8, 104u8, 215u8, - 87u8, 86u8, 69u8, 200u8, 11u8, 51u8, 6u8, 65u8, 216u8, 102u8, - ], - ) - } - #[doc = " The holdings of a specific account for a specific asset."] - pub fn account_iter1( - &self, - _0: types::account::Param0, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::account::Param0, - >, - types::account::Account, - (), - (), - ::subxt::ext::subxt_core::utils::Yes, - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Assets", - "Account", - ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), - [ - 188u8, 242u8, 133u8, 64u8, 0u8, 11u8, 57u8, 146u8, 60u8, 137u8, 35u8, - 23u8, 183u8, 200u8, 242u8, 8u8, 94u8, 158u8, 218u8, 13u8, 104u8, 215u8, - 87u8, 86u8, 69u8, 200u8, 11u8, 51u8, 6u8, 65u8, 216u8, 102u8, - ], - ) - } - #[doc = " The holdings of a specific account for a specific asset."] - pub fn account( - &self, - _0: types::account::Param0, - _1: types::account::Param1, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - ( - ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::account::Param0, - >, - ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::account::Param1, - >, - ), - types::account::Account, - ::subxt::ext::subxt_core::utils::Yes, - (), - (), - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Assets", - "Account", - ( - ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), - ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_1), - ), - [ - 188u8, 242u8, 133u8, 64u8, 0u8, 11u8, 57u8, 146u8, 60u8, 137u8, 35u8, - 23u8, 183u8, 200u8, 242u8, 8u8, 94u8, 158u8, 218u8, 13u8, 104u8, 215u8, - 87u8, 86u8, 69u8, 200u8, 11u8, 51u8, 6u8, 65u8, 216u8, 102u8, - ], - ) - } - #[doc = " Approved balance transfers. First balance is the amount approved for transfer. Second"] - #[doc = " is the amount of `T::Currency` reserved for storing this."] - #[doc = " First key is the asset ID, second key is the owner and third key is the delegate."] - pub fn approvals_iter( - &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::approvals::Approvals, - (), - (), - ::subxt::ext::subxt_core::utils::Yes, - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Assets", - "Approvals", - (), - [ - 122u8, 92u8, 51u8, 45u8, 200u8, 200u8, 182u8, 208u8, 18u8, 47u8, 139u8, - 68u8, 254u8, 15u8, 152u8, 110u8, 3u8, 138u8, 13u8, 183u8, 5u8, 185u8, - 218u8, 44u8, 93u8, 28u8, 56u8, 189u8, 125u8, 127u8, 123u8, 8u8, - ], - ) - } - #[doc = " Approved balance transfers. First balance is the amount approved for transfer. Second"] - #[doc = " is the amount of `T::Currency` reserved for storing this."] - #[doc = " First key is the asset ID, second key is the owner and third key is the delegate."] - pub fn approvals_iter1( - &self, - _0: types::approvals::Param0, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::approvals::Param0, - >, - types::approvals::Approvals, - (), - (), - ::subxt::ext::subxt_core::utils::Yes, - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Assets", - "Approvals", - ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), - [ - 122u8, 92u8, 51u8, 45u8, 200u8, 200u8, 182u8, 208u8, 18u8, 47u8, 139u8, - 68u8, 254u8, 15u8, 152u8, 110u8, 3u8, 138u8, 13u8, 183u8, 5u8, 185u8, - 218u8, 44u8, 93u8, 28u8, 56u8, 189u8, 125u8, 127u8, 123u8, 8u8, - ], - ) - } - #[doc = " Approved balance transfers. First balance is the amount approved for transfer. Second"] - #[doc = " is the amount of `T::Currency` reserved for storing this."] - #[doc = " First key is the asset ID, second key is the owner and third key is the delegate."] - pub fn approvals_iter2( - &self, - _0: types::approvals::Param0, - _1: types::approvals::Param1, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - ( - ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::approvals::Param0, - >, - ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::approvals::Param1, - >, - ), - types::approvals::Approvals, - (), - (), - ::subxt::ext::subxt_core::utils::Yes, - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Assets", - "Approvals", - ( - ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), - ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_1), - ), - [ - 122u8, 92u8, 51u8, 45u8, 200u8, 200u8, 182u8, 208u8, 18u8, 47u8, 139u8, - 68u8, 254u8, 15u8, 152u8, 110u8, 3u8, 138u8, 13u8, 183u8, 5u8, 185u8, - 218u8, 44u8, 93u8, 28u8, 56u8, 189u8, 125u8, 127u8, 123u8, 8u8, - ], - ) - } - #[doc = " Approved balance transfers. First balance is the amount approved for transfer. Second"] - #[doc = " is the amount of `T::Currency` reserved for storing this."] - #[doc = " First key is the asset ID, second key is the owner and third key is the delegate."] - pub fn approvals( - &self, - _0: types::approvals::Param0, - _1: types::approvals::Param1, - _2: types::approvals::Param2, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - ( - ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::approvals::Param0, - >, - ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::approvals::Param1, - >, - ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::approvals::Param2, - >, - ), - types::approvals::Approvals, - ::subxt::ext::subxt_core::utils::Yes, - (), - (), - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Assets", - "Approvals", - ( - ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), - ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_1), - ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_2), - ), - [ - 122u8, 92u8, 51u8, 45u8, 200u8, 200u8, 182u8, 208u8, 18u8, 47u8, 139u8, - 68u8, 254u8, 15u8, 152u8, 110u8, 3u8, 138u8, 13u8, 183u8, 5u8, 185u8, - 218u8, 44u8, 93u8, 28u8, 56u8, 189u8, 125u8, 127u8, 123u8, 8u8, - ], - ) - } - #[doc = " Metadata of an asset."] - pub fn metadata_iter( - &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::metadata::Metadata, - (), - ::subxt::ext::subxt_core::utils::Yes, - ::subxt::ext::subxt_core::utils::Yes, - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Assets", - "Metadata", - (), - [ - 129u8, 202u8, 244u8, 77u8, 55u8, 81u8, 86u8, 106u8, 20u8, 153u8, 209u8, - 69u8, 199u8, 107u8, 111u8, 49u8, 88u8, 157u8, 84u8, 41u8, 198u8, 190u8, - 234u8, 218u8, 68u8, 207u8, 87u8, 217u8, 73u8, 66u8, 211u8, 163u8, - ], - ) - } - #[doc = " Metadata of an asset."] - pub fn metadata( - &self, - _0: types::metadata::Param0, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::metadata::Param0, - >, - types::metadata::Metadata, - ::subxt::ext::subxt_core::utils::Yes, - ::subxt::ext::subxt_core::utils::Yes, - (), - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Assets", - "Metadata", - ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), - [ - 129u8, 202u8, 244u8, 77u8, 55u8, 81u8, 86u8, 106u8, 20u8, 153u8, 209u8, - 69u8, 199u8, 107u8, 111u8, 49u8, 88u8, 157u8, 84u8, 41u8, 198u8, 190u8, - 234u8, 218u8, 68u8, 207u8, 87u8, 217u8, 73u8, 66u8, 211u8, 163u8, - ], - ) - } - #[doc = " The asset ID enforced for the next asset creation, if any present. Otherwise, this storage"] - #[doc = " item has no effect."] - #[doc = ""] - #[doc = " This can be useful for setting up constraints for IDs of the new assets. For example, by"] - #[doc = " providing an initial [`NextAssetId`] and using the [`crate::AutoIncAssetId`] callback, an"] - #[doc = " auto-increment model can be applied to all new asset IDs."] - #[doc = ""] - #[doc = " The initial next asset ID can be set using the [`GenesisConfig`] or the"] - #[doc = " [SetNextAssetId](`migration::next_asset_id::SetNextAssetId`) migration."] - pub fn next_asset_id( - &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::next_asset_id::NextAssetId, - ::subxt::ext::subxt_core::utils::Yes, - (), - (), - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Assets", - "NextAssetId", - (), - [ - 15u8, 61u8, 40u8, 217u8, 236u8, 34u8, 95u8, 53u8, 159u8, 182u8, 70u8, - 251u8, 234u8, 188u8, 115u8, 23u8, 199u8, 118u8, 220u8, 40u8, 147u8, - 174u8, 247u8, 129u8, 246u8, 107u8, 178u8, 43u8, 8u8, 19u8, 74u8, 116u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " Max number of items to destroy per `destroy_accounts` and `destroy_approvals` call."] - #[doc = ""] - #[doc = " Must be configured to result in a weight that makes each call fit in a block."] - pub fn remove_items_limit( - &self, - ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< - ::core::primitive::u32, - > { - ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "Assets", - "RemoveItemsLimit", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, - ], - ) - } - #[doc = " The basic amount of funds that must be reserved for an asset."] - pub fn asset_deposit( - &self, - ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< - ::core::primitive::u128, - > { - ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "Assets", - "AssetDeposit", - [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, - 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, - 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, - ], - ) - } - #[doc = " The amount of funds that must be reserved for a non-provider asset account to be"] - #[doc = " maintained."] - pub fn asset_account_deposit( - &self, - ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< - ::core::primitive::u128, - > { - ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "Assets", - "AssetAccountDeposit", - [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, - 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, - 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, - ], - ) - } - #[doc = " The basic amount of funds that must be reserved when adding metadata to your asset."] - pub fn metadata_deposit_base( - &self, - ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< - ::core::primitive::u128, - > { - ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "Assets", - "MetadataDepositBase", - [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, - 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, - 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, - ], - ) - } - #[doc = " The additional funds that must be reserved for the number of bytes you store in your"] - #[doc = " metadata."] - pub fn metadata_deposit_per_byte( - &self, - ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< - ::core::primitive::u128, - > { - ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "Assets", - "MetadataDepositPerByte", - [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, - 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, - 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, - ], - ) - } - #[doc = " The amount of funds that must be reserved when creating a new approval."] - pub fn approval_deposit( - &self, - ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< - ::core::primitive::u128, - > { - ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "Assets", - "ApprovalDeposit", - [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, - 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, - 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, - ], - ) - } - #[doc = " The maximum length of a name or symbol stored on-chain."] - pub fn string_limit( - &self, - ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< - ::core::primitive::u32, - > { - ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "Assets", - "StringLimit", - [ - 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 runtime_types { - use super::runtime_types; - pub mod bounded_collections { - use super::runtime_types; - pub mod bounded_vec { - use super::runtime_types; - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - pub struct BoundedVec<_0>(pub ::subxt::ext::subxt_core::alloc::vec::Vec<_0>); - } - pub mod weak_bounded_vec { - use super::runtime_types; - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - pub struct WeakBoundedVec<_0>(pub ::subxt::ext::subxt_core::alloc::vec::Vec<_0>); - } - } - pub mod dilithium_crypto { - use super::runtime_types; - pub mod types { - use super::runtime_types; - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - pub enum DilithiumSignatureScheme { - #[codec(index = 0)] - Dilithium(runtime_types::dilithium_crypto::types::DilithiumSignatureWithPublic), - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - pub struct DilithiumSignatureWithPublic { - pub bytes: [::core::primitive::u8; 7219usize], - } - } - } - pub mod frame_metadata_hash_extension { - use super::runtime_types; - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - pub struct CheckMetadataHash { - pub mode: runtime_types::frame_metadata_hash_extension::Mode, - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - pub enum Mode { - #[codec(index = 0)] - Disabled, - #[codec(index = 1)] - Enabled, - } - } - pub mod frame_support { - use super::runtime_types; - pub mod dispatch { - use super::runtime_types; - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - pub enum DispatchClass { - #[codec(index = 0)] - Normal, - #[codec(index = 1)] - Operational, - #[codec(index = 2)] - Mandatory, - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - pub enum Pays { - #[codec(index = 0)] - Yes, - #[codec(index = 1)] - No, - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - pub struct PerDispatchClass<_0> { - pub normal: _0, - pub operational: _0, - pub mandatory: _0, - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - pub struct PostDispatchInfo { - pub actual_weight: - ::core::option::Option, - pub pays_fee: runtime_types::frame_support::dispatch::Pays, - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - pub enum RawOrigin<_0> { - #[codec(index = 0)] - Root, - #[codec(index = 1)] - Signed(_0), - #[codec(index = 2)] - None, - } - } - pub mod traits { - use super::runtime_types; - pub mod preimages { - use super::runtime_types; - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - pub enum Bounded<_0, _1> { - #[codec(index = 0)] - Legacy { - hash: ::subxt::ext::subxt_core::utils::H256, - }, - #[codec(index = 1)] - Inline( - runtime_types::bounded_collections::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - ), - #[codec(index = 2)] - Lookup { - hash: ::subxt::ext::subxt_core::utils::H256, - len: ::core::primitive::u32, - }, - __Ignore(::core::marker::PhantomData<(_0, _1)>), - } - } - pub mod schedule { - use super::runtime_types; - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - pub enum DispatchTime<_0> { - #[codec(index = 0)] - At(_0), - #[codec(index = 1)] - After(_0), - } - } - pub mod tokens { - use super::runtime_types; - pub mod misc { - use super::runtime_types; - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - pub enum BalanceStatus { - #[codec(index = 0)] - Free, - #[codec(index = 1)] - Reserved, - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - pub struct IdAmount<_0, _1> { - pub id: _0, - pub amount: _1, - } - } - } - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - pub struct PalletId(pub [::core::primitive::u8; 8usize]); - } - pub mod frame_system { - use super::runtime_types; - pub mod extensions { - use super::runtime_types; - pub mod check_genesis { - use super::runtime_types; - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - pub struct CheckGenesis; - } - pub mod check_mortality { - use super::runtime_types; - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - pub struct CheckMortality(pub runtime_types::sp_runtime::generic::era::Era); - } - pub mod check_non_zero_sender { - use super::runtime_types; - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - pub struct CheckNonZeroSender; - } - pub mod check_nonce { - use super::runtime_types; - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - pub struct CheckNonce(#[codec(compact)] pub ::core::primitive::u32); - } - pub mod check_spec_version { - use super::runtime_types; - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - pub struct CheckSpecVersion; - } - pub mod check_tx_version { - use super::runtime_types; - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - pub struct CheckTxVersion; - } - pub mod check_weight { - use super::runtime_types; - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - pub struct CheckWeight; - } - } - pub mod limits { - use super::runtime_types; - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - pub struct BlockLength { - pub max: runtime_types::frame_support::dispatch::PerDispatchClass< - ::core::primitive::u32, - >, - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - pub struct BlockWeights { - pub base_block: runtime_types::sp_weights::weight_v2::Weight, - pub max_block: runtime_types::sp_weights::weight_v2::Weight, - pub per_class: runtime_types::frame_support::dispatch::PerDispatchClass< - runtime_types::frame_system::limits::WeightsPerClass, - >, - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - pub struct WeightsPerClass { - pub base_extrinsic: runtime_types::sp_weights::weight_v2::Weight, - pub max_extrinsic: - ::core::option::Option, - pub max_total: - ::core::option::Option, - pub reserved: - ::core::option::Option, - } - } - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] - pub enum Call { - #[codec(index = 0)] - #[doc = "Make some on-chain remark."] - #[doc = ""] - #[doc = "Can be executed by every `origin`."] - remark { - remark: ::subxt::ext::subxt_core::alloc::vec::Vec<::core::primitive::u8>, - }, - #[codec(index = 1)] - #[doc = "Set the number of pages in the WebAssembly environment's heap."] - set_heap_pages { pages: ::core::primitive::u64 }, - #[codec(index = 2)] - #[doc = "Set the new runtime code."] - set_code { - code: ::subxt::ext::subxt_core::alloc::vec::Vec<::core::primitive::u8>, - }, - #[codec(index = 3)] - #[doc = "Set the new runtime code without doing any checks of the given `code`."] - #[doc = ""] - #[doc = "Note that runtime upgrades will not run if this is called with a not-increasing spec"] - #[doc = "version!"] - set_code_without_checks { - code: ::subxt::ext::subxt_core::alloc::vec::Vec<::core::primitive::u8>, - }, - #[codec(index = 4)] - #[doc = "Set some items of storage."] - set_storage { - items: ::subxt::ext::subxt_core::alloc::vec::Vec<( - ::subxt::ext::subxt_core::alloc::vec::Vec<::core::primitive::u8>, - ::subxt::ext::subxt_core::alloc::vec::Vec<::core::primitive::u8>, - )>, - }, - #[codec(index = 5)] - #[doc = "Kill some items from storage."] - kill_storage { - keys: ::subxt::ext::subxt_core::alloc::vec::Vec< - ::subxt::ext::subxt_core::alloc::vec::Vec<::core::primitive::u8>, - >, - }, - #[codec(index = 6)] - #[doc = "Kill all storage items with a key that starts with the given prefix."] - #[doc = ""] - #[doc = "**NOTE:** We rely on the Root origin to provide us the number of subkeys under"] - #[doc = "the prefix we are removing to accurately calculate the weight of this function."] - kill_prefix { - prefix: ::subxt::ext::subxt_core::alloc::vec::Vec<::core::primitive::u8>, - subkeys: ::core::primitive::u32, - }, - #[codec(index = 7)] - #[doc = "Make some on-chain remark and emit event."] - remark_with_event { - remark: ::subxt::ext::subxt_core::alloc::vec::Vec<::core::primitive::u8>, - }, - #[codec(index = 9)] - #[doc = "Authorize an upgrade to a given `code_hash` for the runtime. The runtime can be supplied"] - #[doc = "later."] - #[doc = ""] - #[doc = "This call requires Root origin."] - authorize_upgrade { code_hash: ::subxt::ext::subxt_core::utils::H256 }, - #[codec(index = 10)] - #[doc = "Authorize an upgrade to a given `code_hash` for the runtime. The runtime can be supplied"] - #[doc = "later."] - #[doc = ""] - #[doc = "WARNING: This authorizes an upgrade that will take place without any safety checks, for"] - #[doc = "example that the spec name remains the same and that the version number increases. Not"] - #[doc = "recommended for normal use. Use `authorize_upgrade` instead."] - #[doc = ""] - #[doc = "This call requires Root origin."] - authorize_upgrade_without_checks { - code_hash: ::subxt::ext::subxt_core::utils::H256, - }, - #[codec(index = 11)] - #[doc = "Provide the preimage (runtime binary) `code` for an upgrade that has been authorized."] - #[doc = ""] - #[doc = "If the authorization required a version check, this call will ensure the spec name"] - #[doc = "remains unchanged and that the spec version has increased."] - #[doc = ""] - #[doc = "Depending on the runtime's `OnSetCode` configuration, this function may directly apply"] - #[doc = "the new `code` in the same block or attempt to schedule the upgrade."] - #[doc = ""] - #[doc = "All origins are allowed."] - apply_authorized_upgrade { - code: ::subxt::ext::subxt_core::alloc::vec::Vec<::core::primitive::u8>, - }, - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Error for the System pallet"] - pub enum Error { - #[codec(index = 0)] - #[doc = "The name of specification does not match between the current runtime"] - #[doc = "and the new runtime."] - InvalidSpecName, - #[codec(index = 1)] - #[doc = "The specification version is not allowed to decrease between the current runtime"] - #[doc = "and the new runtime."] - SpecVersionNeedsToIncrease, - #[codec(index = 2)] - #[doc = "Failed to extract the runtime version from the new runtime."] - #[doc = ""] - #[doc = "Either calling `Core_version` or decoding `RuntimeVersion` failed."] - FailedToExtractRuntimeVersion, - #[codec(index = 3)] - #[doc = "Suicide called when the account has non-default composite data."] - NonDefaultComposite, - #[codec(index = 4)] - #[doc = "There is a non-zero reference count preventing the account from being purged."] - NonZeroRefCount, - #[codec(index = 5)] - #[doc = "The origin filter prevent the call to be dispatched."] - CallFiltered, - #[codec(index = 6)] - #[doc = "A multi-block migration is ongoing and prevents the current code from being replaced."] - MultiBlockMigrationsOngoing, - #[codec(index = 7)] - #[doc = "No upgrade authorized."] - NothingAuthorized, - #[codec(index = 8)] - #[doc = "The submitted code is not authorized."] - Unauthorized, - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Event for the System pallet."] - pub enum Event { - #[codec(index = 0)] - #[doc = "An extrinsic completed successfully."] - ExtrinsicSuccess { - dispatch_info: runtime_types::frame_system::DispatchEventInfo, - }, - #[codec(index = 1)] - #[doc = "An extrinsic failed."] - ExtrinsicFailed { - dispatch_error: runtime_types::sp_runtime::DispatchError, - dispatch_info: runtime_types::frame_system::DispatchEventInfo, - }, - #[codec(index = 2)] - #[doc = "`:code` was updated."] - CodeUpdated, - #[codec(index = 3)] - #[doc = "A new account was created."] - NewAccount { account: ::subxt::ext::subxt_core::utils::AccountId32 }, - #[codec(index = 4)] - #[doc = "An account was reaped."] - KilledAccount { account: ::subxt::ext::subxt_core::utils::AccountId32 }, - #[codec(index = 5)] - #[doc = "On on-chain remark happened."] - Remarked { - sender: ::subxt::ext::subxt_core::utils::AccountId32, - hash: ::subxt::ext::subxt_core::utils::H256, - }, - #[codec(index = 6)] - #[doc = "An upgrade was authorized."] - UpgradeAuthorized { - code_hash: ::subxt::ext::subxt_core::utils::H256, - check_version: ::core::primitive::bool, - }, - } - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - pub struct AccountInfo<_0, _1> { - pub nonce: _0, - pub consumers: ::core::primitive::u32, - pub providers: ::core::primitive::u32, - pub sufficients: ::core::primitive::u32, - pub data: _1, - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - pub struct CodeUpgradeAuthorization { - pub code_hash: ::subxt::ext::subxt_core::utils::H256, - pub check_version: ::core::primitive::bool, - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - pub struct DispatchEventInfo { - pub weight: runtime_types::sp_weights::weight_v2::Weight, - pub class: runtime_types::frame_support::dispatch::DispatchClass, - pub pays_fee: runtime_types::frame_support::dispatch::Pays, - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - pub struct EventRecord<_0, _1> { - pub phase: runtime_types::frame_system::Phase, - pub event: _0, - pub topics: ::subxt::ext::subxt_core::alloc::vec::Vec<_1>, - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - pub struct LastRuntimeUpgradeInfo { - #[codec(compact)] - pub spec_version: ::core::primitive::u32, - pub spec_name: ::subxt::ext::subxt_core::alloc::string::String, - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - pub enum Phase { - #[codec(index = 0)] - ApplyExtrinsic(::core::primitive::u32), - #[codec(index = 1)] - Finalization, - #[codec(index = 2)] - Initialization, - } - } - pub mod pallet_assets { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] - pub enum Call { - #[codec(index = 0)] - #[doc = "Issue a new class of fungible assets from a public origin."] - #[doc = ""] - #[doc = "This new asset class has no assets initially and its owner is the origin."] - #[doc = ""] - #[doc = "The origin must conform to the configured `CreateOrigin` and have sufficient funds free."] - #[doc = ""] - #[doc = "Funds of sender are reserved by `AssetDeposit`."] - #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `id`: The identifier of the new asset. This must not be currently in use to identify"] - #[doc = "an existing asset. If [`NextAssetId`] is set, then this must be equal to it."] - #[doc = "- `admin`: The admin of this class of assets. The admin is the initial address of each"] - #[doc = "member of the asset class's admin team."] - #[doc = "- `min_balance`: The minimum balance of this new asset that any single account must"] - #[doc = "have. If an account's balance is reduced below this, then it collapses to zero."] - #[doc = ""] - #[doc = "Emits `Created` event when successful."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - create { - #[codec(compact)] - id: ::core::primitive::u32, - admin: ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >, - min_balance: ::core::primitive::u128, - }, - #[codec(index = 1)] - #[doc = "Issue a new class of fungible assets from a privileged origin."] - #[doc = ""] - #[doc = "This new asset class has no assets initially."] - #[doc = ""] - #[doc = "The origin must conform to `ForceOrigin`."] - #[doc = ""] - #[doc = "Unlike `create`, no funds are reserved."] - #[doc = ""] - #[doc = "- `id`: The identifier of the new asset. This must not be currently in use to identify"] - #[doc = "an existing asset. If [`NextAssetId`] is set, then this must be equal to it."] - #[doc = "- `owner`: The owner of this class of assets. The owner has full superuser permissions"] - #[doc = "over this asset, but may later change and configure the permissions using"] - #[doc = "`transfer_ownership` and `set_team`."] - #[doc = "- `min_balance`: The minimum balance of this new asset that any single account must"] - #[doc = "have. If an account's balance is reduced below this, then it collapses to zero."] - #[doc = ""] - #[doc = "Emits `ForceCreated` event when successful."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - force_create { - #[codec(compact)] - id: ::core::primitive::u32, - owner: ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >, - is_sufficient: ::core::primitive::bool, - #[codec(compact)] - min_balance: ::core::primitive::u128, - }, - #[codec(index = 2)] - #[doc = "Start the process of destroying a fungible asset class."] - #[doc = ""] - #[doc = "`start_destroy` is the first in a series of extrinsics that should be called, to allow"] - #[doc = "destruction of an asset class."] - #[doc = ""] - #[doc = "The origin must conform to `ForceOrigin` or must be `Signed` by the asset's `owner`."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to be destroyed. This must identify an existing"] - #[doc = " asset."] - start_destroy { - #[codec(compact)] - id: ::core::primitive::u32, - }, - #[codec(index = 3)] - #[doc = "Destroy all accounts associated with a given asset."] - #[doc = ""] - #[doc = "`destroy_accounts` should only be called after `start_destroy` has been called, and the"] - #[doc = "asset is in a `Destroying` state."] - #[doc = ""] - #[doc = "Due to weight restrictions, this function may need to be called multiple times to fully"] - #[doc = "destroy all accounts. It will destroy `RemoveItemsLimit` accounts at a time."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to be destroyed. This must identify an existing"] - #[doc = " asset."] - #[doc = ""] - #[doc = "Each call emits the `Event::DestroyedAccounts` event."] - destroy_accounts { - #[codec(compact)] - id: ::core::primitive::u32, - }, - #[codec(index = 4)] - #[doc = "Destroy all approvals associated with a given asset up to the max (T::RemoveItemsLimit)."] - #[doc = ""] - #[doc = "`destroy_approvals` should only be called after `start_destroy` has been called, and the"] - #[doc = "asset is in a `Destroying` state."] - #[doc = ""] - #[doc = "Due to weight restrictions, this function may need to be called multiple times to fully"] - #[doc = "destroy all approvals. It will destroy `RemoveItemsLimit` approvals at a time."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to be destroyed. This must identify an existing"] - #[doc = " asset."] - #[doc = ""] - #[doc = "Each call emits the `Event::DestroyedApprovals` event."] - destroy_approvals { - #[codec(compact)] - id: ::core::primitive::u32, - }, - #[codec(index = 5)] - #[doc = "Complete destroying asset and unreserve currency."] - #[doc = ""] - #[doc = "`finish_destroy` should only be called after `start_destroy` has been called, and the"] - #[doc = "asset is in a `Destroying` state. All accounts or approvals should be destroyed before"] - #[doc = "hand."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to be destroyed. This must identify an existing"] - #[doc = " asset."] - #[doc = ""] - #[doc = "Each successful call emits the `Event::Destroyed` event."] - finish_destroy { - #[codec(compact)] - id: ::core::primitive::u32, - }, - #[codec(index = 6)] - #[doc = "Mint assets of a particular class."] - #[doc = ""] - #[doc = "The origin must be Signed and the sender must be the Issuer of the asset `id`."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to have some amount minted."] - #[doc = "- `beneficiary`: The account to be credited with the minted assets."] - #[doc = "- `amount`: The amount of the asset to be minted."] - #[doc = ""] - #[doc = "Emits `Issued` event when successful."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - #[doc = "Modes: Pre-existing balance of `beneficiary`; Account pre-existence of `beneficiary`."] - mint { - #[codec(compact)] - id: ::core::primitive::u32, - beneficiary: ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >, - #[codec(compact)] - amount: ::core::primitive::u128, - }, - #[codec(index = 7)] - #[doc = "Reduce the balance of `who` by as much as possible up to `amount` assets of `id`."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Manager of the asset `id`."] - #[doc = ""] - #[doc = "Bails with `NoAccount` if the `who` is already dead."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to have some amount burned."] - #[doc = "- `who`: The account to be debited from."] - #[doc = "- `amount`: The maximum amount by which `who`'s balance should be reduced."] - #[doc = ""] - #[doc = "Emits `Burned` with the actual amount burned. If this takes the balance to below the"] - #[doc = "minimum for the asset, then the amount burned is increased to take it to zero."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - #[doc = "Modes: Post-existence of `who`; Pre & post Zombie-status of `who`."] - burn { - #[codec(compact)] - id: ::core::primitive::u32, - who: ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >, - #[codec(compact)] - amount: ::core::primitive::u128, - }, - #[codec(index = 8)] - #[doc = "Move some assets from the sender account to another."] - #[doc = ""] - #[doc = "Origin must be Signed."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to have some amount transferred."] - #[doc = "- `target`: The account to be credited."] - #[doc = "- `amount`: The amount by which the sender's balance of assets should be reduced and"] - #[doc = "`target`'s balance increased. The amount actually transferred may be slightly greater in"] - #[doc = "the case that the transfer would otherwise take the sender balance above zero but below"] - #[doc = "the minimum balance. Must be greater than zero."] - #[doc = ""] - #[doc = "Emits `Transferred` with the actual amount transferred. If this takes the source balance"] - #[doc = "to below the minimum for the asset, then the amount transferred is increased to take it"] - #[doc = "to zero."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - #[doc = "Modes: Pre-existence of `target`; Post-existence of sender; Account pre-existence of"] - #[doc = "`target`."] - transfer { - #[codec(compact)] - id: ::core::primitive::u32, - target: ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >, - #[codec(compact)] - amount: ::core::primitive::u128, - }, - #[codec(index = 9)] - #[doc = "Move some assets from the sender account to another, keeping the sender account alive."] - #[doc = ""] - #[doc = "Origin must be Signed."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to have some amount transferred."] - #[doc = "- `target`: The account to be credited."] - #[doc = "- `amount`: The amount by which the sender's balance of assets should be reduced and"] - #[doc = "`target`'s balance increased. The amount actually transferred may be slightly greater in"] - #[doc = "the case that the transfer would otherwise take the sender balance above zero but below"] - #[doc = "the minimum balance. Must be greater than zero."] - #[doc = ""] - #[doc = "Emits `Transferred` with the actual amount transferred. If this takes the source balance"] - #[doc = "to below the minimum for the asset, then the amount transferred is increased to take it"] - #[doc = "to zero."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - #[doc = "Modes: Pre-existence of `target`; Post-existence of sender; Account pre-existence of"] - #[doc = "`target`."] - transfer_keep_alive { - #[codec(compact)] - id: ::core::primitive::u32, - target: ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >, - #[codec(compact)] - amount: ::core::primitive::u128, - }, - #[codec(index = 10)] - #[doc = "Move some assets from one account to another."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Admin of the asset `id`."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to have some amount transferred."] - #[doc = "- `source`: The account to be debited."] - #[doc = "- `dest`: The account to be credited."] - #[doc = "- `amount`: The amount by which the `source`'s balance of assets should be reduced and"] - #[doc = "`dest`'s balance increased. The amount actually transferred may be slightly greater in"] - #[doc = "the case that the transfer would otherwise take the `source` balance above zero but"] - #[doc = "below the minimum balance. Must be greater than zero."] - #[doc = ""] - #[doc = "Emits `Transferred` with the actual amount transferred. If this takes the source balance"] - #[doc = "to below the minimum for the asset, then the amount transferred is increased to take it"] - #[doc = "to zero."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - #[doc = "Modes: Pre-existence of `dest`; Post-existence of `source`; Account pre-existence of"] - #[doc = "`dest`."] - force_transfer { - #[codec(compact)] - id: ::core::primitive::u32, - source: ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >, - dest: ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >, - #[codec(compact)] - amount: ::core::primitive::u128, - }, - #[codec(index = 11)] - #[doc = "Disallow further unprivileged transfers of an asset `id` from an account `who`. `who`"] - #[doc = "must already exist as an entry in `Account`s of the asset. If you want to freeze an"] - #[doc = "account that does not have an entry, use `touch_other` first."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Freezer of the asset `id`."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to be frozen."] - #[doc = "- `who`: The account to be frozen."] - #[doc = ""] - #[doc = "Emits `Frozen`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - freeze { - #[codec(compact)] - id: ::core::primitive::u32, - who: ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >, - }, - #[codec(index = 12)] - #[doc = "Allow unprivileged transfers to and from an account again."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Admin of the asset `id`."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to be frozen."] - #[doc = "- `who`: The account to be unfrozen."] - #[doc = ""] - #[doc = "Emits `Thawed`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - thaw { - #[codec(compact)] - id: ::core::primitive::u32, - who: ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >, - }, - #[codec(index = 13)] - #[doc = "Disallow further unprivileged transfers for the asset class."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Freezer of the asset `id`."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to be frozen."] - #[doc = ""] - #[doc = "Emits `Frozen`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - freeze_asset { - #[codec(compact)] - id: ::core::primitive::u32, - }, - #[codec(index = 14)] - #[doc = "Allow unprivileged transfers for the asset again."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Admin of the asset `id`."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to be thawed."] - #[doc = ""] - #[doc = "Emits `Thawed`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - thaw_asset { - #[codec(compact)] - id: ::core::primitive::u32, - }, - #[codec(index = 15)] - #[doc = "Change the Owner of an asset."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Owner of the asset `id`."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset."] - #[doc = "- `owner`: The new Owner of this asset."] - #[doc = ""] - #[doc = "Emits `OwnerChanged`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - transfer_ownership { - #[codec(compact)] - id: ::core::primitive::u32, - owner: ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >, - }, - #[codec(index = 16)] - #[doc = "Change the Issuer, Admin and Freezer of an asset."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Owner of the asset `id`."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to be frozen."] - #[doc = "- `issuer`: The new Issuer of this asset."] - #[doc = "- `admin`: The new Admin of this asset."] - #[doc = "- `freezer`: The new Freezer of this asset."] - #[doc = ""] - #[doc = "Emits `TeamChanged`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - set_team { - #[codec(compact)] - id: ::core::primitive::u32, - issuer: ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >, - admin: ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >, - freezer: ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >, - }, - #[codec(index = 17)] - #[doc = "Set the metadata for an asset."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Owner of the asset `id`."] - #[doc = ""] - #[doc = "Funds of sender are reserved according to the formula:"] - #[doc = "`MetadataDepositBase + MetadataDepositPerByte * (name.len + symbol.len)` taking into"] - #[doc = "account any already reserved funds."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to update."] - #[doc = "- `name`: The user friendly name of this asset. Limited in length by `StringLimit`."] - #[doc = "- `symbol`: The exchange symbol for this asset. Limited in length by `StringLimit`."] - #[doc = "- `decimals`: The number of decimals this asset uses to represent one unit."] - #[doc = ""] - #[doc = "Emits `MetadataSet`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - set_metadata { - #[codec(compact)] - id: ::core::primitive::u32, - name: ::subxt::ext::subxt_core::alloc::vec::Vec<::core::primitive::u8>, - symbol: ::subxt::ext::subxt_core::alloc::vec::Vec<::core::primitive::u8>, - decimals: ::core::primitive::u8, - }, - #[codec(index = 18)] - #[doc = "Clear the metadata for an asset."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Owner of the asset `id`."] - #[doc = ""] - #[doc = "Any deposit is freed for the asset owner."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to clear."] - #[doc = ""] - #[doc = "Emits `MetadataCleared`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - clear_metadata { - #[codec(compact)] - id: ::core::primitive::u32, - }, - #[codec(index = 19)] - #[doc = "Force the metadata for an asset to some value."] - #[doc = ""] - #[doc = "Origin must be ForceOrigin."] - #[doc = ""] - #[doc = "Any deposit is left alone."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to update."] - #[doc = "- `name`: The user friendly name of this asset. Limited in length by `StringLimit`."] - #[doc = "- `symbol`: The exchange symbol for this asset. Limited in length by `StringLimit`."] - #[doc = "- `decimals`: The number of decimals this asset uses to represent one unit."] - #[doc = ""] - #[doc = "Emits `MetadataSet`."] - #[doc = ""] - #[doc = "Weight: `O(N + S)` where N and S are the length of the name and symbol respectively."] - force_set_metadata { - #[codec(compact)] - id: ::core::primitive::u32, - name: ::subxt::ext::subxt_core::alloc::vec::Vec<::core::primitive::u8>, - symbol: ::subxt::ext::subxt_core::alloc::vec::Vec<::core::primitive::u8>, - decimals: ::core::primitive::u8, - is_frozen: ::core::primitive::bool, - }, - #[codec(index = 20)] - #[doc = "Clear the metadata for an asset."] - #[doc = ""] - #[doc = "Origin must be ForceOrigin."] - #[doc = ""] - #[doc = "Any deposit is returned."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to clear."] - #[doc = ""] - #[doc = "Emits `MetadataCleared`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - force_clear_metadata { - #[codec(compact)] - id: ::core::primitive::u32, - }, - #[codec(index = 21)] - #[doc = "Alter the attributes of a given asset."] - #[doc = ""] - #[doc = "Origin must be `ForceOrigin`."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset."] - #[doc = "- `owner`: The new Owner of this asset."] - #[doc = "- `issuer`: The new Issuer of this asset."] - #[doc = "- `admin`: The new Admin of this asset."] - #[doc = "- `freezer`: The new Freezer of this asset."] - #[doc = "- `min_balance`: The minimum balance of this new asset that any single account must"] - #[doc = "have. If an account's balance is reduced below this, then it collapses to zero."] - #[doc = "- `is_sufficient`: Whether a non-zero balance of this asset is deposit of sufficient"] - #[doc = "value to account for the state bloat associated with its balance storage. If set to"] - #[doc = "`true`, then non-zero balances may be stored without a `consumer` reference (and thus"] - #[doc = "an ED in the Balances pallet or whatever else is used to control user-account state"] - #[doc = "growth)."] - #[doc = "- `is_frozen`: Whether this asset class is frozen except for permissioned/admin"] - #[doc = "instructions."] - #[doc = ""] - #[doc = "Emits `AssetStatusChanged` with the identity of the asset."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - force_asset_status { - #[codec(compact)] - id: ::core::primitive::u32, - owner: ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >, - issuer: ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >, - admin: ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >, - freezer: ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >, - #[codec(compact)] - min_balance: ::core::primitive::u128, - is_sufficient: ::core::primitive::bool, - is_frozen: ::core::primitive::bool, - }, - #[codec(index = 22)] - #[doc = "Approve an amount of asset for transfer by a delegated third-party account."] - #[doc = ""] - #[doc = "Origin must be Signed."] - #[doc = ""] - #[doc = "Ensures that `ApprovalDeposit` worth of `Currency` is reserved from signing account"] - #[doc = "for the purpose of holding the approval. If some non-zero amount of assets is already"] - #[doc = "approved from signing account to `delegate`, then it is topped up or unreserved to"] - #[doc = "meet the right value."] - #[doc = ""] - #[doc = "NOTE: The signing account does not need to own `amount` of assets at the point of"] - #[doc = "making this call."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset."] - #[doc = "- `delegate`: The account to delegate permission to transfer asset."] - #[doc = "- `amount`: The amount of asset that may be transferred by `delegate`. If there is"] - #[doc = "already an approval in place, then this acts additively."] - #[doc = ""] - #[doc = "Emits `ApprovedTransfer` on success."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - approve_transfer { - #[codec(compact)] - id: ::core::primitive::u32, - delegate: ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >, - #[codec(compact)] - amount: ::core::primitive::u128, - }, - #[codec(index = 23)] - #[doc = "Cancel all of some asset approved for delegated transfer by a third-party account."] - #[doc = ""] - #[doc = "Origin must be Signed and there must be an approval in place between signer and"] - #[doc = "`delegate`."] - #[doc = ""] - #[doc = "Unreserves any deposit previously reserved by `approve_transfer` for the approval."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset."] - #[doc = "- `delegate`: The account delegated permission to transfer asset."] - #[doc = ""] - #[doc = "Emits `ApprovalCancelled` on success."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - cancel_approval { - #[codec(compact)] - id: ::core::primitive::u32, - delegate: ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >, - }, - #[codec(index = 24)] - #[doc = "Cancel all of some asset approved for delegated transfer by a third-party account."] - #[doc = ""] - #[doc = "Origin must be either ForceOrigin or Signed origin with the signer being the Admin"] - #[doc = "account of the asset `id`."] - #[doc = ""] - #[doc = "Unreserves any deposit previously reserved by `approve_transfer` for the approval."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset."] - #[doc = "- `delegate`: The account delegated permission to transfer asset."] - #[doc = ""] - #[doc = "Emits `ApprovalCancelled` on success."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - force_cancel_approval { - #[codec(compact)] - id: ::core::primitive::u32, - owner: ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >, - delegate: ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >, - }, - #[codec(index = 25)] - #[doc = "Transfer some asset balance from a previously delegated account to some third-party"] - #[doc = "account."] - #[doc = ""] - #[doc = "Origin must be Signed and there must be an approval in place by the `owner` to the"] - #[doc = "signer."] - #[doc = ""] - #[doc = "If the entire amount approved for transfer is transferred, then any deposit previously"] - #[doc = "reserved by `approve_transfer` is unreserved."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset."] - #[doc = "- `owner`: The account which previously approved for a transfer of at least `amount` and"] - #[doc = "from which the asset balance will be withdrawn."] - #[doc = "- `destination`: The account to which the asset balance of `amount` will be transferred."] - #[doc = "- `amount`: The amount of assets to transfer."] - #[doc = ""] - #[doc = "Emits `TransferredApproved` on success."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - transfer_approved { - #[codec(compact)] - id: ::core::primitive::u32, - owner: ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >, - destination: ::subxt::ext::subxt_core::utils::MultiAddress< + } + } + #[doc = "The `Event` enum of this pallet"] + pub type Event = runtime_types::pallet_referenda::pallet::Event2; + pub mod events { + use super::runtime_types; + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + #[doc = "A referendum has been submitted."] + pub struct Submitted { + pub index: submitted::Index, + pub track: submitted::Track, + pub proposal: submitted::Proposal, + } + pub mod submitted { + use super::runtime_types; + pub type Index = ::core::primitive::u32; + pub type Track = ::core::primitive::u16; + pub type Proposal = runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::quantus_runtime::RuntimeCall, + runtime_types::poseidon_resonance::PoseidonHasher, + >; + } + impl ::subxt::ext::subxt_core::events::StaticEvent for Submitted { + const PALLET: &'static str = "TechReferenda"; + const EVENT: &'static str = "Submitted"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + #[doc = "The decision deposit has been placed."] + pub struct DecisionDepositPlaced { + pub index: decision_deposit_placed::Index, + pub who: decision_deposit_placed::Who, + pub amount: decision_deposit_placed::Amount, + } + pub mod decision_deposit_placed { + use super::runtime_types; + pub type Index = ::core::primitive::u32; + pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; + pub type Amount = ::core::primitive::u128; + } + impl ::subxt::ext::subxt_core::events::StaticEvent for DecisionDepositPlaced { + const PALLET: &'static str = "TechReferenda"; + const EVENT: &'static str = "DecisionDepositPlaced"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + #[doc = "The decision deposit has been refunded."] + pub struct DecisionDepositRefunded { + pub index: decision_deposit_refunded::Index, + pub who: decision_deposit_refunded::Who, + pub amount: decision_deposit_refunded::Amount, + } + pub mod decision_deposit_refunded { + use super::runtime_types; + pub type Index = ::core::primitive::u32; + pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; + pub type Amount = ::core::primitive::u128; + } + impl ::subxt::ext::subxt_core::events::StaticEvent for DecisionDepositRefunded { + const PALLET: &'static str = "TechReferenda"; + const EVENT: &'static str = "DecisionDepositRefunded"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + #[doc = "A deposit has been slashed."] + pub struct DepositSlashed { + pub who: deposit_slashed::Who, + pub amount: deposit_slashed::Amount, + } + pub mod deposit_slashed { + use super::runtime_types; + pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; + pub type Amount = ::core::primitive::u128; + } + impl ::subxt::ext::subxt_core::events::StaticEvent for DepositSlashed { + const PALLET: &'static str = "TechReferenda"; + const EVENT: &'static str = "DepositSlashed"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + #[doc = "A referendum has moved into the deciding phase."] + pub struct DecisionStarted { + pub index: decision_started::Index, + pub track: decision_started::Track, + pub proposal: decision_started::Proposal, + pub tally: decision_started::Tally, + } + pub mod decision_started { + use super::runtime_types; + pub type Index = ::core::primitive::u32; + pub type Track = ::core::primitive::u16; + pub type Proposal = runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::quantus_runtime::RuntimeCall, + runtime_types::poseidon_resonance::PoseidonHasher, + >; + pub type Tally = runtime_types::pallet_ranked_collective::Tally; + } + impl ::subxt::ext::subxt_core::events::StaticEvent for DecisionStarted { + const PALLET: &'static str = "TechReferenda"; + const EVENT: &'static str = "DecisionStarted"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + pub struct ConfirmStarted { + pub index: confirm_started::Index, + } + pub mod confirm_started { + use super::runtime_types; + pub type Index = ::core::primitive::u32; + } + impl ::subxt::ext::subxt_core::events::StaticEvent for ConfirmStarted { + const PALLET: &'static str = "TechReferenda"; + const EVENT: &'static str = "ConfirmStarted"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + pub struct ConfirmAborted { + pub index: confirm_aborted::Index, + } + pub mod confirm_aborted { + use super::runtime_types; + pub type Index = ::core::primitive::u32; + } + impl ::subxt::ext::subxt_core::events::StaticEvent for ConfirmAborted { + const PALLET: &'static str = "TechReferenda"; + const EVENT: &'static str = "ConfirmAborted"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + #[doc = "A referendum has ended its confirmation phase and is ready for approval."] + pub struct Confirmed { + pub index: confirmed::Index, + pub tally: confirmed::Tally, + } + pub mod confirmed { + use super::runtime_types; + pub type Index = ::core::primitive::u32; + pub type Tally = runtime_types::pallet_ranked_collective::Tally; + } + impl ::subxt::ext::subxt_core::events::StaticEvent for Confirmed { + const PALLET: &'static str = "TechReferenda"; + const EVENT: &'static str = "Confirmed"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + #[doc = "A referendum has been approved and its proposal has been scheduled."] + pub struct Approved { + pub index: approved::Index, + } + pub mod approved { + use super::runtime_types; + pub type Index = ::core::primitive::u32; + } + impl ::subxt::ext::subxt_core::events::StaticEvent for Approved { + const PALLET: &'static str = "TechReferenda"; + const EVENT: &'static str = "Approved"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + #[doc = "A proposal has been rejected by referendum."] + pub struct Rejected { + pub index: rejected::Index, + pub tally: rejected::Tally, + } + pub mod rejected { + use super::runtime_types; + pub type Index = ::core::primitive::u32; + pub type Tally = runtime_types::pallet_ranked_collective::Tally; + } + impl ::subxt::ext::subxt_core::events::StaticEvent for Rejected { + const PALLET: &'static str = "TechReferenda"; + const EVENT: &'static str = "Rejected"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + #[doc = "A referendum has been timed out without being decided."] + pub struct TimedOut { + pub index: timed_out::Index, + pub tally: timed_out::Tally, + } + pub mod timed_out { + use super::runtime_types; + pub type Index = ::core::primitive::u32; + pub type Tally = runtime_types::pallet_ranked_collective::Tally; + } + impl ::subxt::ext::subxt_core::events::StaticEvent for TimedOut { + const PALLET: &'static str = "TechReferenda"; + const EVENT: &'static str = "TimedOut"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + #[doc = "A referendum has been cancelled."] + pub struct Cancelled { + pub index: cancelled::Index, + pub tally: cancelled::Tally, + } + pub mod cancelled { + use super::runtime_types; + pub type Index = ::core::primitive::u32; + pub type Tally = runtime_types::pallet_ranked_collective::Tally; + } + impl ::subxt::ext::subxt_core::events::StaticEvent for Cancelled { + const PALLET: &'static str = "TechReferenda"; + const EVENT: &'static str = "Cancelled"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + #[doc = "A referendum has been killed."] + pub struct Killed { + pub index: killed::Index, + pub tally: killed::Tally, + } + pub mod killed { + use super::runtime_types; + pub type Index = ::core::primitive::u32; + pub type Tally = runtime_types::pallet_ranked_collective::Tally; + } + impl ::subxt::ext::subxt_core::events::StaticEvent for Killed { + const PALLET: &'static str = "TechReferenda"; + const EVENT: &'static str = "Killed"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + #[doc = "The submission deposit has been refunded."] + pub struct SubmissionDepositRefunded { + pub index: submission_deposit_refunded::Index, + pub who: submission_deposit_refunded::Who, + pub amount: submission_deposit_refunded::Amount, + } + pub mod submission_deposit_refunded { + use super::runtime_types; + pub type Index = ::core::primitive::u32; + pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; + pub type Amount = ::core::primitive::u128; + } + impl ::subxt::ext::subxt_core::events::StaticEvent for SubmissionDepositRefunded { + const PALLET: &'static str = "TechReferenda"; + const EVENT: &'static str = "SubmissionDepositRefunded"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + #[doc = "Metadata for a referendum has been set."] + pub struct MetadataSet { + pub index: metadata_set::Index, + pub hash: metadata_set::Hash, + } + pub mod metadata_set { + use super::runtime_types; + pub type Index = ::core::primitive::u32; + pub type Hash = ::subxt::ext::subxt_core::utils::H256; + } + impl ::subxt::ext::subxt_core::events::StaticEvent for MetadataSet { + const PALLET: &'static str = "TechReferenda"; + const EVENT: &'static str = "MetadataSet"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + #[doc = "Metadata for a referendum has been cleared."] + pub struct MetadataCleared { + pub index: metadata_cleared::Index, + pub hash: metadata_cleared::Hash, + } + pub mod metadata_cleared { + use super::runtime_types; + pub type Index = ::core::primitive::u32; + pub type Hash = ::subxt::ext::subxt_core::utils::H256; + } + impl ::subxt::ext::subxt_core::events::StaticEvent for MetadataCleared { + const PALLET: &'static str = "TechReferenda"; + const EVENT: &'static str = "MetadataCleared"; + } + } + pub mod storage { + use super::runtime_types; + pub mod types { + use super::runtime_types; + pub mod referendum_count { + use super::runtime_types; + pub type ReferendumCount = ::core::primitive::u32; + } + pub mod referendum_info_for { + use super::runtime_types; + pub type ReferendumInfoFor = + runtime_types::pallet_referenda::types::ReferendumInfo< + ::core::primitive::u16, + runtime_types::quantus_runtime::OriginCaller, + ::core::primitive::u32, + runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::quantus_runtime::RuntimeCall, + runtime_types::poseidon_resonance::PoseidonHasher, + >, + ::core::primitive::u128, + runtime_types::pallet_ranked_collective::Tally, ::subxt::ext::subxt_core::utils::AccountId32, - (), + ( + runtime_types::qp_scheduler::BlockNumberOrTimestamp< + ::core::primitive::u32, + ::core::primitive::u64, + >, + ::core::primitive::u32, + ), + >; + pub type Param0 = ::core::primitive::u32; + } + pub mod track_queue { + use super::runtime_types; + pub type TrackQueue = + runtime_types::bounded_collections::bounded_vec::BoundedVec<( + ::core::primitive::u32, + ::core::primitive::u32, + )>; + pub type Param0 = ::core::primitive::u16; + } + pub mod deciding_count { + use super::runtime_types; + pub type DecidingCount = ::core::primitive::u32; + pub type Param0 = ::core::primitive::u16; + } + pub mod metadata_of { + use super::runtime_types; + pub type MetadataOf = ::subxt::ext::subxt_core::utils::H256; + pub type Param0 = ::core::primitive::u32; + } + } + pub struct StorageApi; + impl StorageApi { + #[doc = " The next free referendum index, aka the number of referenda started so far."] + pub fn referendum_count( + &self, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::referendum_count::ReferendumCount, + ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, + (), + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "TechReferenda", + "ReferendumCount", + (), + [ + 64u8, 145u8, 232u8, 153u8, 121u8, 87u8, 128u8, 253u8, 170u8, 192u8, + 139u8, 18u8, 0u8, 33u8, 243u8, 11u8, 238u8, 222u8, 244u8, 5u8, 247u8, + 198u8, 149u8, 31u8, 122u8, 208u8, 86u8, 179u8, 166u8, 167u8, 93u8, + 67u8, + ], + ) + } + #[doc = " Information concerning any given referendum."] + pub fn referendum_info_for_iter( + &self, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::referendum_info_for::ReferendumInfoFor, + (), + (), + ::subxt::ext::subxt_core::utils::Yes, + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "TechReferenda", + "ReferendumInfoFor", + (), + [ + 12u8, 160u8, 226u8, 48u8, 96u8, 127u8, 60u8, 27u8, 37u8, 158u8, 31u8, + 162u8, 106u8, 183u8, 90u8, 169u8, 244u8, 35u8, 25u8, 121u8, 84u8, + 120u8, 20u8, 206u8, 137u8, 42u8, 139u8, 47u8, 62u8, 73u8, 157u8, 182u8, + ], + ) + } + #[doc = " Information concerning any given referendum."] + pub fn referendum_info_for( + &self, + _0: types::referendum_info_for::Param0, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + ::subxt::ext::subxt_core::storage::address::StaticStorageKey< + types::referendum_info_for::Param0, + >, + types::referendum_info_for::ReferendumInfoFor, + ::subxt::ext::subxt_core::utils::Yes, + (), + (), + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "TechReferenda", + "ReferendumInfoFor", + ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), + [ + 12u8, 160u8, 226u8, 48u8, 96u8, 127u8, 60u8, 27u8, 37u8, 158u8, 31u8, + 162u8, 106u8, 183u8, 90u8, 169u8, 244u8, 35u8, 25u8, 121u8, 84u8, + 120u8, 20u8, 206u8, 137u8, 42u8, 139u8, 47u8, 62u8, 73u8, 157u8, 182u8, + ], + ) + } + #[doc = " The sorted list of referenda ready to be decided but not yet being decided, ordered by"] + #[doc = " conviction-weighted approvals."] + #[doc = ""] + #[doc = " This should be empty if `DecidingCount` is less than `TrackInfo::max_deciding`."] + pub fn track_queue_iter( + &self, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::track_queue::TrackQueue, + (), + ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "TechReferenda", + "TrackQueue", + (), + [ + 187u8, 113u8, 225u8, 99u8, 159u8, 207u8, 182u8, 41u8, 116u8, 136u8, + 119u8, 196u8, 152u8, 50u8, 192u8, 22u8, 171u8, 182u8, 237u8, 228u8, + 80u8, 255u8, 227u8, 141u8, 155u8, 83u8, 71u8, 131u8, 118u8, 109u8, + 186u8, 65u8, + ], + ) + } + #[doc = " The sorted list of referenda ready to be decided but not yet being decided, ordered by"] + #[doc = " conviction-weighted approvals."] + #[doc = ""] + #[doc = " This should be empty if `DecidingCount` is less than `TrackInfo::max_deciding`."] + pub fn track_queue( + &self, + _0: types::track_queue::Param0, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + ::subxt::ext::subxt_core::storage::address::StaticStorageKey< + types::track_queue::Param0, + >, + types::track_queue::TrackQueue, + ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, + (), + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "TechReferenda", + "TrackQueue", + ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), + [ + 187u8, 113u8, 225u8, 99u8, 159u8, 207u8, 182u8, 41u8, 116u8, 136u8, + 119u8, 196u8, 152u8, 50u8, 192u8, 22u8, 171u8, 182u8, 237u8, 228u8, + 80u8, 255u8, 227u8, 141u8, 155u8, 83u8, 71u8, 131u8, 118u8, 109u8, + 186u8, 65u8, + ], + ) + } + #[doc = " The number of referenda being decided currently."] + pub fn deciding_count_iter( + &self, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::deciding_count::DecidingCount, + (), + ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "TechReferenda", + "DecidingCount", + (), + [ + 203u8, 89u8, 158u8, 179u8, 194u8, 82u8, 248u8, 162u8, 93u8, 140u8, + 146u8, 51u8, 110u8, 232u8, 51u8, 1u8, 128u8, 212u8, 199u8, 14u8, 182u8, + 103u8, 47u8, 252u8, 126u8, 108u8, 166u8, 69u8, 252u8, 179u8, 126u8, + 245u8, + ], + ) + } + #[doc = " The number of referenda being decided currently."] + pub fn deciding_count( + &self, + _0: types::deciding_count::Param0, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + ::subxt::ext::subxt_core::storage::address::StaticStorageKey< + types::deciding_count::Param0, + >, + types::deciding_count::DecidingCount, + ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, + (), + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "TechReferenda", + "DecidingCount", + ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), + [ + 203u8, 89u8, 158u8, 179u8, 194u8, 82u8, 248u8, 162u8, 93u8, 140u8, + 146u8, 51u8, 110u8, 232u8, 51u8, 1u8, 128u8, 212u8, 199u8, 14u8, 182u8, + 103u8, 47u8, 252u8, 126u8, 108u8, 166u8, 69u8, 252u8, 179u8, 126u8, + 245u8, + ], + ) + } + #[doc = " The metadata is a general information concerning the referendum."] + #[doc = " The `Hash` refers to the preimage of the `Preimages` provider which can be a JSON"] + #[doc = " dump or IPFS hash of a JSON file."] + #[doc = ""] + #[doc = " Consider a garbage collection for a metadata of finished referendums to `unrequest` (remove)"] + #[doc = " large preimages."] + pub fn metadata_of_iter( + &self, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::metadata_of::MetadataOf, + (), + (), + ::subxt::ext::subxt_core::utils::Yes, + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "TechReferenda", + "MetadataOf", + (), + [ + 159u8, 250u8, 56u8, 189u8, 247u8, 165u8, 206u8, 166u8, 91u8, 139u8, + 124u8, 164u8, 25u8, 246u8, 199u8, 36u8, 159u8, 56u8, 227u8, 136u8, 4u8, + 45u8, 193u8, 72u8, 200u8, 164u8, 39u8, 207u8, 224u8, 124u8, 191u8, + 110u8, + ], + ) + } + #[doc = " The metadata is a general information concerning the referendum."] + #[doc = " The `Hash` refers to the preimage of the `Preimages` provider which can be a JSON"] + #[doc = " dump or IPFS hash of a JSON file."] + #[doc = ""] + #[doc = " Consider a garbage collection for a metadata of finished referendums to `unrequest` (remove)"] + #[doc = " large preimages."] + pub fn metadata_of( + &self, + _0: types::metadata_of::Param0, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + ::subxt::ext::subxt_core::storage::address::StaticStorageKey< + types::metadata_of::Param0, + >, + types::metadata_of::MetadataOf, + ::subxt::ext::subxt_core::utils::Yes, + (), + (), + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "TechReferenda", + "MetadataOf", + ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), + [ + 159u8, 250u8, 56u8, 189u8, 247u8, 165u8, 206u8, 166u8, 91u8, 139u8, + 124u8, 164u8, 25u8, 246u8, 199u8, 36u8, 159u8, 56u8, 227u8, 136u8, 4u8, + 45u8, 193u8, 72u8, 200u8, 164u8, 39u8, 207u8, 224u8, 124u8, 191u8, + 110u8, + ], + ) + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The minimum amount to be used as a deposit for a public referendum proposal."] + pub fn submission_deposit( + &self, + ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< + ::core::primitive::u128, + > { + ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( + "TechReferenda", + "SubmissionDeposit", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, + 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) + } + #[doc = " Maximum size of the referendum queue for a single track."] + pub fn max_queued( + &self, + ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< + ::core::primitive::u32, + > { + ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( + "TechReferenda", + "MaxQueued", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " The number of blocks after submission that a referendum must begin being decided by."] + #[doc = " Once this passes, then anyone may cancel the referendum."] + pub fn undeciding_timeout( + &self, + ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< + ::core::primitive::u32, + > { + ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( + "TechReferenda", + "UndecidingTimeout", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " Quantization level for the referendum wakeup scheduler. A higher number will result in"] + #[doc = " fewer storage reads/writes needed for smaller voters, but also result in delays to the"] + #[doc = " automatic referendum status changes. Explicit servicing instructions are unaffected."] + pub fn alarm_interval( + &self, + ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< + ::core::primitive::u32, + > { + ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( + "TechReferenda", + "AlarmInterval", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " A list of tracks."] + #[doc = ""] + #[doc = " Note: if the tracks are dynamic, the value in the static metadata might be inaccurate."] + pub fn tracks( + &self, + ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< + ::subxt::ext::subxt_core::alloc::vec::Vec<( + ::core::primitive::u16, + runtime_types::pallet_referenda::types::TrackDetails< + ::core::primitive::u128, + ::core::primitive::u32, + ::subxt::ext::subxt_core::alloc::string::String, >, - #[codec(compact)] - amount: ::core::primitive::u128, - }, - #[codec(index = 26)] - #[doc = "Create an asset account for non-provider assets."] - #[doc = ""] - #[doc = "A deposit will be taken from the signer account."] - #[doc = ""] - #[doc = "- `origin`: Must be Signed; the signer account must have sufficient funds for a deposit"] - #[doc = " to be taken."] - #[doc = "- `id`: The identifier of the asset for the account to be created."] - #[doc = ""] - #[doc = "Emits `Touched` event when successful."] - touch { - #[codec(compact)] - id: ::core::primitive::u32, - }, - #[codec(index = 27)] - #[doc = "Return the deposit (if any) of an asset account or a consumer reference (if any) of an"] - #[doc = "account."] - #[doc = ""] - #[doc = "The origin must be Signed."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset for which the caller would like the deposit"] - #[doc = " refunded."] - #[doc = "- `allow_burn`: If `true` then assets may be destroyed in order to complete the refund."] - #[doc = ""] - #[doc = "Emits `Refunded` event when successful."] - refund { - #[codec(compact)] - id: ::core::primitive::u32, - allow_burn: ::core::primitive::bool, - }, - #[codec(index = 28)] - #[doc = "Sets the minimum balance of an asset."] - #[doc = ""] - #[doc = "Only works if there aren't any accounts that are holding the asset or if"] - #[doc = "the new value of `min_balance` is less than the old one."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender has to be the Owner of the"] - #[doc = "asset `id`."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset."] - #[doc = "- `min_balance`: The new value of `min_balance`."] - #[doc = ""] - #[doc = "Emits `AssetMinBalanceChanged` event when successful."] - set_min_balance { - #[codec(compact)] - id: ::core::primitive::u32, - min_balance: ::core::primitive::u128, - }, - #[codec(index = 29)] - #[doc = "Create an asset account for `who`."] - #[doc = ""] - #[doc = "A deposit will be taken from the signer account."] - #[doc = ""] - #[doc = "- `origin`: Must be Signed by `Freezer` or `Admin` of the asset `id`; the signer account"] - #[doc = " must have sufficient funds for a deposit to be taken."] - #[doc = "- `id`: The identifier of the asset for the account to be created."] - #[doc = "- `who`: The account to be created."] - #[doc = ""] - #[doc = "Emits `Touched` event when successful."] - touch_other { - #[codec(compact)] - id: ::core::primitive::u32, - who: ::subxt::ext::subxt_core::utils::MultiAddress< + )>, + > { + ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( + "TechReferenda", + "Tracks", + [ + 35u8, 226u8, 207u8, 234u8, 184u8, 139u8, 187u8, 184u8, 128u8, 199u8, + 227u8, 15u8, 31u8, 196u8, 5u8, 207u8, 138u8, 174u8, 130u8, 201u8, + 200u8, 113u8, 86u8, 93u8, 221u8, 243u8, 229u8, 24u8, 18u8, 150u8, 56u8, + 159u8, + ], + ) + } + } + } + } + pub mod merkle_airdrop { + use super::{root_mod, runtime_types}; + #[doc = "The `Error` enum of this pallet."] + pub type Error = runtime_types::pallet_merkle_airdrop::pallet::Error; + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub type Call = runtime_types::pallet_merkle_airdrop::pallet::Call; + pub mod calls { + use super::{root_mod, runtime_types}; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "Create a new airdrop with a Merkle root."] + #[doc = ""] + #[doc = "The Merkle root is a cryptographic hash that represents all valid claims"] + #[doc = "for this airdrop. Users will later provide Merkle proofs to verify their"] + #[doc = "eligibility to claim tokens."] + #[doc = ""] + #[doc = "# Parameters"] + #[doc = ""] + #[doc = "* `origin` - The origin of the call (must be signed)"] + #[doc = "* `merkle_root` - The Merkle root hash representing all valid claims"] + #[doc = "* `vesting_period` - Optional vesting period for the airdrop"] + #[doc = "* `vesting_delay` - Optional delay before vesting starts"] + pub struct CreateAirdrop { + pub merkle_root: create_airdrop::MerkleRoot, + pub vesting_period: create_airdrop::VestingPeriod, + pub vesting_delay: create_airdrop::VestingDelay, + } + pub mod create_airdrop { + use super::runtime_types; + pub type MerkleRoot = [::core::primitive::u8; 32usize]; + pub type VestingPeriod = ::core::option::Option<::core::primitive::u32>; + pub type VestingDelay = ::core::option::Option<::core::primitive::u32>; + } + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for CreateAirdrop { + const PALLET: &'static str = "MerkleAirdrop"; + const CALL: &'static str = "create_airdrop"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "Fund an existing airdrop with tokens."] + #[doc = ""] + #[doc = "This function transfers tokens from the caller to the airdrop's account,"] + #[doc = "making them available for users to claim."] + #[doc = ""] + #[doc = "# Parameters"] + #[doc = ""] + #[doc = "* `origin` - The origin of the call (must be signed)"] + #[doc = "* `airdrop_id` - The ID of the airdrop to fund"] + #[doc = "* `amount` - The amount of tokens to add to the airdrop"] + #[doc = ""] + #[doc = "# Errors"] + #[doc = ""] + #[doc = "* `AirdropNotFound` - If the specified airdrop does not exist"] + pub struct FundAirdrop { + pub airdrop_id: fund_airdrop::AirdropId, + pub amount: fund_airdrop::Amount, + } + pub mod fund_airdrop { + use super::runtime_types; + pub type AirdropId = ::core::primitive::u32; + pub type Amount = ::core::primitive::u128; + } + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for FundAirdrop { + const PALLET: &'static str = "MerkleAirdrop"; + const CALL: &'static str = "fund_airdrop"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "Claim tokens from an airdrop by providing a Merkle proof."] + #[doc = ""] + #[doc = "Users can claim their tokens by providing a proof of their eligibility."] + #[doc = "The proof is verified against the airdrop's Merkle root."] + #[doc = "Anyone can trigger a claim for any eligible recipient."] + #[doc = ""] + #[doc = "# Parameters"] + #[doc = ""] + #[doc = "* `origin` - The origin of the call"] + #[doc = "* `airdrop_id` - The ID of the airdrop to claim from"] + #[doc = "* `amount` - The amount of tokens to claim"] + #[doc = "* `merkle_proof` - The Merkle proof verifying eligibility"] + #[doc = ""] + #[doc = "# Errors"] + #[doc = ""] + #[doc = "* `AirdropNotFound` - If the specified airdrop does not exist"] + #[doc = "* `AlreadyClaimed` - If the recipient has already claimed from this airdrop"] + #[doc = "* `InvalidProof` - If the provided Merkle proof is invalid"] + #[doc = "* `InsufficientAirdropBalance` - If the airdrop doesn't have enough tokens"] + pub struct Claim { + pub airdrop_id: claim::AirdropId, + pub recipient: claim::Recipient, + pub amount: claim::Amount, + pub merkle_proof: claim::MerkleProof, + } + pub mod claim { + use super::runtime_types; + pub type AirdropId = ::core::primitive::u32; + pub type Recipient = ::subxt::ext::subxt_core::utils::AccountId32; + pub type Amount = ::core::primitive::u128; + pub type MerkleProof = + runtime_types::bounded_collections::bounded_vec::BoundedVec< + [::core::primitive::u8; 32usize], + >; + } + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for Claim { + const PALLET: &'static str = "MerkleAirdrop"; + const CALL: &'static str = "claim"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "Delete an airdrop and reclaim any remaining funds."] + #[doc = ""] + #[doc = "This function allows the creator of an airdrop to delete it and reclaim"] + #[doc = "any remaining tokens that haven't been claimed."] + #[doc = ""] + #[doc = "# Parameters"] + #[doc = ""] + #[doc = "* `origin` - The origin of the call (must be the airdrop creator)"] + #[doc = "* `airdrop_id` - The ID of the airdrop to delete"] + #[doc = ""] + #[doc = "# Errors"] + #[doc = ""] + #[doc = "* `AirdropNotFound` - If the specified airdrop does not exist"] + #[doc = "* `NotAirdropCreator` - If the caller is not the creator of the airdrop"] + pub struct DeleteAirdrop { + pub airdrop_id: delete_airdrop::AirdropId, + } + pub mod delete_airdrop { + use super::runtime_types; + pub type AirdropId = ::core::primitive::u32; + } + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for DeleteAirdrop { + const PALLET: &'static str = "MerkleAirdrop"; + const CALL: &'static str = "delete_airdrop"; + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Create a new airdrop with a Merkle root."] + #[doc = ""] + #[doc = "The Merkle root is a cryptographic hash that represents all valid claims"] + #[doc = "for this airdrop. Users will later provide Merkle proofs to verify their"] + #[doc = "eligibility to claim tokens."] + #[doc = ""] + #[doc = "# Parameters"] + #[doc = ""] + #[doc = "* `origin` - The origin of the call (must be signed)"] + #[doc = "* `merkle_root` - The Merkle root hash representing all valid claims"] + #[doc = "* `vesting_period` - Optional vesting period for the airdrop"] + #[doc = "* `vesting_delay` - Optional delay before vesting starts"] + pub fn create_airdrop( + &self, + merkle_root: types::create_airdrop::MerkleRoot, + vesting_period: types::create_airdrop::VestingPeriod, + vesting_delay: types::create_airdrop::VestingDelay, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload + { + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "MerkleAirdrop", + "create_airdrop", + types::CreateAirdrop { merkle_root, vesting_period, vesting_delay }, + [ + 18u8, 201u8, 105u8, 56u8, 66u8, 207u8, 57u8, 177u8, 133u8, 38u8, 185u8, + 19u8, 205u8, 119u8, 177u8, 206u8, 188u8, 88u8, 138u8, 33u8, 246u8, + 179u8, 148u8, 0u8, 79u8, 201u8, 89u8, 229u8, 46u8, 77u8, 42u8, 117u8, + ], + ) + } + #[doc = "Fund an existing airdrop with tokens."] + #[doc = ""] + #[doc = "This function transfers tokens from the caller to the airdrop's account,"] + #[doc = "making them available for users to claim."] + #[doc = ""] + #[doc = "# Parameters"] + #[doc = ""] + #[doc = "* `origin` - The origin of the call (must be signed)"] + #[doc = "* `airdrop_id` - The ID of the airdrop to fund"] + #[doc = "* `amount` - The amount of tokens to add to the airdrop"] + #[doc = ""] + #[doc = "# Errors"] + #[doc = ""] + #[doc = "* `AirdropNotFound` - If the specified airdrop does not exist"] + pub fn fund_airdrop( + &self, + airdrop_id: types::fund_airdrop::AirdropId, + amount: types::fund_airdrop::Amount, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "MerkleAirdrop", + "fund_airdrop", + types::FundAirdrop { airdrop_id, amount }, + [ + 11u8, 155u8, 135u8, 152u8, 19u8, 196u8, 79u8, 68u8, 24u8, 46u8, 27u8, + 63u8, 202u8, 242u8, 166u8, 160u8, 81u8, 44u8, 115u8, 247u8, 110u8, + 49u8, 11u8, 204u8, 70u8, 39u8, 7u8, 43u8, 103u8, 78u8, 39u8, 131u8, + ], + ) + } + #[doc = "Claim tokens from an airdrop by providing a Merkle proof."] + #[doc = ""] + #[doc = "Users can claim their tokens by providing a proof of their eligibility."] + #[doc = "The proof is verified against the airdrop's Merkle root."] + #[doc = "Anyone can trigger a claim for any eligible recipient."] + #[doc = ""] + #[doc = "# Parameters"] + #[doc = ""] + #[doc = "* `origin` - The origin of the call"] + #[doc = "* `airdrop_id` - The ID of the airdrop to claim from"] + #[doc = "* `amount` - The amount of tokens to claim"] + #[doc = "* `merkle_proof` - The Merkle proof verifying eligibility"] + #[doc = ""] + #[doc = "# Errors"] + #[doc = ""] + #[doc = "* `AirdropNotFound` - If the specified airdrop does not exist"] + #[doc = "* `AlreadyClaimed` - If the recipient has already claimed from this airdrop"] + #[doc = "* `InvalidProof` - If the provided Merkle proof is invalid"] + #[doc = "* `InsufficientAirdropBalance` - If the airdrop doesn't have enough tokens"] + pub fn claim( + &self, + airdrop_id: types::claim::AirdropId, + recipient: types::claim::Recipient, + amount: types::claim::Amount, + merkle_proof: types::claim::MerkleProof, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "MerkleAirdrop", + "claim", + types::Claim { airdrop_id, recipient, amount, merkle_proof }, + [ + 137u8, 9u8, 80u8, 195u8, 157u8, 215u8, 158u8, 30u8, 26u8, 104u8, 183u8, + 55u8, 102u8, 100u8, 41u8, 40u8, 26u8, 193u8, 255u8, 95u8, 201u8, 240u8, + 18u8, 253u8, 71u8, 117u8, 88u8, 250u8, 192u8, 67u8, 127u8, 159u8, + ], + ) + } + #[doc = "Delete an airdrop and reclaim any remaining funds."] + #[doc = ""] + #[doc = "This function allows the creator of an airdrop to delete it and reclaim"] + #[doc = "any remaining tokens that haven't been claimed."] + #[doc = ""] + #[doc = "# Parameters"] + #[doc = ""] + #[doc = "* `origin` - The origin of the call (must be the airdrop creator)"] + #[doc = "* `airdrop_id` - The ID of the airdrop to delete"] + #[doc = ""] + #[doc = "# Errors"] + #[doc = ""] + #[doc = "* `AirdropNotFound` - If the specified airdrop does not exist"] + #[doc = "* `NotAirdropCreator` - If the caller is not the creator of the airdrop"] + pub fn delete_airdrop( + &self, + airdrop_id: types::delete_airdrop::AirdropId, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload + { + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "MerkleAirdrop", + "delete_airdrop", + types::DeleteAirdrop { airdrop_id }, + [ + 34u8, 88u8, 199u8, 36u8, 214u8, 19u8, 124u8, 24u8, 29u8, 222u8, 138u8, + 174u8, 47u8, 199u8, 59u8, 155u8, 118u8, 157u8, 82u8, 96u8, 81u8, 186u8, + 27u8, 96u8, 116u8, 99u8, 185u8, 8u8, 100u8, 34u8, 179u8, 185u8, + ], + ) + } + } + } + #[doc = "The `Event` enum of this pallet"] + pub type Event = runtime_types::pallet_merkle_airdrop::pallet::Event; + pub mod events { + use super::runtime_types; + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + #[doc = "A new airdrop has been created."] + #[doc = ""] + #[doc = "Parameters: [airdrop_id, merkle_root]"] + pub struct AirdropCreated { + pub airdrop_id: airdrop_created::AirdropId, + pub airdrop_metadata: airdrop_created::AirdropMetadata, + } + pub mod airdrop_created { + use super::runtime_types; + pub type AirdropId = ::core::primitive::u32; + pub type AirdropMetadata = runtime_types::pallet_merkle_airdrop::AirdropMetadata< + ::core::primitive::u32, + ::core::primitive::u128, + ::subxt::ext::subxt_core::utils::AccountId32, + >; + } + impl ::subxt::ext::subxt_core::events::StaticEvent for AirdropCreated { + const PALLET: &'static str = "MerkleAirdrop"; + const EVENT: &'static str = "AirdropCreated"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + #[doc = "An airdrop has been funded with tokens."] + #[doc = ""] + #[doc = "Parameters: [airdrop_id, amount]"] + pub struct AirdropFunded { + pub airdrop_id: airdrop_funded::AirdropId, + pub amount: airdrop_funded::Amount, + } + pub mod airdrop_funded { + use super::runtime_types; + pub type AirdropId = ::core::primitive::u32; + pub type Amount = ::core::primitive::u128; + } + impl ::subxt::ext::subxt_core::events::StaticEvent for AirdropFunded { + const PALLET: &'static str = "MerkleAirdrop"; + const EVENT: &'static str = "AirdropFunded"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + #[doc = "A user has claimed tokens from an airdrop."] + #[doc = ""] + #[doc = "Parameters: [airdrop_id, account, amount]"] + pub struct Claimed { + pub airdrop_id: claimed::AirdropId, + pub account: claimed::Account, + pub amount: claimed::Amount, + } + pub mod claimed { + use super::runtime_types; + pub type AirdropId = ::core::primitive::u32; + pub type Account = ::subxt::ext::subxt_core::utils::AccountId32; + pub type Amount = ::core::primitive::u128; + } + impl ::subxt::ext::subxt_core::events::StaticEvent for Claimed { + const PALLET: &'static str = "MerkleAirdrop"; + const EVENT: &'static str = "Claimed"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + #[doc = "An airdrop has been deleted."] + #[doc = ""] + #[doc = "Parameters: [airdrop_id]"] + pub struct AirdropDeleted { + pub airdrop_id: airdrop_deleted::AirdropId, + } + pub mod airdrop_deleted { + use super::runtime_types; + pub type AirdropId = ::core::primitive::u32; + } + impl ::subxt::ext::subxt_core::events::StaticEvent for AirdropDeleted { + const PALLET: &'static str = "MerkleAirdrop"; + const EVENT: &'static str = "AirdropDeleted"; + } + } + pub mod storage { + use super::runtime_types; + pub mod types { + use super::runtime_types; + pub mod airdrop_info { + use super::runtime_types; + pub type AirdropInfo = runtime_types::pallet_merkle_airdrop::AirdropMetadata< + ::core::primitive::u32, + ::core::primitive::u128, + ::subxt::ext::subxt_core::utils::AccountId32, + >; + pub type Param0 = ::core::primitive::u32; + } + pub mod claimed { + use super::runtime_types; + pub type Claimed = (); + pub type Param0 = ::core::primitive::u32; + pub type Param1 = ::subxt::ext::subxt_core::utils::AccountId32; + } + pub mod next_airdrop_id { + use super::runtime_types; + pub type NextAirdropId = ::core::primitive::u32; + } + } + pub struct StorageApi; + impl StorageApi { + #[doc = " Stores general info about an airdrop"] + pub fn airdrop_info_iter( + &self, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::airdrop_info::AirdropInfo, + (), + (), + ::subxt::ext::subxt_core::utils::Yes, + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "MerkleAirdrop", + "AirdropInfo", + (), + [ + 38u8, 176u8, 25u8, 251u8, 80u8, 201u8, 118u8, 175u8, 89u8, 80u8, 227u8, + 241u8, 250u8, 0u8, 112u8, 71u8, 133u8, 50u8, 137u8, 13u8, 255u8, 24u8, + 253u8, 237u8, 195u8, 1u8, 192u8, 177u8, 167u8, 248u8, 11u8, 160u8, + ], + ) + } + #[doc = " Stores general info about an airdrop"] + pub fn airdrop_info( + &self, + _0: types::airdrop_info::Param0, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + ::subxt::ext::subxt_core::storage::address::StaticStorageKey< + types::airdrop_info::Param0, + >, + types::airdrop_info::AirdropInfo, + ::subxt::ext::subxt_core::utils::Yes, + (), + (), + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "MerkleAirdrop", + "AirdropInfo", + ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), + [ + 38u8, 176u8, 25u8, 251u8, 80u8, 201u8, 118u8, 175u8, 89u8, 80u8, 227u8, + 241u8, 250u8, 0u8, 112u8, 71u8, 133u8, 50u8, 137u8, 13u8, 255u8, 24u8, + 253u8, 237u8, 195u8, 1u8, 192u8, 177u8, 167u8, 248u8, 11u8, 160u8, + ], + ) + } + #[doc = " Storage for claimed status"] + pub fn claimed_iter( + &self, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::claimed::Claimed, + (), + ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "MerkleAirdrop", + "Claimed", + (), + [ + 214u8, 178u8, 109u8, 48u8, 230u8, 120u8, 107u8, 211u8, 179u8, 251u8, + 164u8, 29u8, 197u8, 154u8, 160u8, 230u8, 112u8, 212u8, 14u8, 157u8, + 248u8, 207u8, 101u8, 159u8, 203u8, 82u8, 199u8, 102u8, 99u8, 239u8, + 162u8, 10u8, + ], + ) + } + #[doc = " Storage for claimed status"] + pub fn claimed_iter1( + &self, + _0: types::claimed::Param0, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + ::subxt::ext::subxt_core::storage::address::StaticStorageKey< + types::claimed::Param0, + >, + types::claimed::Claimed, + (), + ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "MerkleAirdrop", + "Claimed", + ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), + [ + 214u8, 178u8, 109u8, 48u8, 230u8, 120u8, 107u8, 211u8, 179u8, 251u8, + 164u8, 29u8, 197u8, 154u8, 160u8, 230u8, 112u8, 212u8, 14u8, 157u8, + 248u8, 207u8, 101u8, 159u8, 203u8, 82u8, 199u8, 102u8, 99u8, 239u8, + 162u8, 10u8, + ], + ) + } + #[doc = " Storage for claimed status"] + pub fn claimed( + &self, + _0: types::claimed::Param0, + _1: types::claimed::Param1, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + ( + ::subxt::ext::subxt_core::storage::address::StaticStorageKey< + types::claimed::Param0, + >, + ::subxt::ext::subxt_core::storage::address::StaticStorageKey< + types::claimed::Param1, + >, + ), + types::claimed::Claimed, + ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, + (), + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "MerkleAirdrop", + "Claimed", + ( + ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), + ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_1), + ), + [ + 214u8, 178u8, 109u8, 48u8, 230u8, 120u8, 107u8, 211u8, 179u8, 251u8, + 164u8, 29u8, 197u8, 154u8, 160u8, 230u8, 112u8, 212u8, 14u8, 157u8, + 248u8, 207u8, 101u8, 159u8, 203u8, 82u8, 199u8, 102u8, 99u8, 239u8, + 162u8, 10u8, + ], + ) + } + #[doc = " Counter for airdrop IDs"] + pub fn next_airdrop_id( + &self, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::next_airdrop_id::NextAirdropId, + ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, + (), + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "MerkleAirdrop", + "NextAirdropId", + (), + [ + 79u8, 145u8, 145u8, 158u8, 86u8, 58u8, 102u8, 216u8, 133u8, 34u8, + 252u8, 224u8, 222u8, 51u8, 170u8, 3u8, 135u8, 29u8, 99u8, 143u8, 93u8, + 176u8, 69u8, 231u8, 74u8, 214u8, 94u8, 126u8, 227u8, 166u8, 242u8, + 98u8, + ], + ) + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The maximum number of proof elements allowed in a Merkle proof."] + pub fn max_proofs( + &self, + ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< + ::core::primitive::u32, + > { + ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( + "MerkleAirdrop", + "MaxProofs", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " The pallet id, used for deriving its sovereign account ID."] + pub fn pallet_id( + &self, + ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< + runtime_types::frame_support::PalletId, + > { + ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( + "MerkleAirdrop", + "PalletId", + [ + 56u8, 243u8, 53u8, 83u8, 154u8, 179u8, 170u8, 80u8, 133u8, 173u8, 61u8, + 161u8, 47u8, 225u8, 146u8, 21u8, 50u8, 229u8, 248u8, 27u8, 104u8, 58u8, + 129u8, 197u8, 102u8, 160u8, 168u8, 205u8, 154u8, 42u8, 217u8, 53u8, + ], + ) + } + #[doc = " Priority for unsigned claim transactions."] + pub fn unsigned_claim_priority( + &self, + ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< + ::core::primitive::u64, + > { + ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( + "MerkleAirdrop", + "UnsignedClaimPriority", + [ + 128u8, 214u8, 205u8, 242u8, 181u8, 142u8, 124u8, 231u8, 190u8, 146u8, + 59u8, 226u8, 157u8, 101u8, 103u8, 117u8, 249u8, 65u8, 18u8, 191u8, + 103u8, 119u8, 53u8, 85u8, 81u8, 96u8, 220u8, 42u8, 184u8, 239u8, 42u8, + 246u8, + ], + ) + } + } + } + } + pub mod treasury_pallet { + use super::{root_mod, runtime_types}; + #[doc = "Error for the treasury pallet."] + pub type Error = runtime_types::pallet_treasury::pallet::Error; + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub type Call = runtime_types::pallet_treasury::pallet::Call; + pub mod calls { + use super::{root_mod, runtime_types}; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "Propose and approve a spend of treasury funds."] + #[doc = ""] + #[doc = "## Dispatch Origin"] + #[doc = ""] + #[doc = "Must be [`Config::SpendOrigin`] with the `Success` value being at least `amount`."] + #[doc = ""] + #[doc = "### Details"] + #[doc = "NOTE: For record-keeping purposes, the proposer is deemed to be equivalent to the"] + #[doc = "beneficiary."] + #[doc = ""] + #[doc = "### Parameters"] + #[doc = "- `amount`: The amount to be transferred from the treasury to the `beneficiary`."] + #[doc = "- `beneficiary`: The destination account for the transfer."] + #[doc = ""] + #[doc = "## Events"] + #[doc = ""] + #[doc = "Emits [`Event::SpendApproved`] if successful."] + pub struct SpendLocal { + #[codec(compact)] + pub amount: spend_local::Amount, + pub beneficiary: spend_local::Beneficiary, + } + pub mod spend_local { + use super::runtime_types; + pub type Amount = ::core::primitive::u128; + pub type Beneficiary = ::subxt::ext::subxt_core::utils::MultiAddress< + ::subxt::ext::subxt_core::utils::AccountId32, + (), + >; + } + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for SpendLocal { + const PALLET: &'static str = "TreasuryPallet"; + const CALL: &'static str = "spend_local"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "Force a previously approved proposal to be removed from the approval queue."] + #[doc = ""] + #[doc = "## Dispatch Origin"] + #[doc = ""] + #[doc = "Must be [`Config::RejectOrigin`]."] + #[doc = ""] + #[doc = "## Details"] + #[doc = ""] + #[doc = "The original deposit will no longer be returned."] + #[doc = ""] + #[doc = "### Parameters"] + #[doc = "- `proposal_id`: The index of a proposal"] + #[doc = ""] + #[doc = "### Complexity"] + #[doc = "- O(A) where `A` is the number of approvals"] + #[doc = ""] + #[doc = "### Errors"] + #[doc = "- [`Error::ProposalNotApproved`]: The `proposal_id` supplied was not found in the"] + #[doc = " approval queue, i.e., the proposal has not been approved. This could also mean the"] + #[doc = " proposal does not exist altogether, thus there is no way it would have been approved"] + #[doc = " in the first place."] + pub struct RemoveApproval { + #[codec(compact)] + pub proposal_id: remove_approval::ProposalId, + } + pub mod remove_approval { + use super::runtime_types; + pub type ProposalId = ::core::primitive::u32; + } + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for RemoveApproval { + const PALLET: &'static str = "TreasuryPallet"; + const CALL: &'static str = "remove_approval"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "Propose and approve a spend of treasury funds."] + #[doc = ""] + #[doc = "## Dispatch Origin"] + #[doc = ""] + #[doc = "Must be [`Config::SpendOrigin`] with the `Success` value being at least"] + #[doc = "`amount` of `asset_kind` in the native asset. The amount of `asset_kind` is converted"] + #[doc = "for assertion using the [`Config::BalanceConverter`]."] + #[doc = ""] + #[doc = "## Details"] + #[doc = ""] + #[doc = "Create an approved spend for transferring a specific `amount` of `asset_kind` to a"] + #[doc = "designated beneficiary. The spend must be claimed using the `payout` dispatchable within"] + #[doc = "the [`Config::PayoutPeriod`]."] + #[doc = ""] + #[doc = "### Parameters"] + #[doc = "- `asset_kind`: An indicator of the specific asset class to be spent."] + #[doc = "- `amount`: The amount to be transferred from the treasury to the `beneficiary`."] + #[doc = "- `beneficiary`: The beneficiary of the spend."] + #[doc = "- `valid_from`: The block number from which the spend can be claimed. It can refer to"] + #[doc = " the past if the resulting spend has not yet expired according to the"] + #[doc = " [`Config::PayoutPeriod`]. If `None`, the spend can be claimed immediately after"] + #[doc = " approval."] + #[doc = ""] + #[doc = "## Events"] + #[doc = ""] + #[doc = "Emits [`Event::AssetSpendApproved`] if successful."] + pub struct Spend { + pub asset_kind: ::subxt::ext::subxt_core::alloc::boxed::Box, + #[codec(compact)] + pub amount: spend::Amount, + pub beneficiary: + ::subxt::ext::subxt_core::alloc::boxed::Box, + pub valid_from: spend::ValidFrom, + } + pub mod spend { + use super::runtime_types; + pub type AssetKind = (); + pub type Amount = ::core::primitive::u128; + pub type Beneficiary = ::subxt::ext::subxt_core::utils::MultiAddress< + ::subxt::ext::subxt_core::utils::AccountId32, + (), + >; + pub type ValidFrom = ::core::option::Option<::core::primitive::u32>; + } + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for Spend { + const PALLET: &'static str = "TreasuryPallet"; + const CALL: &'static str = "spend"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "Claim a spend."] + #[doc = ""] + #[doc = "## Dispatch Origin"] + #[doc = ""] + #[doc = "Must be signed"] + #[doc = ""] + #[doc = "## Details"] + #[doc = ""] + #[doc = "Spends must be claimed within some temporal bounds. A spend may be claimed within one"] + #[doc = "[`Config::PayoutPeriod`] from the `valid_from` block."] + #[doc = "In case of a payout failure, the spend status must be updated with the `check_status`"] + #[doc = "dispatchable before retrying with the current function."] + #[doc = ""] + #[doc = "### Parameters"] + #[doc = "- `index`: The spend index."] + #[doc = ""] + #[doc = "## Events"] + #[doc = ""] + #[doc = "Emits [`Event::Paid`] if successful."] + pub struct Payout { + pub index: payout::Index, + } + pub mod payout { + use super::runtime_types; + pub type Index = ::core::primitive::u32; + } + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for Payout { + const PALLET: &'static str = "TreasuryPallet"; + const CALL: &'static str = "payout"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "Check the status of the spend and remove it from the storage if processed."] + #[doc = ""] + #[doc = "## Dispatch Origin"] + #[doc = ""] + #[doc = "Must be signed."] + #[doc = ""] + #[doc = "## Details"] + #[doc = ""] + #[doc = "The status check is a prerequisite for retrying a failed payout."] + #[doc = "If a spend has either succeeded or expired, it is removed from the storage by this"] + #[doc = "function. In such instances, transaction fees are refunded."] + #[doc = ""] + #[doc = "### Parameters"] + #[doc = "- `index`: The spend index."] + #[doc = ""] + #[doc = "## Events"] + #[doc = ""] + #[doc = "Emits [`Event::PaymentFailed`] if the spend payout has failed."] + #[doc = "Emits [`Event::SpendProcessed`] if the spend payout has succeed."] + pub struct CheckStatus { + pub index: check_status::Index, + } + pub mod check_status { + use super::runtime_types; + pub type Index = ::core::primitive::u32; + } + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for CheckStatus { + const PALLET: &'static str = "TreasuryPallet"; + const CALL: &'static str = "check_status"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "Void previously approved spend."] + #[doc = ""] + #[doc = "## Dispatch Origin"] + #[doc = ""] + #[doc = "Must be [`Config::RejectOrigin`]."] + #[doc = ""] + #[doc = "## Details"] + #[doc = ""] + #[doc = "A spend void is only possible if the payout has not been attempted yet."] + #[doc = ""] + #[doc = "### Parameters"] + #[doc = "- `index`: The spend index."] + #[doc = ""] + #[doc = "## Events"] + #[doc = ""] + #[doc = "Emits [`Event::AssetSpendVoided`] if successful."] + pub struct VoidSpend { + pub index: void_spend::Index, + } + pub mod void_spend { + use super::runtime_types; + pub type Index = ::core::primitive::u32; + } + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for VoidSpend { + const PALLET: &'static str = "TreasuryPallet"; + const CALL: &'static str = "void_spend"; + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Propose and approve a spend of treasury funds."] + #[doc = ""] + #[doc = "## Dispatch Origin"] + #[doc = ""] + #[doc = "Must be [`Config::SpendOrigin`] with the `Success` value being at least `amount`."] + #[doc = ""] + #[doc = "### Details"] + #[doc = "NOTE: For record-keeping purposes, the proposer is deemed to be equivalent to the"] + #[doc = "beneficiary."] + #[doc = ""] + #[doc = "### Parameters"] + #[doc = "- `amount`: The amount to be transferred from the treasury to the `beneficiary`."] + #[doc = "- `beneficiary`: The destination account for the transfer."] + #[doc = ""] + #[doc = "## Events"] + #[doc = ""] + #[doc = "Emits [`Event::SpendApproved`] if successful."] + pub fn spend_local( + &self, + amount: types::spend_local::Amount, + beneficiary: types::spend_local::Beneficiary, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "TreasuryPallet", + "spend_local", + types::SpendLocal { amount, beneficiary }, + [ + 137u8, 171u8, 83u8, 247u8, 245u8, 212u8, 152u8, 127u8, 210u8, 71u8, + 254u8, 134u8, 189u8, 26u8, 249u8, 41u8, 214u8, 175u8, 24u8, 64u8, 33u8, + 90u8, 23u8, 134u8, 44u8, 110u8, 63u8, 46u8, 46u8, 146u8, 222u8, 79u8, + ], + ) + } + #[doc = "Force a previously approved proposal to be removed from the approval queue."] + #[doc = ""] + #[doc = "## Dispatch Origin"] + #[doc = ""] + #[doc = "Must be [`Config::RejectOrigin`]."] + #[doc = ""] + #[doc = "## Details"] + #[doc = ""] + #[doc = "The original deposit will no longer be returned."] + #[doc = ""] + #[doc = "### Parameters"] + #[doc = "- `proposal_id`: The index of a proposal"] + #[doc = ""] + #[doc = "### Complexity"] + #[doc = "- O(A) where `A` is the number of approvals"] + #[doc = ""] + #[doc = "### Errors"] + #[doc = "- [`Error::ProposalNotApproved`]: The `proposal_id` supplied was not found in the"] + #[doc = " approval queue, i.e., the proposal has not been approved. This could also mean the"] + #[doc = " proposal does not exist altogether, thus there is no way it would have been approved"] + #[doc = " in the first place."] + pub fn remove_approval( + &self, + proposal_id: types::remove_approval::ProposalId, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload + { + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "TreasuryPallet", + "remove_approval", + types::RemoveApproval { proposal_id }, + [ + 180u8, 20u8, 39u8, 227u8, 29u8, 228u8, 234u8, 36u8, 155u8, 114u8, + 197u8, 135u8, 185u8, 31u8, 56u8, 247u8, 224u8, 168u8, 254u8, 233u8, + 250u8, 134u8, 186u8, 155u8, 108u8, 84u8, 94u8, 226u8, 207u8, 130u8, + 196u8, 100u8, + ], + ) + } + #[doc = "Propose and approve a spend of treasury funds."] + #[doc = ""] + #[doc = "## Dispatch Origin"] + #[doc = ""] + #[doc = "Must be [`Config::SpendOrigin`] with the `Success` value being at least"] + #[doc = "`amount` of `asset_kind` in the native asset. The amount of `asset_kind` is converted"] + #[doc = "for assertion using the [`Config::BalanceConverter`]."] + #[doc = ""] + #[doc = "## Details"] + #[doc = ""] + #[doc = "Create an approved spend for transferring a specific `amount` of `asset_kind` to a"] + #[doc = "designated beneficiary. The spend must be claimed using the `payout` dispatchable within"] + #[doc = "the [`Config::PayoutPeriod`]."] + #[doc = ""] + #[doc = "### Parameters"] + #[doc = "- `asset_kind`: An indicator of the specific asset class to be spent."] + #[doc = "- `amount`: The amount to be transferred from the treasury to the `beneficiary`."] + #[doc = "- `beneficiary`: The beneficiary of the spend."] + #[doc = "- `valid_from`: The block number from which the spend can be claimed. It can refer to"] + #[doc = " the past if the resulting spend has not yet expired according to the"] + #[doc = " [`Config::PayoutPeriod`]. If `None`, the spend can be claimed immediately after"] + #[doc = " approval."] + #[doc = ""] + #[doc = "## Events"] + #[doc = ""] + #[doc = "Emits [`Event::AssetSpendApproved`] if successful."] + pub fn spend( + &self, + asset_kind: types::spend::AssetKind, + amount: types::spend::Amount, + beneficiary: types::spend::Beneficiary, + valid_from: types::spend::ValidFrom, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "TreasuryPallet", + "spend", + types::Spend { + asset_kind: ::subxt::ext::subxt_core::alloc::boxed::Box::new( + asset_kind, + ), + amount, + beneficiary: ::subxt::ext::subxt_core::alloc::boxed::Box::new( + beneficiary, + ), + valid_from, + }, + [ + 64u8, 121u8, 249u8, 219u8, 22u8, 188u8, 167u8, 85u8, 45u8, 27u8, 200u8, + 219u8, 138u8, 17u8, 230u8, 106u8, 145u8, 39u8, 43u8, 161u8, 69u8, 10u8, + 202u8, 251u8, 127u8, 131u8, 0u8, 194u8, 25u8, 153u8, 169u8, 206u8, + ], + ) + } + #[doc = "Claim a spend."] + #[doc = ""] + #[doc = "## Dispatch Origin"] + #[doc = ""] + #[doc = "Must be signed"] + #[doc = ""] + #[doc = "## Details"] + #[doc = ""] + #[doc = "Spends must be claimed within some temporal bounds. A spend may be claimed within one"] + #[doc = "[`Config::PayoutPeriod`] from the `valid_from` block."] + #[doc = "In case of a payout failure, the spend status must be updated with the `check_status`"] + #[doc = "dispatchable before retrying with the current function."] + #[doc = ""] + #[doc = "### Parameters"] + #[doc = "- `index`: The spend index."] + #[doc = ""] + #[doc = "## Events"] + #[doc = ""] + #[doc = "Emits [`Event::Paid`] if successful."] + pub fn payout( + &self, + index: types::payout::Index, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "TreasuryPallet", + "payout", + types::Payout { index }, + [ + 179u8, 254u8, 82u8, 94u8, 248u8, 26u8, 6u8, 34u8, 93u8, 244u8, 186u8, + 199u8, 163u8, 32u8, 110u8, 220u8, 78u8, 11u8, 168u8, 182u8, 169u8, + 56u8, 53u8, 194u8, 168u8, 218u8, 131u8, 38u8, 46u8, 156u8, 93u8, 234u8, + ], + ) + } + #[doc = "Check the status of the spend and remove it from the storage if processed."] + #[doc = ""] + #[doc = "## Dispatch Origin"] + #[doc = ""] + #[doc = "Must be signed."] + #[doc = ""] + #[doc = "## Details"] + #[doc = ""] + #[doc = "The status check is a prerequisite for retrying a failed payout."] + #[doc = "If a spend has either succeeded or expired, it is removed from the storage by this"] + #[doc = "function. In such instances, transaction fees are refunded."] + #[doc = ""] + #[doc = "### Parameters"] + #[doc = "- `index`: The spend index."] + #[doc = ""] + #[doc = "## Events"] + #[doc = ""] + #[doc = "Emits [`Event::PaymentFailed`] if the spend payout has failed."] + #[doc = "Emits [`Event::SpendProcessed`] if the spend payout has succeed."] + pub fn check_status( + &self, + index: types::check_status::Index, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "TreasuryPallet", + "check_status", + types::CheckStatus { index }, + [ + 164u8, 111u8, 10u8, 11u8, 104u8, 237u8, 112u8, 240u8, 104u8, 130u8, + 179u8, 221u8, 54u8, 18u8, 8u8, 172u8, 148u8, 245u8, 110u8, 174u8, 75u8, + 38u8, 46u8, 143u8, 101u8, 232u8, 65u8, 252u8, 36u8, 152u8, 29u8, 209u8, + ], + ) + } + #[doc = "Void previously approved spend."] + #[doc = ""] + #[doc = "## Dispatch Origin"] + #[doc = ""] + #[doc = "Must be [`Config::RejectOrigin`]."] + #[doc = ""] + #[doc = "## Details"] + #[doc = ""] + #[doc = "A spend void is only possible if the payout has not been attempted yet."] + #[doc = ""] + #[doc = "### Parameters"] + #[doc = "- `index`: The spend index."] + #[doc = ""] + #[doc = "## Events"] + #[doc = ""] + #[doc = "Emits [`Event::AssetSpendVoided`] if successful."] + pub fn void_spend( + &self, + index: types::void_spend::Index, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "TreasuryPallet", + "void_spend", + types::VoidSpend { index }, + [ + 9u8, 212u8, 174u8, 92u8, 43u8, 102u8, 224u8, 124u8, 247u8, 239u8, + 196u8, 68u8, 132u8, 171u8, 116u8, 206u8, 52u8, 23u8, 92u8, 31u8, 156u8, + 160u8, 25u8, 16u8, 125u8, 60u8, 9u8, 109u8, 145u8, 139u8, 102u8, 224u8, + ], + ) + } + } + } + #[doc = "The `Event` enum of this pallet"] + pub type Event = runtime_types::pallet_treasury::pallet::Event; + pub mod events { + use super::runtime_types; + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + #[doc = "We have ended a spend period and will now allocate funds."] + pub struct Spending { + pub budget_remaining: spending::BudgetRemaining, + } + pub mod spending { + use super::runtime_types; + pub type BudgetRemaining = ::core::primitive::u128; + } + impl ::subxt::ext::subxt_core::events::StaticEvent for Spending { + const PALLET: &'static str = "TreasuryPallet"; + const EVENT: &'static str = "Spending"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + #[doc = "Some funds have been allocated."] + pub struct Awarded { + pub proposal_index: awarded::ProposalIndex, + pub award: awarded::Award, + pub account: awarded::Account, + } + pub mod awarded { + use super::runtime_types; + pub type ProposalIndex = ::core::primitive::u32; + pub type Award = ::core::primitive::u128; + pub type Account = ::subxt::ext::subxt_core::utils::AccountId32; + } + impl ::subxt::ext::subxt_core::events::StaticEvent for Awarded { + const PALLET: &'static str = "TreasuryPallet"; + const EVENT: &'static str = "Awarded"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + #[doc = "Some of our funds have been burnt."] + pub struct Burnt { + pub burnt_funds: burnt::BurntFunds, + } + pub mod burnt { + use super::runtime_types; + pub type BurntFunds = ::core::primitive::u128; + } + impl ::subxt::ext::subxt_core::events::StaticEvent for Burnt { + const PALLET: &'static str = "TreasuryPallet"; + const EVENT: &'static str = "Burnt"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + #[doc = "Spending has finished; this is the amount that rolls over until next spend."] + pub struct Rollover { + pub rollover_balance: rollover::RolloverBalance, + } + pub mod rollover { + use super::runtime_types; + pub type RolloverBalance = ::core::primitive::u128; + } + impl ::subxt::ext::subxt_core::events::StaticEvent for Rollover { + const PALLET: &'static str = "TreasuryPallet"; + const EVENT: &'static str = "Rollover"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + #[doc = "Some funds have been deposited."] + pub struct Deposit { + pub value: deposit::Value, + } + pub mod deposit { + use super::runtime_types; + pub type Value = ::core::primitive::u128; + } + impl ::subxt::ext::subxt_core::events::StaticEvent for Deposit { + const PALLET: &'static str = "TreasuryPallet"; + const EVENT: &'static str = "Deposit"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + #[doc = "A new spend proposal has been approved."] + pub struct SpendApproved { + pub proposal_index: spend_approved::ProposalIndex, + pub amount: spend_approved::Amount, + pub beneficiary: spend_approved::Beneficiary, + } + pub mod spend_approved { + use super::runtime_types; + pub type ProposalIndex = ::core::primitive::u32; + pub type Amount = ::core::primitive::u128; + pub type Beneficiary = ::subxt::ext::subxt_core::utils::AccountId32; + } + impl ::subxt::ext::subxt_core::events::StaticEvent for SpendApproved { + const PALLET: &'static str = "TreasuryPallet"; + const EVENT: &'static str = "SpendApproved"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + #[doc = "The inactive funds of the pallet have been updated."] + pub struct UpdatedInactive { + pub reactivated: updated_inactive::Reactivated, + pub deactivated: updated_inactive::Deactivated, + } + pub mod updated_inactive { + use super::runtime_types; + pub type Reactivated = ::core::primitive::u128; + pub type Deactivated = ::core::primitive::u128; + } + impl ::subxt::ext::subxt_core::events::StaticEvent for UpdatedInactive { + const PALLET: &'static str = "TreasuryPallet"; + const EVENT: &'static str = "UpdatedInactive"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + #[doc = "A new asset spend proposal has been approved."] + pub struct AssetSpendApproved { + pub index: asset_spend_approved::Index, + pub asset_kind: asset_spend_approved::AssetKind, + pub amount: asset_spend_approved::Amount, + pub beneficiary: asset_spend_approved::Beneficiary, + pub valid_from: asset_spend_approved::ValidFrom, + pub expire_at: asset_spend_approved::ExpireAt, + } + pub mod asset_spend_approved { + use super::runtime_types; + pub type Index = ::core::primitive::u32; + pub type AssetKind = (); + pub type Amount = ::core::primitive::u128; + pub type Beneficiary = ::subxt::ext::subxt_core::utils::AccountId32; + pub type ValidFrom = ::core::primitive::u32; + pub type ExpireAt = ::core::primitive::u32; + } + impl ::subxt::ext::subxt_core::events::StaticEvent for AssetSpendApproved { + const PALLET: &'static str = "TreasuryPallet"; + const EVENT: &'static str = "AssetSpendApproved"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + #[doc = "An approved spend was voided."] + pub struct AssetSpendVoided { + pub index: asset_spend_voided::Index, + } + pub mod asset_spend_voided { + use super::runtime_types; + pub type Index = ::core::primitive::u32; + } + impl ::subxt::ext::subxt_core::events::StaticEvent for AssetSpendVoided { + const PALLET: &'static str = "TreasuryPallet"; + const EVENT: &'static str = "AssetSpendVoided"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + #[doc = "A payment happened."] + pub struct Paid { + pub index: paid::Index, + pub payment_id: paid::PaymentId, + } + pub mod paid { + use super::runtime_types; + pub type Index = ::core::primitive::u32; + pub type PaymentId = ::core::primitive::u32; + } + impl ::subxt::ext::subxt_core::events::StaticEvent for Paid { + const PALLET: &'static str = "TreasuryPallet"; + const EVENT: &'static str = "Paid"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + #[doc = "A payment failed and can be retried."] + pub struct PaymentFailed { + pub index: payment_failed::Index, + pub payment_id: payment_failed::PaymentId, + } + pub mod payment_failed { + use super::runtime_types; + pub type Index = ::core::primitive::u32; + pub type PaymentId = ::core::primitive::u32; + } + impl ::subxt::ext::subxt_core::events::StaticEvent for PaymentFailed { + const PALLET: &'static str = "TreasuryPallet"; + const EVENT: &'static str = "PaymentFailed"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + #[doc = "A spend was processed and removed from the storage. It might have been successfully"] + #[doc = "paid or it may have expired."] + pub struct SpendProcessed { + pub index: spend_processed::Index, + } + pub mod spend_processed { + use super::runtime_types; + pub type Index = ::core::primitive::u32; + } + impl ::subxt::ext::subxt_core::events::StaticEvent for SpendProcessed { + const PALLET: &'static str = "TreasuryPallet"; + const EVENT: &'static str = "SpendProcessed"; + } + } + pub mod storage { + use super::runtime_types; + pub mod types { + use super::runtime_types; + pub mod proposal_count { + use super::runtime_types; + pub type ProposalCount = ::core::primitive::u32; + } + pub mod proposals { + use super::runtime_types; + pub type Proposals = runtime_types::pallet_treasury::Proposal< + ::subxt::ext::subxt_core::utils::AccountId32, + ::core::primitive::u128, + >; + pub type Param0 = ::core::primitive::u32; + } + pub mod deactivated { + use super::runtime_types; + pub type Deactivated = ::core::primitive::u128; + } + pub mod approvals { + use super::runtime_types; + pub type Approvals = + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u32, + >; + } + pub mod spend_count { + use super::runtime_types; + pub type SpendCount = ::core::primitive::u32; + } + pub mod spends { + use super::runtime_types; + pub type Spends = runtime_types::pallet_treasury::SpendStatus< + (), + ::core::primitive::u128, + ::subxt::ext::subxt_core::utils::AccountId32, + ::core::primitive::u32, + ::core::primitive::u32, + >; + pub type Param0 = ::core::primitive::u32; + } + pub mod last_spend_period { + use super::runtime_types; + pub type LastSpendPeriod = ::core::primitive::u32; + } + } + pub struct StorageApi; + impl StorageApi { + #[doc = " DEPRECATED: associated with `spend_local` call and will be removed in May 2025."] + #[doc = " Refer to for migration to `spend`."] + #[doc = ""] + #[doc = " Number of proposals that have been made."] + pub fn proposal_count( + &self, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::proposal_count::ProposalCount, + ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, + (), + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "TreasuryPallet", + "ProposalCount", + (), + [ + 91u8, 238u8, 246u8, 106u8, 95u8, 66u8, 83u8, 134u8, 1u8, 225u8, 164u8, + 216u8, 113u8, 101u8, 203u8, 200u8, 113u8, 97u8, 246u8, 228u8, 140u8, + 29u8, 29u8, 48u8, 176u8, 137u8, 93u8, 230u8, 56u8, 75u8, 51u8, 149u8, + ], + ) + } + #[doc = " DEPRECATED: associated with `spend_local` call and will be removed in May 2025."] + #[doc = " Refer to for migration to `spend`."] + #[doc = ""] + #[doc = " Proposals that have been made."] + pub fn proposals_iter( + &self, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::proposals::Proposals, + (), + (), + ::subxt::ext::subxt_core::utils::Yes, + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "TreasuryPallet", + "Proposals", + (), + [ + 207u8, 135u8, 145u8, 146u8, 48u8, 10u8, 252u8, 40u8, 20u8, 115u8, + 205u8, 41u8, 173u8, 83u8, 115u8, 46u8, 106u8, 40u8, 130u8, 157u8, + 213u8, 87u8, 45u8, 23u8, 14u8, 167u8, 99u8, 208u8, 153u8, 163u8, 141u8, + 55u8, + ], + ) + } + #[doc = " DEPRECATED: associated with `spend_local` call and will be removed in May 2025."] + #[doc = " Refer to for migration to `spend`."] + #[doc = ""] + #[doc = " Proposals that have been made."] + pub fn proposals( + &self, + _0: types::proposals::Param0, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + ::subxt::ext::subxt_core::storage::address::StaticStorageKey< + types::proposals::Param0, + >, + types::proposals::Proposals, + ::subxt::ext::subxt_core::utils::Yes, + (), + (), + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "TreasuryPallet", + "Proposals", + ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), + [ + 207u8, 135u8, 145u8, 146u8, 48u8, 10u8, 252u8, 40u8, 20u8, 115u8, + 205u8, 41u8, 173u8, 83u8, 115u8, 46u8, 106u8, 40u8, 130u8, 157u8, + 213u8, 87u8, 45u8, 23u8, 14u8, 167u8, 99u8, 208u8, 153u8, 163u8, 141u8, + 55u8, + ], + ) + } + #[doc = " The amount which has been reported as inactive to Currency."] + pub fn deactivated( + &self, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::deactivated::Deactivated, + ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, + (), + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "TreasuryPallet", + "Deactivated", + (), + [ + 120u8, 221u8, 159u8, 56u8, 161u8, 44u8, 54u8, 233u8, 47u8, 114u8, + 170u8, 150u8, 52u8, 24u8, 137u8, 212u8, 122u8, 247u8, 40u8, 17u8, + 208u8, 130u8, 42u8, 154u8, 33u8, 222u8, 59u8, 116u8, 0u8, 15u8, 79u8, + 123u8, + ], + ) + } + #[doc = " DEPRECATED: associated with `spend_local` call and will be removed in May 2025."] + #[doc = " Refer to for migration to `spend`."] + #[doc = ""] + #[doc = " Proposal indices that have been approved but not yet awarded."] + pub fn approvals( + &self, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::approvals::Approvals, + ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, + (), + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "TreasuryPallet", + "Approvals", + (), + [ + 78u8, 147u8, 186u8, 235u8, 17u8, 40u8, 247u8, 235u8, 67u8, 222u8, 3u8, + 14u8, 248u8, 17u8, 67u8, 180u8, 93u8, 161u8, 64u8, 35u8, 119u8, 194u8, + 187u8, 226u8, 135u8, 162u8, 147u8, 174u8, 139u8, 72u8, 99u8, 212u8, + ], + ) + } + #[doc = " The count of spends that have been made."] + pub fn spend_count( + &self, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::spend_count::SpendCount, + ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, + (), + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "TreasuryPallet", + "SpendCount", + (), + [ + 220u8, 74u8, 248u8, 52u8, 243u8, 209u8, 42u8, 236u8, 27u8, 98u8, 76u8, + 153u8, 129u8, 176u8, 34u8, 177u8, 33u8, 132u8, 21u8, 71u8, 206u8, + 146u8, 222u8, 44u8, 232u8, 246u8, 205u8, 92u8, 240u8, 136u8, 182u8, + 30u8, + ], + ) + } + #[doc = " Spends that have been approved and being processed."] + pub fn spends_iter( + &self, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::spends::Spends, + (), + (), + ::subxt::ext::subxt_core::utils::Yes, + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "TreasuryPallet", + "Spends", + (), + [ + 140u8, 4u8, 241u8, 80u8, 4u8, 219u8, 107u8, 152u8, 206u8, 175u8, 107u8, + 172u8, 208u8, 71u8, 174u8, 99u8, 198u8, 52u8, 142u8, 126u8, 145u8, + 171u8, 254u8, 9u8, 235u8, 158u8, 186u8, 101u8, 140u8, 200u8, 96u8, + 168u8, + ], + ) + } + #[doc = " Spends that have been approved and being processed."] + pub fn spends( + &self, + _0: types::spends::Param0, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + ::subxt::ext::subxt_core::storage::address::StaticStorageKey< + types::spends::Param0, + >, + types::spends::Spends, + ::subxt::ext::subxt_core::utils::Yes, + (), + (), + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "TreasuryPallet", + "Spends", + ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), + [ + 140u8, 4u8, 241u8, 80u8, 4u8, 219u8, 107u8, 152u8, 206u8, 175u8, 107u8, + 172u8, 208u8, 71u8, 174u8, 99u8, 198u8, 52u8, 142u8, 126u8, 145u8, + 171u8, 254u8, 9u8, 235u8, 158u8, 186u8, 101u8, 140u8, 200u8, 96u8, + 168u8, + ], + ) + } + #[doc = " The blocknumber for the last triggered spend period."] + pub fn last_spend_period( + &self, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::last_spend_period::LastSpendPeriod, + ::subxt::ext::subxt_core::utils::Yes, + (), + (), + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "TreasuryPallet", + "LastSpendPeriod", + (), + [ + 6u8, 200u8, 107u8, 132u8, 60u8, 31u8, 24u8, 196u8, 108u8, 227u8, 5u8, + 63u8, 249u8, 139u8, 82u8, 140u8, 169u8, 242u8, 118u8, 93u8, 83u8, + 155u8, 120u8, 175u8, 224u8, 227u8, 39u8, 39u8, 255u8, 247u8, 79u8, + 30u8, + ], + ) + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " Period between successive spends."] + pub fn spend_period( + &self, + ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< + ::core::primitive::u32, + > { + ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( + "TreasuryPallet", + "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, + ], + ) + } + #[doc = " Percentage of spare funds (if any) that are burnt per spend period."] + pub fn burn( + &self, + ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< + runtime_types::sp_arithmetic::per_things::Permill, + > { + ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( + "TreasuryPallet", + "Burn", + [ + 65u8, 93u8, 120u8, 165u8, 204u8, 81u8, 159u8, 163u8, 93u8, 135u8, + 114u8, 121u8, 147u8, 35u8, 215u8, 213u8, 4u8, 223u8, 83u8, 37u8, 225u8, + 200u8, 189u8, 156u8, 140u8, 36u8, 58u8, 46u8, 42u8, 232u8, 155u8, 0u8, + ], + ) + } + #[doc = " The treasury's pallet id, used for deriving its sovereign account ID."] + pub fn pallet_id( + &self, + ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< + runtime_types::frame_support::PalletId, + > { + ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( + "TreasuryPallet", + "PalletId", + [ + 56u8, 243u8, 53u8, 83u8, 154u8, 179u8, 170u8, 80u8, 133u8, 173u8, 61u8, + 161u8, 47u8, 225u8, 146u8, 21u8, 50u8, 229u8, 248u8, 27u8, 104u8, 58u8, + 129u8, 197u8, 102u8, 160u8, 168u8, 205u8, 154u8, 42u8, 217u8, 53u8, + ], + ) + } + #[doc = " DEPRECATED: associated with `spend_local` call and will be removed in May 2025."] + #[doc = " Refer to for migration to `spend`."] + #[doc = ""] + #[doc = " The maximum number of approvals that can wait in the spending queue."] + #[doc = ""] + #[doc = " NOTE: This parameter is also used within the Bounties Pallet extension if enabled."] + pub fn max_approvals( + &self, + ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< + ::core::primitive::u32, + > { + ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( + "TreasuryPallet", + "MaxApprovals", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " The period during which an approved treasury spend has to be claimed."] + pub fn payout_period( + &self, + ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< + ::core::primitive::u32, + > { + ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( + "TreasuryPallet", + "PayoutPeriod", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " Gets this pallet's derived pot account."] + pub fn pot_account( + &self, + ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< + ::subxt::ext::subxt_core::utils::AccountId32, + > { + ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( + "TreasuryPallet", + "pot_account", + [ + 115u8, 233u8, 13u8, 223u8, 88u8, 20u8, 202u8, 139u8, 153u8, 28u8, + 155u8, 157u8, 224u8, 66u8, 3u8, 250u8, 23u8, 53u8, 88u8, 168u8, 211u8, + 204u8, 122u8, 166u8, 248u8, 23u8, 174u8, 225u8, 99u8, 108u8, 89u8, + 135u8, + ], + ) + } + } + } + } + pub mod origins { + use super::{root_mod, runtime_types}; + } + pub mod recovery { + use super::{root_mod, runtime_types}; + #[doc = "The `Error` enum of this pallet."] + pub type Error = runtime_types::pallet_recovery::pallet::Error; + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub type Call = runtime_types::pallet_recovery::pallet::Call; + pub mod calls { + use super::{root_mod, runtime_types}; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "Send a call through a recovered account."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and registered to"] + #[doc = "be able to make calls on behalf of the recovered account."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `account`: The recovered account you want to make a call on-behalf-of."] + #[doc = "- `call`: The call you want to make with the recovered account."] + pub struct AsRecovered { + pub account: as_recovered::Account, + pub call: ::subxt::ext::subxt_core::alloc::boxed::Box, + } + pub mod as_recovered { + use super::runtime_types; + pub type Account = ::subxt::ext::subxt_core::utils::MultiAddress< + ::subxt::ext::subxt_core::utils::AccountId32, + (), + >; + pub type Call = runtime_types::quantus_runtime::RuntimeCall; + } + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for AsRecovered { + const PALLET: &'static str = "Recovery"; + const CALL: &'static str = "as_recovered"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "Allow ROOT to bypass the recovery process and set a rescuer account"] + #[doc = "for a lost account directly."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _ROOT_."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `lost`: The \"lost account\" to be recovered."] + #[doc = "- `rescuer`: The \"rescuer account\" which can call as the lost account."] + pub struct SetRecovered { + pub lost: set_recovered::Lost, + pub rescuer: set_recovered::Rescuer, + } + pub mod set_recovered { + use super::runtime_types; + pub type Lost = ::subxt::ext::subxt_core::utils::MultiAddress< + ::subxt::ext::subxt_core::utils::AccountId32, + (), + >; + pub type Rescuer = ::subxt::ext::subxt_core::utils::MultiAddress< + ::subxt::ext::subxt_core::utils::AccountId32, + (), + >; + } + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for SetRecovered { + const PALLET: &'static str = "Recovery"; + const CALL: &'static str = "set_recovered"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "Create a recovery configuration for your account. This makes your account recoverable."] + #[doc = ""] + #[doc = "Payment: `ConfigDepositBase` + `FriendDepositFactor` * #_of_friends balance"] + #[doc = "will be reserved for storing the recovery configuration. This deposit is returned"] + #[doc = "in full when the user calls `remove_recovery`."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `friends`: A list of friends you trust to vouch for recovery attempts. Should be"] + #[doc = " ordered and contain no duplicate values."] + #[doc = "- `threshold`: The number of friends that must vouch for a recovery attempt before the"] + #[doc = " account can be recovered. Should be less than or equal to the length of the list of"] + #[doc = " friends."] + #[doc = "- `delay_period`: The number of blocks after a recovery attempt is initialized that"] + #[doc = " needs to pass before the account can be recovered."] + pub struct CreateRecovery { + pub friends: create_recovery::Friends, + pub threshold: create_recovery::Threshold, + pub delay_period: create_recovery::DelayPeriod, + } + pub mod create_recovery { + use super::runtime_types; + pub type Friends = ::subxt::ext::subxt_core::alloc::vec::Vec< + ::subxt::ext::subxt_core::utils::AccountId32, + >; + pub type Threshold = ::core::primitive::u16; + pub type DelayPeriod = ::core::primitive::u32; + } + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for CreateRecovery { + const PALLET: &'static str = "Recovery"; + const CALL: &'static str = "create_recovery"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "Initiate the process for recovering a recoverable account."] + #[doc = ""] + #[doc = "Payment: `RecoveryDeposit` balance will be reserved for initiating the"] + #[doc = "recovery process. This deposit will always be repatriated to the account"] + #[doc = "trying to be recovered. See `close_recovery`."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `account`: The lost account that you want to recover. This account needs to be"] + #[doc = " recoverable (i.e. have a recovery configuration)."] + pub struct InitiateRecovery { + pub account: initiate_recovery::Account, + } + pub mod initiate_recovery { + use super::runtime_types; + pub type Account = ::subxt::ext::subxt_core::utils::MultiAddress< + ::subxt::ext::subxt_core::utils::AccountId32, + (), + >; + } + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for InitiateRecovery { + const PALLET: &'static str = "Recovery"; + const CALL: &'static str = "initiate_recovery"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "Allow a \"friend\" of a recoverable account to vouch for an active recovery"] + #[doc = "process for that account."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and must be a \"friend\""] + #[doc = "for the recoverable account."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `lost`: The lost account that you want to recover."] + #[doc = "- `rescuer`: The account trying to rescue the lost account that you want to vouch for."] + #[doc = ""] + #[doc = "The combination of these two parameters must point to an active recovery"] + #[doc = "process."] + pub struct VouchRecovery { + pub lost: vouch_recovery::Lost, + pub rescuer: vouch_recovery::Rescuer, + } + pub mod vouch_recovery { + use super::runtime_types; + pub type Lost = ::subxt::ext::subxt_core::utils::MultiAddress< + ::subxt::ext::subxt_core::utils::AccountId32, + (), + >; + pub type Rescuer = ::subxt::ext::subxt_core::utils::MultiAddress< + ::subxt::ext::subxt_core::utils::AccountId32, + (), + >; + } + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for VouchRecovery { + const PALLET: &'static str = "Recovery"; + const CALL: &'static str = "vouch_recovery"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "Allow a successful rescuer to claim their recovered account."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and must be a \"rescuer\""] + #[doc = "who has successfully completed the account recovery process: collected"] + #[doc = "`threshold` or more vouches, waited `delay_period` blocks since initiation."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `account`: The lost account that you want to claim has been successfully recovered by"] + #[doc = " you."] + pub struct ClaimRecovery { + pub account: claim_recovery::Account, + } + pub mod claim_recovery { + use super::runtime_types; + pub type Account = ::subxt::ext::subxt_core::utils::MultiAddress< + ::subxt::ext::subxt_core::utils::AccountId32, + (), + >; + } + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for ClaimRecovery { + const PALLET: &'static str = "Recovery"; + const CALL: &'static str = "claim_recovery"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "As the controller of a recoverable account, close an active recovery"] + #[doc = "process for your account."] + #[doc = ""] + #[doc = "Payment: By calling this function, the recoverable account will receive"] + #[doc = "the recovery deposit `RecoveryDeposit` placed by the rescuer."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and must be a"] + #[doc = "recoverable account with an active recovery process for it."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `rescuer`: The account trying to rescue this recoverable account."] + pub struct CloseRecovery { + pub rescuer: close_recovery::Rescuer, + } + pub mod close_recovery { + use super::runtime_types; + pub type Rescuer = ::subxt::ext::subxt_core::utils::MultiAddress< + ::subxt::ext::subxt_core::utils::AccountId32, + (), + >; + } + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for CloseRecovery { + const PALLET: &'static str = "Recovery"; + const CALL: &'static str = "close_recovery"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "Remove the recovery process for your account. Recovered accounts are still accessible."] + #[doc = ""] + #[doc = "NOTE: The user must make sure to call `close_recovery` on all active"] + #[doc = "recovery attempts before calling this function else it will fail."] + #[doc = ""] + #[doc = "Payment: By calling this function the recoverable account will unreserve"] + #[doc = "their recovery configuration deposit."] + #[doc = "(`ConfigDepositBase` + `FriendDepositFactor` * #_of_friends)"] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and must be a"] + #[doc = "recoverable account (i.e. has a recovery configuration)."] + pub struct RemoveRecovery; + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for RemoveRecovery { + const PALLET: &'static str = "Recovery"; + const CALL: &'static str = "remove_recovery"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "Cancel the ability to use `as_recovered` for `account`."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and registered to"] + #[doc = "be able to make calls on behalf of the recovered account."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `account`: The recovered account you are able to call on-behalf-of."] + pub struct CancelRecovered { + pub account: cancel_recovered::Account, + } + pub mod cancel_recovered { + use super::runtime_types; + pub type Account = ::subxt::ext::subxt_core::utils::MultiAddress< + ::subxt::ext::subxt_core::utils::AccountId32, + (), + >; + } + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for CancelRecovered { + const PALLET: &'static str = "Recovery"; + const CALL: &'static str = "cancel_recovered"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "Poke deposits for recovery configurations and / or active recoveries."] + #[doc = ""] + #[doc = "This can be used by accounts to possibly lower their locked amount."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `maybe_account`: Optional recoverable account for which you have an active recovery"] + #[doc = "and want to adjust the deposit for the active recovery."] + #[doc = ""] + #[doc = "This function checks both recovery configuration deposit and active recovery deposits"] + #[doc = "of the caller:"] + #[doc = "- If the caller has created a recovery configuration, checks and adjusts its deposit"] + #[doc = "- If the caller has initiated any active recoveries, and provides the account in"] + #[doc = "`maybe_account`, checks and adjusts those deposits"] + #[doc = ""] + #[doc = "If any deposit is updated, the difference will be reserved/unreserved from the caller's"] + #[doc = "account."] + #[doc = ""] + #[doc = "The transaction is made free if any deposit is updated and paid otherwise."] + #[doc = ""] + #[doc = "Emits `DepositPoked` if any deposit is updated."] + #[doc = "Multiple events may be emitted in case both types of deposits are updated."] + pub struct PokeDeposit { + pub maybe_account: poke_deposit::MaybeAccount, + } + pub mod poke_deposit { + use super::runtime_types; + pub type MaybeAccount = ::core::option::Option< + ::subxt::ext::subxt_core::utils::MultiAddress< ::subxt::ext::subxt_core::utils::AccountId32, (), >, - }, - #[codec(index = 30)] - #[doc = "Return the deposit (if any) of a target asset account. Useful if you are the depositor."] - #[doc = ""] - #[doc = "The origin must be Signed and either the account owner, depositor, or asset `Admin`. In"] - #[doc = "order to burn a non-zero balance of the asset, the caller must be the account and should"] - #[doc = "use `refund`."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset for the account holding a deposit."] - #[doc = "- `who`: The account to refund."] - #[doc = ""] - #[doc = "Emits `Refunded` event when successful."] - refund_other { - #[codec(compact)] - id: ::core::primitive::u32, - who: ::subxt::ext::subxt_core::utils::MultiAddress< + >; + } + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for PokeDeposit { + const PALLET: &'static str = "Recovery"; + const CALL: &'static str = "poke_deposit"; + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Send a call through a recovered account."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and registered to"] + #[doc = "be able to make calls on behalf of the recovered account."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `account`: The recovered account you want to make a call on-behalf-of."] + #[doc = "- `call`: The call you want to make with the recovered account."] + pub fn as_recovered( + &self, + account: types::as_recovered::Account, + call: types::as_recovered::Call, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "Recovery", + "as_recovered", + types::AsRecovered { + account, + call: ::subxt::ext::subxt_core::alloc::boxed::Box::new(call), + }, + [ + 231u8, 130u8, 246u8, 209u8, 160u8, 0u8, 86u8, 24u8, 13u8, 132u8, 210u8, + 234u8, 145u8, 137u8, 200u8, 207u8, 165u8, 168u8, 232u8, 129u8, 181u8, + 63u8, 61u8, 47u8, 72u8, 255u8, 11u8, 90u8, 174u8, 216u8, 132u8, 30u8, + ], + ) + } + #[doc = "Allow ROOT to bypass the recovery process and set a rescuer account"] + #[doc = "for a lost account directly."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _ROOT_."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `lost`: The \"lost account\" to be recovered."] + #[doc = "- `rescuer`: The \"rescuer account\" which can call as the lost account."] + pub fn set_recovered( + &self, + lost: types::set_recovered::Lost, + rescuer: types::set_recovered::Rescuer, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "Recovery", + "set_recovered", + types::SetRecovered { lost, rescuer }, + [ + 194u8, 147u8, 14u8, 197u8, 132u8, 185u8, 122u8, 81u8, 61u8, 14u8, 10u8, + 177u8, 74u8, 184u8, 150u8, 217u8, 246u8, 149u8, 26u8, 165u8, 196u8, + 83u8, 230u8, 195u8, 213u8, 40u8, 51u8, 180u8, 23u8, 90u8, 3u8, 14u8, + ], + ) + } + #[doc = "Create a recovery configuration for your account. This makes your account recoverable."] + #[doc = ""] + #[doc = "Payment: `ConfigDepositBase` + `FriendDepositFactor` * #_of_friends balance"] + #[doc = "will be reserved for storing the recovery configuration. This deposit is returned"] + #[doc = "in full when the user calls `remove_recovery`."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `friends`: A list of friends you trust to vouch for recovery attempts. Should be"] + #[doc = " ordered and contain no duplicate values."] + #[doc = "- `threshold`: The number of friends that must vouch for a recovery attempt before the"] + #[doc = " account can be recovered. Should be less than or equal to the length of the list of"] + #[doc = " friends."] + #[doc = "- `delay_period`: The number of blocks after a recovery attempt is initialized that"] + #[doc = " needs to pass before the account can be recovered."] + pub fn create_recovery( + &self, + friends: types::create_recovery::Friends, + threshold: types::create_recovery::Threshold, + delay_period: types::create_recovery::DelayPeriod, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload + { + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "Recovery", + "create_recovery", + types::CreateRecovery { friends, threshold, delay_period }, + [ + 36u8, 175u8, 11u8, 85u8, 95u8, 170u8, 58u8, 193u8, 102u8, 18u8, 117u8, + 27u8, 199u8, 214u8, 70u8, 47u8, 129u8, 130u8, 109u8, 242u8, 240u8, + 255u8, 120u8, 176u8, 40u8, 243u8, 175u8, 71u8, 3u8, 91u8, 186u8, 220u8, + ], + ) + } + #[doc = "Initiate the process for recovering a recoverable account."] + #[doc = ""] + #[doc = "Payment: `RecoveryDeposit` balance will be reserved for initiating the"] + #[doc = "recovery process. This deposit will always be repatriated to the account"] + #[doc = "trying to be recovered. See `close_recovery`."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `account`: The lost account that you want to recover. This account needs to be"] + #[doc = " recoverable (i.e. have a recovery configuration)."] + pub fn initiate_recovery( + &self, + account: types::initiate_recovery::Account, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload + { + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "Recovery", + "initiate_recovery", + types::InitiateRecovery { account }, + [ + 60u8, 243u8, 229u8, 176u8, 221u8, 52u8, 44u8, 224u8, 233u8, 14u8, 89u8, + 100u8, 174u8, 74u8, 38u8, 32u8, 97u8, 48u8, 53u8, 74u8, 30u8, 242u8, + 19u8, 114u8, 145u8, 74u8, 69u8, 125u8, 227u8, 214u8, 144u8, 58u8, + ], + ) + } + #[doc = "Allow a \"friend\" of a recoverable account to vouch for an active recovery"] + #[doc = "process for that account."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and must be a \"friend\""] + #[doc = "for the recoverable account."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `lost`: The lost account that you want to recover."] + #[doc = "- `rescuer`: The account trying to rescue the lost account that you want to vouch for."] + #[doc = ""] + #[doc = "The combination of these two parameters must point to an active recovery"] + #[doc = "process."] + pub fn vouch_recovery( + &self, + lost: types::vouch_recovery::Lost, + rescuer: types::vouch_recovery::Rescuer, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload + { + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "Recovery", + "vouch_recovery", + types::VouchRecovery { lost, rescuer }, + [ + 97u8, 190u8, 60u8, 15u8, 191u8, 117u8, 1u8, 217u8, 62u8, 40u8, 210u8, + 1u8, 237u8, 111u8, 48u8, 196u8, 180u8, 154u8, 198u8, 12u8, 108u8, 42u8, + 6u8, 234u8, 2u8, 113u8, 163u8, 111u8, 80u8, 146u8, 6u8, 73u8, + ], + ) + } + #[doc = "Allow a successful rescuer to claim their recovered account."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and must be a \"rescuer\""] + #[doc = "who has successfully completed the account recovery process: collected"] + #[doc = "`threshold` or more vouches, waited `delay_period` blocks since initiation."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `account`: The lost account that you want to claim has been successfully recovered by"] + #[doc = " you."] + pub fn claim_recovery( + &self, + account: types::claim_recovery::Account, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload + { + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "Recovery", + "claim_recovery", + types::ClaimRecovery { account }, + [ + 41u8, 47u8, 162u8, 88u8, 13u8, 166u8, 130u8, 146u8, 218u8, 162u8, + 166u8, 33u8, 89u8, 129u8, 177u8, 178u8, 68u8, 128u8, 161u8, 229u8, + 207u8, 3u8, 57u8, 35u8, 211u8, 208u8, 74u8, 155u8, 183u8, 173u8, 74u8, + 56u8, + ], + ) + } + #[doc = "As the controller of a recoverable account, close an active recovery"] + #[doc = "process for your account."] + #[doc = ""] + #[doc = "Payment: By calling this function, the recoverable account will receive"] + #[doc = "the recovery deposit `RecoveryDeposit` placed by the rescuer."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and must be a"] + #[doc = "recoverable account with an active recovery process for it."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `rescuer`: The account trying to rescue this recoverable account."] + pub fn close_recovery( + &self, + rescuer: types::close_recovery::Rescuer, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload + { + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "Recovery", + "close_recovery", + types::CloseRecovery { rescuer }, + [ + 161u8, 178u8, 117u8, 209u8, 119u8, 164u8, 135u8, 41u8, 25u8, 108u8, + 194u8, 175u8, 221u8, 65u8, 184u8, 137u8, 171u8, 97u8, 204u8, 61u8, + 159u8, 39u8, 192u8, 53u8, 246u8, 69u8, 113u8, 16u8, 170u8, 232u8, + 163u8, 10u8, + ], + ) + } + #[doc = "Remove the recovery process for your account. Recovered accounts are still accessible."] + #[doc = ""] + #[doc = "NOTE: The user must make sure to call `close_recovery` on all active"] + #[doc = "recovery attempts before calling this function else it will fail."] + #[doc = ""] + #[doc = "Payment: By calling this function the recoverable account will unreserve"] + #[doc = "their recovery configuration deposit."] + #[doc = "(`ConfigDepositBase` + `FriendDepositFactor` * #_of_friends)"] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and must be a"] + #[doc = "recoverable account (i.e. has a recovery configuration)."] + pub fn remove_recovery( + &self, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload + { + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "Recovery", + "remove_recovery", + types::RemoveRecovery {}, + [ + 11u8, 38u8, 133u8, 172u8, 212u8, 252u8, 57u8, 216u8, 42u8, 202u8, + 206u8, 91u8, 115u8, 91u8, 242u8, 123u8, 95u8, 196u8, 172u8, 243u8, + 164u8, 1u8, 69u8, 180u8, 40u8, 68u8, 208u8, 221u8, 161u8, 250u8, 8u8, + 72u8, + ], + ) + } + #[doc = "Cancel the ability to use `as_recovered` for `account`."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and registered to"] + #[doc = "be able to make calls on behalf of the recovered account."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `account`: The recovered account you are able to call on-behalf-of."] + pub fn cancel_recovered( + &self, + account: types::cancel_recovered::Account, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload + { + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "Recovery", + "cancel_recovered", + types::CancelRecovered { account }, + [ + 100u8, 222u8, 80u8, 226u8, 187u8, 188u8, 111u8, 58u8, 190u8, 5u8, + 178u8, 144u8, 37u8, 98u8, 71u8, 145u8, 28u8, 248u8, 222u8, 188u8, 53u8, + 21u8, 127u8, 176u8, 249u8, 166u8, 250u8, 59u8, 170u8, 33u8, 251u8, + 239u8, + ], + ) + } + #[doc = "Poke deposits for recovery configurations and / or active recoveries."] + #[doc = ""] + #[doc = "This can be used by accounts to possibly lower their locked amount."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `maybe_account`: Optional recoverable account for which you have an active recovery"] + #[doc = "and want to adjust the deposit for the active recovery."] + #[doc = ""] + #[doc = "This function checks both recovery configuration deposit and active recovery deposits"] + #[doc = "of the caller:"] + #[doc = "- If the caller has created a recovery configuration, checks and adjusts its deposit"] + #[doc = "- If the caller has initiated any active recoveries, and provides the account in"] + #[doc = "`maybe_account`, checks and adjusts those deposits"] + #[doc = ""] + #[doc = "If any deposit is updated, the difference will be reserved/unreserved from the caller's"] + #[doc = "account."] + #[doc = ""] + #[doc = "The transaction is made free if any deposit is updated and paid otherwise."] + #[doc = ""] + #[doc = "Emits `DepositPoked` if any deposit is updated."] + #[doc = "Multiple events may be emitted in case both types of deposits are updated."] + pub fn poke_deposit( + &self, + maybe_account: types::poke_deposit::MaybeAccount, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "Recovery", + "poke_deposit", + types::PokeDeposit { maybe_account }, + [ + 177u8, 98u8, 53u8, 15u8, 228u8, 36u8, 173u8, 55u8, 125u8, 3u8, 234u8, + 70u8, 147u8, 147u8, 124u8, 86u8, 31u8, 101u8, 171u8, 56u8, 148u8, + 180u8, 87u8, 149u8, 11u8, 113u8, 195u8, 35u8, 56u8, 32u8, 251u8, 56u8, + ], + ) + } + } + } + #[doc = "Events type."] + pub type Event = runtime_types::pallet_recovery::pallet::Event; + pub mod events { + use super::runtime_types; + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + #[doc = "A recovery process has been set up for an account."] + pub struct RecoveryCreated { + pub account: recovery_created::Account, + } + pub mod recovery_created { + use super::runtime_types; + pub type Account = ::subxt::ext::subxt_core::utils::AccountId32; + } + impl ::subxt::ext::subxt_core::events::StaticEvent for RecoveryCreated { + const PALLET: &'static str = "Recovery"; + const EVENT: &'static str = "RecoveryCreated"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + #[doc = "A recovery process has been initiated for lost account by rescuer account."] + pub struct RecoveryInitiated { + pub lost_account: recovery_initiated::LostAccount, + pub rescuer_account: recovery_initiated::RescuerAccount, + } + pub mod recovery_initiated { + use super::runtime_types; + pub type LostAccount = ::subxt::ext::subxt_core::utils::AccountId32; + pub type RescuerAccount = ::subxt::ext::subxt_core::utils::AccountId32; + } + impl ::subxt::ext::subxt_core::events::StaticEvent for RecoveryInitiated { + const PALLET: &'static str = "Recovery"; + const EVENT: &'static str = "RecoveryInitiated"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + #[doc = "A recovery process for lost account by rescuer account has been vouched for by sender."] + pub struct RecoveryVouched { + pub lost_account: recovery_vouched::LostAccount, + pub rescuer_account: recovery_vouched::RescuerAccount, + pub sender: recovery_vouched::Sender, + } + pub mod recovery_vouched { + use super::runtime_types; + pub type LostAccount = ::subxt::ext::subxt_core::utils::AccountId32; + pub type RescuerAccount = ::subxt::ext::subxt_core::utils::AccountId32; + pub type Sender = ::subxt::ext::subxt_core::utils::AccountId32; + } + impl ::subxt::ext::subxt_core::events::StaticEvent for RecoveryVouched { + const PALLET: &'static str = "Recovery"; + const EVENT: &'static str = "RecoveryVouched"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + #[doc = "A recovery process for lost account by rescuer account has been closed."] + pub struct RecoveryClosed { + pub lost_account: recovery_closed::LostAccount, + pub rescuer_account: recovery_closed::RescuerAccount, + } + pub mod recovery_closed { + use super::runtime_types; + pub type LostAccount = ::subxt::ext::subxt_core::utils::AccountId32; + pub type RescuerAccount = ::subxt::ext::subxt_core::utils::AccountId32; + } + impl ::subxt::ext::subxt_core::events::StaticEvent for RecoveryClosed { + const PALLET: &'static str = "Recovery"; + const EVENT: &'static str = "RecoveryClosed"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + #[doc = "Lost account has been successfully recovered by rescuer account."] + pub struct AccountRecovered { + pub lost_account: account_recovered::LostAccount, + pub rescuer_account: account_recovered::RescuerAccount, + } + pub mod account_recovered { + use super::runtime_types; + pub type LostAccount = ::subxt::ext::subxt_core::utils::AccountId32; + pub type RescuerAccount = ::subxt::ext::subxt_core::utils::AccountId32; + } + impl ::subxt::ext::subxt_core::events::StaticEvent for AccountRecovered { + const PALLET: &'static str = "Recovery"; + const EVENT: &'static str = "AccountRecovered"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + #[doc = "A recovery process has been removed for an account."] + pub struct RecoveryRemoved { + pub lost_account: recovery_removed::LostAccount, + } + pub mod recovery_removed { + use super::runtime_types; + pub type LostAccount = ::subxt::ext::subxt_core::utils::AccountId32; + } + impl ::subxt::ext::subxt_core::events::StaticEvent for RecoveryRemoved { + const PALLET: &'static str = "Recovery"; + const EVENT: &'static str = "RecoveryRemoved"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + #[doc = "A deposit has been updated."] + pub struct DepositPoked { + pub who: deposit_poked::Who, + pub kind: deposit_poked::Kind, + pub old_deposit: deposit_poked::OldDeposit, + pub new_deposit: deposit_poked::NewDeposit, + } + pub mod deposit_poked { + use super::runtime_types; + pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; + pub type Kind = runtime_types::pallet_recovery::DepositKind< + runtime_types::quantus_runtime::Runtime, + >; + pub type OldDeposit = ::core::primitive::u128; + pub type NewDeposit = ::core::primitive::u128; + } + impl ::subxt::ext::subxt_core::events::StaticEvent for DepositPoked { + const PALLET: &'static str = "Recovery"; + const EVENT: &'static str = "DepositPoked"; + } + } + pub mod storage { + use super::runtime_types; + pub mod types { + use super::runtime_types; + pub mod recoverable { + use super::runtime_types; + pub type Recoverable = runtime_types::pallet_recovery::RecoveryConfig< + ::core::primitive::u32, + ::core::primitive::u128, + runtime_types::bounded_collections::bounded_vec::BoundedVec< ::subxt::ext::subxt_core::utils::AccountId32, - (), >, - }, - #[codec(index = 31)] - #[doc = "Disallow further unprivileged transfers of an asset `id` to and from an account `who`."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Freezer of the asset `id`."] - #[doc = ""] - #[doc = "- `id`: The identifier of the account's asset."] - #[doc = "- `who`: The account to be unblocked."] - #[doc = ""] - #[doc = "Emits `Blocked`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - block { - #[codec(compact)] - id: ::core::primitive::u32, - who: ::subxt::ext::subxt_core::utils::MultiAddress< + >; + pub type Param0 = ::subxt::ext::subxt_core::utils::AccountId32; + } + pub mod active_recoveries { + use super::runtime_types; + pub type ActiveRecoveries = runtime_types::pallet_recovery::ActiveRecovery< + ::core::primitive::u32, + ::core::primitive::u128, + runtime_types::bounded_collections::bounded_vec::BoundedVec< ::subxt::ext::subxt_core::utils::AccountId32, - (), >, - }, - #[codec(index = 32)] - #[doc = "Transfer the entire transferable balance from the caller asset account."] - #[doc = ""] - #[doc = "NOTE: This function only attempts to transfer _transferable_ balances. This means that"] - #[doc = "any held, frozen, or minimum balance (when `keep_alive` is `true`), will not be"] - #[doc = "transferred by this function. To ensure that this function results in a killed account,"] - #[doc = "you might need to prepare the account by removing any reference counters, storage"] - #[doc = "deposits, etc..."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be Signed."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset for the account holding a deposit."] - #[doc = "- `dest`: The recipient of the transfer."] - #[doc = "- `keep_alive`: A boolean to determine if the `transfer_all` operation should send all"] - #[doc = " of the funds the asset account has, causing the sender asset account to be killed"] - #[doc = " (false), or transfer everything except at least the minimum balance, which will"] - #[doc = " guarantee to keep the sender asset account alive (true)."] - transfer_all { - #[codec(compact)] - id: ::core::primitive::u32, - dest: ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), + >; + pub type Param0 = ::subxt::ext::subxt_core::utils::AccountId32; + pub type Param1 = ::subxt::ext::subxt_core::utils::AccountId32; + } + pub mod proxy { + use super::runtime_types; + pub type Proxy = ::subxt::ext::subxt_core::utils::AccountId32; + pub type Param0 = ::subxt::ext::subxt_core::utils::AccountId32; + } + } + pub struct StorageApi; + impl StorageApi { + #[doc = " The set of recoverable accounts and their recovery configuration."] + pub fn recoverable_iter( + &self, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::recoverable::Recoverable, + (), + (), + ::subxt::ext::subxt_core::utils::Yes, + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "Recovery", + "Recoverable", + (), + [ + 112u8, 7u8, 56u8, 46u8, 138u8, 197u8, 63u8, 234u8, 140u8, 123u8, 145u8, + 106u8, 189u8, 190u8, 247u8, 61u8, 250u8, 67u8, 107u8, 42u8, 170u8, + 79u8, 54u8, 168u8, 33u8, 214u8, 91u8, 227u8, 5u8, 107u8, 38u8, 26u8, + ], + ) + } + #[doc = " The set of recoverable accounts and their recovery configuration."] + pub fn recoverable( + &self, + _0: types::recoverable::Param0, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + ::subxt::ext::subxt_core::storage::address::StaticStorageKey< + types::recoverable::Param0, + >, + types::recoverable::Recoverable, + ::subxt::ext::subxt_core::utils::Yes, + (), + (), + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "Recovery", + "Recoverable", + ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), + [ + 112u8, 7u8, 56u8, 46u8, 138u8, 197u8, 63u8, 234u8, 140u8, 123u8, 145u8, + 106u8, 189u8, 190u8, 247u8, 61u8, 250u8, 67u8, 107u8, 42u8, 170u8, + 79u8, 54u8, 168u8, 33u8, 214u8, 91u8, 227u8, 5u8, 107u8, 38u8, 26u8, + ], + ) + } + #[doc = " Active recovery attempts."] + #[doc = ""] + #[doc = " First account is the account to be recovered, and the second account"] + #[doc = " is the user trying to recover the account."] + pub fn active_recoveries_iter( + &self, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::active_recoveries::ActiveRecoveries, + (), + (), + ::subxt::ext::subxt_core::utils::Yes, + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "Recovery", + "ActiveRecoveries", + (), + [ + 104u8, 252u8, 28u8, 142u8, 48u8, 26u8, 91u8, 201u8, 184u8, 163u8, + 180u8, 197u8, 189u8, 71u8, 144u8, 88u8, 225u8, 13u8, 183u8, 84u8, + 244u8, 41u8, 164u8, 212u8, 153u8, 247u8, 191u8, 25u8, 162u8, 25u8, + 91u8, 123u8, + ], + ) + } + #[doc = " Active recovery attempts."] + #[doc = ""] + #[doc = " First account is the account to be recovered, and the second account"] + #[doc = " is the user trying to recover the account."] + pub fn active_recoveries_iter1( + &self, + _0: types::active_recoveries::Param0, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + ::subxt::ext::subxt_core::storage::address::StaticStorageKey< + types::active_recoveries::Param0, + >, + types::active_recoveries::ActiveRecoveries, + (), + (), + ::subxt::ext::subxt_core::utils::Yes, + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "Recovery", + "ActiveRecoveries", + ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), + [ + 104u8, 252u8, 28u8, 142u8, 48u8, 26u8, 91u8, 201u8, 184u8, 163u8, + 180u8, 197u8, 189u8, 71u8, 144u8, 88u8, 225u8, 13u8, 183u8, 84u8, + 244u8, 41u8, 164u8, 212u8, 153u8, 247u8, 191u8, 25u8, 162u8, 25u8, + 91u8, 123u8, + ], + ) + } + #[doc = " Active recovery attempts."] + #[doc = ""] + #[doc = " First account is the account to be recovered, and the second account"] + #[doc = " is the user trying to recover the account."] + pub fn active_recoveries( + &self, + _0: types::active_recoveries::Param0, + _1: types::active_recoveries::Param1, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + ( + ::subxt::ext::subxt_core::storage::address::StaticStorageKey< + types::active_recoveries::Param0, >, - keep_alive: ::core::primitive::bool, - }, + ::subxt::ext::subxt_core::storage::address::StaticStorageKey< + types::active_recoveries::Param1, + >, + ), + types::active_recoveries::ActiveRecoveries, + ::subxt::ext::subxt_core::utils::Yes, + (), + (), + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "Recovery", + "ActiveRecoveries", + ( + ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), + ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_1), + ), + [ + 104u8, 252u8, 28u8, 142u8, 48u8, 26u8, 91u8, 201u8, 184u8, 163u8, + 180u8, 197u8, 189u8, 71u8, 144u8, 88u8, 225u8, 13u8, 183u8, 84u8, + 244u8, 41u8, 164u8, 212u8, 153u8, 247u8, 191u8, 25u8, 162u8, 25u8, + 91u8, 123u8, + ], + ) + } + #[doc = " The list of allowed proxy accounts."] + #[doc = ""] + #[doc = " Map from the user who can access it to the recovered account."] + pub fn proxy_iter( + &self, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::proxy::Proxy, + (), + (), + ::subxt::ext::subxt_core::utils::Yes, + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "Recovery", + "Proxy", + (), + [ + 161u8, 242u8, 17u8, 183u8, 161u8, 47u8, 87u8, 110u8, 201u8, 177u8, + 199u8, 157u8, 30u8, 131u8, 49u8, 89u8, 182u8, 86u8, 152u8, 19u8, 199u8, + 33u8, 12u8, 138u8, 51u8, 215u8, 130u8, 5u8, 251u8, 115u8, 69u8, 159u8, + ], + ) + } + #[doc = " The list of allowed proxy accounts."] + #[doc = ""] + #[doc = " Map from the user who can access it to the recovered account."] + pub fn proxy( + &self, + _0: types::proxy::Param0, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + ::subxt::ext::subxt_core::storage::address::StaticStorageKey< + types::proxy::Param0, + >, + types::proxy::Proxy, + ::subxt::ext::subxt_core::utils::Yes, + (), + (), + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "Recovery", + "Proxy", + ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), + [ + 161u8, 242u8, 17u8, 183u8, 161u8, 47u8, 87u8, 110u8, 201u8, 177u8, + 199u8, 157u8, 30u8, 131u8, 49u8, 89u8, 182u8, 86u8, 152u8, 19u8, 199u8, + 33u8, 12u8, 138u8, 51u8, 215u8, 130u8, 5u8, 251u8, 115u8, 69u8, 159u8, + ], + ) + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The base amount of currency needed to reserve for creating a recovery configuration."] + #[doc = ""] + #[doc = " This is held for an additional storage item whose value size is"] + #[doc = " `2 + sizeof(BlockNumber, Balance)` bytes."] + pub fn config_deposit_base( + &self, + ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< + ::core::primitive::u128, + > { + ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( + "Recovery", + "ConfigDepositBase", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, + 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) + } + #[doc = " The amount of currency needed per additional user when creating a recovery"] + #[doc = " configuration."] + #[doc = ""] + #[doc = " This is held for adding `sizeof(AccountId)` bytes more into a pre-existing storage"] + #[doc = " value."] + pub fn friend_deposit_factor( + &self, + ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< + ::core::primitive::u128, + > { + ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( + "Recovery", + "FriendDepositFactor", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, + 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) + } + #[doc = " The maximum amount of friends allowed in a recovery configuration."] + #[doc = ""] + #[doc = " NOTE: The threshold programmed in this Pallet uses u16, so it does"] + #[doc = " not really make sense to have a limit here greater than u16::MAX."] + #[doc = " But also, that is a lot more than you should probably set this value"] + #[doc = " to anyway..."] + pub fn max_friends( + &self, + ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< + ::core::primitive::u32, + > { + ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( + "Recovery", + "MaxFriends", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " The base amount of currency needed to reserve for starting a recovery."] + #[doc = ""] + #[doc = " This is primarily held for deterring malicious recovery attempts, and should"] + #[doc = " have a value large enough that a bad actor would choose not to place this"] + #[doc = " deposit. It also acts to fund additional storage item whose value size is"] + #[doc = " `sizeof(BlockNumber, Balance + T * AccountId)` bytes. Where T is a configurable"] + #[doc = " threshold."] + pub fn recovery_deposit( + &self, + ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< + ::core::primitive::u128, + > { + ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( + "Recovery", + "RecoveryDeposit", + [ + 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 runtime_types { + use super::runtime_types; + pub mod bounded_collections { + use super::runtime_types; + pub mod bounded_vec { + use super::runtime_types; #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, @@ -20399,74 +17781,107 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "The `Error` enum of this pallet."] - pub enum Error { + pub struct BoundedVec<_0>(pub ::subxt::ext::subxt_core::alloc::vec::Vec<_0>); + } + pub mod weak_bounded_vec { + use super::runtime_types; + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + pub struct WeakBoundedVec<_0>(pub ::subxt::ext::subxt_core::alloc::vec::Vec<_0>); + } + } + pub mod dilithium_crypto { + use super::runtime_types; + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + pub enum DilithiumSignatureScheme { + #[codec(index = 0)] + Dilithium(runtime_types::dilithium_crypto::types::DilithiumSignatureWithPublic), + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + pub struct DilithiumSignatureWithPublic { + pub bytes: [::core::primitive::u8; 7219usize], + } + } + } + pub mod frame_metadata_hash_extension { + use super::runtime_types; + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + pub struct CheckMetadataHash { + pub mode: runtime_types::frame_metadata_hash_extension::Mode, + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + pub enum Mode { + #[codec(index = 0)] + Disabled, + #[codec(index = 1)] + Enabled, + } + } + pub mod frame_support { + use super::runtime_types; + pub mod dispatch { + use super::runtime_types; + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + pub enum DispatchClass { #[codec(index = 0)] - #[doc = "Account balance must be greater than or equal to the transfer amount."] - BalanceLow, + Normal, #[codec(index = 1)] - #[doc = "The account to alter does not exist."] - NoAccount, + Operational, #[codec(index = 2)] - #[doc = "The signing account has no permission to do the operation."] - NoPermission, - #[codec(index = 3)] - #[doc = "The given asset ID is unknown."] - Unknown, - #[codec(index = 4)] - #[doc = "The origin account is frozen."] - Frozen, - #[codec(index = 5)] - #[doc = "The asset ID is already taken."] - InUse, - #[codec(index = 6)] - #[doc = "Invalid witness data given."] - BadWitness, - #[codec(index = 7)] - #[doc = "Minimum balance should be non-zero."] - MinBalanceZero, - #[codec(index = 8)] - #[doc = "Unable to increment the consumer reference counters on the account. Either no provider"] - #[doc = "reference exists to allow a non-zero balance of a non-self-sufficient asset, or one"] - #[doc = "fewer then the maximum number of consumers has been reached."] - UnavailableConsumer, - #[codec(index = 9)] - #[doc = "Invalid metadata given."] - BadMetadata, - #[codec(index = 10)] - #[doc = "No approval exists that would allow the transfer."] - Unapproved, - #[codec(index = 11)] - #[doc = "The source account would not survive the transfer and it needs to stay alive."] - WouldDie, - #[codec(index = 12)] - #[doc = "The asset-account already exists."] - AlreadyExists, - #[codec(index = 13)] - #[doc = "The asset-account doesn't have an associated deposit."] - NoDeposit, - #[codec(index = 14)] - #[doc = "The operation would result in funds being burned."] - WouldBurn, - #[codec(index = 15)] - #[doc = "The asset is a live asset and is actively being used. Usually emit for operations such"] - #[doc = "as `start_destroy` which require the asset to be in a destroying state."] - LiveAsset, - #[codec(index = 16)] - #[doc = "The asset is not live, and likely being destroyed."] - AssetNotLive, - #[codec(index = 17)] - #[doc = "The asset status is not the expected status."] - IncorrectStatus, - #[codec(index = 18)] - #[doc = "The asset should be frozen before the given operation."] - NotFrozen, - #[codec(index = 19)] - #[doc = "Callback action resulted in error"] - CallbackFailed, - #[codec(index = 20)] - #[doc = "The asset ID must be equal to the [`NextAssetId`]."] - BadAssetId, + Mandatory, } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -20479,172 +17894,44 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "The `Event` enum of this pallet"] - pub enum Event { + pub enum Pays { #[codec(index = 0)] - #[doc = "Some asset class was created."] - Created { - asset_id: ::core::primitive::u32, - creator: ::subxt::ext::subxt_core::utils::AccountId32, - owner: ::subxt::ext::subxt_core::utils::AccountId32, - }, + Yes, #[codec(index = 1)] - #[doc = "Some assets were issued."] - Issued { - asset_id: ::core::primitive::u32, - owner: ::subxt::ext::subxt_core::utils::AccountId32, - amount: ::core::primitive::u128, - }, - #[codec(index = 2)] - #[doc = "Some assets were transferred."] - Transferred { - asset_id: ::core::primitive::u32, - from: ::subxt::ext::subxt_core::utils::AccountId32, - to: ::subxt::ext::subxt_core::utils::AccountId32, - amount: ::core::primitive::u128, - }, - #[codec(index = 3)] - #[doc = "Some assets were destroyed."] - Burned { - asset_id: ::core::primitive::u32, - owner: ::subxt::ext::subxt_core::utils::AccountId32, - balance: ::core::primitive::u128, - }, - #[codec(index = 4)] - #[doc = "The management team changed."] - TeamChanged { - asset_id: ::core::primitive::u32, - issuer: ::subxt::ext::subxt_core::utils::AccountId32, - admin: ::subxt::ext::subxt_core::utils::AccountId32, - freezer: ::subxt::ext::subxt_core::utils::AccountId32, - }, - #[codec(index = 5)] - #[doc = "The owner changed."] - OwnerChanged { - asset_id: ::core::primitive::u32, - owner: ::subxt::ext::subxt_core::utils::AccountId32, - }, - #[codec(index = 6)] - #[doc = "Some account `who` was frozen."] - Frozen { - asset_id: ::core::primitive::u32, - who: ::subxt::ext::subxt_core::utils::AccountId32, - }, - #[codec(index = 7)] - #[doc = "Some account `who` was thawed."] - Thawed { - asset_id: ::core::primitive::u32, - who: ::subxt::ext::subxt_core::utils::AccountId32, - }, - #[codec(index = 8)] - #[doc = "Some asset `asset_id` was frozen."] - AssetFrozen { asset_id: ::core::primitive::u32 }, - #[codec(index = 9)] - #[doc = "Some asset `asset_id` was thawed."] - AssetThawed { asset_id: ::core::primitive::u32 }, - #[codec(index = 10)] - #[doc = "Accounts were destroyed for given asset."] - AccountsDestroyed { - asset_id: ::core::primitive::u32, - accounts_destroyed: ::core::primitive::u32, - accounts_remaining: ::core::primitive::u32, - }, - #[codec(index = 11)] - #[doc = "Approvals were destroyed for given asset."] - ApprovalsDestroyed { - asset_id: ::core::primitive::u32, - approvals_destroyed: ::core::primitive::u32, - approvals_remaining: ::core::primitive::u32, - }, - #[codec(index = 12)] - #[doc = "An asset class is in the process of being destroyed."] - DestructionStarted { asset_id: ::core::primitive::u32 }, - #[codec(index = 13)] - #[doc = "An asset class was destroyed."] - Destroyed { asset_id: ::core::primitive::u32 }, - #[codec(index = 14)] - #[doc = "Some asset class was force-created."] - ForceCreated { - asset_id: ::core::primitive::u32, - owner: ::subxt::ext::subxt_core::utils::AccountId32, - }, - #[codec(index = 15)] - #[doc = "New metadata has been set for an asset."] - MetadataSet { - asset_id: ::core::primitive::u32, - name: ::subxt::ext::subxt_core::alloc::vec::Vec<::core::primitive::u8>, - symbol: ::subxt::ext::subxt_core::alloc::vec::Vec<::core::primitive::u8>, - decimals: ::core::primitive::u8, - is_frozen: ::core::primitive::bool, - }, - #[codec(index = 16)] - #[doc = "Metadata has been cleared for an asset."] - MetadataCleared { asset_id: ::core::primitive::u32 }, - #[codec(index = 17)] - #[doc = "(Additional) funds have been approved for transfer to a destination account."] - ApprovedTransfer { - asset_id: ::core::primitive::u32, - source: ::subxt::ext::subxt_core::utils::AccountId32, - delegate: ::subxt::ext::subxt_core::utils::AccountId32, - amount: ::core::primitive::u128, - }, - #[codec(index = 18)] - #[doc = "An approval for account `delegate` was cancelled by `owner`."] - ApprovalCancelled { - asset_id: ::core::primitive::u32, - owner: ::subxt::ext::subxt_core::utils::AccountId32, - delegate: ::subxt::ext::subxt_core::utils::AccountId32, - }, - #[codec(index = 19)] - #[doc = "An `amount` was transferred in its entirety from `owner` to `destination` by"] - #[doc = "the approved `delegate`."] - TransferredApproved { - asset_id: ::core::primitive::u32, - owner: ::subxt::ext::subxt_core::utils::AccountId32, - delegate: ::subxt::ext::subxt_core::utils::AccountId32, - destination: ::subxt::ext::subxt_core::utils::AccountId32, - amount: ::core::primitive::u128, - }, - #[codec(index = 20)] - #[doc = "An asset has had its attributes changed by the `Force` origin."] - AssetStatusChanged { asset_id: ::core::primitive::u32 }, - #[codec(index = 21)] - #[doc = "The min_balance of an asset has been updated by the asset owner."] - AssetMinBalanceChanged { - asset_id: ::core::primitive::u32, - new_min_balance: ::core::primitive::u128, - }, - #[codec(index = 22)] - #[doc = "Some account `who` was created with a deposit from `depositor`."] - Touched { - asset_id: ::core::primitive::u32, - who: ::subxt::ext::subxt_core::utils::AccountId32, - depositor: ::subxt::ext::subxt_core::utils::AccountId32, - }, - #[codec(index = 23)] - #[doc = "Some account `who` was blocked."] - Blocked { - asset_id: ::core::primitive::u32, - who: ::subxt::ext::subxt_core::utils::AccountId32, - }, - #[codec(index = 24)] - #[doc = "Some assets were deposited (e.g. for transaction fees)."] - Deposited { - asset_id: ::core::primitive::u32, - who: ::subxt::ext::subxt_core::utils::AccountId32, - amount: ::core::primitive::u128, - }, - #[codec(index = 25)] - #[doc = "Some assets were withdrawn from the account (e.g. for transaction fees)."] - Withdrawn { - asset_id: ::core::primitive::u32, - who: ::subxt::ext::subxt_core::utils::AccountId32, - amount: ::core::primitive::u128, - }, + No, + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + pub struct PerDispatchClass<_0> { + pub normal: _0, + pub operational: _0, + pub mandatory: _0, + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + pub struct PostDispatchInfo { + pub actual_weight: + ::core::option::Option, + pub pays_fee: runtime_types::frame_support::dispatch::Pays, } - } - pub mod types { - use super::runtime_types; #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, @@ -20656,14 +17943,231 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - pub enum AccountStatus { + pub enum RawOrigin<_0> { #[codec(index = 0)] - Liquid, + Root, #[codec(index = 1)] - Frozen, + Signed(_0), #[codec(index = 2)] - Blocked, + None, + #[codec(index = 3)] + Authorized, + } + } + pub mod traits { + use super::runtime_types; + pub mod preimages { + use super::runtime_types; + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + pub enum Bounded<_0, _1> { + #[codec(index = 0)] + Legacy { + hash: ::subxt::ext::subxt_core::utils::H256, + }, + #[codec(index = 1)] + Inline( + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + ), + #[codec(index = 2)] + Lookup { + hash: ::subxt::ext::subxt_core::utils::H256, + len: ::core::primitive::u32, + }, + __Ignore(::core::marker::PhantomData<(_0, _1)>), + } + } + pub mod schedule { + use super::runtime_types; + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + pub enum DispatchTime<_0> { + #[codec(index = 0)] + At(_0), + #[codec(index = 1)] + After(_0), + } + } + pub mod tokens { + use super::runtime_types; + pub mod misc { + use super::runtime_types; + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + pub enum BalanceStatus { + #[codec(index = 0)] + Free, + #[codec(index = 1)] + Reserved, + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + pub struct IdAmount<_0, _1> { + pub id: _0, + pub amount: _1, + } + } + } + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + pub struct PalletId(pub [::core::primitive::u8; 8usize]); + } + pub mod frame_system { + use super::runtime_types; + pub mod extensions { + use super::runtime_types; + pub mod check_genesis { + use super::runtime_types; + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + pub struct CheckGenesis; + } + pub mod check_mortality { + use super::runtime_types; + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + pub struct CheckMortality(pub runtime_types::sp_runtime::generic::era::Era); + } + pub mod check_non_zero_sender { + use super::runtime_types; + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + pub struct CheckNonZeroSender; + } + pub mod check_nonce { + use super::runtime_types; + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + pub struct CheckNonce(#[codec(compact)] pub ::core::primitive::u32); + } + pub mod check_spec_version { + use super::runtime_types; + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + pub struct CheckSpecVersion; + } + pub mod check_tx_version { + use super::runtime_types; + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + pub struct CheckTxVersion; + } + pub mod check_weight { + use super::runtime_types; + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + pub struct CheckWeight; } + } + pub mod limits { + use super::runtime_types; #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, @@ -20675,9 +18179,10 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - pub struct Approval<_0, _1> { - pub amount: _0, - pub deposit: _1, + pub struct BlockLength { + pub max: runtime_types::frame_support::dispatch::PerDispatchClass< + ::core::primitive::u32, + >, } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -20690,13 +18195,12 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - pub struct AssetAccount<_0, _1, _2, _3> { - pub balance: _0, - pub status: runtime_types::pallet_assets::types::AccountStatus, - pub reason: runtime_types::pallet_assets::types::ExistenceReason<_0, _3>, - pub extra: _2, - #[codec(skip)] - pub __ignore: ::core::marker::PhantomData<_1>, + pub struct BlockWeights { + pub base_block: runtime_types::sp_weights::weight_v2::Weight, + pub max_block: runtime_types::sp_weights::weight_v2::Weight, + pub per_class: runtime_types::frame_support::dispatch::PerDispatchClass< + runtime_types::frame_system::limits::WeightsPerClass, + >, } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -20709,20 +18213,18 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - pub struct AssetDetails<_0, _1, _2> { - pub owner: _1, - pub issuer: _1, - pub admin: _1, - pub freezer: _1, - pub supply: _0, - pub deposit: _2, - pub min_balance: _0, - pub is_sufficient: ::core::primitive::bool, - pub accounts: ::core::primitive::u32, - pub sufficients: ::core::primitive::u32, - pub approvals: ::core::primitive::u32, - pub status: runtime_types::pallet_assets::types::AssetStatus, + pub struct WeightsPerClass { + pub base_extrinsic: runtime_types::sp_weights::weight_v2::Weight, + pub max_extrinsic: + ::core::option::Option, + pub max_total: + ::core::option::Option, + pub reserved: + ::core::option::Option, } + } + pub mod pallet { + use super::runtime_types; #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, @@ -20734,12 +18236,91 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - pub struct AssetMetadata<_0, _1> { - pub deposit: _0, - pub name: _1, - pub symbol: _1, - pub decimals: ::core::primitive::u8, - pub is_frozen: ::core::primitive::bool, + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Make some on-chain remark."] + #[doc = ""] + #[doc = "Can be executed by every `origin`."] + remark { + remark: ::subxt::ext::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 1)] + #[doc = "Set the number of pages in the WebAssembly environment's heap."] + set_heap_pages { pages: ::core::primitive::u64 }, + #[codec(index = 2)] + #[doc = "Set the new runtime code."] + set_code { + code: ::subxt::ext::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 3)] + #[doc = "Set the new runtime code without doing any checks of the given `code`."] + #[doc = ""] + #[doc = "Note that runtime upgrades will not run if this is called with a not-increasing spec"] + #[doc = "version!"] + set_code_without_checks { + code: ::subxt::ext::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 4)] + #[doc = "Set some items of storage."] + set_storage { + items: ::subxt::ext::subxt_core::alloc::vec::Vec<( + ::subxt::ext::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + ::subxt::ext::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + )>, + }, + #[codec(index = 5)] + #[doc = "Kill some items from storage."] + kill_storage { + keys: ::subxt::ext::subxt_core::alloc::vec::Vec< + ::subxt::ext::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + >, + }, + #[codec(index = 6)] + #[doc = "Kill all storage items with a key that starts with the given prefix."] + #[doc = ""] + #[doc = "**NOTE:** We rely on the Root origin to provide us the number of subkeys under"] + #[doc = "the prefix we are removing to accurately calculate the weight of this function."] + kill_prefix { + prefix: ::subxt::ext::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + subkeys: ::core::primitive::u32, + }, + #[codec(index = 7)] + #[doc = "Make some on-chain remark and emit event."] + remark_with_event { + remark: ::subxt::ext::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 9)] + #[doc = "Authorize an upgrade to a given `code_hash` for the runtime. The runtime can be supplied"] + #[doc = "later."] + #[doc = ""] + #[doc = "This call requires Root origin."] + authorize_upgrade { code_hash: ::subxt::ext::subxt_core::utils::H256 }, + #[codec(index = 10)] + #[doc = "Authorize an upgrade to a given `code_hash` for the runtime. The runtime can be supplied"] + #[doc = "later."] + #[doc = ""] + #[doc = "WARNING: This authorizes an upgrade that will take place without any safety checks, for"] + #[doc = "example that the spec name remains the same and that the version number increases. Not"] + #[doc = "recommended for normal use. Use `authorize_upgrade` instead."] + #[doc = ""] + #[doc = "This call requires Root origin."] + authorize_upgrade_without_checks { + code_hash: ::subxt::ext::subxt_core::utils::H256, + }, + #[codec(index = 11)] + #[doc = "Provide the preimage (runtime binary) `code` for an upgrade that has been authorized."] + #[doc = ""] + #[doc = "If the authorization required a version check, this call will ensure the spec name"] + #[doc = "remains unchanged and that the spec version has increased."] + #[doc = ""] + #[doc = "Depending on the runtime's `OnSetCode` configuration, this function may directly apply"] + #[doc = "the new `code` in the same block or attempt to schedule the upgrade."] + #[doc = ""] + #[doc = "All origins are allowed."] + apply_authorized_upgrade { + code: ::subxt::ext::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + }, } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -20752,13 +18333,39 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - pub enum AssetStatus { + #[doc = "Error for the System pallet"] + pub enum Error { #[codec(index = 0)] - Live, + #[doc = "The name of specification does not match between the current runtime"] + #[doc = "and the new runtime."] + InvalidSpecName, #[codec(index = 1)] - Frozen, + #[doc = "The specification version is not allowed to decrease between the current runtime"] + #[doc = "and the new runtime."] + SpecVersionNeedsToIncrease, #[codec(index = 2)] - Destroying, + #[doc = "Failed to extract the runtime version from the new runtime."] + #[doc = ""] + #[doc = "Either calling `Core_version` or decoding `RuntimeVersion` failed."] + FailedToExtractRuntimeVersion, + #[codec(index = 3)] + #[doc = "Suicide called when the account has non-default composite data."] + NonDefaultComposite, + #[codec(index = 4)] + #[doc = "There is a non-zero reference count preventing the account from being purged."] + NonZeroRefCount, + #[codec(index = 5)] + #[doc = "The origin filter prevent the call to be dispatched."] + CallFiltered, + #[codec(index = 6)] + #[doc = "A multi-block migration is ongoing and prevents the current code from being replaced."] + MultiBlockMigrationsOngoing, + #[codec(index = 7)] + #[doc = "No upgrade authorized."] + NothingAuthorized, + #[codec(index = 8)] + #[doc = "The submitted code is not authorized."] + Unauthorized, } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -20771,19 +18378,124 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - pub enum ExistenceReason<_0, _1> { + #[doc = "Event for the System pallet."] + pub enum Event { #[codec(index = 0)] - Consumer, + #[doc = "An extrinsic completed successfully."] + ExtrinsicSuccess { + dispatch_info: runtime_types::frame_system::DispatchEventInfo, + }, #[codec(index = 1)] - Sufficient, + #[doc = "An extrinsic failed."] + ExtrinsicFailed { + dispatch_error: runtime_types::sp_runtime::DispatchError, + dispatch_info: runtime_types::frame_system::DispatchEventInfo, + }, #[codec(index = 2)] - DepositHeld(_0), + #[doc = "`:code` was updated."] + CodeUpdated, #[codec(index = 3)] - DepositRefunded, + #[doc = "A new account was created."] + NewAccount { account: ::subxt::ext::subxt_core::utils::AccountId32 }, #[codec(index = 4)] - DepositFrom(_1, _0), + #[doc = "An account was reaped."] + KilledAccount { account: ::subxt::ext::subxt_core::utils::AccountId32 }, + #[codec(index = 5)] + #[doc = "On on-chain remark happened."] + Remarked { + sender: ::subxt::ext::subxt_core::utils::AccountId32, + hash: ::subxt::ext::subxt_core::utils::H256, + }, + #[codec(index = 6)] + #[doc = "An upgrade was authorized."] + UpgradeAuthorized { + code_hash: ::subxt::ext::subxt_core::utils::H256, + check_version: ::core::primitive::bool, + }, + #[codec(index = 7)] + #[doc = "An invalid authorized upgrade was rejected while trying to apply it."] + RejectedInvalidAuthorizedUpgrade { + code_hash: ::subxt::ext::subxt_core::utils::H256, + error: runtime_types::sp_runtime::DispatchError, + }, } } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + pub struct AccountInfo<_0, _1> { + pub nonce: _0, + pub consumers: ::core::primitive::u32, + pub providers: ::core::primitive::u32, + pub sufficients: ::core::primitive::u32, + pub data: _1, + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + pub struct CodeUpgradeAuthorization { + pub code_hash: ::subxt::ext::subxt_core::utils::H256, + pub check_version: ::core::primitive::bool, + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + pub struct DispatchEventInfo { + pub weight: runtime_types::sp_weights::weight_v2::Weight, + pub class: runtime_types::frame_support::dispatch::DispatchClass, + pub pays_fee: runtime_types::frame_support::dispatch::Pays, + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + pub struct EventRecord<_0, _1> { + pub phase: runtime_types::frame_system::Phase, + pub event: _0, + pub topics: ::subxt::ext::subxt_core::alloc::vec::Vec<_1>, + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + pub struct LastRuntimeUpgradeInfo { + #[codec(compact)] + pub spec_version: ::core::primitive::u32, + pub spec_name: ::subxt::ext::subxt_core::alloc::string::String, + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + pub enum Phase { + #[codec(index = 0)] + ApplyExtrinsic(::core::primitive::u32), + #[codec(index = 1)] + Finalization, + #[codec(index = 2)] + Initialization, + } } pub mod pallet_balances { use super::runtime_types; @@ -21491,7 +19203,7 @@ pub mod api { #[doc = "An \\[account\\] has cancelled a previous delegation operation."] Undelegated(::subxt::ext::subxt_core::utils::AccountId32), #[codec(index = 2)] - #[doc = "An account that has voted"] + #[doc = "An account has voted"] Voted { who: ::subxt::ext::subxt_core::utils::AccountId32, vote: runtime_types::pallet_conviction_voting::vote::AccountVote< @@ -21499,13 +19211,19 @@ pub mod api { >, }, #[codec(index = 3)] - #[doc = "A vote that been removed"] + #[doc = "A vote has been removed"] VoteRemoved { who: ::subxt::ext::subxt_core::utils::AccountId32, vote: runtime_types::pallet_conviction_voting::vote::AccountVote< ::core::primitive::u128, >, }, + #[codec(index = 4)] + #[doc = "The lockup period of a conviction vote expired, and the funds have been unlocked."] + VoteUnlocked { + who: ::subxt::ext::subxt_core::utils::AccountId32, + class: ::core::primitive::u16, + }, } } pub mod types { @@ -21925,7 +19643,7 @@ pub mod api { #[doc = "NOTE: THIS MUST NOT BE CALLED ON `hash` MORE TIMES THAN `request_preimage`."] unrequest_preimage { hash: ::subxt::ext::subxt_core::utils::H256 }, #[codec(index = 4)] - #[doc = "Ensure that the a bulk of pre-images is upgraded."] + #[doc = "Ensure that the bulk of pre-images is upgraded."] #[doc = ""] #[doc = "The caller pays no fee if at least 90% of pre-images were successfully updated."] ensure_updated { @@ -22082,7 +19800,11 @@ pub mod api { #[doc = "The `Event` enum of this pallet"] pub enum Event { #[codec(index = 0)] - ProofSubmitted { nonce: [::core::primitive::u8; 64usize] }, + ProofSubmitted { + nonce: [::core::primitive::u8; 64usize], + difficulty: runtime_types::primitive_types::U512, + distance_achieved: runtime_types::primitive_types::U512, + }, #[codec(index = 1)] DistanceThresholdAdjusted { old_distance_threshold: runtime_types::primitive_types::U512, @@ -22370,7 +20092,7 @@ pub mod api { >, }, #[codec(index = 1)] - #[doc = "Allow ROOT to bypass the recovery process and set an a rescuer account"] + #[doc = "Allow ROOT to bypass the recovery process and set a rescuer account"] #[doc = "for a lost account directly."] #[doc = ""] #[doc = "The dispatch origin for this call must be _ROOT_."] @@ -22514,6 +20236,38 @@ pub mod api { (), >, }, + #[codec(index = 9)] + #[doc = "Poke deposits for recovery configurations and / or active recoveries."] + #[doc = ""] + #[doc = "This can be used by accounts to possibly lower their locked amount."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `maybe_account`: Optional recoverable account for which you have an active recovery"] + #[doc = "and want to adjust the deposit for the active recovery."] + #[doc = ""] + #[doc = "This function checks both recovery configuration deposit and active recovery deposits"] + #[doc = "of the caller:"] + #[doc = "- If the caller has created a recovery configuration, checks and adjusts its deposit"] + #[doc = "- If the caller has initiated any active recoveries, and provides the account in"] + #[doc = "`maybe_account`, checks and adjusts those deposits"] + #[doc = ""] + #[doc = "If any deposit is updated, the difference will be reserved/unreserved from the caller's"] + #[doc = "account."] + #[doc = ""] + #[doc = "The transaction is made free if any deposit is updated and paid otherwise."] + #[doc = ""] + #[doc = "Emits `DepositPoked` if any deposit is updated."] + #[doc = "Multiple events may be emitted in case both types of deposits are updated."] + poke_deposit { + maybe_account: ::core::option::Option< + ::subxt::ext::subxt_core::utils::MultiAddress< + ::subxt::ext::subxt_core::utils::AccountId32, + (), + >, + >, + }, } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -22621,6 +20375,16 @@ pub mod api { #[codec(index = 5)] #[doc = "A recovery process has been removed for an account."] RecoveryRemoved { lost_account: ::subxt::ext::subxt_core::utils::AccountId32 }, + #[codec(index = 6)] + #[doc = "A deposit has been updated."] + DepositPoked { + who: ::subxt::ext::subxt_core::utils::AccountId32, + kind: runtime_types::pallet_recovery::DepositKind< + runtime_types::quantus_runtime::Runtime, + >, + old_deposit: ::core::primitive::u128, + new_deposit: ::core::primitive::u128, + }, } } #[derive( @@ -22642,6 +20406,20 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + pub enum DepositKind<_0> { + #[codec(index = 0)] + RecoveryConfig, + #[codec(index = 1)] + ActiveRecoveryFor(::subxt::ext::subxt_core::utils::AccountId32), + __Ignore(::core::marker::PhantomData<_0>), + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] pub struct RecoveryConfig<_0, _1, _2> { pub delay_period: _0, pub deposit: _1, @@ -23225,8 +21003,8 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - pub struct TrackInfo<_0, _1> { - pub name: ::subxt::ext::subxt_core::alloc::string::String, + pub struct TrackDetails<_0, _1, _2> { + pub name: _2, pub max_deciding: ::core::primitive::u32, pub decision_deposit: _0, pub prepare_period: _1, @@ -23361,7 +21139,8 @@ pub mod api { #[doc = "Reverser is invalid"] InvalidReverser, #[codec(index = 14)] - #[doc = "Cannot schedule one time reversible transaction when account is reversible (theft deterrence)"] + #[doc = "Cannot schedule one time reversible transaction when account is reversible (theft"] + #[doc = "deterrence)"] AccountAlreadyReversibleCannotScheduleOneTime, #[codec(index = 15)] #[doc = "The interceptor has reached the maximum number of accounts they can intercept for."] @@ -24012,6 +21791,58 @@ pub mod api { }, } } + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + pub struct FeeDetails<_0> { + pub inclusion_fee: ::core::option::Option< + runtime_types::pallet_transaction_payment::types::InclusionFee<_0>, + >, + pub tip: _0, + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + pub struct InclusionFee<_0> { + pub base_fee: _0, + pub len_fee: _0, + pub adjusted_weight_fee: _0, + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + pub struct RuntimeDispatchInfo<_0, _1> { + pub weight: _1, + pub class: runtime_types::frame_support::dispatch::DispatchClass, + pub partial_fee: _0, + } + } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, @@ -24497,6 +22328,52 @@ pub mod api { >, weight: runtime_types::sp_weights::weight_v2::Weight, }, + #[codec(index = 6)] + #[doc = "Dispatch a fallback call in the event the main call fails to execute."] + #[doc = "May be called from any origin except `None`."] + #[doc = ""] + #[doc = "This function first attempts to dispatch the `main` call."] + #[doc = "If the `main` call fails, the `fallback` is attemted."] + #[doc = "if the fallback is successfully dispatched, the weights of both calls"] + #[doc = "are accumulated and an event containing the main call error is deposited."] + #[doc = ""] + #[doc = "In the event of a fallback failure the whole call fails"] + #[doc = "with the weights returned."] + #[doc = ""] + #[doc = "- `main`: The main call to be dispatched. This is the primary action to execute."] + #[doc = "- `fallback`: The fallback call to be dispatched in case the `main` call fails."] + #[doc = ""] + #[doc = "## Dispatch Logic"] + #[doc = "- If the origin is `root`, both the main and fallback calls are executed without"] + #[doc = " applying any origin filters."] + #[doc = "- If the origin is not `root`, the origin filter is applied to both the `main` and"] + #[doc = " `fallback` calls."] + #[doc = ""] + #[doc = "## Use Case"] + #[doc = "- Some use cases might involve submitting a `batch` type call in either main, fallback"] + #[doc = " or both."] + if_else { + main: ::subxt::ext::subxt_core::alloc::boxed::Box< + runtime_types::quantus_runtime::RuntimeCall, + >, + fallback: ::subxt::ext::subxt_core::alloc::boxed::Box< + runtime_types::quantus_runtime::RuntimeCall, + >, + }, + #[codec(index = 7)] + #[doc = "Dispatches a function call with a provided origin."] + #[doc = ""] + #[doc = "Almost the same as [`Pallet::dispatch_as`] but forwards any error of the inner call."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Root_."] + dispatch_as_fallible { + as_origin: ::subxt::ext::subxt_core::alloc::boxed::Box< + runtime_types::quantus_runtime::OriginCaller, + >, + call: ::subxt::ext::subxt_core::alloc::boxed::Box< + runtime_types::quantus_runtime::RuntimeCall, + >, + }, } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -24553,6 +22430,12 @@ pub mod api { result: ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, }, + #[codec(index = 6)] + #[doc = "Main call was dispatched."] + IfElseMainSuccess, + #[codec(index = 7)] + #[doc = "The fallback call was dispatched."] + IfElseFallbackCalled { main_error: runtime_types::sp_runtime::DispatchError }, } } } @@ -24740,13 +22623,19 @@ pub mod api { #[doc = "The `Event` enum of this pallet"] pub enum Event { #[codec(index = 0)] + #[doc = "A vesting schedule has been created."] + VestingCreated { + account: ::subxt::ext::subxt_core::utils::AccountId32, + schedule_index: ::core::primitive::u32, + }, + #[codec(index = 1)] #[doc = "The amount vested has been updated. This could indicate a change in funds available."] #[doc = "The balance given is the amount which is left unvested (and thus locked)."] VestingUpdated { account: ::subxt::ext::subxt_core::utils::AccountId32, unvested: ::core::primitive::u128, }, - #[codec(index = 1)] + #[codec(index = 2)] #[doc = "An \\[account\\] has become fully vested."] VestingCompleted { account: ::subxt::ext::subxt_core::utils::AccountId32 }, } @@ -25034,8 +22923,6 @@ pub mod api { TreasuryPallet(runtime_types::pallet_treasury::pallet::Call), #[codec(index = 20)] Recovery(runtime_types::pallet_recovery::pallet::Call), - #[codec(index = 21)] - Assets(runtime_types::pallet_assets::pallet::Call), } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -25079,8 +22966,6 @@ pub mod api { TreasuryPallet(runtime_types::pallet_treasury::pallet::Error), #[codec(index = 20)] Recovery(runtime_types::pallet_recovery::pallet::Error), - #[codec(index = 21)] - Assets(runtime_types::pallet_assets::pallet::Error), } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -25128,8 +23013,6 @@ pub mod api { TreasuryPallet(runtime_types::pallet_treasury::pallet::Event), #[codec(index = 20)] Recovery(runtime_types::pallet_recovery::pallet::Event), - #[codec(index = 21)] - Assets(runtime_types::pallet_assets::pallet::Event), } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -25225,10 +23108,84 @@ pub mod api { DivisionByZero, } } + pub mod sp_core { + use super::runtime_types; + pub mod crypto { + use super::runtime_types; + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + pub struct KeyTypeId(pub [::core::primitive::u8; 4usize]); + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + pub struct OpaqueMetadata( + pub ::subxt::ext::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + ); + } + pub mod sp_inherents { + use super::runtime_types; + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + pub struct CheckInherentsResult { + pub okay: ::core::primitive::bool, + pub fatal_error: ::core::primitive::bool, + pub errors: runtime_types::sp_inherents::InherentData, + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + pub struct InherentData { + pub data: ::subxt::ext::subxt_core::utils::KeyedVec< + [::core::primitive::u8; 8usize], + ::subxt::ext::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + >, + } + } pub mod sp_runtime { use super::runtime_types; pub mod generic { use super::runtime_types; + pub mod block { + use super::runtime_types; + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + pub struct Block<_0, _1> { + pub header: _0, + pub extrinsics: ::subxt::ext::subxt_core::alloc::vec::Vec<_1>, + } + } pub mod digest { use super::runtime_types; #[derive( @@ -25808,6 +23765,28 @@ pub mod api { Mortal255(::core::primitive::u8), } } + pub mod header { + use super::runtime_types; + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + pub struct Header<_0> { + pub parent_hash: ::subxt::ext::subxt_core::utils::H256, + #[codec(compact)] + pub number: _0, + pub state_root: ::subxt::ext::subxt_core::utils::H256, + pub extrinsics_root: ::subxt::ext::subxt_core::utils::H256, + pub digest: runtime_types::sp_runtime::generic::digest::Digest, + } + } } pub mod proving_trie { use super::runtime_types; @@ -25853,6 +23832,125 @@ pub mod api { DecodeError, } } + pub mod transaction_validity { + use super::runtime_types; + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + pub enum InvalidTransaction { + #[codec(index = 0)] + Call, + #[codec(index = 1)] + Payment, + #[codec(index = 2)] + Future, + #[codec(index = 3)] + Stale, + #[codec(index = 4)] + BadProof, + #[codec(index = 5)] + AncientBirthBlock, + #[codec(index = 6)] + ExhaustsResources, + #[codec(index = 7)] + Custom(::core::primitive::u8), + #[codec(index = 8)] + BadMandatory, + #[codec(index = 9)] + MandatoryValidation, + #[codec(index = 10)] + BadSigner, + #[codec(index = 11)] + IndeterminateImplicit, + #[codec(index = 12)] + UnknownOrigin, + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + pub enum TransactionSource { + #[codec(index = 0)] + InBlock, + #[codec(index = 1)] + Local, + #[codec(index = 2)] + External, + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + pub enum TransactionValidityError { + #[codec(index = 0)] + Invalid(runtime_types::sp_runtime::transaction_validity::InvalidTransaction), + #[codec(index = 1)] + Unknown(runtime_types::sp_runtime::transaction_validity::UnknownTransaction), + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + pub enum UnknownTransaction { + #[codec(index = 0)] + CannotLookup, + #[codec(index = 1)] + NoUnsignedValidator, + #[codec(index = 2)] + Custom(::core::primitive::u8), + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + pub struct ValidTransaction { + pub priority: ::core::primitive::u64, + pub requires: ::subxt::ext::subxt_core::alloc::vec::Vec< + ::subxt::ext::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + >, + pub provides: ::subxt::ext::subxt_core::alloc::vec::Vec< + ::subxt::ext::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + >, + pub longevity: ::core::primitive::u64, + pub propagate: ::core::primitive::bool, + } + } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, @@ -25910,6 +24008,19 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + pub enum ExtrinsicInclusionMode { + #[codec(index = 0)] + AllExtrinsics, + #[codec(index = 1)] + OnlyInherents, + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] pub struct ModuleError { pub index: ::core::primitive::u8, pub error: [::core::primitive::u8; 4usize], diff --git a/src/cli/mod.rs b/src/cli/mod.rs index b8368c9..7101d53 100644 --- a/src/cli/mod.rs +++ b/src/cli/mod.rs @@ -216,7 +216,8 @@ pub async fn execute_command( storage::handle_storage_command(storage_cmd, node_url).await, Commands::TechCollective(tech_collective_cmd) => tech_collective::handle_tech_collective_command(tech_collective_cmd, node_url).await, - Commands::Wormhole(wormhole_cmd) => wormhole::handle_wormhole_command(wormhole_cmd).await, + Commands::Wormhole(wormhole_cmd) => + wormhole::handle_wormhole_command(wormhole_cmd, node_url).await, Commands::Runtime(runtime_cmd) => runtime::handle_runtime_command(runtime_cmd, node_url).await, Commands::Call { diff --git a/src/cli/storage.rs b/src/cli/storage.rs index 8f8b873..36f6cfa 100644 --- a/src/cli/storage.rs +++ b/src/cli/storage.rs @@ -103,7 +103,16 @@ pub async fn get_storage_raw( // Get the latest block hash to read from the latest state (not finalized) let latest_block_hash = quantus_client.get_latest_block().await?; - let storage_at = quantus_client.client().storage().at(latest_block_hash); + get_storage_at_block_raw(quantus_client, key, latest_block_hash).await +} + +/// Get raw storage value by key +pub async fn get_storage_at_block_raw( + quantus_client: &crate::chain::client::QuantusClient, + key: Vec, + block_hash: subxt::utils::H256, +) -> crate::error::Result>> { + let storage_at = quantus_client.client().storage().at(block_hash); let result = storage_at .fetch_raw(key) diff --git a/src/cli/wormhole.rs b/src/cli/wormhole.rs index d51c0c6..accbfba 100644 --- a/src/cli/wormhole.rs +++ b/src/cli/wormhole.rs @@ -1,12 +1,45 @@ -use crate::{error::Result, log_print, log_success}; +use crate::{ + chain::{client::QuantusClient, quantus_subxt}, + cli::{ + progress_spinner::wait_for_tx_confirmation, + send::{ + format_balance_with_symbol, get_balance, get_chain_properties, + parse_amount_with_decimals, validate_and_format_amount, + }, + storage::{get_storage_at_block_raw, get_storage_raw}, + }, + error::Result, + log_info, log_print, log_success, log_verbose, +}; use clap::Subcommand; +use codec::{Decode, Encode}; use colored::Colorize; +use dilithium_crypto::traits::WormholeAddress; use hex; +use poseidon_resonance::PoseidonHasher; use rusty_crystals_hdwallet::wormhole::WormholePair; -use sp_core::crypto::{AccountId32, Ss58Codec}; +use serde::Serialize; +use sp_core::{ + crypto::{AccountId32, Ss58Codec}, + twox_128, Bytes, Hasher, +}; -use wormhole_circuit::unspendable_account::UnspendableAccount; -use zk_circuits_common::utils::felts_to_bytes; +use sp_runtime::traits::IdentifyAccount; +use sp_state_machine::read_proof_check; +use sp_storage::StorageKey; +use sp_trie::StorageProof; +use trie_db::{ + node::{Node, NodeHandle}, + NodeCodec, TrieLayout, +}; + +#[derive(Debug, Serialize)] +struct TransferProofBundle { + transfer_count: u64, + state_root: String, // hex (no 0x) + storage_proof: Vec, // hex-encoded nodes (no 0x) + indices: Vec, // byte offsets in hex-string space, for node hashes +} /// Wormhole commands #[derive(Subcommand, Debug)] @@ -40,10 +73,36 @@ pub enum WormholeCommands { #[arg(long)] password_file: Option, }, + /// Generate transfer proof data (for testing purposes) + GenerateProof { + /// The hex-encoded secret key for the wormhole address + #[arg(long)] + secret: String, + + /// Amount to send (e.g., "10", "10.5", "0.0001") + #[arg(short, long)] + amount: String, + + /// Wallet name to sign the bridge transaction + #[arg(short, long)] + from_wallet: String, + + /// Password for the wallet + #[arg(short, long)] + password: Option, + + /// Read password from file + #[arg(long)] + password_file: Option, + + /// Optional tip amount to prioritize the transaction (e.g., "1", "0.5") + #[arg(long)] + tip: Option, + }, } /// Handle wormhole commands -pub async fn handle_wormhole_command(command: WormholeCommands) -> Result<()> { +pub async fn handle_wormhole_command(command: WormholeCommands, node_url: &str) -> Result<()> { match command { WormholeCommands::GenerateAddress => { log_print!("Generating new wormhole address..."); @@ -54,17 +113,14 @@ pub async fn handle_wormhole_command(command: WormholeCommands) -> Result<()> { // The on-chain address for funding MUST be the unspendable account derived // from the secret key. The ZK proof verifies transfers to this address. - let unspendable_account = UnspendableAccount::from_secret(&wormhole_pair.secret); - let account_id_bytes: [u8; 32] = felts_to_bytes(&unspendable_account.account_id) - .try_into() - .expect("Failed to convert Vec to [u8; 32]"); - let account_id: AccountId32 = account_id_bytes.into(); + let wormhole_address = WormholeAddress(wormhole_pair.address); + let unspendable_account: AccountId32 = wormhole_address.into_account(); log_print!("{}", "XXXXXXXXXXXXXXX Quantus Wormhole Details XXXXXXXXXXXXXXXXX".yellow()); log_print!( "{}: {}", - "On-chain Address".green(), - account_id.to_ss58check().bright_cyan() + "Wormhole Address account ID".green(), + unspendable_account.to_ss58check().bright_cyan() ); log_print!( "{}: 0x{}", @@ -93,6 +149,400 @@ pub async fn handle_wormhole_command(command: WormholeCommands) -> Result<()> { } => { log_print!("🚀 Initiating wormhole spend..."); }, + WormholeCommands::GenerateProof { + secret, + amount, + from_wallet, + password, + password_file, + tip, + } => { + // Create quantus chain client + let quantus_client = QuantusClient::new(node_url).await?; + // Parse and validate the amount + let (amount, _) = validate_and_format_amount(&quantus_client, &amount).await?; + // Get password securely for decryption + log_verbose!("📦 Using wallet: {}", from_wallet.bright_blue().bold()); + let keypair = + crate::wallet::load_keypair_from_wallet(&from_wallet, password, password_file)?; + let from = keypair.to_account_id_32(); + // log the funding account as a bytes array + log_print!( + "Funding account address (bytes): {:?}", + >::as_ref(&from) + ); + + // Get account information + let from_account_id = keypair.to_account_id_ss58check(); + let balance = get_balance(&quantus_client, &from_account_id).await?; + + // Get formatted balance with proper decimals + let formatted_balance = format_balance_with_symbol(&quantus_client, balance).await?; + log_verbose!("💰 Current balance: {}", formatted_balance.bright_yellow()); + + if balance < amount { + return Err(crate::error::QuantusError::InsufficientBalance { + available: balance, + required: amount, + }); + } + log_print!("Generating new transfer proof..."); + let secret_bytes: [u8; 32] = hex::decode(secret.trim_start_matches("0x")) + .map_err(|e| { + crate::error::QuantusError::Generic(format!("Hex decode error: {:?}", e)) + })? + .try_into() + .map_err(|_| { + crate::error::QuantusError::Generic("Secret must be 32 bytes".to_string()) + })?; + let wormhole_pair = WormholePair::generate_pair_from_secret(&secret_bytes); + let wormhole_address = WormholeAddress(wormhole_pair.address); + let unspendable_account = wormhole_address.into_account(); + log_print!( + "Derived unspendable account address (bytes): {:?}", + >::as_ref(&unspendable_account) + ); + let unspendable_account_id_bytes: [u8; 32] = *unspendable_account.as_ref(); + let unspendable_account_subxt = + subxt::ext::subxt_core::utils::AccountId32::from(unspendable_account_id_bytes); + // Submit transaction + // Create the transfer call using static API from quantus_subxt + let transfer_call = quantus_subxt::api::tx().balances().transfer_allow_death( + subxt::ext::subxt_core::utils::MultiAddress::Id(unspendable_account_subxt.clone()), + amount, + ); + + // Parse tip amount if provided + let tip_amount = if let Some(tip_str) = &tip { + // Get chain properties for proper decimal parsing + let (_, decimals) = get_chain_properties(&quantus_client).await?; + parse_amount_with_decimals(tip_str, decimals).ok() + } else { + None + }; + + let tip_to_use = tip_amount.unwrap_or(10_000_000_000); // Use default 10 DEV + + // Construct the storage key to fetch the transfer count + let pallet = "Balances".to_string(); + let name = "TransferCount".to_string(); + let mut storage_key = twox_128(pallet.as_bytes()).to_vec(); + storage_key.extend(&twox_128(name.as_bytes())); + + // Construct the storage key to fetch the transfer count + let latest_block_hash = quantus_client.get_latest_block().await?; + let transfer_count_previous = + get_transfer_count(&quantus_client, &storage_key, &latest_block_hash).await?; + + // Submit the transaction and wait for finalization + let hash = crate::cli::common::submit_transaction( + &quantus_client, + &keypair, + transfer_call, + Some(tip_to_use), + ) + .await?; + log_verbose!("Transaction submitted with hash: 0x{}", hex::encode(hash)); + wait_for_tx_confirmation(quantus_client.client(), hash).await?; + let tx_block_hash = quantus_client.get_latest_block().await?; + log_info!("✅ Transaction confirmed and finalized on chain at block {}", tx_block_hash); + let transfer_count = + get_transfer_count(&quantus_client, &storage_key, &tx_block_hash).await?; + log_verbose!("Transfer count range: {} - {}", transfer_count_previous, transfer_count); + + let mut correct_storage_key = Vec::::new(); + let mut correct_leaf_hash = [0u8; 32]; + let mut matched_count: Option = None; + + let pallet_prefix = twox_128("Balances".as_bytes()); + let storage_prefix = twox_128("TransferProof".as_bytes()); + let storage_key_prefix = [&pallet_prefix[..], &storage_prefix[..]].concat(); + + for count in transfer_count_previous..transfer_count { + let computed_leaf_hash = + compute_transfer_proof_leaf(count, &from, &unspendable_account, amount); + let storage_key = [&storage_key_prefix[..], computed_leaf_hash.as_ref()].concat(); + let result = get_storage_raw(&quantus_client, storage_key.to_vec()).await?; + if result.is_some() { + correct_storage_key = storage_key; + correct_leaf_hash = computed_leaf_hash; + matched_count = Some(count); + log_success!( + "🍀 Found matching storage key: {:?} for transfer proof with leaf hash: {:?} for transfer count {:?}", + hex::encode(&correct_storage_key), + hex::encode(correct_leaf_hash), + count + ); + break; + }; + } + if correct_storage_key.is_empty() || correct_leaf_hash == [0u8; 32] { + return Err(crate::error::QuantusError::Generic( + "🍀 No matching storage key / leaf hash found for transfer proof".to_string(), + )); + } + let proof = quantus_client + .get_storage_proof_by_keys( + vec![StorageKey(correct_storage_key.clone())], + Some(tx_block_hash), + ) + .await?; + let proof_as_u8: Vec> = + proof.proof.iter().map(|bytes: &Bytes| bytes.0.clone()).collect(); + let (leaf_checked, last_idx) = + check_leaf(&correct_leaf_hash, proof_as_u8[proof_as_u8.len() - 1].clone()); + let check_string = if leaf_checked { "✅" } else { "⚔️" }; + log_verbose!("🍀 Leaf check: {check_string}"); + tree_structure_check(&proof_as_u8)?; + let header = quantus_client.get_block_header(tx_block_hash).await?; + let state_root = header["stateRoot"].as_str().unwrap(); + // remove the 0x prefix + let state_root = &state_root[2..]; + let state_root_bytes = hex::decode(state_root).unwrap(); + let state_root_array: [u8; 32] = + state_root_bytes.try_into().expect("State root must be 32 bytes"); + let state_root: subxt::utils::H256 = state_root_array.into(); + + // Build the vectors used in-circuit and capture indices + let (storage_proof, indices) = + prepare_proof_for_circuit(proof_as_u8.clone(), hex::encode(state_root), last_idx); + + // Verify the proof against the runtime (safety) + let expected_value = ().encode(); + let items = vec![correct_storage_key.clone()]; + let storage_proof_typed = StorageProof::new(proof_as_u8.clone()); + let result = read_proof_check::>>( + state_root, + storage_proof_typed, + &items, + ); + + match result { + Ok(map) => match map.get(&correct_storage_key) { + Some(Some(value)) if value == &expected_value => { + log_print!( + "Proof verified for key {:?}", + hex::encode(&correct_storage_key) + ); + let data = TransferProofBundle { + transfer_count: matched_count.unwrap(), + state_root: hex::encode(state_root), + storage_proof, + indices, + }; + // pretty print the TransferProofBundle + log_print!("🍀 TransferProofBundle: {:?}", data); + }, + other => + return Err(crate::error::QuantusError::Generic(format!( + "Unexpected proof map result: {:?}", + other + ))), + }, + Err(e) => + return Err(crate::error::QuantusError::Generic(format!( + "Failed to check proof: {:?}", + e + ))), + } + }, + } + Ok(()) +} + +async fn get_transfer_count( + quantus_client: &QuantusClient, + storage_key: &[u8], + block_hash: &subxt::utils::H256, +) -> Result { + let result = + get_storage_at_block_raw(quantus_client, storage_key.to_vec(), *block_hash).await?; + let value_bytes = result.ok_or_else(|| { + crate::error::QuantusError::Generic("TransferCount not found in storage.".to_string()) + })?; + let transfer_count = u64::decode(&mut &value_bytes[..]).unwrap(); + Ok(transfer_count) +} + +pub fn compute_transfer_proof_leaf( + tx_count: u64, + from: &AccountId32, + to: &AccountId32, + amount: u128, +) -> [u8; 32] { + // Step 1: Encode the key components into a single byte vector + let mut key_bytes = Vec::new(); + key_bytes.extend_from_slice(&tx_count.encode()); + key_bytes.extend_from_slice(&from.encode()); + key_bytes.extend_from_slice(&to.encode()); + key_bytes.extend_from_slice(&amount.encode()); + // Step 2: Hash the concatenated bytes using PoseidonHasher + PoseidonHasher::hash_storage::(&key_bytes) +} + +// Function to check that the 24 byte suffix of the leaf hash is the last [-32, -8] bytes of the +// leaf node +pub fn check_leaf(leaf_hash: &[u8; 32], leaf_node: Vec) -> (bool, usize) { + let hash_suffix = &leaf_hash[8..32]; + let mut last_idx = 0usize; + let mut found = false; + + for i in 0..=leaf_node.len().saturating_sub(hash_suffix.len()) { + if &leaf_node[i..i + hash_suffix.len()] == hash_suffix { + last_idx = i; + found = true; + break; + } + } + + log_verbose!( + "Checking leaf hash suffix: {:?} in leaf_node at index: {:?}", + hex::encode(hash_suffix), + last_idx + ); + log_verbose!("leaf_node: {:?}", hex::encode(leaf_node.clone())); + + (found, (last_idx * 2).saturating_sub(16)) +} + +pub fn tree_structure_check(proof: &[Vec]) -> Result<()> { + for (i, node_data) in proof.iter().enumerate() { + let node_hash = ::hash(node_data); + match as TrieLayout>::Codec::decode(node_data) { + Ok(node) => match &node { + Node::Empty => log_verbose!("Proof node {}: Empty", i), + Node::Leaf(partial, value) => { + let nibbles: Vec = partial.right_iter().collect(); + log_verbose!( + "Proof node {}: Leaf, partial: {:?}, value: {:?} hash: {:?} bytes: {:?}", + i, + hex::encode(&nibbles), + value, + node_hash, + hex::encode(node_data) + ); + }, + Node::Extension(partial, _) => { + let nibbles: Vec = partial.right_iter().collect(); + log_verbose!( + "Proof node {}: Extension, partial: {:?} hash: {:?} bytes: {:?}", + i, + hex::encode(&nibbles), + node_hash, + hex::encode(node_data) + ); + }, + Node::Branch(children, value) => { + log_verbose!( + "Proof node {}: Branch, value: {:?} hash: {:?} bytes: {:?}", + i, + value, + node_hash, + hex::encode(node_data) + ); + for (j, child) in children.iter().enumerate() { + if let Some(child) = child { + log_verbose!(" Child {}: {:?}", j, child); + } + } + }, + Node::NibbledBranch(partial, children, value) => { + let nibbles: Vec = partial.right_iter().collect(); + let children = children + .iter() + .filter_map(|x| { + x.as_ref().map(|val| match val { + NodeHandle::Hash(h) => hex::encode(h), + NodeHandle::Inline(i) => hex::encode(i), + }) + }) + .collect::>(); + log_verbose!( + "Proof node {}: NibbledBranch, partial: {:?}, value: {:?}, children: {:?} hash: {:?} bytes: {:?}", + i, + hex::encode(&nibbles), + value, + children, + node_hash, + hex::encode(node_data) + ); + }, + }, + Err(e) => log_verbose!("Failed to decode proof node {}: {:?}", i, e), + } } Ok(()) } + +fn prepare_proof_for_circuit( + proof: Vec>, + state_root: String, + last_idx: usize, +) -> (Vec, Vec) { + let mut hashes = Vec::::new(); + let mut bytes = Vec::::new(); + let mut parts = Vec::<(String, String)>::new(); + let mut storage_proof = Vec::::new(); + for node_data in proof.iter() { + let hash = hex::encode(::hash(node_data)); + let node_bytes = hex::encode(node_data); + if hash == state_root { + storage_proof.push(node_bytes); + } else { + // don't put the hash in if it is the root + hashes.push(hash); + bytes.push(node_bytes.clone()); + } + } + + log_verbose!("Finished constructing bytes and hashes vectors {:?} {:?}", bytes, hashes); + + let mut ordered_hashes = Vec::::new(); + let mut indices = Vec::::new(); + + while !hashes.is_empty() { + for i in (0..hashes.len()).rev() { + let hash = hashes[i].clone(); + if let Some(last) = storage_proof.last() { + if let Some(index) = last.find(&hash) { + let (left, right) = last.split_at(index); + indices.push(index); + parts.push((left.to_string(), right.to_string())); + storage_proof.push(bytes[i].clone()); + ordered_hashes.push(hash.clone()); + hashes.remove(i); + bytes.remove(i); + } + } + } + } + indices.push(last_idx); + + // iterate through the storage proof, printing the size of each. + for (i, node) in storage_proof.iter().enumerate() { + println!("Storage proof node {}: {} bytes", i, (node.len() / 16)); + } + + log_verbose!( + "Storage proof generated: {:?} {:?} {:?} {:?}", + &storage_proof, + parts, + ordered_hashes, + indices + ); + + for (i, _) in storage_proof.iter().enumerate() { + if i == parts.len() { + break; + } + let part = parts[i].clone(); + let hash = ordered_hashes[i].clone(); + if part.1[..64] != hash { + panic!("storage proof index incorrect {:?} != {:?}", part.1, hash); + } else { + log_verbose!("storage proof index correct: {:?}", part.0.len()); + } + } + + (storage_proof, indices) +} diff --git a/src/quantus_metadata.scale b/src/quantus_metadata.scale index d312e1f8f7c847db5119cfde8a0c7c5d6b67f9d5..062dcdd51f4356eeb006374c7d9f77a7ab20d72c 100644 GIT binary patch delta 19395 zcmc(H4|tT-x#xM$eBgiq1_=-_=obx=Xcz+q4H%F>f<^-bNK~pg^JV5sGBTM7^9P83 zIRGmAsi3xaBAatkF*oAG1`_U0H}2gU`Ktxr3RF}y zU+rdd0J=8g7B|(LU5wl~XOXb(ZnbxsaXT9uaN~I_J^*}rT{mUNGOmL?hKuWJ))E!J zRP!Rqk!#QS$z+hBrhbL&Z0qQ2PiEcqP9n7>AB(x!te9-Y`Kujsl1aTYpf%*=7^OHSm0*^0rZx{V+bP{MXajwKv_Zp^25vJHbF0ruB(uyHcefkM=iG47zBOEUt9u}kwfpj^ zST2!H*?oyjHfKAzoI5y_)3bddXt+@Z7uE2>FL(4!90M{~qrnXOgoxT$Ktp7P%%+5S z%-k--w)5?*VL@L$35oGnbmIonE;rFX0A$jAc5ga2pjXc>BnLEfVzK;SKFO@MofQA? zZ9SGw<$$V|M9^c53T`Ho&hV0PcPO1r6c{J*T1PqAuud6Sc}s>}E+jk+A=C1qcRH{u z0eqO?K8_hTm(QdaW-BeW4Y^j>EEi)afCas-x66W-E=&MM_{X4zGKoPaGmO1yj+8NM zC4(%H)qwTC8m!7eGi01y+{m)9xgIuU=!ZpH;oNiWk}!3q`x7z7+v6lOsX6mH#x!tx=1xb{VDgma}2efX()R7;8b1typwRda&Tyd5kcPvi2a$ z8LPW=a;FQK>>W(xSnog_qP?sLqIPb0$P)k%#>M{JjHX3Hi4b)*aMdVo>p0WcyCkJCTdL%rg8juD_Lg{;+?gxi*~WD$*ovX1}wVG z?#<`yzI0}nlZk`spsEpU$SyyfNTuA&$cDQvAqo}m_)^`px-m5`0wa%qX&%uRi!VLB zAkbiUj2wIVk5fn9xbI(T$Bq5x`7~6#?H}d_F=f>%F=?Rqv!iVz3;ua<3e}B#`HlC9 zrWJSnvT5Xdzg$LjLu-=h*!B(i!Cp7BE|VVY%A|KD;%;VRUrYBYAy;oDC~q87wW&qU z8=3dk+0*M9htk{Kh&hHii<$R>1Glxm_Cj4;fg^u;M9THal4lfmtIC|IOu^a zI5TV~)4RY<&@Yj}=h${uDucyeL@zDw`*p>F9zK2Jkc_Ud4USH-xaZx;2y$d8lnsYlx;5I zDPp6%#xbHnBROQm!YDeA2N2eul+(44Voh@r6rfCSR6QiJVjDqCvE=)7gr3R|#Tf-- zH`vo~GcNoJXd;+&us`Ew-3Eq1WTYc3>cIhaX`EEnQ^#0j z5Ka=Fa&gQ~g@D$hu+i!*=Ks=+ZWAd2%ewaTv#mFgE+U2-nkk_(_Q& z*c@%pdFf%^hRcenOuHKe2-T#Gq)#EOj5S4yH60!2?IWwoh^u9F(*#9xdN^I_T$!VlaR+hK;*D2hv?rA; z{%CG>anCpAZnms;O*=kE`5}7HtV6mfDPI@y%b8*ZTUBvp^@jZ#lw zdSf{wLd8R~<`hEP6RG&CM9tod9%?YHVju4d(&O3%|ONf-OT@-A6nXHr!B#3G?lBqG0o8qu++trc-^1ez35u zRVzM!d|f(Yft&Xi7kque;#MQf9dTyw>sVn&9=a%>jbxx_6N7H`W^)A?@us?KhYFPw#J(q|z*x6iWl@Q0ts=zR#_b~}e;E&LM zCQ0$B`uq;Mo<37Q$3>D<%QLi)uh9%GZpMTPs!F9ZgHCdiB&(Y#4Os#7bgDE|I|#{e za_P*lnIk5tBN=*xrl|fboxfn3r0y;^x9Q9sYpMKn{*$WaT; zR-HLIpN^|tIkIuNKSvRor#{Kis-}6ew37uAJHa2J|Hv9C@DJ2jC_`c)J_Ulf6%_Rn zp8ed>J$bq(AQ#KxOS1C1%3hY&N-dbr2?<|qz z%@I`R`ctyQk`VXAT1pRLJ4+b;?1FjDdnj0CtS*H@S2)=LAu6e12yR#^7lF79G*KfD zuUN4$pBu{O1gNcz^j0G8L9EK`bR+EJoiM#+3?qNSITHZJ6a9$8TBxc`e-L7sCd0Lz z2rAfOx$#H|$Q3>QSZQCO>ehH1+Bi#}gw{g%>9yJ|iT;!WN7|+3vXUn{)XwZ^2FaI8 zb1^MyO^8NsZjwE6t8}C*6LL`IrRb3Aw?`o(O-HE__sy5W zQMv$A&6gubX%U{{FPGw3GuZZzbl&OPBvrI$93i%8s*K+CkMv*&z|EA^zoG`Lqf)=3 zaM?dR#uvlhx~PZv@ZL^_y=FI11+MDEQXDc%J>@O+OxaRTnWYY&u+(9*)M2&mRyu$7GYsh|DW1pG z3N;E*C637A(HZkczj-TN7N8f@f4hw?vR?H0)VK#4%2#Fak+bHH zUjA?BbZU5A2Alda@Z=-e{LoN3le3L84_yrIKn+%FaczbmzNwK{-@l!Lv)?Ym{B1^Q z0aUU2>Fv;3$438fJ0u2btM(4sOdqRVchCy@RQ=!%S~vA$Mmq?kKUEJNphZx+=idoc zLjmR7Npt0-fV$~US}CUl)ZshnN*^=T%nzwKagiFcNKHV!_GS9x z)P?ve7X(CoK>hM76qAbs_w1NA8r?_VAh{$^r22Vk-q)y`mZ_tMucjnXrrKJh zSw8&BMrf*R52%NWbd_8mP{)e2kX9PB8V=Cqn_9mv z9v(UD{va}G-Z2>)7K3Js(-ob2-i`oO!_fD_nHN;qmrSQKpH<8?-u2Hn8dEAW( zHx(Z@5X$D

ZQs#zWnq{!UR%RX#xWy2NfINiS{^Wbclo`}(p-?WliIG-u|xyEt<@ z)Z`va=$7OEY+>>KoLO9tE3yWfHiXizKuioSXJ zy_z-RW${4Zo+r*$frGSx9#WeRQae4R?mq~F@{qpq{y|y|)!OhVT|tklo4-S6(;@Y5 zzeBYcQO#H0+nF#PbXq-;OZo(WQS)Utx{=?00EJ^^0bX5J%02ka$IZ2nq43 zp_5iYuLp{U4%Lj_{I~Rwq&JP^Kp%9f&wn3E^X>oVN@3n8_*hAQSsm1=>4ft% z#lRf(JDBVU-_d5^MT~PPTsOpe;{(jJFPO;SYo`w;fW{v*hY1$N!GcC2`S@3PPrSi{GOU-PHs@EZJ zg7`~NZEgT=8B(6{m#HGZ&(S3_%7KU) zOF2=RKlQjuc{P z4wu*l)my=8fQqFvZu7<=XGh*$4=sc+0j?H2MXF|+=9}U9EVg`uQ{WJ#-a0|;)?+IG zxdan8yII8CLCm`w5$rO|4Q||SiMxS=fFFmrYMGh5%&I8cN>^EqAfoFkiQI4$%F$08 zT+OwX0tNvioe>nQ_UbQ|SZ>i3-j}imuwHdfYI`cZD`kn5nBsjYp8}kh|7A4BfEP;W z2x`*KHm}m<4708V1*+EN+3OZkRBp*RNmm4fy~c?nnV0SZQQKNmF~~-4O(K&U(9w;U zB-+|{4>(9^WkI=gK7&e%m@KN+VkA9iu}he57N-eB%qXrDyf6;lcISFOrqh(s0iT#6 zYB7(Ub~huYitdh7+|9WeSO&x=9fL^t#u7Pkx@hufu~8?eMFm2De+3zOQUy)UaTKg* zT0f6?)TYn9hbiAeM}nj4_4GV3q!wZMA5^Mtc4- zY1_(3x~)^X=;8>fs)2W}g0dHjjn_LmV^ ztyxxv4Tr;AQ9-^vH{4jD&a!)5-moC#1$X3;gUWtDomv%-o!f4wAL$=}(E03BPN+?$ zQ~mBvUWB^J*68$yp-zV~h4hfq4^ajyG|`1qQcbLxnom$n2zYVE-Ep%LC+e?+QAvD} zICS_232EM8i5*sjuOzEtnc?$?a_QQu+~ICyn@kLHg%^S}Aq2_m#||D8!&ZfkL&KGv zmdbW|2_iqi(vj**2g_W&Yjk~%>WaUcy11Hi56A;2BYm!0MgA-yZuMXm49vQ9uIqV? zmOn{HkWC5S6flH67UjG$K*>bl$rdl>L|K9=kRUBzXwNue?VU)hX_nY)sI_-IMv!{X z24R76oKTzXMR{n#hNwE}rY4Scnrt}|9;O~R;l8+QoWLJ|yu%&tFc#*(n7niT4FC3x z+X-e)j266k`(DXJBY~lt3SU3KlDhT z`1<4ps`p*0k#M;doVGxH>s_(|>_5B3H9&a zr}enZ_<*h?F}n2wLZM%%2anO(S)xIwRlCzeiCC7%l1*=q9zRAMa;~_d)5+#Mf%Y06 z1k#&bAJTPr`nw;}4qU2_)0bz7=5}2uhgZ^tOd9epZ>qz`5mpQJ#&LLkpQ?|K(?tal zEjcRYARq~wbdXn#lct$SVZnfFUEQ%fF~MI6Dzs zIVc?>5uQsVb&4Dw8Yk0p11MmYAb6EmARGp$_3(_Kx7-+t4=8RSABHNaDN zHW1Y}Q&b(x*G0o(2idwXY{%1F3(X?1vr#h3nF@9<%A#KN8=H&gOue9iib=8@CipK)0~$L(m@ZBz9PSE5`Jb3;~#$0gnp3NBo*Fez1L2Tu)QYfYjtbcb1?J#pvQckVDIa z<>gHpSr%Y>4Rx5-C~ZO7vdm1!W{PWII59$f?GqF*g!=6#bR!huwV%?iz%=c0ZP&UF z*@mD0kv<3s8xA2?Kh5Yq^-rJCLzs940z5PHfGYfn>=^2ELFbdjo$~x@34OLds?pD9}A5;|%w|QF} z^RE}miUAF#qisxZK}iro(Vr-@WVPAs*b|4P6+ht#F86{WVYsboT|lm^ctNffBL1C` zzk6evP+twm`BPt%u){FiUlgNH1mq6_lkg=VRO~dl{4zl^Nzhkt_bBQZ<8{v!b}M>K z;_1a&#lufdhT-yy(59~RHKhO6s*%&A0~WCD(g%yBNfTN%2W6d#1Z7nHC@43n=~Lu9 zb>0+tj=Fq`oU69s4+QK%p>|G@mx1I@O_4QoL`%1m>37FKHQM$Dp?)((o~?pYo;-#J~b#d1#w z^}*?~6Aw36$gWvpHR2x!J#WK)_WO19^$K||?(^eJr_+S$m?mxHY;K$;FNNvdV(f*d z$2t8yI!$JSg63i2CxyCjx^(dT-P7fnz~&gQ9~A2Q(`7AE<1bH__2sm>`lx zwG$;#apDN1xal)Jzg{$SWn6S#^}9S3H>L$<2AHE%gC+kS*V#y}AVgI+%#e3r?YCyg zUASBqlK0IJRjvI{=?;92Nzcs-s6U6~wIPAx3M((9D=hhAq_6vCO7>VrX3D3qlX`&t zp-_Wo$P@;Deg?a6>ZMsyT_ z#I|qByLp$%`*M%^#%%c#XqB47GB$eX0=b$%&vtC_C87R2SLSguxmaF>%d=JTZ!pIR z%d=>XsM4UaP9Ptw!s#_pzM}VNmU?i$Ts>cpAW@Uzn)2yOU z2{J2ap+vnM{V8;7Kva}TT_pLMsN}wmY?bv>!)#XYtcNvg*(`AbM>dSEx;*GHZ0p{p zUeg>AuI%Qq2gvHw4Sxum5$W$gSIe(diPc@8C*b?0MxUIf zz3N*F^ii94mON~W=)_5DhPP-ou%j>TQpeAdcY^b~&z3bvqJRBtc>v$SwwyC*AI@`y z>aZa;J?cJNUOl4;1b`inxd@CiVWB>?yLHh$`Mti9I0BR54>rBR;(1|A01Lw-7z`cP7)Jx~e=Vps0-K&7)$adCG zEZyR;I#?@T01iFC;VG<>T`2z&I;@xS^ob5)Ianht0Rb8Eo@GuYIPFxQkRjN)No-V4uV3v0Z%1N)NZS}GVi|wzM zv*x~PwBI1`I80D~uk+F~gnF`G-f_xP`{t=m?RzIXwb&5oOGmKesgG@F?AQ(x6mndB z^+I#V9=-7Y!y!3#szVa`zc?h%pW={&gsN$j*MZZJ6xjSYk^oY^qQ2A!V=2_%G|EQM z5c-Z@z}Gh#WjCUsF)O=jiM$-+dzZ*gOgqjDoGC_MSt4iBEKv(b4so25)Z!ERIAE#M zm&!xxv5Pe97cP=FghXxY5U0K{iNvS=jCY%~FLB;7xeAtV3oAhb19gYYGTF?SEt8!v zF?%T(koOW>m8e#h5jg8k(sYoQb>-1w z`0dh7Vu%^^pn>W2qYFzuWmYm_ZKNO3tj7Icvs?$d-X}x@yexX@5J8)e@PrLOWgbOl zSberkUK|vmHR$|Cg=NLXvU404?!H)VferfA#WKo1@Y-g1{h6X+D4p}0UBzvK>3DKz z7$HVBGtBm=vS2-IU+!{a7>7y5dM@G)%nbTl5o(}2+7BKDA*U6rZOx)U$^B{vti=ey z*!Ch7he|8-8(e0N9yo$y<&Aw|uWrufZZ|BU`_XxKXesuZArT>YrY_vD#!b11tP*HS z7Z%LV1lT%&0}L-h#kE7`{Vu)HuSw7uEi>=VXlY;@0j&1ht@ggiHfl|h) zGdH5%9e#r*wJ3)uQ8y8p{${8J-PP=oE6UBh(QuyZLJzd#b7i1^f+-qH_d*g)S_qnr zb5c-%+E>S>OE5U|rJqBN3LiRwD@OEz;>;G3v0>2+Ej5T=XoMQhd-?5xUyhYHhNt9Qs={(rExg-kRf9Mz00 zc$_>z7TD&)78yO~754C+lJ|z2RD zSik7l5xEN%qLMu;kBynk14zFY zkhIEZ?~gMmeT%(g=w!ER(KYnfG_{T81o9?n>4UWmSXPwbplH~_x#M&Swcl*88>uR- z6C!x&jYlKfF>HmhFpiGZTs<2$q@*?+n;k_MJ#VhfbIoqk`u!{&_oH{mb1V&N3@SXu zP*XqP$sd@Y%O>XCKrcDL6S$VbIc~h+6SsFJ3XZS1TUcM|jsd)0#0l6ZG>dovo#OZ1 zSBDcGs4GSDxxVHoznB1w!s4ZpqGpLii6I6dPT~K!y=84{XS(0Jwu;Xvu6)NIi2uk>A3a%T#h$2(4*SVDf z_&H#2F{>Mr`z{PK)DqR49flmWU2jft1nLAdL`5xWT(=6(1+yx3_2S`1b68EKDr8$= z&ei7pJEp#&134tpH$bDNBkmPm00vd9s=Km@NR>UX$4Q|zUqvT_A9Qx(ZJ2bXpI@=b4TzBS1rCig<#BK9 z6zfSGv0>6`|4Dx_anSnci8T;ycS)P%%BffK#vU|ZE* zq5%i*IZZ8J*1d60eX#K9s4(gQ?1;1Lew$X;tz8{_wqXzTi|x96YMz5G>+T*i*IqAT z0f>a^^mO=|Xg8|J@6Iig73jGM4TF+x<`z1HpcJ%2R6gTY%;+>TOxp$19CNKI^R*7i zfA2m3qMe|0-+T>Kf&O4Ff#8x0!2O^hzkpvlD=(<@~R-_wPlNzZ@p~oTP^EJZ)t|+dy59@ zNr9e}P=ykuIQBAIVFNn8H^CQ#sL4)rr`NfN#yt;!+e8v6bTYu48oWyxceU^-}v z?Kz*(PR*!OE`f4FGy5#asd#ZgMT2(mBhZ;S*9zT;l5z80Rvlb#J)zX$;XP$ur9_tn zC&17kaOIYb8(1auax4aal@*kE*|^Vv!wGwc2->(U2ttiftknZfKQa{cob)g|KblLX>)RJ|FBxjsCS}2;8aTOrZ~}gzFpciH0-`<>!0=CEAfWR5QBH;})5#Eh3~9y= zv`3K1$l>VmBu1C9^Rf&8>%~g(vhC_%q~HYv9E&1MO>?#cmK)y~j*n&HCKFtEzxsht zSoe^ksKN~p{tsawW7vh*1ylef;oGxof0A`|%Mdg;|7?d{fWV(}&j}X|3k`sFJuvaO z;lJR`fkjxERG@GM2ro>KH0z>WS--jPKmf-j-N9&WYm;H z2{~g&3$R8|B?*KbdFV=Sw(hKf5P_BMZn&Fa&$$K@qFxs@2clYpkW3jyX_84ZM&>&G zb3XN6dWOY1gXTD#W#3;w09c3Ix{Kc+z$rxf2O0&jLOr|SixFU;qB`W@CvuDwJBV30 z21H>E2?pRD(_Qb0n^;+xgQCR~I>-0k**}AhVl3gRm}pufWoHLi<`Ezbx|#k00M=#t zVwYUhd@<1F-Xw;ncQT&xpoJ&1p0J#PuWWwJuRLJ4dgtzdi#~VcRLA3_w^o4ToB9G{ zqa$@b2W8qc>Lo71qS0_B!rab^{ZR?y^$dW=WZ zhi!I)0A@Kr@qe>HM^s)ak*y3%k|x)6QBPH_F$upFE5>vJa-b&j!kUl>n#71}3A~d9 zXG=QD%gOjGWJc&^!AAa-B>YeZdLcXyN2dgkIxWnc60ddNYl;5_1SzIK delta 30906 zcmeHw4R}=5o%j9UxxoMd0wgj(kc$QgnvB6l3kXUeL81vHB&nj(%w*;!nPoo0d;n?J zj=n2xt-7lX^=J#NwzXedTWxexx9zH1+-l#lYg_F~Te{d*i*@bFzI9u7>+bvepL6b= z$>c-uwa>H9^KKtYX71d3&j0+szs|WI|9t7;Kc7A=?qou98XubW&ptXn{C|8`Qv1kd zmSxrY8`EhgleUawM47=*Eaqf-Lh{nOb^L4zT(`?WDMVW?ol6Ehs0cq=8q)K8<|G_ zk#o;qXO8^5_KvbyTm79w>5LP%j1%<0@O_tGKk}2cyGmzyFx^h-@;n7(t(}Kugq4E}NK(8$(3x0adyis8Bstsa^7fsd38|I=UmCzTEV?2ej|iaY&8 ze>zWIl9;^85myoeACEn$K%tfdgR|_GW)L<%BX$ z8I?vOJBeDm)~%C^X^FIlQXx>qNf}fTio~Od;kmzBn5)Hyp59O_1a$hT2DfigUks!5 zWJ@}o#TxB|v(FC4KqfocXZK|j{n6eSu1m7neW_#|_Y7uxW6`jkOhx;niGZ=3x(1?Y z`J}v0KR*z{wWRxKG?9yDqF{m{JCumn(F`WomvB-xo@DI0gM~1d`^}DL(-}LQO!OsF zaXXWgH}cnLKPVHigPSD+wo5pIa@>K?UdK*n`}(5cC^(E)5J>}W#|d0zd~=KZhJ~e_ zLxwi*#J=7_XV1tV_eA< z2XGDRkl-eg8N1i9!`V~{0ARV%gq=-;kCJvYf-BL!q16;h*v|fFIulLwyCbyp+1CZP zIr}pbhL%Wh7o!FORLjdw;2(DejPC5ohGIE6W+osZlVn!F+43{fPd?*OQ-YdiSV2(c z3K#d$gd`0vMt}`Tc_$PeI23o771cnR2NZ2rrg?xIM#wm!c%Y3@Q@~sr3|xuEvvFIq zoClDHHoynj3MGc@G!VgT77iz&5+ouw5YsYX124dq{sj}eqeas>&@Pe0)v*9q--j|I9j5Sv~(f)zV zIy<<%X7#FIJ=ibo^eAa7&r93FiNsAZwG_98Xu79>6REs6nT#1!D1{|7MhvO-_h%%A zsp#Hl%;^ULT=eQlgboTjTDStnq3%R1y4$gX3J<|r7H%b8 zg<=#iw4hA;?=-n3DrbiWLWzDbI8>jfz;M4)I11DR#Ndu#CKXDg`@CX~wbM4WUcl^nA2f;V37%<7+Z z^34jRsU(Xs>l^(nG!^u0kvUVc!TcH=Gf~i0i+#})%ny`Y2x>SLg(ks>P|&GpA{`C0 z*@E^;45Nuuy`e?tLJR8nLlbaI!D66r&PzH<+I$i05d=Gzl`@(bN zc7{dsKZN^ zN;(Jq4eO9jC&N*&e#G7v%?tp8{ZZ&zJ&Cc4g2nR$T}&nuu$dk@?NA@&$1bK2i({{Y z0bQiCU_qR24k@(>gy0+_rBo(>SSPilE~06n1ex-#XM3vr{JC3 zACGy~GV|nl$6eW2=2^?UH4*o?xBqe3=lRoP9~T&xf7bND5lj#CL~^I0$xCXEY)-}@ zTp3S&N#!j`!&072XpddH*x{jo(M>^j4mHKZ43UeRp*q<~N}Eo>5_Y3jd{XZv5mUI! zcNJP*4=<6fD!fUj0`5TMk0IeFB#H9Q>{|-EOQdpm>zOjDnJSj7?R63kM^>TKkaThV zp*Z{NMQ-f0`VY5ZFs1CJ(L~4y;~WiVW1*C5cGr%xen3=bv_AnPX>IO?X)>NrEfdfM(zH?<|91J>E?DW}de%x<`Y>4F954_-#`?2ljEttHpi)%0==Q*TXq#SOKp;11l3A; zX`yfisQ{O)HIy7QOGhRX+RY9M?sF+8IaNi=&RPP;N|>ON_^zCyl$UYv#6^wEj&U@> z@n2fGL_9oFIlO)qVHZWt(><0>rZbACJsxE&Udp^~uVB8(*w-fG>w2S39lL2+#VmYJ zz;@%Isd@NtXxSt@T)Op{Hn>}MTFSp-MVZNByttVloq51YLdf6@IH`bf%{V4y9t{|C z3o}7(QYQ+=6c2oX&RRJ+54j5gSp$cLcRjFp7FZwXl-efHF}(elKj*PU9=L*}2S*WV z0eR8TOu|YNz7e9JekT(wc*dic&ip6^sQ3o1b^%cEyK>U^PRBU^fgk&2f(=Q!#4cih z!k|1DMQ23aN9}zw29jvo7v(#cFY*iUm@m}JbYNDI@v%(Xe3S2U`LK7o%18$6Hqm%1 z`E%^=Y1Z%3VKLS_DgV0=F@`4)f^;&Al!glqmc&t#76uOnEejISxqSA`lZApg&R8Hi zJb@Uevo+x$5(Tnyp;G9INhjC%)h^kG?`yAI@^xLuTFTAXVFw)LfV_)@U_QgjWurWJO!reEzBD-b#l^zC*B$3*7mlHo4Wwlp4el} z+q2_L%S`vq{}0WZB-~iz7It>XXhrke5QJ*7R4K)Qj6f=Z{SJm9dxb$*|d2z(ef zO%@61Ta5MEb=x8zL5N-yACzOk`=%r(m0^zG4=?}5f?Qe6N#t5k=bMC(Qk_P|kuTIA z;v)6iRj{6ZU8txiF%vMxp=jQC6b-k(=bT)k7#CewGCbIExTsg`pgJU`%(~C2e(iLb zyDz5#I}N)m1y8^*?;yX}y1c;g5Y)MN@C#(+!|FWyyd`hcFmId&HfC2JnUXDF&|}gw zRRnsc*kNjJ*j>mCybz8XU1^w%1Gc(KDPQ=TS~es;e{N1qX0s|WvTSdcofT|N zy^_n@;(u=(Pl;*vzoS4yFvZ3FU!XaP%z;DrP1UDV-h<2i1p{#whC|qZ(WSM6{82$a zfm|R$S5?m`eKGP!(-t~dQk<8ZmT!6~tx{se*ZsNj`XdEcQmMpR8*UUAi;!C`(20Kx z%$4)<#%Yd;q~o)UU+&0BX%CB$SeW|su*le!%^U?css%~6(7W%;xKE>^;7(p}4)M71 zA-$W8b~olmwRuv?)H7wc`7092gr=rWc>?`NYpCiyPI!HG&1DAp(?jvzWQ;H6+-u0n zg`;s)m%#PeHOAbH`#aIWz^vy^VsmW%PE#hA(Mb7&K1NiML9uC_a=O+%<^oNw1KHUcq}FE6muLsu{&_}i)=Cr)?H9HYOeusZ3qP;CElF08tCID1F zs<+%3)yZY=epRhhgDMK@VV(V9seW=;5U)p4D&G$gIGs`JIIrgNfXk$^8;(JAe*i%1o0!PAB~euEWvPb#u#;}YXio^k`=~u-FQYwE;3*QwN$$pk*k@=7ukv#5Cs>? zcg0jrH%%ztIW6Fm$TwA^K}vZ?wr-A^zvk;(c;?A5%zm@X^u=w1?&^fbLh~F__}irU?34|atgyA>kS54cT88bb z)(w!=K?e;Md!5)&pk47=IF>tYL993pL7a*)j9?L8q?}APHCHD0l^7}QQH!DjgQtWvLZVKUThJ~ni;H8tLN+O`b-@q$Zq+uD`jxe<>xMu~ zB~!>QD!Vt9Fm^tnoOQMZ3gq~CMW@Y2>hJhY*M#>^$jp`D}rrWrky19uR7UtSbs)U4UH1a=~ z7;x`H#mdQXi>4EUYlc3p<18KF8c%n<$zvBNs|ny#Wn`K!j>J3m7N0S#IR8s8d!yU7tH&=T%{K zW=MH!Zc3>*p|VkRpX3wR1+}26@fmCa_0d2Kg((;KC}MR$L3pmx9`Iq_$k>&dQ*gG!%3D@lj?(CXW#i+$_86 z!$Y!HGw&4h_JlNANZ5zg^L3NUxP#dg>deyJ9Z1HMCl7XU`*i|#4pnpMTX<4av{qEV zy%vHN(x}!Mr=n?Da)K^$U4}=c90O#MgM(l`v`BzEyly5SE0^qwJ38XQmWF|ht(}}^ z+P1x`Sw+*u^LW`pw@nf5px1aH)wZe^>yqtYk~?#feNAx{X-FRCw#I;Q$IRkjqE%8D zO)}CiSB#?la#vKaOm~%ePKO*KL~?mT4bmd3+aA{-C!+eJA@1&-Eb|;{xC5f}4~noR zW05`K#z4%2y2pw|elQjaJ6^{E6DZ6Ls1X#^m4jj2;mX%wFSjo`kuD8d&`x@d|Ksv; z>%***VmS7)EXX{=f`%5_EFXur8DlEsdk-}5SSvH8yH=3j#TQV34$z4tXT#J* zBA`iiO68QG79$C&HM5VKW|@cBJR~Bu1;{p9sN3zW0|E;I4+K|xqseR<0i!2tOeie@ zUbPGvX)Gx-;4hFWV=_OWWD2gzW5v^+6Y-SSXw|5fs&I}j?5QYwX|M}m@`jGF1TIjO z6KF~=*S2uFM>I)m{~w3eEyc8UU=2aEEeyJLy@2e_oa&fM$~{ndbD>Gx>&S!!)SS!- z4Y*HZ+*O|PWwl(ziY7wbD?WwA zT)4H3Tpd#=`L1gOPeN{^%ZpW>;av(rgG!w-p(1dZBUjKsS6D9gG{Izw0Bt`YzfRLi zZ9U*rDW2gC5lZcH;VFutv=!9SuG0@vTXB+~Et*zcP~ch-Ppmy2ehck^q4M?+2C3K{ zRVz~xV$C759!17T_R|fw|F|;8dI(C?RjF)tG6+gTXft!0@>uDWA? zmCBo1(*-MJxp2y))}rdi)wUe=?XFb{!R0~5BKtyYHQ|2(rP7xO7>_qX2f~?xL*uOl zEnf*$eB;HtCdPI8b`78UL}gE>R92Tt<{Nv5V&qA7Z%Sh73D?-nuIx4Ngn{YOIiDZ{ z%CJi+Ct#MNzlV8hsub?Cl)IgC-gf7z`h%U^kIX=L zorfxFEF?_8SVr4JR^Ab%1p}*+B{g0P zmRPH}EI2pHW`3Mf)m6L4LEb`u^0m8(0S;g@k=jk$$g6CNCUo5Gg{~7zRBb^AgCwAT zvaRdf$+2@u&4=^qX{@-ggv$-ge2xtn5fh3BY`Av*e&%LhYQTfj0NS%;unn>Esx_m zk|xkuYk=L;?ns)T&Z%ZZE1-l*b|g+F7TJWv3ETaRT4~9nHYO^4)w^C-4~*U9A)$#* zga6uY50~ti@3S{98D6~OQj4)O+_j^3#ReoKhwK3-26tFx4JBh1nVOLocPyq^<5{Lg zp}ANKjAxmTb_q4-$GXm~k)(0SpbWuo>^XHJ&1Bm(eWV7RQHRdlW=8DSNx6%()vS_F^OYy5jaD}|7)ao*<7J~+=lwFCGk>a49DB?ig zblS)(Y>60DCDmyXhp5!^WyNs(gNg{f%iDMl9IhKyrqkPEqEBAf2ea&IWxs6Tm|{X5 zX*SMZdASwL4~2bADg}lTP$W>>l@9{SCxd*kOuB$(=RnC=fC3Gpm&htRS)`TV1JjbDmys?3w2w z0jTHZ!BGP#n7n~<#bPpjs*yBEOpD4C0@1Oowz2 zlnB~7k=)Y1&9Lru=TOq(@t({{7M?z^)y)>34m7PQ>jCwt!O0<}ap5WWu^672)@QwG z-Vz{*6;%#G`6q<{)kAkNw##zXGpuH%y7#J1y7GlM-97k1CH_1l1gbsEPdfB0D^oNw z^Fn@z`YoJ#%xSebDU(hjH?ytV3K&j7E_sayt#egmt=pQ?>0~M<?QQur|lU#tJIQO^U>F>yUeIemvPYpcDSym>b;; zj;qh7(2J@=KCkD>mBA?}-`zKNMQ*OOnra$l;Uk#{#a8h#7C8J$CRL>6RlKYLaczNg zhfA(t5n}(%D~_@6{U~!Q7Ww8GZv*b zVD=pd0TM2MCVaf7?tah#OQ$o>838m`T>;| z5!=Ut8wyh@d6`h{iIS!g6LJZXxPdC2lq=-6Sz}x?nA5X!)n4#e%v)z$f0)G3YCWUs zBwp~PiRFzK3{>g(U>qJiG?Wehugdw&3#>n#WF|M_fZ~;jQfG3%539LgzTf(3UOy^# zZFpzJ%JZtPcC*ig=qSd<1r-aeWi)Pprz+MAU$l4`9Tz3l)IIM7G7R%YGVq^am6n$q zFN;_;UEA;~QPbw+zV$1)@gW+nMFU3aGQ)V4tTJ4-tS&l5hGpO%L;h1@8n26gucqti z4RQ5yy54+~#3RdTIlU>~YtmxzZ_8=^8ZwPC@+Z(F8;X%haJ#8CiE^GSo_Lq4;iREY zHJKVx_ZTD^SI~W8;|f|J-dI5uG+oSINsG+srsy$gksMoGy^`KVv&5|{X+6yqPpzc$ z&z*P;=rP1uB0b#Z`l_g?p&qIfnHsw6U6rP{wuL6vhJOtCkGaG&@E`EA%q%yS;ghcv zKb0EGM_;U=FZpPdcwrN*tE@AvPTXZ&j4*_|nh~=Yb)tSVU5p25O)Fw>abpvmBW~SH z(`THKA8mCm)1-;ja+GO@RbR!wi@!8VvibHQLOda#`ZgSCj?G|}on+qiMsOe$p=*JnZa z$(_hB+C*D3T|^z?#%6lA)os!tv2+V){i9|o$JJjoQ-j%U4xcz&EgH8__4J(#ON(jj zDu5-VVTl&N5>l`@<6v&G~)PcmDd}F-`F$SaRpuLqpbMym0*z} zapFqaKsShUuA(^IByPKkV&(yJ_|m0|Mk`urCebazZlfi$L9(jrvTH82*X%Nk+dYu0 z#0_n9R^^=q@ZQOjE+OM%;+{4--@L~h{?@XEqd#k-c_tker?%4$aBovPt)u%zuAR1A zbRR=k3fS&9E&ujGE*-K&-G}9s<786@%vH{UYZ-heMC^;=ckOhs`G6?`9kjrF$P`y} z&<67nQ+%+4uH@@K=%DTEA5!B!U>c8%8Tg^`1M{sI_)+;pL%H!SZ-I-&pYH(VPne^h z-a*2oC-c8t_Ozzf_X}2!YXxgKI)197YO15A_+mHxVaE6I)qL7Co-@T)-$P;Zm^oT; zHI0&a+!RNzp}6^iDPGtGVd&aP`^^_k@%K9^XTFMy*U}1~p+AUEUQ7PstCtsFSRt0a zfBbDL#E-ATRSYfXDZ8Hj!+P1In7HX$aPNv;G~XRZ%(;PPn5Rq;-$hrMZjcVmZpCYPXp%p*teeth7^x%05eN=%StG$jsuM(#o4x;%gf7w_lClNmj z(s?VE_^1lI8+wsGLUN=pmQ1F`Tq+Mc(by8PGDIuajQODqyAZ})D94e#gJZ7vVKSo0 z$P)3v5H0gB^O3zJy5EVkT+(2Wy}u{f*9UKXnRqNjXU`k+D{#5QCq8fhD!8PV%FSgy z@xYa|_?-On(B8{^R2Ich_+S_%WyUIA)qHW)becZ;+6^?~qdM_WABMQBk5aUnKYxWT zX6iK2T1h1Fqkgc^1|Ms_(K!S3Im@)NVl)OlV2c@X`qa!uNf_f_p9Xb5Us2)CEFnm-F|E%AL^XT}t zM~;pYh|e0Go}vS+YyTok>#By-jfQc9`cQ7%BtMiJ#sP&XRyDp`d}ZR!EG-;u+Do4` z>2^l=BGJ8*t`ggZsFv;&M|aYVu1vmzDuC`Bz3=_-Cr(59YsBUo=sZ^i(8nbBl`oQ# z#uq3rjrSDui+R{5evLR}^vRp(MuI8W@@I4lOu;jMMr$g+Sb*0rGCIqR2Yh15&Gf4I zkWZ8ypvC-m)dA`>ACasZFdy}ee&qml_{?wl1P0nEn(-aV&q4CAOzv@fMaqX$1i%~tOF zzM>%2Bu9yCA6C!3Dw^Wu_E7dyr(h?zKjrMr+K1#ip6Ug5OC&SJ56<*Y-z8n=^ z%qRK^uliXj#fA!;6spoLyq}7I7<=q);Ug1w#^;cGP+7XPo9wC0cSn2Is@?e2yW(dT zI-7pZM=E=!;yA;2Zeo0nxrxfkThX!zLiuwleFv*uqZ2nsbs11;$0i;}(M1!XJWrP* zG?2fd8RwUV=wKd^a16=|lDg{ITo{^PujROp8uZ9|HH5YZ_GMr2(HENc;}~o1$5!s` z`mw~v=1Mnhj+}l4AD$XIND2tUI6m=WFk4QZkl{{O=5LMe$wniL84odTh{jlXVd8<- z7Xepb2MgCv74~M`Uyd1SI&peyGv+boDY-rH)c9YJi^=c)T(AbX8@D~oIF&afb6+oB zhbE7~0_g*x4bwWw4{?uEK`*+@e&E#X!JKy|0}xR#c)@X? zsyneefn12;v-a~a1=(x61^XPhO-|n679I@C%J7Z4dhWuC8nZL3!ORKQ*Y8HWT~QH*I;tR;c&kEq;=!Ix~_>8rpAtjQ;huEl{~##z>FxH9Iz z_k4NR?Whm5b|*r6L%C=ygx3mqQde5G6TQcLiSZ%NbWvp+tZ9OVD5)Hr6m})4RvEqC zfZdE-3ChZhV%@UVMyQ|b4I`3JvPcXD&CWNBLk8yw_qc3{4T|qnwX^ zKHf$kaRft#{w8^RS3{#ZHc_h6v{7c=%*+ ziw}2Exrdx!H21`4ZNvlBaz$LGG-g{zcnD8KG#=pe;3#H0nnUNI%yp}>2X}b@^VMuk zrCu}Ul78<}6bfcW#$K%q{F_7npNE&gn$5siFJjLv@DiPfG2gn` zy&`c8sa1qiX>%u)N~T!vNKzsFR8hEeC@HrGXN<-k^R5gtxJ%r46T9p_ac+P%`rh=B zxHmvcVQAm)PJc*xJ+DybTE-!fn2HRdJTD1Rt%M>DDZ3 zu2pFvscJ2^R#|n{#TH~&1R9ZpyYxb;H)rWDAH0w*Fz4zo-@6czf2IC1yPnQ97wRup z)zgZZODrmDPK6McTH?-Hsu;bao(>@}mG?B8%k{l~-bl8&$`UVJNmb%|jR+6xth+YR zhO*TbmGcp?$RP5CrD9+c?!4F%AK66P%(a&I)p@jpHi$d#qGdDl@4s0tzI7MX(H`;2 zU5Kx45Pm^5$b~fud^;c#f-a5AqgBfqW zn-*b)Pu)#T)*c_-J3Kh*7yorPRa>{o!?;Gj&xiEit>XHRBM14$$EitN_6cef zH-3WFiEn&@qGI_WgtxgvG$2kMqAs!FFv90s57U*SKRQgCNi6ylZJt*vn?bsggE+{a z$TAyV7#;i+wU}pb#ipl>eiu;pV1Fva_%2A1`<-x>b9wDh z__*V^SpOMXS=rQ>#h%4f^nFgmd-!!R^ci~Bd^$nb`0Hg|L2aW>zah%*r?1bdmDgJ3 zQ41yF2lrzcvpz@h8Fo{zx^b2`@Hx7AIu6fB@!KZmikCh|E9p?GPXMOZr!nUK`DPnLb78%MwKFug?L(|<+36=IaWBYM70F^l$?rug?qX~TtCbE9EIK0oqT zCuYGBR{vYmsWy)4)sit}LM9FRuoV?zk z$*W2JTO;oJ8wyp|wnDF_GsvOEexK8yS?|BXsG!acKLPc<>0N zOK2g1OD=d4sixbXWU}02mWqd-L{90jSoL?bYQe@G(5t|bG8m}wGa(zkD1Tg5i}QJL zBul@euRm&ji>X1&h`w&n6XtaB{=cIS3iCU(PrUCtbk}TuV?T0w;61D4@h45O^eMV# z4k{lA8XV*)Eb|C5!5?}G0{Pri^hgP5AhEdg>iN>Ot zA%j*EeNX)Af72Bf9XDr+uYQj{AOc5`7)Re9pXs-DoZS-HC(S*UtA(3b{-h%@T_>EHHYxuRY-TSpS z+VA~T_AG6jk29VWMX_m4e!w$*&(dY4bwUjO0<8Di-;-rWqJ7e7&A?E~4-vdZ2{8&} zH$bb9LA$pZOeLP9dgLdcdX8>eu(2KU15{TeC9)eFMyXhEj9O75i5#Q%%!1eA-4_r~ zAERy4sDtP*3H!%Tiy!?lr9{b3z>dQ|p?>inKcPJqZSc(!pZF;?lr;L9eb0+MAE!&i zjN|m-iiXWGI7CtzfwP!wh9f?IoSvRW-9(R&82TCgqv-f2`VF*&Z?@Qaf<8UFs!hI+ zikDVmWW^gNsJ6ViCDN6YU>j6gQZghid4YOxl^22^P|L#A8^q^cphsu<-;?AQZsC$y za+8SvoEpw+P?z{1ltgxr8MOQWR&JnLM30g|xA^9W@BJJc&K!re?fwN_G>+juR?KkI zXb;hoG$F^$@i@+5x8r*8&`DG}zkBkGSl}LCxp?Vix^8wA@CZc~A*{)~NwohON#{Mk zruu1=C3>2~mwruMGwi(fnEnb~Av#{6R*Me%=8k^u73j~3YUpp&sL|uZm@U5#2q+g1 zo}#ac_rHqq4!uh6om=fDBhqBtpTFT7zkwF~kKfQ`75+|^05!q`xWRhH?i5S^1#Ei! zH>lyp{)H;UP5(lzXVC$o@8iqJYjnw3nZ9SJ#>nKB;Nd2x_&-A z>YHa&ZI?X@sG#D1^TqAIMGq*_qL2KRu2{6OQ9AECoG>={DrE!0Kj}ltbHVHMQSqhM zDKiZTRCaun2 zv#_ZlP}QiC1I$_GO}=A%=P%`J)^yXZK0kv`J&EG|30^V*J~Sc$c{wMqb4V4)E$i(l9?^?ZAI=6@bTHdpM2{cM~t1oRw8ne1A@$={N21a z1zm^U9{b^QUh(71r9cbUUig(ryB!>KsV9(q8!b)f8IXe&{wBLQWVj+XF&6&hw!7dU zRGo5StyBK0ubq`dMb5g$`(X^GYYSeGhrFd_RL4moT7_2#794(AAiooiamy%3AnB;1 zFWLP852}{8A#jVfJ~b*}Z^xY}KDwNn|M|^w`t*u+gv3tV&D%K8%3+)=)m08}=#CbBU2siny~4m5$TGYK%04L>>iL;S`QyfkbmN}RgL zVY?jw zxh|hyi6febxywMlAr=MV5ToYsP{I2g0Xpx6l8AQUDL^Z*t}%h-j{)imye}jjO>dU3 zYy>chBpB(sPA5}9%3U?sdjwyb9qM)K5>9Tvep4tKp4P1!dv9(qAkIxlaDcC0FNGFZKIwqp!@wCKIRZ{@)h`z7<;@y8^w;?k z|3)MC-H%@?wVeLP`n|+`ZwT)lb7dM*s&XD`0u2rTP;awjmIM1pHVd>$e$ZMfKTXjr zrOjHF;1@A3qm|%aXr`=?-qaJIA4B-DrPqezyu3_MV^03?@IIIqoUpV)0ChL_i zapY4UAU0lV4G>_r5fCBu>NQ2PBVWr0@{I?eG}o;$;WbmfB_^b*@%XG4zW42}1 z!CLuE#lg$1gPadpxM`Jjut{Eb3A#0u9;maP+P?#P4iO_Gk1YLQPUs~QsCYSeVP7(F Pv2}2*W&E^jgJt|*zQ*UL From fc599ceca71d182266673b281bbaefaaccd80ac7 Mon Sep 17 00:00:00 2001 From: illuzen Date: Sat, 30 Aug 2025 14:37:40 +0800 Subject: [PATCH 3/6] fix Cargo.lock --- Cargo.lock | 457 ++++++++++------------------------------------------- Cargo.toml | 38 ++--- 2 files changed, 103 insertions(+), 392 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c1dbf4a..3036c45 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -183,9 +183,6 @@ dependencies = [ "ark-ec 0.4.2", "ark-ff 0.4.2", "ark-std 0.4.0", - "ark-ec 0.4.2", - "ark-ff 0.4.2", - "ark-std 0.4.0", ] [[package]] @@ -200,22 +197,6 @@ dependencies = [ "ark-std 0.4.0", ] -[[package]] -name = "ark-bls12-381" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3df4dcc01ff89867cd86b0da835f23c3f02738353aaee7dde7495af71363b8d5" -dependencies = [ - "ark-ec 0.5.0", - "ark-ff 0.5.0", - "ark-serialize 0.5.0", - "ark-std 0.5.0", - "ark-ec 0.4.2", - "ark-ff 0.4.2", - "ark-serialize 0.4.2", - "ark-std 0.4.0", -] - [[package]] name = "ark-bls12-381" version = "0.5.0" @@ -234,10 +215,6 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" dependencies = [ - "ark-ff 0.4.2", - "ark-poly 0.4.2", - "ark-serialize 0.4.2", - "ark-std 0.4.0", "ark-ff 0.4.2", "ark-poly 0.4.2", "ark-serialize 0.4.2", @@ -262,7 +239,7 @@ dependencies = [ "ark-std 0.5.0", "educe", "fnv", - "hashbrown 0.15.4", + "hashbrown 0.15.5", "itertools 0.13.0", "num-bigint", "num-integer", @@ -288,10 +265,6 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" dependencies = [ - "ark-ff-asm 0.4.2", - "ark-ff-macros 0.4.2", - "ark-serialize 0.4.2", - "ark-std 0.4.0", "ark-ff-asm 0.4.2", "ark-ff-macros 0.4.2", "ark-serialize 0.4.2", @@ -326,26 +299,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "ark-ff" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a177aba0ed1e0fbb62aa9f6d0502e9b46dad8c2eab04c14258a1212d2557ea70" -dependencies = [ - "ark-ff-asm 0.5.0", - "ark-ff-macros 0.5.0", - "ark-serialize 0.5.0", - "ark-std 0.5.0", - "arrayvec 0.7.6", - "digest 0.10.7", - "educe", - "itertools 0.13.0", - "num-bigint", - "num-traits", - "paste", - "zeroize", -] - [[package]] name = "ark-ff-asm" version = "0.4.2" @@ -363,7 +316,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62945a2f7e6de02a31fe400aa489f0e0f5b2502e69f95f853adb82a96c7a6b60" dependencies = [ "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] @@ -389,7 +342,7 @@ dependencies = [ "num-traits", "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] @@ -398,9 +351,6 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" dependencies = [ - "ark-ff 0.4.2", - "ark-serialize 0.4.2", - "ark-std 0.4.0", "ark-ff 0.4.2", "ark-serialize 0.4.2", "ark-std 0.4.0", @@ -420,7 +370,7 @@ dependencies = [ "ark-std 0.5.0", "educe", "fnv", - "hashbrown 0.15.4", + "hashbrown 0.15.5", ] [[package]] @@ -435,21 +385,6 @@ dependencies = [ "num-bigint", ] -[[package]] -name = "ark-serialize" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f4d068aaf107ebcd7dfb52bc748f8030e0fc930ac8e360146ca54c1203088f7" -dependencies = [ - "ark-serialize-derive 0.5.0", - "ark-std 0.5.0", - "arrayvec 0.7.6", - "ark-serialize-derive 0.4.2", - "ark-std 0.4.0", - "digest 0.10.7", - "num-bigint", -] - [[package]] name = "ark-serialize" version = "0.5.0" @@ -482,7 +417,7 @@ checksum = "213888f660fddcca0d257e88e54ac05bca01885f258ccdf695bafd77031bb69d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] @@ -538,49 +473,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "ark-std" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "246a225cc6131e9ee4f24619af0f19d67761fff15d7ccc22e42b80846e69449a" -dependencies = [ - "num-traits", - "rand 0.8.5", -] - -[[package]] -name = "ark-transcript" -version = "0.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47c1c928edb9d8ff24cb5dcb7651d3a98494fff3099eee95c2404cd813a9139f" -dependencies = [ - "ark-ff 0.5.0", - "ark-serialize 0.5.0", - "ark-std 0.5.0", - "digest 0.10.7", - "rand_core 0.6.4", - "sha3", -] - -[[package]] -name = "ark-vrf" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9501da18569b2afe0eb934fb7afd5a247d238b94116155af4dd068f319adfe6d" -dependencies = [ - "ark-bls12-381 0.5.0", - "ark-ec 0.5.0", - "ark-ed-on-bls12-381-bandersnatch", - "ark-ff 0.5.0", - "ark-serialize 0.5.0", - "ark-std 0.5.0", - "digest 0.10.7", - "rand_chacha 0.3.1", - "sha2 0.10.9", - "w3f-ring-proof", - "zeroize", -] - [[package]] name = "array-bytes" version = "6.2.3" @@ -1438,8 +1330,8 @@ source = "git+https://github.com/Quantus-Network/chain#baeb1928f1ea443f781f5825d dependencies = [ "log", "parity-scale-codec", - "poseidon-resonance 0.9.0 (git+https://github.com/Quantus-Network/poseidon-resonance)", - "rusty-crystals-dilithium 1.0.0 (git+https://github.com/Quantus-Network/rusty-crystals)", + "poseidon-resonance", + "rusty-crystals-dilithium", "scale-info", "sp-core 37.0.0", "sp-io", @@ -1512,6 +1404,27 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" +[[package]] +name = "dyn-clonable" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a36efbb9bfd58e1723780aa04b61aba95ace6a05d9ffabfdb0b43672552f0805" +dependencies = [ + "dyn-clonable-impl", + "dyn-clone", +] + +[[package]] +name = "dyn-clonable-impl" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e8671d54058979a37a26f3511fbf8d198ba1aa35ffb202c42587d918d77213a" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + [[package]] name = "dyn-clone" version = "1.0.20" @@ -1582,7 +1495,7 @@ dependencies = [ "enum-ordinalize", "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] @@ -1628,7 +1541,7 @@ checksum = "0d28318a75d4aead5c4db25382e8ef717932d0346600cacae6357eb5941bc5ff" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] @@ -2217,12 +2130,6 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" -[[package]] -name = "httpdate" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" - [[package]] name = "hyper" version = "1.7.0" @@ -2238,7 +2145,6 @@ dependencies = [ "http-body", "httparse", "httpdate", - "httpdate", "itoa", "pin-project-lite", "pin-utils", @@ -2279,7 +2185,7 @@ dependencies = [ "hyper", "libc", "pin-project-lite", - "socket2", + "socket2 0.6.0", "tokio", "tower-service", "tracing", @@ -2534,15 +2440,6 @@ dependencies = [ "either", ] -[[package]] -name = "itertools" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" -dependencies = [ - "either", -] - [[package]] name = "itertools" version = "0.14.0" @@ -2874,11 +2771,11 @@ dependencies = [ [[package]] name = "matchers" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +checksum = "d1525a2a28c7f4fa0fc98bb91ae755d1e2d1505079e05539e35bc876b5d65ae9" dependencies = [ - "regex-automata 0.1.10", + "regex-automata", ] [[package]] @@ -2889,11 +2786,10 @@ checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" [[package]] name = "memory-db" -version = "0.34.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e300c54e3239a86f9c61cc63ab0f03862eb40b1c6e065dc6fd6ceaeff6da93d" +checksum = "808b50db46293432a45e63bc15ea51e0ab4c0a1647b8eb114e31a3e698dd6fbe" dependencies = [ - "foldhash", "hash-db", ] @@ -2905,7 +2801,7 @@ checksum = "7e300c54e3239a86f9c61cc63ab0f03862eb40b1c6e065dc6fd6ceaeff6da93d" dependencies = [ "foldhash", "hash-db", - "hashbrown 0.15.4", + "hashbrown 0.15.5", ] [[package]] @@ -2988,12 +2884,11 @@ dependencies = [ [[package]] name = "nu-ansi-term" -version = "0.46.0" +version = "0.50.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +checksum = "d4a28e057d01f97e61255210fcff094d74ed0466038633e95017f5beb68e4399" dependencies = [ - "overload", - "winapi", + "windows-sys 0.52.0", ] [[package]] @@ -3136,12 +3031,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" -[[package]] -name = "overload" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" - [[package]] name = "parity-bip39" version = "2.0.1" @@ -3352,7 +3241,7 @@ source = "git+https://github.com/Quantus-Network/plonky2#9c06fe53083dd1672951b6d [[package]] name = "plonky2_util" version = "1.0.0" -source = "git+https://github.com/Quantus-Network/plonky2#80a10007d8359b54843acb826097561859a6b621" +source = "git+https://github.com/Quantus-Network/plonky2#9c06fe53083dd1672951b6d5bc3aa03bde4d1a66" [[package]] name = "polkavm-common" @@ -3393,7 +3282,7 @@ dependencies = [ "polkavm-common 0.18.0", "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] @@ -3415,7 +3304,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "48c16669ddc7433e34c1007d31080b80901e3e8e523cb9d4b441c3910cf9294b" dependencies = [ "polkavm-derive-impl 0.18.1", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] @@ -3425,7 +3314,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba0ef0f17ad81413ea1ca5b1b67553aedf5650c88269b673d3ba015c83bc2651" dependencies = [ "polkavm-derive-impl 0.24.0", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] @@ -3468,23 +3357,7 @@ dependencies = [ [[package]] name = "poseidon-resonance" version = "0.9.0" -source = "git+https://github.com/Quantus-Network/poseidon-resonance?branch=injective-felt-embeddings#6f0606efe421f3695d7ff29b4ba6cf269a925188" -dependencies = [ - "log", - "parity-scale-codec", - "plonky2", - "scale-info", - "serde", - "sp-core 37.0.0", - "sp-runtime", - "sp-storage", - "sp-trie 40.0.0", -] - -[[package]] -name = "poseidon-resonance" -version = "0.9.0" -source = "git+https://github.com/Quantus-Network/poseidon-resonance#2663eb5819ac36eac2a74ee3debfd642262c1c54" +source = "git+https://github.com/Quantus-Network/poseidon-resonance#4d44267446406243e336bc7966d20452686f8347" dependencies = [ "log", "parity-scale-codec", @@ -3609,20 +3482,6 @@ dependencies = [ "thiserror 1.0.69", ] -[[package]] -name = "prometheus" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d33c28a30771f7f96db69893f78b857f7450d7e0237e9c8fc6427a81bae7ed1" -dependencies = [ - "cfg-if", - "fnv", - "lazy_static", - "memchr", - "parking_lot", - "thiserror 1.0.69", -] - [[package]] name = "quantus-cli" version = "0.1.0" @@ -3637,10 +3496,10 @@ dependencies = [ "hex", "jsonrpsee", "parity-scale-codec", - "poseidon-resonance 0.9.0 (git+https://github.com/Quantus-Network/poseidon-resonance?branch=injective-felt-embeddings)", + "poseidon-resonance", "rand 0.9.2", "rpassword", - "rusty-crystals-dilithium 1.0.0 (git+https://github.com/Quantus-Network/rusty-crystals.git?branch=injective-felt-embeddings)", + "rusty-crystals-dilithium", "rusty-crystals-hdwallet", "serde", "serde_json", @@ -3655,7 +3514,7 @@ dependencies = [ "tempfile", "thiserror 2.0.16", "tokio", - "toml 0.9.4", + "toml 0.9.5", "trie-db 0.29.1", "wormhole-circuit", "zk-circuits-common", @@ -3830,17 +3689,8 @@ checksum = "23d7fd106d8c02486a8d64e778353d1cffe08ce79ac2e82f540c86d0facf6912" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.10", - "regex-syntax 0.8.6", -] - -[[package]] -name = "regex-automata" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" -dependencies = [ - "regex-syntax 0.6.29", + "regex-automata", + "regex-syntax", ] [[package]] @@ -3851,15 +3701,9 @@ checksum = "6b9458fa0bfeeac22b5ca447c63aaf45f28439a709ccd244698632f9aa6394d6" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.6", + "regex-syntax", ] -[[package]] -name = "regex-syntax" -version = "0.6.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" - [[package]] name = "regex-syntax" version = "0.8.6" @@ -4034,40 +3878,32 @@ checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" [[package]] name = "rusty-crystals-dilithium" version = "1.0.0" -source = "git+https://github.com/Quantus-Network/rusty-crystals.git?branch=injective-felt-embeddings#660deceaa250e4c33081553747dd0e48fba68adf" +source = "git+https://github.com/Quantus-Network/rusty-crystals.git#a067d74cd1e196e44dffe845310fa6e6c55f5aaa" dependencies = [ "rand 0.7.3", "sha2 0.10.9", ] -[[package]] -name = "rusty-crystals-dilithium" -version = "1.0.0" -source = "git+https://github.com/Quantus-Network/rusty-crystals#b6afb061350f5ae03fdfd52b90227b7c627646ed" -dependencies = [ - "sha2 0.10.9", -] - [[package]] name = "rusty-crystals-hdwallet" version = "0.1.1" -source = "git+https://github.com/Quantus-Network/rusty-crystals.git?branch=injective-felt-embeddings#660deceaa250e4c33081553747dd0e48fba68adf" +source = "git+https://github.com/Quantus-Network/rusty-crystals.git#a067d74cd1e196e44dffe845310fa6e6c55f5aaa" dependencies = [ "bip39", "hex", "hex-literal", "hmac 0.12.1", "nam-tiny-hderive", - "poseidon-resonance 0.9.0 (git+https://github.com/Quantus-Network/poseidon-resonance?branch=injective-felt-embeddings)", + "poseidon-resonance", "rand 0.8.5", "rand_chacha 0.9.0", "rand_core 0.6.4", - "rusty-crystals-dilithium 1.0.0 (git+https://github.com/Quantus-Network/rusty-crystals.git?branch=injective-felt-embeddings)", + "rusty-crystals-dilithium", "serde", "serde_json", "sha2 0.10.9", "sp-core 37.0.0", - "thiserror 2.0.12", + "thiserror 2.0.16", ] [[package]] @@ -4627,6 +4463,16 @@ dependencies = [ "zeroize", ] +[[package]] +name = "socket2" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + [[package]] name = "socket2" version = "0.6.0" @@ -4655,10 +4501,8 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "41.0.0" -version = "41.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28c668f1ce424bc131f40ade33fa4c0bd4dcd2428479e1e291aad66d4b00c74f" -checksum = "28c668f1ce424bc131f40ade33fa4c0bd4dcd2428479e1e291aad66d4b00c74f" dependencies = [ "parity-scale-codec", "scale-info", @@ -4670,10 +4514,8 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "27.0.0" -version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2929fd12ac6ca3cfac7f62885866810ba4e9464814dbaa87592b5b5681b29aee" -checksum = "2929fd12ac6ca3cfac7f62885866810ba4e9464814dbaa87592b5b5681b29aee" dependencies = [ "docify", "integer-sqrt", @@ -4686,17 +4528,16 @@ dependencies = [ [[package]] name = "sp-core" -version = "37.0.0" +version = "35.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e1a46a6b2323401e4489184846a7fb7d89091b42602a2391cd3ef652ede2850" +checksum = "4532774405a712a366a98080cbb4daa28c38ddff0ec595902ad6ee6a78a809f8" dependencies = [ - "ark-vrf", "array-bytes", "bitflags 1.3.2", "blake2", "bounded-collections", "bs58", - "dyn-clone", + "dyn-clonable", "ed25519-zebra", "futures", "hash-db", @@ -4718,7 +4559,6 @@ dependencies = [ "secp256k1", "secrecy", "serde", - "sha2 0.10.9", "sp-crypto-hashing", "sp-debug-derive", "sp-externalities", @@ -4821,10 +4661,8 @@ dependencies = [ [[package]] name = "sp-io" version = "41.0.1" -version = "41.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3f244e9a2818d21220ceb0915ac73a462814a92d0c354a124a818abdb7f4f66" -checksum = "f3f244e9a2818d21220ceb0915ac73a462814a92d0c354a124a818abdb7f4f66" dependencies = [ "bytes", "docify", @@ -4833,7 +4671,6 @@ dependencies = [ "log", "parity-scale-codec", "polkavm-derive 0.24.0", - "polkavm-derive 0.24.0", "rustversion", "secp256k1", "sp-core 37.0.0", @@ -4851,10 +4688,8 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.43.0" -version = "0.43.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "269d0ee360f6d072f9203485afea35583ac151521a525cc48b2a107fc576c2d9" -checksum = "269d0ee360f6d072f9203485afea35583ac151521a525cc48b2a107fc576c2d9" dependencies = [ "parity-scale-codec", "parking_lot", @@ -4875,10 +4710,8 @@ dependencies = [ [[package]] name = "sp-runtime" version = "42.0.0" -version = "42.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b25d4d3811410317175ff121b3ff8c8b723504dadf37cd418b5192a5098d11bf" -checksum = "b25d4d3811410317175ff121b3ff8c8b723504dadf37cd418b5192a5098d11bf" dependencies = [ "binary-merkle-tree", "docify", @@ -4917,7 +4750,6 @@ dependencies = [ "primitive-types 0.13.1", "sp-externalities", "sp-runtime-interface-proc-macro 18.0.0", - "sp-runtime-interface-proc-macro 18.0.0", "sp-std", "sp-storage", "sp-tracing", @@ -4925,27 +4757,6 @@ dependencies = [ "static_assertions", ] -[[package]] -name = "sp-runtime-interface" -version = "30.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fcd9c219da8c85d45d5ae1ce80e73863a872ac27424880322903c6ac893c06e" -dependencies = [ - "bytes", - "impl-trait-for-tuples", - "parity-scale-codec", - "polkavm-derive 0.24.0", - "primitive-types 0.13.1", - "sp-externalities", - "sp-runtime-interface-proc-macro 19.0.0", - "sp-std", - "sp-storage", - "sp-tracing", - "sp-wasm-interface 22.0.0", - "sp-wasm-interface 21.0.1", - "static_assertions", -] - [[package]] name = "sp-runtime-interface" version = "30.0.0" @@ -4971,34 +4782,6 @@ name = "sp-runtime-interface-proc-macro" version = "18.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0195f32c628fee3ce1dfbbf2e7e52a30ea85f3589da9fe62a8b816d70fc06294" -dependencies = [ - "Inflector", - "expander", - "proc-macro-crate", - "proc-macro2", - "quote", - "syn 2.0.104", -] - -[[package]] -name = "sp-runtime-interface-proc-macro" -version = "19.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca35431af10a450787ebfdcb6d7a91c23fa91eafe73a3f9d37db05c9ab36154b" -dependencies = [ - "Inflector", - "expander", - "proc-macro-crate", - "proc-macro2", - "quote", - "syn 2.0.104", -] - -[[package]] -name = "sp-runtime-interface-proc-macro" -version = "19.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca35431af10a450787ebfdcb6d7a91c23fa91eafe73a3f9d37db05c9ab36154b" dependencies = [ "Inflector", "expander", @@ -5047,7 +4830,6 @@ name = "sp-state-machine" version = "0.46.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "483422b016ee9ddba949db6d3092961ed58526520f0586df74dc07defd922a58" -checksum = "483422b016ee9ddba949db6d3092961ed58526520f0586df74dc07defd922a58" dependencies = [ "hash-db", "log", @@ -5123,13 +4905,11 @@ name = "sp-trie" version = "40.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6b2e157c9cf44a1a9d20f3c69322e302db70399bf3f218211387fe009dd4041c" -checksum = "6b2e157c9cf44a1a9d20f3c69322e302db70399bf3f218211387fe009dd4041c" dependencies = [ "ahash", "foldhash", - "foldhash", "hash-db", - "hashbrown 0.15.4", + "hashbrown 0.15.5", "memory-db 0.34.0", "nohash-hasher", "parity-scale-codec", @@ -5140,7 +4920,6 @@ dependencies = [ "sp-core 37.0.0", "sp-externalities", "substrate-prometheus-endpoint", - "substrate-prometheus-endpoint", "thiserror 1.0.69", "tracing", "trie-db 0.30.0", @@ -5171,25 +4950,11 @@ dependencies = [ "parity-scale-codec", ] -[[package]] -name = "sp-wasm-interface" -version = "22.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffdbc579c72fc03263894a0077383f543a093020d75741092511bb05a440ada6" -dependencies = [ - "anyhow", - "impl-trait-for-tuples", - "log", - "parity-scale-codec", -] - [[package]] name = "sp-weights" version = "32.0.0" -version = "32.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c8a1d448faceb064bb114df31fc45ff86ea2ee8fd17810c4357a578d081f7732" -checksum = "c8a1d448faceb064bb114df31fc45ff86ea2ee8fd17810c4357a578d081f7732" dependencies = [ "bounded-collections", "parity-scale-codec", @@ -5264,9 +5029,9 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" -version = "0.17.6" +version = "0.17.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73389cae0245dee48633a2346fa7b82b5c77e586ff44493ea54f4e0ffa0ef827" +checksum = "d23e4bc8e910a312820d589047ab683928b761242dbe31dee081fbdb37cbe0be" dependencies = [ "http-body-util", "hyper", @@ -5628,9 +5393,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.47.1" +version = "1.46.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89e49afdadebb872d3145a5638b59eb0691ea23e46ca484037cfab3b76b95038" +checksum = "0cc3a2344dafbe23a245241fe8b09735b521110d30fcefbbd5feb1797ca35d17" dependencies = [ "backtrace", "bytes", @@ -5641,9 +5406,9 @@ dependencies = [ "pin-project-lite", "signal-hook-registry", "slab", - "socket2", + "socket2 0.5.10", "tokio-macros", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -5845,14 +5610,14 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.19" +version = "0.3.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" +checksum = "2054a14f5307d601f88daf0553e1cbf472acc4f2c51afab632431cdcd72124d5" dependencies = [ "matchers", "nu-ansi-term", "once_cell", - "regex", + "regex-automata", "sharded-slab", "smallvec", "thread_local", @@ -5864,7 +5629,7 @@ dependencies = [ [[package]] name = "trie-db" -version = "0.30.0" +version = "0.29.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c992b4f40c234a074d48a757efeabb1a6be88af84c0c23f7ca158950cb0ae7f" dependencies = [ @@ -6056,11 +5821,6 @@ dependencies = [ "ark-ff 0.4.2", "ark-serialize 0.4.2", "ark-serialize-derive 0.4.2", - "ark-bls12-381 0.4.0", - "ark-ec 0.4.2", - "ark-ff 0.4.2", - "ark-serialize 0.4.2", - "ark-serialize-derive 0.4.2", "arrayref", "digest 0.10.7", "rand 0.8.5", @@ -6117,52 +5877,6 @@ dependencies = [ "w3f-plonk-common", ] -[[package]] -name = "w3f-pcs" -version = "0.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbe7a8d5c914b69392ab3b267f679a2e546fe29afaddce47981772ac71bd02e1" -dependencies = [ - "ark-ec 0.5.0", - "ark-ff 0.5.0", - "ark-poly 0.5.0", - "ark-serialize 0.5.0", - "ark-std 0.5.0", - "merlin", -] - -[[package]] -name = "w3f-plonk-common" -version = "0.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aca389e494fe08c5c108b512e2328309036ee1c0bc7bdfdb743fef54d448c8c" -dependencies = [ - "ark-ec 0.5.0", - "ark-ff 0.5.0", - "ark-poly 0.5.0", - "ark-serialize 0.5.0", - "ark-std 0.5.0", - "getrandom_or_panic", - "rand_core 0.6.4", - "w3f-pcs", -] - -[[package]] -name = "w3f-ring-proof" -version = "0.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a639379402ad51504575dbd258740383291ac8147d3b15859bdf1ea48c677de" -dependencies = [ - "ark-ec 0.5.0", - "ark-ff 0.5.0", - "ark-poly 0.5.0", - "ark-serialize 0.5.0", - "ark-std 0.5.0", - "ark-transcript", - "w3f-pcs", - "w3f-plonk-common", -] - [[package]] name = "walkdir" version = "2.5.0" @@ -6687,15 +6401,12 @@ dependencies = [ name = "wit-bindgen" version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" -dependencies = [ - "bitflags 2.9.1", -] +checksum = "052283831dbae3d879dc7f51f3d92703a316ca49f91540417d38591826127814" [[package]] name = "wormhole-circuit" version = "0.1.0" -source = "git+https://github.com/Quantus-Network/zk-circuits#825b2abcfdc86d01d0cadce2545837549079f252" +source = "git+https://github.com/Quantus-Network/zk-circuits#a4a549389ba326e9aadc9bc6b9f8efa6129a5a54" dependencies = [ "anyhow", "hex", @@ -6851,13 +6562,13 @@ checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] name = "zk-circuits-common" version = "0.1.0" -source = "git+https://github.com/Quantus-Network/zk-circuits#825b2abcfdc86d01d0cadce2545837549079f252" +source = "git+https://github.com/Quantus-Network/zk-circuits#a4a549389ba326e9aadc9bc6b9f8efa6129a5a54" dependencies = [ "anyhow", "plonky2", diff --git a/Cargo.toml b/Cargo.toml index c0a6beb..62c92fd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,35 +17,35 @@ path = "src/main.rs" [dependencies] # CLI and async runtime -clap = { version = "4.5", features = ["derive"] } -tokio = { version = "1.46", features = ["full"] } +clap = { version = "=4.5", features = ["derive"] } +tokio = { version = "=1.46", features = ["full"] } # Serialization and configuration -serde = { version = "1.0", features = ["derive"] } -serde_json = "1.0" -toml = "0.9" +serde = { version = "=1.0", features = ["derive"] } +serde_json = "=1.0" +toml = "=0.9" # Error handling -thiserror = "2.0" +thiserror = "=2.0" # Terminal UI -colored = "3.0" +colored = "=3.0" # Additional utilities -sha2 = "0.10" -hex = "0.4" -chrono = { version = "0.4", features = ["serde"] } -dirs = "6.0" -rpassword = "7.4" +sha2 = "=0.10" +hex = "=0.4" +chrono = { version = "=0.4", features = ["serde"] } +dirs = "=6.0" +rpassword = "=7.4" # Quantum-Safe Encryption -argon2 = "0.5" # Password-based key derivation (quantum-safe) -rand = "0.9" -aes-gcm = "0.10" # AES-256-GCM (quantum-safe with 256-bit keys) +argon2 = "=0.5" # Password-based key derivation (quantum-safe) +rand = "=0.9" +aes-gcm = "=0.10" # AES-256-GCM (quantum-safe with 256-bit keys) -rusty-crystals-dilithium = { git = "https://github.com/Quantus-Network/rusty-crystals.git", branch = "injective-felt-embeddings", package = "rusty-crystals-dilithium" } -rusty-crystals-hdwallet = { git = "https://github.com/Quantus-Network/rusty-crystals.git", branch = "injective-felt-embeddings", package = "rusty-crystals-hdwallet" } -poseidon-resonance = { git = "https://github.com/Quantus-Network/poseidon-resonance", branch = "injective-felt-embeddings", features = [ +rusty-crystals-dilithium = { git = "https://github.com/Quantus-Network/rusty-crystals.git", package = "rusty-crystals-dilithium" } +rusty-crystals-hdwallet = { git = "https://github.com/Quantus-Network/rusty-crystals.git", package = "rusty-crystals-hdwallet" } +poseidon-resonance = { git = "https://github.com/Quantus-Network/poseidon-resonance", features = [ "serde", ] } dilithium-crypto = { git = "https://github.com/Quantus-Network/chain", package = "dilithium-crypto" } @@ -53,7 +53,7 @@ dilithium-crypto = { git = "https://github.com/Quantus-Network/chain", package = # Wormhole and zk-circuits wormhole-circuit = { git = "https://github.com/Quantus-Network/zk-circuits", package = "wormhole-circuit" } zk-circuits-common = { git = "https://github.com/Quantus-Network/zk-circuits", package = "zk-circuits-common" } -trie-db = { version = "0.29.1", default-features = false } +trie-db = { version = "=0.29.1", default-features = false } sp-trie = { git = "https://github.com/Quantus-Network/zk-trie" } # Blockchain and RPC client From 7c5f3d2a9c38536b7b50ef06b91663c5b5632c57 Mon Sep 17 00:00:00 2001 From: illuzen Date: Sat, 30 Aug 2025 15:08:14 +0800 Subject: [PATCH 4/6] address clippy string formatting issues --- src/chain/client.rs | 5 ++--- src/cli/wormhole.rs | 10 ++++------ 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/chain/client.rs b/src/chain/client.rs index 1f78012..f4ba38e 100644 --- a/src/chain/client.rs +++ b/src/chain/client.rs @@ -175,7 +175,7 @@ impl QuantusClient { // use jsonrpsee::core::client::ClientT; let params: jsonrpsee::core::params::ArrayParams = rpc_params![storage_keys, at_block]; let params_clone = params.clone().to_rpc_params()?; - println!("Sending RPC request with params: {:?}", params_clone); + println!("Sending RPC request with params: {params_clone:?}"); let proof: ReadProof = self.rpc_client.request("state_getReadProof", params).await.map_err(|e| { @@ -198,8 +198,7 @@ impl QuantusClient { .await .map_err(|e| { crate::error::QuantusError::NetworkError(format!( - "Failed to fetch block header: {:?}", - e + "Failed to fetch block header: {e:?}" )) })?; diff --git a/src/cli/wormhole.rs b/src/cli/wormhole.rs index accbfba..0f625fe 100644 --- a/src/cli/wormhole.rs +++ b/src/cli/wormhole.rs @@ -108,7 +108,7 @@ pub async fn handle_wormhole_command(command: WormholeCommands, node_url: &str) log_print!("Generating new wormhole address..."); let wormhole_pair = WormholePair::generate_new().map_err(|e| { - crate::error::QuantusError::Generic(format!("Wormhole generation error: {:?}", e)) + crate::error::QuantusError::Generic(format!("Wormhole generation error: {e:?}")) })?; // The on-chain address for funding MUST be the unspendable account derived @@ -189,7 +189,7 @@ pub async fn handle_wormhole_command(command: WormholeCommands, node_url: &str) log_print!("Generating new transfer proof..."); let secret_bytes: [u8; 32] = hex::decode(secret.trim_start_matches("0x")) .map_err(|e| { - crate::error::QuantusError::Generic(format!("Hex decode error: {:?}", e)) + crate::error::QuantusError::Generic(format!("Hex decode error: {e:?}")) })? .try_into() .map_err(|_| { @@ -335,14 +335,12 @@ pub async fn handle_wormhole_command(command: WormholeCommands, node_url: &str) }, other => return Err(crate::error::QuantusError::Generic(format!( - "Unexpected proof map result: {:?}", - other + "Unexpected proof map result: {other:?}" ))), }, Err(e) => return Err(crate::error::QuantusError::Generic(format!( - "Failed to check proof: {:?}", - e + "Failed to check proof: {e:?}" ))), } }, From 56dcd129b89baba90160cd322ce92e44a6538f08 Mon Sep 17 00:00:00 2001 From: Ethan Date: Wed, 24 Sep 2025 15:51:07 +0800 Subject: [PATCH 5/6] return block header type in get_block_header --- src/chain/client.rs | 4 ++-- src/cli/progress_spinner.rs | 7 ++++--- src/cli/wormhole.rs | 10 ++-------- 3 files changed, 8 insertions(+), 13 deletions(-) diff --git a/src/chain/client.rs b/src/chain/client.rs index f4ba38e..8c06e5b 100644 --- a/src/chain/client.rs +++ b/src/chain/client.rs @@ -189,10 +189,10 @@ impl QuantusClient { pub async fn get_block_header( &self, block_hash: H256, - ) -> crate::error::Result { + ) -> crate::error::Result> { log_verbose!("🔍 Fetching block header for block: {:?}", block_hash); - let header: serde_json::Value = self + let header: SubstrateHeader = self .rpc_client .request("chain_getHeader", rpc_params![block_hash]) .await diff --git a/src/cli/progress_spinner.rs b/src/cli/progress_spinner.rs index d1c05e3..2d5f841 100644 --- a/src/cli/progress_spinner.rs +++ b/src/cli/progress_spinner.rs @@ -1,7 +1,8 @@ use crate::{chain::client::ChainConfig, error::Result}; use colored::Colorize; +use rand::rand_core::block; use std::io::{self, Write}; -use subxt::OnlineClient; +use subxt::{blocks, OnlineClient}; use tokio::time::Instant; /// Simple progress spinner for showing waiting status @@ -43,7 +44,7 @@ pub async fn wait_for_tx_confirmation( let mut spinner = ProgressSpinner::new(); // For now, we use a simple delay approach similar to substrate-api-client - for _ in 0..10 { + for _ in 0..30 { spinner.tick(); tokio::time::sleep(std::time::Duration::from_secs(1)).await; } @@ -52,6 +53,6 @@ pub async fn wait_for_tx_confirmation( println!(); use crate::log_verbose; - log_verbose!("✅ Transaction likely finalized (after 6s delay)"); + log_verbose!("✅ Transaction likely finalized (after 30s delay)"); Ok(true) } diff --git a/src/cli/wormhole.rs b/src/cli/wormhole.rs index 0f625fe..69984cb 100644 --- a/src/cli/wormhole.rs +++ b/src/cli/wormhole.rs @@ -234,7 +234,7 @@ pub async fn handle_wormhole_command(command: WormholeCommands, node_url: &str) let transfer_count_previous = get_transfer_count(&quantus_client, &storage_key, &latest_block_hash).await?; - // Submit the transaction and wait for finalization + // Submit the transaction let hash = crate::cli::common::submit_transaction( &quantus_client, &keypair, @@ -295,13 +295,7 @@ pub async fn handle_wormhole_command(command: WormholeCommands, node_url: &str) log_verbose!("🍀 Leaf check: {check_string}"); tree_structure_check(&proof_as_u8)?; let header = quantus_client.get_block_header(tx_block_hash).await?; - let state_root = header["stateRoot"].as_str().unwrap(); - // remove the 0x prefix - let state_root = &state_root[2..]; - let state_root_bytes = hex::decode(state_root).unwrap(); - let state_root_array: [u8; 32] = - state_root_bytes.try_into().expect("State root must be 32 bytes"); - let state_root: subxt::utils::H256 = state_root_array.into(); + let state_root = header.state_root; // Build the vectors used in-circuit and capture indices let (storage_proof, indices) = From 3427577bd213d7cb5f3accf45d276504facd5d3e Mon Sep 17 00:00:00 2001 From: Ethan Date: Fri, 26 Sep 2025 15:31:20 +0800 Subject: [PATCH 6/6] *update to crates.io quantus dependencies --- Cargo.lock | 468 ++++++++++++++++++++++-------------- Cargo.toml | 18 +- src/chain/client.rs | 17 +- src/cli/block.rs | 2 +- src/cli/progress_spinner.rs | 10 +- src/cli/wormhole.rs | 20 +- src/lib.rs | 2 +- src/wallet/keystore.rs | 6 +- src/wallet/mod.rs | 13 +- 9 files changed, 338 insertions(+), 218 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3036c45..84ab556 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1323,22 +1323,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "dilithium-crypto" -version = "0.1.0" -source = "git+https://github.com/Quantus-Network/chain#baeb1928f1ea443f781f5825dd1b77d8b88e9985" -dependencies = [ - "log", - "parity-scale-codec", - "poseidon-resonance", - "rusty-crystals-dilithium", - "scale-info", - "sp-core 37.0.0", - "sp-io", - "sp-runtime", - "thiserror 1.0.69", -] - [[package]] name = "dirs" version = "6.0.0" @@ -1841,17 +1825,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "getrandom" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" -dependencies = [ - "cfg-if", - "libc", - "wasi 0.9.0+wasi-snapshot-preview1", -] - [[package]] name = "getrandom" version = "0.2.16" @@ -3031,6 +3004,122 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" +[[package]] +name = "p3-dft" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3b2764a3982d22d62aa933c8de6f9d71d8a474c9110b69e675dea1887bdeffc" +dependencies = [ + "itertools 0.14.0", + "p3-field", + "p3-matrix", + "p3-maybe-rayon", + "p3-util", + "tracing", +] + +[[package]] +name = "p3-field" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc13a73509fe09c67b339951ca8d4cc6e61c9bf08c130dbc90dda52452918cc2" +dependencies = [ + "itertools 0.14.0", + "num-bigint", + "p3-maybe-rayon", + "p3-util", + "paste", + "rand 0.9.2", + "serde", + "tracing", +] + +[[package]] +name = "p3-goldilocks" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "552849f6309ffde34af0d31aa9a2d0a549cb0ec138d9792bfbf4a17800742362" +dependencies = [ + "num-bigint", + "p3-dft", + "p3-field", + "p3-mds", + "p3-poseidon2", + "p3-symmetric", + "p3-util", + "paste", + "rand 0.9.2", + "serde", +] + +[[package]] +name = "p3-matrix" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8e1e9f69c2fe15768b3ceb2915edb88c47398aa22c485d8163deab2a47fe194" +dependencies = [ + "itertools 0.14.0", + "p3-field", + "p3-maybe-rayon", + "p3-util", + "rand 0.9.2", + "serde", + "tracing", + "transpose", +] + +[[package]] +name = "p3-maybe-rayon" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33f765046b763d046728b3246b690f81dfa7ccd7523b7a1582c74f616fbce6a0" + +[[package]] +name = "p3-mds" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c90541c6056712daf2ee69ec328db8b5605ae8dbafe60226c8eb75eaac0e1f9" +dependencies = [ + "p3-dft", + "p3-field", + "p3-symmetric", + "p3-util", + "rand 0.9.2", +] + +[[package]] +name = "p3-poseidon2" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88e9f053f120a78ad27e9c1991a0ea547777328ca24025c42364d6ee2667d59a" +dependencies = [ + "p3-field", + "p3-mds", + "p3-symmetric", + "p3-util", + "rand 0.9.2", +] + +[[package]] +name = "p3-symmetric" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72d5db8f05a26d706dfd8aaf7aa4272ca4f3e7a075db897ec7108f24fad78759" +dependencies = [ + "itertools 0.14.0", + "p3-field", + "serde", +] + +[[package]] +name = "p3-util" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dfee67245d9ce78a15176728da2280032f0a84b5819a39a953e7ec03cfd9bd7" +dependencies = [ + "serde", +] + [[package]] name = "parity-bip39" version = "2.0.1" @@ -3197,51 +3286,17 @@ dependencies = [ "spki", ] -[[package]] -name = "plonky2" -version = "1.0.2" -source = "git+https://github.com/Quantus-Network/plonky2#9c06fe53083dd1672951b6d5bc3aa03bde4d1a66" -dependencies = [ - "ahash", - "anyhow", - "hashbrown 0.14.5", - "itertools 0.11.0", - "keccak-hash 0.8.0", - "log", - "num", - "plonky2_field", - "plonky2_maybe_rayon", - "plonky2_util", - "rand 0.8.5", - "serde", - "static_assertions", - "unroll", -] - -[[package]] -name = "plonky2_field" -version = "1.0.0" -source = "git+https://github.com/Quantus-Network/plonky2#9c06fe53083dd1672951b6d5bc3aa03bde4d1a66" -dependencies = [ - "anyhow", - "itertools 0.11.0", - "num", - "plonky2_util", - "rustc_version", - "serde", - "static_assertions", - "unroll", -] - [[package]] name = "plonky2_maybe_rayon" version = "1.0.0" -source = "git+https://github.com/Quantus-Network/plonky2#9c06fe53083dd1672951b6d5bc3aa03bde4d1a66" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1e554181dc95243b8d9948ae7bae5759c7fb2502fed28f671f95ef38079406" [[package]] name = "plonky2_util" version = "1.0.0" -source = "git+https://github.com/Quantus-Network/plonky2#9c06fe53083dd1672951b6d5bc3aa03bde4d1a66" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c32c137808ca984ab2458b612b7eb0462d853ee041a3136e83d54b96074c7610" [[package]] name = "polkavm-common" @@ -3354,22 +3409,6 @@ dependencies = [ "universal-hash", ] -[[package]] -name = "poseidon-resonance" -version = "0.9.0" -source = "git+https://github.com/Quantus-Network/poseidon-resonance#4d44267446406243e336bc7966d20452686f8347" -dependencies = [ - "log", - "parity-scale-codec", - "plonky2", - "scale-info", - "serde", - "sp-core 37.0.0", - "sp-runtime", - "sp-storage", - "sp-trie 40.0.0", -] - [[package]] name = "potential_utf" version = "0.1.3" @@ -3482,6 +3521,145 @@ dependencies = [ "thiserror 1.0.69", ] +[[package]] +name = "qp-dilithium-crypto" +version = "0.1.3" +source = "git+https://github.com/Quantus-Network/chain#9622d50aa583def6f3ae77415ad08c94d0b8ccf8" +dependencies = [ + "log", + "parity-scale-codec", + "qp-poseidon", + "qp-rusty-crystals-dilithium", + "qp-rusty-crystals-hdwallet", + "scale-info", + "sp-core 37.0.0", + "sp-io", + "sp-runtime", + "thiserror 1.0.69", +] + +[[package]] +name = "qp-plonky2" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "068162bd3730e381744eca219f98f0db22874afc8fa24631611e975c93d6cf68" +dependencies = [ + "ahash", + "anyhow", + "hashbrown 0.14.5", + "itertools 0.11.0", + "keccak-hash 0.8.0", + "log", + "num", + "plonky2_maybe_rayon", + "plonky2_util", + "qp-plonky2-field", + "rand 0.8.5", + "serde", + "static_assertions", + "unroll", +] + +[[package]] +name = "qp-plonky2-field" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2b2f7e0854f9e14aa9b3f6d544ccf71087e751d6adbe6a7e50d2c75fb561d97" +dependencies = [ + "anyhow", + "itertools 0.11.0", + "num", + "plonky2_util", + "rustc_version", + "serde", + "static_assertions", + "unroll", +] + +[[package]] +name = "qp-poseidon" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33181134496120c212a0a2098215cf45a68d50fe656de6fb30b31e73babe9383" +dependencies = [ + "log", + "p3-field", + "p3-goldilocks", + "parity-scale-codec", + "qp-poseidon-core", + "scale-info", + "serde", + "sp-core 37.0.0", + "sp-runtime", + "sp-storage", + "sp-trie 40.0.0", +] + +[[package]] +name = "qp-poseidon-core" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec326fc2631a929de09a38af2613a3db5230882c12a2f68205693ec632751e8b" +dependencies = [ + "p3-field", + "p3-goldilocks", + "p3-poseidon2", + "p3-symmetric", + "rand 0.9.2", + "rand_chacha 0.9.0", +] + +[[package]] +name = "qp-rusty-crystals-dilithium" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9e13b64304720dcfa52557209fddc1ac67b08fcaff31c132099fd37b551dfb1" +dependencies = [ + "sha2 0.10.9", +] + +[[package]] +name = "qp-rusty-crystals-hdwallet" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e86ee06c92d0629f6e6c45972f046069a68742577a796b17f5a507457be493d" +dependencies = [ + "bip39", + "hex", + "hex-literal", + "nam-tiny-hderive", + "qp-poseidon-core", + "qp-rusty-crystals-dilithium", + "rand_chacha 0.9.0", + "rand_core 0.9.3", + "serde", + "serde_json", + "thiserror 2.0.16", +] + +[[package]] +name = "qp-wormhole-circuit" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fea70a3a1bf545450cb6320782389cfbfe58fcf0ecf724aa666383807bf5548b" +dependencies = [ + "anyhow", + "hex", + "qp-plonky2", + "qp-zk-circuits-common", +] + +[[package]] +name = "qp-zk-circuits-common" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a2a62915be0513d045f4d92829c0a26d6f3e8897353e8f8356a7eabef025329" +dependencies = [ + "anyhow", + "qp-plonky2", + "serde", +] + [[package]] name = "quantus-cli" version = "0.1.0" @@ -3491,16 +3669,19 @@ dependencies = [ "chrono", "clap", "colored", - "dilithium-crypto", "dirs", "hex", "jsonrpsee", "parity-scale-codec", - "poseidon-resonance", + "qp-dilithium-crypto", + "qp-poseidon", + "qp-poseidon-core", + "qp-rusty-crystals-dilithium", + "qp-rusty-crystals-hdwallet", + "qp-wormhole-circuit", + "qp-zk-circuits-common", "rand 0.9.2", "rpassword", - "rusty-crystals-dilithium", - "rusty-crystals-hdwallet", "serde", "serde_json", "sha2 0.10.9", @@ -3516,8 +3697,6 @@ dependencies = [ "tokio", "toml 0.9.5", "trie-db 0.29.1", - "wormhole-circuit", - "zk-circuits-common", ] [[package]] @@ -3541,19 +3720,6 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" -[[package]] -name = "rand" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -dependencies = [ - "getrandom 0.1.16", - "libc", - "rand_chacha 0.2.2", - "rand_core 0.5.1", - "rand_hc", -] - [[package]] name = "rand" version = "0.8.5" @@ -3575,16 +3741,6 @@ dependencies = [ "rand_core 0.9.3", ] -[[package]] -name = "rand_chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" -dependencies = [ - "ppv-lite86", - "rand_core 0.5.1", -] - [[package]] name = "rand_chacha" version = "0.3.1" @@ -3605,15 +3761,6 @@ dependencies = [ "rand_core 0.9.3", ] -[[package]] -name = "rand_core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -dependencies = [ - "getrandom 0.1.16", -] - [[package]] name = "rand_core" version = "0.6.4" @@ -3632,15 +3779,6 @@ dependencies = [ "getrandom 0.3.3", ] -[[package]] -name = "rand_hc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -dependencies = [ - "rand_core 0.5.1", -] - [[package]] name = "redox_syscall" version = "0.5.17" @@ -3875,37 +4013,6 @@ version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" -[[package]] -name = "rusty-crystals-dilithium" -version = "1.0.0" -source = "git+https://github.com/Quantus-Network/rusty-crystals.git#a067d74cd1e196e44dffe845310fa6e6c55f5aaa" -dependencies = [ - "rand 0.7.3", - "sha2 0.10.9", -] - -[[package]] -name = "rusty-crystals-hdwallet" -version = "0.1.1" -source = "git+https://github.com/Quantus-Network/rusty-crystals.git#a067d74cd1e196e44dffe845310fa6e6c55f5aaa" -dependencies = [ - "bip39", - "hex", - "hex-literal", - "hmac 0.12.1", - "nam-tiny-hderive", - "poseidon-resonance", - "rand 0.8.5", - "rand_chacha 0.9.0", - "rand_core 0.6.4", - "rusty-crystals-dilithium", - "serde", - "serde_json", - "sha2 0.10.9", - "sp-core 37.0.0", - "thiserror 2.0.16", -] - [[package]] name = "ruzstd" version = "0.8.1" @@ -5008,6 +5115,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" +[[package]] +name = "strength_reduce" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe895eb47f22e2ddd4dabc02bce419d2e643c8e3b585c78158b349195bc24d82" + [[package]] name = "strsim" version = "0.11.1" @@ -5627,6 +5740,16 @@ dependencies = [ "tracing-log", ] +[[package]] +name = "transpose" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ad61aed86bc3faea4300c7aee358b4c6d0c8d6ccc36524c96e4c92ccf26e77e" +dependencies = [ + "num-integer", + "strength_reduce", +] + [[package]] name = "trie-db" version = "0.29.1" @@ -5896,12 +6019,6 @@ dependencies = [ "try-lock", ] -[[package]] -name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" - [[package]] name = "wasi" version = "0.11.1+wasi-snapshot-preview1" @@ -6403,17 +6520,6 @@ version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "052283831dbae3d879dc7f51f3d92703a316ca49f91540417d38591826127814" -[[package]] -name = "wormhole-circuit" -version = "0.1.0" -source = "git+https://github.com/Quantus-Network/zk-circuits#a4a549389ba326e9aadc9bc6b9f8efa6129a5a54" -dependencies = [ - "anyhow", - "hex", - "plonky2", - "zk-circuits-common", -] - [[package]] name = "writeable" version = "0.6.1" @@ -6564,13 +6670,3 @@ dependencies = [ "quote", "syn 2.0.106", ] - -[[package]] -name = "zk-circuits-common" -version = "0.1.0" -source = "git+https://github.com/Quantus-Network/zk-circuits#a4a549389ba326e9aadc9bc6b9f8efa6129a5a54" -dependencies = [ - "anyhow", - "plonky2", - "serde", -] diff --git a/Cargo.toml b/Cargo.toml index 62c92fd..f1370b1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -43,16 +43,20 @@ argon2 = "=0.5" # Password-based key derivation (quantum-safe) rand = "=0.9" aes-gcm = "=0.10" # AES-256-GCM (quantum-safe with 256-bit keys) -rusty-crystals-dilithium = { git = "https://github.com/Quantus-Network/rusty-crystals.git", package = "rusty-crystals-dilithium" } -rusty-crystals-hdwallet = { git = "https://github.com/Quantus-Network/rusty-crystals.git", package = "rusty-crystals-hdwallet" } -poseidon-resonance = { git = "https://github.com/Quantus-Network/poseidon-resonance", features = [ + +qp-dilithium-crypto = { git = "https://github.com/Quantus-Network/chain", package = "qp-dilithium-crypto" } +qp-poseidon = { version = "0.9.5", default-features = false, features = [ "serde", ] } -dilithium-crypto = { git = "https://github.com/Quantus-Network/chain", package = "dilithium-crypto" } +qp-poseidon-core = { version = "0.9.5", default-features = false } +qp-rusty-crystals-dilithium = { version = "1.0.3", default-features = false } +qp-rusty-crystals-hdwallet = { version = "0.1.4" } # Wormhole and zk-circuits -wormhole-circuit = { git = "https://github.com/Quantus-Network/zk-circuits", package = "wormhole-circuit" } -zk-circuits-common = { git = "https://github.com/Quantus-Network/zk-circuits", package = "zk-circuits-common" } +qp-wormhole-circuit = { version = "0.1.2", default-features = false } +qp-zk-circuits-common = { version = "0.1.2", default-features = false, features = [ + "no_random", +] } trie-db = { version = "=0.29.1", default-features = false } sp-trie = { git = "https://github.com/Quantus-Network/zk-trie" } @@ -61,7 +65,7 @@ codec = { package = "parity-scale-codec", version = "3.7", features = [ "derive", ] } sp-core = { version = "37.0.0" } -sp-runtime = { version = "42.0.0" } +sp-runtime = { version = "42.0.0", default-features = false } sp-storage = { version = "22.0.0", default-features = false } sp-state-machine = { git = "https://github.com/Quantus-Network/zk-state-machine" } subxt = "0.43.0" diff --git a/src/chain/client.rs b/src/chain/client.rs index 8c06e5b..e9c13d4 100644 --- a/src/chain/client.rs +++ b/src/chain/client.rs @@ -4,13 +4,13 @@ //! across all CLI modules. use crate::{error::QuantusError, log_verbose}; -use dilithium_crypto::types::DilithiumSignatureScheme; use jsonrpsee::{ core::{client::ClientT, traits::ToRpcParams}, rpc_params, ws_client::{WsClient, WsClientBuilder}, }; -use poseidon_resonance::PoseidonHasher; +use qp_dilithium_crypto::types::DilithiumSignatureScheme; +use qp_poseidon::PoseidonHasher; use serde::{Deserialize, Serialize}; use sp_core::{crypto::AccountId32, ByteArray, Bytes, H256}; use sp_runtime::{traits::IdentifyAccount, MultiAddress}; @@ -316,12 +316,12 @@ impl QuantusClient { } // Implement subxt::tx::Signer for ResonancePair -impl subxt::tx::Signer for dilithium_crypto::types::DilithiumPair { +impl subxt::tx::Signer for qp_dilithium_crypto::types::DilithiumPair { fn account_id(&self) -> ::AccountId { let resonance_public = - dilithium_crypto::types::DilithiumPublic::from_slice(self.public.as_slice()) + qp_dilithium_crypto::types::DilithiumPublic::from_slice(self.public.as_slice()) .expect("Invalid public key"); - ::into_account( + ::into_account( resonance_public, ) } @@ -331,7 +331,10 @@ impl subxt::tx::Signer for dilithium_crypto::types::DilithiumPair { // sp_core::Pair::sign returns ResonanceSignatureWithPublic, which we need to wrap in // ResonanceSignatureScheme let signature_with_public = - ::sign(self, signer_payload); - dilithium_crypto::types::DilithiumSignatureScheme::Dilithium(signature_with_public) + ::sign( + self, + signer_payload, + ); + qp_dilithium_crypto::types::DilithiumSignatureScheme::Dilithium(signature_with_public) } } diff --git a/src/cli/block.rs b/src/cli/block.rs index 0da228a..955c260 100644 --- a/src/cli/block.rs +++ b/src/cli/block.rs @@ -5,7 +5,7 @@ use crate::{ }; use clap::Subcommand; use colored::Colorize; -use poseidon_resonance::PoseidonHasher; +use qp_poseidon::PoseidonHasher; use sp_core::crypto::Ss58Codec; use std::str::FromStr; use subxt::events::EventDetails; diff --git a/src/cli/progress_spinner.rs b/src/cli/progress_spinner.rs index 2d5f841..25baf58 100644 --- a/src/cli/progress_spinner.rs +++ b/src/cli/progress_spinner.rs @@ -1,8 +1,7 @@ use crate::{chain::client::ChainConfig, error::Result}; use colored::Colorize; -use rand::rand_core::block; use std::io::{self, Write}; -use subxt::{blocks, OnlineClient}; +use subxt::OnlineClient; use tokio::time::Instant; /// Simple progress spinner for showing waiting status @@ -42,6 +41,13 @@ pub async fn wait_for_tx_confirmation( ) -> Result { // Use ProgressSpinner to show waiting progress let mut spinner = ProgressSpinner::new(); + // let mut blocks_sub = client.blocks().subscribe_finalized().await?; + + // while let Some(bloock) = blocks_sub.next().await { + // log_verbose!("New finalized block received"); + // spinner.tick(); + // break; + // } // For now, we use a simple delay approach similar to substrate-api-client for _ in 0..30 { diff --git a/src/cli/wormhole.rs b/src/cli/wormhole.rs index 69984cb..627cb3a 100644 --- a/src/cli/wormhole.rs +++ b/src/cli/wormhole.rs @@ -14,10 +14,11 @@ use crate::{ use clap::Subcommand; use codec::{Decode, Encode}; use colored::Colorize; -use dilithium_crypto::traits::WormholeAddress; use hex; -use poseidon_resonance::PoseidonHasher; -use rusty_crystals_hdwallet::wormhole::WormholePair; +use qp_dilithium_crypto::traits::WormholeAddress; +use qp_poseidon::PoseidonHasher; +use qp_rusty_crystals_hdwallet::wormhole::WormholePair; +use rand::Rng; use serde::Serialize; use sp_core::{ crypto::{AccountId32, Ss58Codec}, @@ -107,13 +108,16 @@ pub async fn handle_wormhole_command(command: WormholeCommands, node_url: &str) WormholeCommands::GenerateAddress => { log_print!("Generating new wormhole address..."); - let wormhole_pair = WormholePair::generate_new().map_err(|e| { + let mut seed = [0u8; 32]; + rand::rng().fill(&mut seed); // TODO replace this with a source of randomness with a higher source of entropy + + let wormhole_pair = WormholePair::generate_new(seed).map_err(|e| { crate::error::QuantusError::Generic(format!("Wormhole generation error: {e:?}")) })?; // The on-chain address for funding MUST be the unspendable account derived // from the secret key. The ZK proof verifies transfers to this address. - let wormhole_address = WormholeAddress(wormhole_pair.address); + let wormhole_address = WormholeAddress(sp_core::H256(wormhole_pair.address)); let unspendable_account: AccountId32 = wormhole_address.into_account(); log_print!("{}", "XXXXXXXXXXXXXXX Quantus Wormhole Details XXXXXXXXXXXXXXXXX".yellow()); @@ -196,7 +200,7 @@ pub async fn handle_wormhole_command(command: WormholeCommands, node_url: &str) crate::error::QuantusError::Generic("Secret must be 32 bytes".to_string()) })?; let wormhole_pair = WormholePair::generate_pair_from_secret(&secret_bytes); - let wormhole_address = WormholeAddress(wormhole_pair.address); + let wormhole_address = WormholeAddress(sp_core::H256(wormhole_pair.address)); let unspendable_account = wormhole_address.into_account(); log_print!( "Derived unspendable account address (bytes): {:?}", @@ -295,6 +299,10 @@ pub async fn handle_wormhole_command(command: WormholeCommands, node_url: &str) log_verbose!("🍀 Leaf check: {check_string}"); tree_structure_check(&proof_as_u8)?; let header = quantus_client.get_block_header(tx_block_hash).await?; + // encode the header + let encoded_header = header.encode(); + // log the encoded header as hex + log_verbose!("Encoded header: 0x{}", hex::encode(&encoded_header)); let state_root = header.state_root; // Build the vectors used in-circuit and capture indices diff --git a/src/lib.rs b/src/lib.rs index 0b000a6..95389b8 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -18,7 +18,7 @@ pub use error::{QuantusError as Error, Result}; pub use chain::client::{ChainConfig, QuantusClient}; // Re-export dilithium crypto -pub use dilithium_crypto; +pub use qp_dilithium_crypto; // Re-export commonly used types from sp_core and sp_runtime pub use sp_core::crypto::AccountId32; diff --git a/src/wallet/keystore.rs b/src/wallet/keystore.rs index c585078..591a6c1 100644 --- a/src/wallet/keystore.rs +++ b/src/wallet/keystore.rs @@ -5,7 +5,7 @@ /// - Loading and decrypting wallet data with post-quantum cryptography /// - Managing wallet files on disk with quantum-resistant security use crate::error::{Result, WalletError}; -use rusty_crystals_dilithium::ml_dsa_87::{Keypair, PublicKey, SecretKey}; +use qp_rusty_crystals_dilithium::ml_dsa_87::{Keypair, PublicKey, SecretKey}; use serde::{Deserialize, Serialize}; use sp_core::{ crypto::{AccountId32, Ss58Codec}, @@ -22,7 +22,7 @@ use rand::{rng, RngCore}; use std::path::Path; -use dilithium_crypto::types::{DilithiumPair, DilithiumPublic}; +use qp_dilithium_crypto::types::{DilithiumPair, DilithiumPublic}; use sp_runtime::traits::IdentifyAccount; /// Quantum-safe key pair using Dilithium post-quantum signatures @@ -84,7 +84,7 @@ impl QuantumKeyPair { } /// Convert to subxt Signer for use - pub fn to_subxt_signer(&self) -> Result { + pub fn to_subxt_signer(&self) -> Result { // Convert to DilithiumPair first - now it implements subxt::tx::Signer let resonance_pair = self.to_resonance_pair()?; diff --git a/src/wallet/mod.rs b/src/wallet/mod.rs index 011ae84..6d61541 100644 --- a/src/wallet/mod.rs +++ b/src/wallet/mod.rs @@ -10,7 +10,8 @@ pub mod password; use crate::error::{Result, WalletError}; pub use keystore::{Keystore, QuantumKeyPair, WalletData}; -use rusty_crystals_hdwallet::{generate_mnemonic, HDLattice}; +use qp_rusty_crystals_hdwallet::{generate_mnemonic, HDLattice}; +use rand::Rng; use serde::{Deserialize, Serialize}; use sp_core::crypto::Ss58Codec; use sp_runtime::traits::IdentifyAccount; @@ -49,9 +50,11 @@ impl WalletManager { if keystore.load_wallet(name)?.is_some() { return Err(WalletError::AlreadyExists.into()); } + let mut seed = [0u8; 32]; + rand::rng().fill(&mut seed); // TODO replace this with a source of randomness with a higher source of entropy // Generate a new Dilithium keypair' - let mnemonic = generate_mnemonic(24).map_err(|_| WalletError::KeyGeneration)?; + let mnemonic = generate_mnemonic(24, seed).map_err(|_| WalletError::KeyGeneration)?; let lattice = HDLattice::from_mnemonic(&mnemonic, None).expect("Failed to generate lattice"); let dilithium_keypair = lattice.generate_keys(); @@ -92,9 +95,9 @@ impl WalletManager { // Generate the appropriate test keypair let resonance_pair = match name { - "crystal_alice" => dilithium_crypto::crystal_alice(), - "crystal_bob" => dilithium_crypto::dilithium_bob(), - "crystal_charlie" => dilithium_crypto::crystal_charlie(), + "crystal_alice" => qp_dilithium_crypto::crystal_alice(), + "crystal_bob" => qp_dilithium_crypto::dilithium_bob(), + "crystal_charlie" => qp_dilithium_crypto::crystal_charlie(), _ => return Err(WalletError::KeyGeneration.into()), };