diff --git a/Cargo.lock b/Cargo.lock index 0f91c2071..7a350d3e1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -154,6 +154,17 @@ dependencies = [ "version_check", ] +[[package]] +name = "ahash" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", +] + [[package]] name = "aho-corasick" version = "0.7.20" @@ -202,6 +213,124 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6" +[[package]] +name = "ark-bls12-381" +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", +] + +[[package]] +name = "ark-ec" +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", + "derivative", + "hashbrown 0.13.2", + "itertools 0.10.5", + "num-traits", + "zeroize", +] + +[[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", + "derivative", + "digest 0.10.6", + "itertools 0.10.5", + "num-bigint", + "num-traits", + "paste", + "rustc_version", + "zeroize", +] + +[[package]] +name = "ark-ff-asm" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" +dependencies = [ + "num-bigint", + "num-traits", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[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", + "derivative", + "hashbrown 0.13.2", +] + +[[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", + "digest 0.10.6", + "num-bigint", +] + +[[package]] +name = "ark-serialize-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-std" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" +dependencies = [ + "num-traits", + "rand 0.8.5", +] + [[package]] name = "array-bytes" version = "4.2.0" @@ -392,14 +521,39 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" name = "avail-base" version = "0.1.0" dependencies = [ - "da-primitives", + "avail-core", "kate", "log", "once_cell", - "sp-std 5.0.0", + "sp-std", "substrate-prometheus-endpoint 0.10.0", ] +[[package]] +name = "avail-core" +version = "0.5.0" +source = "git+https://github.com/availproject/avail-core?tag=avail-core/v0.5.0#3e972524dce089d73140a2e32c83084e5c9c418c" +dependencies = [ + "beefy-merkle-tree", + "derive_more", + "frame-support", + "hash256-std-hasher", + "hex", + "log", + "parity-scale-codec", + "scale-info", + "serde", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", + "sp-runtime-interface", + "sp-std", + "sp-trie", + "static_assertions", + "thiserror-no-std", +] + [[package]] name = "backtrace" version = "0.3.67" @@ -543,28 +697,16 @@ dependencies = [ "radium 0.3.0", ] -[[package]] -name = "bitvec" -version = "0.20.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7774144344a4faa177370406a7ff5f1da24303817368584c6206c8303eb07848" -dependencies = [ - "funty 1.1.0", - "radium 0.6.2", - "tap", - "wyz 0.2.0", -] - [[package]] name = "bitvec" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" dependencies = [ - "funty 2.0.0", + "funty", "radium 0.7.0", "tap", - "wyz 0.5.1", + "wyz", ] [[package]] @@ -666,6 +808,17 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" +[[package]] +name = "blst" +version = "0.3.10" +source = "git+https://github.com/availproject/blst?tag=v0.3.10#556e037926d9c526c2eb6cb1522bea39690416ea" +dependencies = [ + "cc", + "glob", + "threadpool", + "zeroize", +] + [[package]] name = "bs58" version = "0.4.0" @@ -709,6 +862,12 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" +[[package]] +name = "bytemuck" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17febce684fd15d89027105661fec94afb475cb995fbc59d2865198446ba2eea" + [[package]] name = "byteorder" version = "1.4.3" @@ -1538,7 +1697,7 @@ dependencies = [ name = "da-control" version = "1.0.1" dependencies = [ - "da-primitives", + "avail-core", "frame-benchmarking", "frame-support", "frame-system", @@ -1547,47 +1706,24 @@ dependencies = [ "pallet-balances", "pallet-transaction-payment", "pallet-utility", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "scale-info", "serde", - "sp-arithmetic 5.0.0", + "sp-arithmetic", "sp-core", "sp-io", "sp-runtime", - "sp-std 5.0.0", + "sp-std", + "static_assertions", "test-case", ] -[[package]] -name = "da-primitives" -version = "0.4.6" -source = "git+https://github.com/availproject/avail-core?tag=da-primitives/v0.4.7#a9d0f1796d0c02a32df5091e576702d8f976cfa2" -dependencies = [ - "beefy-merkle-tree", - "derive_more", - "frame-support", - "hash256-std-hasher", - "log", - "parity-scale-codec 3.4.0", - "parity-util-mem", - "scale-info", - "serde", - "serde_json", - "sp-core", - "sp-io", - "sp-runtime", - "sp-runtime-interface", - "sp-std 4.0.0", - "sp-trie", - "thiserror-no-std", -] - [[package]] name = "da-runtime" version = "6.0.0" dependencies = [ + "avail-core", "da-control", - "da-primitives", "env_logger 0.9.3", "frame-benchmarking", "frame-election-provider-support", @@ -1635,7 +1771,7 @@ dependencies = [ "pallet-transaction-payment-rpc-runtime-api", "pallet-treasury", "pallet-utility", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "parity-util-mem", "scale-info", "serde", @@ -1653,7 +1789,7 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std 5.0.0", + "sp-std", "sp-transaction-pool", "sp-version", "static_assertions", @@ -1702,10 +1838,10 @@ version = "1.6.2" dependencies = [ "async-trait", "avail-base", + "avail-core", "clap 4.1.6", "clap_complete", "da-control", - "da-primitives", "da-runtime", "derive_more", "frame-benchmarking", @@ -1727,7 +1863,7 @@ dependencies = [ "pallet-im-online", "pallet-transaction-payment", "pallet-transaction-payment-rpc", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "primitive-types", "rand 0.8.5", "sc-authority-discovery", @@ -1775,7 +1911,7 @@ dependencies = [ "sp-rpc", "sp-runtime", "sp-timestamp", - "sp-tracing 4.0.0", + "sp-tracing", "sp-transaction-pool", "sp-transaction-storage-proof", "substrate-build-script-utils", @@ -1851,6 +1987,17 @@ dependencies = [ "rusticata-macros", ] +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "derive-hex" version = "0.1.2" @@ -2441,7 +2588,7 @@ dependencies = [ "futures-timer", "log", "num-traits", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "parking_lot 0.12.1", "scale-info", ] @@ -2495,7 +2642,7 @@ name = "fork-tree" version = "3.0.0" source = "git+https://github.com/paritytech/substrate.git/?branch=polkadot-v0.9.37#f38bd6671d460293c93062cc1e4fe9e9e490cb29" dependencies = [ - "parity-scale-codec 3.4.0", + "parity-scale-codec", ] [[package]] @@ -2522,7 +2669,7 @@ dependencies = [ "frame-system", "linregress", "log", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "paste", "scale-info", "serde", @@ -2532,7 +2679,7 @@ dependencies = [ "sp-io", "sp-runtime", "sp-runtime-interface", - "sp-std 5.0.0", + "sp-std", "sp-storage", ] @@ -2555,7 +2702,7 @@ dependencies = [ "lazy_static", "linked-hash-map", "log", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "rand 0.8.5", "rand_pcg", "sc-block-builder", @@ -2576,7 +2723,7 @@ dependencies = [ "sp-keystore", "sp-runtime", "sp-state-machine", - "sp-std 5.0.0", + "sp-std", "sp-storage", "sp-trie", "thiserror", @@ -2602,13 +2749,13 @@ dependencies = [ "frame-election-provider-solution-type", "frame-support", "frame-system", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "scale-info", - "sp-arithmetic 6.0.0", + "sp-arithmetic", "sp-core", "sp-npos-elections", "sp-runtime", - "sp-std 5.0.0", + "sp-std", ] [[package]] @@ -2619,13 +2766,13 @@ dependencies = [ "frame-support", "frame-system", "frame-try-runtime", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", "sp-runtime", - "sp-std 5.0.0", - "sp-tracing 6.0.0", + "sp-std", + "sp-tracing", ] [[package]] @@ -2635,7 +2782,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df6bb8542ef006ef0de09a5c4420787d79823c0ed7924225822362fd2bf2ff2d" dependencies = [ "cfg-if", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "scale-info", "serde", ] @@ -2647,7 +2794,7 @@ source = "git+https://github.com/paritytech/substrate.git/?branch=polkadot-v0.9. dependencies = [ "futures", "log", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "serde", "sp-core", "sp-io", @@ -2668,13 +2815,13 @@ dependencies = [ "k256", "log", "once_cell", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "paste", "scale-info", "serde", "smallvec", "sp-api", - "sp-arithmetic 6.0.0", + "sp-arithmetic", "sp-core", "sp-core-hashing-proc-macro", "sp-inherents", @@ -2682,8 +2829,8 @@ dependencies = [ "sp-runtime", "sp-staking", "sp-state-machine", - "sp-std 5.0.0", - "sp-tracing 6.0.0", + "sp-std", + "sp-tracing", "sp-weights", "tt-call", ] @@ -2729,16 +2876,16 @@ name = "frame-system" version = "4.0.0-dev" dependencies = [ "avail-base", + "avail-core", "beefy-merkle-tree", "criterion", - "da-primitives", "derive_more", "frame-support", "hex-literal", "impl-trait-for-tuples", "kate", "log", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "rs_merkle", "scale-info", "serde", @@ -2747,7 +2894,7 @@ dependencies = [ "sp-io", "sp-runtime", "sp-runtime-interface", - "sp-std 5.0.0", + "sp-std", "sp-version", "sp-weights", "static_assertions", @@ -2758,17 +2905,17 @@ dependencies = [ name = "frame-system-benchmarking" version = "4.0.0-dev" dependencies = [ - "da-primitives", + "avail-core", "frame-benchmarking", "frame-support", "frame-system", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "scale-info", "sp-core", "sp-externalities", "sp-io", "sp-runtime", - "sp-std 5.0.0", + "sp-std", "sp-version", ] @@ -2776,7 +2923,7 @@ dependencies = [ name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" dependencies = [ - "parity-scale-codec 3.4.0", + "parity-scale-codec", "sp-api", ] @@ -2786,10 +2933,10 @@ version = "0.10.0-dev" source = "git+https://github.com/paritytech/substrate.git/?branch=polkadot-v0.9.37#f38bd6671d460293c93062cc1e4fe9e9e490cb29" dependencies = [ "frame-support", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "sp-api", "sp-runtime", - "sp-std 5.0.0", + "sp-std", ] [[package]] @@ -2802,12 +2949,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "funty" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed34cd105917e91daa4da6b3728c47b068749d6a62c59811f06ed2ac71d9da7" - [[package]] name = "funty" version = "2.0.0" @@ -3186,6 +3327,15 @@ dependencies = [ "ahash 0.7.6", ] +[[package]] +name = "hashbrown" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +dependencies = [ + "ahash 0.8.3", +] + [[package]] name = "heck" version = "0.4.1" @@ -3221,6 +3371,9 @@ name = "hex" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +dependencies = [ + "serde", +] [[package]] name = "hex-literal" @@ -3470,7 +3623,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" dependencies = [ - "parity-scale-codec 3.4.0", + "parity-scale-codec", ] [[package]] @@ -3830,46 +3983,50 @@ dependencies = [ [[package]] name = "kate" -version = "0.7.1" -source = "git+https://github.com/availproject/avail-core?tag=da-primitives/v0.4.7#a9d0f1796d0c02a32df5091e576702d8f976cfa2" +version = "0.8.0" +source = "git+https://github.com/availproject/avail-core?tag=avail-core/v0.5.0#3e972524dce089d73140a2e32c83084e5c9c418c" dependencies = [ - "da-primitives", + "avail-core", "derive_more", "dusk-bytes", "dusk-plonk", - "frame-support", - "getrandom 0.2.8", "hex", + "hex-literal", "kate-recovery", "log", - "num_cpus", + "nalgebra 0.32.3", "once_cell", - "parity-scale-codec 3.4.0", + "parity-scale-codec", + "poly-multiproof", "rand 0.8.5", "rand_chacha 0.3.1", - "rand_core 0.6.4", "rayon", "serde", + "serde_json", + "sp-arithmetic", "sp-core", - "sp-std 4.0.0", "static_assertions", + "thiserror-no-std", ] [[package]] name = "kate-recovery" -version = "0.8.1" -source = "git+https://github.com/availproject/avail-core?tag=da-primitives/v0.4.7#a9d0f1796d0c02a32df5091e576702d8f976cfa2" +version = "0.9.0" +source = "git+https://github.com/availproject/avail-core?tag=avail-core/v0.5.0#3e972524dce089d73140a2e32c83084e5c9c418c" dependencies = [ + "avail-core", + "derive_more", "dusk-bytes", "dusk-plonk", - "getrandom 0.2.8", - "num", "once_cell", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "rand 0.8.5", "rand_chacha 0.3.1", "serde", - "thiserror", + "sp-arithmetic", + "sp-std", + "static_assertions", + "thiserror-no-std", ] [[package]] @@ -3877,7 +4034,7 @@ name = "kate-rpc" version = "0.2.0" dependencies = [ "avail-base", - "da-primitives", + "avail-core", "da-runtime", "frame-support", "frame-system", @@ -3885,12 +4042,14 @@ dependencies = [ "kate", "kate-recovery", "lru 0.7.8", - "parity-scale-codec 3.4.0", + "nalgebra 0.32.3", + "parity-scale-codec", "sc-client-api", "sc-client-db", "sp-api", "sp-blockchain", "sp-runtime", + "static_assertions", ] [[package]] @@ -4485,7 +4644,7 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6c601a85f5ecd1aba625247bca0031585fb1c446461b142878a16f8245ddeb8" dependencies = [ - "nalgebra", + "nalgebra 0.27.1", "statrs", ] @@ -4737,7 +4896,7 @@ source = "git+https://github.com/paritytech/substrate.git/?branch=polkadot-v0.9. dependencies = [ "anyhow", "jsonrpsee", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "serde", "sp-api", "sp-blockchain", @@ -4861,13 +5020,29 @@ checksum = "462fffe4002f4f2e1f6a9dcf12cc1a6fc0e15989014efc02a941d3e0f5dc2120" dependencies = [ "approx", "matrixmultiply", - "nalgebra-macros", + "nalgebra-macros 0.1.0", "num-complex", "num-rational", "num-traits", "rand 0.8.5", "rand_distr", - "simba", + "simba 0.5.1", + "typenum", +] + +[[package]] +name = "nalgebra" +version = "0.32.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "307ed9b18cc2423f29e83f84fd23a8e73628727990181f18641a8b5dc2ab1caa" +dependencies = [ + "approx", + "matrixmultiply", + "nalgebra-macros 0.2.1", + "num-complex", + "num-rational", + "num-traits", + "simba 0.8.1", "typenum", ] @@ -4882,6 +5057,17 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "nalgebra-macros" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91761aed67d03ad966ef783ae962ef9bbaca728d2dd7ceb7939ec110fffad998" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "names" version = "0.13.0" @@ -4987,40 +5173,35 @@ dependencies = [ [[package]] name = "nomad-base" -version = "0.1.3" -source = "git+https://github.com/availproject/avail-core?tag=da-primitives/v0.4.7#a9d0f1796d0c02a32df5091e576702d8f976cfa2" +version = "0.1.4" +source = "git+https://github.com/availproject/avail-core?tag=avail-core/v0.5.0#3e972524dce089d73140a2e32c83084e5c9c418c" dependencies = [ "ethers-signers", - "frame-support", "nomad-core", "nomad-signature", "once_cell", - "parity-scale-codec 3.4.0", - "primitive-types", + "parity-scale-codec", "scale-info", "serde", "sp-core", - "sp-io", - "sp-std 4.0.0", + "sp-runtime", ] [[package]] name = "nomad-core" -version = "0.1.3" -source = "git+https://github.com/availproject/avail-core?tag=da-primitives/v0.4.7#a9d0f1796d0c02a32df5091e576702d8f976cfa2" +version = "0.1.4" +source = "git+https://github.com/availproject/avail-core?tag=avail-core/v0.5.0#3e972524dce089d73140a2e32c83084e5c9c418c" dependencies = [ "ethers-core", "ethers-signers", - "frame-support", "nomad-signature", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "primitive-types", "scale-info", "serde", "sp-core", - "sp-io", "sp-runtime", - "sp-std 4.0.0", + "sp-std", "tiny-keccak", ] @@ -5028,10 +5209,8 @@ dependencies = [ name = "nomad-da-bridge" version = "1.0.1" dependencies = [ - "da-control", - "da-primitives", + "avail-core", "frame-benchmarking", - "frame-executive", "frame-support", "frame-system", "hex-literal", @@ -5040,24 +5219,19 @@ dependencies = [ "nomad-home", "nomad-merkle", "nomad-updater-manager", - "pallet-transaction-payment", - "parity-scale-codec 3.4.0", - "primitive-types", - "rand 0.8.5", + "parity-scale-codec", "scale-info", - "serde", - "sp-arithmetic 5.0.0", "sp-core", "sp-io", "sp-runtime", - "sp-std 5.0.0", + "sp-std", ] [[package]] name = "nomad-home" version = "4.0.0-dev" dependencies = [ - "da-primitives", + "avail-core", "frame-benchmarking", "frame-support", "frame-system", @@ -5067,35 +5241,28 @@ dependencies = [ "nomad-merkle", "nomad-signature", "nomad-updater-manager", - "parity-scale-codec 3.4.0", - "primitive-types", + "parity-scale-codec", "scale-info", - "serde", - "sp-arithmetic 5.0.0", "sp-core", "sp-io", "sp-runtime", - "sp-std 5.0.0", + "sp-std", "test-case", - "thiserror-no-std", ] [[package]] name = "nomad-merkle" -version = "0.1.1" -source = "git+https://github.com/availproject/avail-core?tag=da-primitives/v0.4.7#a9d0f1796d0c02a32df5091e576702d8f976cfa2" +version = "0.1.2" +source = "git+https://github.com/availproject/avail-core?tag=avail-core/v0.5.0#3e972524dce089d73140a2e32c83084e5c9c418c" dependencies = [ + "avail-core", "frame-support", "hex-literal", "nomad-core", - "parity-scale-codec 3.4.0", - "primitive-types", + "parity-scale-codec", "scale-info", "serde", "sp-core", - "sp-io", - "sp-runtime", - "sp-std 4.0.0", "static_assertions", "thiserror-no-std", "tiny-keccak", @@ -5103,8 +5270,8 @@ dependencies = [ [[package]] name = "nomad-signature" -version = "0.1.1" -source = "git+https://github.com/availproject/avail-core?tag=da-primitives/v0.4.7#a9d0f1796d0c02a32df5091e576702d8f976cfa2" +version = "0.1.2" +source = "git+https://github.com/availproject/avail-core?tag=avail-core/v0.5.0#3e972524dce089d73140a2e32c83084e5c9c418c" dependencies = [ "elliptic-curve", "ethers-core", @@ -5112,15 +5279,11 @@ dependencies = [ "generic-array 0.14.6", "hex", "k256", - "parity-scale-codec 3.4.0", - "primitive-types", - "rlp", - "rlp-derive", + "parity-scale-codec", "scale-info", "serde", "sp-core", - "sp-io", - "sp-std 4.0.0", + "sp-runtime", "thiserror-no-std", "tiny-keccak", ] @@ -5129,19 +5292,14 @@ dependencies = [ name = "nomad-updater-manager" version = "1.0.1" dependencies = [ - "da-primitives", - "frame-benchmarking", + "avail-core", "frame-support", "frame-system", - "parity-scale-codec 3.4.0", - "primitive-types", + "parity-scale-codec", "scale-info", - "serde", - "sp-arithmetic 5.0.0", "sp-core", "sp-io", "sp-runtime", - "sp-std 5.0.0", ] [[package]] @@ -5150,20 +5308,6 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" -[[package]] -name = "num" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43db66d1170d347f9a065114077f7dccb00c1b9478c89384490a3425279a4606" -dependencies = [ - "num-bigint", - "num-complex", - "num-integer", - "num-iter", - "num-rational", - "num-traits", -] - [[package]] name = "num-bigint" version = "0.4.3" @@ -5204,17 +5348,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "num-iter" -version = "0.1.43" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - [[package]] name = "num-rational" version = "0.4.1" @@ -5387,12 +5520,12 @@ dependencies = [ "frame-support", "frame-system", "pallet-session", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "scale-info", "sp-application-crypto", "sp-authority-discovery", "sp-runtime", - "sp-std 5.0.0", + "sp-std", ] [[package]] @@ -5403,11 +5536,11 @@ dependencies = [ "frame-support", "frame-system", "impl-trait-for-tuples", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "scale-info", "sp-authorship", "sp-runtime", - "sp-std 5.0.0", + "sp-std", ] [[package]] @@ -5422,7 +5555,7 @@ dependencies = [ "pallet-authorship", "pallet-session", "pallet-timestamp", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "scale-info", "sp-application-crypto", "sp-consensus-babe", @@ -5431,7 +5564,7 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std 5.0.0", + "sp-std", ] [[package]] @@ -5445,13 +5578,13 @@ dependencies = [ "frame-system", "log", "pallet-balances", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", "sp-runtime", - "sp-std 5.0.0", - "sp-tracing 6.0.0", + "sp-std", + "sp-tracing", ] [[package]] @@ -5463,10 +5596,10 @@ dependencies = [ "frame-support", "frame-system", "log", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std 5.0.0", + "sp-std", ] [[package]] @@ -5479,12 +5612,12 @@ dependencies = [ "frame-system", "log", "pallet-treasury", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", "sp-runtime", - "sp-std 5.0.0", + "sp-std", ] [[package]] @@ -5498,12 +5631,12 @@ dependencies = [ "log", "pallet-bounties", "pallet-treasury", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", "sp-runtime", - "sp-std 5.0.0", + "sp-std", ] [[package]] @@ -5515,12 +5648,12 @@ dependencies = [ "frame-support", "frame-system", "log", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", "sp-runtime", - "sp-std 5.0.0", + "sp-std", ] [[package]] @@ -5532,13 +5665,13 @@ dependencies = [ "frame-support", "frame-system", "log", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "scale-info", "serde", "sp-core", "sp-io", "sp-runtime", - "sp-std 5.0.0", + "sp-std", ] [[package]] @@ -5552,15 +5685,15 @@ dependencies = [ "frame-system", "log", "pallet-election-provider-support-benchmarking", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "rand 0.8.5", "scale-info", - "sp-arithmetic 6.0.0", + "sp-arithmetic", "sp-core", "sp-io", "sp-npos-elections", "sp-runtime", - "sp-std 5.0.0", + "sp-std", "strum", ] @@ -5572,7 +5705,7 @@ dependencies = [ "frame-benchmarking", "frame-election-provider-support", "frame-system", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "sp-npos-elections", "sp-runtime", ] @@ -5586,13 +5719,13 @@ dependencies = [ "frame-support", "frame-system", "log", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", "sp-npos-elections", "sp-runtime", - "sp-std 5.0.0", + "sp-std", ] [[package]] @@ -5606,7 +5739,7 @@ dependencies = [ "log", "pallet-authorship", "pallet-session", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "scale-info", "sp-application-crypto", "sp-core", @@ -5615,7 +5748,7 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std 5.0.0", + "sp-std", ] [[package]] @@ -5628,14 +5761,14 @@ dependencies = [ "frame-system", "log", "pallet-authorship", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "scale-info", "sp-application-crypto", "sp-core", "sp-io", "sp-runtime", "sp-staking", - "sp-std 5.0.0", + "sp-std", ] [[package]] @@ -5646,13 +5779,13 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", "sp-keyring", "sp-runtime", - "sp-std 5.0.0", + "sp-std", ] [[package]] @@ -5664,12 +5797,12 @@ dependencies = [ "frame-support", "frame-system", "log", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", "sp-runtime", - "sp-std 5.0.0", + "sp-std", ] [[package]] @@ -5680,13 +5813,13 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", "sp-mmr-primitives", "sp-runtime", - "sp-std 5.0.0", + "sp-std", ] [[package]] @@ -5698,11 +5831,11 @@ dependencies = [ "frame-support", "frame-system", "log", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "scale-info", "sp-io", "sp-runtime", - "sp-std 5.0.0", + "sp-std", ] [[package]] @@ -5713,13 +5846,13 @@ dependencies = [ "frame-support", "frame-system", "log", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", "sp-runtime", "sp-staking", - "sp-std 5.0.0", + "sp-std", ] [[package]] @@ -5731,12 +5864,12 @@ dependencies = [ "frame-system", "log", "pallet-balances", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "scale-info", "serde", "sp-runtime", "sp-staking", - "sp-std 5.0.0", + "sp-std", ] [[package]] @@ -5748,12 +5881,12 @@ dependencies = [ "frame-support", "frame-system", "log", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", "sp-runtime", - "sp-std 5.0.0", + "sp-std", ] [[package]] @@ -5765,11 +5898,11 @@ dependencies = [ "frame-support", "frame-system", "log", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "scale-info", "sp-io", "sp-runtime", - "sp-std 5.0.0", + "sp-std", "sp-weights", ] @@ -5783,14 +5916,14 @@ dependencies = [ "impl-trait-for-tuples", "log", "pallet-timestamp", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", "sp-runtime", "sp-session", "sp-staking", - "sp-std 5.0.0", + "sp-std", "sp-trie", ] @@ -5806,7 +5939,7 @@ dependencies = [ "log", "pallet-authorship", "pallet-session", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "rand_chacha 0.2.2", "scale-info", "serde", @@ -5814,7 +5947,7 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-std 5.0.0", + "sp-std", ] [[package]] @@ -5835,11 +5968,11 @@ source = "git+https://github.com/paritytech/substrate.git/?branch=polkadot-v0.9. dependencies = [ "frame-support", "frame-system", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "scale-info", "sp-io", "sp-runtime", - "sp-std 5.0.0", + "sp-std", ] [[package]] @@ -5851,12 +5984,12 @@ dependencies = [ "frame-support", "frame-system", "log", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "scale-info", "sp-inherents", "sp-io", "sp-runtime", - "sp-std 5.0.0", + "sp-std", "sp-timestamp", ] @@ -5870,13 +6003,13 @@ dependencies = [ "frame-system", "log", "pallet-treasury", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "scale-info", "serde", "sp-core", "sp-io", "sp-runtime", - "sp-std 5.0.0", + "sp-std", ] [[package]] @@ -5886,13 +6019,13 @@ source = "git+https://github.com/paritytech/substrate.git/?branch=polkadot-v0.9. dependencies = [ "frame-support", "frame-system", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "scale-info", "serde", "sp-core", "sp-io", "sp-runtime", - "sp-std 5.0.0", + "sp-std", ] [[package]] @@ -5902,7 +6035,7 @@ source = "git+https://github.com/paritytech/substrate.git/?branch=polkadot-v0.9. dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "sp-api", "sp-blockchain", "sp-core", @@ -5917,7 +6050,7 @@ version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate.git/?branch=polkadot-v0.9.37#f38bd6671d460293c93062cc1e4fe9e9e490cb29" dependencies = [ "pallet-transaction-payment", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "sp-api", "sp-runtime", "sp-weights", @@ -5933,11 +6066,11 @@ dependencies = [ "frame-system", "impl-trait-for-tuples", "pallet-balances", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "scale-info", "serde", "sp-runtime", - "sp-std 5.0.0", + "sp-std", ] [[package]] @@ -5948,12 +6081,12 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", "sp-runtime", - "sp-std 5.0.0", + "sp-std", ] [[package]] @@ -5975,20 +6108,6 @@ dependencies = [ "snap", ] -[[package]] -name = "parity-scale-codec" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "373b1a4c1338d9cd3d1fa53b3a11bdab5ab6bd80a20f7f7becd76953ae2be909" -dependencies = [ - "arrayvec 0.7.2", - "bitvec 0.20.4", - "byte-slice-cast", - "impl-trait-for-tuples", - "parity-scale-codec-derive 2.3.1", - "serde", -] - [[package]] name = "parity-scale-codec" version = "3.4.0" @@ -6000,22 +6119,10 @@ dependencies = [ "byte-slice-cast", "bytes", "impl-trait-for-tuples", - "parity-scale-codec-derive 3.1.4", + "parity-scale-codec-derive", "serde", ] -[[package]] -name = "parity-scale-codec-derive" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1557010476e0595c9b568d16dcfb81b93cdeb157612726f5170d31aa707bed27" -dependencies = [ - "proc-macro-crate", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "parity-scale-codec-derive" version = "3.1.4" @@ -6043,7 +6150,6 @@ dependencies = [ "cfg-if", "impl-trait-for-tuples", "parity-util-mem-derive", - "parking_lot 0.12.1", "primitive-types", "winapi", ] @@ -6349,6 +6455,21 @@ dependencies = [ "windows-sys 0.42.0", ] +[[package]] +name = "poly-multiproof" +version = "0.0.1" +source = "git+https://github.com/availproject/poly-multiproof?tag=v0.0.1#cd8d31b7eb568dea2fddfc9237e2e31ea7ae7ed3" +dependencies = [ + "ark-bls12-381", + "ark-ec", + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "blst", + "merlin 3.0.0", +] + [[package]] name = "poly1305" version = "0.7.2" @@ -6649,12 +6770,6 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "def50a86306165861203e7f84ecffbbdfdea79f0e51039b33de1e952358c47ac" -[[package]] -name = "radium" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "643f8f41a8ebc4c5dc4515c82bb8abd397b527fc20fd681b7c011c2aee5d44fb" - [[package]] name = "radium" version = "0.7.0" @@ -7170,6 +7285,15 @@ version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b4b9743ed687d4b4bcedf9ff5eaa7398495ae14e61cba0a295704edbc7decde" +[[package]] +name = "safe_arch" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f398075ce1e6a179b46f51bd88d0598b92b00d3551f1a2d4ac49e771b56ac354" +dependencies = [ + "bytemuck", +] + [[package]] name = "salsa20" version = "0.10.2" @@ -7210,7 +7334,7 @@ dependencies = [ "ip_network", "libp2p", "log", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "prost", "prost-build", "rand 0.8.5", @@ -7234,7 +7358,7 @@ dependencies = [ "futures", "futures-timer", "log", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "sc-block-builder", "sc-client-api", "sc-proposer-metrics", @@ -7254,7 +7378,7 @@ name = "sc-block-builder" version = "0.10.0-dev" source = "git+https://github.com/paritytech/substrate.git/?branch=polkadot-v0.9.37#f38bd6671d460293c93062cc1e4fe9e9e490cb29" dependencies = [ - "parity-scale-codec 3.4.0", + "parity-scale-codec", "sc-client-api", "sp-api", "sp-block-builder", @@ -7304,7 +7428,7 @@ dependencies = [ "libp2p", "log", "names", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "rand 0.8.5", "regex", "rpassword", @@ -7339,7 +7463,7 @@ dependencies = [ "fnv", "futures", "log", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "parking_lot 0.12.1", "sc-executor", "sc-transaction-pool-api", @@ -7369,11 +7493,11 @@ dependencies = [ "linked-hash-map", "log", "parity-db", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "parking_lot 0.12.1", "sc-client-api", "sc-state-db", - "sp-arithmetic 6.0.0", + "sp-arithmetic", "sp-blockchain", "sp-core", "sp-database", @@ -7420,7 +7544,7 @@ dependencies = [ "num-bigint", "num-rational", "num-traits", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "parking_lot 0.12.1", "sc-client-api", "sc-consensus", @@ -7473,7 +7597,7 @@ version = "0.10.0-dev" source = "git+https://github.com/paritytech/substrate.git/?branch=polkadot-v0.9.37#f38bd6671d460293c93062cc1e4fe9e9e490cb29" dependencies = [ "fork-tree", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "sc-client-api", "sc-consensus", "sp-blockchain", @@ -7489,11 +7613,11 @@ dependencies = [ "futures", "futures-timer", "log", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "sc-client-api", "sc-consensus", "sc-telemetry", - "sp-arithmetic 6.0.0", + "sp-arithmetic", "sp-blockchain", "sp-consensus", "sp-consensus-slots", @@ -7520,7 +7644,7 @@ version = "0.10.0-dev" source = "git+https://github.com/paritytech/substrate.git/?branch=polkadot-v0.9.37#f38bd6671d460293c93062cc1e4fe9e9e490cb29" dependencies = [ "lru 0.8.1", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "parking_lot 0.12.1", "sc-executor-common", "sc-executor-wasmi", @@ -7595,7 +7719,7 @@ dependencies = [ "futures", "futures-timer", "log", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "parking_lot 0.12.1", "rand 0.8.5", "sc-block-builder", @@ -7610,7 +7734,7 @@ dependencies = [ "serde_json", "sp-api", "sp-application-crypto", - "sp-arithmetic 6.0.0", + "sp-arithmetic", "sp-blockchain", "sp-consensus", "sp-core", @@ -7630,7 +7754,7 @@ dependencies = [ "futures", "jsonrpsee", "log", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "sc-client-api", "sc-finality-grandpa", "sc-rpc", @@ -7689,7 +7813,7 @@ dependencies = [ "libp2p", "log", "lru 0.8.1", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "parking_lot 0.12.1", "pin-project", "rand 0.8.5", @@ -7702,7 +7826,7 @@ dependencies = [ "serde", "serde_json", "smallvec", - "sp-arithmetic 6.0.0", + "sp-arithmetic", "sp-blockchain", "sp-consensus", "sp-core", @@ -7744,7 +7868,7 @@ dependencies = [ "futures-timer", "libp2p", "linked_hash_set", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "prost-build", "sc-consensus", "sc-peerset", @@ -7785,7 +7909,7 @@ dependencies = [ "futures", "libp2p", "log", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "prost", "prost-build", "sc-client-api", @@ -7810,7 +7934,7 @@ dependencies = [ "log", "lru 0.8.1", "mockall", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "prost", "prost-build", "sc-client-api", @@ -7819,7 +7943,7 @@ dependencies = [ "sc-peerset", "sc-utils", "smallvec", - "sp-arithmetic 6.0.0", + "sp-arithmetic", "sp-blockchain", "sp-consensus", "sp-core", @@ -7838,7 +7962,7 @@ dependencies = [ "futures", "libp2p", "log", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "pin-project", "sc-network-common", "sc-peerset", @@ -7863,7 +7987,7 @@ dependencies = [ "libp2p", "num_cpus", "once_cell", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "parking_lot 0.12.1", "rand 0.8.5", "sc-client-api", @@ -7908,7 +8032,7 @@ dependencies = [ "futures", "jsonrpsee", "log", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "parking_lot 0.12.1", "sc-block-builder", "sc-chain-spec", @@ -7935,7 +8059,7 @@ version = "0.10.0-dev" source = "git+https://github.com/paritytech/substrate.git/?branch=polkadot-v0.9.37#f38bd6671d460293c93062cc1e4fe9e9e490cb29" dependencies = [ "jsonrpsee", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "sc-chain-spec", "sc-transaction-pool-api", "scale-info", @@ -7974,7 +8098,7 @@ dependencies = [ "hex", "jsonrpsee", "log", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "parking_lot 0.12.1", "sc-chain-spec", "sc-client-api", @@ -8001,7 +8125,7 @@ dependencies = [ "futures-timer", "jsonrpsee", "log", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "parking_lot 0.12.1", "pin-project", "rand 0.8.5", @@ -8060,7 +8184,7 @@ version = "0.10.0-dev" source = "git+https://github.com/paritytech/substrate.git/?branch=polkadot-v0.9.37#f38bd6671d460293c93062cc1e4fe9e9e490cb29" dependencies = [ "log", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "parking_lot 0.12.1", "sp-core", ] @@ -8071,7 +8195,7 @@ version = "0.10.0-dev" source = "git+https://github.com/paritytech/substrate.git/?branch=polkadot-v0.9.37#f38bd6671d460293c93062cc1e4fe9e9e490cb29" dependencies = [ "jsonrpsee", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "sc-chain-spec", "sc-client-api", "sc-consensus-babe", @@ -8100,7 +8224,7 @@ dependencies = [ "serde_json", "sp-core", "sp-io", - "sp-std 5.0.0", + "sp-std", ] [[package]] @@ -8146,7 +8270,7 @@ dependencies = [ "sp-core", "sp-rpc", "sp-runtime", - "sp-tracing 6.0.0", + "sp-tracing", "thiserror", "tracing", "tracing-log", @@ -8174,7 +8298,7 @@ dependencies = [ "futures-timer", "linked-hash-map", "log", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "parking_lot 0.12.1", "sc-client-api", "sc-transaction-pool-api", @@ -8184,7 +8308,7 @@ dependencies = [ "sp-blockchain", "sp-core", "sp-runtime", - "sp-tracing 6.0.0", + "sp-tracing", "sp-transaction-pool", "substrate-prometheus-endpoint 0.10.0-dev", "thiserror", @@ -8227,7 +8351,7 @@ dependencies = [ "bitvec 1.0.1", "cfg-if", "derive_more", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "scale-info-derive", "serde", ] @@ -8567,6 +8691,19 @@ dependencies = [ "paste", ] +[[package]] +name = "simba" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "061507c94fc6ab4ba1c9a0305018408e312e17c041eb63bef8aa726fa33aceae" +dependencies = [ + "approx", + "num-complex", + "num-traits", + "paste", + "wide", +] + [[package]] name = "slab" version = "0.4.8" @@ -8645,12 +8782,12 @@ source = "git+https://github.com/paritytech/substrate.git/?branch=polkadot-v0.9. dependencies = [ "hash-db", "log", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "sp-api-proc-macro", "sp-core", "sp-runtime", "sp-state-machine", - "sp-std 5.0.0", + "sp-std", "sp-trie", "sp-version", "thiserror", @@ -8673,28 +8810,12 @@ name = "sp-application-crypto" version = "7.0.0" source = "git+https://github.com/paritytech/substrate.git/?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ - "parity-scale-codec 3.4.0", + "parity-scale-codec", "scale-info", "serde", "sp-core", "sp-io", - "sp-std 5.0.0", -] - -[[package]] -name = "sp-arithmetic" -version = "5.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31ef21f82cc10f75ed046b65e2f8048080ee76e59f1b8aed55c7150daebfd35b" -dependencies = [ - "integer-sqrt", - "num-traits", - "parity-scale-codec 3.4.0", - "scale-info", - "serde", - "sp-debug-derive 4.0.0", - "sp-std 4.0.0", - "static_assertions", + "sp-std", ] [[package]] @@ -8704,10 +8825,10 @@ source = "git+https://github.com/paritytech/substrate.git/?branch=polkadot-v0.9. dependencies = [ "integer-sqrt", "num-traits", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "scale-info", "serde", - "sp-std 5.0.0", + "sp-std", "static_assertions", ] @@ -8716,12 +8837,12 @@ name = "sp-authority-discovery" version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate.git/?branch=polkadot-v0.9.37#f38bd6671d460293c93062cc1e4fe9e9e490cb29" dependencies = [ - "parity-scale-codec 3.4.0", + "parity-scale-codec", "scale-info", "sp-api", "sp-application-crypto", "sp-runtime", - "sp-std 5.0.0", + "sp-std", ] [[package]] @@ -8730,10 +8851,10 @@ version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate.git/?branch=polkadot-v0.9.37#f38bd6671d460293c93062cc1e4fe9e9e490cb29" dependencies = [ "async-trait", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "sp-inherents", "sp-runtime", - "sp-std 5.0.0", + "sp-std", ] [[package]] @@ -8741,7 +8862,7 @@ name = "sp-beefy" version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate.git/?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ - "parity-scale-codec 3.4.0", + "parity-scale-codec", "scale-info", "serde", "sp-api", @@ -8750,7 +8871,7 @@ dependencies = [ "sp-io", "sp-mmr-primitives", "sp-runtime", - "sp-std 5.0.0", + "sp-std", ] [[package]] @@ -8758,11 +8879,11 @@ name = "sp-block-builder" version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate.git/?branch=polkadot-v0.9.37#f38bd6671d460293c93062cc1e4fe9e9e490cb29" dependencies = [ - "parity-scale-codec 3.4.0", + "parity-scale-codec", "sp-api", "sp-inherents", "sp-runtime", - "sp-std 5.0.0", + "sp-std", ] [[package]] @@ -8773,7 +8894,7 @@ dependencies = [ "futures", "log", "lru 0.8.1", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "parking_lot 0.12.1", "sp-api", "sp-consensus", @@ -8791,12 +8912,12 @@ dependencies = [ "async-trait", "futures", "log", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "sp-core", "sp-inherents", "sp-runtime", "sp-state-machine", - "sp-std 5.0.0", + "sp-std", "sp-version", "thiserror", ] @@ -8808,7 +8929,7 @@ source = "git+https://github.com/paritytech/substrate.git/?branch=polkadot-v0.9. dependencies = [ "async-trait", "merlin 2.0.1", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "scale-info", "serde", "sp-api", @@ -8820,7 +8941,7 @@ dependencies = [ "sp-inherents", "sp-keystore", "sp-runtime", - "sp-std 5.0.0", + "sp-std", "sp-timestamp", ] @@ -8829,10 +8950,10 @@ name = "sp-consensus-slots" version = "0.10.0-dev" source = "git+https://github.com/paritytech/substrate.git/?branch=polkadot-v0.9.37#f38bd6671d460293c93062cc1e4fe9e9e490cb29" dependencies = [ - "parity-scale-codec 3.4.0", + "parity-scale-codec", "scale-info", "serde", - "sp-std 5.0.0", + "sp-std", "sp-timestamp", ] @@ -8841,12 +8962,12 @@ name = "sp-consensus-vrf" version = "0.10.0-dev" source = "git+https://github.com/paritytech/substrate.git/?branch=polkadot-v0.9.37#f38bd6671d460293c93062cc1e4fe9e9e490cb29" dependencies = [ - "parity-scale-codec 3.4.0", + "parity-scale-codec", "scale-info", "schnorrkel", "sp-core", "sp-runtime", - "sp-std 5.0.0", + "sp-std", ] [[package]] @@ -8868,7 +8989,7 @@ dependencies = [ "libsecp256k1", "log", "merlin 2.0.1", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "parking_lot 0.12.1", "primitive-types", "rand 0.8.5", @@ -8879,10 +9000,10 @@ dependencies = [ "secrecy", "serde", "sp-core-hashing", - "sp-debug-derive 5.0.0", + "sp-debug-derive", "sp-externalities", "sp-runtime-interface", - "sp-std 5.0.0", + "sp-std", "sp-storage", "ss58-registry", "substrate-bip39", @@ -8901,7 +9022,7 @@ dependencies = [ "digest 0.10.6", "sha2 0.10.6", "sha3", - "sp-std 5.0.0", + "sp-std", "twox-hash", ] @@ -8925,17 +9046,6 @@ dependencies = [ "parking_lot 0.12.1", ] -[[package]] -name = "sp-debug-derive" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d676664972e22a0796176e81e7bec41df461d1edf52090955cdab55f2c956ff2" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "sp-debug-derive" version = "5.0.0" @@ -8952,8 +9062,8 @@ version = "0.13.0" source = "git+https://github.com/paritytech/substrate.git/?branch=polkadot-v0.9.37#f38bd6671d460293c93062cc1e4fe9e9e490cb29" dependencies = [ "environmental", - "parity-scale-codec 3.4.0", - "sp-std 5.0.0", + "parity-scale-codec", + "sp-std", "sp-storage", ] @@ -8964,7 +9074,7 @@ source = "git+https://github.com/paritytech/substrate.git/?branch=polkadot-v0.9. dependencies = [ "finality-grandpa", "log", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "scale-info", "serde", "sp-api", @@ -8972,7 +9082,7 @@ dependencies = [ "sp-core", "sp-keystore", "sp-runtime", - "sp-std 5.0.0", + "sp-std", ] [[package]] @@ -8982,10 +9092,10 @@ source = "git+https://github.com/paritytech/substrate.git/?branch=polkadot-v0.9. dependencies = [ "async-trait", "impl-trait-for-tuples", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "sp-core", "sp-runtime", - "sp-std 5.0.0", + "sp-std", "thiserror", ] @@ -9000,15 +9110,15 @@ dependencies = [ "futures", "libsecp256k1", "log", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "secp256k1", "sp-core", "sp-externalities", "sp-keystore", "sp-runtime-interface", "sp-state-machine", - "sp-std 5.0.0", - "sp-tracing 6.0.0", + "sp-std", + "sp-tracing", "sp-trie", "tracing", "tracing-core", @@ -9033,7 +9143,7 @@ dependencies = [ "async-trait", "futures", "merlin 2.0.1", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "parking_lot 0.12.1", "schnorrkel", "serde", @@ -9068,14 +9178,14 @@ source = "git+https://github.com/paritytech/substrate.git/?branch=polkadot-v0.9. dependencies = [ "ckb-merkle-mountain-range", "log", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "scale-info", "serde", "sp-api", "sp-core", - "sp-debug-derive 5.0.0", + "sp-debug-derive", "sp-runtime", - "sp-std 5.0.0", + "sp-std", "thiserror", ] @@ -9084,13 +9194,13 @@ name = "sp-npos-elections" version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate.git/?branch=polkadot-v0.9.37#f38bd6671d460293c93062cc1e4fe9e9e490cb29" dependencies = [ - "parity-scale-codec 3.4.0", + "parity-scale-codec", "scale-info", "serde", - "sp-arithmetic 6.0.0", + "sp-arithmetic", "sp-core", "sp-runtime", - "sp-std 5.0.0", + "sp-std", ] [[package]] @@ -9132,16 +9242,16 @@ dependencies = [ "hash256-std-hasher", "impl-trait-for-tuples", "log", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "paste", "rand 0.8.5", "scale-info", "serde", "sp-application-crypto", - "sp-arithmetic 6.0.0", + "sp-arithmetic", "sp-core", "sp-io", - "sp-std 5.0.0", + "sp-std", "sp-weights", ] @@ -9152,13 +9262,13 @@ source = "git+https://github.com/paritytech/substrate.git/?branch=polkadot-v0.9. dependencies = [ "bytes", "impl-trait-for-tuples", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "primitive-types", "sp-externalities", "sp-runtime-interface-proc-macro", - "sp-std 5.0.0", + "sp-std", "sp-storage", - "sp-tracing 6.0.0", + "sp-tracing", "sp-wasm-interface", "static_assertions", ] @@ -9180,13 +9290,13 @@ name = "sp-session" version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate.git/?branch=polkadot-v0.9.37#f38bd6671d460293c93062cc1e4fe9e9e490cb29" dependencies = [ - "parity-scale-codec 3.4.0", + "parity-scale-codec", "scale-info", "sp-api", "sp-core", "sp-runtime", "sp-staking", - "sp-std 5.0.0", + "sp-std", ] [[package]] @@ -9194,11 +9304,11 @@ name = "sp-staking" version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate.git/?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ - "parity-scale-codec 3.4.0", + "parity-scale-codec", "scale-info", "sp-core", "sp-runtime", - "sp-std 5.0.0", + "sp-std", ] [[package]] @@ -9208,25 +9318,19 @@ source = "git+https://github.com/paritytech/substrate.git/?branch=polkadot-v0.9. dependencies = [ "hash-db", "log", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "parking_lot 0.12.1", "rand 0.8.5", "smallvec", "sp-core", "sp-externalities", "sp-panic-handler", - "sp-std 5.0.0", + "sp-std", "sp-trie", "thiserror", "tracing", ] -[[package]] -name = "sp-std" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14804d6069ee7a388240b665f17908d98386ffb0b5d39f89a4099fc7a2a4c03f" - [[package]] name = "sp-std" version = "5.0.0" @@ -9238,11 +9342,11 @@ version = "7.0.0" source = "git+https://github.com/paritytech/substrate.git/?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ "impl-serde", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "ref-cast", "serde", - "sp-debug-derive 5.0.0", - "sp-std 5.0.0", + "sp-debug-derive", + "sp-std", ] [[package]] @@ -9253,33 +9357,20 @@ dependencies = [ "async-trait", "futures-timer", "log", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "sp-inherents", "sp-runtime", - "sp-std 5.0.0", + "sp-std", "thiserror", ] -[[package]] -name = "sp-tracing" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4688fceac497cee7e9b72c387fef20fa517e2bf6a3bf52a4a45dcc9391d6201" -dependencies = [ - "parity-scale-codec 2.3.1", - "sp-std 4.0.0", - "tracing", - "tracing-core", - "tracing-subscriber", -] - [[package]] name = "sp-tracing" version = "6.0.0" source = "git+https://github.com/paritytech/substrate.git/?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ - "parity-scale-codec 3.4.0", - "sp-std 5.0.0", + "parity-scale-codec", + "sp-std", "tracing", "tracing-core", "tracing-subscriber", @@ -9301,12 +9392,12 @@ source = "git+https://github.com/paritytech/substrate.git/?branch=polkadot-v0.9. dependencies = [ "async-trait", "log", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "scale-info", "sp-core", "sp-inherents", "sp-runtime", - "sp-std 5.0.0", + "sp-std", "sp-trie", ] @@ -9322,11 +9413,11 @@ dependencies = [ "lru 0.8.1", "memory-db", "nohash-hasher", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "parking_lot 0.12.1", "scale-info", "sp-core", - "sp-std 5.0.0", + "sp-std", "thiserror", "tracing", "trie-db", @@ -9339,13 +9430,13 @@ version = "5.0.0" source = "git+https://github.com/paritytech/substrate.git/?branch=polkadot-v0.9.37#f38bd6671d460293c93062cc1e4fe9e9e490cb29" dependencies = [ "impl-serde", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "parity-wasm", "scale-info", "serde", "sp-core-hashing-proc-macro", "sp-runtime", - "sp-std 5.0.0", + "sp-std", "sp-version-proc-macro", "thiserror", ] @@ -9355,7 +9446,7 @@ name = "sp-version-proc-macro" version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate.git/?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" dependencies = [ - "parity-scale-codec 3.4.0", + "parity-scale-codec", "proc-macro2", "quote", "syn 1.0.109", @@ -9368,8 +9459,8 @@ source = "git+https://github.com/paritytech/substrate.git/?branch=polkadot-v0.9. dependencies = [ "impl-trait-for-tuples", "log", - "parity-scale-codec 3.4.0", - "sp-std 5.0.0", + "parity-scale-codec", + "sp-std", "wasmi", "wasmtime", ] @@ -9379,14 +9470,14 @@ name = "sp-weights" version = "4.0.0" source = "git+https://github.com/paritytech/substrate.git/?branch=polkadot-v0.9.37#f38bd6671d460293c93062cc1e4fe9e9e490cb29" dependencies = [ - "parity-scale-codec 3.4.0", + "parity-scale-codec", "scale-info", "serde", "smallvec", - "sp-arithmetic 6.0.0", + "sp-arithmetic", "sp-core", - "sp-debug-derive 5.0.0", - "sp-std 5.0.0", + "sp-debug-derive", + "sp-std", ] [[package]] @@ -9468,7 +9559,7 @@ checksum = "05bdbb8e4e78216a85785a85d3ec3183144f98d0097b9281802c019bb07a6f05" dependencies = [ "approx", "lazy_static", - "nalgebra", + "nalgebra 0.27.1", "num-traits", "rand 0.8.5", ] @@ -9550,7 +9641,7 @@ dependencies = [ "futures", "jsonrpsee", "log", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "sc-rpc-api", "sc-transaction-pool-api", "sp-api", @@ -9606,7 +9697,7 @@ source = "git+https://github.com/paritytech/substrate.git/?branch=polkadot-v0.9. dependencies = [ "jsonrpsee", "log", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "sc-client-api", "sc-rpc-api", "scale-info", @@ -10226,7 +10317,7 @@ dependencies = [ "frame-try-runtime", "hex", "log", - "parity-scale-codec 3.4.0", + "parity-scale-codec", "sc-cli", "sc-executor", "sc-service", @@ -10234,7 +10325,7 @@ dependencies = [ "serde_json", "sp-api", "sp-core", - "sp-debug-derive 5.0.0", + "sp-debug-derive", "sp-externalities", "sp-io", "sp-keystore", @@ -11096,6 +11187,16 @@ dependencies = [ "once_cell", ] +[[package]] +name = "wide" +version = "0.7.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa469ffa65ef7e0ba0f164183697b89b854253fd31aeb92358b7b6155177d62f" +dependencies = [ + "bytemuck", + "safe_arch", +] + [[package]] name = "widestring" version = "0.5.1" @@ -11309,12 +11410,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "wyz" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85e60b0d1b5f99db2556934e21937020776a5d31520bf169e851ac44e6420214" - [[package]] name = "wyz" version = "0.5.1" @@ -11456,3 +11551,8 @@ dependencies = [ "libc", "pkg-config", ] + +[[patch.unused]] +name = "substrate-wasm-builder" +version = "5.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git/?branch=polkadot-v0.9.37#6fa7fe1326ecaab9921c2c3888530ad679cfbb87" diff --git a/Cargo.toml b/Cargo.toml index 895b06acd..b680705d3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,15 +22,15 @@ frame-system-rpc-runtime-api = { path = "pallets/system/rpc/runtime-api" } frame-system-benchmarking = { path = "pallets/system/benchmarking" } # DA Primitives -da-primitives = { version = "0.4", git="https://github.com/availproject/avail-core", tag = "da-primitives/v0.4.7" } -kate = { version = "0.7", git="https://github.com/availproject/avail-core", tag = "da-primitives/v0.4.7" } -kate-recovery = { version = "0.8", git="https://github.com/availproject/avail-core", tag = "da-primitives/v0.4.7" } +avail-core = { version = "0.5", git="https://github.com/availproject/avail-core", tag = "avail-core/v0.5.0" } +kate = { version = "0.8", git="https://github.com/availproject/avail-core", tag = "avail-core/v0.5.0" } +kate-recovery = { version = "0.9", git="https://github.com/availproject/avail-core", tag = "avail-core/v0.5.0" } # Nomad -nomad-signature = { version = "0.1", git="https://github.com/availproject/avail-core", tag = "da-primitives/v0.4.7" } -nomad-merkle = { version = "0.1", git="https://github.com/availproject/avail-core", tag = "da-primitives/v0.4.7" } -nomad-base = { version = "0.1", git="https://github.com/availproject/avail-core", tag = "da-primitives/v0.4.7" } -nomad-core = { version = "0.1", git="https://github.com/availproject/avail-core", tag = "da-primitives/v0.4.7" } +nomad-signature = { version = "0.1", git="https://github.com/availproject/avail-core", tag = "avail-core/v0.5.0" } +nomad-merkle = { version = "0.1", git="https://github.com/availproject/avail-core", tag = "avail-core/v0.5.0" } +nomad-base = { version = "0.1", git="https://github.com/availproject/avail-core", tag = "avail-core/v0.5.0" } +nomad-core = { version = "0.1", git="https://github.com/availproject/avail-core", tag = "avail-core/v0.5.0" } # Other stuff uint = { git = "https://github.com/paritytech/parity-common.git", tag = "rlp-v0.5.2" } @@ -123,6 +123,7 @@ pallet-child-bounties = { git = "https://github.com/paritytech/substrate.git", b pallet-preimage = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37" } pallet-nomination-pools = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37" } pallet-election-provider-support-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37" } +substrate-wasm-builder = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37" } diff --git a/avail-subxt/Cargo.toml b/avail-subxt/Cargo.toml index 8cbce42af..3292898d6 100644 --- a/avail-subxt/Cargo.toml +++ b/avail-subxt/Cargo.toml @@ -1,8 +1,9 @@ [package] name = "avail-subxt" -version = "0.2.1" +version = "0.3.0" authors = ["Luka Borkovic "] edition = "2021" +license = "Apache-2.0" [lib] name = "avail_subxt" @@ -26,12 +27,12 @@ curve25519-dalek = "2.1.3" schnorrkel = "0.9.1" # Substrate -subxt = "0.27" -sp-core = { version = "16.0.0", default-features = false } -codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "full", "bit-vec"] } -serde = { version = "1.0", features = ["derive"] } +subxt = "0.29" +sp-core = { version = "*", default-features = false } +codec = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive", "full", "bit-vec"] } +serde = { version = "1", features = ["derive"] } serde-hex = "0.1" -scale-info = { version = "2.0.0", features = ["bit-vec"] } +scale-info = { version = "2", features = ["bit-vec"] } [dev-dependencies] @@ -47,12 +48,12 @@ indicatif = "0.17" # Substrate -sp-keyring = "18.0.0" +sp-keyring = "*" [features] default = ["api-dev", "std"] api-dev = [] api-main = [] -std = [ "sp-core/std"] +std = [ "sp-core/std", "codec/std"] [workspace] diff --git a/avail-subxt/build_api.sh b/avail-subxt/build_api.sh index fa5eecbc4..c2f3ad24d 100755 --- a/avail-subxt/build_api.sh +++ b/avail-subxt/build_api.sh @@ -1,35 +1,38 @@ #!/bin/sh echo "⛓ Installing SubXt..." -cargo install --git https://github.com/paritytech/subxt --tag v0.27.1 || true +cargo install --git https://github.com/paritytech/subxt --tag v0.29.0 subxt-cli || true echo "🔨 Generating Avail-SubXt API from localhost..." subxt codegen \ --derive Clone \ --derive PartialEq \ --derive Eq \ - --derive-for-type da_primitives::header::extension::HeaderExtension=serde::Serialize \ - --derive-for-type da_primitives::header::extension::HeaderExtension=serde::Deserialize \ - --derive-for-type da_primitives::header::extension::v1::HeaderExtension=serde::Serialize \ - --derive-for-type da_primitives::header::extension::v1::HeaderExtension=serde::Deserialize \ - --derive-for-type da_primitives::header::extension::v1::HeaderExtension=Default \ - --derive-for-type da_primitives::header::extension::v2::HeaderExtension=serde::Serialize \ - --derive-for-type da_primitives::header::extension::v2::HeaderExtension=serde::Deserialize \ - --derive-for-type da_primitives::header::extension::v2::HeaderExtension=Default \ - --derive-for-type da_primitives::kate_commitment::v1::KateCommitment=serde::Serialize \ - --derive-for-type da_primitives::kate_commitment::v1::KateCommitment=serde::Deserialize \ - --derive-for-type da_primitives::kate_commitment::v1::KateCommitment=Default \ - --derive-for-type da_primitives::kate_commitment::v2::KateCommitment=serde::Serialize \ - --derive-for-type da_primitives::kate_commitment::v2::KateCommitment=serde::Deserialize \ - --derive-for-type da_primitives::kate_commitment::v2::KateCommitment=Default \ - --derive-for-type da_primitives::asdr::data_lookup::DataLookup=serde::Serialize \ - --derive-for-type da_primitives::asdr::data_lookup::DataLookup=serde::Deserialize \ - --derive-for-type da_primitives::asdr::data_lookup::DataLookup=Default \ - --derive-for-type da_primitives::asdr::data_lookup::DataLookupIndexItem=serde::Serialize \ - --derive-for-type da_primitives::asdr::data_lookup::DataLookupIndexItem=serde::Deserialize \ - --derive-for-type da_primitives::asdr::AppId=serde::Serialize \ - --derive-for-type da_primitives::asdr::AppId=serde::Deserialize \ - --derive-for-type da_primitives::asdr::AppId=Default \ - --derive-for-type da_primitives::asdr::AppId=Copy \ - --derive-for-type da_primitives::asdr::AppId=derive_more::From \ + --derive-for-type avail_core::header::extension::HeaderExtension=serde::Serialize \ + --derive-for-type avail_core::header::extension::HeaderExtension=serde::Deserialize \ + --derive-for-type avail_core::header::extension::v1::HeaderExtension=serde::Serialize \ + --derive-for-type avail_core::header::extension::v1::HeaderExtension=serde::Deserialize \ + --derive-for-type avail_core::header::extension::v1::HeaderExtension=Default \ + --derive-for-type avail_core::header::extension::v2::HeaderExtension=serde::Serialize \ + --derive-for-type avail_core::header::extension::v2::HeaderExtension=serde::Deserialize \ + --derive-for-type avail_core::header::extension::v2::HeaderExtension=Default \ + --derive-for-type avail_core::kate_commitment::v1::KateCommitment=serde::Serialize \ + --derive-for-type avail_core::kate_commitment::v1::KateCommitment=serde::Deserialize \ + --derive-for-type avail_core::kate_commitment::v1::KateCommitment=Default \ + --derive-for-type avail_core::kate_commitment::v2::KateCommitment=serde::Serialize \ + --derive-for-type avail_core::kate_commitment::v2::KateCommitment=serde::Deserialize \ + --derive-for-type avail_core::kate_commitment::v2::KateCommitment=Default \ + --derive-for-type avail_core::data_lookup::DataLookup=serde::Serialize \ + --derive-for-type avail_core::data_lookup::DataLookup=serde::Deserialize \ + --derive-for-type avail_core::data_lookup::DataLookup=Default \ + --derive-for-type avail_core::data_lookup::compact::CompactDataLookup=Default \ + --derive-for-type avail_core::data_lookup::compact::CompactDataLookup=serde::Serialize \ + --derive-for-type avail_core::data_lookup::compact::CompactDataLookup=serde::Deserialize \ + --derive-for-type avail_core::data_lookup::compact::DataLookupItem=serde::Serialize \ + --derive-for-type avail_core::data_lookup::compact::DataLookupItem=serde::Deserialize \ + --derive-for-type avail_core::AppId=serde::Serialize \ + --derive-for-type avail_core::AppId=serde::Deserialize \ + --derive-for-type avail_core::AppId=Default \ + --derive-for-type avail_core::AppId=Copy \ + --derive-for-type avail_core::AppId=derive_more::From \ --url http://localhost:9933 \ | sed -En "s/pub struct KateCommitment/#\[serde\(rename_all = \"camelCase\"\)\] \0/p" \ | sed -E '1i \#\[allow(clippy::all)]' \ diff --git a/avail-subxt/examples/accounts_from_mnemonics.rs b/avail-subxt/examples/accounts_from_mnemonics.rs index ce4785d44..47dc4ee27 100644 --- a/avail-subxt/examples/accounts_from_mnemonics.rs +++ b/avail-subxt/examples/accounts_from_mnemonics.rs @@ -1,9 +1,11 @@ use anyhow::Result; use avail_subxt::{api, build_client, primitives::AvailExtrinsicParams, AvailConfig, Opts}; -use sp_core::crypto::Pair as _; -use sp_keyring::sr25519::sr25519::{self, Pair}; use structopt::StructOpt; -use subxt::{tx::PairSigner, utils::MultiAddress}; +use subxt::{ + ext::sp_core::{sr25519::Pair, Pair as _}, + tx::PairSigner, + utils::MultiAddress, +}; /// This example demonstrates using mnemonic seed for generating signer pairs. It creates Alice and Bob /// from seeds, but could also be used for an arbitrary account. @@ -18,9 +20,9 @@ async fn main() -> Result<()> { // Accounts let pair_a = Pair::from_string_with_seed(ALICE_SEED, None).unwrap(); - let signer_a = PairSigner::::new(pair_a.0); + let signer_a = PairSigner::::new(pair_a.0); let pair_b = Pair::from_string_with_seed(BOB_SEED, None).unwrap(); - let signer_b = PairSigner::::new(pair_b.0); + let signer_b = PairSigner::::new(pair_b.0); // Transfer and wait finalized let balance_transfer = api::tx() diff --git a/avail-subxt/examples/da_bridge_actor.rs b/avail-subxt/examples/da_bridge_actor.rs index c214619aa..c0bed109f 100644 --- a/avail-subxt/examples/da_bridge_actor.rs +++ b/avail-subxt/examples/da_bridge_actor.rs @@ -1,7 +1,7 @@ use anyhow::Result; use avail_subxt::{ api::{ - self, data_availability::calls::SubmitData, + self, data_availability::calls::types::SubmitData, runtime_types::sp_core::bounded::bounded_vec::BoundedVec, }, build_client, Opts, @@ -9,14 +9,14 @@ use avail_subxt::{ use sp_keyring::AccountKeyring::Alice; use structopt::StructOpt; use subxt::{ - tx::{PairSigner, StaticTxPayload}, + tx::{PairSigner, Payload}, utils::H160, }; const DESTINATION_DOMAIN: u32 = 1000; const DA_BRIDGE_ROUTER_ADDRESS: &str = "0x3f28a3e66326c3aa494d4f8e9477d1397ee94432"; -fn submit_some_data() -> Result> { +fn submit_some_data() -> Result> { let data = BoundedVec(b"Test Data".to_vec()); let submit_data_tx = api::tx().data_availability().submit_data(data); Ok(submit_data_tx) diff --git a/avail-subxt/src/api_dev.rs b/avail-subxt/src/api_dev.rs index 804d2f72a..f3a5a8a75 100644 --- a/avail-subxt/src/api_dev.rs +++ b/avail-subxt/src/api_dev.rs @@ -2,7 +2,10 @@ #[allow(dead_code, unused_imports, non_camel_case_types)] #[allow(clippy::all)] pub mod api { - use super::api as root_mod; + #[allow(unused_imports)] + mod root_mod { + pub use super::*; + } pub static PALLETS: [&str; 35usize] = [ "System", "Utility", @@ -40,14 +43,21 @@ pub mod api { "VoterList", "NominationPools", ]; + #[doc = r" The error type returned when there is a runtime issue."] + pub type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum Event { #[codec(index = 0)] System(system::Event), @@ -108,3412 +118,2108 @@ pub mod api { #[codec(index = 36)] NominationPools(nomination_pools::Event), } - pub mod system { + impl ::subxt::events::RootEvent for Event { + fn root_event( + pallet_bytes: &[u8], + pallet_name: &str, + pallet_ty: u32, + metadata: &::subxt::Metadata, + ) -> Result { + use ::subxt::metadata::DecodeWithMetadata; + if pallet_name == "System" { + return Ok(Event::System(system::Event::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?)); + } + if pallet_name == "Utility" { + return Ok(Event::Utility(utility::Event::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?)); + } + if pallet_name == "Indices" { + return Ok(Event::Indices(indices::Event::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?)); + } + if pallet_name == "Balances" { + return Ok(Event::Balances(balances::Event::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?)); + } + if pallet_name == "TransactionPayment" { + return Ok(Event::TransactionPayment( + transaction_payment::Event::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?, + )); + } + if pallet_name == "ElectionProviderMultiPhase" { + return Ok(Event::ElectionProviderMultiPhase( + election_provider_multi_phase::Event::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?, + )); + } + if pallet_name == "Staking" { + return Ok(Event::Staking(staking::Event::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?)); + } + if pallet_name == "Session" { + return Ok(Event::Session(session::Event::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?)); + } + if pallet_name == "Democracy" { + return Ok(Event::Democracy(democracy::Event::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?)); + } + if pallet_name == "Council" { + return Ok(Event::Council(council::Event::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?)); + } + if pallet_name == "TechnicalCommittee" { + return Ok(Event::TechnicalCommittee( + technical_committee::Event::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?, + )); + } + if pallet_name == "Elections" { + return Ok(Event::Elections(elections::Event::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?)); + } + if pallet_name == "TechnicalMembership" { + return Ok(Event::TechnicalMembership( + technical_membership::Event::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?, + )); + } + if pallet_name == "Grandpa" { + return Ok(Event::Grandpa(grandpa::Event::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?)); + } + if pallet_name == "Treasury" { + return Ok(Event::Treasury(treasury::Event::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?)); + } + if pallet_name == "Sudo" { + return Ok(Event::Sudo(sudo::Event::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?)); + } + if pallet_name == "ImOnline" { + return Ok(Event::ImOnline(im_online::Event::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?)); + } + if pallet_name == "Offences" { + return Ok(Event::Offences(offences::Event::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?)); + } + if pallet_name == "Scheduler" { + return Ok(Event::Scheduler(scheduler::Event::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?)); + } + if pallet_name == "Bounties" { + return Ok(Event::Bounties(bounties::Event::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?)); + } + if pallet_name == "Tips" { + return Ok(Event::Tips(tips::Event::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?)); + } + if pallet_name == "DataAvailability" { + return Ok(Event::DataAvailability( + data_availability::Event::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?, + )); + } + if pallet_name == "NomadUpdaterManager" { + return Ok(Event::NomadUpdaterManager( + nomad_updater_manager::Event::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?, + )); + } + if pallet_name == "NomadHome" { + return Ok(Event::NomadHome(nomad_home::Event::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?)); + } + if pallet_name == "NomadDABridge" { + return Ok(Event::NomadDABridge( + nomad_da_bridge::Event::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?, + )); + } + if pallet_name == "Preimage" { + return Ok(Event::Preimage(preimage::Event::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?)); + } + if pallet_name == "Multisig" { + return Ok(Event::Multisig(multisig::Event::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?)); + } + if pallet_name == "VoterList" { + return Ok(Event::VoterList(voter_list::Event::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?)); + } + if pallet_name == "NominationPools" { + return Ok(Event::NominationPools( + nomination_pools::Event::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?, + )); + } + Err(::subxt::ext::scale_decode::Error::custom(format!( + "Pallet name '{}' not found in root Event enum", + pallet_name + )) + .into()) + } + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum Call { + #[codec(index = 0)] + System(system::Call), + #[codec(index = 1)] + Utility(utility::Call), + #[codec(index = 2)] + Babe(babe::Call), + #[codec(index = 3)] + Timestamp(timestamp::Call), + #[codec(index = 4)] + Authorship(authorship::Call), + #[codec(index = 5)] + Indices(indices::Call), + #[codec(index = 6)] + Balances(balances::Call), + #[codec(index = 9)] + ElectionProviderMultiPhase(election_provider_multi_phase::Call), + #[codec(index = 10)] + Staking(staking::Call), + #[codec(index = 11)] + Session(session::Call), + #[codec(index = 12)] + Democracy(democracy::Call), + #[codec(index = 13)] + Council(council::Call), + #[codec(index = 14)] + TechnicalCommittee(technical_committee::Call), + #[codec(index = 15)] + Elections(elections::Call), + #[codec(index = 16)] + TechnicalMembership(technical_membership::Call), + #[codec(index = 17)] + Grandpa(grandpa::Call), + #[codec(index = 18)] + Treasury(treasury::Call), + #[codec(index = 19)] + Sudo(sudo::Call), + #[codec(index = 20)] + ImOnline(im_online::Call), + #[codec(index = 24)] + Scheduler(scheduler::Call), + #[codec(index = 25)] + Bounties(bounties::Call), + #[codec(index = 26)] + Tips(tips::Call), + #[codec(index = 29)] + DataAvailability(data_availability::Call), + #[codec(index = 30)] + NomadUpdaterManager(nomad_updater_manager::Call), + #[codec(index = 31)] + NomadHome(nomad_home::Call), + #[codec(index = 32)] + NomadDABridge(nomad_da_bridge::Call), + #[codec(index = 33)] + Preimage(preimage::Call), + #[codec(index = 34)] + Multisig(multisig::Call), + #[codec(index = 35)] + VoterList(voter_list::Call), + #[codec(index = 36)] + NominationPools(nomination_pools::Call), + } + impl ::subxt::blocks::RootExtrinsic for Call { + fn root_extrinsic( + pallet_bytes: &[u8], + pallet_name: &str, + pallet_ty: u32, + metadata: &::subxt::Metadata, + ) -> Result { + use ::subxt::metadata::DecodeWithMetadata; + if pallet_name == "System" { + return Ok(Call::System(system::Call::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?)); + } + if pallet_name == "Utility" { + return Ok(Call::Utility(utility::Call::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?)); + } + if pallet_name == "Babe" { + return Ok(Call::Babe(babe::Call::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?)); + } + if pallet_name == "Timestamp" { + return Ok(Call::Timestamp(timestamp::Call::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?)); + } + if pallet_name == "Authorship" { + return Ok(Call::Authorship(authorship::Call::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?)); + } + if pallet_name == "Indices" { + return Ok(Call::Indices(indices::Call::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?)); + } + if pallet_name == "Balances" { + return Ok(Call::Balances(balances::Call::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?)); + } + if pallet_name == "ElectionProviderMultiPhase" { + return Ok(Call::ElectionProviderMultiPhase( + election_provider_multi_phase::Call::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?, + )); + } + if pallet_name == "Staking" { + return Ok(Call::Staking(staking::Call::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?)); + } + if pallet_name == "Session" { + return Ok(Call::Session(session::Call::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?)); + } + if pallet_name == "Democracy" { + return Ok(Call::Democracy(democracy::Call::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?)); + } + if pallet_name == "Council" { + return Ok(Call::Council(council::Call::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?)); + } + if pallet_name == "TechnicalCommittee" { + return Ok(Call::TechnicalCommittee( + technical_committee::Call::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?, + )); + } + if pallet_name == "Elections" { + return Ok(Call::Elections(elections::Call::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?)); + } + if pallet_name == "TechnicalMembership" { + return Ok(Call::TechnicalMembership( + technical_membership::Call::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?, + )); + } + if pallet_name == "Grandpa" { + return Ok(Call::Grandpa(grandpa::Call::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?)); + } + if pallet_name == "Treasury" { + return Ok(Call::Treasury(treasury::Call::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?)); + } + if pallet_name == "Sudo" { + return Ok(Call::Sudo(sudo::Call::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?)); + } + if pallet_name == "ImOnline" { + return Ok(Call::ImOnline(im_online::Call::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?)); + } + if pallet_name == "Scheduler" { + return Ok(Call::Scheduler(scheduler::Call::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?)); + } + if pallet_name == "Bounties" { + return Ok(Call::Bounties(bounties::Call::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?)); + } + if pallet_name == "Tips" { + return Ok(Call::Tips(tips::Call::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?)); + } + if pallet_name == "DataAvailability" { + return Ok(Call::DataAvailability( + data_availability::Call::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?, + )); + } + if pallet_name == "NomadUpdaterManager" { + return Ok(Call::NomadUpdaterManager( + nomad_updater_manager::Call::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?, + )); + } + if pallet_name == "NomadHome" { + return Ok(Call::NomadHome(nomad_home::Call::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?)); + } + if pallet_name == "NomadDABridge" { + return Ok(Call::NomadDABridge( + nomad_da_bridge::Call::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?, + )); + } + if pallet_name == "Preimage" { + return Ok(Call::Preimage(preimage::Call::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?)); + } + if pallet_name == "Multisig" { + return Ok(Call::Multisig(multisig::Call::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?)); + } + if pallet_name == "VoterList" { + return Ok(Call::VoterList(voter_list::Call::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?)); + } + if pallet_name == "NominationPools" { + return Ok(Call::NominationPools( + nomination_pools::Call::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?, + )); + } + Err(::subxt::ext::scale_decode::Error::custom(format!( + "Pallet name '{}' not found in root Call enum", + pallet_name + )) + .into()) + } + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum Error { + #[codec(index = 0)] + System(system::Error), + #[codec(index = 1)] + Utility(utility::Error), + #[codec(index = 2)] + Babe(babe::Error), + #[codec(index = 4)] + Authorship(authorship::Error), + #[codec(index = 5)] + Indices(indices::Error), + #[codec(index = 6)] + Balances(balances::Error), + #[codec(index = 9)] + ElectionProviderMultiPhase(election_provider_multi_phase::Error), + #[codec(index = 10)] + Staking(staking::Error), + #[codec(index = 11)] + Session(session::Error), + #[codec(index = 12)] + Democracy(democracy::Error), + #[codec(index = 13)] + Council(council::Error), + #[codec(index = 14)] + TechnicalCommittee(technical_committee::Error), + #[codec(index = 15)] + Elections(elections::Error), + #[codec(index = 16)] + TechnicalMembership(technical_membership::Error), + #[codec(index = 17)] + Grandpa(grandpa::Error), + #[codec(index = 18)] + Treasury(treasury::Error), + #[codec(index = 19)] + Sudo(sudo::Error), + #[codec(index = 20)] + ImOnline(im_online::Error), + #[codec(index = 24)] + Scheduler(scheduler::Error), + #[codec(index = 25)] + Bounties(bounties::Error), + #[codec(index = 26)] + Tips(tips::Error), + #[codec(index = 29)] + DataAvailability(data_availability::Error), + #[codec(index = 30)] + NomadUpdaterManager(nomad_updater_manager::Error), + #[codec(index = 31)] + NomadHome(nomad_home::Error), + #[codec(index = 32)] + NomadDABridge(nomad_da_bridge::Error), + #[codec(index = 33)] + Preimage(preimage::Error), + #[codec(index = 34)] + Multisig(multisig::Error), + #[codec(index = 35)] + VoterList(voter_list::Error), + #[codec(index = 36)] + NominationPools(nomination_pools::Error), + } + impl ::subxt::error::RootError for Error { + fn root_error( + pallet_bytes: &[u8], + pallet_name: &str, + metadata: &::subxt::Metadata, + ) -> Result { + use ::subxt::metadata::DecodeWithMetadata; + let cursor = &mut &pallet_bytes[..]; + if pallet_name == "System" { + let variant_error = system::Error::decode_with_metadata(cursor, 123u32, metadata)?; + return Ok(Error::System(variant_error)); + } + if pallet_name == "Utility" { + let variant_error = utility::Error::decode_with_metadata(cursor, 285u32, metadata)?; + return Ok(Error::Utility(variant_error)); + } + if pallet_name == "Babe" { + let variant_error = babe::Error::decode_with_metadata(cursor, 297u32, metadata)?; + return Ok(Error::Babe(variant_error)); + } + if pallet_name == "Authorship" { + let variant_error = + authorship::Error::decode_with_metadata(cursor, 301u32, metadata)?; + return Ok(Error::Authorship(variant_error)); + } + if pallet_name == "Indices" { + let variant_error = indices::Error::decode_with_metadata(cursor, 303u32, metadata)?; + return Ok(Error::Indices(variant_error)); + } + if pallet_name == "Balances" { + let variant_error = + balances::Error::decode_with_metadata(cursor, 311u32, metadata)?; + return Ok(Error::Balances(variant_error)); + } + if pallet_name == "ElectionProviderMultiPhase" { + let variant_error = election_provider_multi_phase::Error::decode_with_metadata( + cursor, 324u32, metadata, + )?; + return Ok(Error::ElectionProviderMultiPhase(variant_error)); + } + if pallet_name == "Staking" { + let variant_error = staking::Error::decode_with_metadata(cursor, 345u32, metadata)?; + return Ok(Error::Staking(variant_error)); + } + if pallet_name == "Session" { + let variant_error = session::Error::decode_with_metadata(cursor, 350u32, metadata)?; + return Ok(Error::Session(variant_error)); + } + if pallet_name == "Democracy" { + let variant_error = + democracy::Error::decode_with_metadata(cursor, 368u32, metadata)?; + return Ok(Error::Democracy(variant_error)); + } + if pallet_name == "Council" { + let variant_error = council::Error::decode_with_metadata(cursor, 371u32, metadata)?; + return Ok(Error::Council(variant_error)); + } + if pallet_name == "TechnicalCommittee" { + let variant_error = + technical_committee::Error::decode_with_metadata(cursor, 373u32, metadata)?; + return Ok(Error::TechnicalCommittee(variant_error)); + } + if pallet_name == "Elections" { + let variant_error = + elections::Error::decode_with_metadata(cursor, 377u32, metadata)?; + return Ok(Error::Elections(variant_error)); + } + if pallet_name == "TechnicalMembership" { + let variant_error = + technical_membership::Error::decode_with_metadata(cursor, 379u32, metadata)?; + return Ok(Error::TechnicalMembership(variant_error)); + } + if pallet_name == "Grandpa" { + let variant_error = grandpa::Error::decode_with_metadata(cursor, 383u32, metadata)?; + return Ok(Error::Grandpa(variant_error)); + } + if pallet_name == "Treasury" { + let variant_error = + treasury::Error::decode_with_metadata(cursor, 389u32, metadata)?; + return Ok(Error::Treasury(variant_error)); + } + if pallet_name == "Sudo" { + let variant_error = sudo::Error::decode_with_metadata(cursor, 390u32, metadata)?; + return Ok(Error::Sudo(variant_error)); + } + if pallet_name == "ImOnline" { + let variant_error = + im_online::Error::decode_with_metadata(cursor, 398u32, metadata)?; + return Ok(Error::ImOnline(variant_error)); + } + if pallet_name == "Scheduler" { + let variant_error = + scheduler::Error::decode_with_metadata(cursor, 408u32, metadata)?; + return Ok(Error::Scheduler(variant_error)); + } + if pallet_name == "Bounties" { + let variant_error = + bounties::Error::decode_with_metadata(cursor, 412u32, metadata)?; + return Ok(Error::Bounties(variant_error)); + } + if pallet_name == "Tips" { + let variant_error = tips::Error::decode_with_metadata(cursor, 414u32, metadata)?; + return Ok(Error::Tips(variant_error)); + } + if pallet_name == "DataAvailability" { + let variant_error = + data_availability::Error::decode_with_metadata(cursor, 416u32, metadata)?; + return Ok(Error::DataAvailability(variant_error)); + } + if pallet_name == "NomadUpdaterManager" { + let variant_error = + nomad_updater_manager::Error::decode_with_metadata(cursor, 417u32, metadata)?; + return Ok(Error::NomadUpdaterManager(variant_error)); + } + if pallet_name == "NomadHome" { + let variant_error = + nomad_home::Error::decode_with_metadata(cursor, 422u32, metadata)?; + return Ok(Error::NomadHome(variant_error)); + } + if pallet_name == "NomadDABridge" { + let variant_error = + nomad_da_bridge::Error::decode_with_metadata(cursor, 423u32, metadata)?; + return Ok(Error::NomadDABridge(variant_error)); + } + if pallet_name == "Preimage" { + let variant_error = + preimage::Error::decode_with_metadata(cursor, 427u32, metadata)?; + return Ok(Error::Preimage(variant_error)); + } + if pallet_name == "Multisig" { + let variant_error = + multisig::Error::decode_with_metadata(cursor, 431u32, metadata)?; + return Ok(Error::Multisig(variant_error)); + } + if pallet_name == "VoterList" { + let variant_error = + voter_list::Error::decode_with_metadata(cursor, 435u32, metadata)?; + return Ok(Error::VoterList(variant_error)); + } + if pallet_name == "NominationPools" { + let variant_error = + nomination_pools::Error::decode_with_metadata(cursor, 452u32, metadata)?; + return Ok(Error::NominationPools(variant_error)); + } + Err(::subxt::ext::scale_decode::Error::custom(format!( + "Pallet name '{}' not found in root Error enum", + pallet_name + )) + .into()) + } + } + pub fn constants() -> ConstantsApi { ConstantsApi } + pub fn storage() -> StorageApi { StorageApi } + pub fn tx() -> TransactionApi { TransactionApi } + pub fn apis() -> runtime_apis::RuntimeApi { runtime_apis::RuntimeApi } + pub mod runtime_apis { + use ::subxt::ext::codec::Encode; + use super::{root_mod, runtime_types}; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::{root_mod, runtime_types}; - type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Remark { - pub remark: ::std::vec::Vec<::core::primitive::u8>, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct SetHeapPages { - pub pages: ::core::primitive::u64, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct SetCode { - pub code: ::std::vec::Vec<::core::primitive::u8>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct SetCodeWithoutChecks { - pub code: ::std::vec::Vec<::core::primitive::u8>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct SetStorage { - pub items: ::std::vec::Vec<( - ::std::vec::Vec<::core::primitive::u8>, - ::std::vec::Vec<::core::primitive::u8>, - )>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct KillStorage { - pub keys: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct KillPrefix { - pub prefix: ::std::vec::Vec<::core::primitive::u8>, - pub subkeys: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct RemarkWithEvent { - pub remark: ::std::vec::Vec<::core::primitive::u8>, - } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Make some on-chain remark."] - #[doc = ""] - #[doc = "# "] - #[doc = "- `O(1)`"] - #[doc = "# "] - pub fn remark( - &self, - remark: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new("System", "remark", Remark { remark }, [ - 101u8, 80u8, 195u8, 226u8, 224u8, 247u8, 60u8, 128u8, 3u8, 101u8, 51u8, - 147u8, 96u8, 126u8, 76u8, 230u8, 194u8, 227u8, 191u8, 73u8, 160u8, 146u8, - 87u8, 147u8, 243u8, 28u8, 228u8, 116u8, 224u8, 181u8, 129u8, 160u8, - ]) - } + pub struct RuntimeApi; + impl RuntimeApi {} + } + pub struct ConstantsApi; + impl ConstantsApi { + pub fn system(&self) -> system::constants::ConstantsApi { system::constants::ConstantsApi } - #[doc = "Set the number of pages in the WebAssembly environment's heap."] - pub fn set_heap_pages( - &self, - pages: ::core::primitive::u64, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "System", - "set_heap_pages", - SetHeapPages { pages }, - [ - 43u8, 103u8, 128u8, 49u8, 156u8, 136u8, 11u8, 204u8, 80u8, 6u8, 244u8, - 86u8, 171u8, 44u8, 140u8, 225u8, 142u8, 198u8, 43u8, 87u8, 26u8, 45u8, - 125u8, 222u8, 165u8, 254u8, 172u8, 158u8, 39u8, 178u8, 86u8, 87u8, - ], - ) - } + pub fn utility(&self) -> utility::constants::ConstantsApi { + utility::constants::ConstantsApi + } - #[doc = "Set the new runtime code."] - #[doc = ""] - #[doc = "# "] - #[doc = "- `O(C + S)` where `C` length of `code` and `S` complexity of `can_set_code`"] - #[doc = "- 1 call to `can_set_code`: `O(S)` (calls `sp_io::misc::runtime_version` which is"] - #[doc = " expensive)."] - #[doc = "- 1 storage write (codec `O(C)`)."] - #[doc = "- 1 digest item."] - #[doc = "- 1 event."] - #[doc = "The weight of this function is dependent on the runtime, but generally this is very"] - #[doc = "expensive. We will treat this as a full block."] - #[doc = "# "] - pub fn set_code( - &self, - code: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new("System", "set_code", SetCode { code }, [ - 27u8, 104u8, 244u8, 205u8, 188u8, 254u8, 121u8, 13u8, 106u8, 120u8, 244u8, - 108u8, 97u8, 84u8, 100u8, 68u8, 26u8, 69u8, 93u8, 128u8, 107u8, 4u8, 3u8, - 142u8, 13u8, 134u8, 196u8, 62u8, 113u8, 181u8, 14u8, 40u8, - ]) - } + pub fn babe(&self) -> babe::constants::ConstantsApi { babe::constants::ConstantsApi } - #[doc = "Set the new runtime code without doing any checks of the given `code`."] - #[doc = ""] - #[doc = "# "] - #[doc = "- `O(C)` where `C` length of `code`"] - #[doc = "- 1 storage write (codec `O(C)`)."] - #[doc = "- 1 digest item."] - #[doc = "- 1 event."] - #[doc = "The weight of this function is dependent on the runtime. We will treat this as a full"] - #[doc = "block. # "] - pub fn set_code_without_checks( - &self, - code: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "System", - "set_code_without_checks", - SetCodeWithoutChecks { code }, - [ - 102u8, 160u8, 125u8, 235u8, 30u8, 23u8, 45u8, 239u8, 112u8, 148u8, - 159u8, 158u8, 42u8, 93u8, 206u8, 94u8, 80u8, 250u8, 66u8, 195u8, 60u8, - 40u8, 142u8, 169u8, 183u8, 80u8, 80u8, 96u8, 3u8, 231u8, 99u8, 216u8, - ], - ) - } + pub fn timestamp(&self) -> timestamp::constants::ConstantsApi { + timestamp::constants::ConstantsApi + } - #[doc = "Set some items of storage."] - pub fn set_storage( - &self, - items: ::std::vec::Vec<( - ::std::vec::Vec<::core::primitive::u8>, - ::std::vec::Vec<::core::primitive::u8>, - )>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "System", - "set_storage", - SetStorage { items }, - [ - 74u8, 43u8, 106u8, 255u8, 50u8, 151u8, 192u8, 155u8, 14u8, 90u8, 19u8, - 45u8, 165u8, 16u8, 235u8, 242u8, 21u8, 131u8, 33u8, 172u8, 119u8, 78u8, - 140u8, 10u8, 107u8, 202u8, 122u8, 235u8, 181u8, 191u8, 22u8, 116u8, - ], - ) - } + pub fn authorship(&self) -> authorship::constants::ConstantsApi { + authorship::constants::ConstantsApi + } - #[doc = "Kill some items from storage."] - pub fn kill_storage( - &self, - keys: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "System", - "kill_storage", - KillStorage { keys }, - [ - 174u8, 174u8, 13u8, 174u8, 75u8, 138u8, 128u8, 235u8, 222u8, 216u8, - 85u8, 18u8, 198u8, 1u8, 138u8, 70u8, 19u8, 108u8, 209u8, 41u8, 228u8, - 67u8, 130u8, 230u8, 160u8, 207u8, 11u8, 180u8, 139u8, 242u8, 41u8, - 15u8, - ], - ) - } + pub fn indices(&self) -> indices::constants::ConstantsApi { + indices::constants::ConstantsApi + } - #[doc = "Kill all storage items with a key that starts with the given prefix."] - #[doc = ""] - #[doc = "**NOTE:** We rely on the Root origin to provide us the number of subkeys under"] - #[doc = "the prefix we are removing to accurately calculate the weight of this function."] - pub fn kill_prefix( - &self, - prefix: ::std::vec::Vec<::core::primitive::u8>, - subkeys: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "System", - "kill_prefix", - KillPrefix { prefix, subkeys }, - [ - 203u8, 116u8, 217u8, 42u8, 154u8, 215u8, 77u8, 217u8, 13u8, 22u8, - 193u8, 2u8, 128u8, 115u8, 179u8, 115u8, 187u8, 218u8, 129u8, 34u8, - 80u8, 4u8, 173u8, 120u8, 92u8, 35u8, 237u8, 112u8, 201u8, 207u8, 200u8, - 48u8, - ], - ) - } + pub fn balances(&self) -> balances::constants::ConstantsApi { + balances::constants::ConstantsApi + } - #[doc = "Make some on-chain remark and emit event."] - pub fn remark_with_event( - &self, - remark: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "System", - "remark_with_event", - RemarkWithEvent { remark }, - [ - 123u8, 225u8, 180u8, 179u8, 144u8, 74u8, 27u8, 85u8, 101u8, 75u8, - 134u8, 44u8, 181u8, 25u8, 183u8, 158u8, 14u8, 213u8, 56u8, 225u8, - 136u8, 88u8, 26u8, 114u8, 178u8, 43u8, 176u8, 43u8, 240u8, 84u8, 116u8, - 46u8, - ], - ) - } - } + pub fn transaction_payment(&self) -> transaction_payment::constants::ConstantsApi { + transaction_payment::constants::ConstantsApi } - #[doc = "Event for the System pallet."] - pub type Event = runtime_types::frame_system::pallet::Event; - pub mod events { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "An extrinsic completed successfully."] - pub struct ExtrinsicSuccess { - pub dispatch_info: runtime_types::frame_support::dispatch::DispatchInfo, - } - impl ::subxt::events::StaticEvent for ExtrinsicSuccess { - const EVENT: &'static str = "ExtrinsicSuccess"; - const PALLET: &'static str = "System"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "An extrinsic failed."] - pub struct ExtrinsicFailed { - pub dispatch_error: runtime_types::sp_runtime::DispatchError, - pub dispatch_info: runtime_types::frame_support::dispatch::DispatchInfo, - } - impl ::subxt::events::StaticEvent for ExtrinsicFailed { - const EVENT: &'static str = "ExtrinsicFailed"; - const PALLET: &'static str = "System"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "`:code` was updated."] - pub struct CodeUpdated; - impl ::subxt::events::StaticEvent for CodeUpdated { - const EVENT: &'static str = "CodeUpdated"; - const PALLET: &'static str = "System"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "A new account was created."] - pub struct NewAccount { - pub account: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for NewAccount { - const EVENT: &'static str = "NewAccount"; - const PALLET: &'static str = "System"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "An account was reaped."] - pub struct KilledAccount { - pub account: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for KilledAccount { - const EVENT: &'static str = "KilledAccount"; - const PALLET: &'static str = "System"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "On on-chain remark happened."] - pub struct Remarked { - pub sender: ::subxt::utils::AccountId32, - pub hash: ::subxt::utils::H256, - } - impl ::subxt::events::StaticEvent for Remarked { - const EVENT: &'static str = "Remarked"; - const PALLET: &'static str = "System"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "On on-chain remark happend called by Root."] - pub struct RemarkedByRoot { - pub hash: ::subxt::utils::H256, - } - impl ::subxt::events::StaticEvent for RemarkedByRoot { - const EVENT: &'static str = "RemarkedByRoot"; - const PALLET: &'static str = "System"; - } + + pub fn election_provider_multi_phase( + &self, + ) -> election_provider_multi_phase::constants::ConstantsApi { + election_provider_multi_phase::constants::ConstantsApi } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " The full account information for a particular account ID."] - pub fn account( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::frame_system::AccountInfo< - ::core::primitive::u32, - runtime_types::pallet_balances::AccountData<::core::primitive::u128>, - >, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "System", - "Account", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Blake2_128Concat, - )], - [ - 176u8, 187u8, 21u8, 220u8, 159u8, 204u8, 127u8, 14u8, 21u8, 69u8, 77u8, - 114u8, 230u8, 141u8, 107u8, 79u8, 23u8, 16u8, 174u8, 243u8, 252u8, - 42u8, 65u8, 120u8, 229u8, 38u8, 210u8, 255u8, 22u8, 40u8, 109u8, 223u8, - ], - ) - } - #[doc = " The full account information for a particular account ID."] - pub fn account_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::frame_system::AccountInfo< - ::core::primitive::u32, - runtime_types::pallet_balances::AccountData<::core::primitive::u128>, - >, - >, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "System", - "Account", - Vec::new(), - [ - 176u8, 187u8, 21u8, 220u8, 159u8, 204u8, 127u8, 14u8, 21u8, 69u8, 77u8, - 114u8, 230u8, 141u8, 107u8, 79u8, 23u8, 16u8, 174u8, 243u8, 252u8, - 42u8, 65u8, 120u8, 229u8, 38u8, 210u8, 255u8, 22u8, 40u8, 109u8, 223u8, - ], - ) - } + pub fn staking(&self) -> staking::constants::ConstantsApi { + staking::constants::ConstantsApi + } - #[doc = " Total extrinsics count for the current block."] - pub fn extrinsic_count( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "System", - "ExtrinsicCount", - vec![], - [ - 223u8, 60u8, 201u8, 120u8, 36u8, 44u8, 180u8, 210u8, 242u8, 53u8, - 222u8, 154u8, 123u8, 176u8, 249u8, 8u8, 225u8, 28u8, 232u8, 4u8, 136u8, - 41u8, 151u8, 82u8, 189u8, 149u8, 49u8, 166u8, 139u8, 9u8, 163u8, 231u8, - ], - ) - } + pub fn democracy(&self) -> democracy::constants::ConstantsApi { + democracy::constants::ConstantsApi + } - #[doc = " The current weight for the block."] - pub fn block_weight( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::frame_support::dispatch::PerDispatchClass< - runtime_types::sp_weights::weight_v2::Weight, - >, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "System", - "BlockWeight", - vec![], - [ - 120u8, 67u8, 71u8, 163u8, 36u8, 202u8, 52u8, 106u8, 143u8, 155u8, - 144u8, 87u8, 142u8, 241u8, 232u8, 183u8, 56u8, 235u8, 27u8, 237u8, - 20u8, 202u8, 33u8, 85u8, 189u8, 0u8, 28u8, 52u8, 198u8, 40u8, 219u8, - 54u8, - ], - ) - } + pub fn elections(&self) -> elections::constants::ConstantsApi { + elections::constants::ConstantsApi + } - #[doc = " Total length (in bytes) for all extrinsics put together, for the current block."] - pub fn all_extrinsics_len( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "System", - "AllExtrinsicsLen", - vec![], - [ - 139u8, 123u8, 64u8, 5u8, 243u8, 234u8, 235u8, 6u8, 225u8, 27u8, 65u8, - 41u8, 104u8, 177u8, 170u8, 192u8, 102u8, 111u8, 87u8, 192u8, 111u8, - 233u8, 122u8, 148u8, 45u8, 172u8, 30u8, 173u8, 155u8, 45u8, 196u8, - 233u8, - ], - ) - } + pub fn grandpa(&self) -> grandpa::constants::ConstantsApi { + grandpa::constants::ConstantsApi + } - #[doc = " Map of block numbers to block hashes."] - pub fn block_hash( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::subxt::utils::H256>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "System", - "BlockHash", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], - [ - 50u8, 112u8, 176u8, 239u8, 175u8, 18u8, 205u8, 20u8, 241u8, 195u8, - 21u8, 228u8, 186u8, 57u8, 200u8, 25u8, 38u8, 44u8, 106u8, 20u8, 168u8, - 80u8, 76u8, 235u8, 12u8, 51u8, 137u8, 149u8, 200u8, 4u8, 220u8, 237u8, - ], - ) - } + pub fn treasury(&self) -> treasury::constants::ConstantsApi { + treasury::constants::ConstantsApi + } - #[doc = " Map of block numbers to block hashes."] - pub fn block_hash_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::subxt::utils::H256>, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "System", - "BlockHash", - Vec::new(), - [ - 50u8, 112u8, 176u8, 239u8, 175u8, 18u8, 205u8, 20u8, 241u8, 195u8, - 21u8, 228u8, 186u8, 57u8, 200u8, 25u8, 38u8, 44u8, 106u8, 20u8, 168u8, - 80u8, 76u8, 235u8, 12u8, 51u8, 137u8, 149u8, 200u8, 4u8, 220u8, 237u8, - ], - ) - } + pub fn im_online(&self) -> im_online::constants::ConstantsApi { + im_online::constants::ConstantsApi + } - #[doc = " Extrinsics data for the current block (maps an extrinsic's index to its data)."] - pub fn extrinsic_data( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::std::vec::Vec<::core::primitive::u8>>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "System", - "ExtrinsicData", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], - [ - 210u8, 224u8, 211u8, 186u8, 118u8, 210u8, 185u8, 194u8, 238u8, 211u8, - 254u8, 73u8, 67u8, 184u8, 31u8, 229u8, 168u8, 125u8, 98u8, 23u8, 241u8, - 59u8, 49u8, 86u8, 126u8, 9u8, 114u8, 163u8, 160u8, 62u8, 50u8, 67u8, - ], - ) - } + pub fn scheduler(&self) -> scheduler::constants::ConstantsApi { + scheduler::constants::ConstantsApi + } - #[doc = " Extrinsics data for the current block (maps an extrinsic's index to its data)."] - pub fn extrinsic_data_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::std::vec::Vec<::core::primitive::u8>>, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "System", - "ExtrinsicData", - Vec::new(), - [ - 210u8, 224u8, 211u8, 186u8, 118u8, 210u8, 185u8, 194u8, 238u8, 211u8, - 254u8, 73u8, 67u8, 184u8, 31u8, 229u8, 168u8, 125u8, 98u8, 23u8, 241u8, - 59u8, 49u8, 86u8, 126u8, 9u8, 114u8, 163u8, 160u8, 62u8, 50u8, 67u8, - ], - ) - } + pub fn bounties(&self) -> bounties::constants::ConstantsApi { + bounties::constants::ConstantsApi + } - #[doc = " The current block number being processed. Set by `execute_block`."] - pub fn number( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "System", - "Number", - vec![], - [ - 228u8, 96u8, 102u8, 190u8, 252u8, 130u8, 239u8, 172u8, 126u8, 235u8, - 246u8, 139u8, 208u8, 15u8, 88u8, 245u8, 141u8, 232u8, 43u8, 204u8, - 36u8, 87u8, 211u8, 141u8, 187u8, 68u8, 236u8, 70u8, 193u8, 235u8, - 164u8, 191u8, - ], - ) - } + pub fn tips(&self) -> tips::constants::ConstantsApi { tips::constants::ConstantsApi } - #[doc = " Hash of the previous block."] - pub fn parent_hash( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::subxt::utils::H256>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "System", - "ParentHash", - vec![], - [ - 232u8, 206u8, 177u8, 119u8, 38u8, 57u8, 233u8, 50u8, 225u8, 49u8, - 169u8, 176u8, 210u8, 51u8, 231u8, 176u8, 234u8, 186u8, 188u8, 112u8, - 15u8, 152u8, 195u8, 232u8, 201u8, 97u8, 208u8, 249u8, 9u8, 163u8, 69u8, - 36u8, - ], - ) - } + pub fn data_availability(&self) -> data_availability::constants::ConstantsApi { + data_availability::constants::ConstantsApi + } - #[doc = " Digest of the current block, also part of the block header."] - pub fn digest( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_runtime::generic::digest::Digest, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "System", - "Digest", - vec![], - [ - 83u8, 141u8, 200u8, 132u8, 182u8, 55u8, 197u8, 122u8, 13u8, 159u8, - 31u8, 42u8, 60u8, 191u8, 89u8, 221u8, 242u8, 47u8, 199u8, 213u8, 48u8, - 216u8, 131u8, 168u8, 245u8, 82u8, 56u8, 190u8, 62u8, 69u8, 96u8, 37u8, - ], - ) - } + pub fn nomad_home(&self) -> nomad_home::constants::ConstantsApi { + nomad_home::constants::ConstantsApi + } - #[doc = " Events deposited for the current block."] - #[doc = ""] - #[doc = " NOTE: The item is unbound and should therefore never be read on chain."] - #[doc = " It could otherwise inflate the PoV size of a block."] - #[doc = ""] - #[doc = " Events have a large in-memory size. Box the events to not go out-of-memory"] - #[doc = " just in case someone still reads them from within the runtime."] - pub fn events( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec< - runtime_types::frame_system::EventRecord< - runtime_types::da_runtime::RuntimeEvent, - ::subxt::utils::H256, - >, - >, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "System", - "Events", - vec![], - [ - 177u8, 107u8, 59u8, 88u8, 183u8, 151u8, 63u8, 47u8, 12u8, 138u8, 108u8, - 34u8, 216u8, 201u8, 139u8, 64u8, 221u8, 49u8, 69u8, 193u8, 228u8, 21u8, - 136u8, 238u8, 70u8, 204u8, 50u8, 247u8, 96u8, 140u8, 14u8, 198u8, - ], - ) - } + pub fn nomad_da_bridge(&self) -> nomad_da_bridge::constants::ConstantsApi { + nomad_da_bridge::constants::ConstantsApi + } - #[doc = " The number of events in the `Events` list."] - pub fn event_count( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "System", - "EventCount", - vec![], - [ - 236u8, 93u8, 90u8, 177u8, 250u8, 211u8, 138u8, 187u8, 26u8, 208u8, - 203u8, 113u8, 221u8, 233u8, 227u8, 9u8, 249u8, 25u8, 202u8, 185u8, - 161u8, 144u8, 167u8, 104u8, 127u8, 187u8, 38u8, 18u8, 52u8, 61u8, 66u8, - 112u8, - ], - ) - } + pub fn multisig(&self) -> multisig::constants::ConstantsApi { + multisig::constants::ConstantsApi + } - #[doc = " Mapping between a topic (represented by T::Hash) and a vector of indexes"] - #[doc = " of events in the `>` list."] - #[doc = ""] - #[doc = " All topic vectors have deterministic storage locations depending on the topic. This"] - #[doc = " allows light-clients to leverage the changes trie storage tracking mechanism and"] - #[doc = " in case of changes fetch the list of events of interest."] - #[doc = ""] - #[doc = " The value has the type `(T::BlockNumber, EventIndex)` because if we used only just"] - #[doc = " the `EventIndex` then in case if the topic has the same contents on the next block"] - #[doc = " no notification will be triggered thus the event might be lost."] - pub fn event_topics( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec<(::core::primitive::u32, ::core::primitive::u32)>, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "System", - "EventTopics", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Blake2_128Concat, - )], - [ - 205u8, 90u8, 142u8, 190u8, 176u8, 37u8, 94u8, 82u8, 98u8, 1u8, 129u8, - 63u8, 246u8, 101u8, 130u8, 58u8, 216u8, 16u8, 139u8, 196u8, 154u8, - 111u8, 110u8, 178u8, 24u8, 44u8, 183u8, 176u8, 232u8, 82u8, 223u8, - 38u8, - ], - ) - } + pub fn voter_list(&self) -> voter_list::constants::ConstantsApi { + voter_list::constants::ConstantsApi + } - #[doc = " Mapping between a topic (represented by T::Hash) and a vector of indexes"] - #[doc = " of events in the `>` list."] - #[doc = ""] - #[doc = " All topic vectors have deterministic storage locations depending on the topic. This"] - #[doc = " allows light-clients to leverage the changes trie storage tracking mechanism and"] - #[doc = " in case of changes fetch the list of events of interest."] - #[doc = ""] - #[doc = " The value has the type `(T::BlockNumber, EventIndex)` because if we used only just"] - #[doc = " the `EventIndex` then in case if the topic has the same contents on the next block"] - #[doc = " no notification will be triggered thus the event might be lost."] - pub fn event_topics_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec<(::core::primitive::u32, ::core::primitive::u32)>, - >, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "System", - "EventTopics", - Vec::new(), - [ - 205u8, 90u8, 142u8, 190u8, 176u8, 37u8, 94u8, 82u8, 98u8, 1u8, 129u8, - 63u8, 246u8, 101u8, 130u8, 58u8, 216u8, 16u8, 139u8, 196u8, 154u8, - 111u8, 110u8, 178u8, 24u8, 44u8, 183u8, 176u8, 232u8, 82u8, 223u8, - 38u8, - ], - ) - } + pub fn nomination_pools(&self) -> nomination_pools::constants::ConstantsApi { + nomination_pools::constants::ConstantsApi + } + } + pub struct StorageApi; + impl StorageApi { + pub fn system(&self) -> system::storage::StorageApi { system::storage::StorageApi } - #[doc = " Stores the `spec_version` and `spec_name` of when the last runtime upgrade happened."] - pub fn last_runtime_upgrade( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::frame_system::LastRuntimeUpgradeInfo, - >, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "System", - "LastRuntimeUpgrade", - vec![], - [ - 52u8, 37u8, 117u8, 111u8, 57u8, 130u8, 196u8, 14u8, 99u8, 77u8, 91u8, - 126u8, 178u8, 249u8, 78u8, 34u8, 9u8, 194u8, 92u8, 105u8, 113u8, 81u8, - 185u8, 127u8, 245u8, 184u8, 60u8, 29u8, 234u8, 182u8, 96u8, 196u8, - ], - ) - } + pub fn babe(&self) -> babe::storage::StorageApi { babe::storage::StorageApi } - #[doc = " True if we have upgraded so that `type RefCount` is `u32`. False (default) if not."] - pub fn upgraded_to_u32_ref_count( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::bool>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "System", - "UpgradedToU32RefCount", - vec![], - [ - 171u8, 88u8, 244u8, 92u8, 122u8, 67u8, 27u8, 18u8, 59u8, 175u8, 175u8, - 178u8, 20u8, 150u8, 213u8, 59u8, 222u8, 141u8, 32u8, 107u8, 3u8, 114u8, - 83u8, 250u8, 180u8, 233u8, 152u8, 54u8, 187u8, 99u8, 131u8, 204u8, - ], - ) - } + pub fn timestamp(&self) -> timestamp::storage::StorageApi { timestamp::storage::StorageApi } - #[doc = " True if we have upgraded so that AccountInfo contains three types of `RefCount`. False"] - #[doc = " (default) if not."] - pub fn upgraded_to_triple_ref_count( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::bool>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "System", - "UpgradedToTripleRefCount", - vec![], - [ - 90u8, 33u8, 56u8, 86u8, 90u8, 101u8, 89u8, 133u8, 203u8, 56u8, 201u8, - 210u8, 244u8, 232u8, 150u8, 18u8, 51u8, 105u8, 14u8, 230u8, 103u8, - 155u8, 246u8, 99u8, 53u8, 207u8, 225u8, 128u8, 186u8, 76u8, 40u8, - 185u8, - ], - ) - } + pub fn authorship(&self) -> authorship::storage::StorageApi { + authorship::storage::StorageApi + } - #[doc = " The execution phase of the block."] - pub fn execution_phase( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "System", - "ExecutionPhase", - vec![], - [ - 230u8, 183u8, 221u8, 135u8, 226u8, 223u8, 55u8, 104u8, 138u8, 224u8, - 103u8, 156u8, 222u8, 99u8, 203u8, 199u8, 164u8, 168u8, 193u8, 133u8, - 201u8, 155u8, 63u8, 95u8, 17u8, 206u8, 165u8, 123u8, 161u8, 33u8, - 172u8, 93u8, - ], - ) - } + pub fn indices(&self) -> indices::storage::StorageApi { indices::storage::StorageApi } - #[doc = " The dynamic block length"] - pub fn dynamic_block_length( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::frame_system::limits::BlockLength, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "System", - "DynamicBlockLength", - vec![], - [ - 41u8, 235u8, 249u8, 191u8, 222u8, 101u8, 12u8, 241u8, 205u8, 177u8, - 72u8, 151u8, 167u8, 198u8, 91u8, 27u8, 202u8, 34u8, 24u8, 190u8, 208u8, - 220u8, 145u8, 91u8, 161u8, 179u8, 152u8, 118u8, 48u8, 74u8, 2u8, 28u8, - ], - ) - } - } + pub fn balances(&self) -> balances::storage::StorageApi { balances::storage::StorageApi } + + pub fn transaction_payment(&self) -> transaction_payment::storage::StorageApi { + transaction_payment::storage::StorageApi } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " Block & extrinsics weights: base values and limits."] - pub fn block_weights( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::frame_system::limits::BlockWeights, - >, - > { - ::subxt::constants::StaticConstantAddress::new("System", "BlockWeights", [ - 118u8, 253u8, 239u8, 217u8, 145u8, 115u8, 85u8, 86u8, 172u8, 248u8, 139u8, - 32u8, 158u8, 126u8, 172u8, 188u8, 197u8, 105u8, 145u8, 235u8, 171u8, 50u8, - 31u8, 225u8, 167u8, 187u8, 241u8, 87u8, 6u8, 17u8, 234u8, 185u8, - ]) - } - #[doc = " The maximum length of a block (in bytes)."] - pub fn block_length( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::frame_system::limits::BlockLength, - >, - > { - ::subxt::constants::StaticConstantAddress::new("System", "BlockLength", [ - 242u8, 210u8, 220u8, 76u8, 196u8, 181u8, 230u8, 121u8, 80u8, 216u8, 116u8, - 56u8, 16u8, 204u8, 254u8, 191u8, 53u8, 101u8, 115u8, 117u8, 163u8, 218u8, - 212u8, 187u8, 95u8, 233u8, 16u8, 179u8, 179u8, 130u8, 102u8, 158u8, - ]) - } + pub fn election_provider_multi_phase( + &self, + ) -> election_provider_multi_phase::storage::StorageApi { + election_provider_multi_phase::storage::StorageApi + } - #[doc = " Maximum number of block number to block hash mappings to keep (oldest pruned first)."] - pub fn block_hash_count( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { - ::subxt::constants::StaticConstantAddress::new("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, - ]) - } + pub fn staking(&self) -> staking::storage::StorageApi { staking::storage::StorageApi } - #[doc = " The weight of runtime database operations the runtime can invoke."] - pub fn db_weight( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType, - > { - ::subxt::constants::StaticConstantAddress::new("System", "DbWeight", [ - 124u8, 162u8, 190u8, 149u8, 49u8, 177u8, 162u8, 231u8, 62u8, 167u8, 199u8, - 181u8, 43u8, 232u8, 185u8, 116u8, 195u8, 51u8, 233u8, 223u8, 20u8, 129u8, - 246u8, 13u8, 65u8, 180u8, 64u8, 9u8, 157u8, 59u8, 245u8, 118u8, - ]) - } + pub fn session(&self) -> session::storage::StorageApi { session::storage::StorageApi } - #[doc = " Get the chain's current version."] - pub fn version( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType, - > { - ::subxt::constants::StaticConstantAddress::new("System", "Version", [ - 93u8, 98u8, 57u8, 243u8, 229u8, 8u8, 234u8, 231u8, 72u8, 230u8, 139u8, - 47u8, 63u8, 181u8, 17u8, 2u8, 220u8, 231u8, 104u8, 237u8, 185u8, 143u8, - 165u8, 253u8, 188u8, 76u8, 147u8, 12u8, 170u8, 26u8, 74u8, 200u8, - ]) - } + pub fn democracy(&self) -> democracy::storage::StorageApi { democracy::storage::StorageApi } - #[doc = " The designated SS58 prefix of this chain."] - #[doc = ""] - #[doc = " This replaces the \"ss58Format\" property declared in the chain spec. Reason is"] - #[doc = " that the runtime should know about the prefix in order to make use of it as"] - #[doc = " an identifier of the chain."] - pub fn ss58_prefix( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u16>, - > { - ::subxt::constants::StaticConstantAddress::new("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 fn council(&self) -> council::storage::StorageApi { council::storage::StorageApi } + + pub fn technical_committee(&self) -> technical_committee::storage::StorageApi { + technical_committee::storage::StorageApi } - } - pub mod utility { - use super::{root_mod, runtime_types}; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::{root_mod, runtime_types}; - type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Batch { - pub calls: ::std::vec::Vec, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct AsDerivative { - pub index: ::core::primitive::u16, - pub call: ::std::boxed::Box, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct BatchAll { - pub calls: ::std::vec::Vec, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct DispatchAs { - pub as_origin: ::std::boxed::Box, - pub call: ::std::boxed::Box, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct ForceBatch { - pub calls: ::std::vec::Vec, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct WithWeight { - pub call: ::std::boxed::Box, - pub weight: runtime_types::sp_weights::weight_v2::Weight, - } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Send a batch of dispatch calls."] - #[doc = ""] - #[doc = "May be called from any origin except `None`."] - #[doc = ""] - #[doc = "- `calls`: The calls to be dispatched from the same origin. The number of call must not"] - #[doc = " exceed the constant: `batched_calls_limit` (available in constant metadata)."] - #[doc = ""] - #[doc = "If origin is root then the calls are dispatched without checking origin filter. (This"] - #[doc = "includes bypassing `frame_system::Config::BaseCallFilter`)."] - #[doc = ""] - #[doc = "# "] - #[doc = "- Complexity: O(C) where C is the number of calls to be batched."] - #[doc = "# "] - #[doc = ""] - #[doc = "This will return `Ok` in all circumstances. To determine the success of the batch, an"] - #[doc = "event is deposited. If a call failed and the batch was interrupted, then the"] - #[doc = "`BatchInterrupted` event is deposited, along with the number of successful calls made"] - #[doc = "and the error of the failed call. If all were successful, then the `BatchCompleted`"] - #[doc = "event is deposited."] - pub fn batch( - &self, - calls: ::std::vec::Vec, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new("Utility", "batch", Batch { calls }, [ - 184u8, 36u8, 19u8, 183u8, 193u8, 98u8, 156u8, 152u8, 221u8, 2u8, 237u8, - 136u8, 253u8, 122u8, 208u8, 114u8, 166u8, 133u8, 84u8, 136u8, 141u8, 250u8, - 235u8, 2u8, 244u8, 206u8, 16u8, 60u8, 95u8, 206u8, 181u8, 1u8, - ]) - } - #[doc = "Send a call through an indexed pseudonym of the sender."] - #[doc = ""] - #[doc = "Filter from origin are passed along. The call will be dispatched with an origin which"] - #[doc = "use the same filter as the origin of this call."] - #[doc = ""] - #[doc = "NOTE: If you need to ensure that any account-based filtering is not honored (i.e."] - #[doc = "because you expect `proxy` to have been used prior in the call stack and you do not want"] - #[doc = "the call restrictions to apply to any sub-accounts), then use `as_multi_threshold_1`"] - #[doc = "in the Multisig pallet instead."] - #[doc = ""] - #[doc = "NOTE: Prior to version *12, this was called `as_limited_sub`."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - pub fn as_derivative( - &self, - index: ::core::primitive::u16, - call: runtime_types::da_runtime::RuntimeCall, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Utility", - "as_derivative", - AsDerivative { - index, - call: ::std::boxed::Box::new(call), - }, - [ - 112u8, 222u8, 226u8, 32u8, 90u8, 121u8, 125u8, 245u8, 25u8, 154u8, - 111u8, 27u8, 46u8, 211u8, 88u8, 23u8, 211u8, 25u8, 107u8, 177u8, 209u8, - 204u8, 216u8, 189u8, 62u8, 198u8, 158u8, 35u8, 211u8, 130u8, 21u8, - 60u8, - ], - ) - } + pub fn elections(&self) -> elections::storage::StorageApi { elections::storage::StorageApi } - #[doc = "Send a batch of dispatch calls and atomically execute them."] - #[doc = "The whole transaction will rollback and fail if any of the calls failed."] - #[doc = ""] - #[doc = "May be called from any origin except `None`."] - #[doc = ""] - #[doc = "- `calls`: The calls to be dispatched from the same origin. The number of call must not"] - #[doc = " exceed the constant: `batched_calls_limit` (available in constant metadata)."] - #[doc = ""] - #[doc = "If origin is root then the calls are dispatched without checking origin filter. (This"] - #[doc = "includes bypassing `frame_system::Config::BaseCallFilter`)."] - #[doc = ""] - #[doc = "# "] - #[doc = "- Complexity: O(C) where C is the number of calls to be batched."] - #[doc = "# "] - pub fn batch_all( - &self, - calls: ::std::vec::Vec, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new("Utility", "batch_all", BatchAll { calls }, [ - 165u8, 43u8, 221u8, 89u8, 110u8, 25u8, 67u8, 87u8, 205u8, 201u8, 64u8, - 224u8, 204u8, 115u8, 196u8, 169u8, 1u8, 51u8, 106u8, 157u8, 63u8, 51u8, - 166u8, 41u8, 179u8, 76u8, 219u8, 174u8, 134u8, 221u8, 208u8, 103u8, - ]) - } + pub fn technical_membership(&self) -> technical_membership::storage::StorageApi { + technical_membership::storage::StorageApi + } - #[doc = "Dispatches a function call with a provided origin."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Root_."] - #[doc = ""] - #[doc = "# "] - #[doc = "- O(1)."] - #[doc = "- Limited storage reads."] - #[doc = "- One DB write (event)."] - #[doc = "- Weight of derivative `call` execution + T::WeightInfo::dispatch_as()."] - #[doc = "# "] - pub fn dispatch_as( - &self, - as_origin: runtime_types::da_runtime::OriginCaller, - call: runtime_types::da_runtime::RuntimeCall, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Utility", - "dispatch_as", - DispatchAs { - as_origin: ::std::boxed::Box::new(as_origin), - call: ::std::boxed::Box::new(call), - }, - [ - 234u8, 80u8, 71u8, 232u8, 62u8, 199u8, 197u8, 119u8, 109u8, 75u8, - 240u8, 50u8, 96u8, 143u8, 93u8, 35u8, 17u8, 153u8, 236u8, 170u8, 34u8, - 202u8, 48u8, 232u8, 217u8, 100u8, 47u8, 102u8, 89u8, 203u8, 47u8, 67u8, - ], - ) - } + pub fn grandpa(&self) -> grandpa::storage::StorageApi { grandpa::storage::StorageApi } - #[doc = "Send a batch of dispatch calls."] - #[doc = "Unlike `batch`, it allows errors and won't interrupt."] - #[doc = ""] - #[doc = "May be called from any origin except `None`."] - #[doc = ""] - #[doc = "- `calls`: The calls to be dispatched from the same origin. The number of call must not"] - #[doc = " exceed the constant: `batched_calls_limit` (available in constant metadata)."] - #[doc = ""] - #[doc = "If origin is root then the calls are dispatch without checking origin filter. (This"] - #[doc = "includes bypassing `frame_system::Config::BaseCallFilter`)."] - #[doc = ""] - #[doc = "# "] - #[doc = "- Complexity: O(C) where C is the number of calls to be batched."] - #[doc = "# "] - pub fn force_batch( - &self, - calls: ::std::vec::Vec, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Utility", - "force_batch", - ForceBatch { calls }, - [ - 181u8, 43u8, 92u8, 17u8, 226u8, 144u8, 29u8, 8u8, 54u8, 50u8, 31u8, - 57u8, 37u8, 254u8, 113u8, 149u8, 42u8, 11u8, 35u8, 57u8, 62u8, 70u8, - 236u8, 222u8, 190u8, 188u8, 94u8, 2u8, 209u8, 86u8, 30u8, 59u8, - ], - ) - } + pub fn treasury(&self) -> treasury::storage::StorageApi { treasury::storage::StorageApi } - #[doc = "Dispatch a function call with a specified weight."] - #[doc = ""] - #[doc = "This function does not check the weight of the call, and instead allows the"] - #[doc = "Root origin to specify the weight of the call."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Root_."] - pub fn with_weight( - &self, - call: runtime_types::da_runtime::RuntimeCall, - weight: runtime_types::sp_weights::weight_v2::Weight, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Utility", - "with_weight", - WithWeight { - call: ::std::boxed::Box::new(call), - weight, - }, - [ - 8u8, 118u8, 209u8, 0u8, 94u8, 163u8, 91u8, 108u8, 106u8, 81u8, 71u8, - 9u8, 27u8, 223u8, 91u8, 45u8, 146u8, 165u8, 177u8, 247u8, 134u8, 35u8, - 34u8, 67u8, 75u8, 118u8, 88u8, 251u8, 217u8, 176u8, 85u8, 130u8, - ], - ) - } - } + pub fn sudo(&self) -> sudo::storage::StorageApi { sudo::storage::StorageApi } + + pub fn im_online(&self) -> im_online::storage::StorageApi { im_online::storage::StorageApi } + + pub fn authority_discovery(&self) -> authority_discovery::storage::StorageApi { + authority_discovery::storage::StorageApi } - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::pallet_utility::pallet::Event; - pub mod events { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "Batch of dispatches did not complete fully. Index of first failing dispatch given, as"] - #[doc = "well as the error."] - pub struct BatchInterrupted { - pub index: ::core::primitive::u32, - pub error: runtime_types::sp_runtime::DispatchError, - } - impl ::subxt::events::StaticEvent for BatchInterrupted { - const EVENT: &'static str = "BatchInterrupted"; - const PALLET: &'static str = "Utility"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "Batch of dispatches completed fully with no error."] - pub struct BatchCompleted; - impl ::subxt::events::StaticEvent for BatchCompleted { - const EVENT: &'static str = "BatchCompleted"; - const PALLET: &'static str = "Utility"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "Batch of dispatches completed but has errors."] - pub struct BatchCompletedWithErrors; - impl ::subxt::events::StaticEvent for BatchCompletedWithErrors { - const EVENT: &'static str = "BatchCompletedWithErrors"; - const PALLET: &'static str = "Utility"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "A single item within a Batch of dispatches has completed with no error."] - pub struct ItemCompleted; - impl ::subxt::events::StaticEvent for ItemCompleted { - const EVENT: &'static str = "ItemCompleted"; - const PALLET: &'static str = "Utility"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "A single item within a Batch of dispatches has completed with error."] - pub struct ItemFailed { - pub error: runtime_types::sp_runtime::DispatchError, - } - impl ::subxt::events::StaticEvent for ItemFailed { - const EVENT: &'static str = "ItemFailed"; - const PALLET: &'static str = "Utility"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "A call was dispatched."] - pub struct DispatchedAs { - pub result: ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - } - impl ::subxt::events::StaticEvent for DispatchedAs { - const EVENT: &'static str = "DispatchedAs"; - const PALLET: &'static str = "Utility"; - } + + pub fn offences(&self) -> offences::storage::StorageApi { offences::storage::StorageApi } + + pub fn historical(&self) -> historical::storage::StorageApi { + historical::storage::StorageApi } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " The limit on the number of batched calls."] - pub fn batched_calls_limit( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { - ::subxt::constants::StaticConstantAddress::new( - "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 fn scheduler(&self) -> scheduler::storage::StorageApi { scheduler::storage::StorageApi } + + pub fn bounties(&self) -> bounties::storage::StorageApi { bounties::storage::StorageApi } + + pub fn tips(&self) -> tips::storage::StorageApi { tips::storage::StorageApi } + + pub fn mmr(&self) -> mmr::storage::StorageApi { mmr::storage::StorageApi } + + pub fn data_availability(&self) -> data_availability::storage::StorageApi { + data_availability::storage::StorageApi + } + + pub fn nomad_updater_manager(&self) -> nomad_updater_manager::storage::StorageApi { + nomad_updater_manager::storage::StorageApi + } + + pub fn nomad_home(&self) -> nomad_home::storage::StorageApi { + nomad_home::storage::StorageApi + } + + pub fn preimage(&self) -> preimage::storage::StorageApi { preimage::storage::StorageApi } + + pub fn multisig(&self) -> multisig::storage::StorageApi { multisig::storage::StorageApi } + + pub fn voter_list(&self) -> voter_list::storage::StorageApi { + voter_list::storage::StorageApi + } + + pub fn nomination_pools(&self) -> nomination_pools::storage::StorageApi { + nomination_pools::storage::StorageApi } } - pub mod babe { - use super::{root_mod, runtime_types}; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::{root_mod, runtime_types}; - type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct ReportEquivocation { - pub equivocation_proof: ::std::boxed::Box< - runtime_types::sp_consensus_slots::EquivocationProof< - runtime_types::da_primitives::header::Header< - ::core::primitive::u32, - runtime_types::sp_runtime::traits::BlakeTwo256, - >, - runtime_types::sp_consensus_babe::app::Public, - >, - >, - pub key_owner_proof: runtime_types::sp_session::MembershipProof, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct ReportEquivocationUnsigned { - pub equivocation_proof: ::std::boxed::Box< - runtime_types::sp_consensus_slots::EquivocationProof< - runtime_types::da_primitives::header::Header< - ::core::primitive::u32, - runtime_types::sp_runtime::traits::BlakeTwo256, - >, - runtime_types::sp_consensus_babe::app::Public, - >, - >, - pub key_owner_proof: runtime_types::sp_session::MembershipProof, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct PlanConfigChange { - pub config: runtime_types::sp_consensus_babe::digests::NextConfigDescriptor, - } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Report authority equivocation/misbehavior. This method will verify"] - #[doc = "the equivocation proof and validate the given key ownership proof"] - #[doc = "against the extracted offender. If both are valid, the offence will"] - #[doc = "be reported."] - pub fn report_equivocation( - &self, - equivocation_proof: runtime_types::sp_consensus_slots::EquivocationProof< - runtime_types::da_primitives::header::Header< - ::core::primitive::u32, - runtime_types::sp_runtime::traits::BlakeTwo256, - >, - runtime_types::sp_consensus_babe::app::Public, - >, - key_owner_proof: runtime_types::sp_session::MembershipProof, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Babe", - "report_equivocation", - ReportEquivocation { - equivocation_proof: ::std::boxed::Box::new(equivocation_proof), - key_owner_proof, - }, - [ - 83u8, 29u8, 91u8, 18u8, 161u8, 50u8, 202u8, 65u8, 17u8, 151u8, 25u8, - 255u8, 78u8, 245u8, 144u8, 169u8, 113u8, 67u8, 9u8, 83u8, 20u8, 7u8, - 205u8, 244u8, 63u8, 67u8, 103u8, 33u8, 204u8, 128u8, 198u8, 99u8, - ], - ) - } + pub struct TransactionApi; + impl TransactionApi { + pub fn system(&self) -> system::calls::TransactionApi { system::calls::TransactionApi } - #[doc = "Report authority equivocation/misbehavior. This method will verify"] - #[doc = "the equivocation proof and validate the given key ownership proof"] - #[doc = "against the extracted offender. If both are valid, the offence will"] - #[doc = "be reported."] - #[doc = "This extrinsic must be called unsigned and it is expected that only"] - #[doc = "block authors will call it (validated in `ValidateUnsigned`), as such"] - #[doc = "if the block author is defined it will be defined as the equivocation"] - #[doc = "reporter."] - pub fn report_equivocation_unsigned( - &self, - equivocation_proof: runtime_types::sp_consensus_slots::EquivocationProof< - runtime_types::da_primitives::header::Header< - ::core::primitive::u32, - runtime_types::sp_runtime::traits::BlakeTwo256, - >, - runtime_types::sp_consensus_babe::app::Public, - >, - key_owner_proof: runtime_types::sp_session::MembershipProof, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Babe", - "report_equivocation_unsigned", - ReportEquivocationUnsigned { - equivocation_proof: ::std::boxed::Box::new(equivocation_proof), - key_owner_proof, - }, - [ - 5u8, 78u8, 86u8, 186u8, 250u8, 62u8, 207u8, 60u8, 251u8, 253u8, 231u8, - 14u8, 185u8, 55u8, 220u8, 75u8, 247u8, 205u8, 237u8, 134u8, 176u8, - 121u8, 166u8, 247u8, 238u8, 43u8, 71u8, 122u8, 66u8, 159u8, 239u8, - 53u8, - ], - ) - } + pub fn utility(&self) -> utility::calls::TransactionApi { utility::calls::TransactionApi } - #[doc = "Plan an epoch config change. The epoch config change is recorded and will be enacted on"] - #[doc = "the next call to `enact_epoch_change`. The config will be activated one epoch after."] - #[doc = "Multiple calls to this method will replace any existing planned config change that had"] - #[doc = "not been enacted yet."] - pub fn plan_config_change( - &self, - config: runtime_types::sp_consensus_babe::digests::NextConfigDescriptor, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Babe", - "plan_config_change", - PlanConfigChange { config }, - [ - 229u8, 157u8, 41u8, 58u8, 56u8, 4u8, 52u8, 107u8, 104u8, 20u8, 42u8, - 110u8, 1u8, 17u8, 45u8, 196u8, 30u8, 135u8, 63u8, 46u8, 40u8, 137u8, - 209u8, 37u8, 24u8, 108u8, 251u8, 189u8, 77u8, 208u8, 74u8, 32u8, - ], - ) - } - } + pub fn babe(&self) -> babe::calls::TransactionApi { babe::calls::TransactionApi } + + pub fn timestamp(&self) -> timestamp::calls::TransactionApi { + timestamp::calls::TransactionApi } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " Current epoch index."] - pub fn epoch_index( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u64>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Babe", - "EpochIndex", - vec![], - [ - 51u8, 27u8, 91u8, 156u8, 118u8, 99u8, 46u8, 219u8, 190u8, 147u8, 205u8, - 23u8, 106u8, 169u8, 121u8, 218u8, 208u8, 235u8, 135u8, 127u8, 243u8, - 41u8, 55u8, 243u8, 235u8, 122u8, 57u8, 86u8, 37u8, 90u8, 208u8, 71u8, - ], - ) - } - #[doc = " Current epoch authorities."] - pub fn authorities( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec<( - runtime_types::sp_consensus_babe::app::Public, - ::core::primitive::u64, - )>, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Babe", - "Authorities", - vec![], - [ - 61u8, 8u8, 133u8, 111u8, 169u8, 120u8, 0u8, 213u8, 31u8, 159u8, 204u8, - 212u8, 18u8, 205u8, 93u8, 84u8, 140u8, 108u8, 136u8, 209u8, 234u8, - 107u8, 145u8, 9u8, 204u8, 224u8, 105u8, 9u8, 238u8, 241u8, 65u8, 30u8, - ], - ) - } + pub fn authorship(&self) -> authorship::calls::TransactionApi { + authorship::calls::TransactionApi + } - #[doc = " The slot at which the first epoch actually started. This is 0"] - #[doc = " until the first block of the chain."] - pub fn genesis_slot( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Babe", - "GenesisSlot", - vec![], - [ - 234u8, 127u8, 243u8, 100u8, 124u8, 160u8, 66u8, 248u8, 48u8, 218u8, - 61u8, 52u8, 54u8, 142u8, 158u8, 77u8, 32u8, 63u8, 156u8, 39u8, 94u8, - 255u8, 192u8, 238u8, 170u8, 118u8, 58u8, 42u8, 199u8, 61u8, 199u8, - 77u8, - ], - ) - } + pub fn indices(&self) -> indices::calls::TransactionApi { indices::calls::TransactionApi } - #[doc = " Current slot number."] - pub fn current_slot( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Babe", - "CurrentSlot", - vec![], - [ - 139u8, 237u8, 185u8, 137u8, 251u8, 179u8, 69u8, 167u8, 133u8, 168u8, - 204u8, 64u8, 178u8, 123u8, 92u8, 250u8, 119u8, 190u8, 208u8, 178u8, - 208u8, 176u8, 124u8, 187u8, 74u8, 165u8, 33u8, 78u8, 161u8, 206u8, 8u8, - 108u8, - ], - ) - } + pub fn balances(&self) -> balances::calls::TransactionApi { + balances::calls::TransactionApi + } - #[doc = " The epoch randomness for the *current* epoch."] - #[doc = ""] - #[doc = " # Security"] - #[doc = ""] - #[doc = " This MUST NOT be used for gambling, as it can be influenced by a"] - #[doc = " malicious validator in the short term. It MAY be used in many"] - #[doc = " cryptographic protocols, however, so long as one remembers that this"] - #[doc = " (like everything else on-chain) it is public. For example, it can be"] - #[doc = " used where a number is needed that cannot have been chosen by an"] - #[doc = " adversary, for purposes such as public-coin zero-knowledge proofs."] - pub fn randomness( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<[::core::primitive::u8; 32usize]>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Babe", - "Randomness", - vec![], - [ - 191u8, 197u8, 25u8, 164u8, 104u8, 248u8, 247u8, 193u8, 244u8, 60u8, - 181u8, 195u8, 248u8, 90u8, 41u8, 199u8, 82u8, 123u8, 72u8, 126u8, 18u8, - 17u8, 128u8, 215u8, 34u8, 251u8, 227u8, 70u8, 166u8, 10u8, 104u8, - 140u8, - ], - ) - } + pub fn election_provider_multi_phase( + &self, + ) -> election_provider_multi_phase::calls::TransactionApi { + election_provider_multi_phase::calls::TransactionApi + } - #[doc = " Pending epoch configuration change that will be applied when the next epoch is enacted."] - pub fn pending_epoch_config_change( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_consensus_babe::digests::NextConfigDescriptor, - >, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Babe", - "PendingEpochConfigChange", - vec![], - [ - 4u8, 201u8, 0u8, 204u8, 47u8, 246u8, 4u8, 185u8, 163u8, 242u8, 242u8, - 152u8, 29u8, 222u8, 71u8, 127u8, 49u8, 203u8, 206u8, 180u8, 244u8, - 50u8, 80u8, 49u8, 199u8, 97u8, 3u8, 170u8, 156u8, 139u8, 106u8, 113u8, - ], - ) - } + pub fn staking(&self) -> staking::calls::TransactionApi { staking::calls::TransactionApi } - #[doc = " Next epoch randomness."] - pub fn next_randomness( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<[::core::primitive::u8; 32usize]>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Babe", - "NextRandomness", - vec![], - [ - 185u8, 98u8, 45u8, 109u8, 253u8, 38u8, 238u8, 221u8, 240u8, 29u8, 38u8, - 107u8, 118u8, 117u8, 131u8, 115u8, 21u8, 255u8, 203u8, 81u8, 243u8, - 251u8, 91u8, 60u8, 163u8, 202u8, 125u8, 193u8, 173u8, 234u8, 166u8, - 92u8, - ], - ) - } + pub fn session(&self) -> session::calls::TransactionApi { session::calls::TransactionApi } - #[doc = " Next epoch authorities."] - pub fn next_authorities( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec<( - runtime_types::sp_consensus_babe::app::Public, - ::core::primitive::u64, - )>, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Babe", - "NextAuthorities", - vec![], - [ - 201u8, 193u8, 164u8, 18u8, 155u8, 253u8, 124u8, 163u8, 143u8, 73u8, - 212u8, 20u8, 241u8, 108u8, 110u8, 5u8, 171u8, 66u8, 224u8, 208u8, 10u8, - 65u8, 148u8, 164u8, 1u8, 12u8, 216u8, 83u8, 20u8, 226u8, 254u8, 183u8, - ], - ) - } + pub fn democracy(&self) -> democracy::calls::TransactionApi { + democracy::calls::TransactionApi + } - #[doc = " Randomness under construction."] - #[doc = ""] - #[doc = " We make a trade-off between storage accesses and list length."] - #[doc = " We store the under-construction randomness in segments of up to"] - #[doc = " `UNDER_CONSTRUCTION_SEGMENT_LENGTH`."] - #[doc = ""] - #[doc = " Once a segment reaches this length, we begin the next one."] - #[doc = " We reset all segments and return to `0` at the beginning of every"] - #[doc = " epoch."] - pub fn segment_index( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Babe", - "SegmentIndex", - vec![], - [ - 128u8, 45u8, 87u8, 58u8, 174u8, 152u8, 241u8, 156u8, 56u8, 192u8, 19u8, - 45u8, 75u8, 160u8, 35u8, 253u8, 145u8, 11u8, 178u8, 81u8, 114u8, 117u8, - 112u8, 107u8, 163u8, 208u8, 240u8, 151u8, 102u8, 176u8, 246u8, 5u8, - ], - ) - } + pub fn council(&self) -> council::calls::TransactionApi { council::calls::TransactionApi } - #[doc = " TWOX-NOTE: `SegmentIndex` is an increasing integer, so this is okay."] - pub fn under_construction( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - [::core::primitive::u8; 32usize], - >, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Babe", - "UnderConstruction", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], - [ - 180u8, 4u8, 149u8, 245u8, 231u8, 92u8, 99u8, 170u8, 254u8, 172u8, - 182u8, 3u8, 152u8, 156u8, 132u8, 196u8, 140u8, 97u8, 7u8, 84u8, 220u8, - 89u8, 195u8, 177u8, 235u8, 51u8, 98u8, 144u8, 73u8, 238u8, 59u8, 164u8, - ], - ) - } + pub fn technical_committee(&self) -> technical_committee::calls::TransactionApi { + technical_committee::calls::TransactionApi + } - #[doc = " TWOX-NOTE: `SegmentIndex` is an increasing integer, so this is okay."] - pub fn under_construction_root( + pub fn elections(&self) -> elections::calls::TransactionApi { + elections::calls::TransactionApi + } + + pub fn technical_membership(&self) -> technical_membership::calls::TransactionApi { + technical_membership::calls::TransactionApi + } + + pub fn grandpa(&self) -> grandpa::calls::TransactionApi { grandpa::calls::TransactionApi } + + pub fn treasury(&self) -> treasury::calls::TransactionApi { + treasury::calls::TransactionApi + } + + pub fn sudo(&self) -> sudo::calls::TransactionApi { sudo::calls::TransactionApi } + + pub fn im_online(&self) -> im_online::calls::TransactionApi { + im_online::calls::TransactionApi + } + + pub fn scheduler(&self) -> scheduler::calls::TransactionApi { + scheduler::calls::TransactionApi + } + + pub fn bounties(&self) -> bounties::calls::TransactionApi { + bounties::calls::TransactionApi + } + + pub fn tips(&self) -> tips::calls::TransactionApi { tips::calls::TransactionApi } + + pub fn data_availability(&self) -> data_availability::calls::TransactionApi { + data_availability::calls::TransactionApi + } + + pub fn nomad_updater_manager(&self) -> nomad_updater_manager::calls::TransactionApi { + nomad_updater_manager::calls::TransactionApi + } + + pub fn nomad_home(&self) -> nomad_home::calls::TransactionApi { + nomad_home::calls::TransactionApi + } + + pub fn nomad_da_bridge(&self) -> nomad_da_bridge::calls::TransactionApi { + nomad_da_bridge::calls::TransactionApi + } + + pub fn preimage(&self) -> preimage::calls::TransactionApi { + preimage::calls::TransactionApi + } + + pub fn multisig(&self) -> multisig::calls::TransactionApi { + multisig::calls::TransactionApi + } + + pub fn voter_list(&self) -> voter_list::calls::TransactionApi { + voter_list::calls::TransactionApi + } + + pub fn nomination_pools(&self) -> nomination_pools::calls::TransactionApi { + nomination_pools::calls::TransactionApi + } + } + #[doc = r" check whether the Client you are using is aligned with the statically generated codegen."] + pub fn validate_codegen>( + client: &C, + ) -> Result<(), ::subxt::error::MetadataError> { + let runtime_metadata_hash = client + .metadata() + .hasher() + .only_these_pallets(&PALLETS) + .hash(); + if runtime_metadata_hash + != [ + 68u8, 69u8, 196u8, 250u8, 14u8, 151u8, 13u8, 171u8, 237u8, 210u8, 132u8, 154u8, + 56u8, 170u8, 5u8, 54u8, 221u8, 65u8, 49u8, 171u8, 185u8, 141u8, 113u8, 43u8, 201u8, + 151u8, 164u8, 204u8, 49u8, 152u8, 15u8, 50u8, + ] { + Err(::subxt::error::MetadataError::IncompatibleCodegen) + } else { + Ok(()) + } + } + 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 one variant per dispatchable that can be called by an extrinsic."] + 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 :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Remark { + pub remark: ::std::vec::Vec<::core::primitive::u8>, + } + impl ::subxt::blocks::StaticExtrinsic for Remark { + const CALL: &'static str = "remark"; + const PALLET: &'static str = "System"; + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetHeapPages { + pub pages: ::core::primitive::u64, + } + impl ::subxt::blocks::StaticExtrinsic for SetHeapPages { + const CALL: &'static str = "set_heap_pages"; + const PALLET: &'static str = "System"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetCode { + pub code: ::std::vec::Vec<::core::primitive::u8>, + } + impl ::subxt::blocks::StaticExtrinsic for SetCode { + const CALL: &'static str = "set_code"; + const PALLET: &'static str = "System"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetCodeWithoutChecks { + pub code: ::std::vec::Vec<::core::primitive::u8>, + } + impl ::subxt::blocks::StaticExtrinsic for SetCodeWithoutChecks { + const CALL: &'static str = "set_code_without_checks"; + const PALLET: &'static str = "System"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetStorage { + pub items: ::std::vec::Vec<( + ::std::vec::Vec<::core::primitive::u8>, + ::std::vec::Vec<::core::primitive::u8>, + )>, + } + impl ::subxt::blocks::StaticExtrinsic for SetStorage { + const CALL: &'static str = "set_storage"; + const PALLET: &'static str = "System"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct KillStorage { + pub keys: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, + } + impl ::subxt::blocks::StaticExtrinsic for KillStorage { + const CALL: &'static str = "kill_storage"; + const PALLET: &'static str = "System"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct KillPrefix { + pub prefix: ::std::vec::Vec<::core::primitive::u8>, + pub subkeys: ::core::primitive::u32, + } + impl ::subxt::blocks::StaticExtrinsic for KillPrefix { + const CALL: &'static str = "kill_prefix"; + const PALLET: &'static str = "System"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct RemarkWithEvent { + pub remark: ::std::vec::Vec<::core::primitive::u8>, + } + impl ::subxt::blocks::StaticExtrinsic for RemarkWithEvent { + const CALL: &'static str = "remark_with_event"; + const PALLET: &'static str = "System"; + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Make some on-chain remark."] + #[doc = ""] + #[doc = "# "] + #[doc = "- `O(1)`"] + #[doc = "# "] + pub fn remark( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - [::core::primitive::u8; 32usize], - >, - >, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Babe", - "UnderConstruction", - Vec::new(), + remark: ::std::vec::Vec<::core::primitive::u8>, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "System", + "remark", + types::Remark { remark }, [ - 180u8, 4u8, 149u8, 245u8, 231u8, 92u8, 99u8, 170u8, 254u8, 172u8, - 182u8, 3u8, 152u8, 156u8, 132u8, 196u8, 140u8, 97u8, 7u8, 84u8, 220u8, - 89u8, 195u8, 177u8, 235u8, 51u8, 98u8, 144u8, 73u8, 238u8, 59u8, 164u8, + 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 = " Temporary value (cleared at block finalization) which is `Some`"] - #[doc = " if per-block initialization has already been called for current block."] - pub fn initialized( + #[doc = "Set the number of pages in the WebAssembly environment's heap."] + pub fn set_heap_pages( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::core::option::Option< - runtime_types::sp_consensus_babe::digests::PreDigest, - >, - >, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Babe", - "Initialized", - vec![], + pages: ::core::primitive::u64, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "System", + "set_heap_pages", + types::SetHeapPages { pages }, [ - 142u8, 101u8, 250u8, 113u8, 93u8, 201u8, 157u8, 18u8, 166u8, 153u8, - 59u8, 197u8, 107u8, 247u8, 124u8, 110u8, 202u8, 67u8, 62u8, 57u8, - 186u8, 134u8, 49u8, 182u8, 149u8, 44u8, 255u8, 85u8, 87u8, 177u8, - 149u8, 121u8, + 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 = " This field should always be populated during block processing unless"] - #[doc = " secondary plain slots are enabled (which don't contain a VRF output)."] + #[doc = "Set the new runtime code."] #[doc = ""] - #[doc = " It is set in `on_finalize`, before it will contain the value from the last block."] - pub fn author_vrf_randomness( + #[doc = "# "] + #[doc = "- `O(C + S)` where `C` length of `code` and `S` complexity of `can_set_code`"] + #[doc = "- 1 call to `can_set_code`: `O(S)` (calls `sp_io::misc::runtime_version` which is"] + #[doc = " expensive)."] + #[doc = "- 1 storage write (codec `O(C)`)."] + #[doc = "- 1 digest item."] + #[doc = "- 1 event."] + #[doc = "The weight of this function is dependent on the runtime, but generally this is very"] + #[doc = "expensive. We will treat this as a full block."] + #[doc = "# "] + pub fn set_code( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::core::option::Option<[::core::primitive::u8; 32usize]>, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Babe", - "AuthorVrfRandomness", - vec![], + code: ::std::vec::Vec<::core::primitive::u8>, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "System", + "set_code", + types::SetCode { code }, [ - 66u8, 235u8, 74u8, 252u8, 222u8, 135u8, 19u8, 28u8, 74u8, 191u8, 170u8, - 197u8, 207u8, 127u8, 77u8, 121u8, 138u8, 138u8, 110u8, 187u8, 34u8, - 14u8, 230u8, 43u8, 241u8, 241u8, 63u8, 163u8, 53u8, 179u8, 250u8, - 247u8, + 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 = " The block numbers when the last and current epoch have started, respectively `N-1` and"] - #[doc = " `N`."] - #[doc = " NOTE: We track this is in order to annotate the block number when a given pool of"] - #[doc = " entropy was fixed (i.e. it was known to chain observers). Since epochs are defined in"] - #[doc = " slots, which may be skipped, the block numbers may not line up with the slot numbers."] - pub fn epoch_start( + #[doc = "Set the new runtime code without doing any checks of the given `code`."] + #[doc = ""] + #[doc = "# "] + #[doc = "- `O(C)` where `C` length of `code`"] + #[doc = "- 1 storage write (codec `O(C)`)."] + #[doc = "- 1 digest item."] + #[doc = "- 1 event."] + #[doc = "The weight of this function is dependent on the runtime. We will treat this as a full"] + #[doc = "block. # "] + pub fn set_code_without_checks( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<( - ::core::primitive::u32, - ::core::primitive::u32, - )>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Babe", - "EpochStart", - vec![], + code: ::std::vec::Vec<::core::primitive::u8>, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "System", + "set_code_without_checks", + types::SetCodeWithoutChecks { code }, [ - 196u8, 39u8, 241u8, 20u8, 150u8, 180u8, 136u8, 4u8, 195u8, 205u8, - 218u8, 10u8, 130u8, 131u8, 168u8, 243u8, 207u8, 249u8, 58u8, 195u8, - 177u8, 119u8, 110u8, 243u8, 241u8, 3u8, 245u8, 56u8, 157u8, 5u8, 68u8, - 60u8, + 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 = " How late the current block is compared to its parent."] - #[doc = ""] - #[doc = " This entry is populated as part of block execution and is cleaned up"] - #[doc = " on block finalization. Querying this storage entry outside of block"] - #[doc = " execution context should always yield zero."] - pub fn lateness( + #[doc = "Set some items of storage."] + pub fn set_storage( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Babe", - "Lateness", - vec![], + items: ::std::vec::Vec<( + ::std::vec::Vec<::core::primitive::u8>, + ::std::vec::Vec<::core::primitive::u8>, + )>, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "System", + "set_storage", + types::SetStorage { items }, [ - 229u8, 230u8, 224u8, 89u8, 49u8, 213u8, 198u8, 236u8, 144u8, 56u8, - 193u8, 234u8, 62u8, 242u8, 191u8, 199u8, 105u8, 131u8, 74u8, 63u8, - 75u8, 1u8, 210u8, 49u8, 3u8, 128u8, 18u8, 77u8, 219u8, 146u8, 60u8, - 88u8, + 184u8, 169u8, 248u8, 68u8, 40u8, 193u8, 190u8, 151u8, 96u8, 159u8, + 19u8, 237u8, 241u8, 156u8, 5u8, 158u8, 191u8, 237u8, 9u8, 13u8, 86u8, + 213u8, 77u8, 58u8, 48u8, 139u8, 1u8, 85u8, 220u8, 233u8, 139u8, 164u8, ], ) } - #[doc = " The configuration for the current epoch. Should never be `None` as it is initialized in"] - #[doc = " genesis."] - pub fn epoch_config( + #[doc = "Kill some items from storage."] + pub fn kill_storage( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_consensus_babe::BabeEpochConfiguration, - >, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Babe", - "EpochConfig", - vec![], + keys: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "System", + "kill_storage", + types::KillStorage { keys }, [ - 41u8, 118u8, 141u8, 244u8, 72u8, 17u8, 125u8, 203u8, 43u8, 153u8, - 203u8, 119u8, 117u8, 223u8, 123u8, 133u8, 73u8, 235u8, 130u8, 21u8, - 160u8, 167u8, 16u8, 173u8, 177u8, 35u8, 117u8, 97u8, 149u8, 49u8, - 220u8, 24u8, + 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 = " The configuration for the next epoch, `None` if the config will not change"] - #[doc = " (you can fallback to `EpochConfig` instead in that case)."] - pub fn next_epoch_config( + #[doc = "Kill all storage items with a key that starts with the given prefix."] + #[doc = ""] + #[doc = "**NOTE:** We rely on the Root origin to provide us the number of subkeys under"] + #[doc = "the prefix we are removing to accurately calculate the weight of this function."] + pub fn kill_prefix( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_consensus_babe::BabeEpochConfiguration, - >, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Babe", - "NextEpochConfig", - vec![], + prefix: ::std::vec::Vec<::core::primitive::u8>, + subkeys: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "System", + "kill_prefix", + types::KillPrefix { prefix, subkeys }, [ - 111u8, 182u8, 144u8, 180u8, 92u8, 146u8, 102u8, 249u8, 196u8, 229u8, - 226u8, 30u8, 25u8, 198u8, 133u8, 9u8, 136u8, 95u8, 11u8, 151u8, 139u8, - 156u8, 105u8, 228u8, 181u8, 12u8, 175u8, 148u8, 174u8, 33u8, 233u8, - 228u8, + 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, ], ) } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " The amount of time, in slots, that each epoch should last."] - #[doc = " NOTE: Currently it is not possible to change the epoch duration after"] - #[doc = " the chain has started. Attempting to do so will brick block production."] - pub fn epoch_duration( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u64>, - > { - ::subxt::constants::StaticConstantAddress::new("Babe", "EpochDuration", [ - 128u8, 214u8, 205u8, 242u8, 181u8, 142u8, 124u8, 231u8, 190u8, 146u8, 59u8, - 226u8, 157u8, 101u8, 103u8, 117u8, 249u8, 65u8, 18u8, 191u8, 103u8, 119u8, - 53u8, 85u8, 81u8, 96u8, 220u8, 42u8, 184u8, 239u8, 42u8, 246u8, - ]) - } - - #[doc = " The expected average block time at which BABE should be creating"] - #[doc = " blocks. Since BABE is probabilistic it is not trivial to figure out"] - #[doc = " what the expected average block time should be based on the slot"] - #[doc = " duration and the security parameter `c` (where `1 - c` represents"] - #[doc = " the probability of a slot being empty)."] - pub fn expected_block_time( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u64>, - > { - ::subxt::constants::StaticConstantAddress::new("Babe", "ExpectedBlockTime", [ - 128u8, 214u8, 205u8, 242u8, 181u8, 142u8, 124u8, 231u8, 190u8, 146u8, 59u8, - 226u8, 157u8, 101u8, 103u8, 117u8, 249u8, 65u8, 18u8, 191u8, 103u8, 119u8, - 53u8, 85u8, 81u8, 96u8, 220u8, 42u8, 184u8, 239u8, 42u8, 246u8, - ]) - } - #[doc = " Max number of authorities allowed"] - pub fn max_authorities( + #[doc = "Make some on-chain remark and emit event."] + pub fn remark_with_event( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { - ::subxt::constants::StaticConstantAddress::new("Babe", "MaxAuthorities", [ - 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, - ]) + remark: ::std::vec::Vec<::core::primitive::u8>, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "System", + "remark_with_event", + types::RemarkWithEvent { remark }, + [ + 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, + ], + ) } } } - } - pub mod timestamp { - use super::{root_mod, runtime_types}; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::{root_mod, runtime_types}; - type DispatchError = runtime_types::sp_runtime::DispatchError; + #[doc = "Event for the System pallet."] + pub type Event = runtime_types::frame_system::pallet::Event; + pub mod events { + use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - pub struct Set { - #[codec(compact)] - pub now: ::core::primitive::u64, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "An extrinsic completed successfully."] + pub struct ExtrinsicSuccess { + pub dispatch_info: runtime_types::frame_support::dispatch::DispatchInfo, } - pub 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 = "`MinimumPeriod`."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be `Inherent`."] - #[doc = ""] - #[doc = "# "] - #[doc = "- `O(1)` (Note that implementations of `OnTimestampSet` must also be `O(1)`)"] - #[doc = "- 1 storage read and 1 storage mutation (codec `O(1)`). (because of `DidUpdate::take` in"] - #[doc = " `on_finalize`)"] - #[doc = "- 1 event handler `on_timestamp_set`. Must be `O(1)`."] - #[doc = "# "] - pub fn set( - &self, - now: ::core::primitive::u64, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new("Timestamp", "set", Set { now }, [ - 6u8, 97u8, 172u8, 236u8, 118u8, 238u8, 228u8, 114u8, 15u8, 115u8, 102u8, - 85u8, 66u8, 151u8, 16u8, 33u8, 187u8, 17u8, 166u8, 88u8, 127u8, 214u8, - 182u8, 51u8, 168u8, 88u8, 43u8, 101u8, 185u8, 8u8, 1u8, 28u8, - ]) - } + impl ::subxt::events::StaticEvent for ExtrinsicSuccess { + const EVENT: &'static str = "ExtrinsicSuccess"; + const PALLET: &'static str = "System"; } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " Current time for the current block."] - pub fn now( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u64>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Timestamp", - "Now", - vec![], - [ - 148u8, 53u8, 50u8, 54u8, 13u8, 161u8, 57u8, 150u8, 16u8, 83u8, 144u8, - 221u8, 59u8, 75u8, 158u8, 130u8, 39u8, 123u8, 106u8, 134u8, 202u8, - 185u8, 83u8, 85u8, 60u8, 41u8, 120u8, 96u8, 210u8, 34u8, 2u8, 250u8, - ], - ) - } - - #[doc = " Did the timestamp get updated in this block?"] - pub fn did_update( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::bool>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Timestamp", - "DidUpdate", - vec![], - [ - 70u8, 13u8, 92u8, 186u8, 80u8, 151u8, 167u8, 90u8, 158u8, 232u8, 175u8, - 13u8, 103u8, 135u8, 2u8, 78u8, 16u8, 6u8, 39u8, 158u8, 167u8, 85u8, - 27u8, 47u8, 122u8, 73u8, 127u8, 26u8, 35u8, 168u8, 72u8, 204u8, - ], - ) - } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "An extrinsic failed."] + pub struct ExtrinsicFailed { + pub dispatch_error: runtime_types::sp_runtime::DispatchError, + pub dispatch_info: runtime_types::frame_support::dispatch::DispatchInfo, } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " The minimum period between blocks. Beware that this is different to the *expected*"] - #[doc = " period that the block production apparatus provides. Your chosen consensus system will"] - #[doc = " generally work with this to determine a sensible block time. e.g. For Aura, it will be"] - #[doc = " double this period on default settings."] - pub fn minimum_period( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u64>, - > { - ::subxt::constants::StaticConstantAddress::new("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, - ]) - } + impl ::subxt::events::StaticEvent for ExtrinsicFailed { + const EVENT: &'static str = "ExtrinsicFailed"; + const PALLET: &'static str = "System"; } - } - } - pub mod authorship { - use super::{root_mod, runtime_types}; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::{root_mod, runtime_types}; - type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - pub struct SetUncles { - pub new_uncles: ::std::vec::Vec< - runtime_types::da_primitives::header::Header< - ::core::primitive::u32, - runtime_types::sp_runtime::traits::BlakeTwo256, - >, - >, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "`:code` was updated."] + pub struct CodeUpdated; + impl ::subxt::events::StaticEvent for CodeUpdated { + const EVENT: &'static str = "CodeUpdated"; + const PALLET: &'static str = "System"; } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Provide a set of uncles."] - pub fn set_uncles( - &self, - new_uncles: ::std::vec::Vec< - runtime_types::da_primitives::header::Header< - ::core::primitive::u32, - runtime_types::sp_runtime::traits::BlakeTwo256, - >, - >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Authorship", - "set_uncles", - SetUncles { new_uncles }, - [ - 37u8, 197u8, 135u8, 53u8, 63u8, 119u8, 31u8, 241u8, 155u8, 123u8, 40u8, - 160u8, 221u8, 104u8, 45u8, 93u8, 96u8, 96u8, 137u8, 194u8, 218u8, 51u8, - 207u8, 141u8, 204u8, 211u8, 116u8, 95u8, 144u8, 118u8, 33u8, 220u8, - ], - ) - } - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " Uncles"] - pub fn uncles( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - runtime_types::pallet_authorship::UncleEntryItem< - ::core::primitive::u32, - ::subxt::utils::H256, - ::subxt::utils::AccountId32, - >, - >, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Authorship", - "Uncles", - vec![], - [ - 193u8, 226u8, 196u8, 151u8, 233u8, 82u8, 60u8, 164u8, 27u8, 156u8, - 231u8, 51u8, 79u8, 134u8, 170u8, 166u8, 71u8, 120u8, 250u8, 255u8, - 52u8, 168u8, 74u8, 199u8, 122u8, 253u8, 248u8, 178u8, 39u8, 233u8, - 132u8, 67u8, - ], - ) - } - - #[doc = " Author of current block."] - pub fn author( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::subxt::utils::AccountId32>, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Authorship", - "Author", - vec![], - [ - 149u8, 42u8, 33u8, 147u8, 190u8, 207u8, 174u8, 227u8, 190u8, 110u8, - 25u8, 131u8, 5u8, 167u8, 237u8, 188u8, 188u8, 33u8, 177u8, 126u8, - 181u8, 49u8, 126u8, 118u8, 46u8, 128u8, 154u8, 95u8, 15u8, 91u8, 103u8, - 113u8, - ], - ) - } - - #[doc = " Whether uncles were already set in this block."] - pub fn did_set_uncles( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::bool>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Authorship", - "DidSetUncles", - vec![], - [ - 64u8, 3u8, 208u8, 187u8, 50u8, 45u8, 37u8, 88u8, 163u8, 226u8, 37u8, - 126u8, 232u8, 107u8, 156u8, 187u8, 29u8, 15u8, 53u8, 46u8, 28u8, 73u8, - 83u8, 123u8, 14u8, 244u8, 243u8, 43u8, 245u8, 143u8, 15u8, 115u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " The number of blocks back we should accept uncles."] - #[doc = " This means that we will deal with uncle-parents that are"] - #[doc = " `UncleGenerations + 1` before `now`."] - pub fn uncle_generations( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { - ::subxt::constants::StaticConstantAddress::new( - "Authorship", - "UncleGenerations", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, - ], - ) - } - } - } - } - pub mod indices { - use super::{root_mod, runtime_types}; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::{root_mod, runtime_types}; - type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - pub struct Claim { - pub index: ::core::primitive::u32, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A new account was created."] + pub struct NewAccount { + pub account: ::subxt::utils::AccountId32, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Transfer { - pub new: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pub index: ::core::primitive::u32, + impl ::subxt::events::StaticEvent for NewAccount { + const EVENT: &'static str = "NewAccount"; + const PALLET: &'static str = "System"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - pub struct Free { - pub index: ::core::primitive::u32, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "An account was reaped."] + pub struct KilledAccount { + pub account: ::subxt::utils::AccountId32, + } + impl ::subxt::events::StaticEvent for KilledAccount { + const EVENT: &'static str = "KilledAccount"; + const PALLET: &'static str = "System"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - pub struct ForceTransfer { - pub new: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pub index: ::core::primitive::u32, - pub freeze: ::core::primitive::bool, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "On on-chain remark happened."] + pub struct Remarked { + pub sender: ::subxt::utils::AccountId32, + pub hash: ::subxt::utils::H256, + } + impl ::subxt::events::StaticEvent for Remarked { + const EVENT: &'static str = "Remarked"; + const PALLET: &'static str = "System"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - pub struct Freeze { - pub index: ::core::primitive::u32, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "On on-chain remark happend called by Root."] + pub struct RemarkedByRoot { + pub hash: ::subxt::utils::H256, } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Assign an previously unassigned index."] - #[doc = ""] - #[doc = "Payment: `Deposit` is reserved from the sender account."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - #[doc = ""] - #[doc = "- `index`: the index to be claimed. This must not be in use."] - #[doc = ""] - #[doc = "Emits `IndexAssigned` if successful."] - #[doc = ""] - #[doc = "# "] - #[doc = "- `O(1)`."] - #[doc = "- One storage mutation (codec `O(1)`)."] - #[doc = "- One reserve operation."] - #[doc = "- One event."] - #[doc = "-------------------"] - #[doc = "- DB Weight: 1 Read/Write (Accounts)"] - #[doc = "# "] - pub fn claim( + impl ::subxt::events::StaticEvent for RemarkedByRoot { + const EVENT: &'static str = "RemarkedByRoot"; + const PALLET: &'static str = "System"; + } + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " The full account information for a particular account ID."] + pub fn account( &self, - index: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new("Indices", "claim", Claim { index }, [ - 5u8, 24u8, 11u8, 173u8, 226u8, 170u8, 0u8, 30u8, 193u8, 102u8, 214u8, 59u8, - 252u8, 32u8, 221u8, 88u8, 196u8, 189u8, 244u8, 18u8, 233u8, 37u8, 228u8, - 248u8, 76u8, 175u8, 212u8, 233u8, 238u8, 203u8, 162u8, 68u8, - ]) + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::frame_system::AccountInfo< + ::core::primitive::u32, + runtime_types::pallet_balances::AccountData<::core::primitive::u128>, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "System", + "Account", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], + [ + 6u8, 201u8, 83u8, 32u8, 77u8, 56u8, 30u8, 144u8, 134u8, 20u8, 244u8, + 154u8, 1u8, 165u8, 101u8, 255u8, 35u8, 235u8, 136u8, 0u8, 71u8, 140u8, + 164u8, 69u8, 211u8, 55u8, 14u8, 205u8, 82u8, 80u8, 36u8, 228u8, + ], + ) } - #[doc = "Assign an index already owned by the sender to another account. The balance reservation"] - #[doc = "is effectively transferred to the new account."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - #[doc = ""] - #[doc = "- `index`: the index to be re-assigned. This must be owned by the sender."] - #[doc = "- `new`: the new owner of the index. This function is a no-op if it is equal to sender."] - #[doc = ""] - #[doc = "Emits `IndexAssigned` if successful."] - #[doc = ""] - #[doc = "# "] - #[doc = "- `O(1)`."] - #[doc = "- One storage mutation (codec `O(1)`)."] - #[doc = "- One transfer operation."] - #[doc = "- One event."] - #[doc = "-------------------"] - #[doc = "- DB Weight:"] - #[doc = " - Reads: Indices Accounts, System Account (recipient)"] - #[doc = " - Writes: Indices Accounts, System Account (recipient)"] - #[doc = "# "] - pub fn transfer( + #[doc = " The full account information for a particular account ID."] + pub fn account_root( &self, - new: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::frame_system::AccountInfo< ::core::primitive::u32, + runtime_types::pallet_balances::AccountData<::core::primitive::u128>, >, - index: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Indices", - "transfer", - Transfer { new, index }, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "System", + "Account", + Vec::new(), [ - 1u8, 83u8, 197u8, 184u8, 8u8, 96u8, 48u8, 146u8, 116u8, 76u8, 229u8, - 115u8, 226u8, 215u8, 41u8, 154u8, 27u8, 34u8, 205u8, 188u8, 10u8, - 169u8, 203u8, 39u8, 2u8, 236u8, 181u8, 162u8, 115u8, 254u8, 42u8, 28u8, + 6u8, 201u8, 83u8, 32u8, 77u8, 56u8, 30u8, 144u8, 134u8, 20u8, 244u8, + 154u8, 1u8, 165u8, 101u8, 255u8, 35u8, 235u8, 136u8, 0u8, 71u8, 140u8, + 164u8, 69u8, 211u8, 55u8, 14u8, 205u8, 82u8, 80u8, 36u8, 228u8, ], ) } - #[doc = "Free up an index owned by the sender."] - #[doc = ""] - #[doc = "Payment: Any previous deposit placed for the index is unreserved in the sender account."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and the sender must own the index."] - #[doc = ""] - #[doc = "- `index`: the index to be freed. This must be owned by the sender."] - #[doc = ""] - #[doc = "Emits `IndexFreed` if successful."] - #[doc = ""] - #[doc = "# "] - #[doc = "- `O(1)`."] - #[doc = "- One storage mutation (codec `O(1)`)."] - #[doc = "- One reserve operation."] - #[doc = "- One event."] - #[doc = "-------------------"] - #[doc = "- DB Weight: 1 Read/Write (Accounts)"] - #[doc = "# "] - pub fn free( + #[doc = " Total extrinsics count for the current block."] + pub fn extrinsic_count( &self, - index: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new("Indices", "free", Free { index }, [ - 133u8, 202u8, 225u8, 127u8, 69u8, 145u8, 43u8, 13u8, 160u8, 248u8, 215u8, - 243u8, 232u8, 166u8, 74u8, 203u8, 235u8, 138u8, 255u8, 27u8, 163u8, 71u8, - 254u8, 217u8, 6u8, 208u8, 202u8, 204u8, 238u8, 70u8, 126u8, 252u8, - ]) - } - - #[doc = "Force an index to an account. This doesn't require a deposit. If the index is already"] - #[doc = "held, then any deposit is reimbursed to its current owner."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Root_."] - #[doc = ""] - #[doc = "- `index`: the index to be (re-)assigned."] - #[doc = "- `new`: the new owner of the index. This function is a no-op if it is equal to sender."] - #[doc = "- `freeze`: if set to `true`, will freeze the index so it cannot be transferred."] - #[doc = ""] - #[doc = "Emits `IndexAssigned` if successful."] - #[doc = ""] - #[doc = "# "] - #[doc = "- `O(1)`."] - #[doc = "- One storage mutation (codec `O(1)`)."] - #[doc = "- Up to one reserve operation."] - #[doc = "- One event."] - #[doc = "-------------------"] - #[doc = "- DB Weight:"] - #[doc = " - Reads: Indices Accounts, System Account (original owner)"] - #[doc = " - Writes: Indices Accounts, System Account (original owner)"] - #[doc = "# "] - pub fn force_transfer( + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + ::subxt::storage::address::Yes, + (), + (), + > { + ::subxt::storage::address::Address::new_static( + "System", + "ExtrinsicCount", + vec![], + [ + 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 = " The current weight for the block."] + pub fn block_weight( &self, - new: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::frame_support::dispatch::PerDispatchClass< + runtime_types::sp_weights::weight_v2::Weight, >, - index: ::core::primitive::u32, - freeze: ::core::primitive::bool, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Indices", - "force_transfer", - ForceTransfer { new, index, freeze }, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "System", + "BlockWeight", + vec![], [ - 126u8, 8u8, 145u8, 175u8, 177u8, 153u8, 131u8, 123u8, 184u8, 53u8, - 72u8, 207u8, 21u8, 140u8, 87u8, 181u8, 172u8, 64u8, 37u8, 165u8, 121u8, - 111u8, 173u8, 224u8, 181u8, 79u8, 76u8, 134u8, 93u8, 169u8, 65u8, - 131u8, + 52u8, 191u8, 212u8, 137u8, 26u8, 39u8, 239u8, 35u8, 182u8, 32u8, 39u8, + 103u8, 56u8, 184u8, 60u8, 159u8, 167u8, 232u8, 193u8, 116u8, 105u8, + 56u8, 98u8, 127u8, 124u8, 188u8, 214u8, 154u8, 160u8, 41u8, 20u8, + 162u8, ], ) } - #[doc = "Freeze an index so it will always point to the sender account. This consumes the"] - #[doc = "deposit."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and the signing account must have a"] - #[doc = "non-frozen account `index`."] - #[doc = ""] - #[doc = "- `index`: the index to be frozen in place."] - #[doc = ""] - #[doc = "Emits `IndexFrozen` if successful."] - #[doc = ""] - #[doc = "# "] - #[doc = "- `O(1)`."] - #[doc = "- One storage mutation (codec `O(1)`)."] - #[doc = "- Up to one slash operation."] - #[doc = "- One event."] - #[doc = "-------------------"] - #[doc = "- DB Weight: 1 Read/Write (Accounts)"] - #[doc = "# "] - pub fn freeze( + #[doc = " Total length (in bytes) for all extrinsics put together, for the current block."] + pub fn all_extrinsics_len( &self, - index: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new("Indices", "freeze", Freeze { index }, [ - 121u8, 45u8, 118u8, 2u8, 72u8, 48u8, 38u8, 7u8, 234u8, 204u8, 68u8, 20u8, - 76u8, 251u8, 205u8, 246u8, 149u8, 31u8, 168u8, 186u8, 208u8, 90u8, 40u8, - 47u8, 100u8, 228u8, 188u8, 33u8, 79u8, 220u8, 105u8, 209u8, - ]) + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::frame_system::ExtrinsicLen, + ::subxt::storage::address::Yes, + (), + (), + > { + ::subxt::storage::address::Address::new_static( + "System", + "AllExtrinsicsLen", + vec![], + [ + 210u8, 178u8, 187u8, 254u8, 187u8, 172u8, 33u8, 225u8, 56u8, 183u8, + 1u8, 152u8, 21u8, 25u8, 90u8, 117u8, 173u8, 85u8, 113u8, 166u8, 211u8, + 152u8, 186u8, 48u8, 171u8, 246u8, 67u8, 194u8, 107u8, 14u8, 104u8, + 179u8, + ], + ) } - } - } - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::pallet_indices::pallet::Event; - pub mod events { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "A account index was assigned."] - pub struct IndexAssigned { - pub who: ::subxt::utils::AccountId32, - pub index: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for IndexAssigned { - const EVENT: &'static str = "IndexAssigned"; - const PALLET: &'static str = "Indices"; - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "A account index has been freed up (unassigned)."] - pub struct IndexFreed { - pub index: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for IndexFreed { - const EVENT: &'static str = "IndexFreed"; - const PALLET: &'static str = "Indices"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "A account index has been frozen to its current account ID."] - pub struct IndexFrozen { - pub index: ::core::primitive::u32, - pub who: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for IndexFrozen { - const EVENT: &'static str = "IndexFrozen"; - const PALLET: &'static str = "Indices"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " The lookup from index to account."] - pub fn accounts( + + #[doc = " Map of block numbers to block hashes."] + pub fn block_hash( &self, _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<( - ::subxt::utils::AccountId32, - ::core::primitive::u128, - ::core::primitive::bool, - )>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::subxt::utils::H256, + ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, - (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Indices", - "Accounts", - vec![::subxt::storage::address::StorageMapKey::new( + ::subxt::storage::address::Address::new_static( + "System", + "BlockHash", + vec![::subxt::storage::address::make_static_storage_map_key( _0.borrow(), - ::subxt::storage::address::StorageHasher::Blake2_128Concat, )], [ - 211u8, 169u8, 54u8, 254u8, 88u8, 57u8, 22u8, 223u8, 108u8, 27u8, 38u8, - 9u8, 202u8, 209u8, 111u8, 209u8, 144u8, 13u8, 211u8, 114u8, 239u8, - 127u8, 75u8, 166u8, 234u8, 222u8, 225u8, 35u8, 160u8, 163u8, 112u8, - 242u8, + 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 = " The lookup from index to account."] - pub fn accounts_root( + #[doc = " Map of block numbers to block hashes."] + pub fn block_hash_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<( - ::subxt::utils::AccountId32, - ::core::primitive::u128, - ::core::primitive::bool, - )>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::subxt::utils::H256, (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "System", + "BlockHash", + Vec::new(), + [ + 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 = " Extrinsics data for the current block (maps an extrinsic's index to its data)."] + pub fn extrinsic_data( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec<::core::primitive::u8>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "System", + "ExtrinsicData", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], + [ + 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 = " Extrinsics data for the current block (maps an extrinsic's index to its data)."] + pub fn extrinsic_data_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec<::core::primitive::u8>, (), ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Indices", - "Accounts", + ::subxt::storage::address::Address::new_static( + "System", + "ExtrinsicData", Vec::new(), [ - 211u8, 169u8, 54u8, 254u8, 88u8, 57u8, 22u8, 223u8, 108u8, 27u8, 38u8, - 9u8, 202u8, 209u8, 111u8, 209u8, 144u8, 13u8, 211u8, 114u8, 239u8, - 127u8, 75u8, 166u8, 234u8, 222u8, 225u8, 35u8, 160u8, 163u8, 112u8, - 242u8, + 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, ], ) } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " The deposit needed for reserving an index."] - pub fn deposit( + + #[doc = " The current block number being processed. Set by `execute_block`."] + pub fn number( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), > { - ::subxt::constants::StaticConstantAddress::new("Indices", "Deposit", [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, - 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, 136u8, - 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, + ::subxt::storage::address::Address::new_static("System", "Number", vec![], [ + 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, ]) } - } - } - } - pub mod balances { - use super::{root_mod, runtime_types}; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::{root_mod, runtime_types}; - type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Transfer { - pub dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - #[codec(compact)] - pub value: ::core::primitive::u128, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct SetBalance { - pub who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - #[codec(compact)] - pub new_free: ::core::primitive::u128, - #[codec(compact)] - pub new_reserved: ::core::primitive::u128, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct ForceTransfer { - pub source: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pub dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - #[codec(compact)] - pub value: ::core::primitive::u128, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct TransferKeepAlive { - pub dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - #[codec(compact)] - pub value: ::core::primitive::u128, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct TransferAll { - pub dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pub keep_alive: ::core::primitive::bool, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct ForceUnreserve { - pub who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pub amount: ::core::primitive::u128, - } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Transfer some liquid free balance to another account."] - #[doc = ""] - #[doc = "`transfer` will set the `FreeBalance` of the sender and receiver."] - #[doc = "If the sender's account is below the existential deposit as a result"] - #[doc = "of the transfer, the account will be reaped."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be `Signed` by the transactor."] - #[doc = ""] - #[doc = "# "] - #[doc = "- Dependent on arguments but not critical, given proper implementations for input config"] - #[doc = " types. See related functions below."] - #[doc = "- It contains a limited number of reads and writes internally and no complex"] - #[doc = " computation."] - #[doc = ""] - #[doc = "Related functions:"] - #[doc = ""] - #[doc = " - `ensure_can_withdraw` is always called internally but has a bounded complexity."] - #[doc = " - Transferring balances to accounts that did not exist before will cause"] - #[doc = " `T::OnNewAccount::on_new_account` to be called."] - #[doc = " - Removing enough funds from an account will trigger `T::DustRemoval::on_unbalanced`."] - #[doc = " - `transfer_keep_alive` works the same way as `transfer`, but has an additional check"] - #[doc = " that the transfer will not kill the origin account."] - #[doc = "---------------------------------"] - #[doc = "- Origin account is already in memory, so no DB operations for them."] - #[doc = "# "] - pub fn transfer( + + #[doc = " Hash of the previous block."] + pub fn parent_hash( &self, - dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - value: ::core::primitive::u128, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Balances", - "transfer", - Transfer { dest, value }, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::subxt::utils::H256, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "System", + "ParentHash", + vec![], [ - 255u8, 181u8, 144u8, 248u8, 64u8, 167u8, 5u8, 134u8, 208u8, 20u8, - 223u8, 103u8, 235u8, 35u8, 66u8, 184u8, 27u8, 94u8, 176u8, 60u8, 233u8, - 236u8, 145u8, 218u8, 44u8, 138u8, 240u8, 224u8, 16u8, 193u8, 220u8, - 95u8, + 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 = "Set the balances of a given account."] + #[doc = " Digest of the current block, also part of the block header."] + pub fn digest( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::sp_runtime::generic::digest::Digest, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static("System", "Digest", vec![], [ + 70u8, 156u8, 127u8, 89u8, 115u8, 250u8, 103u8, 62u8, 185u8, 153u8, 26u8, + 72u8, 39u8, 226u8, 181u8, 97u8, 137u8, 225u8, 45u8, 158u8, 212u8, 254u8, + 142u8, 136u8, 90u8, 22u8, 243u8, 125u8, 226u8, 49u8, 235u8, 215u8, + ]) + } + + #[doc = " Events deposited for the current block."] #[doc = ""] - #[doc = "This will alter `FreeBalance` and `ReservedBalance` in storage. it will"] - #[doc = "also alter the total issuance of the system (`TotalIssuance`) appropriately."] - #[doc = "If the new free or reserved balance is below the existential deposit,"] - #[doc = "it will reset the account nonce (`frame_system::AccountNonce`)."] + #[doc = " 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 = "The dispatch origin for this call is `root`."] - pub fn set_balance( + #[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, - who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec< + runtime_types::frame_system::EventRecord< + runtime_types::da_runtime::RuntimeEvent, + ::subxt::utils::H256, + >, >, - new_free: ::core::primitive::u128, - new_reserved: ::core::primitive::u128, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Balances", - "set_balance", - SetBalance { - who, - new_free, - new_reserved, - }, - [ - 174u8, 34u8, 80u8, 252u8, 193u8, 51u8, 228u8, 236u8, 234u8, 16u8, - 173u8, 214u8, 122u8, 21u8, 254u8, 7u8, 49u8, 176u8, 18u8, 128u8, 122u8, - 68u8, 72u8, 181u8, 119u8, 90u8, 167u8, 46u8, 203u8, 220u8, 109u8, - 110u8, - ], - ) + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static("System", "Events", vec![], [ + 150u8, 76u8, 101u8, 238u8, 61u8, 233u8, 105u8, 124u8, 229u8, 118u8, 41u8, + 125u8, 167u8, 184u8, 179u8, 24u8, 186u8, 248u8, 143u8, 7u8, 150u8, 10u8, + 96u8, 224u8, 123u8, 100u8, 98u8, 161u8, 16u8, 11u8, 222u8, 222u8, + ]) } - #[doc = "Exactly as `transfer`, except the origin must be root and the source account may be"] - #[doc = "specified."] - #[doc = "# "] - #[doc = "- Same as transfer, but additional read and write because the source account is not"] - #[doc = " assumed to be in the overlay."] - #[doc = "# "] - pub fn force_transfer( + #[doc = " The number of events in the `Events` list."] + pub fn event_count( &self, - source: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - value: ::core::primitive::u128, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Balances", - "force_transfer", - ForceTransfer { - source, - dest, - value, - }, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "System", + "EventCount", + vec![], [ - 56u8, 80u8, 186u8, 45u8, 134u8, 147u8, 200u8, 19u8, 53u8, 221u8, 213u8, - 32u8, 13u8, 51u8, 130u8, 42u8, 244u8, 85u8, 50u8, 246u8, 189u8, 51u8, - 93u8, 1u8, 108u8, 142u8, 112u8, 245u8, 104u8, 255u8, 15u8, 62u8, + 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 = "Same as the [`transfer`] call, but with a check that the transfer will not kill the"] - #[doc = "origin account."] + #[doc = " Mapping between a topic (represented by T::Hash) and a vector of indexes"] + #[doc = " of events in the `>` list."] #[doc = ""] - #[doc = "99% of the time you want [`transfer`] instead."] + #[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 = "[`transfer`]: struct.Pallet.html#method.transfer"] - pub fn transfer_keep_alive( + #[doc = " The value has the type `(T::BlockNumber, EventIndex)` because if we used only just"] + #[doc = " the `EventIndex` then in case if the topic has the same contents on the next block"] + #[doc = " no notification will be triggered thus the event might be lost."] + pub fn event_topics( &self, - dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - value: ::core::primitive::u128, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Balances", - "transfer_keep_alive", - TransferKeepAlive { dest, value }, + _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec<(::core::primitive::u32, ::core::primitive::u32)>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "System", + "EventTopics", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], [ - 202u8, 239u8, 204u8, 0u8, 52u8, 57u8, 158u8, 8u8, 252u8, 178u8, 91u8, - 197u8, 238u8, 186u8, 205u8, 56u8, 217u8, 250u8, 21u8, 44u8, 239u8, - 66u8, 79u8, 99u8, 25u8, 106u8, 70u8, 226u8, 50u8, 255u8, 176u8, 71u8, + 154u8, 29u8, 31u8, 148u8, 254u8, 7u8, 124u8, 251u8, 241u8, 77u8, 24u8, + 37u8, 28u8, 75u8, 205u8, 17u8, 159u8, 79u8, 239u8, 62u8, 67u8, 60u8, + 252u8, 112u8, 215u8, 145u8, 103u8, 170u8, 110u8, 186u8, 221u8, 76u8, ], ) } - #[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 = " Mapping between a topic (represented by T::Hash) and a vector of indexes"] + #[doc = " of events in the `>` list."] #[doc = ""] - #[doc = "The dispatch origin of this call must be Signed."] + #[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 = "- `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). # "] - #[doc = "- O(1). Just like transfer, but reading the user's transferable balance first."] - #[doc = " #"] - pub fn transfer_all( + #[doc = " The value has the type `(T::BlockNumber, EventIndex)` because if we used only just"] + #[doc = " the `EventIndex` then in case if the topic has the same contents on the next block"] + #[doc = " no notification will be triggered thus the event might be lost."] + pub fn event_topics_root( &self, - dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - keep_alive: ::core::primitive::bool, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Balances", - "transfer_all", - TransferAll { dest, keep_alive }, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec<(::core::primitive::u32, ::core::primitive::u32)>, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "System", + "EventTopics", + Vec::new(), [ - 118u8, 215u8, 198u8, 243u8, 4u8, 173u8, 108u8, 224u8, 113u8, 203u8, - 149u8, 23u8, 130u8, 176u8, 53u8, 205u8, 112u8, 147u8, 88u8, 167u8, - 197u8, 32u8, 104u8, 117u8, 201u8, 168u8, 144u8, 230u8, 120u8, 29u8, - 122u8, 159u8, + 154u8, 29u8, 31u8, 148u8, 254u8, 7u8, 124u8, 251u8, 241u8, 77u8, 24u8, + 37u8, 28u8, 75u8, 205u8, 17u8, 159u8, 79u8, 239u8, 62u8, 67u8, 60u8, + 252u8, 112u8, 215u8, 145u8, 103u8, 170u8, 110u8, 186u8, 221u8, 76u8, ], ) } - #[doc = "Unreserve some balance from a user by force."] - #[doc = ""] - #[doc = "Can only be called by ROOT."] - pub fn force_unreserve( - &self, - who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - amount: ::core::primitive::u128, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Balances", - "force_unreserve", - ForceUnreserve { who, amount }, + #[doc = " Stores the `spec_version` and `spec_name` of when the last runtime upgrade happened."] + pub fn last_runtime_upgrade( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::frame_system::LastRuntimeUpgradeInfo, + ::subxt::storage::address::Yes, + (), + (), + > { + ::subxt::storage::address::Address::new_static( + "System", + "LastRuntimeUpgrade", + vec![], [ - 39u8, 229u8, 111u8, 44u8, 147u8, 80u8, 7u8, 26u8, 185u8, 121u8, 149u8, - 25u8, 151u8, 37u8, 124u8, 46u8, 108u8, 136u8, 167u8, 145u8, 103u8, - 65u8, 33u8, 168u8, 36u8, 214u8, 126u8, 237u8, 180u8, 61u8, 108u8, - 110u8, + 137u8, 29u8, 175u8, 75u8, 197u8, 208u8, 91u8, 207u8, 156u8, 87u8, + 148u8, 68u8, 91u8, 140u8, 22u8, 233u8, 1u8, 229u8, 56u8, 34u8, 40u8, + 194u8, 253u8, 30u8, 163u8, 39u8, 54u8, 209u8, 13u8, 27u8, 139u8, 184u8, ], ) } - } - } - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::pallet_balances::pallet::Event; - pub mod events { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "An account was created with some free balance."] - pub struct Endowed { - pub account: ::subxt::utils::AccountId32, - pub free_balance: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for Endowed { - const EVENT: &'static str = "Endowed"; - const PALLET: &'static str = "Balances"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "An account was removed whose balance was non-zero but below ExistentialDeposit,"] - #[doc = "resulting in an outright loss."] - pub struct DustLost { - pub account: ::subxt::utils::AccountId32, - pub amount: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for DustLost { - const EVENT: &'static str = "DustLost"; - const PALLET: &'static str = "Balances"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "Transfer succeeded."] - pub struct Transfer { - pub from: ::subxt::utils::AccountId32, - pub to: ::subxt::utils::AccountId32, - pub amount: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for Transfer { - const EVENT: &'static str = "Transfer"; - const PALLET: &'static str = "Balances"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "A balance was set by root."] - pub struct BalanceSet { - pub who: ::subxt::utils::AccountId32, - pub free: ::core::primitive::u128, - pub reserved: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for BalanceSet { - const EVENT: &'static str = "BalanceSet"; - const PALLET: &'static str = "Balances"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "Some balance was reserved (moved from free to reserved)."] - pub struct Reserved { - pub who: ::subxt::utils::AccountId32, - pub amount: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for Reserved { - const EVENT: &'static str = "Reserved"; - const PALLET: &'static str = "Balances"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "Some balance was unreserved (moved from reserved to free)."] - pub struct Unreserved { - pub who: ::subxt::utils::AccountId32, - pub amount: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for Unreserved { - const EVENT: &'static str = "Unreserved"; - const PALLET: &'static str = "Balances"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[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: ::subxt::utils::AccountId32, - pub to: ::subxt::utils::AccountId32, - pub amount: ::core::primitive::u128, - pub destination_status: - runtime_types::frame_support::traits::tokens::misc::BalanceStatus, - } - impl ::subxt::events::StaticEvent for ReserveRepatriated { - const EVENT: &'static str = "ReserveRepatriated"; - const PALLET: &'static str = "Balances"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "Some amount was deposited (e.g. for transaction fees)."] - pub struct Deposit { - pub who: ::subxt::utils::AccountId32, - pub amount: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for Deposit { - const EVENT: &'static str = "Deposit"; - const PALLET: &'static str = "Balances"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "Some amount was withdrawn from the account (e.g. for transaction fees)."] - pub struct Withdraw { - pub who: ::subxt::utils::AccountId32, - pub amount: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for Withdraw { - const EVENT: &'static str = "Withdraw"; - const PALLET: &'static str = "Balances"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "Some amount was removed from the account (e.g. for misbehavior)."] - pub struct Slashed { - pub who: ::subxt::utils::AccountId32, - pub amount: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for Slashed { - const EVENT: &'static str = "Slashed"; - const PALLET: &'static str = "Balances"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " The total units issued in the system."] - pub fn total_issuance( + + #[doc = " True if we have upgraded so that `type RefCount` is `u32`. False (default) if not."] + pub fn upgraded_to_u32_ref_count( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::bool, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), > { - ::subxt::storage::address::StaticStorageAddress::new( - "Balances", - "TotalIssuance", + ::subxt::storage::address::Address::new_static( + "System", + "UpgradedToU32RefCount", vec![], [ - 1u8, 206u8, 252u8, 237u8, 6u8, 30u8, 20u8, 232u8, 164u8, 115u8, 51u8, - 156u8, 156u8, 206u8, 241u8, 187u8, 44u8, 84u8, 25u8, 164u8, 235u8, - 20u8, 86u8, 242u8, 124u8, 23u8, 28u8, 140u8, 26u8, 73u8, 231u8, 51u8, + 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, ], ) } - #[doc = " The total units of outstanding deactivated balance in the system."] - pub fn inactive_issuance( + #[doc = " True if we have upgraded so that AccountInfo contains three types of `RefCount`. False"] + #[doc = " (default) if not."] + pub fn upgraded_to_triple_ref_count( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::bool, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), > { - ::subxt::storage::address::StaticStorageAddress::new( - "Balances", - "InactiveIssuance", + ::subxt::storage::address::Address::new_static( + "System", + "UpgradedToTripleRefCount", vec![], [ - 74u8, 203u8, 111u8, 142u8, 225u8, 104u8, 173u8, 51u8, 226u8, 12u8, - 85u8, 135u8, 41u8, 206u8, 177u8, 238u8, 94u8, 246u8, 184u8, 250u8, - 140u8, 213u8, 91u8, 118u8, 163u8, 111u8, 211u8, 46u8, 204u8, 160u8, - 154u8, 21u8, + 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 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( + #[doc = " The execution phase of the block."] + pub fn execution_phase( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_balances::AccountData<::core::primitive::u128>, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::frame_system::Phase, ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Balances", - "Account", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Blake2_128Concat, - )], - [ - 246u8, 154u8, 253u8, 71u8, 192u8, 192u8, 192u8, 236u8, 128u8, 80u8, - 40u8, 252u8, 201u8, 43u8, 3u8, 131u8, 19u8, 49u8, 141u8, 240u8, 172u8, - 217u8, 215u8, 109u8, 87u8, 135u8, 248u8, 57u8, 98u8, 185u8, 22u8, 4u8, - ], - ) - } - - #[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_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_balances::AccountData<::core::primitive::u128>, - >, (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Balances", - "Account", - Vec::new(), - [ - 246u8, 154u8, 253u8, 71u8, 192u8, 192u8, 192u8, 236u8, 128u8, 80u8, - 40u8, 252u8, 201u8, 43u8, 3u8, 131u8, 19u8, 49u8, 141u8, 240u8, 172u8, - 217u8, 215u8, 109u8, 87u8, 135u8, 248u8, 57u8, 98u8, 185u8, 22u8, 4u8, - ], - ) - } - - #[doc = " Any liquidity locks on some account balances."] - #[doc = " NOTE: Should only be accessed when setting, changing and freeing a lock."] - pub fn locks( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec< - runtime_types::pallet_balances::BalanceLock<::core::primitive::u128>, - >, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Balances", - "Locks", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Blake2_128Concat, - )], - [ - 216u8, 253u8, 87u8, 73u8, 24u8, 218u8, 35u8, 0u8, 244u8, 134u8, 195u8, - 58u8, 255u8, 64u8, 153u8, 212u8, 210u8, 232u8, 4u8, 122u8, 90u8, 212u8, - 136u8, 14u8, 127u8, 232u8, 8u8, 192u8, 40u8, 233u8, 18u8, 250u8, - ], - ) - } - - #[doc = " Any liquidity locks on some account balances."] - #[doc = " NOTE: Should only be accessed when setting, changing and freeing a lock."] - pub fn locks_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec< - runtime_types::pallet_balances::BalanceLock<::core::primitive::u128>, - >, - >, (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Balances", - "Locks", - Vec::new(), + ::subxt::storage::address::Address::new_static( + "System", + "ExecutionPhase", + vec![], [ - 216u8, 253u8, 87u8, 73u8, 24u8, 218u8, 35u8, 0u8, 244u8, 134u8, 195u8, - 58u8, 255u8, 64u8, 153u8, 212u8, 210u8, 232u8, 4u8, 122u8, 90u8, 212u8, - 136u8, 14u8, 127u8, 232u8, 8u8, 192u8, 40u8, 233u8, 18u8, 250u8, + 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 = " Named reserves on some account balances."] - pub fn reserves( + #[doc = " The dynamic block length"] + pub fn dynamic_block_length( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - runtime_types::pallet_balances::ReserveData< - [::core::primitive::u8; 8usize], - ::core::primitive::u128, - >, - >, - >, - ::subxt::storage::address::Yes, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::frame_system::limits::BlockLength, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Balances", - "Reserves", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Blake2_128Concat, - )], - [ - 17u8, 32u8, 191u8, 46u8, 76u8, 220u8, 101u8, 100u8, 42u8, 250u8, 128u8, - 167u8, 117u8, 44u8, 85u8, 96u8, 105u8, 216u8, 16u8, 147u8, 74u8, 55u8, - 183u8, 94u8, 160u8, 177u8, 26u8, 187u8, 71u8, 197u8, 187u8, 163u8, - ], - ) - } - - #[doc = " Named reserves on some account balances."] - pub fn reserves_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - runtime_types::pallet_balances::ReserveData< - [::core::primitive::u8; 8usize], - ::core::primitive::u128, - >, - >, - >, (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Balances", - "Reserves", - Vec::new(), + ::subxt::storage::address::Address::new_static( + "System", + "DynamicBlockLength", + vec![], [ - 17u8, 32u8, 191u8, 46u8, 76u8, 220u8, 101u8, 100u8, 42u8, 250u8, 128u8, - 167u8, 117u8, 44u8, 85u8, 96u8, 105u8, 216u8, 16u8, 147u8, 74u8, 55u8, - 183u8, 94u8, 160u8, 177u8, 26u8, 187u8, 71u8, 197u8, 187u8, 163u8, + 217u8, 155u8, 12u8, 122u8, 198u8, 141u8, 119u8, 205u8, 254u8, 77u8, + 138u8, 29u8, 107u8, 11u8, 81u8, 46u8, 163u8, 91u8, 25u8, 176u8, 179u8, + 232u8, 34u8, 239u8, 167u8, 83u8, 208u8, 92u8, 97u8, 166u8, 66u8, 253u8, ], ) } @@ -3523,4117 +2229,3931 @@ pub mod api { use super::runtime_types; pub struct ConstantsApi; impl ConstantsApi { - #[doc = " The minimum amount required to keep an account open."] - pub fn existential_deposit( + #[doc = " Block & extrinsics weights: base values and limits."] + pub fn block_weights( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, - > { - ::subxt::constants::StaticConstantAddress::new( - "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, - ], - ) + ) -> ::subxt::constants::Address + { + ::subxt::constants::Address::new_static("System", "BlockWeights", [ + 238u8, 20u8, 221u8, 11u8, 146u8, 236u8, 47u8, 103u8, 8u8, 239u8, 13u8, + 176u8, 202u8, 10u8, 151u8, 68u8, 110u8, 162u8, 99u8, 40u8, 211u8, 136u8, + 71u8, 82u8, 50u8, 80u8, 244u8, 211u8, 231u8, 198u8, 36u8, 152u8, + ]) } - #[doc = " The maximum number of locks that should exist on an account."] - #[doc = " Not strictly enforced, but used for weight estimation."] - pub fn max_locks( + #[doc = " The maximum length of a block (in bytes)."] + pub fn block_length( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { - ::subxt::constants::StaticConstantAddress::new("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, + ) -> ::subxt::constants::Address { + ::subxt::constants::Address::new_static("System", "BlockLength", [ + 166u8, 7u8, 126u8, 154u8, 133u8, 31u8, 100u8, 149u8, 118u8, 168u8, 1u8, + 21u8, 202u8, 114u8, 104u8, 193u8, 44u8, 97u8, 240u8, 37u8, 177u8, 43u8, + 83u8, 195u8, 176u8, 252u8, 201u8, 229u8, 170u8, 45u8, 136u8, 81u8, ]) } - #[doc = " The maximum number of named reserves that can exist on an account."] - pub fn max_reserves( + #[doc = " Maximum number of block number to block hash mappings to keep (oldest pruned first)."] + pub fn block_hash_count( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { - ::subxt::constants::StaticConstantAddress::new("Balances", "MaxReserves", [ + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static("System", "BlockHashCount", [ 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, 145u8, ]) } - } - } - } - pub mod transaction_payment { - use super::{root_mod, runtime_types}; - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::pallet_transaction_payment::pallet::Event; - pub mod events { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "A transaction fee `actual_fee`, of which `tip` was added to the minimum inclusion fee,"] - #[doc = "has been paid by `who`."] - pub struct TransactionFeePaid { - pub who: ::subxt::utils::AccountId32, - pub actual_fee: ::core::primitive::u128, - pub tip: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for TransactionFeePaid { - const EVENT: &'static str = "TransactionFeePaid"; - const PALLET: &'static str = "TransactionPayment"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - pub fn next_fee_multiplier( + + #[doc = " The weight of runtime database operations the runtime can invoke."] + pub fn db_weight( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_arithmetic::fixed_point::FixedU128, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "TransactionPayment", - "NextFeeMultiplier", - vec![], - [ - 210u8, 0u8, 206u8, 165u8, 183u8, 10u8, 206u8, 52u8, 14u8, 90u8, 218u8, - 197u8, 189u8, 125u8, 113u8, 216u8, 52u8, 161u8, 45u8, 24u8, 245u8, - 237u8, 121u8, 41u8, 106u8, 29u8, 45u8, 129u8, 250u8, 203u8, 206u8, - 180u8, - ], - ) + ) -> ::subxt::constants::Address { + ::subxt::constants::Address::new_static("System", "DbWeight", [ + 206u8, 53u8, 134u8, 247u8, 42u8, 38u8, 197u8, 59u8, 191u8, 83u8, 160u8, + 9u8, 207u8, 133u8, 108u8, 152u8, 150u8, 103u8, 109u8, 228u8, 218u8, 24u8, + 27u8, 210u8, 106u8, 252u8, 74u8, 93u8, 27u8, 63u8, 109u8, 252u8, + ]) } - pub fn storage_version( + #[doc = " Get the chain's current version."] + pub fn version( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_transaction_payment::Releases, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "TransactionPayment", - "StorageVersion", - vec![], - [ - 219u8, 243u8, 82u8, 176u8, 65u8, 5u8, 132u8, 114u8, 8u8, 82u8, 176u8, - 200u8, 97u8, 150u8, 177u8, 164u8, 166u8, 11u8, 34u8, 12u8, 12u8, 198u8, - 58u8, 191u8, 186u8, 221u8, 221u8, 119u8, 181u8, 253u8, 154u8, 228u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " A fee mulitplier for `Operational` extrinsics to compute \"virtual tip\" to boost their"] - #[doc = " `priority`"] - #[doc = ""] - #[doc = " This value is multipled by the `final_fee` to obtain a \"virtual tip\" that is later"] - #[doc = " added to a tip component in regular `priority` calculations."] - #[doc = " It means that a `Normal` transaction can front-run a similarly-sized `Operational`"] - #[doc = " extrinsic (with no tip), by including a tip value greater than the virtual tip."] - #[doc = ""] - #[doc = " ```rust,ignore"] - #[doc = " // For `Normal`"] - #[doc = " let priority = priority_calc(tip);"] - #[doc = ""] - #[doc = " // For `Operational`"] - #[doc = " let virtual_tip = (inclusion_fee + tip) * OperationalFeeMultiplier;"] - #[doc = " let priority = priority_calc(tip + virtual_tip);"] - #[doc = " ```"] - #[doc = ""] - #[doc = " Note that since we use `final_fee` the multiplier applies also to the regular `tip`"] - #[doc = " sent with the transaction. So, not only does the transaction get a priority bump based"] - #[doc = " on the `inclusion_fee`, but we also amplify the impact of tips applied to `Operational`"] - #[doc = " transactions."] - pub fn operational_fee_multiplier( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u8>, - > { - ::subxt::constants::StaticConstantAddress::new( - "TransactionPayment", - "OperationalFeeMultiplier", - [ - 141u8, 130u8, 11u8, 35u8, 226u8, 114u8, 92u8, 179u8, 168u8, 110u8, - 28u8, 91u8, 221u8, 64u8, 4u8, 148u8, 201u8, 193u8, 185u8, 66u8, 226u8, - 114u8, 97u8, 79u8, 62u8, 212u8, 202u8, 114u8, 237u8, 228u8, 183u8, - 165u8, - ], - ) + ) -> ::subxt::constants::Address { + ::subxt::constants::Address::new_static("System", "Version", [ + 134u8, 0u8, 23u8, 0u8, 199u8, 213u8, 89u8, 240u8, 194u8, 186u8, 239u8, + 157u8, 168u8, 211u8, 223u8, 156u8, 138u8, 140u8, 194u8, 23u8, 167u8, 158u8, + 195u8, 233u8, 25u8, 165u8, 27u8, 237u8, 198u8, 206u8, 233u8, 28u8, + ]) + } + + #[doc = " The designated SS58 prefix of this chain."] + #[doc = ""] + #[doc = " This replaces the \"ss58Format\" property declared in the chain spec. Reason is"] + #[doc = " that the runtime should know about the prefix in order to make use of it as"] + #[doc = " an identifier of the chain."] + pub fn ss58_prefix(&self) -> ::subxt::constants::Address<::core::primitive::u16> { + ::subxt::constants::Address::new_static("System", "SS58Prefix", [ + 116u8, 33u8, 2u8, 170u8, 181u8, 147u8, 171u8, 169u8, 167u8, 227u8, 41u8, + 144u8, 11u8, 236u8, 82u8, 100u8, 74u8, 60u8, 184u8, 72u8, 169u8, 90u8, + 208u8, 135u8, 15u8, 117u8, 10u8, 123u8, 128u8, 193u8, 29u8, 70u8, + ]) } } } } - pub mod election_provider_multi_phase { + pub mod utility { use super::{root_mod, runtime_types}; + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub type Error = runtime_types::pallet_utility::pallet::Error; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub type Call = runtime_types::pallet_utility::pallet::Call; pub mod calls { use super::{root_mod, runtime_types}; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct SubmitUnsigned { - pub raw_solution: ::std::boxed::Box< - runtime_types::pallet_election_provider_multi_phase::RawSolution< - runtime_types::da_runtime::constants::staking::NposSolution16, - >, - >, - pub witness: - runtime_types::pallet_election_provider_multi_phase::SolutionOrSnapshotSize, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct SetMinimumUntrustedScore { - pub maybe_next_score: - ::core::option::Option, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct SetEmergencyElectionResult { - pub supports: ::std::vec::Vec<( - ::subxt::utils::AccountId32, - runtime_types::sp_npos_elections::Support<::subxt::utils::AccountId32>, - )>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Submit { - pub raw_solution: ::std::boxed::Box< - runtime_types::pallet_election_provider_multi_phase::RawSolution< - runtime_types::da_runtime::constants::staking::NposSolution16, - >, - >, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct GovernanceFallback { - pub maybe_max_voters: ::core::option::Option<::core::primitive::u32>, - pub maybe_max_targets: ::core::option::Option<::core::primitive::u32>, + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Batch { + pub calls: ::std::vec::Vec, + } + impl ::subxt::blocks::StaticExtrinsic for Batch { + const CALL: &'static str = "batch"; + const PALLET: &'static str = "Utility"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct AsDerivative { + pub index: ::core::primitive::u16, + pub call: ::std::boxed::Box, + } + impl ::subxt::blocks::StaticExtrinsic for AsDerivative { + const CALL: &'static str = "as_derivative"; + const PALLET: &'static str = "Utility"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct BatchAll { + pub calls: ::std::vec::Vec, + } + impl ::subxt::blocks::StaticExtrinsic for BatchAll { + const CALL: &'static str = "batch_all"; + const PALLET: &'static str = "Utility"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct DispatchAs { + pub as_origin: ::std::boxed::Box, + pub call: ::std::boxed::Box, + } + impl ::subxt::blocks::StaticExtrinsic for DispatchAs { + const CALL: &'static str = "dispatch_as"; + const PALLET: &'static str = "Utility"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ForceBatch { + pub calls: ::std::vec::Vec, + } + impl ::subxt::blocks::StaticExtrinsic for ForceBatch { + const CALL: &'static str = "force_batch"; + const PALLET: &'static str = "Utility"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct WithWeight { + pub call: ::std::boxed::Box, + pub weight: runtime_types::sp_weights::weight_v2::Weight, + } + impl ::subxt::blocks::StaticExtrinsic for WithWeight { + const CALL: &'static str = "with_weight"; + const PALLET: &'static str = "Utility"; + } } pub struct TransactionApi; impl TransactionApi { - #[doc = "Submit a solution for the unsigned phase."] + #[doc = "Send a batch of dispatch calls."] #[doc = ""] - #[doc = "The dispatch origin fo this call must be __none__."] + #[doc = "May be called from any origin except `None`."] #[doc = ""] - #[doc = "This submission is checked on the fly. Moreover, this unsigned solution is only"] - #[doc = "validated when submitted to the pool from the **local** node. Effectively, this means"] - #[doc = "that only active validators can submit this transaction when authoring a block (similar"] - #[doc = "to an inherent)."] + #[doc = "- `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 = "To prevent any incorrect solution (and thus wasted time/weight), this transaction will"] - #[doc = "panic if the solution submitted by the validator is invalid in any way, effectively"] - #[doc = "putting their authoring reward at risk."] + #[doc = "If origin is root then the calls are dispatched without checking origin filter. (This"] + #[doc = "includes bypassing `frame_system::Config::BaseCallFilter`)."] #[doc = ""] - #[doc = "No deposit or reward is associated with this submission."] - pub fn submit_unsigned( + #[doc = "# "] + #[doc = "- Complexity: O(C) where C is the number of calls to be batched."] + #[doc = "# "] + #[doc = ""] + #[doc = "This will return `Ok` in all circumstances. To determine the success of the batch, an"] + #[doc = "event is deposited. If a call failed and the batch was interrupted, then the"] + #[doc = "`BatchInterrupted` event is deposited, along with the number of successful calls made"] + #[doc = "and the error of the failed call. If all were successful, then the `BatchCompleted`"] + #[doc = "event is deposited."] + pub fn batch( &self, - raw_solution: runtime_types::pallet_election_provider_multi_phase::RawSolution< - runtime_types::da_runtime::constants::staking::NposSolution16, - >, - witness : runtime_types :: pallet_election_provider_multi_phase :: SolutionOrSnapshotSize, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "ElectionProviderMultiPhase", - "submit_unsigned", - SubmitUnsigned { - raw_solution: ::std::boxed::Box::new(raw_solution), - witness, - }, - [ - 100u8, 240u8, 31u8, 34u8, 93u8, 98u8, 93u8, 57u8, 41u8, 197u8, 97u8, - 58u8, 242u8, 10u8, 69u8, 250u8, 185u8, 169u8, 21u8, 8u8, 202u8, 61u8, - 36u8, 25u8, 4u8, 148u8, 82u8, 56u8, 242u8, 18u8, 27u8, 219u8, - ], - ) + calls: ::std::vec::Vec, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static("Utility", "batch", types::Batch { calls }, [ + 2u8, 253u8, 44u8, 76u8, 48u8, 163u8, 72u8, 50u8, 84u8, 165u8, 66u8, 38u8, + 17u8, 139u8, 240u8, 181u8, 51u8, 250u8, 151u8, 5u8, 24u8, 107u8, 155u8, + 89u8, 62u8, 40u8, 242u8, 130u8, 61u8, 162u8, 169u8, 55u8, + ]) } - #[doc = "Set a new value for `MinimumUntrustedScore`."] + #[doc = "Send a call through an indexed pseudonym of the sender."] #[doc = ""] - #[doc = "Dispatch origin must be aligned with `T::ForceOrigin`."] + #[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 = "This check can be turned off by setting the value to `None`."] - pub fn set_minimum_untrusted_score( + #[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, - maybe_next_score: ::core::option::Option< - runtime_types::sp_npos_elections::ElectionScore, - >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "ElectionProviderMultiPhase", - "set_minimum_untrusted_score", - SetMinimumUntrustedScore { maybe_next_score }, + index: ::core::primitive::u16, + call: runtime_types::da_runtime::RuntimeCall, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Utility", + "as_derivative", + types::AsDerivative { + index, + call: ::std::boxed::Box::new(call), + }, [ - 63u8, 101u8, 105u8, 146u8, 133u8, 162u8, 149u8, 112u8, 150u8, 219u8, - 183u8, 213u8, 234u8, 211u8, 144u8, 74u8, 106u8, 15u8, 62u8, 196u8, - 247u8, 49u8, 20u8, 48u8, 3u8, 105u8, 85u8, 46u8, 76u8, 4u8, 67u8, 81u8, + 46u8, 214u8, 64u8, 185u8, 3u8, 173u8, 50u8, 1u8, 233u8, 183u8, 77u8, + 18u8, 93u8, 255u8, 223u8, 102u8, 143u8, 34u8, 119u8, 116u8, 182u8, + 156u8, 32u8, 168u8, 82u8, 127u8, 154u8, 166u8, 219u8, 195u8, 181u8, + 0u8, ], ) } - #[doc = "Set a solution in the queue, to be handed out to the client of this pallet in the next"] - #[doc = "call to `ElectionProvider::elect`."] + #[doc = "Send a batch of dispatch calls and atomically execute them."] + #[doc = "The whole transaction will rollback and fail if any of the calls failed."] #[doc = ""] - #[doc = "This can only be set by `T::ForceOrigin`, and only when the phase is `Emergency`."] + #[doc = "May be called from any origin except `None`."] #[doc = ""] - #[doc = "The solution is not checked for any feasibility and is assumed to be trustworthy, as any"] - #[doc = "feasibility check itself can in principle cause the election process to fail (due to"] - #[doc = "memory/weight constrains)."] - pub fn set_emergency_election_result( + #[doc = "- `calls`: The calls to be dispatched from the same origin. The number of call must not"] + #[doc = " exceed the constant: `batched_calls_limit` (available in constant metadata)."] + #[doc = ""] + #[doc = "If origin is root then the calls are dispatched without checking origin filter. (This"] + #[doc = "includes bypassing `frame_system::Config::BaseCallFilter`)."] + #[doc = ""] + #[doc = "# "] + #[doc = "- Complexity: O(C) where C is the number of calls to be batched."] + #[doc = "# "] + pub fn batch_all( &self, - supports: ::std::vec::Vec<( - ::subxt::utils::AccountId32, - runtime_types::sp_npos_elections::Support<::subxt::utils::AccountId32>, - )>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "ElectionProviderMultiPhase", - "set_emergency_election_result", - SetEmergencyElectionResult { supports }, + calls: ::std::vec::Vec, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Utility", + "batch_all", + types::BatchAll { calls }, [ - 115u8, 255u8, 205u8, 58u8, 153u8, 1u8, 246u8, 8u8, 225u8, 36u8, 66u8, - 144u8, 250u8, 145u8, 70u8, 76u8, 54u8, 63u8, 251u8, 51u8, 214u8, 204u8, - 55u8, 112u8, 46u8, 228u8, 255u8, 250u8, 151u8, 5u8, 44u8, 133u8, + 81u8, 106u8, 239u8, 62u8, 92u8, 100u8, 249u8, 155u8, 79u8, 60u8, 38u8, + 107u8, 2u8, 31u8, 42u8, 224u8, 243u8, 68u8, 43u8, 75u8, 177u8, 210u8, + 79u8, 28u8, 217u8, 15u8, 107u8, 171u8, 231u8, 25u8, 145u8, 29u8, ], ) } - #[doc = "Submit a solution for the signed phase."] - #[doc = ""] - #[doc = "The dispatch origin fo this call must be __signed__."] + #[doc = "Dispatches a function call with a provided origin."] #[doc = ""] - #[doc = "The solution is potentially queued, based on the claimed score and processed at the end"] - #[doc = "of the signed phase."] + #[doc = "The dispatch origin for this call must be _Root_."] #[doc = ""] - #[doc = "A deposit is reserved and recorded for the solution. Based on the outcome, the solution"] - #[doc = "might be rewarded, slashed, or get all or a part of the deposit back."] - pub fn submit( + #[doc = "# "] + #[doc = "- O(1)."] + #[doc = "- Limited storage reads."] + #[doc = "- One DB write (event)."] + #[doc = "- Weight of derivative `call` execution + T::WeightInfo::dispatch_as()."] + #[doc = "# "] + pub fn dispatch_as( &self, - raw_solution: runtime_types::pallet_election_provider_multi_phase::RawSolution< - runtime_types::da_runtime::constants::staking::NposSolution16, - >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "ElectionProviderMultiPhase", - "submit", - Submit { - raw_solution: ::std::boxed::Box::new(raw_solution), + as_origin: runtime_types::da_runtime::OriginCaller, + call: runtime_types::da_runtime::RuntimeCall, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Utility", + "dispatch_as", + types::DispatchAs { + as_origin: ::std::boxed::Box::new(as_origin), + call: ::std::boxed::Box::new(call), }, [ - 220u8, 167u8, 40u8, 47u8, 253u8, 244u8, 72u8, 124u8, 30u8, 123u8, - 127u8, 227u8, 2u8, 66u8, 119u8, 64u8, 211u8, 200u8, 210u8, 98u8, 248u8, - 132u8, 68u8, 25u8, 34u8, 182u8, 230u8, 225u8, 241u8, 58u8, 193u8, - 134u8, + 231u8, 94u8, 74u8, 134u8, 48u8, 38u8, 54u8, 136u8, 79u8, 153u8, 178u8, + 120u8, 59u8, 105u8, 245u8, 5u8, 70u8, 18u8, 59u8, 118u8, 42u8, 200u8, + 78u8, 117u8, 43u8, 237u8, 105u8, 137u8, 183u8, 99u8, 164u8, 140u8, ], ) } - #[doc = "Trigger the governance fallback."] - #[doc = ""] - #[doc = "This can only be called when [`Phase::Emergency`] is enabled, as an alternative to"] - #[doc = "calling [`Call::set_emergency_election_result`]."] - pub fn governance_fallback( + #[doc = "Send a batch of dispatch calls."] + #[doc = "Unlike `batch`, it allows errors and won't interrupt."] + #[doc = ""] + #[doc = "May be called from any origin except `None`."] + #[doc = ""] + #[doc = "- `calls`: The calls to be dispatched from the same origin. The number of call must not"] + #[doc = " exceed the constant: `batched_calls_limit` (available in constant metadata)."] + #[doc = ""] + #[doc = "If origin is root then the calls are dispatch without checking origin filter. (This"] + #[doc = "includes bypassing `frame_system::Config::BaseCallFilter`)."] + #[doc = ""] + #[doc = "# "] + #[doc = "- Complexity: O(C) where C is the number of calls to be batched."] + #[doc = "# "] + pub fn force_batch( &self, - maybe_max_voters: ::core::option::Option<::core::primitive::u32>, - maybe_max_targets: ::core::option::Option<::core::primitive::u32>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "ElectionProviderMultiPhase", - "governance_fallback", - GovernanceFallback { - maybe_max_voters, - maybe_max_targets, + calls: ::std::vec::Vec, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Utility", + "force_batch", + types::ForceBatch { calls }, + [ + 221u8, 115u8, 115u8, 13u8, 202u8, 100u8, 171u8, 43u8, 165u8, 95u8, + 236u8, 197u8, 31u8, 122u8, 47u8, 208u8, 239u8, 42u8, 181u8, 100u8, + 52u8, 14u8, 208u8, 14u8, 35u8, 153u8, 97u8, 41u8, 162u8, 223u8, 49u8, + 16u8, + ], + ) + } + + #[doc = "Dispatch a function call with a specified weight."] + #[doc = ""] + #[doc = "This function does not check the weight of the call, and instead allows the"] + #[doc = "Root origin to specify the weight of the call."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Root_."] + pub fn with_weight( + &self, + call: runtime_types::da_runtime::RuntimeCall, + weight: runtime_types::sp_weights::weight_v2::Weight, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Utility", + "with_weight", + types::WithWeight { + call: ::std::boxed::Box::new(call), + weight, }, [ - 206u8, 247u8, 76u8, 85u8, 7u8, 24u8, 231u8, 226u8, 192u8, 143u8, 43u8, - 67u8, 91u8, 202u8, 88u8, 176u8, 130u8, 1u8, 83u8, 229u8, 227u8, 200u8, - 179u8, 4u8, 113u8, 60u8, 99u8, 190u8, 53u8, 226u8, 142u8, 182u8, + 156u8, 180u8, 87u8, 26u8, 74u8, 236u8, 175u8, 18u8, 182u8, 17u8, 15u8, + 7u8, 107u8, 49u8, 118u8, 63u8, 186u8, 79u8, 24u8, 135u8, 130u8, 235u8, + 187u8, 134u8, 161u8, 182u8, 139u8, 151u8, 198u8, 187u8, 73u8, 253u8, ], ) } } } #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::pallet_election_provider_multi_phase::pallet::Event; + pub type Event = runtime_types::pallet_utility::pallet::Event; pub mod events { use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "A solution was stored with the given compute."] - #[doc = ""] - #[doc = "The `origin` indicates the origin of the solution. If `origin` is `Some(AccountId)`,"] - #[doc = "the stored solution was submited in the signed phase by a miner with the `AccountId`."] - #[doc = "Otherwise, the solution was stored either during the unsigned phase or by"] - #[doc = "`T::ForceOrigin`. The `bool` is `true` when a previous solution was ejected to make"] - #[doc = "room for this one."] - pub struct SolutionStored { - pub compute: runtime_types::pallet_election_provider_multi_phase::ElectionCompute, - pub origin: ::core::option::Option<::subxt::utils::AccountId32>, - pub prev_ejected: ::core::primitive::bool, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Batch of dispatches did not complete fully. Index of first failing dispatch given, as"] + #[doc = "well as the error."] + pub struct BatchInterrupted { + pub index: ::core::primitive::u32, + pub error: runtime_types::sp_runtime::DispatchError, } - impl ::subxt::events::StaticEvent for SolutionStored { - const EVENT: &'static str = "SolutionStored"; - const PALLET: &'static str = "ElectionProviderMultiPhase"; + impl ::subxt::events::StaticEvent for BatchInterrupted { + const EVENT: &'static str = "BatchInterrupted"; + const PALLET: &'static str = "Utility"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "The election has been finalized, with the given computation and score."] - pub struct ElectionFinalized { - pub compute: runtime_types::pallet_election_provider_multi_phase::ElectionCompute, - pub score: runtime_types::sp_npos_elections::ElectionScore, - } - impl ::subxt::events::StaticEvent for ElectionFinalized { - const EVENT: &'static str = "ElectionFinalized"; - const PALLET: &'static str = "ElectionProviderMultiPhase"; + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Batch of dispatches completed fully with no error."] + pub struct BatchCompleted; + impl ::subxt::events::StaticEvent for BatchCompleted { + const EVENT: &'static str = "BatchCompleted"; + const PALLET: &'static str = "Utility"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "An election failed."] - #[doc = ""] - #[doc = "Not much can be said about which computes failed in the process."] - pub struct ElectionFailed; - impl ::subxt::events::StaticEvent for ElectionFailed { - const EVENT: &'static str = "ElectionFailed"; - const PALLET: &'static str = "ElectionProviderMultiPhase"; + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Batch of dispatches completed but has errors."] + pub struct BatchCompletedWithErrors; + impl ::subxt::events::StaticEvent for BatchCompletedWithErrors { + const EVENT: &'static str = "BatchCompletedWithErrors"; + const PALLET: &'static str = "Utility"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "An account has been rewarded for their signed submission being finalized."] - pub struct Rewarded { - pub account: ::subxt::utils::AccountId32, - pub value: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for Rewarded { - const EVENT: &'static str = "Rewarded"; - const PALLET: &'static str = "ElectionProviderMultiPhase"; + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A single item within a Batch of dispatches has completed with no error."] + pub struct ItemCompleted; + impl ::subxt::events::StaticEvent for ItemCompleted { + const EVENT: &'static str = "ItemCompleted"; + const PALLET: &'static str = "Utility"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "An account has been slashed for submitting an invalid signed submission."] - pub struct Slashed { - pub account: ::subxt::utils::AccountId32, - pub value: ::core::primitive::u128, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A single item within a Batch of dispatches has completed with error."] + pub struct ItemFailed { + pub error: runtime_types::sp_runtime::DispatchError, } - impl ::subxt::events::StaticEvent for Slashed { - const EVENT: &'static str = "Slashed"; - const PALLET: &'static str = "ElectionProviderMultiPhase"; + impl ::subxt::events::StaticEvent for ItemFailed { + const EVENT: &'static str = "ItemFailed"; + const PALLET: &'static str = "Utility"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "There was a phase transition in a given round."] - pub struct PhaseTransitioned { - pub from: runtime_types::pallet_election_provider_multi_phase::Phase< - ::core::primitive::u32, - >, - pub to: runtime_types::pallet_election_provider_multi_phase::Phase< - ::core::primitive::u32, - >, - pub round: ::core::primitive::u32, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A call was dispatched."] + pub struct DispatchedAs { + pub result: ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, } - impl ::subxt::events::StaticEvent for PhaseTransitioned { - const EVENT: &'static str = "PhaseTransitioned"; - const PALLET: &'static str = "ElectionProviderMultiPhase"; + impl ::subxt::events::StaticEvent for DispatchedAs { + const EVENT: &'static str = "DispatchedAs"; + const PALLET: &'static str = "Utility"; } } - pub mod storage { + pub mod constants { use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " Internal counter for the number of rounds."] - #[doc = ""] - #[doc = " This is useful for de-duplication of transactions submitted to the pool, and general"] - #[doc = " diagnostics of the pallet."] - #[doc = ""] - #[doc = " This is merely incremented once per every time that an upstream `elect` is called."] - pub fn round( + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The limit on the number of batched calls."] + pub fn batched_calls_limit( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ElectionProviderMultiPhase", - "Round", - vec![], - [ - 16u8, 49u8, 176u8, 52u8, 202u8, 111u8, 120u8, 8u8, 217u8, 96u8, 35u8, - 14u8, 233u8, 130u8, 47u8, 98u8, 34u8, 44u8, 166u8, 188u8, 199u8, 210u8, - 21u8, 19u8, 70u8, 96u8, 139u8, 8u8, 53u8, 82u8, 165u8, 239u8, - ], - ) + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static("Utility", "batched_calls_limit", [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, 125u8, + 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, 178u8, 197u8, + 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, 145u8, + ]) } - - #[doc = " Current phase."] - pub fn current_phase( + } + } + } + pub mod babe { + use super::{root_mod, runtime_types}; + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub type Error = runtime_types::pallet_babe::pallet::Error; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub type Call = runtime_types::pallet_babe::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 :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ReportEquivocation { + pub equivocation_proof: ::std::boxed::Box< + runtime_types::sp_consensus_slots::EquivocationProof< + runtime_types::avail_core::header::Header< + ::core::primitive::u32, + runtime_types::sp_runtime::traits::BlakeTwo256, + >, + runtime_types::sp_consensus_babe::app::Public, + >, + >, + pub key_owner_proof: runtime_types::sp_session::MembershipProof, + } + impl ::subxt::blocks::StaticExtrinsic for ReportEquivocation { + const CALL: &'static str = "report_equivocation"; + const PALLET: &'static str = "Babe"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ReportEquivocationUnsigned { + pub equivocation_proof: ::std::boxed::Box< + runtime_types::sp_consensus_slots::EquivocationProof< + runtime_types::avail_core::header::Header< + ::core::primitive::u32, + runtime_types::sp_runtime::traits::BlakeTwo256, + >, + runtime_types::sp_consensus_babe::app::Public, + >, + >, + pub key_owner_proof: runtime_types::sp_session::MembershipProof, + } + impl ::subxt::blocks::StaticExtrinsic for ReportEquivocationUnsigned { + const CALL: &'static str = "report_equivocation_unsigned"; + const PALLET: &'static str = "Babe"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct PlanConfigChange { + pub config: runtime_types::sp_consensus_babe::digests::NextConfigDescriptor, + } + impl ::subxt::blocks::StaticExtrinsic for PlanConfigChange { + const CALL: &'static str = "plan_config_change"; + const PALLET: &'static str = "Babe"; + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Report authority equivocation/misbehavior. This method will verify"] + #[doc = "the equivocation proof and validate the given key ownership proof"] + #[doc = "against the extracted offender. If both are valid, the offence will"] + #[doc = "be reported."] + pub fn report_equivocation( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_election_provider_multi_phase::Phase< + equivocation_proof: runtime_types::sp_consensus_slots::EquivocationProof< + runtime_types::avail_core::header::Header< ::core::primitive::u32, + runtime_types::sp_runtime::traits::BlakeTwo256, >, + runtime_types::sp_consensus_babe::app::Public, >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ElectionProviderMultiPhase", - "CurrentPhase", - vec![], + key_owner_proof: runtime_types::sp_session::MembershipProof, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Babe", + "report_equivocation", + types::ReportEquivocation { + equivocation_proof: ::std::boxed::Box::new(equivocation_proof), + key_owner_proof, + }, [ - 236u8, 101u8, 8u8, 52u8, 68u8, 240u8, 74u8, 159u8, 181u8, 53u8, 153u8, - 101u8, 228u8, 81u8, 96u8, 161u8, 34u8, 67u8, 35u8, 28u8, 121u8, 44u8, - 229u8, 45u8, 196u8, 87u8, 73u8, 125u8, 216u8, 245u8, 255u8, 15u8, + 119u8, 52u8, 131u8, 190u8, 86u8, 255u8, 95u8, 84u8, 22u8, 237u8, 182u8, + 255u8, 232u8, 242u8, 153u8, 230u8, 13u8, 139u8, 206u8, 81u8, 71u8, + 227u8, 105u8, 72u8, 88u8, 159u8, 226u8, 106u8, 96u8, 220u8, 96u8, + 239u8, ], ) } - #[doc = " Current best solution, signed or unsigned, queued to be returned upon `elect`."] - pub fn queued_solution( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_election_provider_multi_phase::ReadySolution, - >, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ElectionProviderMultiPhase", - "QueuedSolution", - vec![], + #[doc = "Report authority equivocation/misbehavior. This method will verify"] + #[doc = "the equivocation proof and validate the given key ownership proof"] + #[doc = "against the extracted offender. If both are valid, the offence will"] + #[doc = "be reported."] + #[doc = "This extrinsic must be called unsigned and it is expected that only"] + #[doc = "block authors will call it (validated in `ValidateUnsigned`), as such"] + #[doc = "if the block author is defined it will be defined as the equivocation"] + #[doc = "reporter."] + pub fn report_equivocation_unsigned( + &self, + equivocation_proof: runtime_types::sp_consensus_slots::EquivocationProof< + runtime_types::avail_core::header::Header< + ::core::primitive::u32, + runtime_types::sp_runtime::traits::BlakeTwo256, + >, + runtime_types::sp_consensus_babe::app::Public, + >, + key_owner_proof: runtime_types::sp_session::MembershipProof, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Babe", + "report_equivocation_unsigned", + types::ReportEquivocationUnsigned { + equivocation_proof: ::std::boxed::Box::new(equivocation_proof), + key_owner_proof, + }, [ - 11u8, 152u8, 13u8, 167u8, 204u8, 209u8, 171u8, 249u8, 59u8, 250u8, - 58u8, 152u8, 164u8, 121u8, 146u8, 112u8, 241u8, 16u8, 159u8, 251u8, - 209u8, 251u8, 114u8, 29u8, 188u8, 30u8, 84u8, 71u8, 136u8, 173u8, - 145u8, 236u8, + 111u8, 105u8, 167u8, 169u8, 87u8, 120u8, 54u8, 132u8, 144u8, 132u8, + 77u8, 33u8, 80u8, 162u8, 114u8, 220u8, 108u8, 49u8, 83u8, 100u8, 156u8, + 73u8, 32u8, 165u8, 37u8, 109u8, 113u8, 99u8, 83u8, 71u8, 75u8, 173u8, ], ) } - #[doc = " Snapshot data of the round."] - #[doc = ""] - #[doc = " This is created at the beginning of the signed phase and cleared upon calling `elect`."] - pub fn snapshot( + #[doc = "Plan an epoch config change. The epoch config change is recorded and will be enacted on"] + #[doc = "the next call to `enact_epoch_change`. The config will be activated one epoch after."] + #[doc = "Multiple calls to this method will replace any existing planned config change that had"] + #[doc = "not been enacted yet."] + pub fn plan_config_change( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_election_provider_multi_phase::RoundSnapshot, - >, + config: runtime_types::sp_consensus_babe::digests::NextConfigDescriptor, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Babe", + "plan_config_change", + types::PlanConfigChange { config }, + [ + 165u8, 26u8, 134u8, 130u8, 137u8, 42u8, 127u8, 161u8, 117u8, 251u8, + 215u8, 241u8, 69u8, 224u8, 134u8, 1u8, 187u8, 203u8, 168u8, 139u8, + 121u8, 243u8, 235u8, 223u8, 135u8, 128u8, 227u8, 129u8, 183u8, 51u8, + 135u8, 79u8, + ], + ) + } + } + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " Current epoch index."] + pub fn epoch_index( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u64, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static("Babe", "EpochIndex", vec![], [ + 32u8, 82u8, 130u8, 31u8, 190u8, 162u8, 237u8, 189u8, 104u8, 244u8, 30u8, + 199u8, 179u8, 0u8, 161u8, 107u8, 72u8, 240u8, 201u8, 222u8, 177u8, 222u8, + 35u8, 156u8, 81u8, 132u8, 162u8, 118u8, 238u8, 84u8, 112u8, 89u8, + ]) + } + + #[doc = " Current epoch authorities."] + pub fn authorities( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec<( + runtime_types::sp_consensus_babe::app::Public, + ::core::primitive::u64, + )>, + ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), + > { + ::subxt::storage::address::Address::new_static("Babe", "Authorities", vec![], [ + 67u8, 196u8, 244u8, 13u8, 246u8, 245u8, 198u8, 98u8, 81u8, 55u8, 182u8, + 187u8, 214u8, 5u8, 181u8, 76u8, 251u8, 213u8, 144u8, 166u8, 36u8, 153u8, + 234u8, 181u8, 252u8, 55u8, 198u8, 175u8, 55u8, 211u8, 105u8, 85u8, + ]) + } + + #[doc = " The slot at which the first epoch actually started. This is 0"] + #[doc = " until the first block of the chain."] + pub fn genesis_slot( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::sp_consensus_slots::Slot, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), > { - ::subxt::storage::address::StaticStorageAddress::new( - "ElectionProviderMultiPhase", - "Snapshot", - vec![], - [ - 239u8, 56u8, 191u8, 77u8, 150u8, 224u8, 248u8, 88u8, 132u8, 224u8, - 164u8, 83u8, 253u8, 36u8, 46u8, 156u8, 72u8, 152u8, 36u8, 206u8, 72u8, - 27u8, 226u8, 87u8, 146u8, 220u8, 93u8, 178u8, 26u8, 115u8, 232u8, 71u8, - ], - ) + ::subxt::storage::address::Address::new_static("Babe", "GenesisSlot", vec![], [ + 218u8, 174u8, 152u8, 76u8, 188u8, 214u8, 7u8, 88u8, 253u8, 187u8, 139u8, + 234u8, 51u8, 28u8, 220u8, 57u8, 73u8, 1u8, 18u8, 205u8, 80u8, 160u8, 120u8, + 216u8, 139u8, 191u8, 100u8, 108u8, 162u8, 106u8, 175u8, 107u8, + ]) } - #[doc = " Desired number of targets to elect for this round."] + #[doc = " Current slot number."] + pub fn current_slot( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::sp_consensus_slots::Slot, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static("Babe", "CurrentSlot", vec![], [ + 112u8, 199u8, 115u8, 248u8, 217u8, 242u8, 45u8, 231u8, 178u8, 53u8, 236u8, + 167u8, 219u8, 238u8, 81u8, 243u8, 39u8, 140u8, 68u8, 19u8, 201u8, 169u8, + 211u8, 133u8, 135u8, 213u8, 150u8, 105u8, 60u8, 252u8, 43u8, 57u8, + ]) + } + + #[doc = " The epoch randomness for the *current* epoch."] #[doc = ""] - #[doc = " Only exists when [`Snapshot`] is present."] - pub fn desired_targets( + #[doc = " # Security"] + #[doc = ""] + #[doc = " This MUST NOT be used for gambling, as it can be influenced by a"] + #[doc = " malicious validator in the short term. It MAY be used in many"] + #[doc = " cryptographic protocols, however, so long as one remembers that this"] + #[doc = " (like everything else on-chain) it is public. For example, it can be"] + #[doc = " used where a number is needed that cannot have been chosen by an"] + #[doc = " adversary, for purposes such as public-coin zero-knowledge proofs."] + pub fn randomness( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + [::core::primitive::u8; 32usize], + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static("Babe", "Randomness", vec![], [ + 36u8, 15u8, 52u8, 73u8, 195u8, 177u8, 186u8, 125u8, 134u8, 11u8, 103u8, + 248u8, 170u8, 237u8, 105u8, 239u8, 168u8, 204u8, 147u8, 52u8, 15u8, 226u8, + 126u8, 176u8, 133u8, 186u8, 169u8, 241u8, 156u8, 118u8, 67u8, 58u8, + ]) + } + + #[doc = " Pending epoch configuration change that will be applied when the next epoch is enacted."] + pub fn pending_epoch_config_change( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::sp_consensus_babe::digests::NextConfigDescriptor, ::subxt::storage::address::Yes, (), (), > { - ::subxt::storage::address::StaticStorageAddress::new( - "ElectionProviderMultiPhase", - "DesiredTargets", + ::subxt::storage::address::Address::new_static( + "Babe", + "PendingEpochConfigChange", vec![], [ - 16u8, 247u8, 4u8, 181u8, 93u8, 79u8, 12u8, 212u8, 146u8, 167u8, 80u8, - 58u8, 118u8, 52u8, 68u8, 87u8, 90u8, 140u8, 31u8, 210u8, 2u8, 116u8, - 220u8, 231u8, 115u8, 112u8, 118u8, 118u8, 68u8, 34u8, 151u8, 165u8, + 71u8, 143u8, 197u8, 44u8, 242u8, 120u8, 71u8, 244u8, 41u8, 201u8, + 132u8, 103u8, 96u8, 23u8, 111u8, 232u8, 30u8, 35u8, 154u8, 251u8, + 183u8, 23u8, 144u8, 80u8, 101u8, 117u8, 43u8, 228u8, 174u8, 221u8, + 183u8, 165u8, ], ) } - #[doc = " The metadata of the [`RoundSnapshot`]"] - #[doc = ""] - #[doc = " Only exists when [`Snapshot`] is present."] - pub fn snapshot_metadata( + #[doc = " Next epoch randomness."] + pub fn next_randomness( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_election_provider_multi_phase::SolutionOrSnapshotSize, - >, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + [::core::primitive::u8; 32usize], + ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, - (), (), > { - ::subxt::storage::address::StaticStorageAddress::new( - "ElectionProviderMultiPhase", - "SnapshotMetadata", + ::subxt::storage::address::Address::new_static( + "Babe", + "NextRandomness", vec![], [ - 135u8, 122u8, 60u8, 75u8, 194u8, 240u8, 187u8, 96u8, 240u8, 203u8, - 192u8, 22u8, 117u8, 148u8, 118u8, 24u8, 240u8, 213u8, 94u8, 22u8, - 194u8, 47u8, 181u8, 245u8, 77u8, 149u8, 11u8, 251u8, 117u8, 220u8, - 205u8, 78u8, + 96u8, 191u8, 139u8, 171u8, 144u8, 92u8, 33u8, 58u8, 23u8, 219u8, 164u8, + 121u8, 59u8, 209u8, 112u8, 244u8, 50u8, 8u8, 14u8, 244u8, 103u8, 125u8, + 120u8, 210u8, 16u8, 250u8, 54u8, 192u8, 72u8, 8u8, 219u8, 152u8, ], ) } - #[doc = " The next index to be assigned to an incoming signed submission."] - #[doc = ""] - #[doc = " Every accepted submission is assigned a unique index; that index is bound to that particular"] - #[doc = " submission for the duration of the election. On election finalization, the next index is"] - #[doc = " reset to 0."] - #[doc = ""] - #[doc = " We can't just use `SignedSubmissionIndices.len()`, because that's a bounded set; past its"] - #[doc = " capacity, it will simply saturate. We can't just iterate over `SignedSubmissionsMap`,"] - #[doc = " because iteration is slow. Instead, we store the value here."] - pub fn signed_submission_next_index( + #[doc = " Next epoch authorities."] + pub fn next_authorities( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec<( + runtime_types::sp_consensus_babe::app::Public, + ::core::primitive::u64, + )>, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), > { - ::subxt::storage::address::StaticStorageAddress::new( - "ElectionProviderMultiPhase", - "SignedSubmissionNextIndex", + ::subxt::storage::address::Address::new_static( + "Babe", + "NextAuthorities", vec![], [ - 242u8, 11u8, 157u8, 105u8, 96u8, 7u8, 31u8, 20u8, 51u8, 141u8, 182u8, - 180u8, 13u8, 172u8, 155u8, 59u8, 42u8, 238u8, 115u8, 8u8, 6u8, 137u8, - 45u8, 2u8, 123u8, 187u8, 53u8, 215u8, 19u8, 129u8, 54u8, 22u8, + 116u8, 95u8, 126u8, 199u8, 237u8, 90u8, 202u8, 227u8, 247u8, 56u8, + 201u8, 113u8, 239u8, 191u8, 151u8, 56u8, 156u8, 133u8, 61u8, 64u8, + 141u8, 26u8, 8u8, 95u8, 177u8, 255u8, 54u8, 223u8, 132u8, 74u8, 210u8, + 128u8, ], ) } - #[doc = " A sorted, bounded vector of `(score, block_number, index)`, where each `index` points to a"] - #[doc = " value in `SignedSubmissions`."] + #[doc = " Randomness under construction."] #[doc = ""] - #[doc = " We never need to process more than a single signed submission at a time. Signed submissions"] - #[doc = " can be quite large, so we're willing to pay the cost of multiple database accesses to access"] - #[doc = " them one at a time instead of reading and decoding all of them at once."] - pub fn signed_submission_indices( + #[doc = " We make a trade-off between storage accesses and list length."] + #[doc = " We store the under-construction randomness in segments of up to"] + #[doc = " `UNDER_CONSTRUCTION_SEGMENT_LENGTH`."] + #[doc = ""] + #[doc = " Once a segment reaches this length, we begin the next one."] + #[doc = " We reset all segments and return to `0` at the beginning of every"] + #[doc = " epoch."] + pub fn segment_index( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_core::bounded::bounded_vec::BoundedVec<( - runtime_types::sp_npos_elections::ElectionScore, - ::core::primitive::u32, - ::core::primitive::u32, - )>, - >, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), > { - ::subxt::storage::address::StaticStorageAddress::new( - "ElectionProviderMultiPhase", - "SignedSubmissionIndices", + ::subxt::storage::address::Address::new_static( + "Babe", + "SegmentIndex", vec![], [ - 228u8, 166u8, 94u8, 248u8, 71u8, 26u8, 125u8, 81u8, 32u8, 22u8, 46u8, - 185u8, 209u8, 123u8, 46u8, 17u8, 152u8, 149u8, 222u8, 125u8, 112u8, - 230u8, 29u8, 177u8, 162u8, 214u8, 66u8, 38u8, 170u8, 121u8, 129u8, - 100u8, + 145u8, 91u8, 142u8, 240u8, 184u8, 94u8, 68u8, 52u8, 130u8, 3u8, 75u8, + 175u8, 155u8, 130u8, 66u8, 9u8, 150u8, 242u8, 123u8, 111u8, 124u8, + 241u8, 100u8, 128u8, 220u8, 133u8, 96u8, 227u8, 164u8, 241u8, 170u8, + 34u8, ], ) } - #[doc = " Unchecked, signed solutions."] - #[doc = ""] - #[doc = " Together with `SubmissionIndices`, this stores a bounded set of `SignedSubmissions` while"] - #[doc = " allowing us to keep only a single one in memory at a time."] - #[doc = ""] - #[doc = " Twox note: the key of the map is an auto-incrementing index which users cannot inspect or"] - #[doc = " affect; we shouldn't need a cryptographically secure hasher."] pub fn signed_submissions_map (& self , _0 : impl :: std :: borrow :: Borrow < :: core :: primitive :: u32 > ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < runtime_types :: pallet_election_provider_multi_phase :: signed :: SignedSubmission < :: subxt :: utils :: AccountId32 , :: core :: primitive :: u128 , runtime_types :: da_runtime :: constants :: staking :: NposSolution16 > > , :: subxt :: storage :: address :: Yes , () , :: subxt :: storage :: address :: Yes >{ - ::subxt::storage::address::StaticStorageAddress::new( - "ElectionProviderMultiPhase", - "SignedSubmissionsMap", - vec![::subxt::storage::address::StorageMapKey::new( + #[doc = " TWOX-NOTE: `SegmentIndex` is an increasing integer, so this is okay."] + pub fn under_construction( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + [::core::primitive::u8; 32usize], + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Babe", + "UnderConstruction", + vec![::subxt::storage::address::make_static_storage_map_key( _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ - 84u8, 65u8, 205u8, 191u8, 143u8, 246u8, 239u8, 27u8, 243u8, 54u8, - 250u8, 8u8, 125u8, 32u8, 241u8, 141u8, 210u8, 225u8, 56u8, 101u8, - 241u8, 52u8, 157u8, 29u8, 13u8, 155u8, 73u8, 132u8, 118u8, 53u8, 2u8, - 135u8, + 120u8, 120u8, 59u8, 247u8, 50u8, 6u8, 220u8, 14u8, 2u8, 76u8, 203u8, + 244u8, 232u8, 144u8, 253u8, 191u8, 101u8, 35u8, 99u8, 85u8, 111u8, + 168u8, 31u8, 110u8, 187u8, 124u8, 72u8, 32u8, 43u8, 66u8, 8u8, 215u8, ], ) } - #[doc = " Unchecked, signed solutions."] - #[doc = ""] - #[doc = " Together with `SubmissionIndices`, this stores a bounded set of `SignedSubmissions` while"] - #[doc = " allowing us to keep only a single one in memory at a time."] - #[doc = ""] - #[doc = " Twox note: the key of the map is an auto-incrementing index which users cannot inspect or"] - #[doc = " affect; we shouldn't need a cryptographically secure hasher."] pub fn signed_submissions_map_root (& self ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < runtime_types :: pallet_election_provider_multi_phase :: signed :: SignedSubmission < :: subxt :: utils :: AccountId32 , :: core :: primitive :: u128 , runtime_types :: da_runtime :: constants :: staking :: NposSolution16 > > , () , () , :: subxt :: storage :: address :: Yes >{ - ::subxt::storage::address::StaticStorageAddress::new( - "ElectionProviderMultiPhase", - "SignedSubmissionsMap", + #[doc = " TWOX-NOTE: `SegmentIndex` is an increasing integer, so this is okay."] + pub fn under_construction_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + [::core::primitive::u8; 32usize], + >, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Babe", + "UnderConstruction", Vec::new(), [ - 84u8, 65u8, 205u8, 191u8, 143u8, 246u8, 239u8, 27u8, 243u8, 54u8, - 250u8, 8u8, 125u8, 32u8, 241u8, 141u8, 210u8, 225u8, 56u8, 101u8, - 241u8, 52u8, 157u8, 29u8, 13u8, 155u8, 73u8, 132u8, 118u8, 53u8, 2u8, - 135u8, + 120u8, 120u8, 59u8, 247u8, 50u8, 6u8, 220u8, 14u8, 2u8, 76u8, 203u8, + 244u8, 232u8, 144u8, 253u8, 191u8, 101u8, 35u8, 99u8, 85u8, 111u8, + 168u8, 31u8, 110u8, 187u8, 124u8, 72u8, 32u8, 43u8, 66u8, 8u8, 215u8, ], ) } - #[doc = " The minimum score that each 'untrusted' solution must attain in order to be considered"] - #[doc = " feasible."] - #[doc = ""] - #[doc = " Can be set via `set_minimum_untrusted_score`."] - pub fn minimum_untrusted_score( + #[doc = " Temporary value (cleared at block finalization) which is `Some`"] + #[doc = " if per-block initialization has already been called for current block."] + pub fn initialized( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_npos_elections::ElectionScore, - >, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::option::Option, ::subxt::storage::address::Yes, (), (), > { - ::subxt::storage::address::StaticStorageAddress::new( - "ElectionProviderMultiPhase", - "MinimumUntrustedScore", + ::subxt::storage::address::Address::new_static("Babe", "Initialized", vec![], [ + 56u8, 150u8, 169u8, 106u8, 251u8, 73u8, 237u8, 53u8, 217u8, 32u8, 137u8, + 26u8, 138u8, 233u8, 40u8, 125u8, 33u8, 155u8, 0u8, 26u8, 186u8, 22u8, + 243u8, 43u8, 64u8, 251u8, 74u8, 91u8, 110u8, 127u8, 240u8, 140u8, + ]) + } + + #[doc = " This field should always be populated during block processing unless"] + #[doc = " secondary plain slots are enabled (which don't contain a VRF output)."] + #[doc = ""] + #[doc = " It is set in `on_finalize`, before it will contain the value from the last block."] + pub fn author_vrf_randomness( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::option::Option<[::core::primitive::u8; 32usize]>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "Babe", + "AuthorVrfRandomness", vec![], [ - 77u8, 235u8, 181u8, 45u8, 230u8, 12u8, 0u8, 179u8, 152u8, 38u8, 74u8, - 199u8, 47u8, 84u8, 85u8, 55u8, 171u8, 226u8, 217u8, 125u8, 17u8, 194u8, - 95u8, 157u8, 73u8, 245u8, 75u8, 130u8, 248u8, 7u8, 53u8, 226u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " Duration of the unsigned phase."] - pub fn unsigned_phase( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { - ::subxt::constants::StaticConstantAddress::new( - "ElectionProviderMultiPhase", - "UnsignedPhase", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, + 160u8, 157u8, 62u8, 48u8, 196u8, 136u8, 63u8, 132u8, 155u8, 183u8, + 91u8, 201u8, 146u8, 29u8, 192u8, 142u8, 168u8, 152u8, 197u8, 233u8, + 5u8, 25u8, 0u8, 154u8, 234u8, 180u8, 146u8, 132u8, 106u8, 164u8, 149u8, + 63u8, ], ) } - #[doc = " Duration of the signed phase."] - pub fn signed_phase( + #[doc = " The block numbers when the last and current epoch have started, respectively `N-1` and"] + #[doc = " `N`."] + #[doc = " NOTE: We track this is in order to annotate the block number when a given pool of"] + #[doc = " entropy was fixed (i.e. it was known to chain observers). Since epochs are defined in"] + #[doc = " slots, which may be skipped, the block numbers may not line up with the slot numbers."] + pub fn epoch_start( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + (::core::primitive::u32, ::core::primitive::u32), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), > { - ::subxt::constants::StaticConstantAddress::new( - "ElectionProviderMultiPhase", - "SignedPhase", - [ - 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, - ], - ) + ::subxt::storage::address::Address::new_static("Babe", "EpochStart", vec![], [ + 246u8, 69u8, 165u8, 217u8, 181u8, 138u8, 201u8, 64u8, 251u8, 121u8, 50u8, + 231u8, 221u8, 144u8, 225u8, 249u8, 42u8, 135u8, 31u8, 136u8, 21u8, 160u8, + 186u8, 148u8, 139u8, 232u8, 182u8, 121u8, 82u8, 110u8, 14u8, 160u8, + ]) } - #[doc = " The minimum amount of improvement to the solution score that defines a solution as"] - #[doc = " \"better\" in the Signed phase."] - pub fn better_signed_threshold( + #[doc = " How late the current block is compared to its parent."] + #[doc = ""] + #[doc = " This entry is populated as part of block execution and is cleaned up"] + #[doc = " on block finalization. Querying this storage entry outside of block"] + #[doc = " execution context should always yield zero."] + pub fn lateness( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_arithmetic::per_things::Perbill, - >, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), > { - ::subxt::constants::StaticConstantAddress::new( - "ElectionProviderMultiPhase", - "BetterSignedThreshold", - [ - 225u8, 236u8, 95u8, 157u8, 90u8, 94u8, 106u8, 192u8, 254u8, 19u8, 87u8, - 80u8, 16u8, 62u8, 42u8, 204u8, 136u8, 106u8, 225u8, 53u8, 212u8, 52u8, - 177u8, 79u8, 4u8, 116u8, 201u8, 104u8, 222u8, 75u8, 86u8, 227u8, - ], - ) + ::subxt::storage::address::Address::new_static("Babe", "Lateness", vec![], [ + 229u8, 214u8, 133u8, 149u8, 32u8, 159u8, 26u8, 22u8, 252u8, 131u8, 200u8, + 191u8, 231u8, 176u8, 178u8, 127u8, 33u8, 212u8, 139u8, 220u8, 157u8, 38u8, + 4u8, 226u8, 204u8, 32u8, 55u8, 20u8, 205u8, 141u8, 29u8, 87u8, + ]) } - #[doc = " The minimum amount of improvement to the solution score that defines a solution as"] - #[doc = " \"better\" in the Unsigned phase."] - pub fn better_unsigned_threshold( + #[doc = " The configuration for the current epoch. Should never be `None` as it is initialized in"] + #[doc = " genesis."] + pub fn epoch_config( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_arithmetic::per_things::Perbill, - >, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::sp_consensus_babe::BabeEpochConfiguration, + ::subxt::storage::address::Yes, + (), + (), > { - ::subxt::constants::StaticConstantAddress::new( - "ElectionProviderMultiPhase", - "BetterUnsignedThreshold", - [ - 225u8, 236u8, 95u8, 157u8, 90u8, 94u8, 106u8, 192u8, 254u8, 19u8, 87u8, - 80u8, 16u8, 62u8, 42u8, 204u8, 136u8, 106u8, 225u8, 53u8, 212u8, 52u8, - 177u8, 79u8, 4u8, 116u8, 201u8, 104u8, 222u8, 75u8, 86u8, 227u8, - ], - ) + ::subxt::storage::address::Address::new_static("Babe", "EpochConfig", vec![], [ + 23u8, 188u8, 70u8, 119u8, 36u8, 199u8, 230u8, 191u8, 131u8, 219u8, 85u8, + 201u8, 237u8, 70u8, 214u8, 149u8, 212u8, 94u8, 87u8, 87u8, 62u8, 16u8, + 46u8, 143u8, 73u8, 169u8, 42u8, 139u8, 157u8, 139u8, 190u8, 166u8, + ]) } - #[doc = " The repeat threshold of the offchain worker."] - #[doc = ""] - #[doc = " For example, if it is 5, that means that at least 5 blocks will elapse between attempts"] - #[doc = " to submit the worker's solution."] - pub fn offchain_repeat( + #[doc = " The configuration for the next epoch, `None` if the config will not change"] + #[doc = " (you can fallback to `EpochConfig` instead in that case)."] + pub fn next_epoch_config( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::sp_consensus_babe::BabeEpochConfiguration, + ::subxt::storage::address::Yes, + (), + (), > { - ::subxt::constants::StaticConstantAddress::new( - "ElectionProviderMultiPhase", - "OffchainRepeat", + ::subxt::storage::address::Address::new_static( + "Babe", + "NextEpochConfig", + vec![], [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, + 35u8, 132u8, 198u8, 33u8, 167u8, 69u8, 180u8, 215u8, 207u8, 40u8, 35u8, + 78u8, 167u8, 22u8, 32u8, 246u8, 111u8, 207u8, 88u8, 13u8, 28u8, 86u8, + 220u8, 102u8, 35u8, 105u8, 160u8, 163u8, 13u8, 99u8, 142u8, 69u8, ], ) } - - #[doc = " The priority of the unsigned transaction submitted in the unsigned-phase"] - pub fn miner_tx_priority( + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The amount of time, in slots, that each epoch should last."] + #[doc = " NOTE: Currently it is not possible to change the epoch duration after"] + #[doc = " the chain has started. Attempting to do so will brick block production."] + pub fn epoch_duration( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u64>, - > { - ::subxt::constants::StaticConstantAddress::new( - "ElectionProviderMultiPhase", - "MinerTxPriority", - [ - 128u8, 214u8, 205u8, 242u8, 181u8, 142u8, 124u8, 231u8, 190u8, 146u8, - 59u8, 226u8, 157u8, 101u8, 103u8, 117u8, 249u8, 65u8, 18u8, 191u8, - 103u8, 119u8, 53u8, 85u8, 81u8, 96u8, 220u8, 42u8, 184u8, 239u8, 42u8, - 246u8, - ], - ) + ) -> ::subxt::constants::Address<::core::primitive::u64> { + ::subxt::constants::Address::new_static("Babe", "EpochDuration", [ + 128u8, 214u8, 205u8, 242u8, 181u8, 142u8, 124u8, 231u8, 190u8, 146u8, 59u8, + 226u8, 157u8, 101u8, 103u8, 117u8, 249u8, 65u8, 18u8, 191u8, 103u8, 119u8, + 53u8, 85u8, 81u8, 96u8, 220u8, 42u8, 184u8, 239u8, 42u8, 246u8, + ]) } - #[doc = " Maximum number of signed submissions that can be queued."] - #[doc = ""] - #[doc = " It is best to avoid adjusting this during an election, as it impacts downstream data"] - #[doc = " structures. In particular, `SignedSubmissionIndices` is bounded on this value. If you"] - #[doc = " update this value during an election, you _must_ ensure that"] - #[doc = " `SignedSubmissionIndices.len()` is less than or equal to the new value. Otherwise,"] - #[doc = " attempts to submit new solutions may cause a runtime panic."] - pub fn signed_max_submissions( + #[doc = " The expected average block time at which BABE should be creating"] + #[doc = " blocks. Since BABE is probabilistic it is not trivial to figure out"] + #[doc = " what the expected average block time should be based on the slot"] + #[doc = " duration and the security parameter `c` (where `1 - c` represents"] + #[doc = " the probability of a slot being empty)."] + pub fn expected_block_time( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { - ::subxt::constants::StaticConstantAddress::new( - "ElectionProviderMultiPhase", - "SignedMaxSubmissions", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, - ], - ) + ) -> ::subxt::constants::Address<::core::primitive::u64> { + ::subxt::constants::Address::new_static("Babe", "ExpectedBlockTime", [ + 128u8, 214u8, 205u8, 242u8, 181u8, 142u8, 124u8, 231u8, 190u8, 146u8, 59u8, + 226u8, 157u8, 101u8, 103u8, 117u8, 249u8, 65u8, 18u8, 191u8, 103u8, 119u8, + 53u8, 85u8, 81u8, 96u8, 220u8, 42u8, 184u8, 239u8, 42u8, 246u8, + ]) } - #[doc = " Maximum weight of a signed solution."] - #[doc = ""] - #[doc = " If [`Config::MinerConfig`] is being implemented to submit signed solutions (outside of"] - #[doc = " this pallet), then [`MinerConfig::solution_weight`] is used to compare against"] - #[doc = " this value."] - pub fn signed_max_weight( + #[doc = " Max number of authorities allowed"] + pub fn max_authorities( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_weights::weight_v2::Weight, - >, - > { - ::subxt::constants::StaticConstantAddress::new( - "ElectionProviderMultiPhase", - "SignedMaxWeight", - [ - 206u8, 61u8, 253u8, 247u8, 163u8, 40u8, 161u8, 52u8, 134u8, 140u8, - 206u8, 83u8, 44u8, 166u8, 226u8, 115u8, 181u8, 14u8, 227u8, 130u8, - 210u8, 32u8, 85u8, 29u8, 230u8, 97u8, 130u8, 165u8, 147u8, 134u8, - 106u8, 76u8, - ], - ) + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static("Babe", "MaxAuthorities", [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, 125u8, + 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, 178u8, 197u8, + 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, 145u8, + ]) } - - #[doc = " The maximum amount of unchecked solutions to refund the call fee for."] - pub fn signed_max_refunds( + } + } + } + pub mod timestamp { + use super::{root_mod, runtime_types}; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + 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 :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Set { + #[codec(compact)] + pub now: ::core::primitive::u64, + } + impl ::subxt::blocks::StaticExtrinsic for Set { + const CALL: &'static str = "set"; + const PALLET: &'static str = "Timestamp"; + } + } + 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 = "`MinimumPeriod`."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be `Inherent`."] + #[doc = ""] + #[doc = "# "] + #[doc = "- `O(1)` (Note that implementations of `OnTimestampSet` must also be `O(1)`)"] + #[doc = "- 1 storage read and 1 storage mutation (codec `O(1)`). (because of `DidUpdate::take` in"] + #[doc = " `on_finalize`)"] + #[doc = "- 1 event handler `on_timestamp_set`. Must be `O(1)`."] + #[doc = "# "] + pub fn set(&self, now: ::core::primitive::u64) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static("Timestamp", "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 mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " Current time for the current block."] + pub fn now( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u64, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), > { - ::subxt::constants::StaticConstantAddress::new( - "ElectionProviderMultiPhase", - "SignedMaxRefunds", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, - ], - ) + ::subxt::storage::address::Address::new_static("Timestamp", "Now", vec![], [ + 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 = " Base reward for a signed solution"] - pub fn signed_reward_base( + #[doc = " Did the timestamp get updated in this block?"] + pub fn did_update( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::bool, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), > { - ::subxt::constants::StaticConstantAddress::new( - "ElectionProviderMultiPhase", - "SignedRewardBase", + ::subxt::storage::address::Address::new_static( + "Timestamp", + "DidUpdate", + vec![], [ - 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, + 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, ], ) } - - #[doc = " Base deposit for a signed solution."] - pub fn signed_deposit_base( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, - > { - ::subxt::constants::StaticConstantAddress::new( - "ElectionProviderMultiPhase", - "SignedDepositBase", - [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, - 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, - 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, - ], - ) - } - - #[doc = " Per-byte deposit for a signed solution."] - pub fn signed_deposit_byte( + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The minimum period between blocks. Beware that this is different to the *expected*"] + #[doc = " period that the block production apparatus provides. Your chosen consensus system will"] + #[doc = " generally work with this to determine a sensible block time. e.g. For Aura, it will be"] + #[doc = " double this period on default settings."] + pub fn minimum_period( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, - > { - ::subxt::constants::StaticConstantAddress::new( - "ElectionProviderMultiPhase", - "SignedDepositByte", - [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, - 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, - 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, - ], - ) + ) -> ::subxt::constants::Address<::core::primitive::u64> { + ::subxt::constants::Address::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, + ]) } - - #[doc = " Per-weight deposit for a signed solution."] - pub fn signed_deposit_weight( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, - > { - ::subxt::constants::StaticConstantAddress::new( - "ElectionProviderMultiPhase", - "SignedDepositWeight", - [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, - 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, - 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, - ], - ) + } + } + } + pub mod authorship { + use super::{root_mod, runtime_types}; + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub type Error = runtime_types::pallet_authorship::pallet::Error; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub type Call = runtime_types::pallet_authorship::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 :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetUncles { + pub new_uncles: ::std::vec::Vec< + runtime_types::avail_core::header::Header< + ::core::primitive::u32, + runtime_types::sp_runtime::traits::BlakeTwo256, + >, + >, } - - #[doc = " The maximum number of electing voters to put in the snapshot. At the moment, snapshots"] - #[doc = " are only over a single block, but once multi-block elections are introduced they will"] - #[doc = " take place over multiple blocks."] - pub fn max_electing_voters( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { - ::subxt::constants::StaticConstantAddress::new( - "ElectionProviderMultiPhase", - "MaxElectingVoters", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, - ], - ) + impl ::subxt::blocks::StaticExtrinsic for SetUncles { + const CALL: &'static str = "set_uncles"; + const PALLET: &'static str = "Authorship"; } - - #[doc = " The maximum number of electable targets to put in the snapshot."] - pub fn max_electable_targets( + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Provide a set of uncles."] + pub fn set_uncles( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u16>, - > { - ::subxt::constants::StaticConstantAddress::new( - "ElectionProviderMultiPhase", - "MaxElectableTargets", + new_uncles: ::std::vec::Vec< + runtime_types::avail_core::header::Header< + ::core::primitive::u32, + runtime_types::sp_runtime::traits::BlakeTwo256, + >, + >, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Authorship", + "set_uncles", + types::SetUncles { new_uncles }, [ - 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, + 6u8, 217u8, 65u8, 59u8, 11u8, 36u8, 246u8, 56u8, 153u8, 132u8, 177u8, + 92u8, 112u8, 6u8, 145u8, 75u8, 109u8, 185u8, 59u8, 171u8, 186u8, 129u8, + 160u8, 66u8, 214u8, 132u8, 185u8, 75u8, 131u8, 102u8, 149u8, 116u8, ], ) } - - #[doc = " The maximum number of winners that can be elected by this `ElectionProvider`"] - #[doc = " implementation."] - #[doc = ""] - #[doc = " Note: This must always be greater or equal to `T::DataProvider::desired_targets()`."] - pub fn max_winners( + } + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " Uncles"] + pub fn uncles( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + runtime_types::pallet_authorship::UncleEntryItem< + ::core::primitive::u32, + ::subxt::utils::H256, + ::subxt::utils::AccountId32, + >, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), > { - ::subxt::constants::StaticConstantAddress::new( - "ElectionProviderMultiPhase", - "MaxWinners", + ::subxt::storage::address::Address::new_static( + "Authorship", + "Uncles", + vec![], [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, + 249u8, 67u8, 80u8, 23u8, 191u8, 215u8, 207u8, 80u8, 195u8, 243u8, 12u8, + 196u8, 135u8, 67u8, 136u8, 123u8, 60u8, 134u8, 205u8, 104u8, 11u8, + 243u8, 176u8, 135u8, 182u8, 189u8, 134u8, 69u8, 128u8, 114u8, 94u8, + 73u8, ], ) } - pub fn miner_max_length( + #[doc = " Author of current block."] + pub fn author( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::subxt::utils::AccountId32, + ::subxt::storage::address::Yes, + (), + (), > { - ::subxt::constants::StaticConstantAddress::new( - "ElectionProviderMultiPhase", - "MinerMaxLength", + ::subxt::storage::address::Address::new_static( + "Authorship", + "Author", + vec![], [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, + 247u8, 192u8, 118u8, 227u8, 47u8, 20u8, 203u8, 199u8, 216u8, 87u8, + 220u8, 50u8, 166u8, 61u8, 168u8, 213u8, 253u8, 62u8, 202u8, 199u8, + 61u8, 192u8, 237u8, 53u8, 22u8, 148u8, 164u8, 245u8, 99u8, 24u8, 146u8, + 18u8, ], ) } - pub fn miner_max_weight( + #[doc = " Whether uncles were already set in this block."] + pub fn did_set_uncles( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_weights::weight_v2::Weight, - >, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::bool, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), > { - ::subxt::constants::StaticConstantAddress::new( - "ElectionProviderMultiPhase", - "MinerMaxWeight", + ::subxt::storage::address::Address::new_static( + "Authorship", + "DidSetUncles", + vec![], [ - 206u8, 61u8, 253u8, 247u8, 163u8, 40u8, 161u8, 52u8, 134u8, 140u8, - 206u8, 83u8, 44u8, 166u8, 226u8, 115u8, 181u8, 14u8, 227u8, 130u8, - 210u8, 32u8, 85u8, 29u8, 230u8, 97u8, 130u8, 165u8, 147u8, 134u8, - 106u8, 76u8, + 26u8, 145u8, 150u8, 110u8, 108u8, 168u8, 93u8, 237u8, 191u8, 236u8, + 44u8, 40u8, 210u8, 183u8, 126u8, 123u8, 103u8, 199u8, 248u8, 155u8, + 222u8, 188u8, 48u8, 227u8, 192u8, 4u8, 57u8, 146u8, 211u8, 229u8, + 154u8, 83u8, ], ) } - - pub fn miner_max_votes_per_voter( + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The number of blocks back we should accept uncles."] + #[doc = " This means that we will deal with uncle-parents that are"] + #[doc = " `UncleGenerations + 1` before `now`."] + pub fn uncle_generations( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { - ::subxt::constants::StaticConstantAddress::new( - "ElectionProviderMultiPhase", - "MinerMaxVotesPerVoter", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, - ], - ) + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static("Authorship", "UncleGenerations", [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, 125u8, + 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, 178u8, 197u8, + 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, 145u8, + ]) } } } } - pub mod staking { + pub mod indices { use super::{root_mod, runtime_types}; + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub type Error = runtime_types::pallet_indices::pallet::Error; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub type Call = runtime_types::pallet_indices::pallet::Call; pub mod calls { use super::{root_mod, runtime_types}; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Bond { - pub controller: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - #[codec(compact)] - pub value: ::core::primitive::u128, - pub payee: - runtime_types::pallet_staking::RewardDestination<::subxt::utils::AccountId32>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct BondExtra { - #[codec(compact)] - pub max_additional: ::core::primitive::u128, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Unbond { - #[codec(compact)] - pub value: ::core::primitive::u128, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct WithdrawUnbonded { - pub num_slashing_spans: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Validate { - pub prefs: runtime_types::pallet_staking::ValidatorPrefs, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Nominate { - pub targets: ::std::vec::Vec< - ::subxt::utils::MultiAddress< + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Claim { + pub index: ::core::primitive::u32, + } + impl ::subxt::blocks::StaticExtrinsic for Claim { + const CALL: &'static str = "claim"; + const PALLET: &'static str = "Indices"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Transfer { + pub new: ::subxt::utils::MultiAddress< ::subxt::utils::AccountId32, ::core::primitive::u32, >, - >, + pub index: ::core::primitive::u32, + } + impl ::subxt::blocks::StaticExtrinsic for Transfer { + const CALL: &'static str = "transfer"; + const PALLET: &'static str = "Indices"; + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Free { + pub index: ::core::primitive::u32, + } + impl ::subxt::blocks::StaticExtrinsic for Free { + const CALL: &'static str = "free"; + const PALLET: &'static str = "Indices"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ForceTransfer { + pub new: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + pub index: ::core::primitive::u32, + pub freeze: ::core::primitive::bool, + } + impl ::subxt::blocks::StaticExtrinsic for ForceTransfer { + const CALL: &'static str = "force_transfer"; + const PALLET: &'static str = "Indices"; + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Freeze { + pub index: ::core::primitive::u32, + } + impl ::subxt::blocks::StaticExtrinsic for Freeze { + const CALL: &'static str = "freeze"; + const PALLET: &'static str = "Indices"; + } } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Chill; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct SetPayee { - pub payee: - runtime_types::pallet_staking::RewardDestination<::subxt::utils::AccountId32>, + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Assign an previously unassigned index."] + #[doc = ""] + #[doc = "Payment: `Deposit` is reserved from the sender account."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "- `index`: the index to be claimed. This must not be in use."] + #[doc = ""] + #[doc = "Emits `IndexAssigned` if successful."] + #[doc = ""] + #[doc = "# "] + #[doc = "- `O(1)`."] + #[doc = "- One storage mutation (codec `O(1)`)."] + #[doc = "- One reserve operation."] + #[doc = "- One event."] + #[doc = "-------------------"] + #[doc = "- DB Weight: 1 Read/Write (Accounts)"] + #[doc = "# "] + pub fn claim( + &self, + index: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static("Indices", "claim", types::Claim { index }, [ + 146u8, 58u8, 246u8, 135u8, 59u8, 90u8, 3u8, 5u8, 140u8, 169u8, 232u8, + 195u8, 11u8, 107u8, 36u8, 141u8, 118u8, 174u8, 160u8, 160u8, 19u8, 205u8, + 177u8, 193u8, 18u8, 102u8, 115u8, 31u8, 72u8, 29u8, 91u8, 235u8, + ]) + } + + #[doc = "Assign an index already owned by the sender to another account. The balance reservation"] + #[doc = "is effectively transferred to the new account."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "- `index`: the index to be re-assigned. This must be owned by the sender."] + #[doc = "- `new`: the new owner of the index. This function is a no-op if it is equal to sender."] + #[doc = ""] + #[doc = "Emits `IndexAssigned` if successful."] + #[doc = ""] + #[doc = "# "] + #[doc = "- `O(1)`."] + #[doc = "- One storage mutation (codec `O(1)`)."] + #[doc = "- One transfer operation."] + #[doc = "- One event."] + #[doc = "-------------------"] + #[doc = "- DB Weight:"] + #[doc = " - Reads: Indices Accounts, System Account (recipient)"] + #[doc = " - Writes: Indices Accounts, System Account (recipient)"] + #[doc = "# "] + pub fn transfer( + &self, + new: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + index: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Indices", + "transfer", + types::Transfer { new, index }, + [ + 139u8, 89u8, 163u8, 53u8, 141u8, 131u8, 135u8, 107u8, 0u8, 131u8, 53u8, + 202u8, 117u8, 99u8, 239u8, 205u8, 101u8, 97u8, 251u8, 247u8, 116u8, + 128u8, 220u8, 186u8, 151u8, 203u8, 82u8, 222u8, 199u8, 137u8, 41u8, + 199u8, + ], + ) + } + + #[doc = "Free up an index owned by the sender."] + #[doc = ""] + #[doc = "Payment: Any previous deposit placed for the index is unreserved in the sender account."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must own the index."] + #[doc = ""] + #[doc = "- `index`: the index to be freed. This must be owned by the sender."] + #[doc = ""] + #[doc = "Emits `IndexFreed` if successful."] + #[doc = ""] + #[doc = "# "] + #[doc = "- `O(1)`."] + #[doc = "- One storage mutation (codec `O(1)`)."] + #[doc = "- One reserve operation."] + #[doc = "- One event."] + #[doc = "-------------------"] + #[doc = "- DB Weight: 1 Read/Write (Accounts)"] + #[doc = "# "] + pub fn free( + &self, + index: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static("Indices", "free", types::Free { index }, [ + 241u8, 211u8, 234u8, 102u8, 189u8, 22u8, 209u8, 27u8, 8u8, 229u8, 80u8, + 227u8, 138u8, 252u8, 222u8, 111u8, 77u8, 201u8, 235u8, 51u8, 163u8, 247u8, + 13u8, 126u8, 216u8, 136u8, 57u8, 222u8, 56u8, 66u8, 215u8, 244u8, + ]) + } + + #[doc = "Force an index to an account. This doesn't require a deposit. If the index is already"] + #[doc = "held, then any deposit is reimbursed to its current owner."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Root_."] + #[doc = ""] + #[doc = "- `index`: the index to be (re-)assigned."] + #[doc = "- `new`: the new owner of the index. This function is a no-op if it is equal to sender."] + #[doc = "- `freeze`: if set to `true`, will freeze the index so it cannot be transferred."] + #[doc = ""] + #[doc = "Emits `IndexAssigned` if successful."] + #[doc = ""] + #[doc = "# "] + #[doc = "- `O(1)`."] + #[doc = "- One storage mutation (codec `O(1)`)."] + #[doc = "- Up to one reserve operation."] + #[doc = "- One event."] + #[doc = "-------------------"] + #[doc = "- DB Weight:"] + #[doc = " - Reads: Indices Accounts, System Account (original owner)"] + #[doc = " - Writes: Indices Accounts, System Account (original owner)"] + #[doc = "# "] + pub fn force_transfer( + &self, + new: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + index: ::core::primitive::u32, + freeze: ::core::primitive::bool, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Indices", + "force_transfer", + types::ForceTransfer { new, index, freeze }, + [ + 160u8, 55u8, 190u8, 50u8, 35u8, 79u8, 28u8, 117u8, 9u8, 2u8, 34u8, + 99u8, 247u8, 50u8, 77u8, 158u8, 156u8, 101u8, 90u8, 246u8, 129u8, + 106u8, 23u8, 142u8, 213u8, 88u8, 191u8, 232u8, 99u8, 139u8, 61u8, + 125u8, + ], + ) + } + + #[doc = "Freeze an index so it will always point to the sender account. This consumes the"] + #[doc = "deposit."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the signing account must have a"] + #[doc = "non-frozen account `index`."] + #[doc = ""] + #[doc = "- `index`: the index to be frozen in place."] + #[doc = ""] + #[doc = "Emits `IndexFrozen` if successful."] + #[doc = ""] + #[doc = "# "] + #[doc = "- `O(1)`."] + #[doc = "- One storage mutation (codec `O(1)`)."] + #[doc = "- Up to one slash operation."] + #[doc = "- One event."] + #[doc = "-------------------"] + #[doc = "- DB Weight: 1 Read/Write (Accounts)"] + #[doc = "# "] + pub fn freeze( + &self, + index: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Indices", + "freeze", + types::Freeze { index }, + [ + 238u8, 215u8, 108u8, 156u8, 84u8, 240u8, 130u8, 229u8, 27u8, 132u8, + 93u8, 78u8, 2u8, 251u8, 43u8, 203u8, 2u8, 142u8, 147u8, 48u8, 92u8, + 101u8, 207u8, 24u8, 51u8, 16u8, 36u8, 229u8, 188u8, 129u8, 160u8, + 117u8, + ], + ) + } } + } + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub type Event = runtime_types::pallet_indices::pallet::Event; + pub mod events { + use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - pub struct SetController { - pub controller: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A account index was assigned."] + pub struct IndexAssigned { + pub who: ::subxt::utils::AccountId32, + pub index: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for IndexAssigned { + const EVENT: &'static str = "IndexAssigned"; + const PALLET: &'static str = "Indices"; } #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - pub struct SetValidatorCount { - #[codec(compact)] - pub new: ::core::primitive::u32, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A account index has been freed up (unassigned)."] + pub struct IndexFreed { + pub index: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for IndexFreed { + const EVENT: &'static str = "IndexFreed"; + const PALLET: &'static str = "Indices"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - pub struct IncreaseValidatorCount { - #[codec(compact)] - pub additional: ::core::primitive::u32, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A account index has been frozen to its current account ID."] + pub struct IndexFrozen { + pub index: ::core::primitive::u32, + pub who: ::subxt::utils::AccountId32, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct ScaleValidatorCount { - pub factor: runtime_types::sp_arithmetic::per_things::Percent, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct ForceNoEras; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct ForceNewEra; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct SetInvulnerables { - pub invulnerables: ::std::vec::Vec<::subxt::utils::AccountId32>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct ForceUnstake { - pub stash: ::subxt::utils::AccountId32, - pub num_slashing_spans: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct ForceNewEraAlways; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct CancelDeferredSlash { - pub era: ::core::primitive::u32, - pub slash_indices: ::std::vec::Vec<::core::primitive::u32>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct PayoutStakers { - pub validator_stash: ::subxt::utils::AccountId32, - pub era: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Rebond { - #[codec(compact)] - pub value: ::core::primitive::u128, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct ReapStash { - pub stash: ::subxt::utils::AccountId32, - pub num_slashing_spans: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Kick { - pub who: ::std::vec::Vec< - ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - >, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct SetStakingConfigs { - pub min_nominator_bond: runtime_types::pallet_staking::pallet::pallet::ConfigOp< - ::core::primitive::u128, - >, - pub min_validator_bond: runtime_types::pallet_staking::pallet::pallet::ConfigOp< - ::core::primitive::u128, - >, - pub max_nominator_count: - runtime_types::pallet_staking::pallet::pallet::ConfigOp<::core::primitive::u32>, - pub max_validator_count: - runtime_types::pallet_staking::pallet::pallet::ConfigOp<::core::primitive::u32>, - pub chill_threshold: runtime_types::pallet_staking::pallet::pallet::ConfigOp< - runtime_types::sp_arithmetic::per_things::Percent, - >, - pub min_commission: runtime_types::pallet_staking::pallet::pallet::ConfigOp< - runtime_types::sp_arithmetic::per_things::Perbill, - >, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct ChillOther { - pub controller: ::subxt::utils::AccountId32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct ForceApplyMinCommission { - pub validator_stash: ::subxt::utils::AccountId32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct SetMinCommission { - pub new: runtime_types::sp_arithmetic::per_things::Perbill, + impl ::subxt::events::StaticEvent for IndexFrozen { + const EVENT: &'static str = "IndexFrozen"; + const PALLET: &'static str = "Indices"; } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Take the origin account as a stash and lock up `value` of its balance. `controller` will"] - #[doc = "be the account that controls it."] - #[doc = ""] - #[doc = "`value` must be more than the `minimum_balance` specified by `T::Currency`."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ by the stash account."] - #[doc = ""] - #[doc = "Emits `Bonded`."] - #[doc = "# "] - #[doc = "- Independent of the arguments. Moderate complexity."] - #[doc = "- O(1)."] - #[doc = "- Three extra DB entries."] - #[doc = ""] - #[doc = "NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned"] - #[doc = "unless the `origin` falls below _existential deposit_ and gets removed as dust."] - #[doc = "------------------"] - #[doc = "# "] - pub fn bond( + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " The lookup from index to account."] + pub fn accounts( &self, - controller: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - value: ::core::primitive::u128, - payee: runtime_types::pallet_staking::RewardDestination< + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ( ::subxt::utils::AccountId32, - >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Staking", - "bond", - Bond { - controller, - value, - payee, - }, + ::core::primitive::u128, + ::core::primitive::bool, + ), + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Indices", + "Accounts", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], [ - 140u8, 13u8, 108u8, 181u8, 212u8, 177u8, 190u8, 212u8, 163u8, 40u8, - 120u8, 232u8, 126u8, 213u8, 6u8, 181u8, 99u8, 252u8, 58u8, 54u8, 139u8, - 64u8, 67u8, 76u8, 53u8, 226u8, 11u8, 133u8, 235u8, 159u8, 103u8, 210u8, + 48u8, 189u8, 43u8, 119u8, 32u8, 168u8, 28u8, 12u8, 245u8, 81u8, 119u8, + 182u8, 23u8, 201u8, 33u8, 147u8, 128u8, 171u8, 155u8, 134u8, 71u8, + 87u8, 100u8, 248u8, 107u8, 129u8, 36u8, 197u8, 220u8, 90u8, 11u8, + 238u8, ], ) } - #[doc = "Add some extra amount that have appeared in the stash `free_balance` into the balance up"] - #[doc = "for staking."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ by the stash, not the controller."] - #[doc = ""] - #[doc = "Use this if there are additional funds in your stash account that you wish to bond."] - #[doc = "Unlike [`bond`](Self::bond) or [`unbond`](Self::unbond) this function does not impose"] - #[doc = "any limitation on the amount that can be added."] - #[doc = ""] - #[doc = "Emits `Bonded`."] - #[doc = ""] - #[doc = "# "] - #[doc = "- Independent of the arguments. Insignificant complexity."] - #[doc = "- O(1)."] - #[doc = "# "] - pub fn bond_extra( + #[doc = " The lookup from index to account."] + pub fn accounts_root( &self, - max_additional: ::core::primitive::u128, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Staking", - "bond_extra", - BondExtra { max_additional }, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ( + ::subxt::utils::AccountId32, + ::core::primitive::u128, + ::core::primitive::bool, + ), + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Indices", + "Accounts", + Vec::new(), [ - 60u8, 45u8, 82u8, 223u8, 113u8, 95u8, 0u8, 71u8, 59u8, 108u8, 228u8, - 9u8, 95u8, 210u8, 113u8, 106u8, 252u8, 15u8, 19u8, 128u8, 11u8, 187u8, - 4u8, 151u8, 103u8, 143u8, 24u8, 33u8, 149u8, 82u8, 35u8, 192u8, + 48u8, 189u8, 43u8, 119u8, 32u8, 168u8, 28u8, 12u8, 245u8, 81u8, 119u8, + 182u8, 23u8, 201u8, 33u8, 147u8, 128u8, 171u8, 155u8, 134u8, 71u8, + 87u8, 100u8, 248u8, 107u8, 129u8, 36u8, 197u8, 220u8, 90u8, 11u8, + 238u8, ], ) } - - #[doc = "Schedule a portion of the stash to be unlocked ready for transfer out after the bond"] - #[doc = "period ends. If this leaves an amount actively bonded less than"] - #[doc = "T::Currency::minimum_balance(), then it is increased to the full amount."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ by the controller, not the stash."] - #[doc = ""] - #[doc = "Once the unlock period is done, you can call `withdraw_unbonded` to actually move"] - #[doc = "the funds out of management ready for transfer."] - #[doc = ""] - #[doc = "No more than a limited number of unlocking chunks (see `MaxUnlockingChunks`)"] - #[doc = "can co-exists at the same time. If there are no unlocking chunks slots available"] - #[doc = "[`Call::withdraw_unbonded`] is called to remove some of the chunks (if possible)."] - #[doc = ""] - #[doc = "If a user encounters the `InsufficientBond` error when calling this extrinsic,"] - #[doc = "they should call `chill` first in order to free up their bonded funds."] - #[doc = ""] - #[doc = "Emits `Unbonded`."] - #[doc = ""] - #[doc = "See also [`Call::withdraw_unbonded`]."] - pub fn unbond( - &self, - value: ::core::primitive::u128, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new("Staking", "unbond", Unbond { value }, [ - 85u8, 62u8, 34u8, 127u8, 60u8, 241u8, 134u8, 60u8, 125u8, 91u8, 31u8, - 193u8, 50u8, 230u8, 237u8, 42u8, 114u8, 230u8, 240u8, 146u8, 14u8, 109u8, - 185u8, 151u8, 148u8, 44u8, 147u8, 182u8, 192u8, 253u8, 51u8, 87u8, + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The deposit needed for reserving an index."] + pub fn deposit(&self) -> ::subxt::constants::Address<::core::primitive::u128> { + ::subxt::constants::Address::new_static("Indices", "Deposit", [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, 136u8, + 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, ]) } - - #[doc = "Remove any unlocked chunks from the `unlocking` queue from our management."] + } + } + } + pub mod balances { + use super::{root_mod, runtime_types}; + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub type Error = runtime_types::pallet_balances::pallet::Error; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + 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 :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Transfer { + pub dest: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + #[codec(compact)] + pub value: ::core::primitive::u128, + } + impl ::subxt::blocks::StaticExtrinsic for Transfer { + const CALL: &'static str = "transfer"; + const PALLET: &'static str = "Balances"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetBalance { + pub who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + #[codec(compact)] + pub new_free: ::core::primitive::u128, + #[codec(compact)] + pub new_reserved: ::core::primitive::u128, + } + impl ::subxt::blocks::StaticExtrinsic for SetBalance { + const CALL: &'static str = "set_balance"; + const PALLET: &'static str = "Balances"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ForceTransfer { + pub source: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + pub dest: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + #[codec(compact)] + pub value: ::core::primitive::u128, + } + impl ::subxt::blocks::StaticExtrinsic for ForceTransfer { + const CALL: &'static str = "force_transfer"; + const PALLET: &'static str = "Balances"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct TransferKeepAlive { + pub dest: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + #[codec(compact)] + pub value: ::core::primitive::u128, + } + impl ::subxt::blocks::StaticExtrinsic for TransferKeepAlive { + const CALL: &'static str = "transfer_keep_alive"; + const PALLET: &'static str = "Balances"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct TransferAll { + pub dest: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + pub keep_alive: ::core::primitive::bool, + } + impl ::subxt::blocks::StaticExtrinsic for TransferAll { + const CALL: &'static str = "transfer_all"; + const PALLET: &'static str = "Balances"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ForceUnreserve { + pub who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + pub amount: ::core::primitive::u128, + } + impl ::subxt::blocks::StaticExtrinsic for ForceUnreserve { + const CALL: &'static str = "force_unreserve"; + const PALLET: &'static str = "Balances"; + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Transfer some liquid free balance to another account."] #[doc = ""] - #[doc = "This essentially frees up that balance to be used by the stash account to do"] - #[doc = "whatever it wants."] + #[doc = "`transfer` 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 controller."] + #[doc = "The dispatch origin for this call must be `Signed` by the transactor."] #[doc = ""] - #[doc = "Emits `Withdrawn`."] + #[doc = "# "] + #[doc = "- Dependent on arguments but not critical, given proper implementations for input config"] + #[doc = " types. See related functions below."] + #[doc = "- It contains a limited number of reads and writes internally and no complex"] + #[doc = " computation."] #[doc = ""] - #[doc = "See also [`Call::unbond`]."] + #[doc = "Related functions:"] #[doc = ""] - #[doc = "# "] - #[doc = "Complexity O(S) where S is the number of slashing spans to remove"] - #[doc = "NOTE: Weight annotation is the kill scenario, we refund otherwise."] + #[doc = " - `ensure_can_withdraw` is always called internally but has a bounded complexity."] + #[doc = " - Transferring balances to accounts that did not exist before will cause"] + #[doc = " `T::OnNewAccount::on_new_account` to be called."] + #[doc = " - Removing enough funds from an account will trigger `T::DustRemoval::on_unbalanced`."] + #[doc = " - `transfer_keep_alive` works the same way as `transfer`, but has an additional check"] + #[doc = " that the transfer will not kill the origin account."] + #[doc = "---------------------------------"] + #[doc = "- Origin account is already in memory, so no DB operations for them."] #[doc = "# "] - pub fn withdraw_unbonded( + pub fn transfer( &self, - num_slashing_spans: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Staking", - "withdraw_unbonded", - WithdrawUnbonded { num_slashing_spans }, + dest: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + value: ::core::primitive::u128, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Balances", + "transfer", + types::Transfer { dest, value }, [ - 95u8, 223u8, 122u8, 217u8, 76u8, 208u8, 86u8, 129u8, 31u8, 104u8, 70u8, - 154u8, 23u8, 250u8, 165u8, 192u8, 149u8, 249u8, 158u8, 159u8, 194u8, - 224u8, 118u8, 134u8, 204u8, 157u8, 72u8, 136u8, 19u8, 193u8, 183u8, - 84u8, + 78u8, 137u8, 180u8, 250u8, 225u8, 152u8, 150u8, 139u8, 30u8, 4u8, 57u8, + 241u8, 135u8, 108u8, 67u8, 239u8, 65u8, 13u8, 10u8, 205u8, 125u8, + 208u8, 237u8, 60u8, 18u8, 13u8, 232u8, 47u8, 47u8, 151u8, 79u8, 23u8, ], ) } - #[doc = "Declare the desire to validate for the origin controller."] + #[doc = "Set the balances of a given account."] #[doc = ""] - #[doc = "Effects will be felt at the beginning of the next era."] + #[doc = "This will alter `FreeBalance` and `ReservedBalance` in storage. it will"] + #[doc = "also alter the total issuance of the system (`TotalIssuance`) appropriately."] + #[doc = "If the new free or reserved balance is below the existential deposit,"] + #[doc = "it will reset the account nonce (`frame_system::AccountNonce`)."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ by the controller, not the stash."] - pub fn validate( + #[doc = "The dispatch origin for this call is `root`."] + pub fn set_balance( &self, - prefs: runtime_types::pallet_staking::ValidatorPrefs, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new("Staking", "validate", Validate { prefs }, [ - 191u8, 116u8, 139u8, 35u8, 250u8, 211u8, 86u8, 240u8, 35u8, 9u8, 19u8, - 44u8, 148u8, 35u8, 91u8, 106u8, 200u8, 172u8, 108u8, 145u8, 194u8, 146u8, - 61u8, 145u8, 233u8, 168u8, 2u8, 26u8, 145u8, 101u8, 114u8, 157u8, - ]) + who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + new_free: ::core::primitive::u128, + new_reserved: ::core::primitive::u128, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Balances", + "set_balance", + types::SetBalance { + who, + new_free, + new_reserved, + }, + [ + 138u8, 168u8, 113u8, 210u8, 97u8, 109u8, 159u8, 154u8, 72u8, 91u8, + 161u8, 167u8, 136u8, 135u8, 79u8, 149u8, 126u8, 91u8, 178u8, 44u8, + 201u8, 4u8, 233u8, 90u8, 183u8, 84u8, 9u8, 170u8, 83u8, 63u8, 32u8, + 187u8, + ], + ) } - #[doc = "Declare the desire to nominate `targets` for the origin controller."] - #[doc = ""] - #[doc = "Effects will be felt at the beginning of the next era."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ by the controller, not the stash."] - #[doc = ""] + #[doc = "Exactly as `transfer`, except the origin must be root and the source account may be"] + #[doc = "specified."] #[doc = "# "] - #[doc = "- The transaction's complexity is proportional to the size of `targets` (N)"] - #[doc = "which is capped at CompactAssignments::LIMIT (T::MaxNominations)."] - #[doc = "- Both the reads and writes follow a similar pattern."] + #[doc = "- Same as transfer, but additional read and write because the source account is not"] + #[doc = " assumed to be in the overlay."] #[doc = "# "] - pub fn nominate( + pub fn force_transfer( &self, - targets: ::std::vec::Vec< - ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + source: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Staking", - "nominate", - Nominate { targets }, + dest: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + value: ::core::primitive::u128, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Balances", + "force_transfer", + types::ForceTransfer { + source, + dest, + value, + }, [ - 249u8, 66u8, 140u8, 39u8, 26u8, 221u8, 135u8, 225u8, 98u8, 255u8, 13u8, - 54u8, 106u8, 215u8, 129u8, 156u8, 190u8, 83u8, 178u8, 170u8, 116u8, - 27u8, 8u8, 244u8, 56u8, 73u8, 164u8, 223u8, 199u8, 115u8, 168u8, 83u8, + 192u8, 208u8, 171u8, 116u8, 91u8, 20u8, 177u8, 202u8, 113u8, 195u8, + 44u8, 49u8, 140u8, 190u8, 168u8, 41u8, 165u8, 202u8, 68u8, 127u8, + 247u8, 183u8, 126u8, 38u8, 124u8, 41u8, 13u8, 11u8, 69u8, 32u8, 35u8, + 12u8, ], ) } - #[doc = "Declare no desire to either validate or nominate."] - #[doc = ""] - #[doc = "Effects will be felt at the beginning of the next era."] + #[doc = "Same as the [`transfer`] call, but with a check that the transfer will not kill the"] + #[doc = "origin account."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ by the controller, not the stash."] + #[doc = "99% of the time you want [`transfer`] instead."] #[doc = ""] - #[doc = "# "] - #[doc = "- Independent of the arguments. Insignificant complexity."] - #[doc = "- Contains one read."] - #[doc = "- Writes are limited to the `origin` account key."] - #[doc = "# "] - pub fn chill(&self) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new("Staking", "chill", Chill {}, [ - 94u8, 20u8, 196u8, 31u8, 220u8, 125u8, 115u8, 167u8, 140u8, 3u8, 20u8, - 132u8, 81u8, 120u8, 215u8, 166u8, 230u8, 56u8, 16u8, 222u8, 31u8, 153u8, - 120u8, 62u8, 153u8, 67u8, 220u8, 239u8, 11u8, 234u8, 127u8, 122u8, - ]) + #[doc = "[`transfer`]: struct.Pallet.html#method.transfer"] + pub fn transfer_keep_alive( + &self, + dest: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + value: ::core::primitive::u128, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Balances", + "transfer_keep_alive", + types::TransferKeepAlive { dest, value }, + [ + 186u8, 56u8, 39u8, 71u8, 205u8, 98u8, 251u8, 252u8, 106u8, 6u8, 92u8, + 217u8, 254u8, 186u8, 113u8, 196u8, 114u8, 248u8, 54u8, 226u8, 53u8, + 73u8, 6u8, 66u8, 96u8, 54u8, 117u8, 23u8, 34u8, 200u8, 84u8, 227u8, + ], + ) } - #[doc = "(Re-)set the payment target for a controller."] + #[doc = "Transfer the entire transferable balance from the caller account."] #[doc = ""] - #[doc = "Effects will be felt instantly (as soon as this function is completed successfully)."] + #[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 for this call must be _Signed_ by the controller, not the stash."] + #[doc = "The dispatch origin of this call must be Signed."] #[doc = ""] - #[doc = "# "] - #[doc = "- Independent of the arguments. Insignificant complexity."] - #[doc = "- Contains a limited number of reads."] - #[doc = "- Writes are limited to the `origin` account key."] - #[doc = "---------"] - #[doc = "- Weight: O(1)"] - #[doc = "- DB Weight:"] - #[doc = " - Read: Ledger"] - #[doc = " - Write: Payee"] - #[doc = "# "] - pub fn set_payee( - &self, - payee: runtime_types::pallet_staking::RewardDestination< - ::subxt::utils::AccountId32, - >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new("Staking", "set_payee", SetPayee { payee }, [ - 96u8, 8u8, 254u8, 164u8, 87u8, 46u8, 120u8, 11u8, 197u8, 63u8, 20u8, 178u8, - 167u8, 236u8, 149u8, 245u8, 14u8, 171u8, 108u8, 195u8, 250u8, 133u8, 0u8, - 75u8, 192u8, 159u8, 84u8, 220u8, 242u8, 133u8, 60u8, 62u8, - ]) - } - - #[doc = "(Re-)set the controller of a stash."] - #[doc = ""] - #[doc = "Effects will be felt instantly (as soon as this function is completed successfully)."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ by the stash, not the controller."] - #[doc = ""] - #[doc = "# "] - #[doc = "- Independent of the arguments. Insignificant complexity."] - #[doc = "- Contains a limited number of reads."] - #[doc = "- Writes are limited to the `origin` account key."] - #[doc = "----------"] - #[doc = "Weight: O(1)"] - #[doc = "DB Weight:"] - #[doc = "- Read: Bonded, Ledger New Controller, Ledger Old Controller"] - #[doc = "- Write: Bonded, Ledger New Controller, Ledger Old Controller"] - #[doc = "# "] - pub fn set_controller( + #[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). # "] + #[doc = "- O(1). Just like transfer, but reading the user's transferable balance first."] + #[doc = " #"] + pub fn transfer_all( &self, - controller: ::subxt::utils::MultiAddress< + dest: ::subxt::utils::MultiAddress< ::subxt::utils::AccountId32, ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Staking", - "set_controller", - SetController { controller }, - [ - 154u8, 80u8, 184u8, 176u8, 74u8, 106u8, 72u8, 242u8, 64u8, 81u8, 169u8, - 157u8, 200u8, 97u8, 117u8, 192u8, 143u8, 166u8, 38u8, 235u8, 75u8, - 161u8, 177u8, 229u8, 229u8, 82u8, 95u8, 39u8, 40u8, 116u8, 9u8, 204u8, - ], - ) - } - - #[doc = "Sets the ideal number of validators."] - #[doc = ""] - #[doc = "The dispatch origin must be Root."] - #[doc = ""] - #[doc = "# "] - #[doc = "Weight: O(1)"] - #[doc = "Write: Validator Count"] - #[doc = "# "] - pub fn set_validator_count( - &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Staking", - "set_validator_count", - SetValidatorCount { new }, - [ - 55u8, 232u8, 95u8, 66u8, 228u8, 217u8, 11u8, 27u8, 3u8, 202u8, 199u8, - 242u8, 70u8, 160u8, 250u8, 187u8, 194u8, 91u8, 15u8, 36u8, 215u8, 36u8, - 160u8, 108u8, 251u8, 60u8, 240u8, 202u8, 249u8, 235u8, 28u8, 94u8, - ], - ) - } - - #[doc = "Increments the ideal number of validators upto maximum of"] - #[doc = "`ElectionProviderBase::MaxWinners`."] - #[doc = ""] - #[doc = "The dispatch origin must be Root."] - #[doc = ""] - #[doc = "# "] - #[doc = "Same as [`Self::set_validator_count`]."] - #[doc = "# "] - pub fn increase_validator_count( - &self, - additional: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Staking", - "increase_validator_count", - IncreaseValidatorCount { additional }, - [ - 239u8, 184u8, 155u8, 213u8, 25u8, 22u8, 193u8, 13u8, 102u8, 192u8, - 82u8, 153u8, 249u8, 192u8, 60u8, 158u8, 8u8, 78u8, 175u8, 219u8, 46u8, - 51u8, 222u8, 193u8, 193u8, 201u8, 78u8, 90u8, 58u8, 86u8, 196u8, 17u8, - ], - ) - } - - #[doc = "Scale up the ideal number of validators by a factor upto maximum of"] - #[doc = "`ElectionProviderBase::MaxWinners`."] - #[doc = ""] - #[doc = "The dispatch origin must be Root."] - #[doc = ""] - #[doc = "# "] - #[doc = "Same as [`Self::set_validator_count`]."] - #[doc = "# "] - pub fn scale_validator_count( - &self, - factor: runtime_types::sp_arithmetic::per_things::Percent, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Staking", - "scale_validator_count", - ScaleValidatorCount { factor }, - [ - 198u8, 68u8, 227u8, 94u8, 110u8, 157u8, 209u8, 217u8, 112u8, 37u8, - 78u8, 142u8, 12u8, 193u8, 219u8, 167u8, 149u8, 112u8, 49u8, 139u8, - 74u8, 81u8, 172u8, 72u8, 253u8, 224u8, 56u8, 194u8, 185u8, 90u8, 87u8, - 125u8, - ], - ) - } - - #[doc = "Force there to be no new eras indefinitely."] - #[doc = ""] - #[doc = "The dispatch origin must be Root."] - #[doc = ""] - #[doc = "# Warning"] - #[doc = ""] - #[doc = "The election process starts multiple blocks before the end of the era."] - #[doc = "Thus the election process may be ongoing when this is called. In this case the"] - #[doc = "election will continue until the next era is triggered."] - #[doc = ""] - #[doc = "# "] - #[doc = "- No arguments."] - #[doc = "- Weight: O(1)"] - #[doc = "- Write: ForceEra"] - #[doc = "# "] - pub fn force_no_eras(&self) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new("Staking", "force_no_eras", ForceNoEras {}, [ - 16u8, 81u8, 207u8, 168u8, 23u8, 236u8, 11u8, 75u8, 141u8, 107u8, 92u8, 2u8, - 53u8, 111u8, 252u8, 116u8, 91u8, 120u8, 75u8, 24u8, 125u8, 53u8, 9u8, 28u8, - 242u8, 87u8, 245u8, 55u8, 40u8, 103u8, 151u8, 178u8, - ]) - } - - #[doc = "Force there to be a new era at the end of the next session. After this, it will be"] - #[doc = "reset to normal (non-forced) behaviour."] - #[doc = ""] - #[doc = "The dispatch origin must be Root."] - #[doc = ""] - #[doc = "# Warning"] - #[doc = ""] - #[doc = "The election process starts multiple blocks before the end of the era."] - #[doc = "If this is called just before a new era is triggered, the election process may not"] - #[doc = "have enough blocks to get a result."] - #[doc = ""] - #[doc = "# "] - #[doc = "- No arguments."] - #[doc = "- Weight: O(1)"] - #[doc = "- Write ForceEra"] - #[doc = "# "] - pub fn force_new_era(&self) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new("Staking", "force_new_era", ForceNewEra {}, [ - 230u8, 242u8, 169u8, 196u8, 78u8, 145u8, 24u8, 191u8, 113u8, 68u8, 5u8, - 138u8, 48u8, 51u8, 109u8, 126u8, 73u8, 136u8, 162u8, 158u8, 174u8, 201u8, - 213u8, 230u8, 215u8, 44u8, 200u8, 32u8, 75u8, 27u8, 23u8, 254u8, - ]) - } - - #[doc = "Set the validators who cannot be slashed (if any)."] - #[doc = ""] - #[doc = "The dispatch origin must be Root."] - pub fn set_invulnerables( - &self, - invulnerables: ::std::vec::Vec<::subxt::utils::AccountId32>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Staking", - "set_invulnerables", - SetInvulnerables { invulnerables }, - [ - 2u8, 148u8, 221u8, 111u8, 153u8, 48u8, 222u8, 36u8, 228u8, 84u8, 18u8, - 35u8, 168u8, 239u8, 53u8, 245u8, 27u8, 76u8, 18u8, 203u8, 206u8, 9u8, - 8u8, 81u8, 35u8, 224u8, 22u8, 133u8, 58u8, 99u8, 103u8, 39u8, - ], - ) - } - - #[doc = "Force a current staker to become completely unstaked, immediately."] - #[doc = ""] - #[doc = "The dispatch origin must be Root."] - pub fn force_unstake( - &self, - stash: ::subxt::utils::AccountId32, - num_slashing_spans: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Staking", - "force_unstake", - ForceUnstake { - stash, - num_slashing_spans, - }, - [ - 94u8, 247u8, 238u8, 47u8, 250u8, 6u8, 96u8, 175u8, 173u8, 123u8, 161u8, - 187u8, 162u8, 214u8, 176u8, 233u8, 33u8, 33u8, 167u8, 239u8, 40u8, - 223u8, 19u8, 131u8, 230u8, 39u8, 175u8, 200u8, 36u8, 182u8, 76u8, - 207u8, - ], - ) - } - - #[doc = "Force there to be a new era at the end of sessions indefinitely."] - #[doc = ""] - #[doc = "The dispatch origin must be Root."] - #[doc = ""] - #[doc = "# Warning"] - #[doc = ""] - #[doc = "The election process starts multiple blocks before the end of the era."] - #[doc = "If this is called just before a new era is triggered, the election process may not"] - #[doc = "have enough blocks to get a result."] - pub fn force_new_era_always( - &self, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Staking", - "force_new_era_always", - ForceNewEraAlways {}, - [ - 179u8, 118u8, 189u8, 54u8, 248u8, 141u8, 207u8, 142u8, 80u8, 37u8, - 241u8, 185u8, 138u8, 254u8, 117u8, 147u8, 225u8, 118u8, 34u8, 177u8, - 197u8, 158u8, 8u8, 82u8, 202u8, 108u8, 208u8, 26u8, 64u8, 33u8, 74u8, - 43u8, - ], - ) - } - - #[doc = "Cancel enactment of a deferred slash."] - #[doc = ""] - #[doc = "Can be called by the `T::AdminOrigin`."] - #[doc = ""] - #[doc = "Parameters: era and indices of the slashes for that era to kill."] - pub fn cancel_deferred_slash( - &self, - era: ::core::primitive::u32, - slash_indices: ::std::vec::Vec<::core::primitive::u32>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Staking", - "cancel_deferred_slash", - CancelDeferredSlash { era, slash_indices }, + keep_alive: ::core::primitive::bool, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Balances", + "transfer_all", + types::TransferAll { dest, keep_alive }, [ - 120u8, 57u8, 162u8, 105u8, 91u8, 250u8, 129u8, 240u8, 110u8, 234u8, - 170u8, 98u8, 164u8, 65u8, 106u8, 101u8, 19u8, 88u8, 146u8, 210u8, - 171u8, 44u8, 37u8, 50u8, 65u8, 178u8, 37u8, 223u8, 239u8, 197u8, 116u8, - 168u8, + 39u8, 244u8, 99u8, 182u8, 181u8, 159u8, 95u8, 217u8, 8u8, 210u8, 113u8, + 254u8, 171u8, 199u8, 93u8, 146u8, 209u8, 229u8, 55u8, 97u8, 131u8, + 226u8, 155u8, 41u8, 199u8, 145u8, 177u8, 137u8, 198u8, 241u8, 90u8, + 20u8, ], ) } - #[doc = "Pay out all the stakers behind a single validator for a single era."] - #[doc = ""] - #[doc = "- `validator_stash` is the stash account of the validator. Their nominators, up to"] - #[doc = " `T::MaxNominatorRewardedPerValidator`, will also receive their rewards."] - #[doc = "- `era` may be any era between `[current_era - history_depth; current_era]`."] - #[doc = ""] - #[doc = "The origin of this call must be _Signed_. Any account can call this function, even if"] - #[doc = "it is not one of the stakers."] - #[doc = ""] - #[doc = "# "] - #[doc = "- Time complexity: at most O(MaxNominatorRewardedPerValidator)."] - #[doc = "- Contains a limited number of reads and writes."] - #[doc = "-----------"] - #[doc = "N is the Number of payouts for the validator (including the validator)"] - #[doc = "Weight:"] - #[doc = "- Reward Destination Staked: O(N)"] - #[doc = "- Reward Destination Controller (Creating): O(N)"] + #[doc = "Unreserve some balance from a user by force."] #[doc = ""] - #[doc = " NOTE: weights are assuming that payouts are made to alive stash account (Staked)."] - #[doc = " Paying even a dead controller is cheaper weight-wise. We don't do any refunds here."] - #[doc = "# "] - pub fn payout_stakers( + #[doc = "Can only be called by ROOT."] + pub fn force_unreserve( &self, - validator_stash: ::subxt::utils::AccountId32, - era: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Staking", - "payout_stakers", - PayoutStakers { - validator_stash, - era, - }, + who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + amount: ::core::primitive::u128, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Balances", + "force_unreserve", + types::ForceUnreserve { who, amount }, [ - 184u8, 194u8, 33u8, 118u8, 7u8, 203u8, 89u8, 119u8, 214u8, 76u8, 178u8, - 20u8, 82u8, 111u8, 57u8, 132u8, 212u8, 43u8, 232u8, 91u8, 252u8, 49u8, - 42u8, 115u8, 1u8, 181u8, 154u8, 207u8, 144u8, 206u8, 205u8, 33u8, - ], - ) - } - - #[doc = "Rebond a portion of the stash scheduled to be unlocked."] - #[doc = ""] - #[doc = "The dispatch origin must be signed by the controller."] - #[doc = ""] - #[doc = "# "] - #[doc = "- Time complexity: O(L), where L is unlocking chunks"] - #[doc = "- Bounded by `MaxUnlockingChunks`."] - #[doc = "- Storage changes: Can't increase storage, only decrease it."] - #[doc = "# "] - pub fn rebond( - &self, - value: ::core::primitive::u128, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new("Staking", "rebond", Rebond { value }, [ - 25u8, 22u8, 191u8, 172u8, 133u8, 101u8, 139u8, 102u8, 134u8, 16u8, 136u8, - 56u8, 137u8, 162u8, 4u8, 253u8, 196u8, 30u8, 234u8, 49u8, 102u8, 68u8, - 145u8, 96u8, 148u8, 219u8, 162u8, 17u8, 177u8, 184u8, 34u8, 113u8, - ]) - } - - #[doc = "Remove all data structures concerning a staker/stash once it is at a state where it can"] - #[doc = "be considered `dust` in the staking system. The requirements are:"] - #[doc = ""] - #[doc = "1. the `total_balance` of the stash is below existential deposit."] - #[doc = "2. or, the `ledger.total` of the stash is below existential deposit."] - #[doc = ""] - #[doc = "The former can happen in cases like a slash; the latter when a fully unbonded account"] - #[doc = "is still receiving staking rewards in `RewardDestination::Staked`."] - #[doc = ""] - #[doc = "It can be called by anyone, as long as `stash` meets the above requirements."] - #[doc = ""] - #[doc = "Refunds the transaction fees upon successful execution."] - pub fn reap_stash( - &self, - stash: ::subxt::utils::AccountId32, - num_slashing_spans: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Staking", - "reap_stash", - ReapStash { - stash, - num_slashing_spans, - }, - [ - 34u8, 168u8, 120u8, 161u8, 95u8, 199u8, 106u8, 233u8, 61u8, 240u8, - 166u8, 31u8, 183u8, 165u8, 158u8, 179u8, 32u8, 130u8, 27u8, 164u8, - 112u8, 44u8, 14u8, 125u8, 227u8, 87u8, 70u8, 203u8, 194u8, 24u8, 212u8, - 177u8, - ], - ) - } - - #[doc = "Remove the given nominations from the calling validator."] - #[doc = ""] - #[doc = "Effects will be felt at the beginning of the next era."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ by the controller, not the stash."] - #[doc = ""] - #[doc = "- `who`: A list of nominator stash accounts who are nominating this validator which"] - #[doc = " should no longer be nominating this validator."] - #[doc = ""] - #[doc = "Note: Making this call only makes sense if you first set the validator preferences to"] - #[doc = "block any further nominations."] - pub fn kick( - &self, - who: ::std::vec::Vec< - ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new("Staking", "kick", Kick { who }, [ - 94u8, 27u8, 18u8, 16u8, 126u8, 129u8, 47u8, 169u8, 114u8, 84u8, 48u8, 95u8, - 235u8, 237u8, 33u8, 118u8, 115u8, 243u8, 166u8, 120u8, 121u8, 70u8, 227u8, - 240u8, 205u8, 240u8, 211u8, 202u8, 251u8, 232u8, 209u8, 12u8, - ]) - } - - #[doc = "Update the various staking configurations ."] - #[doc = ""] - #[doc = "* `min_nominator_bond`: The minimum active bond needed to be a nominator."] - #[doc = "* `min_validator_bond`: The minimum active bond needed to be a validator."] - #[doc = "* `max_nominator_count`: The max number of users who can be a nominator at once. When"] - #[doc = " set to `None`, no limit is enforced."] - #[doc = "* `max_validator_count`: The max number of users who can be a validator at once. When"] - #[doc = " set to `None`, no limit is enforced."] - #[doc = "* `chill_threshold`: The ratio of `max_nominator_count` or `max_validator_count` which"] - #[doc = " should be filled in order for the `chill_other` transaction to work."] - #[doc = "* `min_commission`: The minimum amount of commission that each validators must maintain."] - #[doc = " This is checked only upon calling `validate`. Existing validators are not affected."] - #[doc = ""] - #[doc = "RuntimeOrigin must be Root to call this function."] - #[doc = ""] - #[doc = "NOTE: Existing nominators and validators will not be affected by this update."] - #[doc = "to kick people under the new limits, `chill_other` should be called."] - pub fn set_staking_configs( - &self, - min_nominator_bond: runtime_types::pallet_staking::pallet::pallet::ConfigOp< - ::core::primitive::u128, - >, - min_validator_bond: runtime_types::pallet_staking::pallet::pallet::ConfigOp< - ::core::primitive::u128, - >, - max_nominator_count: runtime_types::pallet_staking::pallet::pallet::ConfigOp< - ::core::primitive::u32, - >, - max_validator_count: runtime_types::pallet_staking::pallet::pallet::ConfigOp< - ::core::primitive::u32, - >, - chill_threshold: runtime_types::pallet_staking::pallet::pallet::ConfigOp< - runtime_types::sp_arithmetic::per_things::Percent, - >, - min_commission: runtime_types::pallet_staking::pallet::pallet::ConfigOp< - runtime_types::sp_arithmetic::per_things::Perbill, - >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Staking", - "set_staking_configs", - SetStakingConfigs { - min_nominator_bond, - min_validator_bond, - max_nominator_count, - max_validator_count, - chill_threshold, - min_commission, - }, - [ - 176u8, 168u8, 155u8, 176u8, 27u8, 79u8, 223u8, 92u8, 88u8, 93u8, 223u8, - 69u8, 179u8, 250u8, 138u8, 138u8, 87u8, 220u8, 36u8, 3u8, 126u8, 213u8, - 16u8, 68u8, 3u8, 16u8, 218u8, 151u8, 98u8, 169u8, 217u8, 75u8, - ], - ) - } - - #[doc = "Declare a `controller` to stop participating as either a validator or nominator."] - #[doc = ""] - #[doc = "Effects will be felt at the beginning of the next era."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_, but can be called by anyone."] - #[doc = ""] - #[doc = "If the caller is the same as the controller being targeted, then no further checks are"] - #[doc = "enforced, and this function behaves just like `chill`."] - #[doc = ""] - #[doc = "If the caller is different than the controller being targeted, the following conditions"] - #[doc = "must be met:"] - #[doc = ""] - #[doc = "* `controller` must belong to a nominator who has become non-decodable,"] - #[doc = ""] - #[doc = "Or:"] - #[doc = ""] - #[doc = "* A `ChillThreshold` must be set and checked which defines how close to the max"] - #[doc = " nominators or validators we must reach before users can start chilling one-another."] - #[doc = "* A `MaxNominatorCount` and `MaxValidatorCount` must be set which is used to determine"] - #[doc = " how close we are to the threshold."] - #[doc = "* A `MinNominatorBond` and `MinValidatorBond` must be set and checked, which determines"] - #[doc = " if this is a person that should be chilled because they have not met the threshold"] - #[doc = " bond required."] - #[doc = ""] - #[doc = "This can be helpful if bond requirements are updated, and we need to remove old users"] - #[doc = "who do not satisfy these requirements."] - pub fn chill_other( - &self, - controller: ::subxt::utils::AccountId32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Staking", - "chill_other", - ChillOther { controller }, - [ - 140u8, 98u8, 4u8, 203u8, 91u8, 131u8, 123u8, 119u8, 169u8, 47u8, 188u8, - 23u8, 205u8, 170u8, 82u8, 220u8, 166u8, 170u8, 135u8, 176u8, 68u8, - 228u8, 14u8, 67u8, 42u8, 52u8, 140u8, 231u8, 62u8, 167u8, 80u8, 173u8, - ], - ) - } - - #[doc = "Force a validator to have at least the minimum commission. This will not affect a"] - #[doc = "validator who already has a commission greater than or equal to the minimum. Any account"] - #[doc = "can call this."] - pub fn force_apply_min_commission( - &self, - validator_stash: ::subxt::utils::AccountId32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Staking", - "force_apply_min_commission", - ForceApplyMinCommission { validator_stash }, - [ - 136u8, 163u8, 85u8, 134u8, 240u8, 247u8, 183u8, 227u8, 226u8, 202u8, - 102u8, 186u8, 138u8, 119u8, 78u8, 123u8, 229u8, 135u8, 129u8, 241u8, - 119u8, 106u8, 41u8, 182u8, 121u8, 181u8, 242u8, 175u8, 74u8, 207u8, - 64u8, 106u8, - ], - ) - } - - #[doc = "Sets the minimum amount of commission that each validators must maintain."] - #[doc = ""] - #[doc = "This call has lower privilege requirements than `set_staking_config` and can be called"] - #[doc = "by the `T::AdminOrigin`. Root can always call this."] - pub fn set_min_commission( - &self, - new: runtime_types::sp_arithmetic::per_things::Perbill, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Staking", - "set_min_commission", - SetMinCommission { new }, - [ - 62u8, 139u8, 175u8, 245u8, 212u8, 113u8, 117u8, 130u8, 191u8, 173u8, - 78u8, 97u8, 19u8, 104u8, 185u8, 207u8, 201u8, 14u8, 200u8, 208u8, - 184u8, 195u8, 242u8, 175u8, 158u8, 156u8, 51u8, 58u8, 118u8, 154u8, - 68u8, 221u8, + 153u8, 166u8, 64u8, 196u8, 251u8, 238u8, 79u8, 171u8, 169u8, 183u8, + 68u8, 220u8, 117u8, 237u8, 231u8, 156u8, 6u8, 186u8, 196u8, 238u8, + 195u8, 16u8, 84u8, 236u8, 40u8, 6u8, 228u8, 211u8, 19u8, 248u8, 171u8, + 137u8, ], ) } } } #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::pallet_staking::pallet::pallet::Event; + pub type Event = runtime_types::pallet_balances::pallet::Event; pub mod events { use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "The era payout has been set; the first balance is the validator-payout; the second is"] - #[doc = "the remainder from the maximum amount of reward."] - pub struct EraPaid { - pub era_index: ::core::primitive::u32, - pub validator_payout: ::core::primitive::u128, - pub remainder: ::core::primitive::u128, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "An account was created with some free balance."] + pub struct Endowed { + pub account: ::subxt::utils::AccountId32, + pub free_balance: ::core::primitive::u128, } - impl ::subxt::events::StaticEvent for EraPaid { - const EVENT: &'static str = "EraPaid"; - const PALLET: &'static str = "Staking"; + impl ::subxt::events::StaticEvent for Endowed { + const EVENT: &'static str = "Endowed"; + const PALLET: &'static str = "Balances"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "The nominator has been rewarded by this amount."] - pub struct Rewarded { - pub stash: ::subxt::utils::AccountId32, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "An account was removed whose balance was non-zero but below ExistentialDeposit,"] + #[doc = "resulting in an outright loss."] + pub struct DustLost { + pub account: ::subxt::utils::AccountId32, pub amount: ::core::primitive::u128, } - impl ::subxt::events::StaticEvent for Rewarded { - const EVENT: &'static str = "Rewarded"; - const PALLET: &'static str = "Staking"; + impl ::subxt::events::StaticEvent for DustLost { + const EVENT: &'static str = "DustLost"; + const PALLET: &'static str = "Balances"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "A staker (validator or nominator) has been slashed by the given amount."] - pub struct Slashed { - pub staker: ::subxt::utils::AccountId32, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Transfer succeeded."] + pub struct Transfer { + pub from: ::subxt::utils::AccountId32, + pub to: ::subxt::utils::AccountId32, pub amount: ::core::primitive::u128, } - impl ::subxt::events::StaticEvent for Slashed { - const EVENT: &'static str = "Slashed"; - const PALLET: &'static str = "Staking"; + impl ::subxt::events::StaticEvent for Transfer { + const EVENT: &'static str = "Transfer"; + const PALLET: &'static str = "Balances"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "A slash for the given validator, for the given percentage of their stake, at the given"] - #[doc = "era as been reported."] - pub struct SlashReported { - pub validator: ::subxt::utils::AccountId32, - pub fraction: runtime_types::sp_arithmetic::per_things::Perbill, - pub slash_era: ::core::primitive::u32, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A balance was set by root."] + pub struct BalanceSet { + pub who: ::subxt::utils::AccountId32, + pub free: ::core::primitive::u128, + pub reserved: ::core::primitive::u128, } - impl ::subxt::events::StaticEvent for SlashReported { - const EVENT: &'static str = "SlashReported"; - const PALLET: &'static str = "Staking"; + impl ::subxt::events::StaticEvent for BalanceSet { + const EVENT: &'static str = "BalanceSet"; + const PALLET: &'static str = "Balances"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "An old slashing report from a prior era was discarded because it could"] - #[doc = "not be processed."] - pub struct OldSlashingReportDiscarded { - pub session_index: ::core::primitive::u32, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Some balance was reserved (moved from free to reserved)."] + pub struct Reserved { + pub who: ::subxt::utils::AccountId32, + pub amount: ::core::primitive::u128, } - impl ::subxt::events::StaticEvent for OldSlashingReportDiscarded { - const EVENT: &'static str = "OldSlashingReportDiscarded"; - const PALLET: &'static str = "Staking"; + impl ::subxt::events::StaticEvent for Reserved { + const EVENT: &'static str = "Reserved"; + const PALLET: &'static str = "Balances"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "A new set of stakers was elected."] - pub struct StakersElected; - impl ::subxt::events::StaticEvent for StakersElected { - const EVENT: &'static str = "StakersElected"; - const PALLET: &'static str = "Staking"; + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Some balance was unreserved (moved from reserved to free)."] + pub struct Unreserved { + pub who: ::subxt::utils::AccountId32, + pub amount: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for Unreserved { + const EVENT: &'static str = "Unreserved"; + const PALLET: &'static str = "Balances"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "An account has bonded this amount. \\[stash, amount\\]"] - #[doc = ""] - #[doc = "NOTE: This event is only emitted when funds are bonded via a dispatchable. Notably,"] - #[doc = "it will not be emitted for staking rewards when they are added to stake."] - pub struct Bonded { - pub stash: ::subxt::utils::AccountId32, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Some balance was moved from the reserve of the first account to the second account."] + #[doc = "Final argument indicates the destination balance type."] + pub struct ReserveRepatriated { + pub from: ::subxt::utils::AccountId32, + pub to: ::subxt::utils::AccountId32, pub amount: ::core::primitive::u128, + pub destination_status: + runtime_types::frame_support::traits::tokens::misc::BalanceStatus, } - impl ::subxt::events::StaticEvent for Bonded { - const EVENT: &'static str = "Bonded"; - const PALLET: &'static str = "Staking"; + impl ::subxt::events::StaticEvent for ReserveRepatriated { + const EVENT: &'static str = "ReserveRepatriated"; + const PALLET: &'static str = "Balances"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "An account has unbonded this amount."] - pub struct Unbonded { - pub stash: ::subxt::utils::AccountId32, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Some amount was deposited (e.g. for transaction fees)."] + pub struct Deposit { + pub who: ::subxt::utils::AccountId32, pub amount: ::core::primitive::u128, } - impl ::subxt::events::StaticEvent for Unbonded { - const EVENT: &'static str = "Unbonded"; - const PALLET: &'static str = "Staking"; + impl ::subxt::events::StaticEvent for Deposit { + const EVENT: &'static str = "Deposit"; + const PALLET: &'static str = "Balances"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "An account has called `withdraw_unbonded` and removed unbonding chunks worth `Balance`"] - #[doc = "from the unlocking queue."] - pub struct Withdrawn { - pub stash: ::subxt::utils::AccountId32, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Some amount was withdrawn from the account (e.g. for transaction fees)."] + pub struct Withdraw { + pub who: ::subxt::utils::AccountId32, pub amount: ::core::primitive::u128, } - impl ::subxt::events::StaticEvent for Withdrawn { - const EVENT: &'static str = "Withdrawn"; - const PALLET: &'static str = "Staking"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "A nominator has been kicked from a validator."] - pub struct Kicked { - pub nominator: ::subxt::utils::AccountId32, - pub stash: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for Kicked { - const EVENT: &'static str = "Kicked"; - const PALLET: &'static str = "Staking"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "The election failed. No new era is planned."] - pub struct StakingElectionFailed; - impl ::subxt::events::StaticEvent for StakingElectionFailed { - const EVENT: &'static str = "StakingElectionFailed"; - const PALLET: &'static str = "Staking"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "An account has stopped participating as either a validator or nominator."] - pub struct Chilled { - pub stash: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for Chilled { - const EVENT: &'static str = "Chilled"; - const PALLET: &'static str = "Staking"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "The stakers' rewards are getting paid."] - pub struct PayoutStarted { - pub era_index: ::core::primitive::u32, - pub validator_stash: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for PayoutStarted { - const EVENT: &'static str = "PayoutStarted"; - const PALLET: &'static str = "Staking"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "A validator has set their preferences."] - pub struct ValidatorPrefsSet { - pub stash: ::subxt::utils::AccountId32, - pub prefs: runtime_types::pallet_staking::ValidatorPrefs, - } - impl ::subxt::events::StaticEvent for ValidatorPrefsSet { - const EVENT: &'static str = "ValidatorPrefsSet"; - const PALLET: &'static str = "Staking"; + impl ::subxt::events::StaticEvent for Withdraw { + const EVENT: &'static str = "Withdraw"; + const PALLET: &'static str = "Balances"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "A new force era mode was set."] - pub struct ForceEra { - pub mode: runtime_types::pallet_staking::Forcing, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Some amount was removed from the account (e.g. for misbehavior)."] + pub struct Slashed { + pub who: ::subxt::utils::AccountId32, + pub amount: ::core::primitive::u128, } - impl ::subxt::events::StaticEvent for ForceEra { - const EVENT: &'static str = "ForceEra"; - const PALLET: &'static str = "Staking"; + impl ::subxt::events::StaticEvent for Slashed { + const EVENT: &'static str = "Slashed"; + const PALLET: &'static str = "Balances"; } } pub mod storage { use super::runtime_types; pub struct StorageApi; impl StorageApi { - #[doc = " The ideal number of active validators."] - pub fn validator_count( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Staking", - "ValidatorCount", - vec![], - [ - 245u8, 75u8, 214u8, 110u8, 66u8, 164u8, 86u8, 206u8, 69u8, 89u8, 12u8, - 111u8, 117u8, 16u8, 228u8, 184u8, 207u8, 6u8, 0u8, 126u8, 221u8, 67u8, - 125u8, 218u8, 188u8, 245u8, 156u8, 188u8, 34u8, 85u8, 208u8, 197u8, - ], - ) - } - - #[doc = " Minimum number of staking participants before emergency conditions are imposed."] - pub fn minimum_validator_count( + #[doc = " The total units issued in the system."] + pub fn total_issuance( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u128, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), > { - ::subxt::storage::address::StaticStorageAddress::new( - "Staking", - "MinimumValidatorCount", + ::subxt::storage::address::Address::new_static( + "Balances", + "TotalIssuance", vec![], [ - 82u8, 95u8, 128u8, 55u8, 136u8, 134u8, 71u8, 117u8, 135u8, 76u8, 44u8, - 46u8, 174u8, 34u8, 170u8, 228u8, 175u8, 1u8, 234u8, 162u8, 91u8, 252u8, - 127u8, 68u8, 243u8, 241u8, 13u8, 107u8, 214u8, 70u8, 87u8, 249u8, + 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, ], ) } - #[doc = " Any validators that may never be slashed or forcibly kicked. It's a Vec since they're"] - #[doc = " easy to initialize and the performance hit is minimal (we expect no more than four"] - #[doc = " invulnerables) and restricted to testnets."] - pub fn invulnerables( + #[doc = " The total units of outstanding deactivated balance in the system."] + pub fn inactive_issuance( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec<::subxt::utils::AccountId32>, - >, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u128, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), > { - ::subxt::storage::address::StaticStorageAddress::new( - "Staking", - "Invulnerables", + ::subxt::storage::address::Address::new_static( + "Balances", + "InactiveIssuance", vec![], [ - 77u8, 78u8, 63u8, 199u8, 150u8, 167u8, 135u8, 130u8, 192u8, 51u8, - 202u8, 119u8, 68u8, 49u8, 241u8, 68u8, 82u8, 90u8, 226u8, 201u8, 96u8, - 170u8, 21u8, 173u8, 236u8, 116u8, 148u8, 8u8, 174u8, 92u8, 7u8, 11u8, + 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 = " Map from all locked \"stash\" accounts to the controller account."] + #[doc = " The Balances pallet example of storing the balance of an account."] #[doc = ""] - #[doc = " TWOX-NOTE: SAFE since `AccountId` is a secure hash."] - pub fn bonded( + #[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, _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::subxt::utils::AccountId32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_balances::AccountData<::core::primitive::u128>, + ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, - (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Staking", - "Bonded", - vec![::subxt::storage::address::StorageMapKey::new( + ::subxt::storage::address::Address::new_static( + "Balances", + "Account", + vec![::subxt::storage::address::make_static_storage_map_key( _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ - 35u8, 197u8, 156u8, 60u8, 22u8, 59u8, 103u8, 83u8, 77u8, 15u8, 118u8, - 193u8, 155u8, 97u8, 229u8, 36u8, 119u8, 128u8, 224u8, 162u8, 21u8, - 46u8, 199u8, 221u8, 15u8, 74u8, 59u8, 70u8, 77u8, 218u8, 73u8, 165u8, + 135u8, 46u8, 233u8, 118u8, 128u8, 96u8, 33u8, 62u8, 99u8, 65u8, 196u8, + 52u8, 103u8, 125u8, 58u8, 185u8, 185u8, 203u8, 8u8, 56u8, 49u8, 196u8, + 140u8, 246u8, 196u8, 141u8, 232u8, 245u8, 26u8, 164u8, 193u8, 149u8, ], ) } - #[doc = " Map from all locked \"stash\" accounts to the controller account."] + #[doc = " The Balances pallet example of storing the balance of an account."] #[doc = ""] - #[doc = " TWOX-NOTE: SAFE since `AccountId` is a secure hash."] - pub fn bonded_root( + #[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_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::subxt::utils::AccountId32>, - (), + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_balances::AccountData<::core::primitive::u128>, (), ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Staking", - "Bonded", + ::subxt::storage::address::Address::new_static( + "Balances", + "Account", Vec::new(), [ - 35u8, 197u8, 156u8, 60u8, 22u8, 59u8, 103u8, 83u8, 77u8, 15u8, 118u8, - 193u8, 155u8, 97u8, 229u8, 36u8, 119u8, 128u8, 224u8, 162u8, 21u8, - 46u8, 199u8, 221u8, 15u8, 74u8, 59u8, 70u8, 77u8, 218u8, 73u8, 165u8, + 135u8, 46u8, 233u8, 118u8, 128u8, 96u8, 33u8, 62u8, 99u8, 65u8, 196u8, + 52u8, 103u8, 125u8, 58u8, 185u8, 185u8, 203u8, 8u8, 56u8, 49u8, 196u8, + 140u8, 246u8, 196u8, 141u8, 232u8, 245u8, 26u8, 164u8, 193u8, 149u8, ], ) } - #[doc = " The minimum active bond to become and maintain the role of a nominator."] - pub fn min_nominator_bond( + #[doc = " Any liquidity locks on some account balances."] + #[doc = " NOTE: Should only be accessed when setting, changing and freeing a lock."] + pub fn locks( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec< + runtime_types::pallet_balances::BalanceLock<::core::primitive::u128>, + >, + ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, - (), > { - ::subxt::storage::address::StaticStorageAddress::new( - "Staking", - "MinNominatorBond", - vec![], - [ - 187u8, 66u8, 149u8, 226u8, 72u8, 219u8, 57u8, 246u8, 102u8, 47u8, 71u8, - 12u8, 219u8, 204u8, 127u8, 223u8, 58u8, 134u8, 81u8, 165u8, 200u8, - 142u8, 196u8, 158u8, 26u8, 38u8, 165u8, 19u8, 91u8, 251u8, 119u8, 84u8, - ], - ) - } - - #[doc = " The minimum active bond to become and maintain the role of a validator."] - pub fn min_validator_bond( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Staking", - "MinValidatorBond", - vec![], - [ - 48u8, 105u8, 85u8, 178u8, 142u8, 208u8, 208u8, 19u8, 236u8, 130u8, - 129u8, 169u8, 35u8, 245u8, 66u8, 182u8, 92u8, 20u8, 22u8, 109u8, 155u8, - 174u8, 87u8, 118u8, 242u8, 216u8, 193u8, 154u8, 4u8, 5u8, 66u8, 56u8, - ], - ) - } - - #[doc = " The minimum active nominator stake of the last successful election."] - pub fn minimum_active_stake( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Staking", - "MinimumActiveStake", - vec![], - [ - 172u8, 190u8, 228u8, 47u8, 47u8, 192u8, 182u8, 59u8, 9u8, 18u8, 103u8, - 46u8, 175u8, 54u8, 17u8, 79u8, 89u8, 107u8, 255u8, 200u8, 182u8, 107u8, - 89u8, 157u8, 55u8, 16u8, 77u8, 46u8, 154u8, 169u8, 103u8, 151u8, - ], - ) - } - - #[doc = " The minimum amount of commission that validators can set."] - #[doc = ""] - #[doc = " If set to `0`, no limit exists."] - pub fn min_commission( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_arithmetic::per_things::Perbill, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Staking", - "MinCommission", - vec![], - [ - 61u8, 101u8, 69u8, 27u8, 220u8, 179u8, 5u8, 71u8, 66u8, 227u8, 84u8, - 98u8, 18u8, 141u8, 183u8, 49u8, 98u8, 46u8, 123u8, 114u8, 198u8, 85u8, - 15u8, 175u8, 243u8, 239u8, 133u8, 129u8, 146u8, 174u8, 254u8, 158u8, - ], - ) - } - - #[doc = " Map from all (unlocked) \"controller\" accounts to the info regarding the staking."] - pub fn ledger( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_staking::StakingLedger, - >, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Staking", - "Ledger", - vec![::subxt::storage::address::StorageMapKey::new( + ::subxt::storage::address::Address::new_static( + "Balances", + "Locks", + vec![::subxt::storage::address::make_static_storage_map_key( _0.borrow(), - ::subxt::storage::address::StorageHasher::Blake2_128Concat, )], [ - 31u8, 205u8, 3u8, 165u8, 22u8, 22u8, 62u8, 92u8, 33u8, 189u8, 124u8, - 120u8, 177u8, 70u8, 27u8, 242u8, 188u8, 184u8, 204u8, 188u8, 242u8, - 140u8, 128u8, 230u8, 85u8, 99u8, 181u8, 173u8, 67u8, 252u8, 37u8, - 236u8, + 44u8, 44u8, 48u8, 20u8, 121u8, 168u8, 200u8, 87u8, 205u8, 172u8, 111u8, + 208u8, 62u8, 243u8, 225u8, 223u8, 181u8, 36u8, 197u8, 9u8, 52u8, 182u8, + 113u8, 55u8, 126u8, 164u8, 82u8, 209u8, 151u8, 126u8, 186u8, 85u8, ], ) } - #[doc = " Map from all (unlocked) \"controller\" accounts to the info regarding the staking."] - pub fn ledger_root( + #[doc = " Any liquidity locks on some account balances."] + #[doc = " NOTE: Should only be accessed when setting, changing and freeing a lock."] + pub fn locks_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_staking::StakingLedger, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec< + runtime_types::pallet_balances::BalanceLock<::core::primitive::u128>, >, (), - (), + ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Staking", - "Ledger", + ::subxt::storage::address::Address::new_static( + "Balances", + "Locks", Vec::new(), [ - 31u8, 205u8, 3u8, 165u8, 22u8, 22u8, 62u8, 92u8, 33u8, 189u8, 124u8, - 120u8, 177u8, 70u8, 27u8, 242u8, 188u8, 184u8, 204u8, 188u8, 242u8, - 140u8, 128u8, 230u8, 85u8, 99u8, 181u8, 173u8, 67u8, 252u8, 37u8, - 236u8, + 44u8, 44u8, 48u8, 20u8, 121u8, 168u8, 200u8, 87u8, 205u8, 172u8, 111u8, + 208u8, 62u8, 243u8, 225u8, 223u8, 181u8, 36u8, 197u8, 9u8, 52u8, 182u8, + 113u8, 55u8, 126u8, 164u8, 82u8, 209u8, 151u8, 126u8, 186u8, 85u8, ], ) } - #[doc = " Where the reward payment should be made. Keyed by stash."] - #[doc = ""] - #[doc = " TWOX-NOTE: SAFE since `AccountId` is a secure hash."] - pub fn payee( + #[doc = " Named reserves on some account balances."] + pub fn reserves( &self, _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_staking::RewardDestination< - ::subxt::utils::AccountId32, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + runtime_types::pallet_balances::ReserveData< + [::core::primitive::u8; 8usize], + ::core::primitive::u128, >, >, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Staking", - "Payee", - vec![::subxt::storage::address::StorageMapKey::new( + ::subxt::storage::address::Address::new_static( + "Balances", + "Reserves", + vec![::subxt::storage::address::make_static_storage_map_key( _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ - 195u8, 125u8, 82u8, 213u8, 216u8, 64u8, 76u8, 63u8, 187u8, 163u8, 20u8, - 230u8, 153u8, 13u8, 189u8, 232u8, 119u8, 118u8, 107u8, 17u8, 102u8, - 245u8, 36u8, 42u8, 232u8, 137u8, 177u8, 165u8, 169u8, 246u8, 199u8, - 57u8, + 192u8, 99u8, 91u8, 129u8, 195u8, 73u8, 153u8, 126u8, 82u8, 52u8, 56u8, + 85u8, 105u8, 178u8, 113u8, 101u8, 229u8, 37u8, 242u8, 174u8, 166u8, + 244u8, 68u8, 173u8, 14u8, 225u8, 172u8, 70u8, 181u8, 211u8, 165u8, + 134u8, ], ) } - #[doc = " Where the reward payment should be made. Keyed by stash."] - #[doc = ""] - #[doc = " TWOX-NOTE: SAFE since `AccountId` is a secure hash."] - pub fn payee_root( + #[doc = " Named reserves on some account balances."] + pub fn reserves_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_staking::RewardDestination< - ::subxt::utils::AccountId32, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + runtime_types::pallet_balances::ReserveData< + [::core::primitive::u8; 8usize], + ::core::primitive::u128, >, >, (), ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Staking", - "Payee", + ::subxt::storage::address::Address::new_static( + "Balances", + "Reserves", Vec::new(), [ - 195u8, 125u8, 82u8, 213u8, 216u8, 64u8, 76u8, 63u8, 187u8, 163u8, 20u8, - 230u8, 153u8, 13u8, 189u8, 232u8, 119u8, 118u8, 107u8, 17u8, 102u8, - 245u8, 36u8, 42u8, 232u8, 137u8, 177u8, 165u8, 169u8, 246u8, 199u8, - 57u8, + 192u8, 99u8, 91u8, 129u8, 195u8, 73u8, 153u8, 126u8, 82u8, 52u8, 56u8, + 85u8, 105u8, 178u8, 113u8, 101u8, 229u8, 37u8, 242u8, 174u8, 166u8, + 244u8, 68u8, 173u8, 14u8, 225u8, 172u8, 70u8, 181u8, 211u8, 165u8, + 134u8, ], ) } - - #[doc = " The map from (wannabe) validator stash key to the preferences of that validator."] - #[doc = ""] - #[doc = " TWOX-NOTE: SAFE since `AccountId` is a secure hash."] - pub fn validators( + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The minimum amount required to keep an account open."] + pub fn existential_deposit( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_staking::ValidatorPrefs, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Staking", - "Validators", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], - [ - 80u8, 77u8, 66u8, 18u8, 197u8, 250u8, 41u8, 185u8, 43u8, 24u8, 149u8, - 164u8, 208u8, 60u8, 144u8, 29u8, 251u8, 195u8, 236u8, 196u8, 108u8, - 58u8, 80u8, 115u8, 246u8, 66u8, 226u8, 241u8, 201u8, 172u8, 229u8, - 152u8, - ], - ) + ) -> ::subxt::constants::Address<::core::primitive::u128> { + ::subxt::constants::Address::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 map from (wannabe) validator stash key to the preferences of that validator."] - #[doc = ""] - #[doc = " TWOX-NOTE: SAFE since `AccountId` is a secure hash."] - pub fn validators_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_staking::ValidatorPrefs, - >, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Staking", - "Validators", - Vec::new(), - [ - 80u8, 77u8, 66u8, 18u8, 197u8, 250u8, 41u8, 185u8, 43u8, 24u8, 149u8, - 164u8, 208u8, 60u8, 144u8, 29u8, 251u8, 195u8, 236u8, 196u8, 108u8, - 58u8, 80u8, 115u8, 246u8, 66u8, 226u8, 241u8, 201u8, 172u8, 229u8, - 152u8, - ], - ) + #[doc = " The maximum number of locks that should exist on an account."] + #[doc = " Not strictly enforced, but used for weight estimation."] + pub fn max_locks(&self) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::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 = "Counter for the related counted storage map"] - pub fn counter_for_validators( + #[doc = " The maximum number of named reserves that can exist on an account."] + pub fn max_reserves(&self) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::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, + ]) + } + } + } + } + pub mod transaction_payment { + use super::{root_mod, runtime_types}; + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub type Event = runtime_types::pallet_transaction_payment::pallet::Event; + pub mod events { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A transaction fee `actual_fee`, of which `tip` was added to the minimum inclusion fee,"] + #[doc = "has been paid by `who`."] + pub struct TransactionFeePaid { + pub who: ::subxt::utils::AccountId32, + pub actual_fee: ::core::primitive::u128, + pub tip: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for TransactionFeePaid { + const EVENT: &'static str = "TransactionFeePaid"; + const PALLET: &'static str = "TransactionPayment"; + } + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + pub fn next_fee_multiplier( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::sp_arithmetic::fixed_point::FixedU128, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), > { - ::subxt::storage::address::StaticStorageAddress::new( - "Staking", - "CounterForValidators", + ::subxt::storage::address::Address::new_static( + "TransactionPayment", + "NextFeeMultiplier", vec![], [ - 139u8, 25u8, 223u8, 6u8, 160u8, 239u8, 212u8, 85u8, 36u8, 185u8, 69u8, - 63u8, 21u8, 156u8, 144u8, 241u8, 112u8, 85u8, 49u8, 78u8, 88u8, 11u8, - 8u8, 48u8, 118u8, 34u8, 62u8, 159u8, 239u8, 122u8, 90u8, 45u8, + 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 = " The maximum validator count before we stop allowing new validators to join."] - #[doc = ""] - #[doc = " When this value is not set, no limits are enforced."] - pub fn max_validators_count( + pub fn storage_version( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_transaction_payment::Releases, + ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, - (), (), > { - ::subxt::storage::address::StaticStorageAddress::new( - "Staking", - "MaxValidatorsCount", + ::subxt::storage::address::Address::new_static( + "TransactionPayment", + "StorageVersion", vec![], [ - 250u8, 62u8, 16u8, 68u8, 192u8, 216u8, 236u8, 211u8, 217u8, 9u8, 213u8, - 49u8, 41u8, 37u8, 58u8, 62u8, 131u8, 112u8, 64u8, 26u8, 133u8, 7u8, - 130u8, 1u8, 71u8, 158u8, 14u8, 55u8, 169u8, 239u8, 223u8, 245u8, + 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, ], ) } - - #[doc = " The map from nominator stash key to their nomination preferences, namely the validators that"] - #[doc = " they wish to support."] + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " A fee mulitplier for `Operational` extrinsics to compute \"virtual tip\" to boost their"] + #[doc = " `priority`"] #[doc = ""] - #[doc = " Note that the keys of this storage map might become non-decodable in case the"] - #[doc = " [`Config::MaxNominations`] configuration is decreased. In this rare case, these nominators"] - #[doc = " are still existent in storage, their key is correct and retrievable (i.e. `contains_key`"] - #[doc = " indicates that they exist), but their value cannot be decoded. Therefore, the non-decodable"] - #[doc = " nominators will effectively not-exist, until they re-submit their preferences such that it"] - #[doc = " is within the bounds of the newly set `Config::MaxNominations`."] + #[doc = " This value is multipled by the `final_fee` to obtain a \"virtual tip\" that is later"] + #[doc = " added to a tip component in regular `priority` calculations."] + #[doc = " It means that a `Normal` transaction can front-run a similarly-sized `Operational`"] + #[doc = " extrinsic (with no tip), by including a tip value greater than the virtual tip."] #[doc = ""] - #[doc = " This implies that `::iter_keys().count()` and `::iter().count()` might return different"] - #[doc = " values for this map. Moreover, the main `::count()` is aligned with the former, namely the"] - #[doc = " number of keys that exist."] + #[doc = " ```rust,ignore"] + #[doc = " // For `Normal`"] + #[doc = " let priority = priority_calc(tip);"] #[doc = ""] - #[doc = " Lastly, if any of the nominators become non-decodable, they can be chilled immediately via"] - #[doc = " [`Call::chill_other`] dispatchable by anyone."] + #[doc = " // For `Operational`"] + #[doc = " let virtual_tip = (inclusion_fee + tip) * OperationalFeeMultiplier;"] + #[doc = " let priority = priority_calc(tip + virtual_tip);"] + #[doc = " ```"] #[doc = ""] - #[doc = " TWOX-NOTE: SAFE since `AccountId` is a secure hash."] - pub fn nominators( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Staking", - "Nominators", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], + #[doc = " Note that since we use `final_fee` the multiplier applies also to the regular `tip`"] + #[doc = " sent with the transaction. So, not only does the transaction get a priority bump based"] + #[doc = " on the `inclusion_fee`, but we also amplify the impact of tips applied to `Operational`"] + #[doc = " transactions."] + pub fn operational_fee_multiplier( + &self, + ) -> ::subxt::constants::Address<::core::primitive::u8> { + ::subxt::constants::Address::new_static( + "TransactionPayment", + "OperationalFeeMultiplier", [ - 1u8, 154u8, 55u8, 170u8, 215u8, 64u8, 56u8, 83u8, 254u8, 19u8, 152u8, - 85u8, 164u8, 171u8, 206u8, 129u8, 184u8, 45u8, 221u8, 181u8, 229u8, - 133u8, 200u8, 231u8, 16u8, 146u8, 247u8, 21u8, 77u8, 122u8, 165u8, - 134u8, + 141u8, 130u8, 11u8, 35u8, 226u8, 114u8, 92u8, 179u8, 168u8, 110u8, + 28u8, 91u8, 221u8, 64u8, 4u8, 148u8, 201u8, 193u8, 185u8, 66u8, 226u8, + 114u8, 97u8, 79u8, 62u8, 212u8, 202u8, 114u8, 237u8, 228u8, 183u8, + 165u8, ], ) } - - #[doc = " The map from nominator stash key to their nomination preferences, namely the validators that"] - #[doc = " they wish to support."] + } + } + } + pub mod election_provider_multi_phase { + use super::{root_mod, runtime_types}; + #[doc = "Error of the pallet that can be returned in response to dispatches."] + pub type Error = runtime_types::pallet_election_provider_multi_phase::pallet::Error; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub type Call = runtime_types::pallet_election_provider_multi_phase::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 :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SubmitUnsigned { + pub raw_solution: ::std::boxed::Box< + runtime_types::pallet_election_provider_multi_phase::RawSolution< + runtime_types::da_runtime::constants::staking::NposSolution16, + >, + >, + pub witness: + runtime_types::pallet_election_provider_multi_phase::SolutionOrSnapshotSize, + } + impl ::subxt::blocks::StaticExtrinsic for SubmitUnsigned { + const CALL: &'static str = "submit_unsigned"; + const PALLET: &'static str = "ElectionProviderMultiPhase"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetMinimumUntrustedScore { + pub maybe_next_score: + ::core::option::Option, + } + impl ::subxt::blocks::StaticExtrinsic for SetMinimumUntrustedScore { + const CALL: &'static str = "set_minimum_untrusted_score"; + const PALLET: &'static str = "ElectionProviderMultiPhase"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetEmergencyElectionResult { + pub supports: ::std::vec::Vec<( + ::subxt::utils::AccountId32, + runtime_types::sp_npos_elections::Support<::subxt::utils::AccountId32>, + )>, + } + impl ::subxt::blocks::StaticExtrinsic for SetEmergencyElectionResult { + const CALL: &'static str = "set_emergency_election_result"; + const PALLET: &'static str = "ElectionProviderMultiPhase"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Submit { + pub raw_solution: ::std::boxed::Box< + runtime_types::pallet_election_provider_multi_phase::RawSolution< + runtime_types::da_runtime::constants::staking::NposSolution16, + >, + >, + } + impl ::subxt::blocks::StaticExtrinsic for Submit { + const CALL: &'static str = "submit"; + const PALLET: &'static str = "ElectionProviderMultiPhase"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct GovernanceFallback { + pub maybe_max_voters: ::core::option::Option<::core::primitive::u32>, + pub maybe_max_targets: ::core::option::Option<::core::primitive::u32>, + } + impl ::subxt::blocks::StaticExtrinsic for GovernanceFallback { + const CALL: &'static str = "governance_fallback"; + const PALLET: &'static str = "ElectionProviderMultiPhase"; + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Submit a solution for the unsigned phase."] #[doc = ""] - #[doc = " Note that the keys of this storage map might become non-decodable in case the"] - #[doc = " [`Config::MaxNominations`] configuration is decreased. In this rare case, these nominators"] - #[doc = " are still existent in storage, their key is correct and retrievable (i.e. `contains_key`"] - #[doc = " indicates that they exist), but their value cannot be decoded. Therefore, the non-decodable"] - #[doc = " nominators will effectively not-exist, until they re-submit their preferences such that it"] - #[doc = " is within the bounds of the newly set `Config::MaxNominations`."] + #[doc = "The dispatch origin fo this call must be __none__."] #[doc = ""] - #[doc = " This implies that `::iter_keys().count()` and `::iter().count()` might return different"] - #[doc = " values for this map. Moreover, the main `::count()` is aligned with the former, namely the"] - #[doc = " number of keys that exist."] + #[doc = "This submission is checked on the fly. Moreover, this unsigned solution is only"] + #[doc = "validated when submitted to the pool from the **local** node. Effectively, this means"] + #[doc = "that only active validators can submit this transaction when authoring a block (similar"] + #[doc = "to an inherent)."] #[doc = ""] - #[doc = " Lastly, if any of the nominators become non-decodable, they can be chilled immediately via"] - #[doc = " [`Call::chill_other`] dispatchable by anyone."] + #[doc = "To prevent any incorrect solution (and thus wasted time/weight), this transaction will"] + #[doc = "panic if the solution submitted by the validator is invalid in any way, effectively"] + #[doc = "putting their authoring reward at risk."] #[doc = ""] - #[doc = " TWOX-NOTE: SAFE since `AccountId` is a secure hash."] - pub fn nominators_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Staking", - "Nominators", - Vec::new(), - [ - 1u8, 154u8, 55u8, 170u8, 215u8, 64u8, 56u8, 83u8, 254u8, 19u8, 152u8, - 85u8, 164u8, 171u8, 206u8, 129u8, 184u8, 45u8, 221u8, 181u8, 229u8, - 133u8, 200u8, 231u8, 16u8, 146u8, 247u8, 21u8, 77u8, 122u8, 165u8, - 134u8, - ], - ) - } - - #[doc = "Counter for the related counted storage map"] - pub fn counter_for_nominators( + #[doc = "No deposit or reward is associated with this submission."] + pub fn submit_unsigned( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Staking", - "CounterForNominators", - vec![], + raw_solution: runtime_types::pallet_election_provider_multi_phase::RawSolution< + runtime_types::da_runtime::constants::staking::NposSolution16, + >, + witness : runtime_types :: pallet_election_provider_multi_phase :: SolutionOrSnapshotSize, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "ElectionProviderMultiPhase", + "submit_unsigned", + types::SubmitUnsigned { + raw_solution: ::std::boxed::Box::new(raw_solution), + witness, + }, [ - 31u8, 94u8, 130u8, 138u8, 75u8, 8u8, 38u8, 162u8, 181u8, 5u8, 125u8, - 116u8, 9u8, 51u8, 22u8, 234u8, 40u8, 117u8, 215u8, 46u8, 82u8, 117u8, - 225u8, 1u8, 9u8, 208u8, 83u8, 63u8, 39u8, 187u8, 207u8, 191u8, + 34u8, 115u8, 43u8, 180u8, 202u8, 212u8, 42u8, 17u8, 187u8, 233u8, 54u8, + 206u8, 238u8, 239u8, 35u8, 240u8, 136u8, 197u8, 117u8, 113u8, 213u8, + 46u8, 94u8, 47u8, 84u8, 186u8, 177u8, 61u8, 3u8, 202u8, 2u8, 186u8, ], ) } - #[doc = " The maximum nominator count before we stop allowing new validators to join."] + #[doc = "Set a new value for `MinimumUntrustedScore`."] #[doc = ""] - #[doc = " When this value is not set, no limits are enforced."] - pub fn max_nominators_count( + #[doc = "Dispatch origin must be aligned with `T::ForceOrigin`."] + #[doc = ""] + #[doc = "This check can be turned off by setting the value to `None`."] + pub fn set_minimum_untrusted_score( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Staking", - "MaxNominatorsCount", - vec![], + maybe_next_score: ::core::option::Option< + runtime_types::sp_npos_elections::ElectionScore, + >, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "ElectionProviderMultiPhase", + "set_minimum_untrusted_score", + types::SetMinimumUntrustedScore { maybe_next_score }, [ - 180u8, 190u8, 180u8, 66u8, 235u8, 173u8, 76u8, 160u8, 197u8, 92u8, - 96u8, 165u8, 220u8, 188u8, 32u8, 119u8, 3u8, 73u8, 86u8, 49u8, 104u8, - 17u8, 186u8, 98u8, 221u8, 175u8, 109u8, 254u8, 207u8, 245u8, 125u8, - 179u8, + 36u8, 32u8, 197u8, 96u8, 189u8, 98u8, 96u8, 138u8, 84u8, 99u8, 235u8, + 44u8, 103u8, 25u8, 118u8, 194u8, 166u8, 158u8, 212u8, 36u8, 243u8, + 86u8, 202u8, 231u8, 189u8, 226u8, 21u8, 112u8, 20u8, 163u8, 229u8, + 240u8, ], ) } - #[doc = " The current era index."] + #[doc = "Set a solution in the queue, to be handed out to the client of this pallet in the next"] + #[doc = "call to `ElectionProvider::elect`."] #[doc = ""] - #[doc = " This is the latest planned era, depending on how the Session pallet queues the validator"] - #[doc = " set, it might be active or not."] - pub fn current_era( + #[doc = "This can only be set by `T::ForceOrigin`, and only when the phase is `Emergency`."] + #[doc = ""] + #[doc = "The solution is not checked for any feasibility and is assumed to be trustworthy, as any"] + #[doc = "feasibility check itself can in principle cause the election process to fail (due to"] + #[doc = "memory/weight constrains)."] + pub fn set_emergency_election_result( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Staking", - "CurrentEra", - vec![], + supports: ::std::vec::Vec<( + ::subxt::utils::AccountId32, + runtime_types::sp_npos_elections::Support<::subxt::utils::AccountId32>, + )>, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "ElectionProviderMultiPhase", + "set_emergency_election_result", + types::SetEmergencyElectionResult { supports }, [ - 105u8, 150u8, 49u8, 122u8, 4u8, 78u8, 8u8, 121u8, 34u8, 136u8, 157u8, - 227u8, 59u8, 139u8, 7u8, 253u8, 7u8, 10u8, 117u8, 71u8, 240u8, 74u8, - 86u8, 36u8, 198u8, 37u8, 153u8, 93u8, 196u8, 22u8, 192u8, 243u8, + 158u8, 35u8, 6u8, 145u8, 37u8, 239u8, 101u8, 90u8, 121u8, 123u8, 240u8, + 131u8, 154u8, 13u8, 111u8, 120u8, 146u8, 151u8, 203u8, 125u8, 115u8, + 255u8, 58u8, 154u8, 177u8, 204u8, 140u8, 87u8, 9u8, 63u8, 146u8, 209u8, ], ) } - #[doc = " The active era information, it holds index and start."] + #[doc = "Submit a solution for the signed phase."] #[doc = ""] - #[doc = " The active era is the era being currently rewarded. Validator set of this era must be"] - #[doc = " equal to [`SessionInterface::validators`]."] - pub fn active_era( + #[doc = "The dispatch origin fo this call must be __signed__."] + #[doc = ""] + #[doc = "The solution is potentially queued, based on the claimed score and processed at the end"] + #[doc = "of the signed phase."] + #[doc = ""] + #[doc = "A deposit is reserved and recorded for the solution. Based on the outcome, the solution"] + #[doc = "might be rewarded, slashed, or get all or a part of the deposit back."] + pub fn submit( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_staking::ActiveEraInfo, + raw_solution: runtime_types::pallet_election_provider_multi_phase::RawSolution< + runtime_types::da_runtime::constants::staking::NposSolution16, >, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Staking", - "ActiveEra", - vec![], + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "ElectionProviderMultiPhase", + "submit", + types::Submit { + raw_solution: ::std::boxed::Box::new(raw_solution), + }, [ - 15u8, 112u8, 251u8, 183u8, 108u8, 61u8, 28u8, 71u8, 44u8, 150u8, 162u8, - 4u8, 143u8, 121u8, 11u8, 37u8, 83u8, 29u8, 193u8, 21u8, 210u8, 116u8, - 190u8, 236u8, 213u8, 235u8, 49u8, 97u8, 189u8, 142u8, 251u8, 124u8, + 55u8, 153u8, 215u8, 21u8, 19u8, 192u8, 199u8, 19u8, 145u8, 27u8, 54u8, + 128u8, 23u8, 3u8, 255u8, 87u8, 27u8, 75u8, 248u8, 145u8, 238u8, 75u8, + 204u8, 173u8, 71u8, 252u8, 29u8, 71u8, 45u8, 143u8, 179u8, 154u8, ], ) } - #[doc = " The session index at which the era start for the last `HISTORY_DEPTH` eras."] + #[doc = "Trigger the governance fallback."] #[doc = ""] - #[doc = " Note: This tracks the starting session (i.e. session index when era start being active)"] - #[doc = " for the eras in `[CurrentEra - HISTORY_DEPTH, CurrentEra]`."] - pub fn eras_start_session_index( + #[doc = "This can only be called when [`Phase::Emergency`] is enabled, as an alternative to"] + #[doc = "calling [`Call::set_emergency_election_result`]."] + pub fn governance_fallback( &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Staking", - "ErasStartSessionIndex", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], + maybe_max_voters: ::core::option::Option<::core::primitive::u32>, + maybe_max_targets: ::core::option::Option<::core::primitive::u32>, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "ElectionProviderMultiPhase", + "governance_fallback", + types::GovernanceFallback { + maybe_max_voters, + maybe_max_targets, + }, [ - 92u8, 157u8, 168u8, 144u8, 132u8, 3u8, 212u8, 80u8, 230u8, 229u8, - 251u8, 218u8, 97u8, 55u8, 79u8, 100u8, 163u8, 91u8, 32u8, 246u8, 122u8, - 78u8, 149u8, 214u8, 103u8, 249u8, 119u8, 20u8, 101u8, 116u8, 110u8, - 185u8, + 168u8, 109u8, 243u8, 125u8, 188u8, 177u8, 251u8, 179u8, 158u8, 246u8, + 179u8, 247u8, 87u8, 217u8, 190u8, 107u8, 207u8, 249u8, 204u8, 27u8, + 166u8, 49u8, 135u8, 71u8, 88u8, 142u8, 58u8, 206u8, 137u8, 142u8, 75u8, + 127u8, ], ) } - - #[doc = " The session index at which the era start for the last `HISTORY_DEPTH` eras."] - #[doc = ""] - #[doc = " Note: This tracks the starting session (i.e. session index when era start being active)"] - #[doc = " for the eras in `[CurrentEra - HISTORY_DEPTH, CurrentEra]`."] - pub fn eras_start_session_index_root( + } + } + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub type Event = runtime_types::pallet_election_provider_multi_phase::pallet::Event; + pub mod events { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A solution was stored with the given compute."] + #[doc = ""] + #[doc = "The `origin` indicates the origin of the solution. If `origin` is `Some(AccountId)`,"] + #[doc = "the stored solution was submited in the signed phase by a miner with the `AccountId`."] + #[doc = "Otherwise, the solution was stored either during the unsigned phase or by"] + #[doc = "`T::ForceOrigin`. The `bool` is `true` when a previous solution was ejected to make"] + #[doc = "room for this one."] + pub struct SolutionStored { + pub compute: runtime_types::pallet_election_provider_multi_phase::ElectionCompute, + pub origin: ::core::option::Option<::subxt::utils::AccountId32>, + pub prev_ejected: ::core::primitive::bool, + } + impl ::subxt::events::StaticEvent for SolutionStored { + const EVENT: &'static str = "SolutionStored"; + const PALLET: &'static str = "ElectionProviderMultiPhase"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "The election has been finalized, with the given computation and score."] + pub struct ElectionFinalized { + pub compute: runtime_types::pallet_election_provider_multi_phase::ElectionCompute, + pub score: runtime_types::sp_npos_elections::ElectionScore, + } + impl ::subxt::events::StaticEvent for ElectionFinalized { + const EVENT: &'static str = "ElectionFinalized"; + const PALLET: &'static str = "ElectionProviderMultiPhase"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "An election failed."] + #[doc = ""] + #[doc = "Not much can be said about which computes failed in the process."] + pub struct ElectionFailed; + impl ::subxt::events::StaticEvent for ElectionFailed { + const EVENT: &'static str = "ElectionFailed"; + const PALLET: &'static str = "ElectionProviderMultiPhase"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "An account has been rewarded for their signed submission being finalized."] + pub struct Rewarded { + pub account: ::subxt::utils::AccountId32, + pub value: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for Rewarded { + const EVENT: &'static str = "Rewarded"; + const PALLET: &'static str = "ElectionProviderMultiPhase"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "An account has been slashed for submitting an invalid signed submission."] + pub struct Slashed { + pub account: ::subxt::utils::AccountId32, + pub value: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for Slashed { + const EVENT: &'static str = "Slashed"; + const PALLET: &'static str = "ElectionProviderMultiPhase"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "There was a phase transition in a given round."] + pub struct PhaseTransitioned { + pub from: runtime_types::pallet_election_provider_multi_phase::Phase< + ::core::primitive::u32, + >, + pub to: runtime_types::pallet_election_provider_multi_phase::Phase< + ::core::primitive::u32, + >, + pub round: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for PhaseTransitioned { + const EVENT: &'static str = "PhaseTransitioned"; + const PALLET: &'static str = "ElectionProviderMultiPhase"; + } + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " Internal counter for the number of rounds."] + #[doc = ""] + #[doc = " This is useful for de-duplication of transactions submitted to the pool, and general"] + #[doc = " diagnostics of the pallet."] + #[doc = ""] + #[doc = " This is merely incremented once per every time that an upstream `elect` is called."] + pub fn round( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - (), - (), + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), > { - ::subxt::storage::address::StaticStorageAddress::new( - "Staking", - "ErasStartSessionIndex", - Vec::new(), + ::subxt::storage::address::Address::new_static( + "ElectionProviderMultiPhase", + "Round", + vec![], [ - 92u8, 157u8, 168u8, 144u8, 132u8, 3u8, 212u8, 80u8, 230u8, 229u8, - 251u8, 218u8, 97u8, 55u8, 79u8, 100u8, 163u8, 91u8, 32u8, 246u8, 122u8, - 78u8, 149u8, 214u8, 103u8, 249u8, 119u8, 20u8, 101u8, 116u8, 110u8, - 185u8, + 37u8, 2u8, 47u8, 240u8, 18u8, 213u8, 214u8, 74u8, 57u8, 4u8, 103u8, + 253u8, 45u8, 17u8, 123u8, 203u8, 173u8, 170u8, 234u8, 109u8, 139u8, + 143u8, 216u8, 3u8, 161u8, 5u8, 0u8, 106u8, 181u8, 214u8, 170u8, 105u8, ], ) } - #[doc = " Exposure of validator at era."] - #[doc = ""] - #[doc = " This is keyed first by the era index to allow bulk deletion and then the stash account."] - #[doc = ""] - #[doc = " Is it removed after `HISTORY_DEPTH` eras."] - #[doc = " If stakers hasn't been set or has been removed then empty exposure is returned."] - pub fn eras_stakers( + #[doc = " Current phase."] + pub fn current_phase( &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - _1: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_staking::Exposure< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - >, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_election_provider_multi_phase::Phase< + ::core::primitive::u32, >, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, + (), > { - ::subxt::storage::address::StaticStorageAddress::new( - "Staking", - "ErasStakers", - vec![ - ::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - ), - ::subxt::storage::address::StorageMapKey::new( - _1.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - ), - ], + ::subxt::storage::address::Address::new_static( + "ElectionProviderMultiPhase", + "CurrentPhase", + vec![], [ - 192u8, 50u8, 152u8, 151u8, 92u8, 180u8, 206u8, 15u8, 139u8, 210u8, - 128u8, 65u8, 92u8, 253u8, 43u8, 35u8, 139u8, 171u8, 73u8, 185u8, 32u8, - 78u8, 20u8, 197u8, 154u8, 90u8, 233u8, 231u8, 23u8, 22u8, 187u8, 156u8, + 230u8, 7u8, 51u8, 158u8, 77u8, 36u8, 148u8, 175u8, 138u8, 205u8, 195u8, + 236u8, 66u8, 148u8, 0u8, 77u8, 160u8, 249u8, 128u8, 58u8, 189u8, 48u8, + 195u8, 198u8, 115u8, 251u8, 13u8, 206u8, 163u8, 180u8, 108u8, 10u8, ], ) } - #[doc = " Exposure of validator at era."] - #[doc = ""] - #[doc = " This is keyed first by the era index to allow bulk deletion and then the stash account."] - #[doc = ""] - #[doc = " Is it removed after `HISTORY_DEPTH` eras."] - #[doc = " If stakers hasn't been set or has been removed then empty exposure is returned."] - pub fn eras_stakers_root( + #[doc = " Current best solution, signed or unsigned, queued to be returned upon `elect`."] + pub fn queued_solution( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_staking::Exposure< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - >, - >, - (), - ::subxt::storage::address::Yes, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_election_provider_multi_phase::ReadySolution, ::subxt::storage::address::Yes, + (), + (), > { - ::subxt::storage::address::StaticStorageAddress::new( - "Staking", - "ErasStakers", - Vec::new(), + ::subxt::storage::address::Address::new_static( + "ElectionProviderMultiPhase", + "QueuedSolution", + vec![], [ - 192u8, 50u8, 152u8, 151u8, 92u8, 180u8, 206u8, 15u8, 139u8, 210u8, - 128u8, 65u8, 92u8, 253u8, 43u8, 35u8, 139u8, 171u8, 73u8, 185u8, 32u8, - 78u8, 20u8, 197u8, 154u8, 90u8, 233u8, 231u8, 23u8, 22u8, 187u8, 156u8, + 64u8, 237u8, 221u8, 29u8, 144u8, 141u8, 147u8, 4u8, 46u8, 239u8, 34u8, + 242u8, 164u8, 69u8, 108u8, 145u8, 95u8, 167u8, 34u8, 211u8, 103u8, + 165u8, 183u8, 193u8, 245u8, 226u8, 140u8, 50u8, 176u8, 127u8, 108u8, + 171u8, ], ) } - #[doc = " Clipped Exposure of validator at era."] - #[doc = ""] - #[doc = " This is similar to [`ErasStakers`] but number of nominators exposed is reduced to the"] - #[doc = " `T::MaxNominatorRewardedPerValidator` biggest stakers."] - #[doc = " (Note: the field `total` and `own` of the exposure remains unchanged)."] - #[doc = " This is used to limit the i/o cost for the nominator payout."] - #[doc = ""] - #[doc = " This is keyed fist by the era index to allow bulk deletion and then the stash account."] + #[doc = " Snapshot data of the round."] #[doc = ""] - #[doc = " Is it removed after `HISTORY_DEPTH` eras."] - #[doc = " If stakers hasn't been set or has been removed then empty exposure is returned."] - pub fn eras_stakers_clipped( + #[doc = " This is created at the beginning of the signed phase and cleared upon calling `elect`."] + pub fn snapshot( &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - _1: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_staking::Exposure< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - >, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_election_provider_multi_phase::RoundSnapshot, ::subxt::storage::address::Yes, + (), + (), > { - ::subxt::storage::address::StaticStorageAddress::new( - "Staking", - "ErasStakersClipped", - vec![ - ::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - ), - ::subxt::storage::address::StorageMapKey::new( - _1.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - ), - ], + ::subxt::storage::address::Address::new_static( + "ElectionProviderMultiPhase", + "Snapshot", + vec![], [ - 43u8, 159u8, 113u8, 223u8, 122u8, 169u8, 98u8, 153u8, 26u8, 55u8, 71u8, - 119u8, 174u8, 48u8, 158u8, 45u8, 214u8, 26u8, 136u8, 215u8, 46u8, - 161u8, 185u8, 17u8, 174u8, 204u8, 206u8, 246u8, 49u8, 87u8, 134u8, - 169u8, + 180u8, 77u8, 217u8, 249u8, 212u8, 99u8, 36u8, 26u8, 237u8, 4u8, 94u8, + 80u8, 160u8, 6u8, 194u8, 98u8, 174u8, 153u8, 127u8, 124u8, 109u8, + 188u8, 143u8, 151u8, 51u8, 200u8, 133u8, 66u8, 68u8, 226u8, 124u8, + 158u8, ], ) } - #[doc = " Clipped Exposure of validator at era."] - #[doc = ""] - #[doc = " This is similar to [`ErasStakers`] but number of nominators exposed is reduced to the"] - #[doc = " `T::MaxNominatorRewardedPerValidator` biggest stakers."] - #[doc = " (Note: the field `total` and `own` of the exposure remains unchanged)."] - #[doc = " This is used to limit the i/o cost for the nominator payout."] - #[doc = ""] - #[doc = " This is keyed fist by the era index to allow bulk deletion and then the stash account."] + #[doc = " Desired number of targets to elect for this round."] #[doc = ""] - #[doc = " Is it removed after `HISTORY_DEPTH` eras."] - #[doc = " If stakers hasn't been set or has been removed then empty exposure is returned."] - pub fn eras_stakers_clipped_root( + #[doc = " Only exists when [`Snapshot`] is present."] + pub fn desired_targets( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_staking::Exposure< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - >, - >, - (), - ::subxt::storage::address::Yes, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, ::subxt::storage::address::Yes, + (), + (), > { - ::subxt::storage::address::StaticStorageAddress::new( - "Staking", - "ErasStakersClipped", - Vec::new(), + ::subxt::storage::address::Address::new_static( + "ElectionProviderMultiPhase", + "DesiredTargets", + vec![], [ - 43u8, 159u8, 113u8, 223u8, 122u8, 169u8, 98u8, 153u8, 26u8, 55u8, 71u8, - 119u8, 174u8, 48u8, 158u8, 45u8, 214u8, 26u8, 136u8, 215u8, 46u8, - 161u8, 185u8, 17u8, 174u8, 204u8, 206u8, 246u8, 49u8, 87u8, 134u8, - 169u8, + 67u8, 241u8, 33u8, 113u8, 62u8, 173u8, 233u8, 76u8, 99u8, 12u8, 61u8, + 237u8, 21u8, 252u8, 39u8, 37u8, 86u8, 167u8, 173u8, 53u8, 238u8, 172u8, + 97u8, 59u8, 27u8, 164u8, 163u8, 76u8, 140u8, 37u8, 159u8, 250u8, ], ) } - #[doc = " Similar to `ErasStakers`, this holds the preferences of validators."] - #[doc = ""] - #[doc = " This is keyed first by the era index to allow bulk deletion and then the stash account."] + #[doc = " The metadata of the [`RoundSnapshot`]"] #[doc = ""] - #[doc = " Is it removed after `HISTORY_DEPTH` eras."] - pub fn eras_validator_prefs( + #[doc = " Only exists when [`Snapshot`] is present."] + pub fn snapshot_metadata( &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - _1: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_staking::ValidatorPrefs, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_election_provider_multi_phase::SolutionOrSnapshotSize, ::subxt::storage::address::Yes, + (), + (), > { - ::subxt::storage::address::StaticStorageAddress::new( - "Staking", - "ErasValidatorPrefs", - vec![ - ::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - ), - ::subxt::storage::address::StorageMapKey::new( - _1.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - ), - ], + ::subxt::storage::address::Address::new_static( + "ElectionProviderMultiPhase", + "SnapshotMetadata", + vec![], [ - 6u8, 196u8, 209u8, 138u8, 252u8, 18u8, 203u8, 86u8, 129u8, 62u8, 4u8, - 56u8, 234u8, 114u8, 141u8, 136u8, 127u8, 224u8, 142u8, 89u8, 150u8, - 33u8, 31u8, 50u8, 140u8, 108u8, 124u8, 77u8, 188u8, 102u8, 230u8, - 174u8, + 14u8, 189u8, 135u8, 84u8, 238u8, 133u8, 76u8, 176u8, 181u8, 185u8, + 111u8, 102u8, 181u8, 14u8, 172u8, 86u8, 188u8, 139u8, 73u8, 192u8, + 203u8, 117u8, 39u8, 119u8, 108u8, 225u8, 163u8, 36u8, 91u8, 30u8, 0u8, + 196u8, ], ) } - #[doc = " Similar to `ErasStakers`, this holds the preferences of validators."] + #[doc = " The next index to be assigned to an incoming signed submission."] #[doc = ""] - #[doc = " This is keyed first by the era index to allow bulk deletion and then the stash account."] + #[doc = " Every accepted submission is assigned a unique index; that index is bound to that particular"] + #[doc = " submission for the duration of the election. On election finalization, the next index is"] + #[doc = " reset to 0."] #[doc = ""] - #[doc = " Is it removed after `HISTORY_DEPTH` eras."] - pub fn eras_validator_prefs_root( + #[doc = " We can't just use `SignedSubmissionIndices.len()`, because that's a bounded set; past its"] + #[doc = " capacity, it will simply saturate. We can't just iterate over `SignedSubmissionsMap`,"] + #[doc = " because iteration is slow. Instead, we store the value here."] + pub fn signed_submission_next_index( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_staking::ValidatorPrefs, - >, - (), + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, + (), > { - ::subxt::storage::address::StaticStorageAddress::new( - "Staking", - "ErasValidatorPrefs", - Vec::new(), + ::subxt::storage::address::Address::new_static( + "ElectionProviderMultiPhase", + "SignedSubmissionNextIndex", + vec![], [ - 6u8, 196u8, 209u8, 138u8, 252u8, 18u8, 203u8, 86u8, 129u8, 62u8, 4u8, - 56u8, 234u8, 114u8, 141u8, 136u8, 127u8, 224u8, 142u8, 89u8, 150u8, - 33u8, 31u8, 50u8, 140u8, 108u8, 124u8, 77u8, 188u8, 102u8, 230u8, - 174u8, + 188u8, 126u8, 77u8, 166u8, 42u8, 81u8, 12u8, 239u8, 195u8, 16u8, 132u8, + 178u8, 217u8, 158u8, 28u8, 19u8, 201u8, 148u8, 47u8, 105u8, 178u8, + 115u8, 17u8, 78u8, 71u8, 178u8, 205u8, 171u8, 71u8, 52u8, 194u8, 82u8, ], ) } - #[doc = " The total validator era payout for the last `HISTORY_DEPTH` eras."] + #[doc = " A sorted, bounded vector of `(score, block_number, index)`, where each `index` points to a"] + #[doc = " value in `SignedSubmissions`."] #[doc = ""] - #[doc = " Eras that haven't finished yet or has been removed doesn't have reward."] - pub fn eras_validator_reward( + #[doc = " We never need to process more than a single signed submission at a time. Signed submissions"] + #[doc = " can be quite large, so we're willing to pay the cost of multiple database accesses to access"] + #[doc = " them one at a time instead of reading and decoding all of them at once."] + pub fn signed_submission_indices( &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::sp_core::bounded::bounded_vec::BoundedVec<( + runtime_types::sp_npos_elections::ElectionScore, + ::core::primitive::u32, + ::core::primitive::u32, + )>, ::subxt::storage::address::Yes, - (), ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Staking", - "ErasValidatorReward", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], - [ - 87u8, 80u8, 156u8, 123u8, 107u8, 77u8, 203u8, 37u8, 231u8, 84u8, 124u8, - 155u8, 227u8, 212u8, 212u8, 179u8, 84u8, 161u8, 223u8, 255u8, 254u8, - 107u8, 52u8, 89u8, 98u8, 169u8, 136u8, 241u8, 104u8, 3u8, 244u8, 161u8, - ], - ) - } - - #[doc = " The total validator era payout for the last `HISTORY_DEPTH` eras."] - #[doc = ""] - #[doc = " Eras that haven't finished yet or has been removed doesn't have reward."] - pub fn eras_validator_reward_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, (), - (), - ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Staking", - "ErasValidatorReward", - Vec::new(), + ::subxt::storage::address::Address::new_static( + "ElectionProviderMultiPhase", + "SignedSubmissionIndices", + vec![], [ - 87u8, 80u8, 156u8, 123u8, 107u8, 77u8, 203u8, 37u8, 231u8, 84u8, 124u8, - 155u8, 227u8, 212u8, 212u8, 179u8, 84u8, 161u8, 223u8, 255u8, 254u8, - 107u8, 52u8, 89u8, 98u8, 169u8, 136u8, 241u8, 104u8, 3u8, 244u8, 161u8, + 203u8, 96u8, 121u8, 1u8, 24u8, 150u8, 185u8, 93u8, 129u8, 63u8, 52u8, + 163u8, 67u8, 45u8, 100u8, 11u8, 254u8, 224u8, 18u8, 1u8, 133u8, 246u8, + 125u8, 211u8, 93u8, 99u8, 194u8, 105u8, 176u8, 162u8, 238u8, 181u8, ], ) } - #[doc = " Rewards for the last `HISTORY_DEPTH` eras."] - #[doc = " If reward hasn't been set or has been removed then 0 reward is returned."] - pub fn eras_reward_points( + #[doc = " Unchecked, signed solutions."] + #[doc = ""] + #[doc = " Together with `SubmissionIndices`, this stores a bounded set of `SignedSubmissions` while"] + #[doc = " allowing us to keep only a single one in memory at a time."] + #[doc = ""] + #[doc = " Twox note: the key of the map is an auto-incrementing index which users cannot inspect or"] + #[doc = " affect; we shouldn't need a cryptographically secure hasher."] + pub fn signed_submissions_map( &self, _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_staking::EraRewardPoints<::subxt::utils::AccountId32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_election_provider_multi_phase::signed::SignedSubmission< + ::subxt::utils::AccountId32, + ::core::primitive::u128, + runtime_types::da_runtime::constants::staking::NposSolution16, >, ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, + (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Staking", - "ErasRewardPoints", - vec![::subxt::storage::address::StorageMapKey::new( + ::subxt::storage::address::Address::new_static( + "ElectionProviderMultiPhase", + "SignedSubmissionsMap", + vec![::subxt::storage::address::make_static_storage_map_key( _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ - 194u8, 29u8, 20u8, 83u8, 200u8, 47u8, 158u8, 102u8, 88u8, 65u8, 24u8, - 255u8, 120u8, 178u8, 23u8, 232u8, 15u8, 64u8, 206u8, 0u8, 170u8, 40u8, - 18u8, 149u8, 45u8, 90u8, 179u8, 127u8, 52u8, 59u8, 37u8, 192u8, + 79u8, 183u8, 109u8, 221u8, 2u8, 64u8, 197u8, 162u8, 221u8, 170u8, + 140u8, 136u8, 205u8, 111u8, 8u8, 179u8, 166u8, 104u8, 74u8, 219u8, + 202u8, 123u8, 31u8, 129u8, 207u8, 58u8, 241u8, 91u8, 147u8, 112u8, + 162u8, 105u8, ], ) } - #[doc = " Rewards for the last `HISTORY_DEPTH` eras."] - #[doc = " If reward hasn't been set or has been removed then 0 reward is returned."] - pub fn eras_reward_points_root( + #[doc = " Unchecked, signed solutions."] + #[doc = ""] + #[doc = " Together with `SubmissionIndices`, this stores a bounded set of `SignedSubmissions` while"] + #[doc = " allowing us to keep only a single one in memory at a time."] + #[doc = ""] + #[doc = " Twox note: the key of the map is an auto-incrementing index which users cannot inspect or"] + #[doc = " affect; we shouldn't need a cryptographically secure hasher."] + pub fn signed_submissions_map_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_staking::EraRewardPoints<::subxt::utils::AccountId32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_election_provider_multi_phase::signed::SignedSubmission< + ::subxt::utils::AccountId32, + ::core::primitive::u128, + runtime_types::da_runtime::constants::staking::NposSolution16, >, (), - ::subxt::storage::address::Yes, + (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Staking", - "ErasRewardPoints", + ::subxt::storage::address::Address::new_static( + "ElectionProviderMultiPhase", + "SignedSubmissionsMap", Vec::new(), [ - 194u8, 29u8, 20u8, 83u8, 200u8, 47u8, 158u8, 102u8, 88u8, 65u8, 24u8, - 255u8, 120u8, 178u8, 23u8, 232u8, 15u8, 64u8, 206u8, 0u8, 170u8, 40u8, - 18u8, 149u8, 45u8, 90u8, 179u8, 127u8, 52u8, 59u8, 37u8, 192u8, + 79u8, 183u8, 109u8, 221u8, 2u8, 64u8, 197u8, 162u8, 221u8, 170u8, + 140u8, 136u8, 205u8, 111u8, 8u8, 179u8, 166u8, 104u8, 74u8, 219u8, + 202u8, 123u8, 31u8, 129u8, 207u8, 58u8, 241u8, 91u8, 147u8, 112u8, + 162u8, 105u8, ], ) } - #[doc = " The total amount staked for the last `HISTORY_DEPTH` eras."] - #[doc = " If total hasn't been set or has been removed then 0 stake is returned."] - pub fn eras_total_stake( + #[doc = " The minimum score that each 'untrusted' solution must attain in order to be considered"] + #[doc = " feasible."] + #[doc = ""] + #[doc = " Can be set via `set_minimum_untrusted_score`."] + pub fn minimum_untrusted_score( &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::sp_npos_elections::ElectionScore, ::subxt::storage::address::Yes, + (), + (), > { - ::subxt::storage::address::StaticStorageAddress::new( - "Staking", - "ErasTotalStake", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], + ::subxt::storage::address::Address::new_static( + "ElectionProviderMultiPhase", + "MinimumUntrustedScore", + vec![], [ - 224u8, 240u8, 168u8, 69u8, 148u8, 140u8, 249u8, 240u8, 4u8, 46u8, 77u8, - 11u8, 224u8, 65u8, 26u8, 239u8, 1u8, 110u8, 53u8, 11u8, 247u8, 235u8, - 142u8, 234u8, 22u8, 43u8, 24u8, 36u8, 37u8, 43u8, 170u8, 40u8, + 105u8, 218u8, 96u8, 38u8, 82u8, 115u8, 30u8, 178u8, 21u8, 89u8, 59u8, + 7u8, 203u8, 240u8, 224u8, 209u8, 78u8, 28u8, 198u8, 236u8, 252u8, + 122u8, 72u8, 59u8, 156u8, 242u8, 26u8, 160u8, 145u8, 40u8, 6u8, 101u8, ], ) } - - #[doc = " The total amount staked for the last `HISTORY_DEPTH` eras."] - #[doc = " If total hasn't been set or has been removed then 0 stake is returned."] - pub fn eras_total_stake_root( + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " Duration of the unsigned phase."] + pub fn unsigned_phase( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Staking", - "ErasTotalStake", - Vec::new(), + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "ElectionProviderMultiPhase", + "UnsignedPhase", [ - 224u8, 240u8, 168u8, 69u8, 148u8, 140u8, 249u8, 240u8, 4u8, 46u8, 77u8, - 11u8, 224u8, 65u8, 26u8, 239u8, 1u8, 110u8, 53u8, 11u8, 247u8, 235u8, - 142u8, 234u8, 22u8, 43u8, 24u8, 36u8, 37u8, 43u8, 170u8, 40u8, + 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 = " Mode of era forcing."] - pub fn force_era( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Staking", - "ForceEra", - vec![], + #[doc = " Duration of the signed phase."] + pub fn signed_phase(&self) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "ElectionProviderMultiPhase", + "SignedPhase", [ - 221u8, 41u8, 71u8, 21u8, 28u8, 193u8, 65u8, 97u8, 103u8, 37u8, 145u8, - 146u8, 183u8, 194u8, 57u8, 131u8, 214u8, 136u8, 68u8, 156u8, 140u8, - 194u8, 69u8, 151u8, 115u8, 177u8, 92u8, 147u8, 29u8, 40u8, 41u8, 31u8, + 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 percentage of the slash that is distributed to reporters."] - #[doc = ""] - #[doc = " The rest of the slashed value is handled by the `Slash`."] - pub fn slash_reward_fraction( + #[doc = " The minimum amount of improvement to the solution score that defines a solution as"] + #[doc = " \"better\" in the Signed phase."] + pub fn better_signed_threshold( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_arithmetic::per_things::Perbill, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Staking", - "SlashRewardFraction", - vec![], + ) -> ::subxt::constants::Address + { + ::subxt::constants::Address::new_static( + "ElectionProviderMultiPhase", + "BetterSignedThreshold", [ - 167u8, 79u8, 143u8, 202u8, 199u8, 100u8, 129u8, 162u8, 23u8, 165u8, - 106u8, 170u8, 244u8, 86u8, 144u8, 242u8, 65u8, 207u8, 115u8, 224u8, - 231u8, 155u8, 55u8, 139u8, 101u8, 129u8, 242u8, 196u8, 130u8, 50u8, - 3u8, 117u8, + 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 amount of currency given to reporters of a slash event which was"] - #[doc = " canceled by extraordinary circumstances (e.g. governance)."] - pub fn canceled_slash_payout( + #[doc = " The minimum amount of improvement to the solution score that defines a solution as"] + #[doc = " \"better\" in the Unsigned phase."] + pub fn better_unsigned_threshold( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Staking", - "CanceledSlashPayout", - vec![], + ) -> ::subxt::constants::Address + { + ::subxt::constants::Address::new_static( + "ElectionProviderMultiPhase", + "BetterUnsignedThreshold", [ - 126u8, 218u8, 66u8, 92u8, 82u8, 124u8, 145u8, 161u8, 40u8, 176u8, 14u8, - 211u8, 178u8, 216u8, 8u8, 156u8, 83u8, 14u8, 91u8, 15u8, 200u8, 170u8, - 3u8, 127u8, 141u8, 139u8, 151u8, 98u8, 74u8, 96u8, 238u8, 29u8, + 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 = " All unapplied slashes that are queued for later."] - pub fn unapplied_slashes( + #[doc = " The repeat threshold of the offchain worker."] + #[doc = ""] + #[doc = " For example, if it is 5, that means that at least 5 blocks will elapse between attempts"] + #[doc = " to submit the worker's solution."] + pub fn offchain_repeat( &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec< - runtime_types::pallet_staking::UnappliedSlash< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - >, - >, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Staking", - "UnappliedSlashes", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "ElectionProviderMultiPhase", + "OffchainRepeat", [ - 130u8, 4u8, 163u8, 163u8, 28u8, 85u8, 34u8, 156u8, 47u8, 125u8, 57u8, - 0u8, 133u8, 176u8, 130u8, 2u8, 175u8, 180u8, 167u8, 203u8, 230u8, 82u8, - 198u8, 183u8, 55u8, 82u8, 221u8, 248u8, 100u8, 173u8, 206u8, 151u8, + 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 = " All unapplied slashes that are queued for later."] - pub fn unapplied_slashes_root( + #[doc = " The priority of the unsigned transaction submitted in the unsigned-phase"] + pub fn miner_tx_priority( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec< - runtime_types::pallet_staking::UnappliedSlash< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - >, - >, - >, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Staking", - "UnappliedSlashes", - Vec::new(), + ) -> ::subxt::constants::Address<::core::primitive::u64> { + ::subxt::constants::Address::new_static( + "ElectionProviderMultiPhase", + "MinerTxPriority", [ - 130u8, 4u8, 163u8, 163u8, 28u8, 85u8, 34u8, 156u8, 47u8, 125u8, 57u8, - 0u8, 133u8, 176u8, 130u8, 2u8, 175u8, 180u8, 167u8, 203u8, 230u8, 82u8, - 198u8, 183u8, 55u8, 82u8, 221u8, 248u8, 100u8, 173u8, 206u8, 151u8, + 128u8, 214u8, 205u8, 242u8, 181u8, 142u8, 124u8, 231u8, 190u8, 146u8, + 59u8, 226u8, 157u8, 101u8, 103u8, 117u8, 249u8, 65u8, 18u8, 191u8, + 103u8, 119u8, 53u8, 85u8, 81u8, 96u8, 220u8, 42u8, 184u8, 239u8, 42u8, + 246u8, ], ) } - #[doc = " A mapping from still-bonded eras to the first session index of that era."] + #[doc = " Maximum number of signed submissions that can be queued."] #[doc = ""] - #[doc = " Must contains information for eras for the range:"] - #[doc = " `[active_era - bounding_duration; active_era]`"] - pub fn bonded_eras( + #[doc = " It is best to avoid adjusting this during an election, as it impacts downstream data"] + #[doc = " structures. In particular, `SignedSubmissionIndices` is bounded on this value. If you"] + #[doc = " update this value during an election, you _must_ ensure that"] + #[doc = " `SignedSubmissionIndices.len()` is less than or equal to the new value. Otherwise,"] + #[doc = " attempts to submit new solutions may cause a runtime panic."] + pub fn signed_max_submissions( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec<(::core::primitive::u32, ::core::primitive::u32)>, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Staking", - "BondedEras", - vec![], + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "ElectionProviderMultiPhase", + "SignedMaxSubmissions", [ - 243u8, 162u8, 236u8, 198u8, 122u8, 182u8, 37u8, 55u8, 171u8, 156u8, - 235u8, 223u8, 226u8, 129u8, 89u8, 206u8, 2u8, 155u8, 222u8, 154u8, - 116u8, 124u8, 4u8, 119u8, 155u8, 94u8, 248u8, 30u8, 171u8, 51u8, 78u8, - 106u8, + 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 = " All slashing events on validators, mapped by era to the highest slash proportion"] - #[doc = " and slash value of the era."] - pub fn validator_slash_in_era( + #[doc = " Maximum weight of a signed solution."] + #[doc = ""] + #[doc = " If [`Config::MinerConfig`] is being implemented to submit signed solutions (outside of"] + #[doc = " this pallet), then [`MinerConfig::solution_weight`] is used to compare against"] + #[doc = " this value."] + pub fn signed_max_weight( &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - _1: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<( - runtime_types::sp_arithmetic::per_things::Perbill, - ::core::primitive::u128, - )>, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Staking", - "ValidatorSlashInEra", - vec![ - ::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - ), - ::subxt::storage::address::StorageMapKey::new( - _1.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - ), - ], + ) -> ::subxt::constants::Address { + ::subxt::constants::Address::new_static( + "ElectionProviderMultiPhase", + "SignedMaxWeight", [ - 237u8, 80u8, 3u8, 237u8, 9u8, 40u8, 212u8, 15u8, 251u8, 196u8, 85u8, - 29u8, 27u8, 151u8, 98u8, 122u8, 189u8, 147u8, 205u8, 40u8, 202u8, - 194u8, 158u8, 96u8, 138u8, 16u8, 116u8, 71u8, 140u8, 163u8, 121u8, - 197u8, + 222u8, 183u8, 203u8, 169u8, 31u8, 134u8, 28u8, 12u8, 47u8, 140u8, 71u8, + 74u8, 61u8, 55u8, 71u8, 236u8, 215u8, 83u8, 28u8, 70u8, 45u8, 128u8, + 184u8, 57u8, 101u8, 83u8, 42u8, 165u8, 34u8, 155u8, 64u8, 145u8, ], ) } - #[doc = " All slashing events on validators, mapped by era to the highest slash proportion"] - #[doc = " and slash value of the era."] - pub fn validator_slash_in_era_root( + #[doc = " The maximum amount of unchecked solutions to refund the call fee for."] + pub fn signed_max_refunds( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<( - runtime_types::sp_arithmetic::per_things::Perbill, - ::core::primitive::u128, - )>, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Staking", - "ValidatorSlashInEra", - Vec::new(), + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "ElectionProviderMultiPhase", + "SignedMaxRefunds", [ - 237u8, 80u8, 3u8, 237u8, 9u8, 40u8, 212u8, 15u8, 251u8, 196u8, 85u8, - 29u8, 27u8, 151u8, 98u8, 122u8, 189u8, 147u8, 205u8, 40u8, 202u8, - 194u8, 158u8, 96u8, 138u8, 16u8, 116u8, 71u8, 140u8, 163u8, 121u8, - 197u8, + 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 = " All slashing events on nominators, mapped by era to the highest slash value of the era."] - pub fn nominator_slash_in_era( + #[doc = " Base reward for a signed solution"] + pub fn signed_reward_base( &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - _1: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Staking", - "NominatorSlashInEra", - vec![ - ::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - ), - ::subxt::storage::address::StorageMapKey::new( - _1.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - ), - ], + ) -> ::subxt::constants::Address<::core::primitive::u128> { + ::subxt::constants::Address::new_static( + "ElectionProviderMultiPhase", + "SignedRewardBase", [ - 249u8, 85u8, 170u8, 41u8, 179u8, 194u8, 180u8, 12u8, 53u8, 101u8, 80u8, - 96u8, 166u8, 71u8, 239u8, 23u8, 153u8, 19u8, 152u8, 38u8, 138u8, 136u8, - 221u8, 200u8, 18u8, 165u8, 26u8, 228u8, 195u8, 199u8, 62u8, 4u8, + 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 = " All slashing events on nominators, mapped by era to the highest slash value of the era."] - pub fn nominator_slash_in_era_root( + #[doc = " Base deposit for a signed solution."] + pub fn signed_deposit_base( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Staking", - "NominatorSlashInEra", - Vec::new(), + ) -> ::subxt::constants::Address<::core::primitive::u128> { + ::subxt::constants::Address::new_static( + "ElectionProviderMultiPhase", + "SignedDepositBase", [ - 249u8, 85u8, 170u8, 41u8, 179u8, 194u8, 180u8, 12u8, 53u8, 101u8, 80u8, - 96u8, 166u8, 71u8, 239u8, 23u8, 153u8, 19u8, 152u8, 38u8, 138u8, 136u8, - 221u8, 200u8, 18u8, 165u8, 26u8, 228u8, 195u8, 199u8, 62u8, 4u8, + 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 = " Slashing spans for stash accounts."] - pub fn slashing_spans( + #[doc = " Per-byte deposit for a signed solution."] + pub fn signed_deposit_byte( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_staking::slashing::SlashingSpans, - >, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Staking", - "SlashingSpans", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], + ) -> ::subxt::constants::Address<::core::primitive::u128> { + ::subxt::constants::Address::new_static( + "ElectionProviderMultiPhase", + "SignedDepositByte", [ - 106u8, 115u8, 118u8, 52u8, 89u8, 77u8, 246u8, 5u8, 255u8, 204u8, 44u8, - 5u8, 66u8, 36u8, 227u8, 252u8, 86u8, 159u8, 186u8, 152u8, 196u8, 21u8, - 74u8, 201u8, 133u8, 93u8, 142u8, 191u8, 20u8, 27u8, 218u8, 157u8, + 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 = " Slashing spans for stash accounts."] - pub fn slashing_spans_root( + #[doc = " Per-weight deposit for a signed solution."] + pub fn signed_deposit_weight( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_staking::slashing::SlashingSpans, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Staking", - "SlashingSpans", - Vec::new(), + ) -> ::subxt::constants::Address<::core::primitive::u128> { + ::subxt::constants::Address::new_static( + "ElectionProviderMultiPhase", + "SignedDepositWeight", [ - 106u8, 115u8, 118u8, 52u8, 89u8, 77u8, 246u8, 5u8, 255u8, 204u8, 44u8, - 5u8, 66u8, 36u8, 227u8, 252u8, 86u8, 159u8, 186u8, 152u8, 196u8, 21u8, - 74u8, 201u8, 133u8, 93u8, 142u8, 191u8, 20u8, 27u8, 218u8, 157u8, + 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 = " Records information about the maximum slash of a stash within a slashing span,"] - #[doc = " as well as how much reward has been paid out."] - pub fn span_slash( + #[doc = " The maximum number of electing voters to put in the snapshot. At the moment, snapshots"] + #[doc = " are only over a single block, but once multi-block elections are introduced they will"] + #[doc = " take place over multiple blocks."] + pub fn max_electing_voters( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - _1: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_staking::slashing::SpanRecord< - ::core::primitive::u128, - >, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Staking", - "SpanSlash", - vec![::subxt::storage::address::StorageMapKey::new( - &(_0.borrow(), _1.borrow()), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "ElectionProviderMultiPhase", + "MaxElectingVoters", [ - 160u8, 63u8, 115u8, 190u8, 233u8, 148u8, 75u8, 3u8, 11u8, 59u8, 184u8, - 220u8, 205u8, 64u8, 28u8, 190u8, 116u8, 210u8, 225u8, 230u8, 224u8, - 163u8, 103u8, 157u8, 100u8, 29u8, 86u8, 167u8, 84u8, 217u8, 109u8, - 200u8, + 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 = " Records information about the maximum slash of a stash within a slashing span,"] - #[doc = " as well as how much reward has been paid out."] - pub fn span_slash_root( + #[doc = " The maximum number of electable targets to put in the snapshot."] + pub fn max_electable_targets( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_staking::slashing::SpanRecord< - ::core::primitive::u128, - >, - >, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Staking", - "SpanSlash", - Vec::new(), + ) -> ::subxt::constants::Address<::core::primitive::u16> { + ::subxt::constants::Address::new_static( + "ElectionProviderMultiPhase", + "MaxElectableTargets", [ - 160u8, 63u8, 115u8, 190u8, 233u8, 148u8, 75u8, 3u8, 11u8, 59u8, 184u8, - 220u8, 205u8, 64u8, 28u8, 190u8, 116u8, 210u8, 225u8, 230u8, 224u8, - 163u8, 103u8, 157u8, 100u8, 29u8, 86u8, 167u8, 84u8, 217u8, 109u8, - 200u8, + 116u8, 33u8, 2u8, 170u8, 181u8, 147u8, 171u8, 169u8, 167u8, 227u8, + 41u8, 144u8, 11u8, 236u8, 82u8, 100u8, 74u8, 60u8, 184u8, 72u8, 169u8, + 90u8, 208u8, 135u8, 15u8, 117u8, 10u8, 123u8, 128u8, 193u8, 29u8, 70u8, ], ) } - #[doc = " The last planned session scheduled by the session pallet."] + #[doc = " The maximum number of winners that can be elected by this `ElectionProvider`"] + #[doc = " implementation."] #[doc = ""] - #[doc = " This is basically in sync with the call to [`pallet_session::SessionManager::new_session`]."] - pub fn current_planned_session( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Staking", - "CurrentPlannedSession", - vec![], + #[doc = " Note: This must always be greater or equal to `T::DataProvider::desired_targets()`."] + pub fn max_winners(&self) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "ElectionProviderMultiPhase", + "MaxWinners", [ - 38u8, 22u8, 56u8, 250u8, 17u8, 154u8, 99u8, 37u8, 155u8, 253u8, 100u8, - 117u8, 5u8, 239u8, 31u8, 190u8, 53u8, 241u8, 11u8, 185u8, 163u8, 227u8, - 10u8, 77u8, 210u8, 64u8, 156u8, 218u8, 105u8, 16u8, 1u8, 57u8, + 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 = " Indices of validators that have offended in the active era and whether they are currently"] - #[doc = " disabled."] - #[doc = ""] - #[doc = " This value should be a superset of disabled validators since not all offences lead to the"] - #[doc = " validator being disabled (if there was no slash). This is needed to track the percentage of"] - #[doc = " validators that have offended in the current era, ensuring a new era is forced if"] - #[doc = " `OffendingValidatorsThreshold` is reached. The vec is always kept sorted so that we can find"] - #[doc = " whether a given validator has previously offended using binary search. It gets cleared when"] - #[doc = " the era ends."] - pub fn offending_validators( + pub fn miner_max_length( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec<(::core::primitive::u32, ::core::primitive::bool)>, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Staking", - "OffendingValidators", - vec![], + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "ElectionProviderMultiPhase", + "MinerMaxLength", [ - 94u8, 254u8, 0u8, 50u8, 76u8, 232u8, 51u8, 153u8, 118u8, 14u8, 70u8, - 101u8, 112u8, 215u8, 173u8, 82u8, 182u8, 104u8, 167u8, 103u8, 187u8, - 168u8, 86u8, 16u8, 51u8, 235u8, 51u8, 119u8, 38u8, 154u8, 42u8, 113u8, + 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 threshold for when users can start calling `chill_other` for other validators /"] - #[doc = " nominators. The threshold is compared to the actual number of validators / nominators"] - #[doc = " (`CountFor*`) in the system compared to the configured max (`Max*Count`)."] - pub fn chill_threshold( + pub fn miner_max_weight( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_arithmetic::per_things::Percent, - >, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Staking", - "ChillThreshold", - vec![], - [ - 174u8, 165u8, 249u8, 105u8, 24u8, 151u8, 115u8, 166u8, 199u8, 251u8, - 28u8, 5u8, 50u8, 95u8, 144u8, 110u8, 220u8, 76u8, 14u8, 23u8, 179u8, - 41u8, 11u8, 248u8, 28u8, 154u8, 159u8, 255u8, 156u8, 109u8, 98u8, 92u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " Maximum number of nominations per nominator."] - pub fn max_nominations( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { - ::subxt::constants::StaticConstantAddress::new("Staking", "MaxNominations", [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, 125u8, - 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, 178u8, 197u8, - 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, 145u8, - ]) - } - - #[doc = " Number of eras to keep in history."] - #[doc = ""] - #[doc = " Following information is kept for eras in `[current_era -"] - #[doc = " HistoryDepth, current_era]`: `ErasStakers`, `ErasStakersClipped`,"] - #[doc = " `ErasValidatorPrefs`, `ErasValidatorReward`, `ErasRewardPoints`,"] - #[doc = " `ErasTotalStake`, `ErasStartSessionIndex`,"] - #[doc = " `StakingLedger.claimed_rewards`."] - #[doc = ""] - #[doc = " Must be more than the number of eras delayed by session."] - #[doc = " I.e. active era must always be in history. I.e. `active_era >"] - #[doc = " current_era - history_depth` must be guaranteed."] - #[doc = ""] - #[doc = " If migrating an existing pallet from storage value to config value,"] - #[doc = " this should be set to same value or greater as in storage."] - #[doc = ""] - #[doc = " Note: `HistoryDepth` is used as the upper bound for the `BoundedVec`"] - #[doc = " item `StakingLedger.claimed_rewards`. Setting this value lower than"] - #[doc = " the existing value can lead to inconsistencies in the"] - #[doc = " `StakingLedger` and will need to be handled properly in a migration."] - #[doc = " The test `reducing_history_depth_abrupt` shows this effect."] - pub fn history_depth( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { - ::subxt::constants::StaticConstantAddress::new("Staking", "HistoryDepth", [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, 125u8, - 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, 178u8, 197u8, - 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, 145u8, - ]) - } - - #[doc = " Number of sessions per era."] - pub fn sessions_per_era( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { - ::subxt::constants::StaticConstantAddress::new("Staking", "SessionsPerEra", [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, 125u8, - 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, 178u8, 197u8, - 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, 145u8, - ]) - } - - #[doc = " Number of eras that staked funds must remain bonded for."] - pub fn bonding_duration( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { - ::subxt::constants::StaticConstantAddress::new("Staking", "BondingDuration", [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, 125u8, - 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, 178u8, 197u8, - 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, 145u8, - ]) - } - - #[doc = " Number of eras that slashes are deferred by, after computation."] - #[doc = ""] - #[doc = " This should be less than the bonding duration. Set to 0 if slashes"] - #[doc = " should be applied immediately, without opportunity for intervention."] - pub fn slash_defer_duration( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { - ::subxt::constants::StaticConstantAddress::new( - "Staking", - "SlashDeferDuration", - [ - 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 nominators rewarded for each validator."] - #[doc = ""] - #[doc = " For each validator only the `$MaxNominatorRewardedPerValidator` biggest stakers can"] - #[doc = " claim their reward. This used to limit the i/o cost for the nominator payout."] - pub fn max_nominator_rewarded_per_validator( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { - ::subxt::constants::StaticConstantAddress::new( - "Staking", - "MaxNominatorRewardedPerValidator", + ) -> ::subxt::constants::Address { + ::subxt::constants::Address::new_static( + "ElectionProviderMultiPhase", + "MinerMaxWeight", [ - 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, + 222u8, 183u8, 203u8, 169u8, 31u8, 134u8, 28u8, 12u8, 47u8, 140u8, 71u8, + 74u8, 61u8, 55u8, 71u8, 236u8, 215u8, 83u8, 28u8, 70u8, 45u8, 128u8, + 184u8, 57u8, 101u8, 83u8, 42u8, 165u8, 34u8, 155u8, 64u8, 145u8, ], ) } - #[doc = " The maximum number of `unlocking` chunks a [`StakingLedger`] can"] - #[doc = " have. Effectively determines how many unique eras a staker may be"] - #[doc = " unbonding in."] - #[doc = ""] - #[doc = " Note: `MaxUnlockingChunks` is used as the upper bound for the"] - #[doc = " `BoundedVec` item `StakingLedger.unlocking`. Setting this value"] - #[doc = " lower than the existing value can lead to inconsistencies in the"] - #[doc = " `StakingLedger` and will need to be handled properly in a runtime"] - #[doc = " migration. The test `reducing_max_unlocking_chunks_abrupt` shows"] - #[doc = " this effect."] - pub fn max_unlocking_chunks( + pub fn miner_max_votes_per_voter( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { - ::subxt::constants::StaticConstantAddress::new( - "Staking", - "MaxUnlockingChunks", + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "ElectionProviderMultiPhase", + "MinerMaxVotesPerVoter", [ 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, @@ -7645,4203 +6165,3248 @@ pub mod api { } } } - pub mod session { + pub mod staking { use super::{root_mod, runtime_types}; + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub type Error = runtime_types::pallet_staking::pallet::pallet::Error; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub type Call = runtime_types::pallet_staking::pallet::pallet::Call; pub mod calls { use super::{root_mod, runtime_types}; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct SetKeys { - pub keys: runtime_types::da_runtime::primitives::SessionKeys, - pub proof: ::std::vec::Vec<::core::primitive::u8>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct PurgeKeys; - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Sets the session key(s) of the function caller to `keys`."] - #[doc = "Allows an account to set its session key prior to becoming a validator."] - #[doc = "This doesn't take effect until the next session."] - #[doc = ""] - #[doc = "The dispatch origin of this function must be signed."] - #[doc = ""] - #[doc = "# "] - #[doc = "- Complexity: `O(1)`. Actual cost depends on the number of length of"] - #[doc = " `T::Keys::key_ids()` which is fixed."] - #[doc = "- DbReads: `origin account`, `T::ValidatorIdOf`, `NextKeys`"] - #[doc = "- DbWrites: `origin account`, `NextKeys`"] - #[doc = "- DbReads per key id: `KeyOwner`"] - #[doc = "- DbWrites per key id: `KeyOwner`"] - #[doc = "# "] - pub fn set_keys( - &self, - keys: runtime_types::da_runtime::primitives::SessionKeys, - proof: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Session", - "set_keys", - SetKeys { keys, proof }, - [ - 100u8, 34u8, 3u8, 243u8, 22u8, 163u8, 244u8, 57u8, 211u8, 164u8, 55u8, - 212u8, 151u8, 91u8, 13u8, 131u8, 89u8, 95u8, 173u8, 216u8, 149u8, 70u8, - 103u8, 199u8, 216u8, 87u8, 172u8, 149u8, 28u8, 184u8, 133u8, 8u8, - ], - ) - } - - #[doc = "Removes any session key(s) of the function caller."] - #[doc = ""] - #[doc = "This doesn't take effect until the next session."] - #[doc = ""] - #[doc = "The dispatch origin of this function must be Signed and the account must be either be"] - #[doc = "convertible to a validator ID using the chain's typical addressing system (this usually"] - #[doc = "means being a controller account) or directly convertible into a validator ID (which"] - #[doc = "usually means being a stash account)."] - #[doc = ""] - #[doc = "# "] - #[doc = "- Complexity: `O(1)` in number of key types. Actual cost depends on the number of length"] - #[doc = " of `T::Keys::key_ids()` which is fixed."] - #[doc = "- DbReads: `T::ValidatorIdOf`, `NextKeys`, `origin account`"] - #[doc = "- DbWrites: `NextKeys`, `origin account`"] - #[doc = "- DbWrites per key id: `KeyOwner`"] - #[doc = "# "] - pub fn purge_keys(&self) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new("Session", "purge_keys", PurgeKeys {}, [ - 200u8, 255u8, 4u8, 213u8, 188u8, 92u8, 99u8, 116u8, 163u8, 152u8, 29u8, - 35u8, 133u8, 119u8, 246u8, 44u8, 91u8, 31u8, 145u8, 23u8, 213u8, 64u8, - 71u8, 242u8, 207u8, 239u8, 231u8, 37u8, 61u8, 63u8, 190u8, 35u8, - ]) - } - } - } - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::pallet_session::pallet::Event; - pub mod events { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "New session has happened. Note that the argument is the session index, not the"] - #[doc = "block number as the type might suggest."] - pub struct NewSession { - pub session_index: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for NewSession { - const EVENT: &'static str = "NewSession"; - const PALLET: &'static str = "Session"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " The current set of validators."] - pub fn validators( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec<::subxt::utils::AccountId32>, + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Bond { + pub controller: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + #[codec(compact)] + pub value: ::core::primitive::u128, + pub payee: runtime_types::pallet_staking::RewardDestination< + ::subxt::utils::AccountId32, >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Session", - "Validators", - vec![], - [ - 144u8, 235u8, 200u8, 43u8, 151u8, 57u8, 147u8, 172u8, 201u8, 202u8, - 242u8, 96u8, 57u8, 76u8, 124u8, 77u8, 42u8, 113u8, 218u8, 220u8, 230u8, - 32u8, 151u8, 152u8, 172u8, 106u8, 60u8, 227u8, 122u8, 118u8, 137u8, - 68u8, - ], - ) } - - #[doc = " Current index of the session."] - pub fn current_index( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Session", - "CurrentIndex", - vec![], - [ - 148u8, 179u8, 159u8, 15u8, 197u8, 95u8, 214u8, 30u8, 209u8, 251u8, - 183u8, 231u8, 91u8, 25u8, 181u8, 191u8, 143u8, 252u8, 227u8, 80u8, - 159u8, 66u8, 194u8, 67u8, 113u8, 74u8, 111u8, 91u8, 218u8, 187u8, - 130u8, 40u8, - ], - ) + impl ::subxt::blocks::StaticExtrinsic for Bond { + const CALL: &'static str = "bond"; + const PALLET: &'static str = "Staking"; } - - #[doc = " True if the underlying economic identities or weighting behind the validators"] - #[doc = " has changed in the queued validator set."] - pub fn queued_changed( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::bool>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Session", - "QueuedChanged", - vec![], - [ - 105u8, 140u8, 235u8, 218u8, 96u8, 100u8, 252u8, 10u8, 58u8, 221u8, - 244u8, 251u8, 67u8, 91u8, 80u8, 202u8, 152u8, 42u8, 50u8, 113u8, 200u8, - 247u8, 59u8, 213u8, 77u8, 195u8, 1u8, 150u8, 220u8, 18u8, 245u8, 46u8, - ], - ) + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct BondExtra { + #[codec(compact)] + pub max_additional: ::core::primitive::u128, } - - #[doc = " The queued keys for the next session. When the next session begins, these keys"] - #[doc = " will be used to determine the validator's session keys."] - pub fn queued_keys( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec<( + impl ::subxt::blocks::StaticExtrinsic for BondExtra { + const CALL: &'static str = "bond_extra"; + const PALLET: &'static str = "Staking"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Unbond { + #[codec(compact)] + pub value: ::core::primitive::u128, + } + impl ::subxt::blocks::StaticExtrinsic for Unbond { + const CALL: &'static str = "unbond"; + const PALLET: &'static str = "Staking"; + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct WithdrawUnbonded { + pub num_slashing_spans: ::core::primitive::u32, + } + impl ::subxt::blocks::StaticExtrinsic for WithdrawUnbonded { + const CALL: &'static str = "withdraw_unbonded"; + const PALLET: &'static str = "Staking"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Validate { + pub prefs: runtime_types::pallet_staking::ValidatorPrefs, + } + impl ::subxt::blocks::StaticExtrinsic for Validate { + const CALL: &'static str = "validate"; + const PALLET: &'static str = "Staking"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Nominate { + pub targets: ::std::vec::Vec< + ::subxt::utils::MultiAddress< ::subxt::utils::AccountId32, - runtime_types::da_runtime::primitives::SessionKeys, - )>, + ::core::primitive::u32, + >, >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Session", - "QueuedKeys", - vec![], - [ - 90u8, 48u8, 252u8, 89u8, 147u8, 67u8, 111u8, 201u8, 74u8, 181u8, 95u8, - 53u8, 95u8, 174u8, 167u8, 83u8, 223u8, 247u8, 221u8, 177u8, 172u8, - 148u8, 110u8, 21u8, 156u8, 34u8, 124u8, 81u8, 47u8, 26u8, 98u8, 210u8, - ], - ) } - - #[doc = " Indices of disabled validators."] - #[doc = ""] - #[doc = " The vec is always kept sorted so that we can find whether a given validator is"] - #[doc = " disabled using binary search. It gets cleared when `on_session_ending` returns"] - #[doc = " a new set of identities."] - pub fn disabled_validators( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::std::vec::Vec<::core::primitive::u32>>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Session", - "DisabledValidators", - vec![], - [ - 135u8, 22u8, 22u8, 97u8, 82u8, 217u8, 144u8, 141u8, 121u8, 240u8, - 189u8, 16u8, 176u8, 88u8, 177u8, 31u8, 20u8, 242u8, 73u8, 104u8, 11u8, - 110u8, 214u8, 34u8, 52u8, 217u8, 106u8, 33u8, 174u8, 174u8, 198u8, - 84u8, - ], - ) + impl ::subxt::blocks::StaticExtrinsic for Nominate { + const CALL: &'static str = "nominate"; + const PALLET: &'static str = "Staking"; } - - #[doc = " The next session keys for a validator."] - pub fn next_keys( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::da_runtime::primitives::SessionKeys, + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Chill; + impl ::subxt::blocks::StaticExtrinsic for Chill { + const CALL: &'static str = "chill"; + const PALLET: &'static str = "Staking"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetPayee { + pub payee: runtime_types::pallet_staking::RewardDestination< + ::subxt::utils::AccountId32, >, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Session", - "NextKeys", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], - [ - 211u8, 170u8, 242u8, 9u8, 171u8, 174u8, 161u8, 66u8, 152u8, 134u8, - 69u8, 128u8, 194u8, 61u8, 225u8, 55u8, 230u8, 15u8, 77u8, 102u8, 95u8, - 114u8, 136u8, 204u8, 114u8, 52u8, 147u8, 252u8, 166u8, 48u8, 251u8, - 67u8, - ], - ) } - - #[doc = " The next session keys for a validator."] - pub fn next_keys_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::da_runtime::primitives::SessionKeys, + impl ::subxt::blocks::StaticExtrinsic for SetPayee { + const CALL: &'static str = "set_payee"; + const PALLET: &'static str = "Staking"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetController { + pub controller: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Session", - "NextKeys", - Vec::new(), - [ - 211u8, 170u8, 242u8, 9u8, 171u8, 174u8, 161u8, 66u8, 152u8, 134u8, - 69u8, 128u8, 194u8, 61u8, 225u8, 55u8, 230u8, 15u8, 77u8, 102u8, 95u8, - 114u8, 136u8, 204u8, 114u8, 52u8, 147u8, 252u8, 166u8, 48u8, 251u8, - 67u8, - ], - ) } - - #[doc = " The owner of a key. The key is the `KeyTypeId` + the encoded key."] - pub fn key_owner( - &self, - _0: impl ::std::borrow::Borrow, - _1: impl ::std::borrow::Borrow<[::core::primitive::u8]>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::subxt::utils::AccountId32>, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Session", - "KeyOwner", - vec![::subxt::storage::address::StorageMapKey::new( - &(_0.borrow(), _1.borrow()), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], - [ - 4u8, 91u8, 25u8, 84u8, 250u8, 201u8, 174u8, 129u8, 201u8, 58u8, 197u8, - 199u8, 137u8, 240u8, 118u8, 33u8, 99u8, 2u8, 195u8, 57u8, 53u8, 172u8, - 0u8, 148u8, 203u8, 144u8, 149u8, 64u8, 135u8, 254u8, 242u8, 215u8, - ], - ) + impl ::subxt::blocks::StaticExtrinsic for SetController { + const CALL: &'static str = "set_controller"; + const PALLET: &'static str = "Staking"; } - - #[doc = " The owner of a key. The key is the `KeyTypeId` + the encoded key."] - pub fn key_owner_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::subxt::utils::AccountId32>, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Session", - "KeyOwner", - Vec::new(), - [ - 4u8, 91u8, 25u8, 84u8, 250u8, 201u8, 174u8, 129u8, 201u8, 58u8, 197u8, - 199u8, 137u8, 240u8, 118u8, 33u8, 99u8, 2u8, 195u8, 57u8, 53u8, 172u8, - 0u8, 148u8, 203u8, 144u8, 149u8, 64u8, 135u8, 254u8, 242u8, 215u8, - ], - ) + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetValidatorCount { + #[codec(compact)] + pub new: ::core::primitive::u32, } - } - } - } - pub mod democracy { - use super::{root_mod, runtime_types}; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::{root_mod, runtime_types}; - type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Propose { - pub proposal: runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::da_runtime::RuntimeCall, - >, - #[codec(compact)] - pub value: ::core::primitive::u128, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Second { - #[codec(compact)] - pub proposal: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Vote { - #[codec(compact)] - pub ref_index: ::core::primitive::u32, - pub vote: - runtime_types::pallet_democracy::vote::AccountVote<::core::primitive::u128>, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct EmergencyCancel { - pub ref_index: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct ExternalPropose { - pub proposal: runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::da_runtime::RuntimeCall, - >, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct ExternalProposeMajority { - pub proposal: runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::da_runtime::RuntimeCall, - >, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct ExternalProposeDefault { - pub proposal: runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::da_runtime::RuntimeCall, - >, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct FastTrack { - pub proposal_hash: ::subxt::utils::H256, - pub voting_period: ::core::primitive::u32, - pub delay: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct VetoExternal { - pub proposal_hash: ::subxt::utils::H256, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct CancelReferendum { - #[codec(compact)] - pub ref_index: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Delegate { - pub to: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pub conviction: runtime_types::pallet_democracy::conviction::Conviction, - pub balance: ::core::primitive::u128, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Undelegate; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct ClearPublicProposals; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Unlock { - pub target: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct RemoveVote { - pub index: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct RemoveOtherVote { - pub target: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pub index: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Blacklist { - pub proposal_hash: ::subxt::utils::H256, - pub maybe_ref_index: ::core::option::Option<::core::primitive::u32>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct CancelProposal { - #[codec(compact)] - pub prop_index: ::core::primitive::u32, - } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Propose a sensitive action to be taken."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be _Signed_ and the sender must"] - #[doc = "have funds to cover the deposit."] - #[doc = ""] - #[doc = "- `proposal_hash`: The hash of the proposal preimage."] - #[doc = "- `value`: The amount of deposit (must be at least `MinimumDeposit`)."] - #[doc = ""] - #[doc = "Emits `Proposed`."] - pub fn propose( - &self, - proposal: runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::da_runtime::RuntimeCall, - >, - value: ::core::primitive::u128, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Democracy", - "propose", - Propose { proposal, value }, - [ - 123u8, 3u8, 204u8, 140u8, 194u8, 195u8, 214u8, 39u8, 167u8, 126u8, - 45u8, 4u8, 219u8, 17u8, 143u8, 185u8, 29u8, 224u8, 230u8, 68u8, 253u8, - 15u8, 170u8, 90u8, 232u8, 123u8, 46u8, 255u8, 168u8, 39u8, 204u8, 63u8, - ], - ) + impl ::subxt::blocks::StaticExtrinsic for SetValidatorCount { + const CALL: &'static str = "set_validator_count"; + const PALLET: &'static str = "Staking"; } - - #[doc = "Signals agreement with a particular proposal."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be _Signed_ and the sender"] - #[doc = "must have funds to cover the deposit, equal to the original deposit."] - #[doc = ""] - #[doc = "- `proposal`: The index of the proposal to second."] - pub fn second( - &self, - proposal: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new("Democracy", "second", Second { proposal }, [ - 59u8, 240u8, 183u8, 218u8, 61u8, 93u8, 184u8, 67u8, 10u8, 4u8, 138u8, - 196u8, 168u8, 49u8, 42u8, 69u8, 154u8, 42u8, 90u8, 112u8, 179u8, 69u8, - 51u8, 148u8, 159u8, 212u8, 221u8, 226u8, 132u8, 228u8, 51u8, 83u8, - ]) + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct IncreaseValidatorCount { + #[codec(compact)] + pub additional: ::core::primitive::u32, } - - #[doc = "Vote in a referendum. If `vote.is_aye()`, the vote is to enact the proposal;"] - #[doc = "otherwise it is a vote to keep the status quo."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be _Signed_."] - #[doc = ""] - #[doc = "- `ref_index`: The index of the referendum to vote for."] - #[doc = "- `vote`: The vote configuration."] - pub fn vote( - &self, - ref_index: ::core::primitive::u32, - vote: runtime_types::pallet_democracy::vote::AccountVote< - ::core::primitive::u128, - >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Democracy", - "vote", - Vote { ref_index, vote }, - [ - 138u8, 213u8, 229u8, 111u8, 1u8, 191u8, 73u8, 3u8, 145u8, 28u8, 44u8, - 88u8, 163u8, 188u8, 129u8, 188u8, 64u8, 15u8, 64u8, 103u8, 250u8, 97u8, - 234u8, 188u8, 29u8, 205u8, 51u8, 6u8, 116u8, 58u8, 156u8, 201u8, - ], - ) + impl ::subxt::blocks::StaticExtrinsic for IncreaseValidatorCount { + const CALL: &'static str = "increase_validator_count"; + const PALLET: &'static str = "Staking"; } - - #[doc = "Schedule an emergency cancellation of a referendum. Cannot happen twice to the same"] - #[doc = "referendum."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be `CancellationOrigin`."] - #[doc = ""] - #[doc = "-`ref_index`: The index of the referendum to cancel."] - #[doc = ""] - #[doc = "Weight: `O(1)`."] - pub fn emergency_cancel( - &self, - ref_index: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Democracy", - "emergency_cancel", - EmergencyCancel { ref_index }, - [ - 139u8, 213u8, 133u8, 75u8, 34u8, 206u8, 124u8, 245u8, 35u8, 237u8, - 132u8, 92u8, 49u8, 167u8, 117u8, 80u8, 188u8, 93u8, 198u8, 237u8, - 132u8, 77u8, 195u8, 65u8, 29u8, 37u8, 86u8, 74u8, 214u8, 119u8, 71u8, - 204u8, - ], - ) + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ScaleValidatorCount { + pub factor: runtime_types::sp_arithmetic::per_things::Percent, } - - #[doc = "Schedule a referendum to be tabled once it is legal to schedule an external"] - #[doc = "referendum."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be `ExternalOrigin`."] - #[doc = ""] - #[doc = "- `proposal_hash`: The preimage hash of the proposal."] - pub fn external_propose( - &self, - proposal: runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::da_runtime::RuntimeCall, - >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Democracy", - "external_propose", - ExternalPropose { proposal }, - [ - 164u8, 193u8, 14u8, 122u8, 105u8, 232u8, 20u8, 194u8, 99u8, 227u8, - 36u8, 105u8, 218u8, 146u8, 16u8, 208u8, 56u8, 62u8, 100u8, 65u8, 35u8, - 33u8, 51u8, 208u8, 17u8, 43u8, 223u8, 198u8, 202u8, 16u8, 56u8, 75u8, - ], - ) + impl ::subxt::blocks::StaticExtrinsic for ScaleValidatorCount { + const CALL: &'static str = "scale_validator_count"; + const PALLET: &'static str = "Staking"; } - - #[doc = "Schedule a majority-carries referendum to be tabled next once it is legal to schedule"] - #[doc = "an external referendum."] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ForceNoEras; + impl ::subxt::blocks::StaticExtrinsic for ForceNoEras { + const CALL: &'static str = "force_no_eras"; + const PALLET: &'static str = "Staking"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ForceNewEra; + impl ::subxt::blocks::StaticExtrinsic for ForceNewEra { + const CALL: &'static str = "force_new_era"; + const PALLET: &'static str = "Staking"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetInvulnerables { + pub invulnerables: ::std::vec::Vec<::subxt::utils::AccountId32>, + } + impl ::subxt::blocks::StaticExtrinsic for SetInvulnerables { + const CALL: &'static str = "set_invulnerables"; + const PALLET: &'static str = "Staking"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ForceUnstake { + pub stash: ::subxt::utils::AccountId32, + pub num_slashing_spans: ::core::primitive::u32, + } + impl ::subxt::blocks::StaticExtrinsic for ForceUnstake { + const CALL: &'static str = "force_unstake"; + const PALLET: &'static str = "Staking"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ForceNewEraAlways; + impl ::subxt::blocks::StaticExtrinsic for ForceNewEraAlways { + const CALL: &'static str = "force_new_era_always"; + const PALLET: &'static str = "Staking"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct CancelDeferredSlash { + pub era: ::core::primitive::u32, + pub slash_indices: ::std::vec::Vec<::core::primitive::u32>, + } + impl ::subxt::blocks::StaticExtrinsic for CancelDeferredSlash { + const CALL: &'static str = "cancel_deferred_slash"; + const PALLET: &'static str = "Staking"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct PayoutStakers { + pub validator_stash: ::subxt::utils::AccountId32, + pub era: ::core::primitive::u32, + } + impl ::subxt::blocks::StaticExtrinsic for PayoutStakers { + const CALL: &'static str = "payout_stakers"; + const PALLET: &'static str = "Staking"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Rebond { + #[codec(compact)] + pub value: ::core::primitive::u128, + } + impl ::subxt::blocks::StaticExtrinsic for Rebond { + const CALL: &'static str = "rebond"; + const PALLET: &'static str = "Staking"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ReapStash { + pub stash: ::subxt::utils::AccountId32, + pub num_slashing_spans: ::core::primitive::u32, + } + impl ::subxt::blocks::StaticExtrinsic for ReapStash { + const CALL: &'static str = "reap_stash"; + const PALLET: &'static str = "Staking"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Kick { + pub who: ::std::vec::Vec< + ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + >, + } + impl ::subxt::blocks::StaticExtrinsic for Kick { + const CALL: &'static str = "kick"; + const PALLET: &'static str = "Staking"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetStakingConfigs { + pub min_nominator_bond: runtime_types::pallet_staking::pallet::pallet::ConfigOp< + ::core::primitive::u128, + >, + pub min_validator_bond: runtime_types::pallet_staking::pallet::pallet::ConfigOp< + ::core::primitive::u128, + >, + pub max_nominator_count: + runtime_types::pallet_staking::pallet::pallet::ConfigOp< + ::core::primitive::u32, + >, + pub max_validator_count: + runtime_types::pallet_staking::pallet::pallet::ConfigOp< + ::core::primitive::u32, + >, + pub chill_threshold: runtime_types::pallet_staking::pallet::pallet::ConfigOp< + runtime_types::sp_arithmetic::per_things::Percent, + >, + pub min_commission: runtime_types::pallet_staking::pallet::pallet::ConfigOp< + runtime_types::sp_arithmetic::per_things::Perbill, + >, + } + impl ::subxt::blocks::StaticExtrinsic for SetStakingConfigs { + const CALL: &'static str = "set_staking_configs"; + const PALLET: &'static str = "Staking"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ChillOther { + pub controller: ::subxt::utils::AccountId32, + } + impl ::subxt::blocks::StaticExtrinsic for ChillOther { + const CALL: &'static str = "chill_other"; + const PALLET: &'static str = "Staking"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ForceApplyMinCommission { + pub validator_stash: ::subxt::utils::AccountId32, + } + impl ::subxt::blocks::StaticExtrinsic for ForceApplyMinCommission { + const CALL: &'static str = "force_apply_min_commission"; + const PALLET: &'static str = "Staking"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetMinCommission { + pub new: runtime_types::sp_arithmetic::per_things::Perbill, + } + impl ::subxt::blocks::StaticExtrinsic for SetMinCommission { + const CALL: &'static str = "set_min_commission"; + const PALLET: &'static str = "Staking"; + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Take the origin account as a stash and lock up `value` of its balance. `controller` will"] + #[doc = "be the account that controls it."] #[doc = ""] - #[doc = "The dispatch of this call must be `ExternalMajorityOrigin`."] + #[doc = "`value` must be more than the `minimum_balance` specified by `T::Currency`."] #[doc = ""] - #[doc = "- `proposal_hash`: The preimage hash of the proposal."] + #[doc = "The dispatch origin for this call must be _Signed_ by the stash account."] #[doc = ""] - #[doc = "Unlike `external_propose`, blacklisting has no effect on this and it may replace a"] - #[doc = "pre-scheduled `external_propose` call."] + #[doc = "Emits `Bonded`."] + #[doc = "# "] + #[doc = "- Independent of the arguments. Moderate complexity."] + #[doc = "- O(1)."] + #[doc = "- Three extra DB entries."] #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn external_propose_majority( + #[doc = "NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned"] + #[doc = "unless the `origin` falls below _existential deposit_ and gets removed as dust."] + #[doc = "------------------"] + #[doc = "# "] + pub fn bond( &self, - proposal: runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::da_runtime::RuntimeCall, + controller: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Democracy", - "external_propose_majority", - ExternalProposeMajority { proposal }, + value: ::core::primitive::u128, + payee: runtime_types::pallet_staking::RewardDestination< + ::subxt::utils::AccountId32, + >, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Staking", + "bond", + types::Bond { + controller, + value, + payee, + }, [ - 129u8, 124u8, 147u8, 253u8, 69u8, 115u8, 230u8, 186u8, 155u8, 4u8, - 220u8, 103u8, 28u8, 132u8, 115u8, 153u8, 196u8, 88u8, 9u8, 130u8, - 129u8, 234u8, 75u8, 96u8, 202u8, 216u8, 145u8, 189u8, 231u8, 101u8, - 127u8, 11u8, + 122u8, 113u8, 66u8, 155u8, 72u8, 243u8, 227u8, 93u8, 181u8, 164u8, + 134u8, 177u8, 78u8, 84u8, 252u8, 232u8, 129u8, 228u8, 79u8, 158u8, + 23u8, 9u8, 17u8, 156u8, 202u8, 134u8, 167u8, 169u8, 44u8, 82u8, 166u8, + 158u8, ], ) } - #[doc = "Schedule a negative-turnout-bias referendum to be tabled next once it is legal to"] - #[doc = "schedule an external referendum."] + #[doc = "Add some extra amount that have appeared in the stash `free_balance` into the balance up"] + #[doc = "for staking."] #[doc = ""] - #[doc = "The dispatch of this call must be `ExternalDefaultOrigin`."] + #[doc = "The dispatch origin for this call must be _Signed_ by the stash, not the controller."] #[doc = ""] - #[doc = "- `proposal_hash`: The preimage hash of the proposal."] + #[doc = "Use this if there are additional funds in your stash account that you wish to bond."] + #[doc = "Unlike [`bond`](Self::bond) or [`unbond`](Self::unbond) this function does not impose"] + #[doc = "any limitation on the amount that can be added."] #[doc = ""] - #[doc = "Unlike `external_propose`, blacklisting has no effect on this and it may replace a"] - #[doc = "pre-scheduled `external_propose` call."] + #[doc = "Emits `Bonded`."] #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn external_propose_default( + #[doc = "# "] + #[doc = "- Independent of the arguments. Insignificant complexity."] + #[doc = "- O(1)."] + #[doc = "# "] + pub fn bond_extra( &self, - proposal: runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::da_runtime::RuntimeCall, - >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Democracy", - "external_propose_default", - ExternalProposeDefault { proposal }, + max_additional: ::core::primitive::u128, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Staking", + "bond_extra", + types::BondExtra { max_additional }, [ - 96u8, 15u8, 108u8, 208u8, 141u8, 247u8, 4u8, 73u8, 2u8, 30u8, 231u8, - 40u8, 184u8, 250u8, 42u8, 161u8, 248u8, 45u8, 217u8, 50u8, 53u8, 13u8, - 181u8, 214u8, 136u8, 51u8, 93u8, 95u8, 165u8, 3u8, 83u8, 190u8, + 9u8, 143u8, 179u8, 99u8, 91u8, 254u8, 114u8, 189u8, 202u8, 245u8, 48u8, + 130u8, 103u8, 17u8, 183u8, 177u8, 172u8, 156u8, 227u8, 145u8, 191u8, + 134u8, 81u8, 3u8, 170u8, 85u8, 40u8, 56u8, 216u8, 95u8, 232u8, 52u8, ], ) } - #[doc = "Schedule the currently externally-proposed majority-carries referendum to be tabled"] - #[doc = "immediately. If there is no externally-proposed referendum currently, or if there is one"] - #[doc = "but it is not a majority-carries referendum then it fails."] + #[doc = "Schedule a portion of the stash to be unlocked ready for transfer out after the bond"] + #[doc = "period ends. If this leaves an amount actively bonded less than"] + #[doc = "T::Currency::minimum_balance(), then it is increased to the full amount."] #[doc = ""] - #[doc = "The dispatch of this call must be `FastTrackOrigin`."] + #[doc = "The dispatch origin for this call must be _Signed_ by the controller, not the stash."] #[doc = ""] - #[doc = "- `proposal_hash`: The hash of the current external proposal."] - #[doc = "- `voting_period`: The period that is allowed for voting on this proposal. Increased to"] - #[doc = "\tMust be always greater than zero."] - #[doc = "\tFor `FastTrackOrigin` must be equal or greater than `FastTrackVotingPeriod`."] - #[doc = "- `delay`: The number of block after voting has ended in approval and this should be"] - #[doc = " enacted. This doesn't have a minimum amount."] + #[doc = "Once the unlock period is done, you can call `withdraw_unbonded` to actually move"] + #[doc = "the funds out of management ready for transfer."] #[doc = ""] - #[doc = "Emits `Started`."] + #[doc = "No more than a limited number of unlocking chunks (see `MaxUnlockingChunks`)"] + #[doc = "can co-exists at the same time. If there are no unlocking chunks slots available"] + #[doc = "[`Call::withdraw_unbonded`] is called to remove some of the chunks (if possible)."] #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn fast_track( - &self, - proposal_hash: ::subxt::utils::H256, - voting_period: ::core::primitive::u32, - delay: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Democracy", - "fast_track", - FastTrack { - proposal_hash, - voting_period, - delay, - }, + #[doc = "If a user encounters the `InsufficientBond` error when calling this extrinsic,"] + #[doc = "they should call `chill` first in order to free up their bonded funds."] + #[doc = ""] + #[doc = "Emits `Unbonded`."] + #[doc = ""] + #[doc = "See also [`Call::withdraw_unbonded`]."] + pub fn unbond( + &self, + value: ::core::primitive::u128, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Staking", + "unbond", + types::Unbond { value }, [ - 125u8, 209u8, 107u8, 120u8, 93u8, 205u8, 129u8, 147u8, 254u8, 126u8, - 45u8, 126u8, 39u8, 0u8, 56u8, 14u8, 233u8, 49u8, 245u8, 220u8, 156u8, - 10u8, 252u8, 31u8, 102u8, 90u8, 163u8, 236u8, 178u8, 85u8, 13u8, 24u8, + 70u8, 201u8, 146u8, 56u8, 51u8, 237u8, 90u8, 193u8, 69u8, 42u8, 168u8, + 96u8, 215u8, 128u8, 253u8, 22u8, 239u8, 14u8, 214u8, 103u8, 170u8, + 140u8, 2u8, 182u8, 3u8, 190u8, 184u8, 191u8, 231u8, 137u8, 50u8, 16u8, ], ) } - #[doc = "Veto and blacklist the external proposal hash."] + #[doc = "Remove any unlocked chunks from the `unlocking` queue from our management."] #[doc = ""] - #[doc = "The dispatch origin of this call must be `VetoOrigin`."] + #[doc = "This essentially frees up that balance to be used by the stash account to do"] + #[doc = "whatever it wants."] #[doc = ""] - #[doc = "- `proposal_hash`: The preimage hash of the proposal to veto and blacklist."] + #[doc = "The dispatch origin for this call must be _Signed_ by the controller."] #[doc = ""] - #[doc = "Emits `Vetoed`."] + #[doc = "Emits `Withdrawn`."] #[doc = ""] - #[doc = "Weight: `O(V + log(V))` where V is number of `existing vetoers`"] - pub fn veto_external( + #[doc = "See also [`Call::unbond`]."] + #[doc = ""] + #[doc = "# "] + #[doc = "Complexity O(S) where S is the number of slashing spans to remove"] + #[doc = "NOTE: Weight annotation is the kill scenario, we refund otherwise."] + #[doc = "# "] + pub fn withdraw_unbonded( &self, - proposal_hash: ::subxt::utils::H256, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Democracy", - "veto_external", - VetoExternal { proposal_hash }, + num_slashing_spans: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Staking", + "withdraw_unbonded", + types::WithdrawUnbonded { num_slashing_spans }, [ - 209u8, 18u8, 18u8, 103u8, 186u8, 160u8, 214u8, 124u8, 150u8, 207u8, - 112u8, 90u8, 84u8, 197u8, 95u8, 157u8, 165u8, 65u8, 109u8, 101u8, 75u8, - 201u8, 41u8, 149u8, 75u8, 154u8, 37u8, 178u8, 239u8, 121u8, 124u8, - 23u8, + 229u8, 128u8, 177u8, 224u8, 197u8, 118u8, 239u8, 142u8, 179u8, 164u8, + 10u8, 205u8, 124u8, 254u8, 209u8, 157u8, 172u8, 87u8, 58u8, 120u8, + 74u8, 12u8, 150u8, 117u8, 234u8, 32u8, 191u8, 182u8, 92u8, 97u8, 77u8, + 59u8, ], ) } - #[doc = "Remove a referendum."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be _Root_."] + #[doc = "Declare the desire to validate for the origin controller."] #[doc = ""] - #[doc = "- `ref_index`: The index of the referendum to cancel."] + #[doc = "Effects will be felt at the beginning of the next era."] #[doc = ""] - #[doc = "# Weight: `O(1)`."] - pub fn cancel_referendum( + #[doc = "The dispatch origin for this call must be _Signed_ by the controller, not the stash."] + pub fn validate( &self, - ref_index: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Democracy", - "cancel_referendum", - CancelReferendum { ref_index }, + prefs: runtime_types::pallet_staking::ValidatorPrefs, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Staking", + "validate", + types::Validate { prefs }, [ - 51u8, 25u8, 25u8, 251u8, 236u8, 115u8, 130u8, 230u8, 72u8, 186u8, - 119u8, 71u8, 165u8, 137u8, 55u8, 167u8, 187u8, 128u8, 55u8, 8u8, 212u8, - 139u8, 245u8, 232u8, 103u8, 136u8, 229u8, 113u8, 125u8, 36u8, 1u8, - 149u8, + 63u8, 83u8, 12u8, 16u8, 56u8, 84u8, 41u8, 141u8, 202u8, 0u8, 37u8, + 30u8, 115u8, 2u8, 145u8, 101u8, 168u8, 89u8, 94u8, 98u8, 8u8, 45u8, + 140u8, 237u8, 101u8, 136u8, 179u8, 162u8, 205u8, 41u8, 88u8, 248u8, ], ) } - #[doc = "Delegate the voting power (with some given conviction) of the sending account."] - #[doc = ""] - #[doc = "The balance delegated is locked for as long as it's delegated, and thereafter for the"] - #[doc = "time appropriate for the conviction's lock period."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be _Signed_, and the signing account must either:"] - #[doc = " - be delegating already; or"] - #[doc = " - have no voting activity (if there is, then it will need to be removed/consolidated"] - #[doc = " through `reap_vote` or `unvote`)."] + #[doc = "Declare the desire to nominate `targets` for the origin controller."] #[doc = ""] - #[doc = "- `to`: The account whose voting the `target` account's voting power will follow."] - #[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 = "Effects will be felt at the beginning of the next era."] #[doc = ""] - #[doc = "Emits `Delegated`."] + #[doc = "The dispatch origin for this call must be _Signed_ by the controller, not the stash."] #[doc = ""] - #[doc = "Weight: `O(R)` where R is the number of referendums the voter delegating to has"] - #[doc = " voted on. Weight is charged as if maximum votes."] - pub fn delegate( + #[doc = "# "] + #[doc = "- The transaction's complexity is proportional to the size of `targets` (N)"] + #[doc = "which is capped at CompactAssignments::LIMIT (T::MaxNominations)."] + #[doc = "- Both the reads and writes follow a similar pattern."] + #[doc = "# "] + pub fn nominate( &self, - to: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, + targets: ::std::vec::Vec< + ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, >, - conviction: runtime_types::pallet_democracy::conviction::Conviction, - balance: ::core::primitive::u128, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Democracy", - "delegate", - Delegate { - to, - conviction, - balance, - }, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Staking", + "nominate", + types::Nominate { targets }, [ - 247u8, 226u8, 242u8, 221u8, 47u8, 161u8, 91u8, 223u8, 6u8, 79u8, 238u8, - 205u8, 41u8, 188u8, 140u8, 56u8, 181u8, 248u8, 102u8, 10u8, 127u8, - 166u8, 90u8, 187u8, 13u8, 124u8, 209u8, 117u8, 16u8, 209u8, 74u8, 29u8, + 15u8, 90u8, 71u8, 240u8, 160u8, 193u8, 136u8, 125u8, 36u8, 150u8, + 105u8, 92u8, 188u8, 102u8, 160u8, 56u8, 164u8, 250u8, 75u8, 106u8, + 10u8, 123u8, 18u8, 50u8, 59u8, 128u8, 35u8, 199u8, 103u8, 109u8, 45u8, + 223u8, ], ) } - #[doc = "Undelegate the voting power of the sending account."] - #[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."] + #[doc = "Declare no desire to either validate or nominate."] #[doc = ""] - #[doc = "The dispatch origin of this call must be _Signed_ and the signing account must be"] - #[doc = "currently delegating."] + #[doc = "Effects will be felt at the beginning of the next era."] #[doc = ""] - #[doc = "Emits `Undelegated`."] + #[doc = "The dispatch origin for this call must be _Signed_ by the controller, not the stash."] #[doc = ""] - #[doc = "Weight: `O(R)` where R is the number of referendums the voter delegating to has"] - #[doc = " voted on. Weight is charged as if maximum votes."] - pub fn undelegate(&self) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new("Democracy", "undelegate", Undelegate {}, [ - 165u8, 40u8, 183u8, 209u8, 57u8, 153u8, 111u8, 29u8, 114u8, 109u8, 107u8, - 235u8, 97u8, 61u8, 53u8, 155u8, 44u8, 245u8, 28u8, 220u8, 56u8, 134u8, - 43u8, 122u8, 248u8, 156u8, 191u8, 154u8, 4u8, 121u8, 152u8, 153u8, + #[doc = "# "] + #[doc = "- Independent of the arguments. Insignificant complexity."] + #[doc = "- Contains one read."] + #[doc = "- Writes are limited to the `origin` account key."] + #[doc = "# "] + pub fn chill(&self) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static("Staking", "chill", types::Chill {}, [ + 157u8, 75u8, 243u8, 69u8, 110u8, 192u8, 22u8, 27u8, 107u8, 68u8, 236u8, + 58u8, 179u8, 34u8, 118u8, 98u8, 131u8, 62u8, 242u8, 84u8, 149u8, 24u8, + 83u8, 223u8, 78u8, 12u8, 192u8, 22u8, 111u8, 11u8, 171u8, 149u8, ]) } - #[doc = "Clears all public proposals."] + #[doc = "(Re-)set the payment target for a controller."] #[doc = ""] - #[doc = "The dispatch origin of this call must be _Root_."] + #[doc = "Effects will be felt instantly (as soon as this function is completed successfully)."] #[doc = ""] - #[doc = "Weight: `O(1)`."] - pub fn clear_public_proposals( + #[doc = "The dispatch origin for this call must be _Signed_ by the controller, not the stash."] + #[doc = ""] + #[doc = "# "] + #[doc = "- Independent of the arguments. Insignificant complexity."] + #[doc = "- Contains a limited number of reads."] + #[doc = "- Writes are limited to the `origin` account key."] + #[doc = "---------"] + #[doc = "- Weight: O(1)"] + #[doc = "- DB Weight:"] + #[doc = " - Read: Ledger"] + #[doc = " - Write: Payee"] + #[doc = "# "] + pub fn set_payee( &self, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Democracy", - "clear_public_proposals", - ClearPublicProposals {}, + payee: runtime_types::pallet_staking::RewardDestination< + ::subxt::utils::AccountId32, + >, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Staking", + "set_payee", + types::SetPayee { payee }, [ - 59u8, 126u8, 254u8, 223u8, 252u8, 225u8, 75u8, 185u8, 188u8, 181u8, - 42u8, 179u8, 211u8, 73u8, 12u8, 141u8, 243u8, 197u8, 46u8, 130u8, - 215u8, 196u8, 225u8, 88u8, 48u8, 199u8, 231u8, 249u8, 195u8, 53u8, - 184u8, 204u8, + 86u8, 172u8, 187u8, 98u8, 106u8, 240u8, 184u8, 60u8, 163u8, 244u8, 7u8, + 64u8, 147u8, 168u8, 192u8, 177u8, 211u8, 138u8, 73u8, 188u8, 159u8, + 154u8, 175u8, 219u8, 231u8, 235u8, 93u8, 195u8, 204u8, 100u8, 196u8, + 241u8, ], ) } - #[doc = "Unlock tokens that have an expired lock."] + #[doc = "(Re-)set the controller of a stash."] #[doc = ""] - #[doc = "The dispatch origin of this call must be _Signed_."] + #[doc = "Effects will be felt instantly (as soon as this function is completed successfully)."] #[doc = ""] - #[doc = "- `target`: The account to remove the lock on."] + #[doc = "The dispatch origin for this call must be _Signed_ by the stash, not the controller."] #[doc = ""] - #[doc = "Weight: `O(R)` with R number of vote of target."] - pub fn unlock( + #[doc = "# "] + #[doc = "- Independent of the arguments. Insignificant complexity."] + #[doc = "- Contains a limited number of reads."] + #[doc = "- Writes are limited to the `origin` account key."] + #[doc = "----------"] + #[doc = "Weight: O(1)"] + #[doc = "DB Weight:"] + #[doc = "- Read: Bonded, Ledger New Controller, Ledger Old Controller"] + #[doc = "- Write: Bonded, Ledger New Controller, Ledger Old Controller"] + #[doc = "# "] + pub fn set_controller( &self, - target: ::subxt::utils::MultiAddress< + controller: ::subxt::utils::MultiAddress< ::subxt::utils::AccountId32, ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new("Democracy", "unlock", Unlock { target }, [ - 227u8, 6u8, 154u8, 150u8, 253u8, 167u8, 142u8, 6u8, 147u8, 24u8, 124u8, - 51u8, 101u8, 185u8, 184u8, 170u8, 6u8, 223u8, 29u8, 167u8, 73u8, 31u8, - 179u8, 60u8, 156u8, 244u8, 192u8, 233u8, 79u8, 99u8, 248u8, 126u8, - ]) + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Staking", + "set_controller", + types::SetController { controller }, + [ + 247u8, 209u8, 151u8, 119u8, 208u8, 41u8, 100u8, 77u8, 251u8, 116u8, + 185u8, 248u8, 30u8, 94u8, 240u8, 139u8, 155u8, 102u8, 25u8, 237u8, + 64u8, 215u8, 84u8, 205u8, 152u8, 214u8, 233u8, 47u8, 233u8, 108u8, + 86u8, 99u8, + ], + ) } - #[doc = "Remove a vote for a referendum."] - #[doc = ""] - #[doc = "If:"] - #[doc = "- the referendum was cancelled, or"] - #[doc = "- the referendum is ongoing, or"] - #[doc = "- the referendum 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 referendum 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 referendum `index`."] + #[doc = "Sets the ideal number of validators."] #[doc = ""] - #[doc = "- `index`: The index of referendum of the vote to be removed."] + #[doc = "The dispatch origin must be Root."] #[doc = ""] - #[doc = "Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on."] - #[doc = " Weight is calculated for the maximum number of vote."] - pub fn remove_vote( + #[doc = "# "] + #[doc = "Weight: O(1)"] + #[doc = "Write: Validator Count"] + #[doc = "# "] + pub fn set_validator_count( &self, - index: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Democracy", - "remove_vote", - RemoveVote { index }, + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Staking", + "set_validator_count", + types::SetValidatorCount { new }, [ - 148u8, 120u8, 14u8, 172u8, 81u8, 152u8, 159u8, 178u8, 106u8, 244u8, - 36u8, 98u8, 120u8, 189u8, 213u8, 93u8, 119u8, 156u8, 112u8, 34u8, - 241u8, 72u8, 206u8, 113u8, 212u8, 161u8, 164u8, 126u8, 122u8, 82u8, - 160u8, 74u8, + 172u8, 225u8, 157u8, 48u8, 242u8, 217u8, 126u8, 206u8, 26u8, 156u8, + 203u8, 100u8, 116u8, 189u8, 98u8, 89u8, 151u8, 101u8, 77u8, 236u8, + 101u8, 8u8, 148u8, 236u8, 180u8, 175u8, 232u8, 146u8, 141u8, 141u8, + 78u8, 165u8, ], ) } - #[doc = "Remove a vote for a referendum."] - #[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 referendum was cancelled, because the voter lost the referendum or"] - #[doc = "because the conviction period is over."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be _Signed_."] + #[doc = "Increments the ideal number of validators upto maximum of"] + #[doc = "`ElectionProviderBase::MaxWinners`."] #[doc = ""] - #[doc = "- `target`: The account of the vote to be removed; this account must have voted for"] - #[doc = " referendum `index`."] - #[doc = "- `index`: The index of referendum of the vote to be removed."] + #[doc = "The dispatch origin must be Root."] #[doc = ""] - #[doc = "Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on."] - #[doc = " Weight is calculated for the maximum number of vote."] - pub fn remove_other_vote( + #[doc = "# "] + #[doc = "Same as [`Self::set_validator_count`]."] + #[doc = "# "] + pub fn increase_validator_count( &self, - target: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - index: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Democracy", - "remove_other_vote", - RemoveOtherVote { target, index }, + additional: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Staking", + "increase_validator_count", + types::IncreaseValidatorCount { additional }, [ - 251u8, 245u8, 79u8, 229u8, 3u8, 107u8, 66u8, 202u8, 148u8, 31u8, 6u8, - 236u8, 156u8, 202u8, 197u8, 107u8, 100u8, 60u8, 255u8, 213u8, 222u8, - 209u8, 249u8, 61u8, 209u8, 215u8, 82u8, 73u8, 25u8, 73u8, 161u8, 24u8, + 108u8, 67u8, 131u8, 248u8, 139u8, 227u8, 224u8, 221u8, 248u8, 94u8, + 141u8, 104u8, 131u8, 250u8, 127u8, 164u8, 137u8, 211u8, 5u8, 27u8, + 185u8, 251u8, 120u8, 243u8, 165u8, 50u8, 197u8, 161u8, 125u8, 195u8, + 16u8, 29u8, ], ) } - #[doc = "Permanently place a proposal into the blacklist. This prevents it from ever being"] - #[doc = "proposed again."] - #[doc = ""] - #[doc = "If called on a queued public or external proposal, then this will result in it being"] - #[doc = "removed. If the `ref_index` supplied is an active referendum with the proposal hash,"] - #[doc = "then it will be cancelled."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be `BlacklistOrigin`."] + #[doc = "Scale up the ideal number of validators by a factor upto maximum of"] + #[doc = "`ElectionProviderBase::MaxWinners`."] #[doc = ""] - #[doc = "- `proposal_hash`: The proposal hash to blacklist permanently."] - #[doc = "- `ref_index`: An ongoing referendum whose hash is `proposal_hash`, which will be"] - #[doc = "cancelled."] + #[doc = "The dispatch origin must be Root."] #[doc = ""] - #[doc = "Weight: `O(p)` (though as this is an high-privilege dispatch, we assume it has a"] - #[doc = " reasonable value)."] - pub fn blacklist( + #[doc = "# "] + #[doc = "Same as [`Self::set_validator_count`]."] + #[doc = "# "] + pub fn scale_validator_count( &self, - proposal_hash: ::subxt::utils::H256, - maybe_ref_index: ::core::option::Option<::core::primitive::u32>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Democracy", - "blacklist", - Blacklist { - proposal_hash, - maybe_ref_index, + factor: runtime_types::sp_arithmetic::per_things::Percent, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Staking", + "scale_validator_count", + types::ScaleValidatorCount { factor }, + [ + 93u8, 200u8, 119u8, 240u8, 148u8, 144u8, 175u8, 135u8, 102u8, 130u8, + 183u8, 216u8, 28u8, 215u8, 155u8, 233u8, 152u8, 65u8, 49u8, 125u8, + 196u8, 79u8, 31u8, 195u8, 233u8, 79u8, 150u8, 138u8, 103u8, 161u8, + 78u8, 154u8, + ], + ) + } + + #[doc = "Force there to be no new eras indefinitely."] + #[doc = ""] + #[doc = "The dispatch origin must be Root."] + #[doc = ""] + #[doc = "# Warning"] + #[doc = ""] + #[doc = "The election process starts multiple blocks before the end of the era."] + #[doc = "Thus the election process may be ongoing when this is called. In this case the"] + #[doc = "election will continue until the next era is triggered."] + #[doc = ""] + #[doc = "# "] + #[doc = "- No arguments."] + #[doc = "- Weight: O(1)"] + #[doc = "- Write: ForceEra"] + #[doc = "# "] + pub fn force_no_eras(&self) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Staking", + "force_no_eras", + types::ForceNoEras {}, + [ + 77u8, 5u8, 105u8, 167u8, 251u8, 78u8, 52u8, 80u8, 177u8, 226u8, 28u8, + 130u8, 106u8, 62u8, 40u8, 210u8, 110u8, 62u8, 21u8, 113u8, 234u8, + 227u8, 171u8, 205u8, 240u8, 46u8, 32u8, 84u8, 184u8, 208u8, 61u8, + 207u8, + ], + ) + } + + #[doc = "Force there to be a new era at the end of the next session. After this, it will be"] + #[doc = "reset to normal (non-forced) behaviour."] + #[doc = ""] + #[doc = "The dispatch origin must be Root."] + #[doc = ""] + #[doc = "# Warning"] + #[doc = ""] + #[doc = "The election process starts multiple blocks before the end of the era."] + #[doc = "If this is called just before a new era is triggered, the election process may not"] + #[doc = "have enough blocks to get a result."] + #[doc = ""] + #[doc = "# "] + #[doc = "- No arguments."] + #[doc = "- Weight: O(1)"] + #[doc = "- Write ForceEra"] + #[doc = "# "] + pub fn force_new_era(&self) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Staking", + "force_new_era", + types::ForceNewEra {}, + [ + 119u8, 45u8, 11u8, 87u8, 236u8, 189u8, 41u8, 142u8, 130u8, 10u8, 132u8, + 140u8, 210u8, 134u8, 66u8, 152u8, 149u8, 55u8, 60u8, 31u8, 190u8, 41u8, + 177u8, 103u8, 245u8, 193u8, 95u8, 255u8, 29u8, 79u8, 112u8, 188u8, + ], + ) + } + + #[doc = "Set the validators who cannot be slashed (if any)."] + #[doc = ""] + #[doc = "The dispatch origin must be Root."] + pub fn set_invulnerables( + &self, + invulnerables: ::std::vec::Vec<::subxt::utils::AccountId32>, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Staking", + "set_invulnerables", + types::SetInvulnerables { invulnerables }, + [ + 31u8, 115u8, 221u8, 229u8, 187u8, 61u8, 33u8, 22u8, 126u8, 142u8, + 248u8, 190u8, 213u8, 35u8, 49u8, 208u8, 193u8, 0u8, 58u8, 18u8, 136u8, + 220u8, 32u8, 8u8, 121u8, 36u8, 184u8, 57u8, 6u8, 125u8, 199u8, 245u8, + ], + ) + } + + #[doc = "Force a current staker to become completely unstaked, immediately."] + #[doc = ""] + #[doc = "The dispatch origin must be Root."] + pub fn force_unstake( + &self, + stash: ::subxt::utils::AccountId32, + num_slashing_spans: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Staking", + "force_unstake", + types::ForceUnstake { + stash, + num_slashing_spans, }, [ - 48u8, 144u8, 81u8, 164u8, 54u8, 111u8, 197u8, 134u8, 6u8, 98u8, 121u8, - 179u8, 254u8, 191u8, 204u8, 212u8, 84u8, 255u8, 86u8, 110u8, 225u8, - 130u8, 26u8, 65u8, 133u8, 56u8, 231u8, 15u8, 245u8, 137u8, 146u8, - 242u8, + 205u8, 115u8, 222u8, 58u8, 168u8, 3u8, 59u8, 58u8, 220u8, 98u8, 204u8, + 90u8, 36u8, 250u8, 178u8, 45u8, 213u8, 158u8, 92u8, 107u8, 3u8, 94u8, + 118u8, 194u8, 187u8, 196u8, 101u8, 250u8, 36u8, 119u8, 21u8, 19u8, ], ) } - #[doc = "Remove a proposal."] + #[doc = "Force there to be a new era at the end of sessions indefinitely."] #[doc = ""] - #[doc = "The dispatch origin of this call must be `CancelProposalOrigin`."] + #[doc = "The dispatch origin must be Root."] #[doc = ""] - #[doc = "- `prop_index`: The index of the proposal to cancel."] + #[doc = "# Warning"] #[doc = ""] - #[doc = "Weight: `O(p)` where `p = PublicProps::::decode_len()`"] - pub fn cancel_proposal( + #[doc = "The election process starts multiple blocks before the end of the era."] + #[doc = "If this is called just before a new era is triggered, the election process may not"] + #[doc = "have enough blocks to get a result."] + pub fn force_new_era_always( &self, - prop_index: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Democracy", - "cancel_proposal", - CancelProposal { prop_index }, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Staking", + "force_new_era_always", + types::ForceNewEraAlways {}, [ - 179u8, 3u8, 198u8, 244u8, 241u8, 124u8, 205u8, 58u8, 100u8, 80u8, - 177u8, 254u8, 98u8, 220u8, 189u8, 63u8, 229u8, 60u8, 157u8, 83u8, - 142u8, 6u8, 236u8, 183u8, 193u8, 235u8, 253u8, 126u8, 153u8, 185u8, - 74u8, 117u8, + 102u8, 153u8, 116u8, 85u8, 80u8, 52u8, 89u8, 215u8, 173u8, 159u8, 96u8, + 99u8, 180u8, 5u8, 62u8, 142u8, 181u8, 101u8, 160u8, 57u8, 177u8, 182u8, + 6u8, 252u8, 107u8, 252u8, 225u8, 104u8, 147u8, 123u8, 244u8, 134u8, ], ) } - } - } - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::pallet_democracy::pallet::Event; - pub mod events { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "A motion has been proposed by a public account."] - pub struct Proposed { - pub proposal_index: ::core::primitive::u32, - pub deposit: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for Proposed { - const EVENT: &'static str = "Proposed"; - const PALLET: &'static str = "Democracy"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "A public proposal has been tabled for referendum vote."] - pub struct Tabled { - pub proposal_index: ::core::primitive::u32, - pub deposit: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for Tabled { - const EVENT: &'static str = "Tabled"; - const PALLET: &'static str = "Democracy"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "An external proposal has been tabled."] - pub struct ExternalTabled; - impl ::subxt::events::StaticEvent for ExternalTabled { - const EVENT: &'static str = "ExternalTabled"; - const PALLET: &'static str = "Democracy"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "A referendum has begun."] - pub struct Started { - pub ref_index: ::core::primitive::u32, - pub threshold: runtime_types::pallet_democracy::vote_threshold::VoteThreshold, - } - impl ::subxt::events::StaticEvent for Started { - const EVENT: &'static str = "Started"; - const PALLET: &'static str = "Democracy"; - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "A proposal has been approved by referendum."] - pub struct Passed { - pub ref_index: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for Passed { - const EVENT: &'static str = "Passed"; - const PALLET: &'static str = "Democracy"; - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "A proposal has been rejected by referendum."] - pub struct NotPassed { - pub ref_index: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for NotPassed { - const EVENT: &'static str = "NotPassed"; - const PALLET: &'static str = "Democracy"; - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "A referendum has been cancelled."] - pub struct Cancelled { - pub ref_index: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for Cancelled { - const EVENT: &'static str = "Cancelled"; - const PALLET: &'static str = "Democracy"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "An account has delegated their vote to another account."] - pub struct Delegated { - pub who: ::subxt::utils::AccountId32, - pub target: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for Delegated { - const EVENT: &'static str = "Delegated"; - const PALLET: &'static str = "Democracy"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "An account has cancelled a previous delegation operation."] - pub struct Undelegated { - pub account: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for Undelegated { - const EVENT: &'static str = "Undelegated"; - const PALLET: &'static str = "Democracy"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "An external proposal has been vetoed."] - pub struct Vetoed { - pub who: ::subxt::utils::AccountId32, - pub proposal_hash: ::subxt::utils::H256, - pub until: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for Vetoed { - const EVENT: &'static str = "Vetoed"; - const PALLET: &'static str = "Democracy"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "A proposal_hash has been blacklisted permanently."] - pub struct Blacklisted { - pub proposal_hash: ::subxt::utils::H256, - } - impl ::subxt::events::StaticEvent for Blacklisted { - const EVENT: &'static str = "Blacklisted"; - const PALLET: &'static str = "Democracy"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "An account has voted in a referendum"] - pub struct Voted { - pub voter: ::subxt::utils::AccountId32, - pub ref_index: ::core::primitive::u32, - pub vote: - runtime_types::pallet_democracy::vote::AccountVote<::core::primitive::u128>, - } - impl ::subxt::events::StaticEvent for Voted { - const EVENT: &'static str = "Voted"; - const PALLET: &'static str = "Democracy"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "An account has secconded a proposal"] - pub struct Seconded { - pub seconder: ::subxt::utils::AccountId32, - pub prop_index: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for Seconded { - const EVENT: &'static str = "Seconded"; - const PALLET: &'static str = "Democracy"; - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "A proposal got canceled."] - pub struct ProposalCanceled { - pub prop_index: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for ProposalCanceled { - const EVENT: &'static str = "ProposalCanceled"; - const PALLET: &'static str = "Democracy"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " The number of (public) proposals that have been made so far."] - pub fn public_prop_count( + + #[doc = "Cancel enactment of a deferred slash."] + #[doc = ""] + #[doc = "Can be called by the `T::AdminOrigin`."] + #[doc = ""] + #[doc = "Parameters: era and indices of the slashes for that era to kill."] + pub fn cancel_deferred_slash( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Democracy", - "PublicPropCount", - vec![], + era: ::core::primitive::u32, + slash_indices: ::std::vec::Vec<::core::primitive::u32>, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Staking", + "cancel_deferred_slash", + types::CancelDeferredSlash { era, slash_indices }, [ - 91u8, 14u8, 171u8, 94u8, 37u8, 157u8, 46u8, 157u8, 254u8, 13u8, 68u8, - 144u8, 23u8, 146u8, 128u8, 159u8, 9u8, 174u8, 74u8, 174u8, 218u8, - 197u8, 23u8, 235u8, 152u8, 226u8, 216u8, 4u8, 120u8, 121u8, 27u8, - 138u8, + 65u8, 90u8, 54u8, 7u8, 89u8, 238u8, 254u8, 76u8, 219u8, 26u8, 137u8, + 181u8, 154u8, 49u8, 35u8, 99u8, 181u8, 193u8, 209u8, 181u8, 212u8, + 153u8, 49u8, 83u8, 77u8, 170u8, 175u8, 142u8, 63u8, 187u8, 183u8, + 199u8, ], ) } - #[doc = " The public proposals. Unsorted. The second item is the proposal."] - pub fn public_props( + #[doc = "Pay out all the stakers behind a single validator for a single era."] + #[doc = ""] + #[doc = "- `validator_stash` is the stash account of the validator. Their nominators, up to"] + #[doc = " `T::MaxNominatorRewardedPerValidator`, will also receive their rewards."] + #[doc = "- `era` may be any era between `[current_era - history_depth; current_era]`."] + #[doc = ""] + #[doc = "The origin of this call must be _Signed_. Any account can call this function, even if"] + #[doc = "it is not one of the stakers."] + #[doc = ""] + #[doc = "# "] + #[doc = "- Time complexity: at most O(MaxNominatorRewardedPerValidator)."] + #[doc = "- Contains a limited number of reads and writes."] + #[doc = "-----------"] + #[doc = "N is the Number of payouts for the validator (including the validator)"] + #[doc = "Weight:"] + #[doc = "- Reward Destination Staked: O(N)"] + #[doc = "- Reward Destination Controller (Creating): O(N)"] + #[doc = ""] + #[doc = " NOTE: weights are assuming that payouts are made to alive stash account (Staked)."] + #[doc = " Paying even a dead controller is cheaper weight-wise. We don't do any refunds here."] + #[doc = "# "] + pub fn payout_stakers( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_core::bounded::bounded_vec::BoundedVec<( - ::core::primitive::u32, - runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::da_runtime::RuntimeCall, - >, - ::subxt::utils::AccountId32, - )>, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Democracy", - "PublicProps", - vec![], + validator_stash: ::subxt::utils::AccountId32, + era: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Staking", + "payout_stakers", + types::PayoutStakers { + validator_stash, + era, + }, [ - 63u8, 172u8, 211u8, 85u8, 27u8, 14u8, 86u8, 49u8, 133u8, 5u8, 132u8, - 189u8, 138u8, 137u8, 219u8, 37u8, 209u8, 49u8, 172u8, 86u8, 240u8, - 235u8, 42u8, 201u8, 203u8, 12u8, 122u8, 225u8, 0u8, 109u8, 205u8, - 103u8, + 69u8, 67u8, 140u8, 197u8, 89u8, 20u8, 59u8, 55u8, 142u8, 197u8, 62u8, + 107u8, 239u8, 50u8, 237u8, 52u8, 4u8, 65u8, 119u8, 73u8, 138u8, 57u8, + 46u8, 78u8, 252u8, 157u8, 187u8, 14u8, 232u8, 244u8, 217u8, 171u8, ], ) } - #[doc = " Those who have locked a deposit."] + #[doc = "Rebond a portion of the stash scheduled to be unlocked."] #[doc = ""] - #[doc = " TWOX-NOTE: Safe, as increasing integer keys are safe."] - pub fn deposit_of( + #[doc = "The dispatch origin must be signed by the controller."] + #[doc = ""] + #[doc = "# "] + #[doc = "- Time complexity: O(L), where L is unlocking chunks"] + #[doc = "- Bounded by `MaxUnlockingChunks`."] + #[doc = "- Storage changes: Can't increase storage, only decrease it."] + #[doc = "# "] + pub fn rebond( &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<( - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::subxt::utils::AccountId32, - >, - ::core::primitive::u128, - )>, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Democracy", - "DepositOf", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], + value: ::core::primitive::u128, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Staking", + "rebond", + types::Rebond { value }, [ - 9u8, 219u8, 11u8, 58u8, 17u8, 194u8, 248u8, 154u8, 135u8, 119u8, 123u8, - 235u8, 252u8, 176u8, 190u8, 162u8, 236u8, 45u8, 237u8, 125u8, 98u8, - 176u8, 184u8, 160u8, 8u8, 181u8, 213u8, 65u8, 14u8, 84u8, 200u8, 64u8, + 204u8, 209u8, 27u8, 219u8, 45u8, 129u8, 15u8, 39u8, 105u8, 165u8, + 255u8, 55u8, 0u8, 59u8, 115u8, 79u8, 139u8, 82u8, 163u8, 197u8, 44u8, + 89u8, 41u8, 234u8, 116u8, 214u8, 248u8, 123u8, 250u8, 49u8, 15u8, 77u8, ], ) } - #[doc = " Those who have locked a deposit."] + #[doc = "Remove all data structures concerning a staker/stash once it is at a state where it can"] + #[doc = "be considered `dust` in the staking system. The requirements are:"] #[doc = ""] - #[doc = " TWOX-NOTE: Safe, as increasing integer keys are safe."] - pub fn deposit_of_root( + #[doc = "1. the `total_balance` of the stash is below existential deposit."] + #[doc = "2. or, the `ledger.total` of the stash is below existential deposit."] + #[doc = ""] + #[doc = "The former can happen in cases like a slash; the latter when a fully unbonded account"] + #[doc = "is still receiving staking rewards in `RewardDestination::Staked`."] + #[doc = ""] + #[doc = "It can be called by anyone, as long as `stash` meets the above requirements."] + #[doc = ""] + #[doc = "Refunds the transaction fees upon successful execution."] + pub fn reap_stash( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<( - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::subxt::utils::AccountId32, - >, - ::core::primitive::u128, - )>, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Democracy", - "DepositOf", - Vec::new(), + stash: ::subxt::utils::AccountId32, + num_slashing_spans: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Staking", + "reap_stash", + types::ReapStash { + stash, + num_slashing_spans, + }, [ - 9u8, 219u8, 11u8, 58u8, 17u8, 194u8, 248u8, 154u8, 135u8, 119u8, 123u8, - 235u8, 252u8, 176u8, 190u8, 162u8, 236u8, 45u8, 237u8, 125u8, 98u8, - 176u8, 184u8, 160u8, 8u8, 181u8, 213u8, 65u8, 14u8, 84u8, 200u8, 64u8, + 231u8, 240u8, 152u8, 33u8, 10u8, 60u8, 18u8, 233u8, 0u8, 229u8, 90u8, + 45u8, 118u8, 29u8, 98u8, 109u8, 89u8, 7u8, 228u8, 254u8, 119u8, 125u8, + 172u8, 209u8, 217u8, 107u8, 50u8, 226u8, 31u8, 5u8, 153u8, 93u8, ], ) } - #[doc = " The next free referendum index, aka the number of referenda started so far."] - pub fn referendum_count( + #[doc = "Remove the given nominations from the calling validator."] + #[doc = ""] + #[doc = "Effects will be felt at the beginning of the next era."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ by the controller, not the stash."] + #[doc = ""] + #[doc = "- `who`: A list of nominator stash accounts who are nominating this validator which"] + #[doc = " should no longer be nominating this validator."] + #[doc = ""] + #[doc = "Note: Making this call only makes sense if you first set the validator preferences to"] + #[doc = "block any further nominations."] + pub fn kick( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Democracy", - "ReferendumCount", - vec![], - [ - 153u8, 210u8, 106u8, 244u8, 156u8, 70u8, 124u8, 251u8, 123u8, 75u8, - 7u8, 189u8, 199u8, 145u8, 95u8, 119u8, 137u8, 11u8, 240u8, 160u8, - 151u8, 248u8, 229u8, 231u8, 89u8, 222u8, 18u8, 237u8, 144u8, 78u8, - 99u8, 58u8, - ], - ) + who: ::std::vec::Vec< + ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + >, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static("Staking", "kick", types::Kick { who }, [ + 28u8, 254u8, 219u8, 14u8, 44u8, 187u8, 186u8, 72u8, 55u8, 21u8, 129u8, + 205u8, 225u8, 204u8, 162u8, 53u8, 255u8, 56u8, 49u8, 194u8, 63u8, 43u8, + 96u8, 177u8, 125u8, 0u8, 163u8, 97u8, 231u8, 159u8, 43u8, 249u8, + ]) } - #[doc = " The lowest referendum index representing an unbaked referendum. Equal to"] - #[doc = " `ReferendumCount` if there isn't a unbaked referendum."] - pub fn lowest_unbaked( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Democracy", - "LowestUnbaked", - vec![], - [ - 4u8, 51u8, 108u8, 11u8, 48u8, 165u8, 19u8, 251u8, 182u8, 76u8, 163u8, - 73u8, 227u8, 2u8, 212u8, 74u8, 128u8, 27u8, 165u8, 164u8, 111u8, 22u8, - 209u8, 190u8, 103u8, 7u8, 116u8, 16u8, 160u8, 144u8, 123u8, 64u8, - ], - ) - } - - #[doc = " Information concerning any given referendum."] + #[doc = "Update the various staking configurations ."] #[doc = ""] - #[doc = " TWOX-NOTE: SAFE as indexes are not under an attacker’s control."] - pub fn referendum_info_of( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_democracy::types::ReferendumInfo< - ::core::primitive::u32, - runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::da_runtime::RuntimeCall, - >, - ::core::primitive::u128, - >, - >, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Democracy", - "ReferendumInfoOf", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], - [ - 167u8, 58u8, 230u8, 197u8, 185u8, 56u8, 181u8, 32u8, 81u8, 150u8, 29u8, - 138u8, 142u8, 38u8, 255u8, 216u8, 139u8, 93u8, 56u8, 148u8, 196u8, - 169u8, 168u8, 144u8, 193u8, 200u8, 187u8, 5u8, 141u8, 201u8, 254u8, - 248u8, - ], - ) - } - - #[doc = " Information concerning any given referendum."] + #[doc = "* `min_nominator_bond`: The minimum active bond needed to be a nominator."] + #[doc = "* `min_validator_bond`: The minimum active bond needed to be a validator."] + #[doc = "* `max_nominator_count`: The max number of users who can be a nominator at once. When"] + #[doc = " set to `None`, no limit is enforced."] + #[doc = "* `max_validator_count`: The max number of users who can be a validator at once. When"] + #[doc = " set to `None`, no limit is enforced."] + #[doc = "* `chill_threshold`: The ratio of `max_nominator_count` or `max_validator_count` which"] + #[doc = " should be filled in order for the `chill_other` transaction to work."] + #[doc = "* `min_commission`: The minimum amount of commission that each validators must maintain."] + #[doc = " This is checked only upon calling `validate`. Existing validators are not affected."] #[doc = ""] - #[doc = " TWOX-NOTE: SAFE as indexes are not under an attacker’s control."] - pub fn referendum_info_of_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_democracy::types::ReferendumInfo< - ::core::primitive::u32, - runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::da_runtime::RuntimeCall, - >, - ::core::primitive::u128, - >, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Democracy", - "ReferendumInfoOf", - Vec::new(), - [ - 167u8, 58u8, 230u8, 197u8, 185u8, 56u8, 181u8, 32u8, 81u8, 150u8, 29u8, - 138u8, 142u8, 38u8, 255u8, 216u8, 139u8, 93u8, 56u8, 148u8, 196u8, - 169u8, 168u8, 144u8, 193u8, 200u8, 187u8, 5u8, 141u8, 201u8, 254u8, - 248u8, - ], - ) - } - - #[doc = " All votes for a particular voter. We store the balance for the number of votes that we"] - #[doc = " have recorded. The second item is the total amount of delegations, that will be added."] + #[doc = "RuntimeOrigin must be Root to call this function."] #[doc = ""] - #[doc = " TWOX-NOTE: SAFE as `AccountId`s are crypto hashes anyway."] - pub fn voting_of( + #[doc = "NOTE: Existing nominators and validators will not be affected by this update."] + #[doc = "to kick people under the new limits, `chill_other` should be called."] + pub fn set_staking_configs( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_democracy::vote::Voting< - ::core::primitive::u128, - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + min_nominator_bond: runtime_types::pallet_staking::pallet::pallet::ConfigOp< + ::core::primitive::u128, >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Democracy", - "VotingOf", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], - [ - 125u8, 121u8, 167u8, 170u8, 18u8, 194u8, 183u8, 38u8, 176u8, 48u8, - 30u8, 88u8, 233u8, 196u8, 33u8, 119u8, 160u8, 201u8, 29u8, 183u8, 88u8, - 67u8, 219u8, 137u8, 6u8, 195u8, 11u8, 63u8, 162u8, 181u8, 82u8, 243u8, - ], - ) - } - - #[doc = " All votes for a particular voter. We store the balance for the number of votes that we"] - #[doc = " have recorded. The second item is the total amount of delegations, that will be added."] - #[doc = ""] - #[doc = " TWOX-NOTE: SAFE as `AccountId`s are crypto hashes anyway."] - pub fn voting_of_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_democracy::vote::Voting< - ::core::primitive::u128, - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + min_validator_bond: runtime_types::pallet_staking::pallet::pallet::ConfigOp< + ::core::primitive::u128, >, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Democracy", - "VotingOf", - Vec::new(), - [ - 125u8, 121u8, 167u8, 170u8, 18u8, 194u8, 183u8, 38u8, 176u8, 48u8, - 30u8, 88u8, 233u8, 196u8, 33u8, 119u8, 160u8, 201u8, 29u8, 183u8, 88u8, - 67u8, 219u8, 137u8, 6u8, 195u8, 11u8, 63u8, 162u8, 181u8, 82u8, 243u8, - ], - ) - } - - #[doc = " True if the last referendum tabled was submitted externally. False if it was a public"] - #[doc = " proposal."] - pub fn last_tabled_was_external( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::bool>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Democracy", - "LastTabledWasExternal", - vec![], + max_nominator_count: runtime_types::pallet_staking::pallet::pallet::ConfigOp< + ::core::primitive::u32, + >, + max_validator_count: runtime_types::pallet_staking::pallet::pallet::ConfigOp< + ::core::primitive::u32, + >, + chill_threshold: runtime_types::pallet_staking::pallet::pallet::ConfigOp< + runtime_types::sp_arithmetic::per_things::Percent, + >, + min_commission: runtime_types::pallet_staking::pallet::pallet::ConfigOp< + runtime_types::sp_arithmetic::per_things::Perbill, + >, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Staking", + "set_staking_configs", + types::SetStakingConfigs { + min_nominator_bond, + min_validator_bond, + max_nominator_count, + max_validator_count, + chill_threshold, + min_commission, + }, [ - 3u8, 67u8, 106u8, 1u8, 89u8, 204u8, 4u8, 145u8, 121u8, 44u8, 34u8, - 76u8, 18u8, 206u8, 65u8, 214u8, 222u8, 82u8, 31u8, 223u8, 144u8, 169u8, - 17u8, 6u8, 138u8, 36u8, 113u8, 155u8, 241u8, 106u8, 189u8, 218u8, + 198u8, 212u8, 176u8, 138u8, 79u8, 177u8, 241u8, 104u8, 72u8, 170u8, + 35u8, 178u8, 205u8, 167u8, 218u8, 118u8, 42u8, 226u8, 180u8, 17u8, + 112u8, 175u8, 55u8, 248u8, 64u8, 127u8, 51u8, 65u8, 132u8, 210u8, 88u8, + 213u8, ], ) } - #[doc = " The referendum to be tabled whenever it would be valid to table an external proposal."] - #[doc = " This happens when a referendum needs to be tabled and one of two conditions are met:"] - #[doc = " - `LastTabledWasExternal` is `false`; or"] - #[doc = " - `PublicProps` is empty."] - pub fn next_external( + #[doc = "Declare a `controller` to stop participating as either a validator or nominator."] + #[doc = ""] + #[doc = "Effects will be felt at the beginning of the next era."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_, but can be called by anyone."] + #[doc = ""] + #[doc = "If the caller is the same as the controller being targeted, then no further checks are"] + #[doc = "enforced, and this function behaves just like `chill`."] + #[doc = ""] + #[doc = "If the caller is different than the controller being targeted, the following conditions"] + #[doc = "must be met:"] + #[doc = ""] + #[doc = "* `controller` must belong to a nominator who has become non-decodable,"] + #[doc = ""] + #[doc = "Or:"] + #[doc = ""] + #[doc = "* A `ChillThreshold` must be set and checked which defines how close to the max"] + #[doc = " nominators or validators we must reach before users can start chilling one-another."] + #[doc = "* A `MaxNominatorCount` and `MaxValidatorCount` must be set which is used to determine"] + #[doc = " how close we are to the threshold."] + #[doc = "* A `MinNominatorBond` and `MinValidatorBond` must be set and checked, which determines"] + #[doc = " if this is a person that should be chilled because they have not met the threshold"] + #[doc = " bond required."] + #[doc = ""] + #[doc = "This can be helpful if bond requirements are updated, and we need to remove old users"] + #[doc = "who do not satisfy these requirements."] + pub fn chill_other( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<( - runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::da_runtime::RuntimeCall, - >, - runtime_types::pallet_democracy::vote_threshold::VoteThreshold, - )>, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Democracy", - "NextExternal", - vec![], + controller: ::subxt::utils::AccountId32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Staking", + "chill_other", + types::ChillOther { controller }, [ - 213u8, 36u8, 235u8, 75u8, 153u8, 33u8, 140u8, 121u8, 191u8, 197u8, - 17u8, 57u8, 234u8, 67u8, 81u8, 55u8, 123u8, 179u8, 207u8, 124u8, 238u8, - 147u8, 243u8, 126u8, 200u8, 2u8, 16u8, 143u8, 165u8, 143u8, 159u8, - 93u8, + 143u8, 82u8, 167u8, 43u8, 102u8, 136u8, 78u8, 139u8, 110u8, 159u8, + 235u8, 226u8, 237u8, 140u8, 142u8, 47u8, 77u8, 57u8, 209u8, 208u8, 9u8, + 193u8, 3u8, 77u8, 147u8, 41u8, 182u8, 122u8, 178u8, 185u8, 32u8, 182u8, ], ) } - #[doc = " A record of who vetoed what. Maps proposal hash to a possible existent block number"] - #[doc = " (until when it may not be resubmitted) and who vetoed it."] - pub fn blacklist( + #[doc = "Force a validator to have at least the minimum commission. This will not affect a"] + #[doc = "validator who already has a commission greater than or equal to the minimum. Any account"] + #[doc = "can call this."] + pub fn force_apply_min_commission( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<( - ::core::primitive::u32, - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::subxt::utils::AccountId32, - >, - )>, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Democracy", - "Blacklist", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Identity, - )], + validator_stash: ::subxt::utils::AccountId32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Staking", + "force_apply_min_commission", + types::ForceApplyMinCommission { validator_stash }, [ - 8u8, 227u8, 185u8, 179u8, 192u8, 92u8, 171u8, 125u8, 237u8, 224u8, - 109u8, 207u8, 44u8, 181u8, 78u8, 17u8, 254u8, 183u8, 199u8, 241u8, - 49u8, 90u8, 101u8, 168u8, 46u8, 89u8, 253u8, 155u8, 38u8, 183u8, 112u8, - 35u8, + 158u8, 27u8, 152u8, 23u8, 97u8, 53u8, 54u8, 49u8, 179u8, 236u8, 69u8, + 65u8, 253u8, 136u8, 232u8, 44u8, 207u8, 66u8, 5u8, 186u8, 49u8, 91u8, + 173u8, 5u8, 84u8, 45u8, 154u8, 91u8, 239u8, 97u8, 62u8, 42u8, ], ) } - #[doc = " A record of who vetoed what. Maps proposal hash to a possible existent block number"] - #[doc = " (until when it may not be resubmitted) and who vetoed it."] - pub fn blacklist_root( + #[doc = "Sets the minimum amount of commission that each validators must maintain."] + #[doc = ""] + #[doc = "This call has lower privilege requirements than `set_staking_config` and can be called"] + #[doc = "by the `T::AdminOrigin`. Root can always call this."] + pub fn set_min_commission( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<( - ::core::primitive::u32, - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::subxt::utils::AccountId32, - >, - )>, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Democracy", - "Blacklist", - Vec::new(), + new: runtime_types::sp_arithmetic::per_things::Perbill, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Staking", + "set_min_commission", + types::SetMinCommission { new }, [ - 8u8, 227u8, 185u8, 179u8, 192u8, 92u8, 171u8, 125u8, 237u8, 224u8, - 109u8, 207u8, 44u8, 181u8, 78u8, 17u8, 254u8, 183u8, 199u8, 241u8, - 49u8, 90u8, 101u8, 168u8, 46u8, 89u8, 253u8, 155u8, 38u8, 183u8, 112u8, - 35u8, - ], - ) - } - - #[doc = " Record of all proposals that have been subject to emergency cancellation."] - pub fn cancellations( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::bool>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Democracy", - "Cancellations", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Identity, - )], - [ - 154u8, 36u8, 172u8, 46u8, 65u8, 218u8, 30u8, 151u8, 173u8, 186u8, - 166u8, 79u8, 35u8, 226u8, 94u8, 200u8, 67u8, 44u8, 47u8, 7u8, 17u8, - 89u8, 169u8, 166u8, 236u8, 101u8, 68u8, 54u8, 114u8, 141u8, 177u8, - 135u8, - ], - ) - } - - #[doc = " Record of all proposals that have been subject to emergency cancellation."] - pub fn cancellations_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::bool>, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Democracy", - "Cancellations", - Vec::new(), - [ - 154u8, 36u8, 172u8, 46u8, 65u8, 218u8, 30u8, 151u8, 173u8, 186u8, - 166u8, 79u8, 35u8, 226u8, 94u8, 200u8, 67u8, 44u8, 47u8, 7u8, 17u8, - 89u8, 169u8, 166u8, 236u8, 101u8, 68u8, 54u8, 114u8, 141u8, 177u8, - 135u8, + 96u8, 168u8, 55u8, 79u8, 79u8, 49u8, 8u8, 127u8, 98u8, 158u8, 106u8, + 187u8, 177u8, 201u8, 68u8, 181u8, 219u8, 172u8, 63u8, 120u8, 172u8, + 173u8, 251u8, 167u8, 84u8, 165u8, 238u8, 115u8, 110u8, 97u8, 144u8, + 50u8, ], ) } } } - pub mod constants { + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub type Event = runtime_types::pallet_staking::pallet::pallet::Event; + pub mod events { use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " The period between a proposal being approved and enacted."] - #[doc = ""] - #[doc = " It should generally be a little more than the unstake period to ensure that"] - #[doc = " voting stakers have an opportunity to remove themselves from the system in the case"] - #[doc = " where they are on the losing side of a vote."] - pub fn enactment_period( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { - ::subxt::constants::StaticConstantAddress::new( - "Democracy", - "EnactmentPeriod", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, - ], - ) - } - - #[doc = " How often (in blocks) new public referenda are launched."] - pub fn launch_period( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { - ::subxt::constants::StaticConstantAddress::new("Democracy", "LaunchPeriod", [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, 125u8, - 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, 178u8, 197u8, - 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, 145u8, - ]) - } - - #[doc = " How often (in blocks) to check for new votes."] - pub fn voting_period( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { - ::subxt::constants::StaticConstantAddress::new("Democracy", "VotingPeriod", [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, 125u8, - 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, 178u8, 197u8, - 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, 145u8, - ]) - } - - #[doc = " The minimum period of vote locking."] - #[doc = ""] - #[doc = " It should be no shorter than enactment period to ensure that in the case of an approval,"] - #[doc = " those successful voters are locked into the consequences that their votes entail."] - pub fn vote_locking_period( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { - ::subxt::constants::StaticConstantAddress::new( - "Democracy", - "VoteLockingPeriod", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, - ], - ) - } - - #[doc = " The minimum amount to be used as a deposit for a public referendum proposal."] - pub fn minimum_deposit( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, - > { - ::subxt::constants::StaticConstantAddress::new("Democracy", "MinimumDeposit", [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, - 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, 136u8, - 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, - ]) - } - - #[doc = " Indicator for whether an emergency origin is even allowed to happen. Some chains may"] - #[doc = " want to set this permanently to `false`, others may want to condition it on things such"] - #[doc = " as an upgrade having happened recently."] - pub fn instant_allowed( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::bool>, - > { - ::subxt::constants::StaticConstantAddress::new("Democracy", "InstantAllowed", [ - 165u8, 28u8, 112u8, 190u8, 18u8, 129u8, 182u8, 206u8, 237u8, 1u8, 68u8, - 252u8, 125u8, 234u8, 185u8, 50u8, 149u8, 164u8, 47u8, 126u8, 134u8, 100u8, - 14u8, 86u8, 209u8, 39u8, 20u8, 4u8, 233u8, 115u8, 102u8, 131u8, - ]) - } - - #[doc = " Minimum voting period allowed for a fast-track referendum."] - pub fn fast_track_voting_period( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { - ::subxt::constants::StaticConstantAddress::new( - "Democracy", - "FastTrackVotingPeriod", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, - ], - ) - } - - #[doc = " Period in blocks where an external proposal may not be re-submitted after being vetoed."] - pub fn cooloff_period( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { - ::subxt::constants::StaticConstantAddress::new("Democracy", "CooloffPeriod", [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, 125u8, - 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, 178u8, 197u8, - 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, 145u8, - ]) - } - - #[doc = " The maximum number of votes for an account."] - #[doc = ""] - #[doc = " Also used to compute weight, an overly big value can"] - #[doc = " lead to extrinsic with very big weight: see `delegate` for instance."] - pub fn max_votes( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { - ::subxt::constants::StaticConstantAddress::new("Democracy", "MaxVotes", [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, 125u8, - 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, 178u8, 197u8, - 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, 145u8, - ]) - } - - #[doc = " The maximum number of public proposals that can exist at any time."] - pub fn max_proposals( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { - ::subxt::constants::StaticConstantAddress::new("Democracy", "MaxProposals", [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, 125u8, - 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, 178u8, 197u8, - 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, 145u8, - ]) - } - - #[doc = " The maximum number of deposits a public proposal may have at any time."] - pub fn max_deposits( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { - ::subxt::constants::StaticConstantAddress::new("Democracy", "MaxDeposits", [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, 125u8, - 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, 178u8, 197u8, - 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, 145u8, - ]) - } - - #[doc = " The maximum number of items which can be blacklisted."] - pub fn max_blacklisted( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { - ::subxt::constants::StaticConstantAddress::new("Democracy", "MaxBlacklisted", [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, 125u8, - 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, 178u8, 197u8, - 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, 145u8, - ]) - } - } - } - } - pub mod council { - use super::{root_mod, runtime_types}; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::{root_mod, runtime_types}; - type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - pub struct SetMembers { - pub new_members: ::std::vec::Vec<::subxt::utils::AccountId32>, - pub prime: ::core::option::Option<::subxt::utils::AccountId32>, - pub old_count: ::core::primitive::u32, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "The era payout has been set; the first balance is the validator-payout; the second is"] + #[doc = "the remainder from the maximum amount of reward."] + pub struct EraPaid { + pub era_index: ::core::primitive::u32, + pub validator_payout: ::core::primitive::u128, + pub remainder: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for EraPaid { + const EVENT: &'static str = "EraPaid"; + const PALLET: &'static str = "Staking"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - pub struct Execute { - pub proposal: ::std::boxed::Box, - #[codec(compact)] - pub length_bound: ::core::primitive::u32, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "The nominator has been rewarded by this amount."] + pub struct Rewarded { + pub stash: ::subxt::utils::AccountId32, + pub amount: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for Rewarded { + const EVENT: &'static str = "Rewarded"; + const PALLET: &'static str = "Staking"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - pub struct Propose { - #[codec(compact)] - pub threshold: ::core::primitive::u32, - pub proposal: ::std::boxed::Box, - #[codec(compact)] - pub length_bound: ::core::primitive::u32, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A staker (validator or nominator) has been slashed by the given amount."] + pub struct Slashed { + pub staker: ::subxt::utils::AccountId32, + pub amount: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for Slashed { + const EVENT: &'static str = "Slashed"; + const PALLET: &'static str = "Staking"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - pub struct Vote { - pub proposal: ::subxt::utils::H256, - #[codec(compact)] - pub index: ::core::primitive::u32, - pub approve: ::core::primitive::bool, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A slash for the given validator, for the given percentage of their stake, at the given"] + #[doc = "era as been reported."] + pub struct SlashReported { + pub validator: ::subxt::utils::AccountId32, + pub fraction: runtime_types::sp_arithmetic::per_things::Perbill, + pub slash_era: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for SlashReported { + const EVENT: &'static str = "SlashReported"; + const PALLET: &'static str = "Staking"; } #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - pub struct CloseOldWeight { - pub proposal_hash: ::subxt::utils::H256, - #[codec(compact)] - pub index: ::core::primitive::u32, - #[codec(compact)] - pub proposal_weight_bound: runtime_types::sp_weights::OldWeight, - #[codec(compact)] - pub length_bound: ::core::primitive::u32, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "An old slashing report from a prior era was discarded because it could"] + #[doc = "not be processed."] + pub struct OldSlashingReportDiscarded { + pub session_index: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for OldSlashingReportDiscarded { + const EVENT: &'static str = "OldSlashingReportDiscarded"; + const PALLET: &'static str = "Staking"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - pub struct DisapproveProposal { - pub proposal_hash: ::subxt::utils::H256, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A new set of stakers was elected."] + pub struct StakersElected; + impl ::subxt::events::StaticEvent for StakersElected { + const EVENT: &'static str = "StakersElected"; + const PALLET: &'static str = "Staking"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - pub struct Close { - pub proposal_hash: ::subxt::utils::H256, - #[codec(compact)] - pub index: ::core::primitive::u32, - pub proposal_weight_bound: runtime_types::sp_weights::weight_v2::Weight, - #[codec(compact)] - pub length_bound: ::core::primitive::u32, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "An account has bonded this amount. \\[stash, amount\\]"] + #[doc = ""] + #[doc = "NOTE: This event is only emitted when funds are bonded via a dispatchable. Notably,"] + #[doc = "it will not be emitted for staking rewards when they are added to stake."] + pub struct Bonded { + pub stash: ::subxt::utils::AccountId32, + pub amount: ::core::primitive::u128, } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Set the collective's membership."] - #[doc = ""] - #[doc = "- `new_members`: The new member list. Be nice to the chain and provide it sorted."] - #[doc = "- `prime`: The prime member whose vote sets the default."] - #[doc = "- `old_count`: The upper bound for the previous number of members in storage. Used for"] - #[doc = " weight estimation."] - #[doc = ""] - #[doc = "Requires root origin."] - #[doc = ""] - #[doc = "NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but"] - #[doc = " the weight estimations rely on it to estimate dispatchable weight."] - #[doc = ""] - #[doc = "# WARNING:"] - #[doc = ""] - #[doc = "The `pallet-collective` can also be managed by logic outside of the pallet through the"] - #[doc = "implementation of the trait [`ChangeMembers`]."] - #[doc = "Any call to `set_members` must be careful that the member set doesn't get out of sync"] - #[doc = "with other logic managing the member set."] - #[doc = ""] - #[doc = "# "] - #[doc = "## Weight"] - #[doc = "- `O(MP + N)` where:"] - #[doc = " - `M` old-members-count (code- and governance-bounded)"] - #[doc = " - `N` new-members-count (code- and governance-bounded)"] - #[doc = " - `P` proposals-count (code-bounded)"] - #[doc = "- DB:"] - #[doc = " - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the"] - #[doc = " members"] - #[doc = " - 1 storage read (codec `O(P)`) for reading the proposals"] - #[doc = " - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal"] - #[doc = " - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one"] - #[doc = "# "] - pub fn set_members( + impl ::subxt::events::StaticEvent for Bonded { + const EVENT: &'static str = "Bonded"; + const PALLET: &'static str = "Staking"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "An account has unbonded this amount."] + pub struct Unbonded { + pub stash: ::subxt::utils::AccountId32, + pub amount: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for Unbonded { + const EVENT: &'static str = "Unbonded"; + const PALLET: &'static str = "Staking"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "An account has called `withdraw_unbonded` and removed unbonding chunks worth `Balance`"] + #[doc = "from the unlocking queue."] + pub struct Withdrawn { + pub stash: ::subxt::utils::AccountId32, + pub amount: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for Withdrawn { + const EVENT: &'static str = "Withdrawn"; + const PALLET: &'static str = "Staking"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A nominator has been kicked from a validator."] + pub struct Kicked { + pub nominator: ::subxt::utils::AccountId32, + pub stash: ::subxt::utils::AccountId32, + } + impl ::subxt::events::StaticEvent for Kicked { + const EVENT: &'static str = "Kicked"; + const PALLET: &'static str = "Staking"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "The election failed. No new era is planned."] + pub struct StakingElectionFailed; + impl ::subxt::events::StaticEvent for StakingElectionFailed { + const EVENT: &'static str = "StakingElectionFailed"; + const PALLET: &'static str = "Staking"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "An account has stopped participating as either a validator or nominator."] + pub struct Chilled { + pub stash: ::subxt::utils::AccountId32, + } + impl ::subxt::events::StaticEvent for Chilled { + const EVENT: &'static str = "Chilled"; + const PALLET: &'static str = "Staking"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "The stakers' rewards are getting paid."] + pub struct PayoutStarted { + pub era_index: ::core::primitive::u32, + pub validator_stash: ::subxt::utils::AccountId32, + } + impl ::subxt::events::StaticEvent for PayoutStarted { + const EVENT: &'static str = "PayoutStarted"; + const PALLET: &'static str = "Staking"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A validator has set their preferences."] + pub struct ValidatorPrefsSet { + pub stash: ::subxt::utils::AccountId32, + pub prefs: runtime_types::pallet_staking::ValidatorPrefs, + } + impl ::subxt::events::StaticEvent for ValidatorPrefsSet { + const EVENT: &'static str = "ValidatorPrefsSet"; + const PALLET: &'static str = "Staking"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A new force era mode was set."] + pub struct ForceEra { + pub mode: runtime_types::pallet_staking::Forcing, + } + impl ::subxt::events::StaticEvent for ForceEra { + const EVENT: &'static str = "ForceEra"; + const PALLET: &'static str = "Staking"; + } + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " The ideal number of active validators."] + pub fn validator_count( &self, - new_members: ::std::vec::Vec<::subxt::utils::AccountId32>, - prime: ::core::option::Option<::subxt::utils::AccountId32>, - old_count: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Council", - "set_members", - SetMembers { - new_members, - prime, - old_count, - }, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "Staking", + "ValidatorCount", + vec![], [ - 196u8, 103u8, 123u8, 125u8, 226u8, 177u8, 126u8, 37u8, 160u8, 114u8, - 34u8, 136u8, 219u8, 84u8, 199u8, 94u8, 242u8, 20u8, 126u8, 126u8, - 166u8, 190u8, 198u8, 33u8, 162u8, 113u8, 237u8, 222u8, 90u8, 1u8, 2u8, - 234u8, + 105u8, 251u8, 193u8, 198u8, 232u8, 118u8, 73u8, 115u8, 205u8, 78u8, + 49u8, 253u8, 140u8, 193u8, 161u8, 205u8, 13u8, 147u8, 125u8, 102u8, + 142u8, 244u8, 210u8, 227u8, 225u8, 46u8, 144u8, 122u8, 254u8, 48u8, + 44u8, 169u8, ], ) } - #[doc = "Dispatch a proposal from a member using the `Member` origin."] - #[doc = ""] - #[doc = "Origin must be a member of the collective."] - #[doc = ""] - #[doc = "# "] - #[doc = "## Weight"] - #[doc = "- `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching"] - #[doc = " `proposal`"] - #[doc = "- DB: 1 read (codec `O(M)`) + DB access of `proposal`"] - #[doc = "- 1 event"] - #[doc = "# "] - pub fn execute( + #[doc = " Minimum number of staking participants before emergency conditions are imposed."] + pub fn minimum_validator_count( &self, - proposal: runtime_types::da_runtime::RuntimeCall, - length_bound: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Council", - "execute", - Execute { - proposal: ::std::boxed::Box::new(proposal), - length_bound, - }, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "Staking", + "MinimumValidatorCount", + vec![], [ - 107u8, 21u8, 245u8, 238u8, 132u8, 72u8, 227u8, 203u8, 39u8, 237u8, - 131u8, 121u8, 28u8, 94u8, 206u8, 83u8, 10u8, 131u8, 58u8, 105u8, 108u8, - 168u8, 209u8, 9u8, 125u8, 120u8, 243u8, 185u8, 167u8, 23u8, 37u8, - 177u8, + 103u8, 178u8, 29u8, 91u8, 90u8, 31u8, 49u8, 9u8, 11u8, 58u8, 178u8, + 30u8, 219u8, 55u8, 58u8, 181u8, 80u8, 155u8, 9u8, 11u8, 38u8, 46u8, + 125u8, 179u8, 220u8, 20u8, 212u8, 181u8, 136u8, 103u8, 58u8, 48u8, ], ) } - #[doc = "Add a new proposal to either be voted on or executed directly."] - #[doc = ""] - #[doc = "Requires the sender to be member."] - #[doc = ""] - #[doc = "`threshold` determines whether `proposal` is executed directly (`threshold < 2`)"] - #[doc = "or put up for voting."] - #[doc = ""] - #[doc = "# "] - #[doc = "## Weight"] - #[doc = "- `O(B + M + P1)` or `O(B + M + P2)` where:"] - #[doc = " - `B` is `proposal` size in bytes (length-fee-bounded)"] - #[doc = " - `M` is members-count (code- and governance-bounded)"] - #[doc = " - branching is influenced by `threshold` where:"] - #[doc = " - `P1` is proposal execution complexity (`threshold < 2`)"] - #[doc = " - `P2` is proposals-count (code-bounded) (`threshold >= 2`)"] - #[doc = "- DB:"] - #[doc = " - 1 storage read `is_member` (codec `O(M)`)"] - #[doc = " - 1 storage read `ProposalOf::contains_key` (codec `O(1)`)"] - #[doc = " - DB accesses influenced by `threshold`:"] - #[doc = " - EITHER storage accesses done by `proposal` (`threshold < 2`)"] - #[doc = " - OR proposal insertion (`threshold <= 2`)"] - #[doc = " - 1 storage mutation `Proposals` (codec `O(P2)`)"] - #[doc = " - 1 storage mutation `ProposalCount` (codec `O(1)`)"] - #[doc = " - 1 storage write `ProposalOf` (codec `O(B)`)"] - #[doc = " - 1 storage write `Voting` (codec `O(M)`)"] - #[doc = " - 1 event"] - #[doc = "# "] - pub fn propose( + #[doc = " Any validators that may never be slashed or forcibly kicked. It's a Vec since they're"] + #[doc = " easy to initialize and the performance hit is minimal (we expect no more than four"] + #[doc = " invulnerables) and restricted to testnets."] + pub fn invulnerables( &self, - threshold: ::core::primitive::u32, - proposal: runtime_types::da_runtime::RuntimeCall, - length_bound: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Council", - "propose", - Propose { - threshold, - proposal: ::std::boxed::Box::new(proposal), - length_bound, - }, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec<::subxt::utils::AccountId32>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "Staking", + "Invulnerables", + vec![], [ - 132u8, 171u8, 254u8, 170u8, 31u8, 101u8, 144u8, 111u8, 139u8, 13u8, - 150u8, 43u8, 142u8, 80u8, 63u8, 209u8, 191u8, 151u8, 78u8, 137u8, 5u8, - 187u8, 28u8, 139u8, 127u8, 133u8, 224u8, 168u8, 112u8, 186u8, 227u8, - 53u8, + 199u8, 35u8, 0u8, 229u8, 160u8, 128u8, 139u8, 245u8, 27u8, 133u8, 47u8, + 240u8, 86u8, 195u8, 90u8, 169u8, 158u8, 231u8, 128u8, 58u8, 24u8, + 173u8, 138u8, 122u8, 226u8, 104u8, 239u8, 114u8, 91u8, 165u8, 207u8, + 150u8, ], ) } - #[doc = "Add an aye or nay vote for the sender to the given proposal."] - #[doc = ""] - #[doc = "Requires the sender to be a member."] + #[doc = " Map from all locked \"stash\" accounts to the controller account."] #[doc = ""] - #[doc = "Transaction fees will be waived if the member is voting on any particular proposal"] - #[doc = "for the first time and the call is successful. Subsequent vote changes will charge a"] - #[doc = "fee."] - #[doc = "# "] - #[doc = "## Weight"] - #[doc = "- `O(M)` where `M` is members-count (code- and governance-bounded)"] - #[doc = "- DB:"] - #[doc = " - 1 storage read `Members` (codec `O(M)`)"] - #[doc = " - 1 storage mutation `Voting` (codec `O(M)`)"] - #[doc = "- 1 event"] - #[doc = "# "] - pub fn vote( + #[doc = " TWOX-NOTE: SAFE since `AccountId` is a secure hash."] + pub fn bonded( &self, - proposal: ::subxt::utils::H256, - index: ::core::primitive::u32, - approve: ::core::primitive::bool, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Council", - "vote", - Vote { - proposal, - index, - approve, - }, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::subxt::utils::AccountId32, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Staking", + "Bonded", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], [ - 108u8, 46u8, 180u8, 148u8, 145u8, 24u8, 173u8, 56u8, 36u8, 100u8, - 216u8, 43u8, 178u8, 202u8, 26u8, 136u8, 93u8, 84u8, 80u8, 134u8, 14u8, - 42u8, 248u8, 205u8, 68u8, 92u8, 79u8, 11u8, 113u8, 115u8, 157u8, 100u8, + 146u8, 230u8, 48u8, 190u8, 166u8, 127u8, 237u8, 216u8, 71u8, 33u8, + 108u8, 121u8, 204u8, 211u8, 133u8, 123u8, 52u8, 164u8, 201u8, 209u8, + 236u8, 35u8, 190u8, 77u8, 126u8, 150u8, 79u8, 244u8, 15u8, 247u8, + 161u8, 107u8, ], ) } - #[doc = "Close a vote that is either approved, disapproved or whose voting period has ended."] - #[doc = ""] - #[doc = "May be called by any signed account in order to finish voting and close the proposal."] - #[doc = ""] - #[doc = "If called before the end of the voting period it will only close the vote if it is"] - #[doc = "has enough votes to be approved or disapproved."] - #[doc = ""] - #[doc = "If called after the end of the voting period abstentions are counted as rejections"] - #[doc = "unless there is a prime member set and the prime member cast an approval."] - #[doc = ""] - #[doc = "If the close operation completes successfully with disapproval, the transaction fee will"] - #[doc = "be waived. Otherwise execution of the approved operation will be charged to the caller."] - #[doc = ""] - #[doc = "+ `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed"] - #[doc = "proposal."] - #[doc = "+ `length_bound`: The upper bound for the length of the proposal in storage. Checked via"] - #[doc = "`storage::read` so it is `size_of::() == 4` larger than the pure length."] + #[doc = " Map from all locked \"stash\" accounts to the controller account."] #[doc = ""] - #[doc = "# "] - #[doc = "## Weight"] - #[doc = "- `O(B + M + P1 + P2)` where:"] - #[doc = " - `B` is `proposal` size in bytes (length-fee-bounded)"] - #[doc = " - `M` is members-count (code- and governance-bounded)"] - #[doc = " - `P1` is the complexity of `proposal` preimage."] - #[doc = " - `P2` is proposal-count (code-bounded)"] - #[doc = "- DB:"] - #[doc = " - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`)"] - #[doc = " - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec"] - #[doc = " `O(P2)`)"] - #[doc = " - any mutations done while executing `proposal` (`P1`)"] - #[doc = "- up to 3 events"] - #[doc = "# "] - pub fn close_old_weight( + #[doc = " TWOX-NOTE: SAFE since `AccountId` is a secure hash."] + pub fn bonded_root( &self, - proposal_hash: ::subxt::utils::H256, - index: ::core::primitive::u32, - proposal_weight_bound: runtime_types::sp_weights::OldWeight, - length_bound: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Council", - "close_old_weight", - CloseOldWeight { - proposal_hash, - index, - proposal_weight_bound, - length_bound, - }, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::subxt::utils::AccountId32, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Staking", + "Bonded", + Vec::new(), [ - 133u8, 219u8, 90u8, 40u8, 102u8, 95u8, 4u8, 199u8, 45u8, 234u8, 109u8, - 17u8, 162u8, 63u8, 102u8, 186u8, 95u8, 182u8, 13u8, 123u8, 227u8, 20u8, - 186u8, 207u8, 12u8, 47u8, 87u8, 252u8, 244u8, 172u8, 60u8, 206u8, + 146u8, 230u8, 48u8, 190u8, 166u8, 127u8, 237u8, 216u8, 71u8, 33u8, + 108u8, 121u8, 204u8, 211u8, 133u8, 123u8, 52u8, 164u8, 201u8, 209u8, + 236u8, 35u8, 190u8, 77u8, 126u8, 150u8, 79u8, 244u8, 15u8, 247u8, + 161u8, 107u8, ], ) } - #[doc = "Disapprove a proposal, close, and remove it from the system, regardless of its current"] - #[doc = "state."] - #[doc = ""] - #[doc = "Must be called by the Root origin."] - #[doc = ""] - #[doc = "Parameters:"] - #[doc = "* `proposal_hash`: The hash of the proposal that should be disapproved."] - #[doc = ""] - #[doc = "# "] - #[doc = "Complexity: O(P) where P is the number of max proposals"] - #[doc = "DB Weight:"] - #[doc = "* Reads: Proposals"] - #[doc = "* Writes: Voting, Proposals, ProposalOf"] - #[doc = "# "] - pub fn disapprove_proposal( + #[doc = " The minimum active bond to become and maintain the role of a nominator."] + pub fn min_nominator_bond( &self, - proposal_hash: ::subxt::utils::H256, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Council", - "disapprove_proposal", - DisapproveProposal { proposal_hash }, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u128, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "Staking", + "MinNominatorBond", + vec![], [ - 25u8, 123u8, 1u8, 8u8, 74u8, 37u8, 3u8, 40u8, 97u8, 37u8, 175u8, 224u8, - 72u8, 155u8, 123u8, 109u8, 104u8, 43u8, 91u8, 125u8, 199u8, 51u8, 17u8, - 225u8, 133u8, 38u8, 120u8, 76u8, 164u8, 5u8, 194u8, 201u8, + 102u8, 115u8, 254u8, 15u8, 191u8, 228u8, 85u8, 249u8, 112u8, 190u8, + 129u8, 243u8, 236u8, 39u8, 195u8, 232u8, 10u8, 230u8, 11u8, 144u8, + 115u8, 1u8, 45u8, 70u8, 181u8, 161u8, 17u8, 92u8, 19u8, 70u8, 100u8, + 94u8, ], ) } - #[doc = "Close a vote that is either approved, disapproved or whose voting period has ended."] - #[doc = ""] - #[doc = "May be called by any signed account in order to finish voting and close the proposal."] - #[doc = ""] - #[doc = "If called before the end of the voting period it will only close the vote if it is"] - #[doc = "has enough votes to be approved or disapproved."] - #[doc = ""] - #[doc = "If called after the end of the voting period abstentions are counted as rejections"] - #[doc = "unless there is a prime member set and the prime member cast an approval."] - #[doc = ""] - #[doc = "If the close operation completes successfully with disapproval, the transaction fee will"] - #[doc = "be waived. Otherwise execution of the approved operation will be charged to the caller."] - #[doc = ""] - #[doc = "+ `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed"] - #[doc = "proposal."] - #[doc = "+ `length_bound`: The upper bound for the length of the proposal in storage. Checked via"] - #[doc = "`storage::read` so it is `size_of::() == 4` larger than the pure length."] + #[doc = " The minimum active bond to become and maintain the role of a validator."] + pub fn min_validator_bond( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u128, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "Staking", + "MinValidatorBond", + vec![], + [ + 146u8, 249u8, 26u8, 52u8, 224u8, 81u8, 85u8, 153u8, 118u8, 169u8, + 140u8, 37u8, 208u8, 242u8, 8u8, 29u8, 156u8, 73u8, 154u8, 162u8, 186u8, + 159u8, 119u8, 100u8, 109u8, 227u8, 6u8, 139u8, 155u8, 203u8, 167u8, + 244u8, + ], + ) + } + + #[doc = " The minimum active nominator stake of the last successful election."] + pub fn minimum_active_stake( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u128, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "Staking", + "MinimumActiveStake", + vec![], + [ + 166u8, 211u8, 59u8, 23u8, 2u8, 160u8, 244u8, 52u8, 153u8, 12u8, 103u8, + 113u8, 51u8, 232u8, 145u8, 188u8, 54u8, 67u8, 227u8, 221u8, 186u8, 6u8, + 28u8, 63u8, 146u8, 212u8, 233u8, 173u8, 134u8, 41u8, 169u8, 153u8, + ], + ) + } + + #[doc = " The minimum amount of commission that validators can set."] #[doc = ""] - #[doc = "# "] - #[doc = "## Weight"] - #[doc = "- `O(B + M + P1 + P2)` where:"] - #[doc = " - `B` is `proposal` size in bytes (length-fee-bounded)"] - #[doc = " - `M` is members-count (code- and governance-bounded)"] - #[doc = " - `P1` is the complexity of `proposal` preimage."] - #[doc = " - `P2` is proposal-count (code-bounded)"] - #[doc = "- DB:"] - #[doc = " - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`)"] - #[doc = " - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec"] - #[doc = " `O(P2)`)"] - #[doc = " - any mutations done while executing `proposal` (`P1`)"] - #[doc = "- up to 3 events"] - #[doc = "# "] - pub fn close( + #[doc = " If set to `0`, no limit exists."] + pub fn min_commission( &self, - proposal_hash: ::subxt::utils::H256, - index: ::core::primitive::u32, - proposal_weight_bound: runtime_types::sp_weights::weight_v2::Weight, - length_bound: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Council", - "close", - Close { - proposal_hash, - index, - proposal_weight_bound, - length_bound, - }, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::sp_arithmetic::per_things::Perbill, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "Staking", + "MinCommission", + vec![], [ - 191u8, 138u8, 89u8, 247u8, 97u8, 51u8, 45u8, 193u8, 76u8, 16u8, 80u8, - 225u8, 197u8, 83u8, 204u8, 133u8, 169u8, 16u8, 86u8, 32u8, 125u8, 16u8, - 116u8, 185u8, 45u8, 20u8, 76u8, 148u8, 206u8, 163u8, 154u8, 30u8, + 220u8, 197u8, 232u8, 212u8, 205u8, 242u8, 121u8, 165u8, 255u8, 199u8, + 122u8, 20u8, 145u8, 245u8, 175u8, 26u8, 45u8, 70u8, 207u8, 26u8, 112u8, + 234u8, 181u8, 167u8, 140u8, 75u8, 15u8, 1u8, 221u8, 168u8, 17u8, 211u8, ], ) } - } - } - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::pallet_collective::pallet::Event; - pub mod events { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "A motion (given hash) has been proposed (by given account) with a threshold (given"] - #[doc = "`MemberCount`)."] - pub struct Proposed { - pub account: ::subxt::utils::AccountId32, - pub proposal_index: ::core::primitive::u32, - pub proposal_hash: ::subxt::utils::H256, - pub threshold: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for Proposed { - const EVENT: &'static str = "Proposed"; - const PALLET: &'static str = "Council"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "A motion (given hash) has been voted on by given account, leaving"] - #[doc = "a tally (yes votes and no votes given respectively as `MemberCount`)."] - pub struct Voted { - pub account: ::subxt::utils::AccountId32, - pub proposal_hash: ::subxt::utils::H256, - pub voted: ::core::primitive::bool, - pub yes: ::core::primitive::u32, - pub no: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for Voted { - const EVENT: &'static str = "Voted"; - const PALLET: &'static str = "Council"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "A motion was approved by the required threshold."] - pub struct Approved { - pub proposal_hash: ::subxt::utils::H256, - } - impl ::subxt::events::StaticEvent for Approved { - const EVENT: &'static str = "Approved"; - const PALLET: &'static str = "Council"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "A motion was not approved by the required threshold."] - pub struct Disapproved { - pub proposal_hash: ::subxt::utils::H256, - } - impl ::subxt::events::StaticEvent for Disapproved { - const EVENT: &'static str = "Disapproved"; - const PALLET: &'static str = "Council"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "A motion was executed; result will be `Ok` if it returned without error."] - pub struct Executed { - pub proposal_hash: ::subxt::utils::H256, - pub result: ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - } - impl ::subxt::events::StaticEvent for Executed { - const EVENT: &'static str = "Executed"; - const PALLET: &'static str = "Council"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "A single member did some action; result will be `Ok` if it returned without error."] - pub struct MemberExecuted { - pub proposal_hash: ::subxt::utils::H256, - pub result: ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - } - impl ::subxt::events::StaticEvent for MemberExecuted { - const EVENT: &'static str = "MemberExecuted"; - const PALLET: &'static str = "Council"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "A proposal was closed because its threshold was reached or after its duration was up."] - pub struct Closed { - pub proposal_hash: ::subxt::utils::H256, - pub yes: ::core::primitive::u32, - pub no: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for Closed { - const EVENT: &'static str = "Closed"; - const PALLET: &'static str = "Council"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " The hashes of the active proposals."] - pub fn proposals( + + #[doc = " Map from all (unlocked) \"controller\" accounts to the info regarding the staking."] + pub fn ledger( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::subxt::utils::H256, - >, - >, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_staking::StakingLedger, ::subxt::storage::address::Yes, + (), ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Staking", + "Ledger", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], + [ + 77u8, 39u8, 230u8, 122u8, 108u8, 191u8, 251u8, 28u8, 233u8, 225u8, + 195u8, 224u8, 234u8, 90u8, 173u8, 170u8, 143u8, 246u8, 246u8, 21u8, + 38u8, 187u8, 112u8, 111u8, 206u8, 181u8, 183u8, 186u8, 96u8, 8u8, + 225u8, 224u8, + ], + ) + } + + #[doc = " Map from all (unlocked) \"controller\" accounts to the info regarding the staking."] + pub fn ledger_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_staking::StakingLedger, (), + (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Council", - "Proposals", - vec![], + ::subxt::storage::address::Address::new_static( + "Staking", + "Ledger", + Vec::new(), [ - 10u8, 133u8, 82u8, 54u8, 193u8, 41u8, 253u8, 159u8, 56u8, 96u8, 249u8, - 148u8, 43u8, 57u8, 116u8, 43u8, 222u8, 243u8, 237u8, 231u8, 238u8, - 60u8, 26u8, 225u8, 19u8, 203u8, 213u8, 220u8, 114u8, 217u8, 100u8, - 27u8, + 77u8, 39u8, 230u8, 122u8, 108u8, 191u8, 251u8, 28u8, 233u8, 225u8, + 195u8, 224u8, 234u8, 90u8, 173u8, 170u8, 143u8, 246u8, 246u8, 21u8, + 38u8, 187u8, 112u8, 111u8, 206u8, 181u8, 183u8, 186u8, 96u8, 8u8, + 225u8, 224u8, ], ) } - #[doc = " Actual proposal for a given hash, if it's current."] - pub fn proposal_of( + #[doc = " Where the reward payment should be made. Keyed by stash."] + #[doc = ""] + #[doc = " TWOX-NOTE: SAFE since `AccountId` is a secure hash."] + pub fn payee( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_staking::RewardDestination<::subxt::utils::AccountId32>, + ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, - (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Council", - "ProposalOf", - vec![::subxt::storage::address::StorageMapKey::new( + ::subxt::storage::address::Address::new_static( + "Staking", + "Payee", + vec![::subxt::storage::address::make_static_storage_map_key( _0.borrow(), - ::subxt::storage::address::StorageHasher::Identity, )], [ - 162u8, 9u8, 234u8, 5u8, 146u8, 108u8, 153u8, 10u8, 7u8, 55u8, 60u8, - 97u8, 62u8, 235u8, 39u8, 37u8, 2u8, 168u8, 48u8, 71u8, 221u8, 224u8, - 243u8, 192u8, 147u8, 57u8, 219u8, 157u8, 35u8, 78u8, 119u8, 39u8, + 198u8, 238u8, 10u8, 104u8, 204u8, 7u8, 193u8, 254u8, 169u8, 18u8, + 187u8, 212u8, 90u8, 243u8, 73u8, 29u8, 216u8, 144u8, 93u8, 140u8, 11u8, + 124u8, 4u8, 191u8, 107u8, 61u8, 15u8, 152u8, 70u8, 82u8, 60u8, 75u8, ], ) } - #[doc = " Actual proposal for a given hash, if it's current."] - pub fn proposal_of_root( + #[doc = " Where the reward payment should be made. Keyed by stash."] + #[doc = ""] + #[doc = " TWOX-NOTE: SAFE since `AccountId` is a secure hash."] + pub fn payee_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType, - (), + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_staking::RewardDestination<::subxt::utils::AccountId32>, (), ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Council", - "ProposalOf", + ::subxt::storage::address::Address::new_static( + "Staking", + "Payee", Vec::new(), [ - 162u8, 9u8, 234u8, 5u8, 146u8, 108u8, 153u8, 10u8, 7u8, 55u8, 60u8, - 97u8, 62u8, 235u8, 39u8, 37u8, 2u8, 168u8, 48u8, 71u8, 221u8, 224u8, - 243u8, 192u8, 147u8, 57u8, 219u8, 157u8, 35u8, 78u8, 119u8, 39u8, + 198u8, 238u8, 10u8, 104u8, 204u8, 7u8, 193u8, 254u8, 169u8, 18u8, + 187u8, 212u8, 90u8, 243u8, 73u8, 29u8, 216u8, 144u8, 93u8, 140u8, 11u8, + 124u8, 4u8, 191u8, 107u8, 61u8, 15u8, 152u8, 70u8, 82u8, 60u8, 75u8, ], ) } - #[doc = " Votes on a given proposal, if it is ongoing."] - pub fn voting( + #[doc = " The map from (wannabe) validator stash key to the preferences of that validator."] + #[doc = ""] + #[doc = " TWOX-NOTE: SAFE since `AccountId` is a secure hash."] + pub fn validators( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_collective::Votes< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - >, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_staking::ValidatorPrefs, + ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, - (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Council", - "Voting", - vec![::subxt::storage::address::StorageMapKey::new( + ::subxt::storage::address::Address::new_static( + "Staking", + "Validators", + vec![::subxt::storage::address::make_static_storage_map_key( _0.borrow(), - ::subxt::storage::address::StorageHasher::Identity, )], [ - 89u8, 108u8, 65u8, 58u8, 60u8, 116u8, 54u8, 68u8, 179u8, 73u8, 161u8, - 168u8, 78u8, 213u8, 208u8, 54u8, 244u8, 58u8, 70u8, 209u8, 170u8, - 136u8, 215u8, 3u8, 2u8, 105u8, 229u8, 217u8, 240u8, 230u8, 107u8, - 221u8, + 149u8, 207u8, 68u8, 38u8, 24u8, 220u8, 207u8, 84u8, 236u8, 33u8, 210u8, + 124u8, 200u8, 99u8, 98u8, 29u8, 235u8, 46u8, 124u8, 4u8, 203u8, 6u8, + 209u8, 21u8, 124u8, 236u8, 112u8, 118u8, 180u8, 85u8, 78u8, 13u8, ], ) } - #[doc = " Votes on a given proposal, if it is ongoing."] - pub fn voting_root( + #[doc = " The map from (wannabe) validator stash key to the preferences of that validator."] + #[doc = ""] + #[doc = " TWOX-NOTE: SAFE since `AccountId` is a secure hash."] + pub fn validators_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_collective::Votes< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - >, - (), + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_staking::ValidatorPrefs, (), ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Council", - "Voting", + ::subxt::storage::address::Address::new_static( + "Staking", + "Validators", Vec::new(), [ - 89u8, 108u8, 65u8, 58u8, 60u8, 116u8, 54u8, 68u8, 179u8, 73u8, 161u8, - 168u8, 78u8, 213u8, 208u8, 54u8, 244u8, 58u8, 70u8, 209u8, 170u8, - 136u8, 215u8, 3u8, 2u8, 105u8, 229u8, 217u8, 240u8, 230u8, 107u8, - 221u8, + 149u8, 207u8, 68u8, 38u8, 24u8, 220u8, 207u8, 84u8, 236u8, 33u8, 210u8, + 124u8, 200u8, 99u8, 98u8, 29u8, 235u8, 46u8, 124u8, 4u8, 203u8, 6u8, + 209u8, 21u8, 124u8, 236u8, 112u8, 118u8, 180u8, 85u8, 78u8, 13u8, ], ) } - #[doc = " Proposals so far."] - pub fn proposal_count( + #[doc = "Counter for the related counted storage map"] + pub fn counter_for_validators( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), > { - ::subxt::storage::address::StaticStorageAddress::new( - "Council", - "ProposalCount", + ::subxt::storage::address::Address::new_static( + "Staking", + "CounterForValidators", vec![], [ - 132u8, 145u8, 78u8, 218u8, 51u8, 189u8, 55u8, 172u8, 143u8, 33u8, - 140u8, 99u8, 124u8, 208u8, 57u8, 232u8, 154u8, 110u8, 32u8, 142u8, - 24u8, 149u8, 109u8, 105u8, 30u8, 83u8, 39u8, 177u8, 127u8, 160u8, 34u8, - 70u8, + 169u8, 146u8, 194u8, 114u8, 57u8, 232u8, 137u8, 93u8, 214u8, 98u8, + 176u8, 151u8, 237u8, 165u8, 176u8, 252u8, 73u8, 124u8, 22u8, 166u8, + 225u8, 217u8, 65u8, 56u8, 174u8, 12u8, 32u8, 2u8, 7u8, 173u8, 125u8, + 235u8, ], ) } - #[doc = " The current members of the collective. This is stored sorted (just by value)."] - pub fn members( + #[doc = " The maximum validator count before we stop allowing new validators to join."] + #[doc = ""] + #[doc = " When this value is not set, no limits are enforced."] + pub fn max_validators_count( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec<::subxt::utils::AccountId32>, - >, - ::subxt::storage::address::Yes, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, ::subxt::storage::address::Yes, (), + (), > { - ::subxt::storage::address::StaticStorageAddress::new( - "Council", - "Members", + ::subxt::storage::address::Address::new_static( + "Staking", + "MaxValidatorsCount", vec![], [ - 162u8, 72u8, 174u8, 204u8, 140u8, 105u8, 205u8, 176u8, 197u8, 117u8, - 206u8, 134u8, 157u8, 110u8, 139u8, 54u8, 43u8, 233u8, 25u8, 51u8, 36u8, - 238u8, 94u8, 124u8, 221u8, 52u8, 237u8, 71u8, 125u8, 56u8, 129u8, - 222u8, + 139u8, 116u8, 236u8, 217u8, 110u8, 47u8, 140u8, 197u8, 184u8, 246u8, + 180u8, 188u8, 233u8, 99u8, 102u8, 21u8, 114u8, 23u8, 143u8, 163u8, + 224u8, 250u8, 248u8, 185u8, 235u8, 94u8, 110u8, 83u8, 170u8, 123u8, + 113u8, 168u8, ], ) } - #[doc = " The prime member that helps determine the default vote behavior in case of absentations."] - pub fn prime( + #[doc = " The map from nominator stash key to their nomination preferences, namely the validators that"] + #[doc = " they wish to support."] + #[doc = ""] + #[doc = " Note that the keys of this storage map might become non-decodable in case the"] + #[doc = " [`Config::MaxNominations`] configuration is decreased. In this rare case, these nominators"] + #[doc = " are still existent in storage, their key is correct and retrievable (i.e. `contains_key`"] + #[doc = " indicates that they exist), but their value cannot be decoded. Therefore, the non-decodable"] + #[doc = " nominators will effectively not-exist, until they re-submit their preferences such that it"] + #[doc = " is within the bounds of the newly set `Config::MaxNominations`."] + #[doc = ""] + #[doc = " This implies that `::iter_keys().count()` and `::iter().count()` might return different"] + #[doc = " values for this map. Moreover, the main `::count()` is aligned with the former, namely the"] + #[doc = " number of keys that exist."] + #[doc = ""] + #[doc = " Lastly, if any of the nominators become non-decodable, they can be chilled immediately via"] + #[doc = " [`Call::chill_other`] dispatchable by anyone."] + #[doc = ""] + #[doc = " TWOX-NOTE: SAFE since `AccountId` is a secure hash."] + pub fn nominators( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::subxt::utils::AccountId32>, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_staking::Nominations, ::subxt::storage::address::Yes, (), - (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Council", - "Prime", - vec![], + ::subxt::storage::address::Address::new_static( + "Staking", + "Nominators", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], [ - 108u8, 118u8, 54u8, 193u8, 207u8, 227u8, 119u8, 97u8, 23u8, 239u8, - 157u8, 69u8, 56u8, 142u8, 106u8, 17u8, 215u8, 159u8, 48u8, 42u8, 185u8, - 209u8, 49u8, 159u8, 32u8, 168u8, 111u8, 158u8, 159u8, 217u8, 244u8, - 158u8, + 114u8, 45u8, 86u8, 23u8, 12u8, 98u8, 114u8, 3u8, 170u8, 11u8, 100u8, + 17u8, 122u8, 158u8, 192u8, 21u8, 160u8, 87u8, 85u8, 142u8, 241u8, + 232u8, 25u8, 6u8, 36u8, 85u8, 155u8, 79u8, 124u8, 173u8, 0u8, 252u8, ], ) } - } - } - } - pub mod technical_committee { - use super::{root_mod, runtime_types}; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::{root_mod, runtime_types}; - type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct SetMembers { - pub new_members: ::std::vec::Vec<::subxt::utils::AccountId32>, - pub prime: ::core::option::Option<::subxt::utils::AccountId32>, - pub old_count: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Execute { - pub proposal: ::std::boxed::Box, - #[codec(compact)] - pub length_bound: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Propose { - #[codec(compact)] - pub threshold: ::core::primitive::u32, - pub proposal: ::std::boxed::Box, - #[codec(compact)] - pub length_bound: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Vote { - pub proposal: ::subxt::utils::H256, - #[codec(compact)] - pub index: ::core::primitive::u32, - pub approve: ::core::primitive::bool, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct CloseOldWeight { - pub proposal_hash: ::subxt::utils::H256, - #[codec(compact)] - pub index: ::core::primitive::u32, - #[codec(compact)] - pub proposal_weight_bound: runtime_types::sp_weights::OldWeight, - #[codec(compact)] - pub length_bound: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct DisapproveProposal { - pub proposal_hash: ::subxt::utils::H256, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Close { - pub proposal_hash: ::subxt::utils::H256, - #[codec(compact)] - pub index: ::core::primitive::u32, - pub proposal_weight_bound: runtime_types::sp_weights::weight_v2::Weight, - #[codec(compact)] - pub length_bound: ::core::primitive::u32, - } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Set the collective's membership."] - #[doc = ""] - #[doc = "- `new_members`: The new member list. Be nice to the chain and provide it sorted."] - #[doc = "- `prime`: The prime member whose vote sets the default."] - #[doc = "- `old_count`: The upper bound for the previous number of members in storage. Used for"] - #[doc = " weight estimation."] - #[doc = ""] - #[doc = "Requires root origin."] + + #[doc = " The map from nominator stash key to their nomination preferences, namely the validators that"] + #[doc = " they wish to support."] #[doc = ""] - #[doc = "NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but"] - #[doc = " the weight estimations rely on it to estimate dispatchable weight."] + #[doc = " Note that the keys of this storage map might become non-decodable in case the"] + #[doc = " [`Config::MaxNominations`] configuration is decreased. In this rare case, these nominators"] + #[doc = " are still existent in storage, their key is correct and retrievable (i.e. `contains_key`"] + #[doc = " indicates that they exist), but their value cannot be decoded. Therefore, the non-decodable"] + #[doc = " nominators will effectively not-exist, until they re-submit their preferences such that it"] + #[doc = " is within the bounds of the newly set `Config::MaxNominations`."] #[doc = ""] - #[doc = "# WARNING:"] + #[doc = " This implies that `::iter_keys().count()` and `::iter().count()` might return different"] + #[doc = " values for this map. Moreover, the main `::count()` is aligned with the former, namely the"] + #[doc = " number of keys that exist."] #[doc = ""] - #[doc = "The `pallet-collective` can also be managed by logic outside of the pallet through the"] - #[doc = "implementation of the trait [`ChangeMembers`]."] - #[doc = "Any call to `set_members` must be careful that the member set doesn't get out of sync"] - #[doc = "with other logic managing the member set."] + #[doc = " Lastly, if any of the nominators become non-decodable, they can be chilled immediately via"] + #[doc = " [`Call::chill_other`] dispatchable by anyone."] #[doc = ""] - #[doc = "# "] - #[doc = "## Weight"] - #[doc = "- `O(MP + N)` where:"] - #[doc = " - `M` old-members-count (code- and governance-bounded)"] - #[doc = " - `N` new-members-count (code- and governance-bounded)"] - #[doc = " - `P` proposals-count (code-bounded)"] - #[doc = "- DB:"] - #[doc = " - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the"] - #[doc = " members"] - #[doc = " - 1 storage read (codec `O(P)`) for reading the proposals"] - #[doc = " - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal"] - #[doc = " - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one"] - #[doc = "# "] - pub fn set_members( + #[doc = " TWOX-NOTE: SAFE since `AccountId` is a secure hash."] + pub fn nominators_root( &self, - new_members: ::std::vec::Vec<::subxt::utils::AccountId32>, - prime: ::core::option::Option<::subxt::utils::AccountId32>, - old_count: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "TechnicalCommittee", - "set_members", - SetMembers { - new_members, - prime, - old_count, - }, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_staking::Nominations, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Staking", + "Nominators", + Vec::new(), [ - 196u8, 103u8, 123u8, 125u8, 226u8, 177u8, 126u8, 37u8, 160u8, 114u8, - 34u8, 136u8, 219u8, 84u8, 199u8, 94u8, 242u8, 20u8, 126u8, 126u8, - 166u8, 190u8, 198u8, 33u8, 162u8, 113u8, 237u8, 222u8, 90u8, 1u8, 2u8, - 234u8, + 114u8, 45u8, 86u8, 23u8, 12u8, 98u8, 114u8, 3u8, 170u8, 11u8, 100u8, + 17u8, 122u8, 158u8, 192u8, 21u8, 160u8, 87u8, 85u8, 142u8, 241u8, + 232u8, 25u8, 6u8, 36u8, 85u8, 155u8, 79u8, 124u8, 173u8, 0u8, 252u8, ], ) } - #[doc = "Dispatch a proposal from a member using the `Member` origin."] - #[doc = ""] - #[doc = "Origin must be a member of the collective."] - #[doc = ""] - #[doc = "# "] - #[doc = "## Weight"] - #[doc = "- `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching"] - #[doc = " `proposal`"] - #[doc = "- DB: 1 read (codec `O(M)`) + DB access of `proposal`"] - #[doc = "- 1 event"] - #[doc = "# "] - pub fn execute( + #[doc = "Counter for the related counted storage map"] + pub fn counter_for_nominators( &self, - proposal: runtime_types::da_runtime::RuntimeCall, - length_bound: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "TechnicalCommittee", - "execute", - Execute { - proposal: ::std::boxed::Box::new(proposal), - length_bound, - }, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "Staking", + "CounterForNominators", + vec![], [ - 107u8, 21u8, 245u8, 238u8, 132u8, 72u8, 227u8, 203u8, 39u8, 237u8, - 131u8, 121u8, 28u8, 94u8, 206u8, 83u8, 10u8, 131u8, 58u8, 105u8, 108u8, - 168u8, 209u8, 9u8, 125u8, 120u8, 243u8, 185u8, 167u8, 23u8, 37u8, - 177u8, + 150u8, 236u8, 184u8, 12u8, 224u8, 26u8, 13u8, 204u8, 208u8, 178u8, + 68u8, 148u8, 232u8, 85u8, 74u8, 248u8, 167u8, 61u8, 88u8, 126u8, 40u8, + 20u8, 73u8, 47u8, 94u8, 57u8, 144u8, 77u8, 156u8, 179u8, 55u8, 49u8, ], ) } - #[doc = "Add a new proposal to either be voted on or executed directly."] - #[doc = ""] - #[doc = "Requires the sender to be member."] - #[doc = ""] - #[doc = "`threshold` determines whether `proposal` is executed directly (`threshold < 2`)"] - #[doc = "or put up for voting."] + #[doc = " The maximum nominator count before we stop allowing new validators to join."] #[doc = ""] - #[doc = "# "] - #[doc = "## Weight"] - #[doc = "- `O(B + M + P1)` or `O(B + M + P2)` where:"] - #[doc = " - `B` is `proposal` size in bytes (length-fee-bounded)"] - #[doc = " - `M` is members-count (code- and governance-bounded)"] - #[doc = " - branching is influenced by `threshold` where:"] - #[doc = " - `P1` is proposal execution complexity (`threshold < 2`)"] - #[doc = " - `P2` is proposals-count (code-bounded) (`threshold >= 2`)"] - #[doc = "- DB:"] - #[doc = " - 1 storage read `is_member` (codec `O(M)`)"] - #[doc = " - 1 storage read `ProposalOf::contains_key` (codec `O(1)`)"] - #[doc = " - DB accesses influenced by `threshold`:"] - #[doc = " - EITHER storage accesses done by `proposal` (`threshold < 2`)"] - #[doc = " - OR proposal insertion (`threshold <= 2`)"] - #[doc = " - 1 storage mutation `Proposals` (codec `O(P2)`)"] - #[doc = " - 1 storage mutation `ProposalCount` (codec `O(1)`)"] - #[doc = " - 1 storage write `ProposalOf` (codec `O(B)`)"] - #[doc = " - 1 storage write `Voting` (codec `O(M)`)"] - #[doc = " - 1 event"] - #[doc = "# "] - pub fn propose( + #[doc = " When this value is not set, no limits are enforced."] + pub fn max_nominators_count( &self, - threshold: ::core::primitive::u32, - proposal: runtime_types::da_runtime::RuntimeCall, - length_bound: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "TechnicalCommittee", - "propose", - Propose { - threshold, - proposal: ::std::boxed::Box::new(proposal), - length_bound, - }, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + ::subxt::storage::address::Yes, + (), + (), + > { + ::subxt::storage::address::Address::new_static( + "Staking", + "MaxNominatorsCount", + vec![], [ - 132u8, 171u8, 254u8, 170u8, 31u8, 101u8, 144u8, 111u8, 139u8, 13u8, - 150u8, 43u8, 142u8, 80u8, 63u8, 209u8, 191u8, 151u8, 78u8, 137u8, 5u8, - 187u8, 28u8, 139u8, 127u8, 133u8, 224u8, 168u8, 112u8, 186u8, 227u8, - 53u8, + 11u8, 234u8, 179u8, 254u8, 95u8, 119u8, 35u8, 255u8, 141u8, 95u8, + 148u8, 209u8, 43u8, 202u8, 19u8, 57u8, 185u8, 50u8, 152u8, 192u8, 95u8, + 13u8, 158u8, 245u8, 113u8, 199u8, 255u8, 187u8, 37u8, 44u8, 8u8, 119u8, ], ) } - #[doc = "Add an aye or nay vote for the sender to the given proposal."] - #[doc = ""] - #[doc = "Requires the sender to be a member."] + #[doc = " The current era index."] #[doc = ""] - #[doc = "Transaction fees will be waived if the member is voting on any particular proposal"] - #[doc = "for the first time and the call is successful. Subsequent vote changes will charge a"] - #[doc = "fee."] - #[doc = "# "] - #[doc = "## Weight"] - #[doc = "- `O(M)` where `M` is members-count (code- and governance-bounded)"] - #[doc = "- DB:"] - #[doc = " - 1 storage read `Members` (codec `O(M)`)"] - #[doc = " - 1 storage mutation `Voting` (codec `O(M)`)"] - #[doc = "- 1 event"] - #[doc = "# "] - pub fn vote( + #[doc = " This is the latest planned era, depending on how the Session pallet queues the validator"] + #[doc = " set, it might be active or not."] + pub fn current_era( &self, - proposal: ::subxt::utils::H256, - index: ::core::primitive::u32, - approve: ::core::primitive::bool, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "TechnicalCommittee", - "vote", - Vote { - proposal, - index, - approve, - }, - [ - 108u8, 46u8, 180u8, 148u8, 145u8, 24u8, 173u8, 56u8, 36u8, 100u8, - 216u8, 43u8, 178u8, 202u8, 26u8, 136u8, 93u8, 84u8, 80u8, 134u8, 14u8, - 42u8, 248u8, 205u8, 68u8, 92u8, 79u8, 11u8, 113u8, 115u8, 157u8, 100u8, - ], - ) - } - - #[doc = "Close a vote that is either approved, disapproved or whose voting period has ended."] - #[doc = ""] - #[doc = "May be called by any signed account in order to finish voting and close the proposal."] + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + ::subxt::storage::address::Yes, + (), + (), + > { + ::subxt::storage::address::Address::new_static( + "Staking", + "CurrentEra", + vec![], + [ + 247u8, 239u8, 171u8, 18u8, 137u8, 240u8, 213u8, 3u8, 173u8, 173u8, + 236u8, 141u8, 202u8, 191u8, 228u8, 120u8, 196u8, 188u8, 13u8, 66u8, + 253u8, 117u8, 90u8, 8u8, 158u8, 11u8, 236u8, 141u8, 178u8, 44u8, 119u8, + 25u8, + ], + ) + } + + #[doc = " The active era information, it holds index and start."] #[doc = ""] - #[doc = "If called before the end of the voting period it will only close the vote if it is"] - #[doc = "has enough votes to be approved or disapproved."] + #[doc = " The active era is the era being currently rewarded. Validator set of this era must be"] + #[doc = " equal to [`SessionInterface::validators`]."] + pub fn active_era( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_staking::ActiveEraInfo, + ::subxt::storage::address::Yes, + (), + (), + > { + ::subxt::storage::address::Address::new_static( + "Staking", + "ActiveEra", + vec![], + [ + 24u8, 229u8, 66u8, 56u8, 111u8, 234u8, 139u8, 93u8, 245u8, 137u8, + 110u8, 110u8, 121u8, 15u8, 216u8, 207u8, 97u8, 120u8, 125u8, 45u8, + 61u8, 2u8, 50u8, 100u8, 3u8, 106u8, 12u8, 233u8, 123u8, 156u8, 145u8, + 38u8, + ], + ) + } + + #[doc = " The session index at which the era start for the last `HISTORY_DEPTH` eras."] #[doc = ""] - #[doc = "If called after the end of the voting period abstentions are counted as rejections"] - #[doc = "unless there is a prime member set and the prime member cast an approval."] + #[doc = " Note: This tracks the starting session (i.e. session index when era start being active)"] + #[doc = " for the eras in `[CurrentEra - HISTORY_DEPTH, CurrentEra]`."] + pub fn eras_start_session_index( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Staking", + "ErasStartSessionIndex", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], + [ + 72u8, 185u8, 246u8, 202u8, 79u8, 127u8, 173u8, 74u8, 216u8, 238u8, + 58u8, 82u8, 235u8, 222u8, 76u8, 144u8, 97u8, 84u8, 17u8, 164u8, 132u8, + 167u8, 24u8, 195u8, 175u8, 132u8, 156u8, 87u8, 234u8, 147u8, 103u8, + 58u8, + ], + ) + } + + #[doc = " The session index at which the era start for the last `HISTORY_DEPTH` eras."] #[doc = ""] - #[doc = "If the close operation completes successfully with disapproval, the transaction fee will"] - #[doc = "be waived. Otherwise execution of the approved operation will be charged to the caller."] + #[doc = " Note: This tracks the starting session (i.e. session index when era start being active)"] + #[doc = " for the eras in `[CurrentEra - HISTORY_DEPTH, CurrentEra]`."] + pub fn eras_start_session_index_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Staking", + "ErasStartSessionIndex", + Vec::new(), + [ + 72u8, 185u8, 246u8, 202u8, 79u8, 127u8, 173u8, 74u8, 216u8, 238u8, + 58u8, 82u8, 235u8, 222u8, 76u8, 144u8, 97u8, 84u8, 17u8, 164u8, 132u8, + 167u8, 24u8, 195u8, 175u8, 132u8, 156u8, 87u8, 234u8, 147u8, 103u8, + 58u8, + ], + ) + } + + #[doc = " Exposure of validator at era."] #[doc = ""] - #[doc = "+ `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed"] - #[doc = "proposal."] - #[doc = "+ `length_bound`: The upper bound for the length of the proposal in storage. Checked via"] - #[doc = "`storage::read` so it is `size_of::() == 4` larger than the pure length."] + #[doc = " This is keyed first by the era index to allow bulk deletion and then the stash account."] #[doc = ""] - #[doc = "# "] - #[doc = "## Weight"] - #[doc = "- `O(B + M + P1 + P2)` where:"] - #[doc = " - `B` is `proposal` size in bytes (length-fee-bounded)"] - #[doc = " - `M` is members-count (code- and governance-bounded)"] - #[doc = " - `P1` is the complexity of `proposal` preimage."] - #[doc = " - `P2` is proposal-count (code-bounded)"] - #[doc = "- DB:"] - #[doc = " - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`)"] - #[doc = " - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec"] - #[doc = " `O(P2)`)"] - #[doc = " - any mutations done while executing `proposal` (`P1`)"] - #[doc = "- up to 3 events"] - #[doc = "# "] - pub fn close_old_weight( + #[doc = " Is it removed after `HISTORY_DEPTH` eras."] + #[doc = " If stakers hasn't been set or has been removed then empty exposure is returned."] + pub fn eras_stakers( &self, - proposal_hash: ::subxt::utils::H256, - index: ::core::primitive::u32, - proposal_weight_bound: runtime_types::sp_weights::OldWeight, - length_bound: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "TechnicalCommittee", - "close_old_weight", - CloseOldWeight { - proposal_hash, - index, - proposal_weight_bound, - length_bound, - }, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + _1: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_staking::Exposure< + ::subxt::utils::AccountId32, + ::core::primitive::u128, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Staking", + "ErasStakers", + vec![ + ::subxt::storage::address::make_static_storage_map_key(_0.borrow()), + ::subxt::storage::address::make_static_storage_map_key(_1.borrow()), + ], [ - 133u8, 219u8, 90u8, 40u8, 102u8, 95u8, 4u8, 199u8, 45u8, 234u8, 109u8, - 17u8, 162u8, 63u8, 102u8, 186u8, 95u8, 182u8, 13u8, 123u8, 227u8, 20u8, - 186u8, 207u8, 12u8, 47u8, 87u8, 252u8, 244u8, 172u8, 60u8, 206u8, + 103u8, 38u8, 198u8, 91u8, 133u8, 9u8, 10u8, 201u8, 103u8, 169u8, 159u8, + 172u8, 59u8, 238u8, 21u8, 30u8, 140u8, 183u8, 160u8, 61u8, 36u8, 162u8, + 244u8, 61u8, 78u8, 33u8, 134u8, 176u8, 112u8, 153u8, 192u8, 252u8, ], ) } - #[doc = "Disapprove a proposal, close, and remove it from the system, regardless of its current"] - #[doc = "state."] - #[doc = ""] - #[doc = "Must be called by the Root origin."] + #[doc = " Exposure of validator at era."] #[doc = ""] - #[doc = "Parameters:"] - #[doc = "* `proposal_hash`: The hash of the proposal that should be disapproved."] + #[doc = " This is keyed first by the era index to allow bulk deletion and then the stash account."] #[doc = ""] - #[doc = "# "] - #[doc = "Complexity: O(P) where P is the number of max proposals"] - #[doc = "DB Weight:"] - #[doc = "* Reads: Proposals"] - #[doc = "* Writes: Voting, Proposals, ProposalOf"] - #[doc = "# "] - pub fn disapprove_proposal( + #[doc = " Is it removed after `HISTORY_DEPTH` eras."] + #[doc = " If stakers hasn't been set or has been removed then empty exposure is returned."] + pub fn eras_stakers_root( &self, - proposal_hash: ::subxt::utils::H256, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "TechnicalCommittee", - "disapprove_proposal", - DisapproveProposal { proposal_hash }, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_staking::Exposure< + ::subxt::utils::AccountId32, + ::core::primitive::u128, + >, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Staking", + "ErasStakers", + Vec::new(), [ - 25u8, 123u8, 1u8, 8u8, 74u8, 37u8, 3u8, 40u8, 97u8, 37u8, 175u8, 224u8, - 72u8, 155u8, 123u8, 109u8, 104u8, 43u8, 91u8, 125u8, 199u8, 51u8, 17u8, - 225u8, 133u8, 38u8, 120u8, 76u8, 164u8, 5u8, 194u8, 201u8, + 103u8, 38u8, 198u8, 91u8, 133u8, 9u8, 10u8, 201u8, 103u8, 169u8, 159u8, + 172u8, 59u8, 238u8, 21u8, 30u8, 140u8, 183u8, 160u8, 61u8, 36u8, 162u8, + 244u8, 61u8, 78u8, 33u8, 134u8, 176u8, 112u8, 153u8, 192u8, 252u8, ], ) } - #[doc = "Close a vote that is either approved, disapproved or whose voting period has ended."] + #[doc = " Clipped Exposure of validator at era."] #[doc = ""] - #[doc = "May be called by any signed account in order to finish voting and close the proposal."] + #[doc = " This is similar to [`ErasStakers`] but number of nominators exposed is reduced to the"] + #[doc = " `T::MaxNominatorRewardedPerValidator` biggest stakers."] + #[doc = " (Note: the field `total` and `own` of the exposure remains unchanged)."] + #[doc = " This is used to limit the i/o cost for the nominator payout."] #[doc = ""] - #[doc = "If called before the end of the voting period it will only close the vote if it is"] - #[doc = "has enough votes to be approved or disapproved."] + #[doc = " This is keyed fist by the era index to allow bulk deletion and then the stash account."] #[doc = ""] - #[doc = "If called after the end of the voting period abstentions are counted as rejections"] - #[doc = "unless there is a prime member set and the prime member cast an approval."] + #[doc = " Is it removed after `HISTORY_DEPTH` eras."] + #[doc = " If stakers hasn't been set or has been removed then empty exposure is returned."] + pub fn eras_stakers_clipped( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + _1: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_staking::Exposure< + ::subxt::utils::AccountId32, + ::core::primitive::u128, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Staking", + "ErasStakersClipped", + vec![ + ::subxt::storage::address::make_static_storage_map_key(_0.borrow()), + ::subxt::storage::address::make_static_storage_map_key(_1.borrow()), + ], + [ + 119u8, 253u8, 51u8, 32u8, 173u8, 173u8, 49u8, 121u8, 141u8, 128u8, + 219u8, 112u8, 173u8, 42u8, 145u8, 37u8, 8u8, 12u8, 27u8, 37u8, 232u8, + 187u8, 130u8, 227u8, 113u8, 111u8, 185u8, 197u8, 157u8, 136u8, 205u8, + 32u8, + ], + ) + } + + #[doc = " Clipped Exposure of validator at era."] #[doc = ""] - #[doc = "If the close operation completes successfully with disapproval, the transaction fee will"] - #[doc = "be waived. Otherwise execution of the approved operation will be charged to the caller."] + #[doc = " This is similar to [`ErasStakers`] but number of nominators exposed is reduced to the"] + #[doc = " `T::MaxNominatorRewardedPerValidator` biggest stakers."] + #[doc = " (Note: the field `total` and `own` of the exposure remains unchanged)."] + #[doc = " This is used to limit the i/o cost for the nominator payout."] #[doc = ""] - #[doc = "+ `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed"] - #[doc = "proposal."] - #[doc = "+ `length_bound`: The upper bound for the length of the proposal in storage. Checked via"] - #[doc = "`storage::read` so it is `size_of::() == 4` larger than the pure length."] + #[doc = " This is keyed fist by the era index to allow bulk deletion and then the stash account."] #[doc = ""] - #[doc = "# "] - #[doc = "## Weight"] - #[doc = "- `O(B + M + P1 + P2)` where:"] - #[doc = " - `B` is `proposal` size in bytes (length-fee-bounded)"] - #[doc = " - `M` is members-count (code- and governance-bounded)"] - #[doc = " - `P1` is the complexity of `proposal` preimage."] - #[doc = " - `P2` is proposal-count (code-bounded)"] - #[doc = "- DB:"] - #[doc = " - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`)"] - #[doc = " - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec"] - #[doc = " `O(P2)`)"] - #[doc = " - any mutations done while executing `proposal` (`P1`)"] - #[doc = "- up to 3 events"] - #[doc = "# "] - pub fn close( + #[doc = " Is it removed after `HISTORY_DEPTH` eras."] + #[doc = " If stakers hasn't been set or has been removed then empty exposure is returned."] + pub fn eras_stakers_clipped_root( &self, - proposal_hash: ::subxt::utils::H256, - index: ::core::primitive::u32, - proposal_weight_bound: runtime_types::sp_weights::weight_v2::Weight, - length_bound: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "TechnicalCommittee", - "close", - Close { - proposal_hash, - index, - proposal_weight_bound, - length_bound, - }, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_staking::Exposure< + ::subxt::utils::AccountId32, + ::core::primitive::u128, + >, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Staking", + "ErasStakersClipped", + Vec::new(), [ - 191u8, 138u8, 89u8, 247u8, 97u8, 51u8, 45u8, 193u8, 76u8, 16u8, 80u8, - 225u8, 197u8, 83u8, 204u8, 133u8, 169u8, 16u8, 86u8, 32u8, 125u8, 16u8, - 116u8, 185u8, 45u8, 20u8, 76u8, 148u8, 206u8, 163u8, 154u8, 30u8, + 119u8, 253u8, 51u8, 32u8, 173u8, 173u8, 49u8, 121u8, 141u8, 128u8, + 219u8, 112u8, 173u8, 42u8, 145u8, 37u8, 8u8, 12u8, 27u8, 37u8, 232u8, + 187u8, 130u8, 227u8, 113u8, 111u8, 185u8, 197u8, 157u8, 136u8, 205u8, + 32u8, ], ) } - } - } - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::pallet_collective::pallet::Event; - pub mod events { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "A motion (given hash) has been proposed (by given account) with a threshold (given"] - #[doc = "`MemberCount`)."] - pub struct Proposed { - pub account: ::subxt::utils::AccountId32, - pub proposal_index: ::core::primitive::u32, - pub proposal_hash: ::subxt::utils::H256, - pub threshold: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for Proposed { - const EVENT: &'static str = "Proposed"; - const PALLET: &'static str = "TechnicalCommittee"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "A motion (given hash) has been voted on by given account, leaving"] - #[doc = "a tally (yes votes and no votes given respectively as `MemberCount`)."] - pub struct Voted { - pub account: ::subxt::utils::AccountId32, - pub proposal_hash: ::subxt::utils::H256, - pub voted: ::core::primitive::bool, - pub yes: ::core::primitive::u32, - pub no: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for Voted { - const EVENT: &'static str = "Voted"; - const PALLET: &'static str = "TechnicalCommittee"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "A motion was approved by the required threshold."] - pub struct Approved { - pub proposal_hash: ::subxt::utils::H256, - } - impl ::subxt::events::StaticEvent for Approved { - const EVENT: &'static str = "Approved"; - const PALLET: &'static str = "TechnicalCommittee"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "A motion was not approved by the required threshold."] - pub struct Disapproved { - pub proposal_hash: ::subxt::utils::H256, - } - impl ::subxt::events::StaticEvent for Disapproved { - const EVENT: &'static str = "Disapproved"; - const PALLET: &'static str = "TechnicalCommittee"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "A motion was executed; result will be `Ok` if it returned without error."] - pub struct Executed { - pub proposal_hash: ::subxt::utils::H256, - pub result: ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - } - impl ::subxt::events::StaticEvent for Executed { - const EVENT: &'static str = "Executed"; - const PALLET: &'static str = "TechnicalCommittee"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "A single member did some action; result will be `Ok` if it returned without error."] - pub struct MemberExecuted { - pub proposal_hash: ::subxt::utils::H256, - pub result: ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - } - impl ::subxt::events::StaticEvent for MemberExecuted { - const EVENT: &'static str = "MemberExecuted"; - const PALLET: &'static str = "TechnicalCommittee"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "A proposal was closed because its threshold was reached or after its duration was up."] - pub struct Closed { - pub proposal_hash: ::subxt::utils::H256, - pub yes: ::core::primitive::u32, - pub no: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for Closed { - const EVENT: &'static str = "Closed"; - const PALLET: &'static str = "TechnicalCommittee"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " The hashes of the active proposals."] - pub fn proposals( + + #[doc = " Similar to `ErasStakers`, this holds the preferences of validators."] + #[doc = ""] + #[doc = " This is keyed first by the era index to allow bulk deletion and then the stash account."] + #[doc = ""] + #[doc = " Is it removed after `HISTORY_DEPTH` eras."] + pub fn eras_validator_prefs( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::subxt::utils::H256, - >, - >, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + _1: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_staking::ValidatorPrefs, + ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Staking", + "ErasValidatorPrefs", + vec![ + ::subxt::storage::address::make_static_storage_map_key(_0.borrow()), + ::subxt::storage::address::make_static_storage_map_key(_1.borrow()), + ], + [ + 201u8, 204u8, 230u8, 197u8, 37u8, 83u8, 124u8, 26u8, 10u8, 75u8, 164u8, + 102u8, 83u8, 24u8, 158u8, 127u8, 27u8, 173u8, 125u8, 63u8, 251u8, + 128u8, 239u8, 182u8, 115u8, 109u8, 13u8, 97u8, 211u8, 104u8, 189u8, + 127u8, + ], + ) + } + + #[doc = " Similar to `ErasStakers`, this holds the preferences of validators."] + #[doc = ""] + #[doc = " This is keyed first by the era index to allow bulk deletion and then the stash account."] + #[doc = ""] + #[doc = " Is it removed after `HISTORY_DEPTH` eras."] + pub fn eras_validator_prefs_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_staking::ValidatorPrefs, (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "TechnicalCommittee", - "Proposals", - vec![], + ::subxt::storage::address::Address::new_static( + "Staking", + "ErasValidatorPrefs", + Vec::new(), [ - 10u8, 133u8, 82u8, 54u8, 193u8, 41u8, 253u8, 159u8, 56u8, 96u8, 249u8, - 148u8, 43u8, 57u8, 116u8, 43u8, 222u8, 243u8, 237u8, 231u8, 238u8, - 60u8, 26u8, 225u8, 19u8, 203u8, 213u8, 220u8, 114u8, 217u8, 100u8, - 27u8, + 201u8, 204u8, 230u8, 197u8, 37u8, 83u8, 124u8, 26u8, 10u8, 75u8, 164u8, + 102u8, 83u8, 24u8, 158u8, 127u8, 27u8, 173u8, 125u8, 63u8, 251u8, + 128u8, 239u8, 182u8, 115u8, 109u8, 13u8, 97u8, 211u8, 104u8, 189u8, + 127u8, ], ) } - #[doc = " Actual proposal for a given hash, if it's current."] - pub fn proposal_of( + #[doc = " The total validator era payout for the last `HISTORY_DEPTH` eras."] + #[doc = ""] + #[doc = " Eras that haven't finished yet or has been removed doesn't have reward."] + pub fn eras_validator_reward( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u128, ::subxt::storage::address::Yes, (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "TechnicalCommittee", - "ProposalOf", - vec![::subxt::storage::address::StorageMapKey::new( + ::subxt::storage::address::Address::new_static( + "Staking", + "ErasValidatorReward", + vec![::subxt::storage::address::make_static_storage_map_key( _0.borrow(), - ::subxt::storage::address::StorageHasher::Identity, )], [ - 162u8, 9u8, 234u8, 5u8, 146u8, 108u8, 153u8, 10u8, 7u8, 55u8, 60u8, - 97u8, 62u8, 235u8, 39u8, 37u8, 2u8, 168u8, 48u8, 71u8, 221u8, 224u8, - 243u8, 192u8, 147u8, 57u8, 219u8, 157u8, 35u8, 78u8, 119u8, 39u8, + 185u8, 85u8, 179u8, 163u8, 178u8, 168u8, 141u8, 200u8, 59u8, 77u8, 2u8, + 197u8, 36u8, 188u8, 133u8, 117u8, 2u8, 25u8, 105u8, 132u8, 44u8, 75u8, + 15u8, 82u8, 57u8, 89u8, 242u8, 234u8, 70u8, 244u8, 198u8, 126u8, ], ) } - #[doc = " Actual proposal for a given hash, if it's current."] - pub fn proposal_of_root( + #[doc = " The total validator era payout for the last `HISTORY_DEPTH` eras."] + #[doc = ""] + #[doc = " Eras that haven't finished yet or has been removed doesn't have reward."] + pub fn eras_validator_reward_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u128, (), (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "TechnicalCommittee", - "ProposalOf", + ::subxt::storage::address::Address::new_static( + "Staking", + "ErasValidatorReward", Vec::new(), [ - 162u8, 9u8, 234u8, 5u8, 146u8, 108u8, 153u8, 10u8, 7u8, 55u8, 60u8, - 97u8, 62u8, 235u8, 39u8, 37u8, 2u8, 168u8, 48u8, 71u8, 221u8, 224u8, - 243u8, 192u8, 147u8, 57u8, 219u8, 157u8, 35u8, 78u8, 119u8, 39u8, + 185u8, 85u8, 179u8, 163u8, 178u8, 168u8, 141u8, 200u8, 59u8, 77u8, 2u8, + 197u8, 36u8, 188u8, 133u8, 117u8, 2u8, 25u8, 105u8, 132u8, 44u8, 75u8, + 15u8, 82u8, 57u8, 89u8, 242u8, 234u8, 70u8, 244u8, 198u8, 126u8, ], ) } - #[doc = " Votes on a given proposal, if it is ongoing."] - pub fn voting( + #[doc = " Rewards for the last `HISTORY_DEPTH` eras."] + #[doc = " If reward hasn't been set or has been removed then 0 reward is returned."] + pub fn eras_reward_points( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_collective::Votes< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - >, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_staking::EraRewardPoints<::subxt::utils::AccountId32>, + ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, - (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "TechnicalCommittee", - "Voting", - vec![::subxt::storage::address::StorageMapKey::new( + ::subxt::storage::address::Address::new_static( + "Staking", + "ErasRewardPoints", + vec![::subxt::storage::address::make_static_storage_map_key( _0.borrow(), - ::subxt::storage::address::StorageHasher::Identity, )], [ - 89u8, 108u8, 65u8, 58u8, 60u8, 116u8, 54u8, 68u8, 179u8, 73u8, 161u8, - 168u8, 78u8, 213u8, 208u8, 54u8, 244u8, 58u8, 70u8, 209u8, 170u8, - 136u8, 215u8, 3u8, 2u8, 105u8, 229u8, 217u8, 240u8, 230u8, 107u8, - 221u8, + 237u8, 135u8, 146u8, 156u8, 172u8, 48u8, 147u8, 207u8, 15u8, 86u8, + 55u8, 38u8, 29u8, 253u8, 198u8, 192u8, 99u8, 213u8, 80u8, 72u8, 212u8, + 60u8, 60u8, 180u8, 33u8, 17u8, 77u8, 0u8, 165u8, 225u8, 60u8, 213u8, ], ) } - #[doc = " Votes on a given proposal, if it is ongoing."] - pub fn voting_root( + #[doc = " Rewards for the last `HISTORY_DEPTH` eras."] + #[doc = " If reward hasn't been set or has been removed then 0 reward is returned."] + pub fn eras_reward_points_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_collective::Votes< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - >, - (), + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_staking::EraRewardPoints<::subxt::utils::AccountId32>, (), ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "TechnicalCommittee", - "Voting", + ::subxt::storage::address::Address::new_static( + "Staking", + "ErasRewardPoints", Vec::new(), [ - 89u8, 108u8, 65u8, 58u8, 60u8, 116u8, 54u8, 68u8, 179u8, 73u8, 161u8, - 168u8, 78u8, 213u8, 208u8, 54u8, 244u8, 58u8, 70u8, 209u8, 170u8, - 136u8, 215u8, 3u8, 2u8, 105u8, 229u8, 217u8, 240u8, 230u8, 107u8, - 221u8, + 237u8, 135u8, 146u8, 156u8, 172u8, 48u8, 147u8, 207u8, 15u8, 86u8, + 55u8, 38u8, 29u8, 253u8, 198u8, 192u8, 99u8, 213u8, 80u8, 72u8, 212u8, + 60u8, 60u8, 180u8, 33u8, 17u8, 77u8, 0u8, 165u8, 225u8, 60u8, 213u8, ], ) } - #[doc = " Proposals so far."] - pub fn proposal_count( + #[doc = " The total amount staked for the last `HISTORY_DEPTH` eras."] + #[doc = " If total hasn't been set or has been removed then 0 stake is returned."] + pub fn eras_total_stake( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u128, + ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, - (), > { - ::subxt::storage::address::StaticStorageAddress::new( - "TechnicalCommittee", - "ProposalCount", - vec![], + ::subxt::storage::address::Address::new_static( + "Staking", + "ErasTotalStake", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], [ - 132u8, 145u8, 78u8, 218u8, 51u8, 189u8, 55u8, 172u8, 143u8, 33u8, - 140u8, 99u8, 124u8, 208u8, 57u8, 232u8, 154u8, 110u8, 32u8, 142u8, - 24u8, 149u8, 109u8, 105u8, 30u8, 83u8, 39u8, 177u8, 127u8, 160u8, 34u8, - 70u8, + 8u8, 78u8, 101u8, 62u8, 124u8, 126u8, 66u8, 26u8, 47u8, 126u8, 239u8, + 204u8, 222u8, 104u8, 19u8, 108u8, 238u8, 160u8, 112u8, 242u8, 56u8, + 2u8, 250u8, 164u8, 250u8, 213u8, 201u8, 84u8, 193u8, 117u8, 108u8, + 146u8, ], ) } - #[doc = " The current members of the collective. This is stored sorted (just by value)."] - pub fn members( + #[doc = " The total amount staked for the last `HISTORY_DEPTH` eras."] + #[doc = " If total hasn't been set or has been removed then 0 stake is returned."] + pub fn eras_total_stake_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec<::subxt::utils::AccountId32>, - >, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u128, + (), ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, - (), > { - ::subxt::storage::address::StaticStorageAddress::new( - "TechnicalCommittee", - "Members", - vec![], + ::subxt::storage::address::Address::new_static( + "Staking", + "ErasTotalStake", + Vec::new(), [ - 162u8, 72u8, 174u8, 204u8, 140u8, 105u8, 205u8, 176u8, 197u8, 117u8, - 206u8, 134u8, 157u8, 110u8, 139u8, 54u8, 43u8, 233u8, 25u8, 51u8, 36u8, - 238u8, 94u8, 124u8, 221u8, 52u8, 237u8, 71u8, 125u8, 56u8, 129u8, - 222u8, + 8u8, 78u8, 101u8, 62u8, 124u8, 126u8, 66u8, 26u8, 47u8, 126u8, 239u8, + 204u8, 222u8, 104u8, 19u8, 108u8, 238u8, 160u8, 112u8, 242u8, 56u8, + 2u8, 250u8, 164u8, 250u8, 213u8, 201u8, 84u8, 193u8, 117u8, 108u8, + 146u8, ], ) } - #[doc = " The prime member that helps determine the default vote behavior in case of absentations."] - pub fn prime( + #[doc = " Mode of era forcing."] + pub fn force_era( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::subxt::utils::AccountId32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_staking::Forcing, + ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), + > { + ::subxt::storage::address::Address::new_static("Staking", "ForceEra", vec![], [ + 177u8, 148u8, 73u8, 108u8, 136u8, 126u8, 89u8, 18u8, 124u8, 66u8, 30u8, + 102u8, 133u8, 164u8, 78u8, 214u8, 184u8, 163u8, 75u8, 164u8, 117u8, 233u8, + 209u8, 158u8, 99u8, 208u8, 21u8, 194u8, 152u8, 82u8, 16u8, 222u8, + ]) + } + + #[doc = " The percentage of the slash that is distributed to reporters."] + #[doc = ""] + #[doc = " The rest of the slashed value is handled by the `Slash`."] + pub fn slash_reward_fraction( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::sp_arithmetic::per_things::Perbill, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), > { - ::subxt::storage::address::StaticStorageAddress::new( - "TechnicalCommittee", - "Prime", + ::subxt::storage::address::Address::new_static( + "Staking", + "SlashRewardFraction", vec![], [ - 108u8, 118u8, 54u8, 193u8, 207u8, 227u8, 119u8, 97u8, 23u8, 239u8, - 157u8, 69u8, 56u8, 142u8, 106u8, 17u8, 215u8, 159u8, 48u8, 42u8, 185u8, - 209u8, 49u8, 159u8, 32u8, 168u8, 111u8, 158u8, 159u8, 217u8, 244u8, - 158u8, + 53u8, 88u8, 253u8, 237u8, 84u8, 228u8, 187u8, 130u8, 108u8, 195u8, + 135u8, 25u8, 75u8, 52u8, 238u8, 62u8, 133u8, 38u8, 139u8, 129u8, 216u8, + 193u8, 197u8, 216u8, 245u8, 171u8, 128u8, 207u8, 125u8, 246u8, 248u8, + 7u8, ], ) } - } - } - } - pub mod elections { - use super::{root_mod, runtime_types}; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::{root_mod, runtime_types}; - type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Vote { - pub votes: ::std::vec::Vec<::subxt::utils::AccountId32>, - #[codec(compact)] - pub value: ::core::primitive::u128, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct RemoveVoter; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct SubmitCandidacy { - #[codec(compact)] - pub candidate_count: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct RenounceCandidacy { - pub renouncing: runtime_types::pallet_elections_phragmen::Renouncing, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct RemoveMember { - pub who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pub slash_bond: ::core::primitive::bool, - pub rerun_election: ::core::primitive::bool, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct CleanDefunctVoters { - pub num_voters: ::core::primitive::u32, - pub num_defunct: ::core::primitive::u32, - } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Vote for a set of candidates for the upcoming round of election. This can be called to"] - #[doc = "set the initial votes, or update already existing votes."] - #[doc = ""] - #[doc = "Upon initial voting, `value` units of `who`'s balance is locked and a deposit amount is"] - #[doc = "reserved. The deposit is based on the number of votes and can be updated over time."] - #[doc = ""] - #[doc = "The `votes` should:"] - #[doc = " - not be empty."] - #[doc = " - be less than the number of possible candidates. Note that all current members and"] - #[doc = " runners-up are also automatically candidates for the next round."] - #[doc = ""] - #[doc = "If `value` is more than `who`'s free balance, then the maximum of the two is used."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be signed."] - #[doc = ""] - #[doc = "### Warning"] - #[doc = ""] - #[doc = "It is the responsibility of the caller to **NOT** place all of their balance into the"] - #[doc = "lock and keep some for further operations."] - #[doc = ""] - #[doc = "# "] - #[doc = "We assume the maximum weight among all 3 cases: vote_equal, vote_more and vote_less."] - #[doc = "# "] - pub fn vote( - &self, - votes: ::std::vec::Vec<::subxt::utils::AccountId32>, - value: ::core::primitive::u128, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new("Elections", "vote", Vote { votes, value }, [ - 71u8, 90u8, 175u8, 225u8, 51u8, 202u8, 197u8, 252u8, 183u8, 92u8, 239u8, - 83u8, 112u8, 144u8, 128u8, 211u8, 109u8, 33u8, 252u8, 6u8, 156u8, 15u8, - 91u8, 88u8, 70u8, 19u8, 32u8, 29u8, 224u8, 255u8, 26u8, 145u8, - ]) - } - #[doc = "Remove `origin` as a voter."] - #[doc = ""] - #[doc = "This removes the lock and returns the deposit."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be signed and be a voter."] - pub fn remove_voter(&self) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Elections", - "remove_voter", - RemoveVoter {}, + #[doc = " The amount of currency given to reporters of a slash event which was"] + #[doc = " canceled by extraordinary circumstances (e.g. governance)."] + pub fn canceled_slash_payout( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u128, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "Staking", + "CanceledSlashPayout", + vec![], [ - 254u8, 46u8, 140u8, 4u8, 218u8, 45u8, 150u8, 72u8, 67u8, 131u8, 108u8, - 201u8, 46u8, 157u8, 104u8, 161u8, 53u8, 155u8, 130u8, 50u8, 88u8, - 149u8, 255u8, 12u8, 17u8, 85u8, 95u8, 69u8, 153u8, 130u8, 221u8, 1u8, + 221u8, 88u8, 134u8, 81u8, 22u8, 229u8, 100u8, 27u8, 86u8, 244u8, 229u8, + 107u8, 251u8, 119u8, 58u8, 153u8, 19u8, 20u8, 254u8, 169u8, 248u8, + 220u8, 98u8, 118u8, 48u8, 213u8, 22u8, 79u8, 242u8, 250u8, 147u8, + 173u8, ], ) } - #[doc = "Submit oneself for candidacy. A fixed amount of deposit is recorded."] - #[doc = ""] - #[doc = "All candidates are wiped at the end of the term. They either become a member/runner-up,"] - #[doc = "or leave the system while their deposit is slashed."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be signed."] - #[doc = ""] - #[doc = "### Warning"] - #[doc = ""] - #[doc = "Even if a candidate ends up being a member, they must call [`Call::renounce_candidacy`]"] - #[doc = "to get their deposit back. Losing the spot in an election will always lead to a slash."] - #[doc = ""] - #[doc = "# "] - #[doc = "The number of current candidates must be provided as witness data."] - #[doc = "# "] - pub fn submit_candidacy( + #[doc = " All unapplied slashes that are queued for later."] + pub fn unapplied_slashes( &self, - candidate_count: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Elections", - "submit_candidacy", - SubmitCandidacy { candidate_count }, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec< + runtime_types::pallet_staking::UnappliedSlash< + ::subxt::utils::AccountId32, + ::core::primitive::u128, + >, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Staking", + "UnappliedSlashes", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], [ - 228u8, 63u8, 217u8, 99u8, 128u8, 104u8, 175u8, 10u8, 30u8, 35u8, 47u8, - 14u8, 254u8, 122u8, 146u8, 239u8, 61u8, 145u8, 82u8, 7u8, 181u8, 98u8, - 238u8, 208u8, 23u8, 84u8, 48u8, 255u8, 177u8, 255u8, 84u8, 83u8, + 121u8, 1u8, 135u8, 243u8, 99u8, 254u8, 238u8, 207u8, 145u8, 172u8, + 186u8, 131u8, 181u8, 109u8, 199u8, 93u8, 129u8, 65u8, 106u8, 118u8, + 197u8, 83u8, 65u8, 45u8, 149u8, 1u8, 85u8, 99u8, 239u8, 148u8, 40u8, + 177u8, ], ) } - #[doc = "Renounce one's intention to be a candidate for the next election round. 3 potential"] - #[doc = "outcomes exist:"] - #[doc = ""] - #[doc = "- `origin` is a candidate and not elected in any set. In this case, the deposit is"] - #[doc = " unreserved, returned and origin is removed as a candidate."] - #[doc = "- `origin` is a current runner-up. In this case, the deposit is unreserved, returned and"] - #[doc = " origin is removed as a runner-up."] - #[doc = "- `origin` is a current member. In this case, the deposit is unreserved and origin is"] - #[doc = " removed as a member, consequently not being a candidate for the next round anymore."] - #[doc = " Similar to [`remove_member`](Self::remove_member), if replacement runners exists, they"] - #[doc = " are immediately used. If the prime is renouncing, then no prime will exist until the"] - #[doc = " next round."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be signed, and have one of the above roles."] - #[doc = ""] - #[doc = "# "] - #[doc = "The type of renouncing must be provided as witness data."] - #[doc = "# "] - pub fn renounce_candidacy( + #[doc = " All unapplied slashes that are queued for later."] + pub fn unapplied_slashes_root( &self, - renouncing: runtime_types::pallet_elections_phragmen::Renouncing, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Elections", - "renounce_candidacy", - RenounceCandidacy { renouncing }, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec< + runtime_types::pallet_staking::UnappliedSlash< + ::subxt::utils::AccountId32, + ::core::primitive::u128, + >, + >, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Staking", + "UnappliedSlashes", + Vec::new(), [ - 70u8, 72u8, 208u8, 36u8, 80u8, 245u8, 224u8, 75u8, 60u8, 142u8, 19u8, - 49u8, 142u8, 90u8, 14u8, 69u8, 15u8, 61u8, 170u8, 235u8, 16u8, 252u8, - 86u8, 200u8, 120u8, 127u8, 36u8, 42u8, 143u8, 130u8, 217u8, 128u8, + 121u8, 1u8, 135u8, 243u8, 99u8, 254u8, 238u8, 207u8, 145u8, 172u8, + 186u8, 131u8, 181u8, 109u8, 199u8, 93u8, 129u8, 65u8, 106u8, 118u8, + 197u8, 83u8, 65u8, 45u8, 149u8, 1u8, 85u8, 99u8, 239u8, 148u8, 40u8, + 177u8, ], ) } - #[doc = "Remove a particular member from the set. This is effective immediately and the bond of"] - #[doc = "the outgoing member is slashed."] - #[doc = ""] - #[doc = "If a runner-up is available, then the best runner-up will be removed and replaces the"] - #[doc = "outgoing member. Otherwise, if `rerun_election` is `true`, a new phragmen election is"] - #[doc = "started, else, nothing happens."] - #[doc = ""] - #[doc = "If `slash_bond` is set to true, the bond of the member being removed is slashed. Else,"] - #[doc = "it is returned."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be root."] - #[doc = ""] - #[doc = "Note that this does not affect the designated block number of the next election."] + #[doc = " A mapping from still-bonded eras to the first session index of that era."] #[doc = ""] - #[doc = "# "] - #[doc = "If we have a replacement, we use a small weight. Else, since this is a root call and"] - #[doc = "will go into phragmen, we assume full block for now."] - #[doc = "# "] - pub fn remove_member( + #[doc = " Must contains information for eras for the range:"] + #[doc = " `[active_era - bounding_duration; active_era]`"] + pub fn bonded_eras( &self, - who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - slash_bond: ::core::primitive::bool, - rerun_election: ::core::primitive::bool, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Elections", - "remove_member", - RemoveMember { - who, - slash_bond, - rerun_election, - }, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec<(::core::primitive::u32, ::core::primitive::u32)>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "Staking", + "BondedEras", + vec![], [ - 178u8, 90u8, 236u8, 184u8, 2u8, 67u8, 51u8, 162u8, 83u8, 131u8, 242u8, - 137u8, 17u8, 243u8, 209u8, 110u8, 26u8, 238u8, 178u8, 136u8, 84u8, - 74u8, 216u8, 173u8, 221u8, 82u8, 179u8, 218u8, 162u8, 159u8, 185u8, - 59u8, + 187u8, 216u8, 245u8, 253u8, 194u8, 182u8, 60u8, 244u8, 203u8, 84u8, + 228u8, 163u8, 149u8, 205u8, 57u8, 176u8, 203u8, 156u8, 20u8, 29u8, + 52u8, 234u8, 200u8, 63u8, 88u8, 49u8, 89u8, 117u8, 252u8, 75u8, 172u8, + 53u8, ], ) } - #[doc = "Clean all voters who are defunct (i.e. they do not serve any purpose at all). The"] - #[doc = "deposit of the removed voters are returned."] - #[doc = ""] - #[doc = "This is an root function to be used only for cleaning the state."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be root."] - #[doc = ""] - #[doc = "# "] - #[doc = "The total number of voters and those that are defunct must be provided as witness data."] - #[doc = "# "] - pub fn clean_defunct_voters( + #[doc = " All slashing events on validators, mapped by era to the highest slash proportion"] + #[doc = " and slash value of the era."] + pub fn validator_slash_in_era( &self, - num_voters: ::core::primitive::u32, - num_defunct: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Elections", - "clean_defunct_voters", - CleanDefunctVoters { - num_voters, - num_defunct, - }, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + _1: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ( + runtime_types::sp_arithmetic::per_things::Perbill, + ::core::primitive::u128, + ), + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Staking", + "ValidatorSlashInEra", + vec![ + ::subxt::storage::address::make_static_storage_map_key(_0.borrow()), + ::subxt::storage::address::make_static_storage_map_key(_1.borrow()), + ], [ - 198u8, 162u8, 30u8, 249u8, 191u8, 38u8, 141u8, 123u8, 230u8, 90u8, - 213u8, 103u8, 168u8, 28u8, 5u8, 215u8, 213u8, 152u8, 46u8, 189u8, - 238u8, 209u8, 209u8, 142u8, 159u8, 222u8, 161u8, 26u8, 161u8, 250u8, - 9u8, 100u8, + 224u8, 141u8, 93u8, 44u8, 47u8, 157u8, 205u8, 12u8, 68u8, 41u8, 221u8, + 210u8, 141u8, 225u8, 253u8, 22u8, 175u8, 11u8, 92u8, 76u8, 180u8, 4u8, + 106u8, 135u8, 166u8, 47u8, 201u8, 43u8, 165u8, 42u8, 232u8, 219u8, ], ) } - } - } - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::pallet_elections_phragmen::pallet::Event; - pub mod events { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "A new term with new_members. This indicates that enough candidates existed to run"] - #[doc = "the election, not that enough have has been elected. The inner value must be examined"] - #[doc = "for this purpose. A `NewTerm(\\[\\])` indicates that some candidates got their bond"] - #[doc = "slashed and none were elected, whilst `EmptyTerm` means that no candidates existed to"] - #[doc = "begin with."] - pub struct NewTerm { - pub new_members: - ::std::vec::Vec<(::subxt::utils::AccountId32, ::core::primitive::u128)>, - } - impl ::subxt::events::StaticEvent for NewTerm { - const EVENT: &'static str = "NewTerm"; - const PALLET: &'static str = "Elections"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "No (or not enough) candidates existed for this round. This is different from"] - #[doc = "`NewTerm(\\[\\])`. See the description of `NewTerm`."] - pub struct EmptyTerm; - impl ::subxt::events::StaticEvent for EmptyTerm { - const EVENT: &'static str = "EmptyTerm"; - const PALLET: &'static str = "Elections"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "Internal error happened while trying to perform election."] - pub struct ElectionError; - impl ::subxt::events::StaticEvent for ElectionError { - const EVENT: &'static str = "ElectionError"; - const PALLET: &'static str = "Elections"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "A member has been removed. This should always be followed by either `NewTerm` or"] - #[doc = "`EmptyTerm`."] - pub struct MemberKicked { - pub member: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for MemberKicked { - const EVENT: &'static str = "MemberKicked"; - const PALLET: &'static str = "Elections"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "Someone has renounced their candidacy."] - pub struct Renounced { - pub candidate: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for Renounced { - const EVENT: &'static str = "Renounced"; - const PALLET: &'static str = "Elections"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "A candidate was slashed by amount due to failing to obtain a seat as member or"] - #[doc = "runner-up."] - #[doc = ""] - #[doc = "Note that old members and runners-up are also candidates."] - pub struct CandidateSlashed { - pub candidate: ::subxt::utils::AccountId32, - pub amount: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for CandidateSlashed { - const EVENT: &'static str = "CandidateSlashed"; - const PALLET: &'static str = "Elections"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "A seat holder was slashed by amount by being forcefully removed from the set."] - pub struct SeatHolderSlashed { - pub seat_holder: ::subxt::utils::AccountId32, - pub amount: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for SeatHolderSlashed { - const EVENT: &'static str = "SeatHolderSlashed"; - const PALLET: &'static str = "Elections"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " The current elected members."] - #[doc = ""] - #[doc = " Invariant: Always sorted based on account id."] - pub fn members( + + #[doc = " All slashing events on validators, mapped by era to the highest slash proportion"] + #[doc = " and slash value of the era."] + pub fn validator_slash_in_era_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec< - runtime_types::pallet_elections_phragmen::SeatHolder< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - >, - >, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ( + runtime_types::sp_arithmetic::per_things::Perbill, + ::core::primitive::u128, + ), + (), (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Elections", - "Members", - vec![], + ::subxt::storage::address::Address::new_static( + "Staking", + "ValidatorSlashInEra", + Vec::new(), [ - 2u8, 182u8, 43u8, 180u8, 87u8, 185u8, 26u8, 79u8, 196u8, 55u8, 28u8, - 26u8, 174u8, 133u8, 158u8, 221u8, 101u8, 161u8, 83u8, 9u8, 221u8, - 175u8, 221u8, 220u8, 81u8, 80u8, 1u8, 236u8, 74u8, 121u8, 10u8, 82u8, + 224u8, 141u8, 93u8, 44u8, 47u8, 157u8, 205u8, 12u8, 68u8, 41u8, 221u8, + 210u8, 141u8, 225u8, 253u8, 22u8, 175u8, 11u8, 92u8, 76u8, 180u8, 4u8, + 106u8, 135u8, 166u8, 47u8, 201u8, 43u8, 165u8, 42u8, 232u8, 219u8, ], ) } - #[doc = " The current reserved runners-up."] - #[doc = ""] - #[doc = " Invariant: Always sorted based on rank (worse to best). Upon removal of a member, the"] - #[doc = " last (i.e. _best_) runner-up will be replaced."] - pub fn runners_up( + #[doc = " All slashing events on nominators, mapped by era to the highest slash value of the era."] + pub fn nominator_slash_in_era( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec< - runtime_types::pallet_elections_phragmen::SeatHolder< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - >, - >, - >, - ::subxt::storage::address::Yes, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + _1: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u128, ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Elections", - "RunnersUp", - vec![], + ::subxt::storage::address::Address::new_static( + "Staking", + "NominatorSlashInEra", + vec![ + ::subxt::storage::address::make_static_storage_map_key(_0.borrow()), + ::subxt::storage::address::make_static_storage_map_key(_1.borrow()), + ], [ - 248u8, 81u8, 190u8, 53u8, 121u8, 49u8, 55u8, 69u8, 116u8, 177u8, 46u8, - 30u8, 131u8, 14u8, 32u8, 198u8, 10u8, 132u8, 73u8, 117u8, 2u8, 146u8, - 188u8, 146u8, 214u8, 227u8, 97u8, 77u8, 7u8, 131u8, 208u8, 209u8, + 8u8, 89u8, 171u8, 183u8, 64u8, 29u8, 44u8, 185u8, 11u8, 204u8, 67u8, + 60u8, 208u8, 132u8, 9u8, 214u8, 13u8, 148u8, 205u8, 26u8, 5u8, 7u8, + 250u8, 191u8, 83u8, 118u8, 95u8, 17u8, 40u8, 126u8, 16u8, 135u8, ], ) } - #[doc = " The present candidate list. A current member or runner-up can never enter this vector"] - #[doc = " and is always implicitly assumed to be a candidate."] - #[doc = ""] - #[doc = " Second element is the deposit."] - #[doc = ""] - #[doc = " Invariant: Always sorted based on account id."] - pub fn candidates( + #[doc = " All slashing events on nominators, mapped by era to the highest slash value of the era."] + pub fn nominator_slash_in_era_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec<(::subxt::utils::AccountId32, ::core::primitive::u128)>, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u128, (), + (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Elections", - "Candidates", - vec![], + ::subxt::storage::address::Address::new_static( + "Staking", + "NominatorSlashInEra", + Vec::new(), [ - 224u8, 107u8, 141u8, 11u8, 54u8, 86u8, 117u8, 45u8, 195u8, 252u8, - 152u8, 21u8, 165u8, 23u8, 198u8, 117u8, 5u8, 216u8, 183u8, 163u8, - 243u8, 56u8, 11u8, 102u8, 85u8, 107u8, 219u8, 250u8, 45u8, 80u8, 108u8, - 127u8, + 8u8, 89u8, 171u8, 183u8, 64u8, 29u8, 44u8, 185u8, 11u8, 204u8, 67u8, + 60u8, 208u8, 132u8, 9u8, 214u8, 13u8, 148u8, 205u8, 26u8, 5u8, 7u8, + 250u8, 191u8, 83u8, 118u8, 95u8, 17u8, 40u8, 126u8, 16u8, 135u8, ], ) } - #[doc = " The total number of vote rounds that have happened, excluding the upcoming one."] - pub fn election_rounds( + #[doc = " Slashing spans for stash accounts."] + pub fn slashing_spans( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_staking::slashing::SlashingSpans, ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Elections", - "ElectionRounds", - vec![], + ::subxt::storage::address::Address::new_static( + "Staking", + "SlashingSpans", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], [ - 144u8, 146u8, 10u8, 32u8, 149u8, 147u8, 59u8, 205u8, 61u8, 246u8, 28u8, - 169u8, 130u8, 136u8, 143u8, 104u8, 253u8, 86u8, 228u8, 68u8, 19u8, - 184u8, 166u8, 214u8, 58u8, 103u8, 176u8, 160u8, 240u8, 249u8, 117u8, - 115u8, + 160u8, 190u8, 57u8, 128u8, 105u8, 73u8, 194u8, 75u8, 12u8, 120u8, + 141u8, 190u8, 235u8, 250u8, 221u8, 200u8, 141u8, 162u8, 31u8, 85u8, + 239u8, 108u8, 200u8, 148u8, 155u8, 48u8, 44u8, 89u8, 5u8, 177u8, 236u8, + 182u8, ], ) } - #[doc = " Votes and locked stake of a particular voter."] - #[doc = ""] - #[doc = " TWOX-NOTE: SAFE as `AccountId` is a crypto hash."] - pub fn voting( + #[doc = " Slashing spans for stash accounts."] + pub fn slashing_spans_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_staking::slashing::SlashingSpans, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Staking", + "SlashingSpans", + Vec::new(), + [ + 160u8, 190u8, 57u8, 128u8, 105u8, 73u8, 194u8, 75u8, 12u8, 120u8, + 141u8, 190u8, 235u8, 250u8, 221u8, 200u8, 141u8, 162u8, 31u8, 85u8, + 239u8, 108u8, 200u8, 148u8, 155u8, 48u8, 44u8, 89u8, 5u8, 177u8, 236u8, + 182u8, + ], + ) + } + + #[doc = " Records information about the maximum slash of a stash within a slashing span,"] + #[doc = " as well as how much reward has been paid out."] + pub fn span_slash( &self, _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_elections_phragmen::Voter< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - >, - >, + _1: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_staking::slashing::SpanRecord<::core::primitive::u128>, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Elections", - "Voting", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], + ::subxt::storage::address::Address::new_static( + "Staking", + "SpanSlash", + vec![ + ::subxt::storage::address::make_static_storage_map_key(_0.borrow()), + ::subxt::storage::address::make_static_storage_map_key(_1.borrow()), + ], [ - 9u8, 135u8, 76u8, 194u8, 240u8, 182u8, 111u8, 207u8, 102u8, 37u8, - 126u8, 36u8, 84u8, 112u8, 26u8, 216u8, 175u8, 5u8, 14u8, 189u8, 83u8, - 185u8, 136u8, 39u8, 171u8, 221u8, 147u8, 20u8, 168u8, 126u8, 111u8, - 137u8, + 6u8, 241u8, 205u8, 89u8, 62u8, 181u8, 211u8, 216u8, 190u8, 41u8, 81u8, + 136u8, 136u8, 139u8, 57u8, 243u8, 174u8, 150u8, 132u8, 211u8, 79u8, + 138u8, 108u8, 218u8, 19u8, 225u8, 60u8, 26u8, 135u8, 6u8, 21u8, 116u8, ], ) } - #[doc = " Votes and locked stake of a particular voter."] - #[doc = ""] - #[doc = " TWOX-NOTE: SAFE as `AccountId` is a crypto hash."] - pub fn voting_root( + #[doc = " Records information about the maximum slash of a stash within a slashing span,"] + #[doc = " as well as how much reward has been paid out."] + pub fn span_slash_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_elections_phragmen::Voter< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - >, - >, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_staking::slashing::SpanRecord<::core::primitive::u128>, (), ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Elections", - "Voting", + ::subxt::storage::address::Address::new_static( + "Staking", + "SpanSlash", Vec::new(), [ - 9u8, 135u8, 76u8, 194u8, 240u8, 182u8, 111u8, 207u8, 102u8, 37u8, - 126u8, 36u8, 84u8, 112u8, 26u8, 216u8, 175u8, 5u8, 14u8, 189u8, 83u8, - 185u8, 136u8, 39u8, 171u8, 221u8, 147u8, 20u8, 168u8, 126u8, 111u8, - 137u8, + 6u8, 241u8, 205u8, 89u8, 62u8, 181u8, 211u8, 216u8, 190u8, 41u8, 81u8, + 136u8, 136u8, 139u8, 57u8, 243u8, 174u8, 150u8, 132u8, 211u8, 79u8, + 138u8, 108u8, 218u8, 19u8, 225u8, 60u8, 26u8, 135u8, 6u8, 21u8, 116u8, ], ) } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " Identifier for the elections-phragmen pallet's lock"] - pub fn pallet_id( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<[::core::primitive::u8; 8usize]>, - > { - ::subxt::constants::StaticConstantAddress::new("Elections", "PalletId", [ - 224u8, 197u8, 247u8, 125u8, 62u8, 180u8, 69u8, 91u8, 226u8, 36u8, 82u8, - 148u8, 70u8, 147u8, 209u8, 40u8, 210u8, 229u8, 181u8, 191u8, 170u8, 205u8, - 138u8, 97u8, 127u8, 59u8, 124u8, 244u8, 252u8, 30u8, 213u8, 179u8, - ]) - } - #[doc = " How much should be locked up in order to submit one's candidacy."] - pub fn candidacy_bond( + #[doc = " The last planned session scheduled by the session pallet."] + #[doc = ""] + #[doc = " This is basically in sync with the call to [`pallet_session::SessionManager::new_session`]."] + pub fn current_planned_session( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), > { - ::subxt::constants::StaticConstantAddress::new("Elections", "CandidacyBond", [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, - 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, 136u8, - 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, - ]) + ::subxt::storage::address::Address::new_static( + "Staking", + "CurrentPlannedSession", + vec![], + [ + 12u8, 47u8, 20u8, 104u8, 155u8, 181u8, 35u8, 91u8, 172u8, 97u8, 206u8, + 135u8, 185u8, 142u8, 46u8, 72u8, 32u8, 118u8, 225u8, 191u8, 28u8, + 130u8, 7u8, 38u8, 181u8, 233u8, 201u8, 8u8, 160u8, 161u8, 86u8, 204u8, + ], + ) } - #[doc = " Base deposit associated with voting."] + #[doc = " Indices of validators that have offended in the active era and whether they are currently"] + #[doc = " disabled."] #[doc = ""] - #[doc = " This should be sensibly high to economically ensure the pallet cannot be attacked by"] - #[doc = " creating a gigantic number of votes."] - pub fn voting_bond_base( + #[doc = " This value should be a superset of disabled validators since not all offences lead to the"] + #[doc = " validator being disabled (if there was no slash). This is needed to track the percentage of"] + #[doc = " validators that have offended in the current era, ensuring a new era is forced if"] + #[doc = " `OffendingValidatorsThreshold` is reached. The vec is always kept sorted so that we can find"] + #[doc = " whether a given validator has previously offended using binary search. It gets cleared when"] + #[doc = " the era ends."] + pub fn offending_validators( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec<(::core::primitive::u32, ::core::primitive::bool)>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), > { - ::subxt::constants::StaticConstantAddress::new("Elections", "VotingBondBase", [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, - 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, 136u8, - 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, - ]) + ::subxt::storage::address::Address::new_static( + "Staking", + "OffendingValidators", + vec![], + [ + 201u8, 31u8, 141u8, 182u8, 160u8, 180u8, 37u8, 226u8, 50u8, 65u8, + 103u8, 11u8, 38u8, 120u8, 200u8, 219u8, 219u8, 98u8, 185u8, 137u8, + 154u8, 20u8, 130u8, 163u8, 126u8, 185u8, 33u8, 194u8, 76u8, 172u8, + 70u8, 220u8, + ], + ) } - #[doc = " The amount of bond that need to be locked for each vote (32 bytes)."] - pub fn voting_bond_factor( + #[doc = " The threshold for when users can start calling `chill_other` for other validators /"] + #[doc = " nominators. The threshold is compared to the actual number of validators / nominators"] + #[doc = " (`CountFor*`) in the system compared to the configured max (`Max*Count`)."] + pub fn chill_threshold( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::sp_arithmetic::per_things::Percent, + ::subxt::storage::address::Yes, + (), + (), > { - ::subxt::constants::StaticConstantAddress::new( - "Elections", - "VotingBondFactor", + ::subxt::storage::address::Address::new_static( + "Staking", + "ChillThreshold", + vec![], [ - 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, + 133u8, 222u8, 1u8, 208u8, 212u8, 216u8, 247u8, 66u8, 178u8, 96u8, 35u8, + 112u8, 33u8, 245u8, 11u8, 249u8, 255u8, 212u8, 204u8, 161u8, 44u8, + 38u8, 126u8, 151u8, 140u8, 42u8, 253u8, 101u8, 1u8, 23u8, 239u8, 39u8, ], ) } - - #[doc = " Number of members to elect."] - pub fn desired_members( + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " Maximum number of nominations per nominator."] + pub fn max_nominations( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { - ::subxt::constants::StaticConstantAddress::new("Elections", "DesiredMembers", [ + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static("Staking", "MaxNominations", [ 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, 145u8, ]) } - #[doc = " Number of runners_up to keep."] - pub fn desired_runners_up( + #[doc = " Number of eras to keep in history."] + #[doc = ""] + #[doc = " Following information is kept for eras in `[current_era -"] + #[doc = " HistoryDepth, current_era]`: `ErasStakers`, `ErasStakersClipped`,"] + #[doc = " `ErasValidatorPrefs`, `ErasValidatorReward`, `ErasRewardPoints`,"] + #[doc = " `ErasTotalStake`, `ErasStartSessionIndex`,"] + #[doc = " `StakingLedger.claimed_rewards`."] + #[doc = ""] + #[doc = " Must be more than the number of eras delayed by session."] + #[doc = " I.e. active era must always be in history. I.e. `active_era >"] + #[doc = " current_era - history_depth` must be guaranteed."] + #[doc = ""] + #[doc = " If migrating an existing pallet from storage value to config value,"] + #[doc = " this should be set to same value or greater as in storage."] + #[doc = ""] + #[doc = " Note: `HistoryDepth` is used as the upper bound for the `BoundedVec`"] + #[doc = " item `StakingLedger.claimed_rewards`. Setting this value lower than"] + #[doc = " the existing value can lead to inconsistencies in the"] + #[doc = " `StakingLedger` and will need to be handled properly in a migration."] + #[doc = " The test `reducing_history_depth_abrupt` shows this effect."] + pub fn history_depth(&self) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static("Staking", "HistoryDepth", [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, 125u8, + 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, 178u8, 197u8, + 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, 145u8, + ]) + } + + #[doc = " Number of sessions per era."] + pub fn sessions_per_era( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { - ::subxt::constants::StaticConstantAddress::new( - "Elections", - "DesiredRunnersUp", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, - ], - ) + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static("Staking", "SessionsPerEra", [ + 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 = " How long each seat is kept. This defines the next block number at which an election"] - #[doc = " round will happen. If set to zero, no elections are ever triggered and the module will"] - #[doc = " be in passive mode."] - pub fn term_duration( + #[doc = " Number of eras that staked funds must remain bonded for."] + pub fn bonding_duration( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { - ::subxt::constants::StaticConstantAddress::new("Elections", "TermDuration", [ + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static("Staking", "BondingDuration", [ 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 candidates in a phragmen election."] + #[doc = " Number of eras that slashes are deferred by, after computation."] #[doc = ""] - #[doc = " Warning: The election happens onchain, and this value will determine"] - #[doc = " the size of the election. When this limit is reached no more"] - #[doc = " candidates are accepted in the election."] - pub fn max_candidates( + #[doc = " This should be less than the bonding duration. Set to 0 if slashes"] + #[doc = " should be applied immediately, without opportunity for intervention."] + pub fn slash_defer_duration( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { - ::subxt::constants::StaticConstantAddress::new("Elections", "MaxCandidates", [ + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static("Staking", "SlashDeferDuration", [ 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 voters to allow in a phragmen election."] + #[doc = " The maximum number of nominators rewarded for each validator."] #[doc = ""] - #[doc = " Warning: This impacts the size of the election which is run onchain."] - #[doc = " When the limit is reached the new voters are ignored."] - pub fn max_voters( + #[doc = " For each validator only the `$MaxNominatorRewardedPerValidator` biggest stakers can"] + #[doc = " claim their reward. This used to limit the i/o cost for the nominator payout."] + pub fn max_nominator_rewarded_per_validator( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { - ::subxt::constants::StaticConstantAddress::new("Elections", "MaxVoters", [ + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "Staking", + "MaxNominatorRewardedPerValidator", + [ + 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 `unlocking` chunks a [`StakingLedger`] can"] + #[doc = " have. Effectively determines how many unique eras a staker may be"] + #[doc = " unbonding in."] + #[doc = ""] + #[doc = " Note: `MaxUnlockingChunks` is used as the upper bound for the"] + #[doc = " `BoundedVec` item `StakingLedger.unlocking`. Setting this value"] + #[doc = " lower than the existing value can lead to inconsistencies in the"] + #[doc = " `StakingLedger` and will need to be handled properly in a runtime"] + #[doc = " migration. The test `reducing_max_unlocking_chunks_abrupt` shows"] + #[doc = " this effect."] + pub fn max_unlocking_chunks( + &self, + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static("Staking", "MaxUnlockingChunks", [ 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, @@ -11850,4263 +9415,4583 @@ pub mod api { } } } - pub mod technical_membership { + pub mod session { use super::{root_mod, runtime_types}; + #[doc = "Error for the session pallet."] + pub type Error = runtime_types::pallet_session::pallet::Error; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub type Call = runtime_types::pallet_session::pallet::Call; pub mod calls { use super::{root_mod, runtime_types}; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct AddMember { - pub who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct RemoveMember { - pub who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct SwapMember { - pub remove: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pub add: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetKeys { + pub keys: runtime_types::da_runtime::primitives::SessionKeys, + pub proof: ::std::vec::Vec<::core::primitive::u8>, + } + impl ::subxt::blocks::StaticExtrinsic for SetKeys { + const CALL: &'static str = "set_keys"; + const PALLET: &'static str = "Session"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct PurgeKeys; + impl ::subxt::blocks::StaticExtrinsic for PurgeKeys { + const CALL: &'static str = "purge_keys"; + const PALLET: &'static str = "Session"; + } } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct ResetMembers { - pub members: ::std::vec::Vec<::subxt::utils::AccountId32>, + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Sets the session key(s) of the function caller to `keys`."] + #[doc = "Allows an account to set its session key prior to becoming a validator."] + #[doc = "This doesn't take effect until the next session."] + #[doc = ""] + #[doc = "The dispatch origin of this function must be signed."] + #[doc = ""] + #[doc = "# "] + #[doc = "- Complexity: `O(1)`. Actual cost depends on the number of length of"] + #[doc = " `T::Keys::key_ids()` which is fixed."] + #[doc = "- DbReads: `origin account`, `T::ValidatorIdOf`, `NextKeys`"] + #[doc = "- DbWrites: `origin account`, `NextKeys`"] + #[doc = "- DbReads per key id: `KeyOwner`"] + #[doc = "- DbWrites per key id: `KeyOwner`"] + #[doc = "# "] + pub fn set_keys( + &self, + keys: runtime_types::da_runtime::primitives::SessionKeys, + proof: ::std::vec::Vec<::core::primitive::u8>, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Session", + "set_keys", + types::SetKeys { keys, proof }, + [ + 249u8, 76u8, 61u8, 94u8, 145u8, 109u8, 28u8, 115u8, 21u8, 162u8, 253u8, + 79u8, 254u8, 5u8, 223u8, 195u8, 75u8, 96u8, 197u8, 10u8, 176u8, 69u8, + 84u8, 65u8, 68u8, 255u8, 239u8, 79u8, 228u8, 247u8, 171u8, 73u8, + ], + ) + } + + #[doc = "Removes any session key(s) of the function caller."] + #[doc = ""] + #[doc = "This doesn't take effect until the next session."] + #[doc = ""] + #[doc = "The dispatch origin of this function must be Signed and the account must be either be"] + #[doc = "convertible to a validator ID using the chain's typical addressing system (this usually"] + #[doc = "means being a controller account) or directly convertible into a validator ID (which"] + #[doc = "usually means being a stash account)."] + #[doc = ""] + #[doc = "# "] + #[doc = "- Complexity: `O(1)` in number of key types. Actual cost depends on the number of length"] + #[doc = " of `T::Keys::key_ids()` which is fixed."] + #[doc = "- DbReads: `T::ValidatorIdOf`, `NextKeys`, `origin account`"] + #[doc = "- DbWrites: `NextKeys`, `origin account`"] + #[doc = "- DbWrites per key id: `KeyOwner`"] + #[doc = "# "] + pub fn purge_keys(&self) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Session", + "purge_keys", + types::PurgeKeys {}, + [ + 215u8, 204u8, 146u8, 236u8, 32u8, 78u8, 198u8, 79u8, 85u8, 214u8, 15u8, + 151u8, 158u8, 31u8, 146u8, 119u8, 119u8, 204u8, 151u8, 169u8, 226u8, + 67u8, 217u8, 39u8, 241u8, 245u8, 203u8, 240u8, 203u8, 172u8, 16u8, + 209u8, + ], + ) + } } + } + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub type Event = runtime_types::pallet_session::pallet::Event; + pub mod events { + use super::runtime_types; #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - pub struct ChangeKey { - pub new: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "New session has happened. Note that the argument is the session index, not the"] + #[doc = "block number as the type might suggest."] + pub struct NewSession { + pub session_index: ::core::primitive::u32, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct SetPrime { - pub who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + impl ::subxt::events::StaticEvent for NewSession { + const EVENT: &'static str = "NewSession"; + const PALLET: &'static str = "Session"; } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct ClearPrime; - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Add a member `who` to the set."] - #[doc = ""] - #[doc = "May only be called from `T::AddOrigin`."] - pub fn add_member( + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " The current set of validators."] + pub fn validators( &self, - who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "TechnicalMembership", - "add_member", - AddMember { who }, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec<::subxt::utils::AccountId32>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "Session", + "Validators", + vec![], [ - 168u8, 166u8, 6u8, 167u8, 12u8, 109u8, 99u8, 96u8, 240u8, 57u8, 60u8, - 174u8, 57u8, 52u8, 131u8, 16u8, 230u8, 172u8, 23u8, 140u8, 48u8, 131u8, - 73u8, 131u8, 133u8, 217u8, 137u8, 50u8, 165u8, 149u8, 174u8, 188u8, + 50u8, 86u8, 154u8, 222u8, 249u8, 209u8, 156u8, 22u8, 155u8, 25u8, + 133u8, 194u8, 210u8, 50u8, 38u8, 28u8, 139u8, 201u8, 90u8, 139u8, + 115u8, 12u8, 12u8, 141u8, 4u8, 178u8, 201u8, 241u8, 223u8, 234u8, 6u8, + 86u8, ], ) } - #[doc = "Remove a member `who` from the set."] - #[doc = ""] - #[doc = "May only be called from `T::RemoveOrigin`."] - pub fn remove_member( + #[doc = " Current index of the session."] + pub fn current_index( &self, - who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "TechnicalMembership", - "remove_member", - RemoveMember { who }, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "Session", + "CurrentIndex", + vec![], [ - 33u8, 178u8, 96u8, 158u8, 126u8, 172u8, 0u8, 207u8, 143u8, 144u8, - 219u8, 28u8, 205u8, 197u8, 192u8, 195u8, 141u8, 26u8, 39u8, 101u8, - 140u8, 88u8, 212u8, 26u8, 221u8, 29u8, 187u8, 160u8, 119u8, 101u8, - 45u8, 162u8, + 167u8, 151u8, 125u8, 150u8, 159u8, 21u8, 78u8, 217u8, 237u8, 183u8, + 135u8, 65u8, 187u8, 114u8, 188u8, 206u8, 16u8, 32u8, 69u8, 208u8, + 134u8, 159u8, 232u8, 224u8, 243u8, 27u8, 31u8, 166u8, 145u8, 44u8, + 221u8, 230u8, ], ) } - #[doc = "Swap out one member `remove` for another `add`."] - #[doc = ""] - #[doc = "May only be called from `T::SwapOrigin`."] - #[doc = ""] - #[doc = "Prime membership is *not* passed from `remove` to `add`, if extant."] - pub fn swap_member( + #[doc = " True if the underlying economic identities or weighting behind the validators"] + #[doc = " has changed in the queued validator set."] + pub fn queued_changed( &self, - remove: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - add: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "TechnicalMembership", - "swap_member", - SwapMember { remove, add }, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::bool, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "Session", + "QueuedChanged", + vec![], [ - 52u8, 10u8, 13u8, 175u8, 35u8, 141u8, 159u8, 135u8, 34u8, 235u8, 117u8, - 146u8, 134u8, 49u8, 76u8, 116u8, 93u8, 209u8, 24u8, 242u8, 123u8, 82u8, - 34u8, 192u8, 147u8, 237u8, 163u8, 167u8, 18u8, 64u8, 196u8, 132u8, + 184u8, 137u8, 224u8, 137u8, 31u8, 236u8, 95u8, 164u8, 102u8, 225u8, + 198u8, 227u8, 140u8, 37u8, 113u8, 57u8, 59u8, 4u8, 202u8, 102u8, 117u8, + 36u8, 226u8, 64u8, 113u8, 141u8, 199u8, 111u8, 99u8, 144u8, 198u8, + 153u8, ], ) } - #[doc = "Change the membership to a new set, disregarding the existing membership. Be nice and"] - #[doc = "pass `members` pre-sorted."] - #[doc = ""] - #[doc = "May only be called from `T::ResetOrigin`."] - pub fn reset_members( + #[doc = " The queued keys for the next session. When the next session begins, these keys"] + #[doc = " will be used to determine the validator's session keys."] + pub fn queued_keys( &self, - members: ::std::vec::Vec<::subxt::utils::AccountId32>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "TechnicalMembership", - "reset_members", - ResetMembers { members }, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec<( + ::subxt::utils::AccountId32, + runtime_types::da_runtime::primitives::SessionKeys, + )>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "Session", + "QueuedKeys", + vec![], [ - 9u8, 35u8, 28u8, 59u8, 158u8, 232u8, 89u8, 78u8, 101u8, 53u8, 240u8, - 98u8, 13u8, 104u8, 235u8, 161u8, 201u8, 150u8, 117u8, 32u8, 75u8, - 209u8, 166u8, 252u8, 57u8, 131u8, 96u8, 215u8, 51u8, 81u8, 42u8, 123u8, + 253u8, 189u8, 69u8, 24u8, 103u8, 84u8, 10u8, 154u8, 177u8, 219u8, + 105u8, 118u8, 254u8, 193u8, 177u8, 122u8, 59u8, 95u8, 81u8, 128u8, + 252u8, 140u8, 164u8, 86u8, 8u8, 84u8, 199u8, 123u8, 212u8, 27u8, 68u8, + 29u8, ], ) } - #[doc = "Swap out the sending member for some other key `new`."] - #[doc = ""] - #[doc = "May only be called from `Signed` origin of a current member."] + #[doc = " Indices of disabled validators."] #[doc = ""] - #[doc = "Prime membership is passed from the origin account to `new`, if extant."] - pub fn change_key( + #[doc = " The vec is always kept sorted so that we can find whether a given validator is"] + #[doc = " disabled using binary search. It gets cleared when `on_session_ending` returns"] + #[doc = " a new set of identities."] + pub fn disabled_validators( &self, - new: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "TechnicalMembership", - "change_key", - ChangeKey { new }, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec<::core::primitive::u32>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "Session", + "DisabledValidators", + vec![], [ - 202u8, 114u8, 208u8, 33u8, 254u8, 51u8, 31u8, 220u8, 229u8, 251u8, - 167u8, 149u8, 139u8, 131u8, 252u8, 100u8, 32u8, 20u8, 72u8, 97u8, 5u8, - 8u8, 25u8, 198u8, 95u8, 154u8, 73u8, 220u8, 46u8, 85u8, 162u8, 40u8, + 213u8, 19u8, 168u8, 234u8, 187u8, 200u8, 180u8, 97u8, 234u8, 189u8, + 36u8, 233u8, 158u8, 184u8, 45u8, 35u8, 129u8, 213u8, 133u8, 8u8, 104u8, + 183u8, 46u8, 68u8, 154u8, 240u8, 132u8, 22u8, 247u8, 11u8, 54u8, 221u8, ], ) } - #[doc = "Set the prime member. Must be a current member."] - #[doc = ""] - #[doc = "May only be called from `T::PrimeOrigin`."] - pub fn set_prime( + #[doc = " The next session keys for a validator."] + pub fn next_keys( &self, - who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "TechnicalMembership", - "set_prime", - SetPrime { who }, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::da_runtime::primitives::SessionKeys, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Session", + "NextKeys", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], [ - 109u8, 16u8, 35u8, 72u8, 169u8, 141u8, 101u8, 209u8, 241u8, 218u8, - 170u8, 180u8, 37u8, 223u8, 249u8, 37u8, 168u8, 20u8, 130u8, 30u8, - 191u8, 157u8, 230u8, 156u8, 135u8, 73u8, 96u8, 98u8, 193u8, 44u8, 38u8, - 247u8, + 27u8, 24u8, 147u8, 49u8, 85u8, 69u8, 22u8, 49u8, 162u8, 194u8, 189u8, + 109u8, 68u8, 151u8, 200u8, 43u8, 23u8, 251u8, 43u8, 102u8, 85u8, 236u8, + 95u8, 195u8, 49u8, 237u8, 236u8, 208u8, 37u8, 5u8, 84u8, 45u8, ], ) } - #[doc = "Remove the prime member if it exists."] - #[doc = ""] - #[doc = "May only be called from `T::PrimeOrigin`."] - pub fn clear_prime(&self) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "TechnicalMembership", - "clear_prime", - ClearPrime {}, + #[doc = " The next session keys for a validator."] + pub fn next_keys_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::da_runtime::primitives::SessionKeys, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Session", + "NextKeys", + Vec::new(), [ - 186u8, 182u8, 225u8, 90u8, 71u8, 124u8, 69u8, 100u8, 234u8, 25u8, 53u8, - 23u8, 182u8, 32u8, 176u8, 81u8, 54u8, 140u8, 235u8, 126u8, 247u8, 7u8, - 155u8, 62u8, 35u8, 135u8, 48u8, 61u8, 88u8, 160u8, 183u8, 72u8, + 27u8, 24u8, 147u8, 49u8, 85u8, 69u8, 22u8, 49u8, 162u8, 194u8, 189u8, + 109u8, 68u8, 151u8, 200u8, 43u8, 23u8, 251u8, 43u8, 102u8, 85u8, 236u8, + 95u8, 195u8, 49u8, 237u8, 236u8, 208u8, 37u8, 5u8, 84u8, 45u8, ], ) } - } - } - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::pallet_membership::pallet::Event; - pub mod events { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "The given member was added; see the transaction for who."] - pub struct MemberAdded; - impl ::subxt::events::StaticEvent for MemberAdded { - const EVENT: &'static str = "MemberAdded"; - const PALLET: &'static str = "TechnicalMembership"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "The given member was removed; see the transaction for who."] - pub struct MemberRemoved; - impl ::subxt::events::StaticEvent for MemberRemoved { - const EVENT: &'static str = "MemberRemoved"; - const PALLET: &'static str = "TechnicalMembership"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "Two members were swapped; see the transaction for who."] - pub struct MembersSwapped; - impl ::subxt::events::StaticEvent for MembersSwapped { - const EVENT: &'static str = "MembersSwapped"; - const PALLET: &'static str = "TechnicalMembership"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "The membership was reset; see the transaction for who the new set is."] - pub struct MembersReset; - impl ::subxt::events::StaticEvent for MembersReset { - const EVENT: &'static str = "MembersReset"; - const PALLET: &'static str = "TechnicalMembership"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "One of the members' keys changed."] - pub struct KeyChanged; - impl ::subxt::events::StaticEvent for KeyChanged { - const EVENT: &'static str = "KeyChanged"; - const PALLET: &'static str = "TechnicalMembership"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "Phantom member, never used."] - pub struct Dummy; - impl ::subxt::events::StaticEvent for Dummy { - const EVENT: &'static str = "Dummy"; - const PALLET: &'static str = "TechnicalMembership"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " The current membership, stored as an ordered Vec."] - pub fn members( + + #[doc = " The owner of a key. The key is the `KeyTypeId` + the encoded key."] + pub fn key_owner( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::subxt::utils::AccountId32, - >, - >, - ::subxt::storage::address::Yes, + _0: impl ::std::borrow::Borrow, + _1: impl ::std::borrow::Borrow<[::core::primitive::u8]>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::subxt::utils::AccountId32, ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "TechnicalMembership", - "Members", - vec![], + ::subxt::storage::address::Address::new_static( + "Session", + "KeyOwner", + vec![ + ::subxt::storage::address::make_static_storage_map_key(_0.borrow()), + ::subxt::storage::address::make_static_storage_map_key(_1.borrow()), + ], [ - 56u8, 56u8, 29u8, 90u8, 26u8, 115u8, 252u8, 185u8, 37u8, 108u8, 16u8, - 46u8, 136u8, 139u8, 30u8, 19u8, 235u8, 78u8, 176u8, 129u8, 180u8, 57u8, - 178u8, 239u8, 211u8, 6u8, 64u8, 129u8, 195u8, 46u8, 178u8, 157u8, + 177u8, 90u8, 148u8, 24u8, 251u8, 26u8, 65u8, 235u8, 46u8, 25u8, 109u8, + 212u8, 208u8, 218u8, 58u8, 196u8, 29u8, 73u8, 145u8, 41u8, 30u8, 251u8, + 185u8, 26u8, 205u8, 50u8, 32u8, 200u8, 206u8, 178u8, 255u8, 146u8, ], ) } - #[doc = " The current prime member, if one exists."] - pub fn prime( + #[doc = " The owner of a key. The key is the `KeyTypeId` + the encoded key."] + pub fn key_owner_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::subxt::utils::AccountId32>, - ::subxt::storage::address::Yes, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::subxt::utils::AccountId32, (), (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "TechnicalMembership", - "Prime", - vec![], + ::subxt::storage::address::Address::new_static( + "Session", + "KeyOwner", + Vec::new(), [ - 108u8, 118u8, 54u8, 193u8, 207u8, 227u8, 119u8, 97u8, 23u8, 239u8, - 157u8, 69u8, 56u8, 142u8, 106u8, 17u8, 215u8, 159u8, 48u8, 42u8, 185u8, - 209u8, 49u8, 159u8, 32u8, 168u8, 111u8, 158u8, 159u8, 217u8, 244u8, - 158u8, + 177u8, 90u8, 148u8, 24u8, 251u8, 26u8, 65u8, 235u8, 46u8, 25u8, 109u8, + 212u8, 208u8, 218u8, 58u8, 196u8, 29u8, 73u8, 145u8, 41u8, 30u8, 251u8, + 185u8, 26u8, 205u8, 50u8, 32u8, 200u8, 206u8, 178u8, 255u8, 146u8, ], ) } } } } - pub mod grandpa { + pub mod democracy { use super::{root_mod, runtime_types}; + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub type Error = runtime_types::pallet_democracy::pallet::Error; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub type Call = runtime_types::pallet_democracy::pallet::Call; pub mod calls { use super::{root_mod, runtime_types}; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct ReportEquivocation { - pub equivocation_proof: ::std::boxed::Box< - runtime_types::sp_finality_grandpa::EquivocationProof< - ::subxt::utils::H256, - ::core::primitive::u32, - >, - >, - pub key_owner_proof: runtime_types::sp_session::MembershipProof, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct ReportEquivocationUnsigned { - pub equivocation_proof: ::std::boxed::Box< - runtime_types::sp_finality_grandpa::EquivocationProof< - ::subxt::utils::H256, - ::core::primitive::u32, - >, - >, - pub key_owner_proof: runtime_types::sp_session::MembershipProof, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct NoteStalled { - pub delay: ::core::primitive::u32, - pub best_finalized_block_number: ::core::primitive::u32, - } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Report voter equivocation/misbehavior. This method will verify the"] - #[doc = "equivocation proof and validate the given key ownership proof"] - #[doc = "against the extracted offender. If both are valid, the offence"] - #[doc = "will be reported."] - pub fn report_equivocation( - &self, - equivocation_proof: runtime_types::sp_finality_grandpa::EquivocationProof< - ::subxt::utils::H256, - ::core::primitive::u32, + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Propose { + pub proposal: runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::da_runtime::RuntimeCall, >, - key_owner_proof: runtime_types::sp_session::MembershipProof, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Grandpa", - "report_equivocation", - ReportEquivocation { - equivocation_proof: ::std::boxed::Box::new(equivocation_proof), - key_owner_proof, - }, - [ - 156u8, 162u8, 189u8, 89u8, 60u8, 156u8, 129u8, 176u8, 62u8, 35u8, - 214u8, 7u8, 68u8, 245u8, 130u8, 117u8, 30u8, 3u8, 73u8, 218u8, 142u8, - 82u8, 13u8, 141u8, 124u8, 19u8, 53u8, 138u8, 70u8, 4u8, 40u8, 32u8, - ], - ) + #[codec(compact)] + pub value: ::core::primitive::u128, } - - #[doc = "Report voter equivocation/misbehavior. This method will verify the"] - #[doc = "equivocation proof and validate the given key ownership proof"] - #[doc = "against the extracted offender. If both are valid, the offence"] - #[doc = "will be reported."] - #[doc = ""] - #[doc = "This extrinsic must be called unsigned and it is expected that only"] - #[doc = "block authors will call it (validated in `ValidateUnsigned`), as such"] - #[doc = "if the block author is defined it will be defined as the equivocation"] - #[doc = "reporter."] - pub fn report_equivocation_unsigned( - &self, - equivocation_proof: runtime_types::sp_finality_grandpa::EquivocationProof< - ::subxt::utils::H256, - ::core::primitive::u32, - >, - key_owner_proof: runtime_types::sp_session::MembershipProof, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Grandpa", - "report_equivocation_unsigned", - ReportEquivocationUnsigned { - equivocation_proof: ::std::boxed::Box::new(equivocation_proof), - key_owner_proof, - }, - [ - 166u8, 26u8, 217u8, 185u8, 215u8, 37u8, 174u8, 170u8, 137u8, 160u8, - 151u8, 43u8, 246u8, 86u8, 58u8, 18u8, 248u8, 73u8, 99u8, 161u8, 158u8, - 93u8, 212u8, 186u8, 224u8, 253u8, 234u8, 18u8, 151u8, 111u8, 227u8, - 249u8, - ], - ) + impl ::subxt::blocks::StaticExtrinsic for Propose { + const CALL: &'static str = "propose"; + const PALLET: &'static str = "Democracy"; } - - #[doc = "Note that the current authority set of the GRANDPA finality gadget has stalled."] - #[doc = ""] - #[doc = "This will trigger a forced authority set change at the beginning of the next session, to"] - #[doc = "be enacted `delay` blocks after that. The `delay` should be high enough to safely assume"] - #[doc = "that the block signalling the forced change will not be re-orged e.g. 1000 blocks."] - #[doc = "The block production rate (which may be slowed down because of finality lagging) should"] - #[doc = "be taken into account when choosing the `delay`. The GRANDPA voters based on the new"] - #[doc = "authority will start voting on top of `best_finalized_block_number` for new finalized"] - #[doc = "blocks. `best_finalized_block_number` should be the highest of the latest finalized"] - #[doc = "block of all validators of the new authority set."] - #[doc = ""] - #[doc = "Only callable by root."] - pub fn note_stalled( - &self, - delay: ::core::primitive::u32, - best_finalized_block_number: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Grandpa", - "note_stalled", - NoteStalled { - delay, - best_finalized_block_number, - }, - [ - 197u8, 236u8, 137u8, 32u8, 46u8, 200u8, 144u8, 13u8, 89u8, 181u8, - 235u8, 73u8, 167u8, 131u8, 174u8, 93u8, 42u8, 136u8, 238u8, 59u8, - 129u8, 60u8, 83u8, 100u8, 5u8, 182u8, 99u8, 250u8, 145u8, 180u8, 1u8, - 199u8, - ], - ) + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Second { + #[codec(compact)] + pub proposal: ::core::primitive::u32, } - } - } - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::pallet_grandpa::pallet::Event; - pub mod events { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "New authority set has been applied."] - pub struct NewAuthorities { - pub authority_set: ::std::vec::Vec<( - runtime_types::sp_finality_grandpa::app::Public, - ::core::primitive::u64, - )>, - } - impl ::subxt::events::StaticEvent for NewAuthorities { - const EVENT: &'static str = "NewAuthorities"; - const PALLET: &'static str = "Grandpa"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "Current authority set has been paused."] - pub struct Paused; - impl ::subxt::events::StaticEvent for Paused { - const EVENT: &'static str = "Paused"; - const PALLET: &'static str = "Grandpa"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "Current authority set has been resumed."] - pub struct Resumed; - impl ::subxt::events::StaticEvent for Resumed { - const EVENT: &'static str = "Resumed"; - const PALLET: &'static str = "Grandpa"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " State of the current authority set."] - pub fn state( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_grandpa::StoredState<::core::primitive::u32>, + impl ::subxt::blocks::StaticExtrinsic for Second { + const CALL: &'static str = "second"; + const PALLET: &'static str = "Democracy"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Vote { + #[codec(compact)] + pub ref_index: ::core::primitive::u32, + pub vote: + runtime_types::pallet_democracy::vote::AccountVote<::core::primitive::u128>, + } + impl ::subxt::blocks::StaticExtrinsic for Vote { + const CALL: &'static str = "vote"; + const PALLET: &'static str = "Democracy"; + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct EmergencyCancel { + pub ref_index: ::core::primitive::u32, + } + impl ::subxt::blocks::StaticExtrinsic for EmergencyCancel { + const CALL: &'static str = "emergency_cancel"; + const PALLET: &'static str = "Democracy"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ExternalPropose { + pub proposal: runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::da_runtime::RuntimeCall, >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Grandpa", - "State", - vec![], - [ - 211u8, 149u8, 114u8, 217u8, 206u8, 194u8, 115u8, 67u8, 12u8, 218u8, - 246u8, 213u8, 208u8, 29u8, 216u8, 104u8, 2u8, 39u8, 123u8, 172u8, - 252u8, 210u8, 52u8, 129u8, 147u8, 237u8, 244u8, 68u8, 252u8, 169u8, - 97u8, 148u8, - ], - ) } - - #[doc = " Pending change: (signaled at, scheduled change)."] - pub fn pending_change( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_grandpa::StoredPendingChange<::core::primitive::u32>, + impl ::subxt::blocks::StaticExtrinsic for ExternalPropose { + const CALL: &'static str = "external_propose"; + const PALLET: &'static str = "Democracy"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ExternalProposeMajority { + pub proposal: runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::da_runtime::RuntimeCall, >, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Grandpa", - "PendingChange", - vec![], - [ - 178u8, 24u8, 140u8, 7u8, 8u8, 196u8, 18u8, 58u8, 3u8, 226u8, 181u8, - 47u8, 155u8, 160u8, 70u8, 12u8, 75u8, 189u8, 38u8, 255u8, 104u8, 141u8, - 64u8, 34u8, 134u8, 201u8, 102u8, 21u8, 75u8, 81u8, 218u8, 60u8, - ], - ) } - - #[doc = " next block number where we can force a change."] - pub fn next_forced( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Grandpa", - "NextForced", - vec![], - [ - 99u8, 43u8, 245u8, 201u8, 60u8, 9u8, 122u8, 99u8, 188u8, 29u8, 67u8, - 6u8, 193u8, 133u8, 179u8, 67u8, 202u8, 208u8, 62u8, 179u8, 19u8, 169u8, - 196u8, 119u8, 107u8, 75u8, 100u8, 3u8, 121u8, 18u8, 80u8, 156u8, - ], - ) + impl ::subxt::blocks::StaticExtrinsic for ExternalProposeMajority { + const CALL: &'static str = "external_propose_majority"; + const PALLET: &'static str = "Democracy"; } - - #[doc = " `true` if we are currently stalled."] - pub fn stalled( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<( - ::core::primitive::u32, - ::core::primitive::u32, - )>, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Grandpa", - "Stalled", - vec![], - [ - 219u8, 8u8, 37u8, 78u8, 150u8, 55u8, 0u8, 57u8, 201u8, 170u8, 186u8, - 189u8, 56u8, 161u8, 44u8, 15u8, 53u8, 178u8, 224u8, 208u8, 231u8, - 109u8, 14u8, 209u8, 57u8, 205u8, 237u8, 153u8, 231u8, 156u8, 24u8, - 185u8, - ], - ) + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ExternalProposeDefault { + pub proposal: runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::da_runtime::RuntimeCall, + >, } - - #[doc = " The number of changes (both in terms of keys and underlying economic responsibilities)"] - #[doc = " in the \"set\" of Grandpa validators from genesis."] - pub fn current_set_id( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u64>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Grandpa", - "CurrentSetId", - vec![], - [ - 129u8, 7u8, 62u8, 101u8, 199u8, 60u8, 56u8, 33u8, 54u8, 158u8, 20u8, - 178u8, 244u8, 145u8, 189u8, 197u8, 157u8, 163u8, 116u8, 36u8, 105u8, - 52u8, 149u8, 244u8, 108u8, 94u8, 109u8, 111u8, 244u8, 137u8, 7u8, - 108u8, - ], - ) + impl ::subxt::blocks::StaticExtrinsic for ExternalProposeDefault { + const CALL: &'static str = "external_propose_default"; + const PALLET: &'static str = "Democracy"; } - - #[doc = " A mapping from grandpa set ID to the index of the *most recent* session for which its"] - #[doc = " members were responsible."] - #[doc = ""] - #[doc = " TWOX-NOTE: `SetId` is not under user control."] - pub fn set_id_session( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u64>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Grandpa", - "SetIdSession", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], - [ - 91u8, 175u8, 145u8, 127u8, 242u8, 81u8, 13u8, 231u8, 110u8, 11u8, - 166u8, 169u8, 103u8, 146u8, 123u8, 133u8, 157u8, 15u8, 33u8, 234u8, - 108u8, 13u8, 88u8, 115u8, 254u8, 9u8, 145u8, 199u8, 102u8, 47u8, 53u8, - 134u8, - ], - ) + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct FastTrack { + pub proposal_hash: ::subxt::utils::H256, + pub voting_period: ::core::primitive::u32, + pub delay: ::core::primitive::u32, + } + impl ::subxt::blocks::StaticExtrinsic for FastTrack { + const CALL: &'static str = "fast_track"; + const PALLET: &'static str = "Democracy"; } - - #[doc = " A mapping from grandpa set ID to the index of the *most recent* session for which its"] - #[doc = " members were responsible."] - #[doc = ""] - #[doc = " TWOX-NOTE: `SetId` is not under user control."] - pub fn set_id_session_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Grandpa", - "SetIdSession", - Vec::new(), - [ - 91u8, 175u8, 145u8, 127u8, 242u8, 81u8, 13u8, 231u8, 110u8, 11u8, - 166u8, 169u8, 103u8, 146u8, 123u8, 133u8, 157u8, 15u8, 33u8, 234u8, - 108u8, 13u8, 88u8, 115u8, 254u8, 9u8, 145u8, 199u8, 102u8, 47u8, 53u8, - 134u8, - ], - ) + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct VetoExternal { + pub proposal_hash: ::subxt::utils::H256, } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " Max Authorities in use"] - pub fn max_authorities( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { - ::subxt::constants::StaticConstantAddress::new("Grandpa", "MaxAuthorities", [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, 125u8, - 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, 178u8, 197u8, - 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, 145u8, - ]) + impl ::subxt::blocks::StaticExtrinsic for VetoExternal { + const CALL: &'static str = "veto_external"; + const PALLET: &'static str = "Democracy"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct CancelReferendum { + #[codec(compact)] + pub ref_index: ::core::primitive::u32, + } + impl ::subxt::blocks::StaticExtrinsic for CancelReferendum { + const CALL: &'static str = "cancel_referendum"; + const PALLET: &'static str = "Democracy"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Delegate { + pub to: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + pub conviction: runtime_types::pallet_democracy::conviction::Conviction, + pub balance: ::core::primitive::u128, + } + impl ::subxt::blocks::StaticExtrinsic for Delegate { + const CALL: &'static str = "delegate"; + const PALLET: &'static str = "Democracy"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Undelegate; + impl ::subxt::blocks::StaticExtrinsic for Undelegate { + const CALL: &'static str = "undelegate"; + const PALLET: &'static str = "Democracy"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ClearPublicProposals; + impl ::subxt::blocks::StaticExtrinsic for ClearPublicProposals { + const CALL: &'static str = "clear_public_proposals"; + const PALLET: &'static str = "Democracy"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Unlock { + pub target: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + } + impl ::subxt::blocks::StaticExtrinsic for Unlock { + const CALL: &'static str = "unlock"; + const PALLET: &'static str = "Democracy"; + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct RemoveVote { + pub index: ::core::primitive::u32, + } + impl ::subxt::blocks::StaticExtrinsic for RemoveVote { + const CALL: &'static str = "remove_vote"; + const PALLET: &'static str = "Democracy"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct RemoveOtherVote { + pub target: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + pub index: ::core::primitive::u32, + } + impl ::subxt::blocks::StaticExtrinsic for RemoveOtherVote { + const CALL: &'static str = "remove_other_vote"; + const PALLET: &'static str = "Democracy"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Blacklist { + pub proposal_hash: ::subxt::utils::H256, + pub maybe_ref_index: ::core::option::Option<::core::primitive::u32>, + } + impl ::subxt::blocks::StaticExtrinsic for Blacklist { + const CALL: &'static str = "blacklist"; + const PALLET: &'static str = "Democracy"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct CancelProposal { + #[codec(compact)] + pub prop_index: ::core::primitive::u32, + } + impl ::subxt::blocks::StaticExtrinsic for CancelProposal { + const CALL: &'static str = "cancel_proposal"; + const PALLET: &'static str = "Democracy"; } - } - } - } - pub mod treasury { - use super::{root_mod, runtime_types}; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::{root_mod, runtime_types}; - type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct ProposeSpend { - #[codec(compact)] - pub value: ::core::primitive::u128, - pub beneficiary: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct RejectProposal { - #[codec(compact)] - pub proposal_id: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct ApproveProposal { - #[codec(compact)] - pub proposal_id: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Spend { - #[codec(compact)] - pub amount: ::core::primitive::u128, - pub beneficiary: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct RemoveApproval { - #[codec(compact)] - pub proposal_id: ::core::primitive::u32, } pub struct TransactionApi; impl TransactionApi { - #[doc = "Put forward a suggestion for spending. A deposit proportional to the value"] - #[doc = "is reserved and slashed if the proposal is rejected. It is returned once the"] - #[doc = "proposal is awarded."] + #[doc = "Propose a sensitive action to be taken."] #[doc = ""] - #[doc = "# "] - #[doc = "- Complexity: O(1)"] - #[doc = "- DbReads: `ProposalCount`, `origin account`"] - #[doc = "- DbWrites: `ProposalCount`, `Proposals`, `origin account`"] - #[doc = "# "] - pub fn propose_spend( + #[doc = "The dispatch origin of this call must be _Signed_ and the sender must"] + #[doc = "have funds to cover the deposit."] + #[doc = ""] + #[doc = "- `proposal_hash`: The hash of the proposal preimage."] + #[doc = "- `value`: The amount of deposit (must be at least `MinimumDeposit`)."] + #[doc = ""] + #[doc = "Emits `Proposed`."] + pub fn propose( &self, - value: ::core::primitive::u128, - beneficiary: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, + proposal: runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::da_runtime::RuntimeCall, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Treasury", - "propose_spend", - ProposeSpend { value, beneficiary }, + value: ::core::primitive::u128, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Democracy", + "propose", + types::Propose { proposal, value }, [ - 124u8, 32u8, 83u8, 127u8, 240u8, 169u8, 3u8, 190u8, 235u8, 163u8, 23u8, - 29u8, 88u8, 242u8, 238u8, 187u8, 136u8, 75u8, 193u8, 192u8, 239u8, 2u8, - 54u8, 238u8, 147u8, 42u8, 91u8, 14u8, 244u8, 175u8, 41u8, 14u8, + 230u8, 248u8, 57u8, 131u8, 96u8, 178u8, 225u8, 150u8, 97u8, 77u8, + 246u8, 143u8, 151u8, 204u8, 201u8, 252u8, 133u8, 53u8, 34u8, 27u8, + 156u8, 2u8, 242u8, 170u8, 198u8, 157u8, 166u8, 84u8, 246u8, 86u8, 78u8, + 128u8, ], ) } - #[doc = "Reject a proposed spend. The original deposit will be slashed."] + #[doc = "Signals agreement with a particular proposal."] #[doc = ""] - #[doc = "May only be called from `T::RejectOrigin`."] + #[doc = "The dispatch origin of this call must be _Signed_ and the sender"] + #[doc = "must have funds to cover the deposit, equal to the original deposit."] #[doc = ""] - #[doc = "# "] - #[doc = "- Complexity: O(1)"] - #[doc = "- DbReads: `Proposals`, `rejected proposer account`"] - #[doc = "- DbWrites: `Proposals`, `rejected proposer account`"] - #[doc = "# "] - pub fn reject_proposal( + #[doc = "- `proposal`: The index of the proposal to second."] + pub fn second( &self, - proposal_id: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Treasury", - "reject_proposal", - RejectProposal { proposal_id }, + proposal: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Democracy", + "second", + types::Second { proposal }, [ - 106u8, 223u8, 97u8, 22u8, 111u8, 208u8, 128u8, 26u8, 198u8, 140u8, - 118u8, 126u8, 187u8, 51u8, 193u8, 50u8, 193u8, 68u8, 143u8, 144u8, - 34u8, 132u8, 44u8, 244u8, 105u8, 186u8, 223u8, 234u8, 17u8, 145u8, - 209u8, 145u8, + 195u8, 55u8, 178u8, 55u8, 129u8, 64u8, 10u8, 131u8, 217u8, 79u8, 1u8, + 187u8, 73u8, 126u8, 191u8, 221u8, 110u8, 10u8, 13u8, 65u8, 190u8, + 107u8, 21u8, 236u8, 175u8, 130u8, 227u8, 179u8, 173u8, 39u8, 32u8, + 147u8, ], ) } - #[doc = "Approve a proposal. At a later time, the proposal will be allocated to the beneficiary"] - #[doc = "and the original deposit will be returned."] + #[doc = "Vote in a referendum. If `vote.is_aye()`, the vote is to enact the proposal;"] + #[doc = "otherwise it is a vote to keep the status quo."] #[doc = ""] - #[doc = "May only be called from `T::ApproveOrigin`."] + #[doc = "The dispatch origin of this call must be _Signed_."] #[doc = ""] - #[doc = "# "] - #[doc = "- Complexity: O(1)."] - #[doc = "- DbReads: `Proposals`, `Approvals`"] - #[doc = "- DbWrite: `Approvals`"] - #[doc = "# "] - pub fn approve_proposal( + #[doc = "- `ref_index`: The index of the referendum to vote for."] + #[doc = "- `vote`: The vote configuration."] + pub fn vote( &self, - proposal_id: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Treasury", - "approve_proposal", - ApproveProposal { proposal_id }, + ref_index: ::core::primitive::u32, + vote: runtime_types::pallet_democracy::vote::AccountVote< + ::core::primitive::u128, + >, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Democracy", + "vote", + types::Vote { ref_index, vote }, [ - 164u8, 229u8, 172u8, 98u8, 129u8, 62u8, 84u8, 128u8, 47u8, 108u8, 33u8, - 120u8, 89u8, 79u8, 57u8, 121u8, 4u8, 197u8, 170u8, 153u8, 156u8, 17u8, - 59u8, 164u8, 123u8, 227u8, 175u8, 195u8, 220u8, 160u8, 60u8, 186u8, + 39u8, 113u8, 23u8, 175u8, 197u8, 225u8, 225u8, 129u8, 66u8, 50u8, + 236u8, 220u8, 50u8, 49u8, 98u8, 163u8, 176u8, 96u8, 17u8, 91u8, 28u8, + 187u8, 139u8, 148u8, 108u8, 110u8, 78u8, 253u8, 229u8, 3u8, 244u8, + 126u8, ], ) } - #[doc = "Propose and approve a spend of treasury funds."] + #[doc = "Schedule an emergency cancellation of a referendum. Cannot happen twice to the same"] + #[doc = "referendum."] #[doc = ""] - #[doc = "- `origin`: Must be `SpendOrigin` with the `Success` value being at least `amount`."] - #[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 `CancellationOrigin`."] #[doc = ""] - #[doc = "NOTE: For record-keeping purposes, the proposer is deemed to be equivalent to the"] - #[doc = "beneficiary."] - pub fn spend( + #[doc = "-`ref_index`: The index of the referendum to cancel."] + #[doc = ""] + #[doc = "Weight: `O(1)`."] + pub fn emergency_cancel( &self, - amount: ::core::primitive::u128, - beneficiary: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Treasury", - "spend", - Spend { - amount, - beneficiary, - }, + ref_index: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Democracy", + "emergency_cancel", + types::EmergencyCancel { ref_index }, [ - 208u8, 79u8, 96u8, 218u8, 205u8, 209u8, 165u8, 119u8, 92u8, 208u8, - 54u8, 168u8, 83u8, 190u8, 98u8, 97u8, 6u8, 2u8, 35u8, 249u8, 18u8, - 88u8, 193u8, 51u8, 130u8, 33u8, 28u8, 99u8, 49u8, 194u8, 34u8, 77u8, + 82u8, 232u8, 19u8, 158u8, 88u8, 69u8, 96u8, 225u8, 106u8, 253u8, 6u8, + 136u8, 87u8, 0u8, 68u8, 128u8, 122u8, 16u8, 107u8, 76u8, 209u8, 14u8, + 230u8, 49u8, 228u8, 100u8, 187u8, 10u8, 76u8, 71u8, 197u8, 72u8, ], ) } - #[doc = "Force a previously approved proposal to be removed from the approval queue."] - #[doc = "The original deposit will no longer be returned."] - #[doc = ""] - #[doc = "May only be called from `T::RejectOrigin`."] - #[doc = "- `proposal_id`: The index of a proposal"] + #[doc = "Schedule a referendum to be tabled once it is legal to schedule an external"] + #[doc = "referendum."] #[doc = ""] - #[doc = "# "] - #[doc = "- Complexity: O(A) where `A` is the number of approvals"] - #[doc = "- Db reads and writes: `Approvals`"] - #[doc = "# "] + #[doc = "The dispatch origin of this call must be `ExternalOrigin`."] #[doc = ""] - #[doc = "Errors:"] - #[doc = "- `ProposalNotApproved`: The `proposal_id` supplied was not found in the approval queue,"] - #[doc = "i.e., the proposal has not been approved. This could also mean the proposal does not"] - #[doc = "exist altogether, thus there is no way it would have been approved in the first place."] - pub fn remove_approval( + #[doc = "- `proposal_hash`: The preimage hash of the proposal."] + pub fn external_propose( &self, - proposal_id: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Treasury", - "remove_approval", - RemoveApproval { proposal_id }, + proposal: runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::da_runtime::RuntimeCall, + >, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Democracy", + "external_propose", + types::ExternalPropose { proposal }, [ - 133u8, 126u8, 181u8, 47u8, 196u8, 243u8, 7u8, 46u8, 25u8, 251u8, 154u8, - 125u8, 217u8, 77u8, 54u8, 245u8, 240u8, 180u8, 97u8, 34u8, 186u8, 53u8, - 225u8, 144u8, 155u8, 107u8, 172u8, 54u8, 250u8, 184u8, 178u8, 86u8, + 247u8, 47u8, 180u8, 40u8, 205u8, 53u8, 99u8, 158u8, 4u8, 45u8, 157u8, + 247u8, 32u8, 117u8, 153u8, 170u8, 226u8, 250u8, 142u8, 38u8, 237u8, + 238u8, 75u8, 245u8, 184u8, 27u8, 157u8, 255u8, 213u8, 163u8, 92u8, + 251u8, ], ) } - } - } - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::pallet_treasury::pallet::Event; - pub mod events { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "New proposal."] - pub struct Proposed { - pub proposal_index: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for Proposed { - const EVENT: &'static str = "Proposed"; - const PALLET: &'static str = "Treasury"; - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "We have ended a spend period and will now allocate funds."] - pub struct Spending { - pub budget_remaining: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for Spending { - const EVENT: &'static str = "Spending"; - const PALLET: &'static str = "Treasury"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "Some funds have been allocated."] - pub struct Awarded { - pub proposal_index: ::core::primitive::u32, - pub award: ::core::primitive::u128, - pub account: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for Awarded { - const EVENT: &'static str = "Awarded"; - const PALLET: &'static str = "Treasury"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "A proposal was rejected; funds were slashed."] - pub struct Rejected { - pub proposal_index: ::core::primitive::u32, - pub slashed: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for Rejected { - const EVENT: &'static str = "Rejected"; - const PALLET: &'static str = "Treasury"; - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "Some of our funds have been burnt."] - pub struct Burnt { - pub burnt_funds: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for Burnt { - const EVENT: &'static str = "Burnt"; - const PALLET: &'static str = "Treasury"; - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "Spending has finished; this is the amount that rolls over until next spend."] - pub struct Rollover { - pub rollover_balance: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for Rollover { - const EVENT: &'static str = "Rollover"; - const PALLET: &'static str = "Treasury"; - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "Some funds have been deposited."] - pub struct Deposit { - pub value: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for Deposit { - const EVENT: &'static str = "Deposit"; - const PALLET: &'static str = "Treasury"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "A new spend proposal has been approved."] - pub struct SpendApproved { - pub proposal_index: ::core::primitive::u32, - pub amount: ::core::primitive::u128, - pub beneficiary: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for SpendApproved { - const EVENT: &'static str = "SpendApproved"; - const PALLET: &'static str = "Treasury"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "The inactive funds of the pallet have been updated."] - pub struct UpdatedInactive { - pub reactivated: ::core::primitive::u128, - pub deactivated: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for UpdatedInactive { - const EVENT: &'static str = "UpdatedInactive"; - const PALLET: &'static str = "Treasury"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " Number of proposals that have been made."] - pub fn proposal_count( + + #[doc = "Schedule a majority-carries referendum to be tabled next once it is legal to schedule"] + #[doc = "an external referendum."] + #[doc = ""] + #[doc = "The dispatch of this call must be `ExternalMajorityOrigin`."] + #[doc = ""] + #[doc = "- `proposal_hash`: The preimage hash of the proposal."] + #[doc = ""] + #[doc = "Unlike `external_propose`, blacklisting has no effect on this and it may replace a"] + #[doc = "pre-scheduled `external_propose` call."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn external_propose_majority( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Treasury", - "ProposalCount", - vec![], + proposal: runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::da_runtime::RuntimeCall, + >, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Democracy", + "external_propose_majority", + types::ExternalProposeMajority { proposal }, [ - 132u8, 145u8, 78u8, 218u8, 51u8, 189u8, 55u8, 172u8, 143u8, 33u8, - 140u8, 99u8, 124u8, 208u8, 57u8, 232u8, 154u8, 110u8, 32u8, 142u8, - 24u8, 149u8, 109u8, 105u8, 30u8, 83u8, 39u8, 177u8, 127u8, 160u8, 34u8, - 70u8, + 107u8, 81u8, 160u8, 130u8, 242u8, 208u8, 22u8, 70u8, 237u8, 235u8, + 236u8, 60u8, 206u8, 172u8, 251u8, 138u8, 168u8, 124u8, 136u8, 95u8, + 3u8, 184u8, 12u8, 55u8, 125u8, 233u8, 20u8, 148u8, 36u8, 189u8, 16u8, + 245u8, ], ) } - #[doc = " Proposals that have been made."] - pub fn proposals( + #[doc = "Schedule a negative-turnout-bias referendum to be tabled next once it is legal to"] + #[doc = "schedule an external referendum."] + #[doc = ""] + #[doc = "The dispatch of this call must be `ExternalDefaultOrigin`."] + #[doc = ""] + #[doc = "- `proposal_hash`: The preimage hash of the proposal."] + #[doc = ""] + #[doc = "Unlike `external_propose`, blacklisting has no effect on this and it may replace a"] + #[doc = "pre-scheduled `external_propose` call."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn external_propose_default( &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_treasury::Proposal< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - >, + proposal: runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::da_runtime::RuntimeCall, >, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Treasury", - "Proposals", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Democracy", + "external_propose_default", + types::ExternalProposeDefault { proposal }, [ - 62u8, 223u8, 55u8, 209u8, 151u8, 134u8, 122u8, 65u8, 207u8, 38u8, - 113u8, 213u8, 237u8, 48u8, 129u8, 32u8, 91u8, 228u8, 108u8, 91u8, 37u8, - 49u8, 94u8, 4u8, 75u8, 122u8, 25u8, 34u8, 198u8, 224u8, 246u8, 160u8, + 238u8, 247u8, 252u8, 35u8, 78u8, 158u8, 221u8, 87u8, 252u8, 98u8, 67u8, + 44u8, 200u8, 206u8, 28u8, 19u8, 204u8, 13u8, 253u8, 133u8, 229u8, + 195u8, 166u8, 218u8, 114u8, 69u8, 23u8, 169u8, 67u8, 168u8, 46u8, + 176u8, ], ) } - #[doc = " Proposals that have been made."] - pub fn proposals_root( + #[doc = "Schedule the currently externally-proposed majority-carries referendum to be tabled"] + #[doc = "immediately. If there is no externally-proposed referendum currently, or if there is one"] + #[doc = "but it is not a majority-carries referendum then it fails."] + #[doc = ""] + #[doc = "The dispatch of this call must be `FastTrackOrigin`."] + #[doc = ""] + #[doc = "- `proposal_hash`: The hash of the current external proposal."] + #[doc = "- `voting_period`: The period that is allowed for voting on this proposal. Increased to"] + #[doc = "\tMust be always greater than zero."] + #[doc = "\tFor `FastTrackOrigin` must be equal or greater than `FastTrackVotingPeriod`."] + #[doc = "- `delay`: The number of block after voting has ended in approval and this should be"] + #[doc = " enacted. This doesn't have a minimum amount."] + #[doc = ""] + #[doc = "Emits `Started`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn fast_track( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_treasury::Proposal< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - >, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Treasury", - "Proposals", - Vec::new(), + proposal_hash: ::subxt::utils::H256, + voting_period: ::core::primitive::u32, + delay: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Democracy", + "fast_track", + types::FastTrack { + proposal_hash, + voting_period, + delay, + }, [ - 62u8, 223u8, 55u8, 209u8, 151u8, 134u8, 122u8, 65u8, 207u8, 38u8, - 113u8, 213u8, 237u8, 48u8, 129u8, 32u8, 91u8, 228u8, 108u8, 91u8, 37u8, - 49u8, 94u8, 4u8, 75u8, 122u8, 25u8, 34u8, 198u8, 224u8, 246u8, 160u8, + 147u8, 226u8, 166u8, 105u8, 149u8, 171u8, 86u8, 165u8, 168u8, 78u8, + 233u8, 182u8, 118u8, 36u8, 82u8, 155u8, 209u8, 55u8, 153u8, 141u8, + 120u8, 223u8, 46u8, 170u8, 48u8, 94u8, 32u8, 144u8, 84u8, 203u8, 68u8, + 62u8, ], ) } - #[doc = " The amount which has been reported as inactive to Currency."] - pub fn deactivated( + #[doc = "Veto and blacklist the external proposal hash."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be `VetoOrigin`."] + #[doc = ""] + #[doc = "- `proposal_hash`: The preimage hash of the proposal to veto and blacklist."] + #[doc = ""] + #[doc = "Emits `Vetoed`."] + #[doc = ""] + #[doc = "Weight: `O(V + log(V))` where V is number of `existing vetoers`"] + pub fn veto_external( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Treasury", - "Deactivated", - vec![], + proposal_hash: ::subxt::utils::H256, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Democracy", + "veto_external", + types::VetoExternal { proposal_hash }, [ - 159u8, 57u8, 5u8, 85u8, 136u8, 128u8, 70u8, 43u8, 67u8, 76u8, 123u8, - 206u8, 48u8, 253u8, 51u8, 40u8, 14u8, 35u8, 162u8, 173u8, 127u8, 79u8, - 38u8, 235u8, 9u8, 141u8, 201u8, 37u8, 211u8, 176u8, 119u8, 106u8, + 121u8, 217u8, 249u8, 134u8, 45u8, 19u8, 126u8, 166u8, 218u8, 223u8, + 165u8, 124u8, 162u8, 59u8, 56u8, 200u8, 227u8, 125u8, 23u8, 133u8, + 196u8, 93u8, 210u8, 15u8, 39u8, 26u8, 58u8, 236u8, 9u8, 101u8, 202u8, + 168u8, ], ) } - #[doc = " Proposal indices that have been approved but not yet awarded."] - pub fn approvals( + #[doc = "Remove a referendum."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be _Root_."] + #[doc = ""] + #[doc = "- `ref_index`: The index of the referendum to cancel."] + #[doc = ""] + #[doc = "# Weight: `O(1)`."] + pub fn cancel_referendum( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u32, - >, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Treasury", - "Approvals", - vec![], + ref_index: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Democracy", + "cancel_referendum", + types::CancelReferendum { ref_index }, [ - 202u8, 106u8, 189u8, 40u8, 127u8, 172u8, 108u8, 50u8, 193u8, 4u8, - 248u8, 226u8, 176u8, 101u8, 212u8, 222u8, 64u8, 206u8, 244u8, 175u8, - 111u8, 106u8, 86u8, 96u8, 19u8, 109u8, 218u8, 152u8, 30u8, 59u8, 96u8, - 1u8, + 149u8, 120u8, 70u8, 20u8, 126u8, 21u8, 30u8, 33u8, 82u8, 124u8, 229u8, + 179u8, 169u8, 243u8, 173u8, 146u8, 140u8, 22u8, 124u8, 154u8, 228u8, + 117u8, 109u8, 88u8, 11u8, 100u8, 235u8, 243u8, 118u8, 99u8, 250u8, + 140u8, ], ) } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " Fraction of a proposal's value that should be bonded in order to place the proposal."] - #[doc = " An accepted proposal gets these back. A rejected proposal does not."] - pub fn proposal_bond( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_arithmetic::per_things::Permill, - >, - > { - ::subxt::constants::StaticConstantAddress::new("Treasury", "ProposalBond", [ - 225u8, 236u8, 95u8, 157u8, 90u8, 94u8, 106u8, 192u8, 254u8, 19u8, 87u8, - 80u8, 16u8, 62u8, 42u8, 204u8, 136u8, 106u8, 225u8, 53u8, 212u8, 52u8, - 177u8, 79u8, 4u8, 116u8, 201u8, 104u8, 222u8, 75u8, 86u8, 227u8, - ]) - } - #[doc = " Minimum amount of funds that should be placed in a deposit for making a proposal."] - pub fn proposal_bond_minimum( + #[doc = "Delegate the voting power (with some given conviction) of the sending account."] + #[doc = ""] + #[doc = "The balance delegated is locked for as long as it's delegated, and thereafter for the"] + #[doc = "time appropriate for the conviction's lock period."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be _Signed_, and the signing account must either:"] + #[doc = " - be delegating already; or"] + #[doc = " - have no voting activity (if there is, then it will need to be removed/consolidated"] + #[doc = " through `reap_vote` or `unvote`)."] + #[doc = ""] + #[doc = "- `to`: The account whose voting the `target` account's voting power will follow."] + #[doc = "- `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 referendums the voter delegating to has"] + #[doc = " voted on. Weight is charged as if maximum votes."] + pub fn delegate( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, - > { - ::subxt::constants::StaticConstantAddress::new( - "Treasury", - "ProposalBondMinimum", + to: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + conviction: runtime_types::pallet_democracy::conviction::Conviction, + balance: ::core::primitive::u128, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Democracy", + "delegate", + types::Delegate { + to, + conviction, + balance, + }, [ - 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, + 252u8, 37u8, 255u8, 84u8, 153u8, 112u8, 84u8, 10u8, 131u8, 85u8, 6u8, + 204u8, 85u8, 241u8, 104u8, 155u8, 219u8, 222u8, 30u8, 7u8, 245u8, 12u8, + 101u8, 120u8, 9u8, 156u8, 65u8, 218u8, 110u8, 244u8, 24u8, 251u8, ], ) } - #[doc = " Maximum amount of funds that should be placed in a deposit for making a proposal."] - pub fn proposal_bond_maximum( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType< - ::core::option::Option<::core::primitive::u128>, - >, - > { - ::subxt::constants::StaticConstantAddress::new( - "Treasury", - "ProposalBondMaximum", + #[doc = "Undelegate the voting power of the sending account."] + #[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."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be _Signed_ and the signing account must be"] + #[doc = "currently delegating."] + #[doc = ""] + #[doc = "Emits `Undelegated`."] + #[doc = ""] + #[doc = "Weight: `O(R)` where R is the number of referendums the voter delegating to has"] + #[doc = " voted on. Weight is charged as if maximum votes."] + pub fn undelegate(&self) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Democracy", + "undelegate", + types::Undelegate {}, [ - 84u8, 154u8, 218u8, 83u8, 84u8, 189u8, 32u8, 20u8, 120u8, 194u8, 88u8, - 205u8, 109u8, 216u8, 114u8, 193u8, 120u8, 198u8, 154u8, 237u8, 134u8, - 204u8, 102u8, 247u8, 52u8, 103u8, 231u8, 43u8, 243u8, 122u8, 60u8, - 216u8, + 225u8, 156u8, 102u8, 1u8, 172u8, 145u8, 88u8, 12u8, 89u8, 32u8, 51u8, + 83u8, 25u8, 149u8, 132u8, 203u8, 246u8, 98u8, 155u8, 36u8, 165u8, + 206u8, 233u8, 169u8, 91u8, 85u8, 105u8, 67u8, 46u8, 134u8, 244u8, + 250u8, ], ) } - #[doc = " Period between successive spends."] - pub fn spend_period( + #[doc = "Clears all public proposals."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be _Root_."] + #[doc = ""] + #[doc = "Weight: `O(1)`."] + pub fn clear_public_proposals( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { - ::subxt::constants::StaticConstantAddress::new("Treasury", "SpendPeriod", [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, 125u8, - 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, 178u8, 197u8, - 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, 145u8, - ]) + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Democracy", + "clear_public_proposals", + types::ClearPublicProposals {}, + [ + 116u8, 160u8, 246u8, 216u8, 23u8, 188u8, 144u8, 63u8, 97u8, 198u8, + 11u8, 243u8, 165u8, 84u8, 159u8, 153u8, 235u8, 169u8, 166u8, 15u8, + 23u8, 116u8, 30u8, 56u8, 133u8, 31u8, 158u8, 114u8, 158u8, 86u8, 106u8, + 93u8, + ], + ) } - #[doc = " Percentage of spare funds (if any) that are burnt per spend period."] - pub fn burn( + #[doc = "Unlock tokens that have an expired lock."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be _Signed_."] + #[doc = ""] + #[doc = "- `target`: The account to remove the lock on."] + #[doc = ""] + #[doc = "Weight: `O(R)` with R number of vote of target."] + pub fn unlock( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_arithmetic::per_things::Permill, + target: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, >, - > { - ::subxt::constants::StaticConstantAddress::new("Treasury", "Burn", [ - 225u8, 236u8, 95u8, 157u8, 90u8, 94u8, 106u8, 192u8, 254u8, 19u8, 87u8, - 80u8, 16u8, 62u8, 42u8, 204u8, 136u8, 106u8, 225u8, 53u8, 212u8, 52u8, - 177u8, 79u8, 4u8, 116u8, 201u8, 104u8, 222u8, 75u8, 86u8, 227u8, - ]) + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Democracy", + "unlock", + types::Unlock { target }, + [ + 134u8, 220u8, 108u8, 243u8, 205u8, 162u8, 111u8, 77u8, 224u8, 62u8, + 27u8, 214u8, 97u8, 83u8, 212u8, 96u8, 68u8, 123u8, 160u8, 70u8, 127u8, + 255u8, 94u8, 57u8, 224u8, 165u8, 250u8, 65u8, 13u8, 122u8, 101u8, 56u8, + ], + ) } - #[doc = " The treasury's pallet id, used for deriving its sovereign account ID."] - pub fn pallet_id( + #[doc = "Remove a vote for a referendum."] + #[doc = ""] + #[doc = "If:"] + #[doc = "- the referendum was cancelled, or"] + #[doc = "- the referendum is ongoing, or"] + #[doc = "- the referendum 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 referendum 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 referendum `index`."] + #[doc = ""] + #[doc = "- `index`: The index of referendum of the vote to be removed."] + #[doc = ""] + #[doc = "Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on."] + #[doc = " Weight is calculated for the maximum number of vote."] + pub fn remove_vote( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType, - > { - ::subxt::constants::StaticConstantAddress::new("Treasury", "PalletId", [ - 139u8, 109u8, 228u8, 151u8, 252u8, 32u8, 130u8, 69u8, 112u8, 154u8, 174u8, - 45u8, 83u8, 245u8, 51u8, 132u8, 173u8, 5u8, 186u8, 24u8, 243u8, 9u8, 12u8, - 214u8, 80u8, 74u8, 69u8, 189u8, 30u8, 94u8, 22u8, 39u8, - ]) + index: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Democracy", + "remove_vote", + types::RemoveVote { index }, + [ + 98u8, 146u8, 215u8, 63u8, 222u8, 70u8, 61u8, 186u8, 90u8, 34u8, 63u8, + 25u8, 195u8, 119u8, 228u8, 189u8, 38u8, 163u8, 58u8, 210u8, 216u8, + 156u8, 20u8, 204u8, 136u8, 192u8, 33u8, 210u8, 124u8, 65u8, 153u8, + 105u8, + ], + ) } - #[doc = " The maximum number of approvals that can wait in the spending queue."] + #[doc = "Remove a vote for a referendum."] #[doc = ""] - #[doc = " NOTE: This parameter is also used within the Bounties Pallet extension if enabled."] - pub fn max_approvals( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { - ::subxt::constants::StaticConstantAddress::new("Treasury", "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, - ]) - } - } - } - } - pub mod sudo { - use super::{root_mod, runtime_types}; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::{root_mod, runtime_types}; - type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Sudo { - pub call: ::std::boxed::Box, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct SudoUncheckedWeight { - pub call: ::std::boxed::Box, - pub weight: runtime_types::sp_weights::weight_v2::Weight, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct SetKey { - pub new: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct SudoAs { - pub who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pub call: ::std::boxed::Box, - } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Authenticates the sudo key and dispatches a function call with `Root` 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 referendum was cancelled, because the voter lost the referendum or"] + #[doc = "because the conviction period is over."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = "The dispatch origin of this call must be _Signed_."] #[doc = ""] - #[doc = "# "] - #[doc = "- O(1)."] - #[doc = "- Limited storage reads."] - #[doc = "- One DB write (event)."] - #[doc = "- Weight of derivative `call` execution + 10,000."] - #[doc = "# "] - pub fn sudo( + #[doc = "- `target`: The account of the vote to be removed; this account must have voted for"] + #[doc = " referendum `index`."] + #[doc = "- `index`: The index of referendum of the vote to be removed."] + #[doc = ""] + #[doc = "Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on."] + #[doc = " Weight is calculated for the maximum number of vote."] + pub fn remove_other_vote( &self, - call: runtime_types::da_runtime::RuntimeCall, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Sudo", - "sudo", - Sudo { - call: ::std::boxed::Box::new(call), - }, + target: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + index: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Democracy", + "remove_other_vote", + types::RemoveOtherVote { target, index }, [ - 127u8, 84u8, 46u8, 210u8, 218u8, 57u8, 84u8, 156u8, 188u8, 154u8, - 132u8, 229u8, 88u8, 99u8, 40u8, 52u8, 118u8, 193u8, 206u8, 178u8, 43u8, - 20u8, 99u8, 182u8, 180u8, 160u8, 220u8, 183u8, 50u8, 80u8, 97u8, 47u8, + 92u8, 152u8, 49u8, 134u8, 235u8, 186u8, 109u8, 234u8, 16u8, 129u8, + 255u8, 88u8, 231u8, 177u8, 197u8, 125u8, 105u8, 228u8, 69u8, 38u8, + 231u8, 178u8, 75u8, 197u8, 113u8, 213u8, 157u8, 5u8, 68u8, 75u8, 155u8, + 47u8, ], ) } - #[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 = "Permanently place a proposal into the blacklist. This prevents it from ever being"] + #[doc = "proposed again."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = "If called on a queued public or external proposal, then this will result in it being"] + #[doc = "removed. If the `ref_index` supplied is an active referendum with the proposal hash,"] + #[doc = "then it will be cancelled."] #[doc = ""] - #[doc = "# "] - #[doc = "- O(1)."] - #[doc = "- The weight of this call is defined by the caller."] - #[doc = "# "] - pub fn sudo_unchecked_weight( + #[doc = "The dispatch origin of this call must be `BlacklistOrigin`."] + #[doc = ""] + #[doc = "- `proposal_hash`: The proposal hash to blacklist permanently."] + #[doc = "- `ref_index`: An ongoing referendum whose hash is `proposal_hash`, which will be"] + #[doc = "cancelled."] + #[doc = ""] + #[doc = "Weight: `O(p)` (though as this is an high-privilege dispatch, we assume it has a"] + #[doc = " reasonable value)."] + pub fn blacklist( &self, - call: runtime_types::da_runtime::RuntimeCall, - weight: runtime_types::sp_weights::weight_v2::Weight, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Sudo", - "sudo_unchecked_weight", - SudoUncheckedWeight { - call: ::std::boxed::Box::new(call), - weight, + proposal_hash: ::subxt::utils::H256, + maybe_ref_index: ::core::option::Option<::core::primitive::u32>, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Democracy", + "blacklist", + types::Blacklist { + proposal_hash, + maybe_ref_index, }, [ - 43u8, 181u8, 131u8, 128u8, 150u8, 45u8, 141u8, 240u8, 64u8, 56u8, - 243u8, 55u8, 48u8, 140u8, 173u8, 130u8, 88u8, 239u8, 26u8, 11u8, 177u8, - 191u8, 56u8, 176u8, 115u8, 236u8, 191u8, 11u8, 169u8, 64u8, 82u8, - 207u8, + 227u8, 200u8, 88u8, 154u8, 134u8, 121u8, 131u8, 177u8, 94u8, 119u8, + 12u8, 129u8, 150u8, 59u8, 108u8, 103u8, 109u8, 55u8, 220u8, 211u8, + 250u8, 103u8, 160u8, 170u8, 63u8, 142u8, 112u8, 244u8, 29u8, 238u8, + 101u8, 24u8, ], ) } - #[doc = "Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo"] - #[doc = "key."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = "Remove a proposal."] #[doc = ""] - #[doc = "# "] - #[doc = "- O(1)."] - #[doc = "- Limited storage reads."] - #[doc = "- One DB change."] - #[doc = "# "] - pub fn set_key( - &self, - new: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new("Sudo", "set_key", SetKey { new }, [ - 34u8, 116u8, 170u8, 18u8, 106u8, 17u8, 231u8, 159u8, 110u8, 246u8, 2u8, - 27u8, 161u8, 155u8, 163u8, 41u8, 138u8, 7u8, 81u8, 98u8, 230u8, 182u8, - 23u8, 222u8, 240u8, 117u8, 173u8, 232u8, 192u8, 55u8, 92u8, 208u8, - ]) - } - - #[doc = "Authenticates the sudo key and dispatches a function call with `Signed` origin from"] - #[doc = "a given account."] + #[doc = "The dispatch origin of this call must be `CancelProposalOrigin`."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = "- `prop_index`: The index of the proposal to cancel."] #[doc = ""] - #[doc = "# "] - #[doc = "- O(1)."] - #[doc = "- Limited storage reads."] - #[doc = "- One DB write (event)."] - #[doc = "- Weight of derivative `call` execution + 10,000."] - #[doc = "# "] - pub fn sudo_as( + #[doc = "Weight: `O(p)` where `p = PublicProps::::decode_len()`"] + pub fn cancel_proposal( &self, - who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - call: runtime_types::da_runtime::RuntimeCall, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Sudo", - "sudo_as", - SudoAs { - who, - call: ::std::boxed::Box::new(call), - }, + prop_index: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Democracy", + "cancel_proposal", + types::CancelProposal { prop_index }, [ - 116u8, 66u8, 7u8, 118u8, 235u8, 36u8, 251u8, 252u8, 33u8, 205u8, 103u8, - 152u8, 121u8, 252u8, 79u8, 23u8, 40u8, 209u8, 167u8, 174u8, 36u8, 33u8, - 81u8, 72u8, 9u8, 76u8, 201u8, 100u8, 1u8, 240u8, 160u8, 57u8, + 213u8, 5u8, 215u8, 209u8, 71u8, 229u8, 66u8, 38u8, 171u8, 38u8, 14u8, + 103u8, 248u8, 176u8, 217u8, 143u8, 234u8, 89u8, 110u8, 250u8, 3u8, + 190u8, 151u8, 74u8, 55u8, 58u8, 249u8, 138u8, 25u8, 191u8, 55u8, 142u8, ], ) } } } #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::pallet_sudo::pallet::Event; + pub type Event = runtime_types::pallet_democracy::pallet::Event; pub mod events { use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "A sudo just took place. \\[result\\]"] - pub struct Sudid { - pub sudo_result: - ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A motion has been proposed by a public account."] + pub struct Proposed { + pub proposal_index: ::core::primitive::u32, + pub deposit: ::core::primitive::u128, } - impl ::subxt::events::StaticEvent for Sudid { - const EVENT: &'static str = "Sudid"; - const PALLET: &'static str = "Sudo"; + impl ::subxt::events::StaticEvent for Proposed { + const EVENT: &'static str = "Proposed"; + const PALLET: &'static str = "Democracy"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "The \\[sudoer\\] just switched identity; the old key is supplied if one existed."] - pub struct KeyChanged { - pub old_sudoer: ::core::option::Option<::subxt::utils::AccountId32>, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A public proposal has been tabled for referendum vote."] + pub struct Tabled { + pub proposal_index: ::core::primitive::u32, + pub deposit: ::core::primitive::u128, } - impl ::subxt::events::StaticEvent for KeyChanged { - const EVENT: &'static str = "KeyChanged"; - const PALLET: &'static str = "Sudo"; + impl ::subxt::events::StaticEvent for Tabled { + const EVENT: &'static str = "Tabled"; + const PALLET: &'static str = "Democracy"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "A sudo just took place. \\[result\\]"] - pub struct SudoAsDone { - pub sudo_result: - ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "An external proposal has been tabled."] + pub struct ExternalTabled; + impl ::subxt::events::StaticEvent for ExternalTabled { + const EVENT: &'static str = "ExternalTabled"; + const PALLET: &'static str = "Democracy"; } - impl ::subxt::events::StaticEvent for SudoAsDone { - const EVENT: &'static str = "SudoAsDone"; - const PALLET: &'static str = "Sudo"; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A referendum has begun."] + pub struct Started { + pub ref_index: ::core::primitive::u32, + pub threshold: runtime_types::pallet_democracy::vote_threshold::VoteThreshold, } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " The `AccountId` of the sudo key."] - pub fn key( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::subxt::utils::AccountId32>, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new("Sudo", "Key", vec![], [ - 244u8, 73u8, 188u8, 136u8, 218u8, 163u8, 68u8, 179u8, 122u8, 173u8, 34u8, - 108u8, 137u8, 28u8, 182u8, 16u8, 196u8, 92u8, 138u8, 34u8, 102u8, 80u8, - 199u8, 88u8, 107u8, 207u8, 36u8, 22u8, 168u8, 167u8, 20u8, 142u8, - ]) - } + impl ::subxt::events::StaticEvent for Started { + const EVENT: &'static str = "Started"; + const PALLET: &'static str = "Democracy"; } - } - } - pub mod im_online { - use super::{root_mod, runtime_types}; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::{root_mod, runtime_types}; - type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - pub struct Heartbeat { - pub heartbeat: runtime_types::pallet_im_online::Heartbeat<::core::primitive::u32>, - pub signature: runtime_types::pallet_im_online::sr25519::app_sr25519::Signature, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A proposal has been approved by referendum."] + pub struct Passed { + pub ref_index: ::core::primitive::u32, } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "# "] - #[doc = "- Complexity: `O(K + E)` where K is length of `Keys` (heartbeat.validators_len) and E is"] - #[doc = " length of `heartbeat.network_state.external_address`"] - #[doc = " - `O(K)`: decoding of length `K`"] - #[doc = " - `O(E)`: decoding/encoding of length `E`"] - #[doc = "- DbReads: pallet_session `Validators`, pallet_session `CurrentIndex`, `Keys`,"] - #[doc = " `ReceivedHeartbeats`"] - #[doc = "- DbWrites: `ReceivedHeartbeats`"] - #[doc = "# "] - pub fn heartbeat( - &self, - heartbeat: runtime_types::pallet_im_online::Heartbeat<::core::primitive::u32>, - signature: runtime_types::pallet_im_online::sr25519::app_sr25519::Signature, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "ImOnline", - "heartbeat", - Heartbeat { - heartbeat, - signature, - }, - [ - 212u8, 23u8, 174u8, 246u8, 60u8, 220u8, 178u8, 137u8, 53u8, 146u8, - 165u8, 225u8, 179u8, 209u8, 233u8, 152u8, 129u8, 210u8, 126u8, 32u8, - 216u8, 22u8, 76u8, 196u8, 255u8, 128u8, 246u8, 161u8, 30u8, 186u8, - 249u8, 34u8, - ], - ) - } + impl ::subxt::events::StaticEvent for Passed { + const EVENT: &'static str = "Passed"; + const PALLET: &'static str = "Democracy"; } - } - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::pallet_im_online::pallet::Event; - pub mod events { - use super::runtime_types; #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "A new heartbeat was received from `AuthorityId`."] - pub struct HeartbeatReceived { - pub authority_id: runtime_types::pallet_im_online::sr25519::app_sr25519::Public, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A proposal has been rejected by referendum."] + pub struct NotPassed { + pub ref_index: ::core::primitive::u32, } - impl ::subxt::events::StaticEvent for HeartbeatReceived { - const EVENT: &'static str = "HeartbeatReceived"; - const PALLET: &'static str = "ImOnline"; + impl ::subxt::events::StaticEvent for NotPassed { + const EVENT: &'static str = "NotPassed"; + const PALLET: &'static str = "Democracy"; } #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "At the end of the session, no offence was committed."] - pub struct AllGood; - impl ::subxt::events::StaticEvent for AllGood { - const EVENT: &'static str = "AllGood"; - const PALLET: &'static str = "ImOnline"; + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A referendum has been cancelled."] + pub struct Cancelled { + pub ref_index: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for Cancelled { + const EVENT: &'static str = "Cancelled"; + const PALLET: &'static str = "Democracy"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "At the end of the session, at least one validator was found to be offline."] - pub struct SomeOffline { - pub offline: ::std::vec::Vec<( - ::subxt::utils::AccountId32, - runtime_types::pallet_staking::Exposure< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - >, - )>, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "An account has delegated their vote to another account."] + pub struct Delegated { + pub who: ::subxt::utils::AccountId32, + pub target: ::subxt::utils::AccountId32, } - impl ::subxt::events::StaticEvent for SomeOffline { - const EVENT: &'static str = "SomeOffline"; - const PALLET: &'static str = "ImOnline"; + impl ::subxt::events::StaticEvent for Delegated { + const EVENT: &'static str = "Delegated"; + const PALLET: &'static str = "Democracy"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "An account has cancelled a previous delegation operation."] + pub struct Undelegated { + pub account: ::subxt::utils::AccountId32, + } + impl ::subxt::events::StaticEvent for Undelegated { + const EVENT: &'static str = "Undelegated"; + const PALLET: &'static str = "Democracy"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "An external proposal has been vetoed."] + pub struct Vetoed { + pub who: ::subxt::utils::AccountId32, + pub proposal_hash: ::subxt::utils::H256, + pub until: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for Vetoed { + const EVENT: &'static str = "Vetoed"; + const PALLET: &'static str = "Democracy"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A proposal_hash has been blacklisted permanently."] + pub struct Blacklisted { + pub proposal_hash: ::subxt::utils::H256, + } + impl ::subxt::events::StaticEvent for Blacklisted { + const EVENT: &'static str = "Blacklisted"; + const PALLET: &'static str = "Democracy"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "An account has voted in a referendum"] + pub struct Voted { + pub voter: ::subxt::utils::AccountId32, + pub ref_index: ::core::primitive::u32, + pub vote: + runtime_types::pallet_democracy::vote::AccountVote<::core::primitive::u128>, + } + impl ::subxt::events::StaticEvent for Voted { + const EVENT: &'static str = "Voted"; + const PALLET: &'static str = "Democracy"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "An account has secconded a proposal"] + pub struct Seconded { + pub seconder: ::subxt::utils::AccountId32, + pub prop_index: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for Seconded { + const EVENT: &'static str = "Seconded"; + const PALLET: &'static str = "Democracy"; + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A proposal got canceled."] + pub struct ProposalCanceled { + pub prop_index: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for ProposalCanceled { + const EVENT: &'static str = "ProposalCanceled"; + const PALLET: &'static str = "Democracy"; } } pub mod storage { use super::runtime_types; pub struct StorageApi; impl StorageApi { - #[doc = " The block number after which it's ok to send heartbeats in the current"] - #[doc = " session."] - #[doc = ""] - #[doc = " At the beginning of each session we set this to a value that should fall"] - #[doc = " roughly in the middle of the session duration. The idea is to first wait for"] - #[doc = " the validators to produce a block in the current session, so that the"] - #[doc = " heartbeat later on will not be necessary."] - #[doc = ""] - #[doc = " This value will only be used as a fallback if we fail to get a proper session"] - #[doc = " progress estimate from `NextSessionRotation`, as those estimates should be"] - #[doc = " more accurate then the value we calculate for `HeartbeatAfter`."] - pub fn heartbeat_after( + #[doc = " The number of (public) proposals that have been made so far."] + pub fn public_prop_count( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), > { - ::subxt::storage::address::StaticStorageAddress::new( - "ImOnline", - "HeartbeatAfter", + ::subxt::storage::address::Address::new_static( + "Democracy", + "PublicPropCount", vec![], [ - 108u8, 100u8, 85u8, 198u8, 226u8, 122u8, 94u8, 225u8, 97u8, 154u8, - 135u8, 95u8, 106u8, 28u8, 185u8, 78u8, 192u8, 196u8, 35u8, 191u8, 12u8, - 19u8, 163u8, 46u8, 232u8, 235u8, 193u8, 81u8, 126u8, 204u8, 25u8, - 228u8, + 51u8, 175u8, 184u8, 94u8, 91u8, 212u8, 100u8, 108u8, 127u8, 162u8, + 233u8, 137u8, 12u8, 209u8, 29u8, 130u8, 125u8, 179u8, 208u8, 160u8, + 173u8, 149u8, 12u8, 111u8, 1u8, 82u8, 196u8, 137u8, 51u8, 204u8, 153u8, + 198u8, ], ) } - #[doc = " The current set of keys that may issue a heartbeat."] - pub fn keys( + #[doc = " The public proposals. Unsorted. The second item is the proposal."] + pub fn public_props( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec< - runtime_types::pallet_im_online::sr25519::app_sr25519::Public, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::sp_core::bounded::bounded_vec::BoundedVec<( + ::core::primitive::u32, + runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::da_runtime::RuntimeCall, >, - >, + ::subxt::utils::AccountId32, + )>, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), > { - ::subxt::storage::address::StaticStorageAddress::new( - "ImOnline", - "Keys", + ::subxt::storage::address::Address::new_static( + "Democracy", + "PublicProps", vec![], [ - 6u8, 198u8, 221u8, 58u8, 14u8, 166u8, 245u8, 103u8, 191u8, 20u8, 69u8, - 233u8, 147u8, 245u8, 24u8, 64u8, 207u8, 180u8, 39u8, 208u8, 252u8, - 236u8, 247u8, 112u8, 187u8, 97u8, 70u8, 11u8, 248u8, 148u8, 208u8, - 106u8, + 156u8, 21u8, 84u8, 229u8, 193u8, 34u8, 28u8, 230u8, 11u8, 108u8, 2u8, + 84u8, 188u8, 11u8, 25u8, 55u8, 130u8, 80u8, 164u8, 239u8, 150u8, 77u8, + 4u8, 246u8, 174u8, 16u8, 232u8, 23u8, 9u8, 194u8, 177u8, 73u8, ], ) } - #[doc = " For each session index, we keep a mapping of `SessionIndex` and `AuthIndex` to"] - #[doc = " `WrapperOpaque`."] - pub fn received_heartbeats( + #[doc = " Those who have locked a deposit."] + #[doc = ""] + #[doc = " TWOX-NOTE: Safe, as increasing integer keys are safe."] + pub fn deposit_of( &self, _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - _1: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::frame_support::traits::misc::WrapperOpaque< - runtime_types::pallet_im_online::BoundedOpaqueNetworkState, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ( + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::subxt::utils::AccountId32, >, - >, + ::core::primitive::u128, + ), ::subxt::storage::address::Yes, (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "ImOnline", - "ReceivedHeartbeats", - vec![ - ::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - ), - ::subxt::storage::address::StorageMapKey::new( - _1.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - ), - ], + ::subxt::storage::address::Address::new_static( + "Democracy", + "DepositOf", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], [ - 233u8, 128u8, 140u8, 233u8, 55u8, 146u8, 172u8, 54u8, 54u8, 57u8, - 141u8, 106u8, 168u8, 59u8, 147u8, 253u8, 119u8, 48u8, 50u8, 251u8, - 242u8, 109u8, 251u8, 2u8, 136u8, 80u8, 146u8, 121u8, 180u8, 219u8, - 245u8, 37u8, + 115u8, 12u8, 250u8, 191u8, 201u8, 165u8, 90u8, 140u8, 101u8, 47u8, + 46u8, 3u8, 78u8, 30u8, 180u8, 22u8, 28u8, 154u8, 36u8, 99u8, 255u8, + 84u8, 33u8, 21u8, 65u8, 110u8, 52u8, 245u8, 19u8, 6u8, 104u8, 167u8, ], ) } - #[doc = " For each session index, we keep a mapping of `SessionIndex` and `AuthIndex` to"] - #[doc = " `WrapperOpaque`."] - pub fn received_heartbeats_root( + #[doc = " Those who have locked a deposit."] + #[doc = ""] + #[doc = " TWOX-NOTE: Safe, as increasing integer keys are safe."] + pub fn deposit_of_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::frame_support::traits::misc::WrapperOpaque< - runtime_types::pallet_im_online::BoundedOpaqueNetworkState, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ( + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::subxt::utils::AccountId32, >, - >, + ::core::primitive::u128, + ), (), (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "ImOnline", - "ReceivedHeartbeats", + ::subxt::storage::address::Address::new_static( + "Democracy", + "DepositOf", Vec::new(), [ - 233u8, 128u8, 140u8, 233u8, 55u8, 146u8, 172u8, 54u8, 54u8, 57u8, - 141u8, 106u8, 168u8, 59u8, 147u8, 253u8, 119u8, 48u8, 50u8, 251u8, - 242u8, 109u8, 251u8, 2u8, 136u8, 80u8, 146u8, 121u8, 180u8, 219u8, - 245u8, 37u8, + 115u8, 12u8, 250u8, 191u8, 201u8, 165u8, 90u8, 140u8, 101u8, 47u8, + 46u8, 3u8, 78u8, 30u8, 180u8, 22u8, 28u8, 154u8, 36u8, 99u8, 255u8, + 84u8, 33u8, 21u8, 65u8, 110u8, 52u8, 245u8, 19u8, 6u8, 104u8, 167u8, ], ) } - #[doc = " For each session index, we keep a mapping of `ValidatorId` to the"] - #[doc = " number of blocks authored by the given authority."] - pub fn authored_blocks( + #[doc = " The next free referendum index, aka the number of referenda started so far."] + pub fn referendum_count( &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - _1: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, + (), > { - ::subxt::storage::address::StaticStorageAddress::new( - "ImOnline", - "AuthoredBlocks", - vec![ - ::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - ), - ::subxt::storage::address::StorageMapKey::new( - _1.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - ), - ], + ::subxt::storage::address::Address::new_static( + "Democracy", + "ReferendumCount", + vec![], [ - 50u8, 4u8, 242u8, 240u8, 247u8, 184u8, 114u8, 245u8, 233u8, 170u8, - 24u8, 197u8, 18u8, 245u8, 8u8, 28u8, 33u8, 115u8, 166u8, 245u8, 221u8, - 223u8, 56u8, 144u8, 33u8, 139u8, 10u8, 227u8, 228u8, 223u8, 103u8, - 151u8, + 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 = " For each session index, we keep a mapping of `ValidatorId` to the"] - #[doc = " number of blocks authored by the given authority."] - pub fn authored_blocks_root( + #[doc = " The lowest referendum index representing an unbaked referendum. Equal to"] + #[doc = " `ReferendumCount` if there isn't a unbaked referendum."] + pub fn lowest_unbaked( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - (), + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, + (), > { - ::subxt::storage::address::StaticStorageAddress::new( - "ImOnline", - "AuthoredBlocks", - Vec::new(), + ::subxt::storage::address::Address::new_static( + "Democracy", + "LowestUnbaked", + vec![], [ - 50u8, 4u8, 242u8, 240u8, 247u8, 184u8, 114u8, 245u8, 233u8, 170u8, - 24u8, 197u8, 18u8, 245u8, 8u8, 28u8, 33u8, 115u8, 166u8, 245u8, 221u8, - 223u8, 56u8, 144u8, 33u8, 139u8, 10u8, 227u8, 228u8, 223u8, 103u8, - 151u8, + 237u8, 222u8, 144u8, 214u8, 0u8, 186u8, 81u8, 176u8, 51u8, 14u8, 204u8, + 184u8, 147u8, 97u8, 187u8, 84u8, 40u8, 8u8, 86u8, 241u8, 16u8, 157u8, + 202u8, 44u8, 185u8, 111u8, 70u8, 114u8, 40u8, 135u8, 1u8, 155u8, ], ) } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " A configuration for base priority of unsigned transactions."] + + #[doc = " Information concerning any given referendum."] #[doc = ""] - #[doc = " This is exposed so that it can be tuned for particular runtime, when"] - #[doc = " multiple pallets send unsigned transactions."] - pub fn unsigned_priority( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u64>, - > { - ::subxt::constants::StaticConstantAddress::new( - "ImOnline", - "UnsignedPriority", - [ - 128u8, 214u8, 205u8, 242u8, 181u8, 142u8, 124u8, 231u8, 190u8, 146u8, - 59u8, 226u8, 157u8, 101u8, 103u8, 117u8, 249u8, 65u8, 18u8, 191u8, - 103u8, 119u8, 53u8, 85u8, 81u8, 96u8, 220u8, 42u8, 184u8, 239u8, 42u8, - 246u8, - ], - ) - } - } - } - } - pub mod authority_discovery { - use super::{root_mod, runtime_types}; - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " Keys of the current authority set."] - pub fn keys( + #[doc = " TWOX-NOTE: SAFE as indexes are not under an attacker’s control."] + pub fn referendum_info_of( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec< - runtime_types::sp_authority_discovery::app::Public, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_democracy::types::ReferendumInfo< + ::core::primitive::u32, + runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::da_runtime::RuntimeCall, >, + ::core::primitive::u128, >, ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "AuthorityDiscovery", - "Keys", - vec![], + ::subxt::storage::address::Address::new_static( + "Democracy", + "ReferendumInfoOf", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], [ - 6u8, 198u8, 221u8, 58u8, 14u8, 166u8, 245u8, 103u8, 191u8, 20u8, 69u8, - 233u8, 147u8, 245u8, 24u8, 64u8, 207u8, 180u8, 39u8, 208u8, 252u8, - 236u8, 247u8, 112u8, 187u8, 97u8, 70u8, 11u8, 248u8, 148u8, 208u8, - 106u8, + 250u8, 201u8, 144u8, 220u8, 13u8, 14u8, 69u8, 171u8, 240u8, 119u8, + 158u8, 200u8, 86u8, 77u8, 115u8, 156u8, 156u8, 101u8, 215u8, 233u8, + 165u8, 96u8, 62u8, 201u8, 83u8, 203u8, 58u8, 67u8, 49u8, 174u8, 86u8, + 242u8, ], ) } - #[doc = " Keys of the next authority set."] - pub fn next_keys( + #[doc = " Information concerning any given referendum."] + #[doc = ""] + #[doc = " TWOX-NOTE: SAFE as indexes are not under an attacker’s control."] + pub fn referendum_info_of_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec< - runtime_types::sp_authority_discovery::app::Public, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_democracy::types::ReferendumInfo< + ::core::primitive::u32, + runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::da_runtime::RuntimeCall, >, + ::core::primitive::u128, >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, (), + (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "AuthorityDiscovery", - "NextKeys", - vec![], + ::subxt::storage::address::Address::new_static( + "Democracy", + "ReferendumInfoOf", + Vec::new(), [ - 213u8, 94u8, 49u8, 159u8, 135u8, 1u8, 13u8, 150u8, 28u8, 15u8, 105u8, - 130u8, 90u8, 15u8, 130u8, 138u8, 186u8, 118u8, 10u8, 238u8, 173u8, - 229u8, 8u8, 144u8, 206u8, 121u8, 90u8, 203u8, 125u8, 106u8, 145u8, - 144u8, + 250u8, 201u8, 144u8, 220u8, 13u8, 14u8, 69u8, 171u8, 240u8, 119u8, + 158u8, 200u8, 86u8, 77u8, 115u8, 156u8, 156u8, 101u8, 215u8, 233u8, + 165u8, 96u8, 62u8, 201u8, 83u8, 203u8, 58u8, 67u8, 49u8, 174u8, 86u8, + 242u8, ], ) } - } - } - } - pub mod offences { - use super::{root_mod, runtime_types}; - #[doc = "Events type."] - pub type Event = runtime_types::pallet_offences::pallet::Event; - pub mod events { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "There is an offence reported of the given `kind` happened at the `session_index` and"] - #[doc = "(kind-specific) time slot. This event is not deposited for duplicate slashes."] - #[doc = "\\[kind, timeslot\\]."] - pub struct Offence { - pub kind: [::core::primitive::u8; 16usize], - pub timeslot: ::std::vec::Vec<::core::primitive::u8>, - } - impl ::subxt::events::StaticEvent for Offence { - const EVENT: &'static str = "Offence"; - const PALLET: &'static str = "Offences"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " The primary structure that holds all offence records keyed by report identifiers."] - pub fn reports( + + #[doc = " All votes for a particular voter. We store the balance for the number of votes that we"] + #[doc = " have recorded. The second item is the total amount of delegations, that will be added."] + #[doc = ""] + #[doc = " TWOX-NOTE: SAFE as `AccountId`s are crypto hashes anyway."] + pub fn voting_of( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_staking::offence::OffenceDetails< - ::subxt::utils::AccountId32, - ( - ::subxt::utils::AccountId32, - runtime_types::pallet_staking::Exposure< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - >, - ), - >, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_democracy::vote::Voting< + ::core::primitive::u128, + ::subxt::utils::AccountId32, + ::core::primitive::u32, >, ::subxt::storage::address::Yes, - (), + ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Offences", - "Reports", - vec![::subxt::storage::address::StorageMapKey::new( + ::subxt::storage::address::Address::new_static( + "Democracy", + "VotingOf", + vec![::subxt::storage::address::make_static_storage_map_key( _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ - 144u8, 30u8, 66u8, 199u8, 102u8, 236u8, 175u8, 201u8, 206u8, 170u8, - 55u8, 162u8, 137u8, 120u8, 220u8, 213u8, 57u8, 252u8, 0u8, 88u8, 210u8, - 68u8, 5u8, 25u8, 77u8, 114u8, 204u8, 23u8, 190u8, 32u8, 211u8, 30u8, + 170u8, 234u8, 179u8, 190u8, 153u8, 172u8, 83u8, 105u8, 57u8, 88u8, + 183u8, 54u8, 172u8, 149u8, 222u8, 240u8, 128u8, 46u8, 25u8, 10u8, + 205u8, 69u8, 164u8, 173u8, 55u8, 188u8, 196u8, 51u8, 129u8, 206u8, + 87u8, 249u8, ], ) } - #[doc = " The primary structure that holds all offence records keyed by report identifiers."] - pub fn reports_root( + #[doc = " All votes for a particular voter. We store the balance for the number of votes that we"] + #[doc = " have recorded. The second item is the total amount of delegations, that will be added."] + #[doc = ""] + #[doc = " TWOX-NOTE: SAFE as `AccountId`s are crypto hashes anyway."] + pub fn voting_of_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_staking::offence::OffenceDetails< - ::subxt::utils::AccountId32, - ( - ::subxt::utils::AccountId32, - runtime_types::pallet_staking::Exposure< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - >, - ), - >, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_democracy::vote::Voting< + ::core::primitive::u128, + ::subxt::utils::AccountId32, + ::core::primitive::u32, >, (), - (), + ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Offences", - "Reports", + ::subxt::storage::address::Address::new_static( + "Democracy", + "VotingOf", Vec::new(), [ - 144u8, 30u8, 66u8, 199u8, 102u8, 236u8, 175u8, 201u8, 206u8, 170u8, - 55u8, 162u8, 137u8, 120u8, 220u8, 213u8, 57u8, 252u8, 0u8, 88u8, 210u8, - 68u8, 5u8, 25u8, 77u8, 114u8, 204u8, 23u8, 190u8, 32u8, 211u8, 30u8, + 170u8, 234u8, 179u8, 190u8, 153u8, 172u8, 83u8, 105u8, 57u8, 88u8, + 183u8, 54u8, 172u8, 149u8, 222u8, 240u8, 128u8, 46u8, 25u8, 10u8, + 205u8, 69u8, 164u8, 173u8, 55u8, 188u8, 196u8, 51u8, 129u8, 206u8, + 87u8, 249u8, ], ) } - #[doc = " A vector of reports of the same kind that happened at the same time slot."] - pub fn concurrent_reports_index( + #[doc = " True if the last referendum tabled was submitted externally. False if it was a public"] + #[doc = " proposal."] + pub fn last_tabled_was_external( &self, - _0: impl ::std::borrow::Borrow<[::core::primitive::u8; 16usize]>, - _1: impl ::std::borrow::Borrow<[::core::primitive::u8]>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::std::vec::Vec<::subxt::utils::H256>>, - ::subxt::storage::address::Yes, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::bool, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, + (), > { - ::subxt::storage::address::StaticStorageAddress::new( - "Offences", - "ConcurrentReportsIndex", - vec![ - ::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - ), - ::subxt::storage::address::StorageMapKey::new( - _1.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - ), - ], + ::subxt::storage::address::Address::new_static( + "Democracy", + "LastTabledWasExternal", + vec![], [ - 106u8, 21u8, 104u8, 5u8, 4u8, 66u8, 28u8, 70u8, 161u8, 195u8, 238u8, - 28u8, 69u8, 241u8, 221u8, 113u8, 140u8, 103u8, 181u8, 143u8, 60u8, - 177u8, 13u8, 129u8, 224u8, 149u8, 77u8, 32u8, 75u8, 74u8, 101u8, 65u8, + 162u8, 201u8, 72u8, 9u8, 78u8, 49u8, 72u8, 62u8, 240u8, 69u8, 20u8, + 135u8, 26u8, 59u8, 71u8, 46u8, 19u8, 25u8, 195u8, 11u8, 99u8, 31u8, + 104u8, 4u8, 24u8, 129u8, 47u8, 69u8, 219u8, 178u8, 104u8, 190u8, ], ) } - #[doc = " A vector of reports of the same kind that happened at the same time slot."] - pub fn concurrent_reports_index_root( + #[doc = " The referendum to be tabled whenever it would be valid to table an external proposal."] + #[doc = " This happens when a referendum needs to be tabled and one of two conditions are met:"] + #[doc = " - `LastTabledWasExternal` is `false`; or"] + #[doc = " - `PublicProps` is empty."] + pub fn next_external( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::std::vec::Vec<::subxt::utils::H256>>, - (), - ::subxt::storage::address::Yes, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ( + runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::da_runtime::RuntimeCall, + >, + runtime_types::pallet_democracy::vote_threshold::VoteThreshold, + ), ::subxt::storage::address::Yes, + (), + (), > { - ::subxt::storage::address::StaticStorageAddress::new( - "Offences", - "ConcurrentReportsIndex", - Vec::new(), + ::subxt::storage::address::Address::new_static( + "Democracy", + "NextExternal", + vec![], [ - 106u8, 21u8, 104u8, 5u8, 4u8, 66u8, 28u8, 70u8, 161u8, 195u8, 238u8, - 28u8, 69u8, 241u8, 221u8, 113u8, 140u8, 103u8, 181u8, 143u8, 60u8, - 177u8, 13u8, 129u8, 224u8, 149u8, 77u8, 32u8, 75u8, 74u8, 101u8, 65u8, + 130u8, 253u8, 139u8, 228u8, 253u8, 181u8, 172u8, 14u8, 214u8, 128u8, + 17u8, 195u8, 104u8, 64u8, 64u8, 132u8, 40u8, 212u8, 80u8, 47u8, 225u8, + 224u8, 9u8, 186u8, 80u8, 118u8, 120u8, 174u8, 174u8, 20u8, 150u8, 13u8, ], ) } - #[doc = " Enumerates all reports of a kind along with the time they happened."] - #[doc = ""] - #[doc = " All reports are sorted by the time of offence."] - #[doc = ""] - #[doc = " Note that the actual type of this mapping is `Vec`, this is because values of"] - #[doc = " different types are not supported at the moment so we are doing the manual serialization."] - pub fn reports_by_kind_index( + #[doc = " A record of who vetoed what. Maps proposal hash to a possible existent block number"] + #[doc = " (until when it may not be resubmitted) and who vetoed it."] + pub fn blacklist( &self, - _0: impl ::std::borrow::Borrow<[::core::primitive::u8; 16usize]>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::std::vec::Vec<::core::primitive::u8>>, - ::subxt::storage::address::Yes, + _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ( + ::core::primitive::u32, + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::subxt::utils::AccountId32, + >, + ), ::subxt::storage::address::Yes, + (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Offences", - "ReportsByKindIndex", - vec![::subxt::storage::address::StorageMapKey::new( + ::subxt::storage::address::Address::new_static( + "Democracy", + "Blacklist", + vec![::subxt::storage::address::make_static_storage_map_key( _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ - 162u8, 66u8, 131u8, 48u8, 250u8, 237u8, 179u8, 214u8, 36u8, 137u8, - 226u8, 136u8, 120u8, 61u8, 215u8, 43u8, 164u8, 50u8, 91u8, 164u8, 20u8, - 96u8, 189u8, 100u8, 242u8, 106u8, 21u8, 136u8, 98u8, 215u8, 180u8, - 145u8, + 238u8, 119u8, 98u8, 220u8, 11u8, 209u8, 90u8, 9u8, 69u8, 51u8, 59u8, + 177u8, 169u8, 113u8, 138u8, 13u8, 134u8, 14u8, 184u8, 6u8, 80u8, 182u8, + 154u8, 10u8, 100u8, 71u8, 117u8, 2u8, 150u8, 170u8, 154u8, 255u8, ], ) } - #[doc = " Enumerates all reports of a kind along with the time they happened."] - #[doc = ""] - #[doc = " All reports are sorted by the time of offence."] - #[doc = ""] - #[doc = " Note that the actual type of this mapping is `Vec`, this is because values of"] - #[doc = " different types are not supported at the moment so we are doing the manual serialization."] - pub fn reports_by_kind_index_root( + #[doc = " A record of who vetoed what. Maps proposal hash to a possible existent block number"] + #[doc = " (until when it may not be resubmitted) and who vetoed it."] + pub fn blacklist_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::std::vec::Vec<::core::primitive::u8>>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ( + ::core::primitive::u32, + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::subxt::utils::AccountId32, + >, + ), + (), (), - ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Offences", - "ReportsByKindIndex", + ::subxt::storage::address::Address::new_static( + "Democracy", + "Blacklist", Vec::new(), [ - 162u8, 66u8, 131u8, 48u8, 250u8, 237u8, 179u8, 214u8, 36u8, 137u8, - 226u8, 136u8, 120u8, 61u8, 215u8, 43u8, 164u8, 50u8, 91u8, 164u8, 20u8, - 96u8, 189u8, 100u8, 242u8, 106u8, 21u8, 136u8, 98u8, 215u8, 180u8, - 145u8, + 238u8, 119u8, 98u8, 220u8, 11u8, 209u8, 90u8, 9u8, 69u8, 51u8, 59u8, + 177u8, 169u8, 113u8, 138u8, 13u8, 134u8, 14u8, 184u8, 6u8, 80u8, 182u8, + 154u8, 10u8, 100u8, 71u8, 117u8, 2u8, 150u8, 170u8, 154u8, 255u8, ], ) } - } - } - } - pub mod historical { - use super::{root_mod, runtime_types}; - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " Mapping from historical session indices to session-data root hash and validator count."] - pub fn historical_sessions( + + #[doc = " Record of all proposals that have been subject to emergency cancellation."] + pub fn cancellations( &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<( - ::subxt::utils::H256, - ::core::primitive::u32, - )>, + _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::bool, + ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, - (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Historical", - "HistoricalSessions", - vec![::subxt::storage::address::StorageMapKey::new( + ::subxt::storage::address::Address::new_static( + "Democracy", + "Cancellations", + vec![::subxt::storage::address::make_static_storage_map_key( _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ - 94u8, 72u8, 245u8, 151u8, 214u8, 10u8, 12u8, 113u8, 13u8, 141u8, 176u8, - 178u8, 115u8, 238u8, 224u8, 181u8, 18u8, 5u8, 71u8, 65u8, 189u8, 148u8, - 161u8, 106u8, 24u8, 211u8, 72u8, 66u8, 221u8, 244u8, 117u8, 184u8, + 80u8, 190u8, 98u8, 105u8, 129u8, 25u8, 167u8, 180u8, 74u8, 128u8, + 232u8, 29u8, 193u8, 209u8, 185u8, 60u8, 18u8, 180u8, 59u8, 192u8, + 149u8, 13u8, 123u8, 232u8, 34u8, 208u8, 48u8, 104u8, 35u8, 181u8, + 186u8, 244u8, ], ) } - #[doc = " Mapping from historical session indices to session-data root hash and validator count."] - pub fn historical_sessions_root( + #[doc = " Record of all proposals that have been subject to emergency cancellation."] + pub fn cancellations_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<( - ::subxt::utils::H256, - ::core::primitive::u32, - )>, - (), + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::bool, (), ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Historical", - "HistoricalSessions", - Vec::new(), - [ - 94u8, 72u8, 245u8, 151u8, 214u8, 10u8, 12u8, 113u8, 13u8, 141u8, 176u8, - 178u8, 115u8, 238u8, 224u8, 181u8, 18u8, 5u8, 71u8, 65u8, 189u8, 148u8, - 161u8, 106u8, 24u8, 211u8, 72u8, 66u8, 221u8, 244u8, 117u8, 184u8, - ], - ) - } - - #[doc = " The range of historical sessions we store. [first, last)"] - pub fn stored_range( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<( - ::core::primitive::u32, - ::core::primitive::u32, - )>, ::subxt::storage::address::Yes, - (), - (), > { - ::subxt::storage::address::StaticStorageAddress::new( - "Historical", - "StoredRange", - vec![], + ::subxt::storage::address::Address::new_static( + "Democracy", + "Cancellations", + Vec::new(), [ - 89u8, 239u8, 197u8, 93u8, 135u8, 62u8, 142u8, 237u8, 64u8, 200u8, - 164u8, 4u8, 130u8, 233u8, 16u8, 238u8, 166u8, 206u8, 71u8, 42u8, 171u8, - 84u8, 8u8, 245u8, 183u8, 216u8, 212u8, 16u8, 190u8, 3u8, 167u8, 189u8, + 80u8, 190u8, 98u8, 105u8, 129u8, 25u8, 167u8, 180u8, 74u8, 128u8, + 232u8, 29u8, 193u8, 209u8, 185u8, 60u8, 18u8, 180u8, 59u8, 192u8, + 149u8, 13u8, 123u8, 232u8, 34u8, 208u8, 48u8, 104u8, 35u8, 181u8, + 186u8, 244u8, ], ) } } } - } - pub mod scheduler { - use super::{root_mod, runtime_types}; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::{root_mod, runtime_types}; - type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Schedule { - pub when: ::core::primitive::u32, - pub maybe_periodic: - ::core::option::Option<(::core::primitive::u32, ::core::primitive::u32)>, - pub priority: ::core::primitive::u8, - pub call: ::std::boxed::Box, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Cancel { - pub when: ::core::primitive::u32, - pub index: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct ScheduleNamed { - pub id: [::core::primitive::u8; 32usize], - pub when: ::core::primitive::u32, - pub maybe_periodic: - ::core::option::Option<(::core::primitive::u32, ::core::primitive::u32)>, - pub priority: ::core::primitive::u8, - pub call: ::std::boxed::Box, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct CancelNamed { - pub id: [::core::primitive::u8; 32usize], - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct ScheduleAfter { - pub after: ::core::primitive::u32, - pub maybe_periodic: - ::core::option::Option<(::core::primitive::u32, ::core::primitive::u32)>, - pub priority: ::core::primitive::u8, - pub call: ::std::boxed::Box, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct ScheduleNamedAfter { - pub id: [::core::primitive::u8; 32usize], - pub after: ::core::primitive::u32, - pub maybe_periodic: - ::core::option::Option<(::core::primitive::u32, ::core::primitive::u32)>, - pub priority: ::core::primitive::u8, - pub call: ::std::boxed::Box, - } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Anonymously schedule a task."] - pub fn schedule( + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The period between a proposal being approved and enacted."] + #[doc = ""] + #[doc = " It should generally be a little more than the unstake period to ensure that"] + #[doc = " voting stakers have an opportunity to remove themselves from the system in the case"] + #[doc = " where they are on the losing side of a vote."] + pub fn enactment_period( &self, - when: ::core::primitive::u32, - maybe_periodic: ::core::option::Option<( - ::core::primitive::u32, - ::core::primitive::u32, - )>, - priority: ::core::primitive::u8, - call: runtime_types::da_runtime::RuntimeCall, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Scheduler", - "schedule", - Schedule { - when, - maybe_periodic, - priority, - call: ::std::boxed::Box::new(call), - }, - [ - 143u8, 131u8, 121u8, 168u8, 215u8, 154u8, 13u8, 105u8, 169u8, 114u8, - 227u8, 234u8, 13u8, 220u8, 70u8, 111u8, 45u8, 74u8, 139u8, 34u8, 245u8, - 40u8, 121u8, 58u8, 77u8, 179u8, 16u8, 111u8, 248u8, 204u8, 211u8, - 166u8, - ], - ) + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static("Democracy", "EnactmentPeriod", [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, 125u8, + 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, 178u8, 197u8, + 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, 145u8, + ]) } - #[doc = "Cancel an anonymously scheduled task."] - pub fn cancel( - &self, - when: ::core::primitive::u32, - index: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Scheduler", - "cancel", - Cancel { when, index }, - [ - 81u8, 251u8, 234u8, 17u8, 214u8, 75u8, 19u8, 59u8, 19u8, 30u8, 89u8, - 74u8, 6u8, 216u8, 238u8, 165u8, 7u8, 19u8, 153u8, 253u8, 161u8, 103u8, - 178u8, 227u8, 152u8, 180u8, 80u8, 156u8, 82u8, 126u8, 132u8, 120u8, - ], - ) + #[doc = " How often (in blocks) new public referenda are launched."] + pub fn launch_period(&self) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static("Democracy", "LaunchPeriod", [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, 125u8, + 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, 178u8, 197u8, + 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, 145u8, + ]) } - #[doc = "Schedule a named task."] - pub fn schedule_named( - &self, - id: [::core::primitive::u8; 32usize], - when: ::core::primitive::u32, - maybe_periodic: ::core::option::Option<( - ::core::primitive::u32, - ::core::primitive::u32, - )>, - priority: ::core::primitive::u8, - call: runtime_types::da_runtime::RuntimeCall, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Scheduler", - "schedule_named", - ScheduleNamed { - id, - when, - maybe_periodic, - priority, - call: ::std::boxed::Box::new(call), - }, - [ - 242u8, 61u8, 104u8, 10u8, 155u8, 16u8, 184u8, 204u8, 102u8, 249u8, - 158u8, 199u8, 94u8, 150u8, 54u8, 63u8, 111u8, 118u8, 231u8, 210u8, - 137u8, 176u8, 119u8, 117u8, 130u8, 78u8, 202u8, 253u8, 174u8, 248u8, - 87u8, 185u8, - ], - ) + #[doc = " How often (in blocks) to check for new votes."] + pub fn voting_period(&self) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static("Democracy", "VotingPeriod", [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, 125u8, + 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, 178u8, 197u8, + 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, 145u8, + ]) } - #[doc = "Cancel a named scheduled task."] - pub fn cancel_named( + #[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, - id: [::core::primitive::u8; 32usize], - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Scheduler", - "cancel_named", - CancelNamed { id }, - [ - 51u8, 3u8, 140u8, 50u8, 214u8, 211u8, 50u8, 4u8, 19u8, 43u8, 230u8, - 114u8, 18u8, 108u8, 138u8, 67u8, 99u8, 24u8, 255u8, 11u8, 246u8, 37u8, - 192u8, 207u8, 90u8, 157u8, 171u8, 93u8, 233u8, 189u8, 64u8, 180u8, - ], - ) + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static("Democracy", "VoteLockingPeriod", [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, 125u8, + 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, 178u8, 197u8, + 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, 145u8, + ]) } - #[doc = "Anonymously schedule a task after a delay."] - #[doc = ""] - #[doc = "# "] - #[doc = "Same as [`schedule`]."] - #[doc = "# "] - pub fn schedule_after( + #[doc = " The minimum amount to be used as a deposit for a public referendum proposal."] + pub fn minimum_deposit( &self, - after: ::core::primitive::u32, - maybe_periodic: ::core::option::Option<( - ::core::primitive::u32, - ::core::primitive::u32, - )>, - priority: ::core::primitive::u8, - call: runtime_types::da_runtime::RuntimeCall, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Scheduler", - "schedule_after", - ScheduleAfter { - after, - maybe_periodic, - priority, - call: ::std::boxed::Box::new(call), + ) -> ::subxt::constants::Address<::core::primitive::u128> { + ::subxt::constants::Address::new_static("Democracy", "MinimumDeposit", [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, 136u8, + 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, + ]) + } + + #[doc = " Indicator for whether an emergency origin is even allowed to happen. Some chains may"] + #[doc = " want to set this permanently to `false`, others may want to condition it on things such"] + #[doc = " as an upgrade having happened recently."] + pub fn instant_allowed( + &self, + ) -> ::subxt::constants::Address<::core::primitive::bool> { + ::subxt::constants::Address::new_static("Democracy", "InstantAllowed", [ + 165u8, 28u8, 112u8, 190u8, 18u8, 129u8, 182u8, 206u8, 237u8, 1u8, 68u8, + 252u8, 125u8, 234u8, 185u8, 50u8, 149u8, 164u8, 47u8, 126u8, 134u8, 100u8, + 14u8, 86u8, 209u8, 39u8, 20u8, 4u8, 233u8, 115u8, 102u8, 131u8, + ]) + } + + #[doc = " Minimum voting period allowed for a fast-track referendum."] + pub fn fast_track_voting_period( + &self, + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static("Democracy", "FastTrackVotingPeriod", [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, 125u8, + 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, 178u8, 197u8, + 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, 145u8, + ]) + } + + #[doc = " Period in blocks where an external proposal may not be re-submitted after being vetoed."] + pub fn cooloff_period( + &self, + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static("Democracy", "CooloffPeriod", [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, 125u8, + 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, 178u8, 197u8, + 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, 145u8, + ]) + } + + #[doc = " The maximum number of votes for an account."] + #[doc = ""] + #[doc = " Also used to compute weight, an overly big value can"] + #[doc = " lead to extrinsic with very big weight: see `delegate` for instance."] + pub fn max_votes(&self) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static("Democracy", "MaxVotes", [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, 125u8, + 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, 178u8, 197u8, + 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, 145u8, + ]) + } + + #[doc = " The maximum number of public proposals that can exist at any time."] + pub fn max_proposals(&self) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static("Democracy", "MaxProposals", [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, 125u8, + 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, 178u8, 197u8, + 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, 145u8, + ]) + } + + #[doc = " The maximum number of deposits a public proposal may have at any time."] + pub fn max_deposits(&self) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static("Democracy", "MaxDeposits", [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, 125u8, + 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, 178u8, 197u8, + 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, 145u8, + ]) + } + + #[doc = " The maximum number of items which can be blacklisted."] + pub fn max_blacklisted( + &self, + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static("Democracy", "MaxBlacklisted", [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, 125u8, + 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, 178u8, 197u8, + 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, 145u8, + ]) + } + } + } + } + pub mod council { + use super::{root_mod, runtime_types}; + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub type Error = runtime_types::pallet_collective::pallet::Error; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub type Call = runtime_types::pallet_collective::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 :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetMembers { + pub new_members: ::std::vec::Vec<::subxt::utils::AccountId32>, + pub prime: ::core::option::Option<::subxt::utils::AccountId32>, + pub old_count: ::core::primitive::u32, + } + impl ::subxt::blocks::StaticExtrinsic for SetMembers { + const CALL: &'static str = "set_members"; + const PALLET: &'static str = "Council"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Execute { + pub proposal: ::std::boxed::Box, + #[codec(compact)] + pub length_bound: ::core::primitive::u32, + } + impl ::subxt::blocks::StaticExtrinsic for Execute { + const CALL: &'static str = "execute"; + const PALLET: &'static str = "Council"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Propose { + #[codec(compact)] + pub threshold: ::core::primitive::u32, + pub proposal: ::std::boxed::Box, + #[codec(compact)] + pub length_bound: ::core::primitive::u32, + } + impl ::subxt::blocks::StaticExtrinsic for Propose { + const CALL: &'static str = "propose"; + const PALLET: &'static str = "Council"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Vote { + pub proposal: ::subxt::utils::H256, + #[codec(compact)] + pub index: ::core::primitive::u32, + pub approve: ::core::primitive::bool, + } + impl ::subxt::blocks::StaticExtrinsic for Vote { + const CALL: &'static str = "vote"; + const PALLET: &'static str = "Council"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct CloseOldWeight { + pub proposal_hash: ::subxt::utils::H256, + #[codec(compact)] + pub index: ::core::primitive::u32, + #[codec(compact)] + pub proposal_weight_bound: runtime_types::sp_weights::OldWeight, + #[codec(compact)] + pub length_bound: ::core::primitive::u32, + } + impl ::subxt::blocks::StaticExtrinsic for CloseOldWeight { + const CALL: &'static str = "close_old_weight"; + const PALLET: &'static str = "Council"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct DisapproveProposal { + pub proposal_hash: ::subxt::utils::H256, + } + impl ::subxt::blocks::StaticExtrinsic for DisapproveProposal { + const CALL: &'static str = "disapprove_proposal"; + const PALLET: &'static str = "Council"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Close { + pub proposal_hash: ::subxt::utils::H256, + #[codec(compact)] + pub index: ::core::primitive::u32, + pub proposal_weight_bound: runtime_types::sp_weights::weight_v2::Weight, + #[codec(compact)] + pub length_bound: ::core::primitive::u32, + } + impl ::subxt::blocks::StaticExtrinsic for Close { + const CALL: &'static str = "close"; + const PALLET: &'static str = "Council"; + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Set the collective's membership."] + #[doc = ""] + #[doc = "- `new_members`: The new member list. Be nice to the chain and provide it sorted."] + #[doc = "- `prime`: The prime member whose vote sets the default."] + #[doc = "- `old_count`: The upper bound for the previous number of members in storage. Used for"] + #[doc = " weight estimation."] + #[doc = ""] + #[doc = "Requires root origin."] + #[doc = ""] + #[doc = "NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but"] + #[doc = " the weight estimations rely on it to estimate dispatchable weight."] + #[doc = ""] + #[doc = "# WARNING:"] + #[doc = ""] + #[doc = "The `pallet-collective` can also be managed by logic outside of the pallet through the"] + #[doc = "implementation of the trait [`ChangeMembers`]."] + #[doc = "Any call to `set_members` must be careful that the member set doesn't get out of sync"] + #[doc = "with other logic managing the member set."] + #[doc = ""] + #[doc = "# "] + #[doc = "## Weight"] + #[doc = "- `O(MP + N)` where:"] + #[doc = " - `M` old-members-count (code- and governance-bounded)"] + #[doc = " - `N` new-members-count (code- and governance-bounded)"] + #[doc = " - `P` proposals-count (code-bounded)"] + #[doc = "- DB:"] + #[doc = " - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the"] + #[doc = " members"] + #[doc = " - 1 storage read (codec `O(P)`) for reading the proposals"] + #[doc = " - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal"] + #[doc = " - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one"] + #[doc = "# "] + pub fn set_members( + &self, + new_members: ::std::vec::Vec<::subxt::utils::AccountId32>, + prime: ::core::option::Option<::subxt::utils::AccountId32>, + old_count: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Council", + "set_members", + types::SetMembers { + new_members, + prime, + old_count, }, [ - 142u8, 233u8, 193u8, 252u8, 40u8, 115u8, 197u8, 228u8, 119u8, 103u8, - 82u8, 46u8, 111u8, 108u8, 59u8, 219u8, 100u8, 141u8, 134u8, 21u8, - 220u8, 22u8, 143u8, 131u8, 80u8, 93u8, 250u8, 109u8, 19u8, 166u8, 34u8, - 56u8, + 141u8, 113u8, 137u8, 46u8, 75u8, 22u8, 143u8, 204u8, 50u8, 24u8, 137u8, + 25u8, 226u8, 166u8, 121u8, 161u8, 54u8, 144u8, 12u8, 145u8, 157u8, + 153u8, 47u8, 144u8, 94u8, 34u8, 217u8, 115u8, 125u8, 152u8, 110u8, + 28u8, ], ) } - #[doc = "Schedule a named task after a delay."] + #[doc = "Dispatch a proposal from a member using the `Member` origin."] + #[doc = ""] + #[doc = "Origin must be a member of the collective."] #[doc = ""] #[doc = "# "] - #[doc = "Same as [`schedule_named`](Self::schedule_named)."] + #[doc = "## Weight"] + #[doc = "- `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching"] + #[doc = " `proposal`"] + #[doc = "- DB: 1 read (codec `O(M)`) + DB access of `proposal`"] + #[doc = "- 1 event"] #[doc = "# "] - pub fn schedule_named_after( + pub fn execute( &self, - id: [::core::primitive::u8; 32usize], - after: ::core::primitive::u32, - maybe_periodic: ::core::option::Option<( - ::core::primitive::u32, - ::core::primitive::u32, - )>, - priority: ::core::primitive::u8, - call: runtime_types::da_runtime::RuntimeCall, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Scheduler", - "schedule_named_after", - ScheduleNamedAfter { - id, - after, - maybe_periodic, - priority, - call: ::std::boxed::Box::new(call), + proposal: runtime_types::da_runtime::RuntimeCall, + length_bound: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Council", + "execute", + types::Execute { + proposal: ::std::boxed::Box::new(proposal), + length_bound, }, [ - 114u8, 223u8, 214u8, 229u8, 56u8, 142u8, 239u8, 21u8, 1u8, 90u8, 89u8, - 187u8, 171u8, 136u8, 134u8, 134u8, 150u8, 159u8, 62u8, 185u8, 239u8, - 182u8, 189u8, 2u8, 119u8, 3u8, 152u8, 192u8, 178u8, 58u8, 47u8, 109u8, + 180u8, 228u8, 233u8, 49u8, 240u8, 234u8, 96u8, 169u8, 141u8, 56u8, + 150u8, 18u8, 253u8, 95u8, 224u8, 217u8, 135u8, 77u8, 242u8, 54u8, 4u8, + 36u8, 135u8, 127u8, 85u8, 211u8, 121u8, 82u8, 147u8, 236u8, 106u8, + 189u8, + ], + ) + } + + #[doc = "Add a new proposal to either be voted on or executed directly."] + #[doc = ""] + #[doc = "Requires the sender to be member."] + #[doc = ""] + #[doc = "`threshold` determines whether `proposal` is executed directly (`threshold < 2`)"] + #[doc = "or put up for voting."] + #[doc = ""] + #[doc = "# "] + #[doc = "## Weight"] + #[doc = "- `O(B + M + P1)` or `O(B + M + P2)` where:"] + #[doc = " - `B` is `proposal` size in bytes (length-fee-bounded)"] + #[doc = " - `M` is members-count (code- and governance-bounded)"] + #[doc = " - branching is influenced by `threshold` where:"] + #[doc = " - `P1` is proposal execution complexity (`threshold < 2`)"] + #[doc = " - `P2` is proposals-count (code-bounded) (`threshold >= 2`)"] + #[doc = "- DB:"] + #[doc = " - 1 storage read `is_member` (codec `O(M)`)"] + #[doc = " - 1 storage read `ProposalOf::contains_key` (codec `O(1)`)"] + #[doc = " - DB accesses influenced by `threshold`:"] + #[doc = " - EITHER storage accesses done by `proposal` (`threshold < 2`)"] + #[doc = " - OR proposal insertion (`threshold <= 2`)"] + #[doc = " - 1 storage mutation `Proposals` (codec `O(P2)`)"] + #[doc = " - 1 storage mutation `ProposalCount` (codec `O(1)`)"] + #[doc = " - 1 storage write `ProposalOf` (codec `O(B)`)"] + #[doc = " - 1 storage write `Voting` (codec `O(M)`)"] + #[doc = " - 1 event"] + #[doc = "# "] + pub fn propose( + &self, + threshold: ::core::primitive::u32, + proposal: runtime_types::da_runtime::RuntimeCall, + length_bound: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Council", + "propose", + types::Propose { + threshold, + proposal: ::std::boxed::Box::new(proposal), + length_bound, + }, + [ + 7u8, 221u8, 166u8, 248u8, 161u8, 0u8, 133u8, 14u8, 88u8, 208u8, 28u8, + 72u8, 21u8, 143u8, 23u8, 30u8, 182u8, 67u8, 22u8, 67u8, 151u8, 114u8, + 107u8, 183u8, 160u8, 51u8, 14u8, 219u8, 69u8, 119u8, 93u8, 10u8, + ], + ) + } + + #[doc = "Add an aye or nay vote for the sender to the given proposal."] + #[doc = ""] + #[doc = "Requires the sender to be a member."] + #[doc = ""] + #[doc = "Transaction fees will be waived if the member is voting on any particular proposal"] + #[doc = "for the first time and the call is successful. Subsequent vote changes will charge a"] + #[doc = "fee."] + #[doc = "# "] + #[doc = "## Weight"] + #[doc = "- `O(M)` where `M` is members-count (code- and governance-bounded)"] + #[doc = "- DB:"] + #[doc = " - 1 storage read `Members` (codec `O(M)`)"] + #[doc = " - 1 storage mutation `Voting` (codec `O(M)`)"] + #[doc = "- 1 event"] + #[doc = "# "] + pub fn vote( + &self, + proposal: ::subxt::utils::H256, + index: ::core::primitive::u32, + approve: ::core::primitive::bool, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Council", + "vote", + types::Vote { + proposal, + index, + approve, + }, + [ + 110u8, 141u8, 24u8, 33u8, 91u8, 7u8, 89u8, 198u8, 54u8, 10u8, 76u8, + 129u8, 45u8, 20u8, 216u8, 104u8, 231u8, 246u8, 174u8, 205u8, 190u8, + 176u8, 171u8, 113u8, 33u8, 37u8, 155u8, 203u8, 251u8, 34u8, 25u8, + 120u8, + ], + ) + } + + #[doc = "Close a vote that is either approved, disapproved or whose voting period has ended."] + #[doc = ""] + #[doc = "May be called by any signed account in order to finish voting and close the proposal."] + #[doc = ""] + #[doc = "If called before the end of the voting period it will only close the vote if it is"] + #[doc = "has enough votes to be approved or disapproved."] + #[doc = ""] + #[doc = "If called after the end of the voting period abstentions are counted as rejections"] + #[doc = "unless there is a prime member set and the prime member cast an approval."] + #[doc = ""] + #[doc = "If the close operation completes successfully with disapproval, the transaction fee will"] + #[doc = "be waived. Otherwise execution of the approved operation will be charged to the caller."] + #[doc = ""] + #[doc = "+ `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed"] + #[doc = "proposal."] + #[doc = "+ `length_bound`: The upper bound for the length of the proposal in storage. Checked via"] + #[doc = "`storage::read` so it is `size_of::() == 4` larger than the pure length."] + #[doc = ""] + #[doc = "# "] + #[doc = "## Weight"] + #[doc = "- `O(B + M + P1 + P2)` where:"] + #[doc = " - `B` is `proposal` size in bytes (length-fee-bounded)"] + #[doc = " - `M` is members-count (code- and governance-bounded)"] + #[doc = " - `P1` is the complexity of `proposal` preimage."] + #[doc = " - `P2` is proposal-count (code-bounded)"] + #[doc = "- DB:"] + #[doc = " - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`)"] + #[doc = " - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec"] + #[doc = " `O(P2)`)"] + #[doc = " - any mutations done while executing `proposal` (`P1`)"] + #[doc = "- up to 3 events"] + #[doc = "# "] + pub fn close_old_weight( + &self, + proposal_hash: ::subxt::utils::H256, + index: ::core::primitive::u32, + proposal_weight_bound: runtime_types::sp_weights::OldWeight, + length_bound: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Council", + "close_old_weight", + types::CloseOldWeight { + proposal_hash, + index, + proposal_weight_bound, + length_bound, + }, + [ + 206u8, 13u8, 195u8, 139u8, 64u8, 214u8, 244u8, 76u8, 241u8, 64u8, 67u8, + 43u8, 50u8, 76u8, 75u8, 247u8, 214u8, 58u8, 125u8, 72u8, 170u8, 104u8, + 67u8, 78u8, 230u8, 119u8, 78u8, 63u8, 161u8, 159u8, 176u8, 106u8, + ], + ) + } + + #[doc = "Disapprove a proposal, close, and remove it from the system, regardless of its current"] + #[doc = "state."] + #[doc = ""] + #[doc = "Must be called by the Root origin."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "* `proposal_hash`: The hash of the proposal that should be disapproved."] + #[doc = ""] + #[doc = "# "] + #[doc = "Complexity: O(P) where P is the number of max proposals"] + #[doc = "DB Weight:"] + #[doc = "* Reads: Proposals"] + #[doc = "* Writes: Voting, Proposals, ProposalOf"] + #[doc = "# "] + pub fn disapprove_proposal( + &self, + proposal_hash: ::subxt::utils::H256, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Council", + "disapprove_proposal", + types::DisapproveProposal { proposal_hash }, + [ + 26u8, 140u8, 111u8, 193u8, 229u8, 59u8, 53u8, 196u8, 230u8, 60u8, 7u8, + 155u8, 168u8, 7u8, 201u8, 177u8, 70u8, 103u8, 190u8, 57u8, 244u8, + 156u8, 67u8, 101u8, 228u8, 6u8, 213u8, 83u8, 225u8, 95u8, 148u8, 96u8, + ], + ) + } + + #[doc = "Close a vote that is either approved, disapproved or whose voting period has ended."] + #[doc = ""] + #[doc = "May be called by any signed account in order to finish voting and close the proposal."] + #[doc = ""] + #[doc = "If called before the end of the voting period it will only close the vote if it is"] + #[doc = "has enough votes to be approved or disapproved."] + #[doc = ""] + #[doc = "If called after the end of the voting period abstentions are counted as rejections"] + #[doc = "unless there is a prime member set and the prime member cast an approval."] + #[doc = ""] + #[doc = "If the close operation completes successfully with disapproval, the transaction fee will"] + #[doc = "be waived. Otherwise execution of the approved operation will be charged to the caller."] + #[doc = ""] + #[doc = "+ `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed"] + #[doc = "proposal."] + #[doc = "+ `length_bound`: The upper bound for the length of the proposal in storage. Checked via"] + #[doc = "`storage::read` so it is `size_of::() == 4` larger than the pure length."] + #[doc = ""] + #[doc = "# "] + #[doc = "## Weight"] + #[doc = "- `O(B + M + P1 + P2)` where:"] + #[doc = " - `B` is `proposal` size in bytes (length-fee-bounded)"] + #[doc = " - `M` is members-count (code- and governance-bounded)"] + #[doc = " - `P1` is the complexity of `proposal` preimage."] + #[doc = " - `P2` is proposal-count (code-bounded)"] + #[doc = "- DB:"] + #[doc = " - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`)"] + #[doc = " - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec"] + #[doc = " `O(P2)`)"] + #[doc = " - any mutations done while executing `proposal` (`P1`)"] + #[doc = "- up to 3 events"] + #[doc = "# "] + pub fn close( + &self, + proposal_hash: ::subxt::utils::H256, + index: ::core::primitive::u32, + proposal_weight_bound: runtime_types::sp_weights::weight_v2::Weight, + length_bound: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Council", + "close", + types::Close { + proposal_hash, + index, + proposal_weight_bound, + length_bound, + }, + [ + 189u8, 149u8, 125u8, 63u8, 39u8, 201u8, 247u8, 4u8, 220u8, 74u8, 78u8, + 14u8, 113u8, 163u8, 1u8, 159u8, 81u8, 248u8, 141u8, 111u8, 34u8, 243u8, + 67u8, 70u8, 60u8, 92u8, 47u8, 70u8, 66u8, 246u8, 236u8, 153u8, ], ) } } - } - #[doc = "Events type."] - pub type Event = runtime_types::pallet_scheduler::pallet::Event; - pub mod events { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "Scheduled some task."] - pub struct Scheduled { - pub when: ::core::primitive::u32, - pub index: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for Scheduled { - const EVENT: &'static str = "Scheduled"; - const PALLET: &'static str = "Scheduler"; - } + } + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub type Event = runtime_types::pallet_collective::pallet::Event; + pub mod events { + use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "Canceled some task."] - pub struct Canceled { - pub when: ::core::primitive::u32, - pub index: ::core::primitive::u32, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A motion (given hash) has been proposed (by given account) with a threshold (given"] + #[doc = "`MemberCount`)."] + pub struct Proposed { + pub account: ::subxt::utils::AccountId32, + pub proposal_index: ::core::primitive::u32, + pub proposal_hash: ::subxt::utils::H256, + pub threshold: ::core::primitive::u32, } - impl ::subxt::events::StaticEvent for Canceled { - const EVENT: &'static str = "Canceled"; - const PALLET: &'static str = "Scheduler"; + impl ::subxt::events::StaticEvent for Proposed { + const EVENT: &'static str = "Proposed"; + const PALLET: &'static str = "Council"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "Dispatched some task."] - pub struct Dispatched { - pub task: (::core::primitive::u32, ::core::primitive::u32), - pub id: ::core::option::Option<[::core::primitive::u8; 32usize]>, - pub result: ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A motion (given hash) has been voted on by given account, leaving"] + #[doc = "a tally (yes votes and no votes given respectively as `MemberCount`)."] + pub struct Voted { + pub account: ::subxt::utils::AccountId32, + pub proposal_hash: ::subxt::utils::H256, + pub voted: ::core::primitive::bool, + pub yes: ::core::primitive::u32, + pub no: ::core::primitive::u32, } - impl ::subxt::events::StaticEvent for Dispatched { - const EVENT: &'static str = "Dispatched"; - const PALLET: &'static str = "Scheduler"; + impl ::subxt::events::StaticEvent for Voted { + const EVENT: &'static str = "Voted"; + const PALLET: &'static str = "Council"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "The call for the provided hash was not found so the task has been aborted."] - pub struct CallUnavailable { - pub task: (::core::primitive::u32, ::core::primitive::u32), - pub id: ::core::option::Option<[::core::primitive::u8; 32usize]>, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A motion was approved by the required threshold."] + pub struct Approved { + pub proposal_hash: ::subxt::utils::H256, } - impl ::subxt::events::StaticEvent for CallUnavailable { - const EVENT: &'static str = "CallUnavailable"; - const PALLET: &'static str = "Scheduler"; + impl ::subxt::events::StaticEvent for Approved { + const EVENT: &'static str = "Approved"; + const PALLET: &'static str = "Council"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "The given task was unable to be renewed since the agenda is full at that block."] - pub struct PeriodicFailed { - pub task: (::core::primitive::u32, ::core::primitive::u32), - pub id: ::core::option::Option<[::core::primitive::u8; 32usize]>, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A motion was not approved by the required threshold."] + pub struct Disapproved { + pub proposal_hash: ::subxt::utils::H256, } - impl ::subxt::events::StaticEvent for PeriodicFailed { - const EVENT: &'static str = "PeriodicFailed"; - const PALLET: &'static str = "Scheduler"; + impl ::subxt::events::StaticEvent for Disapproved { + const EVENT: &'static str = "Disapproved"; + const PALLET: &'static str = "Council"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "The given task can never be executed since it is overweight."] - pub struct PermanentlyOverweight { - pub task: (::core::primitive::u32, ::core::primitive::u32), - pub id: ::core::option::Option<[::core::primitive::u8; 32usize]>, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A motion was executed; result will be `Ok` if it returned without error."] + pub struct Executed { + pub proposal_hash: ::subxt::utils::H256, + pub result: ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, } - impl ::subxt::events::StaticEvent for PermanentlyOverweight { - const EVENT: &'static str = "PermanentlyOverweight"; - const PALLET: &'static str = "Scheduler"; + impl ::subxt::events::StaticEvent for Executed { + const EVENT: &'static str = "Executed"; + const PALLET: &'static str = "Council"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A single member did some action; result will be `Ok` if it returned without error."] + pub struct MemberExecuted { + pub proposal_hash: ::subxt::utils::H256, + pub result: ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + } + impl ::subxt::events::StaticEvent for MemberExecuted { + const EVENT: &'static str = "MemberExecuted"; + const PALLET: &'static str = "Council"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A proposal was closed because its threshold was reached or after its duration was up."] + pub struct Closed { + pub proposal_hash: ::subxt::utils::H256, + pub yes: ::core::primitive::u32, + pub no: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for Closed { + const EVENT: &'static str = "Closed"; + const PALLET: &'static str = "Council"; } } pub mod storage { use super::runtime_types; pub struct StorageApi; impl StorageApi { - pub fn incomplete_since( + #[doc = " The hashes of the active proposals."] + pub fn proposals( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::sp_core::bounded::bounded_vec::BoundedVec<::subxt::utils::H256>, + ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, - (), (), > { - ::subxt::storage::address::StaticStorageAddress::new( - "Scheduler", - "IncompleteSince", + ::subxt::storage::address::Address::new_static( + "Council", + "Proposals", vec![], [ - 149u8, 66u8, 239u8, 67u8, 235u8, 219u8, 101u8, 182u8, 145u8, 56u8, - 252u8, 150u8, 253u8, 221u8, 125u8, 57u8, 38u8, 152u8, 153u8, 31u8, - 92u8, 238u8, 66u8, 246u8, 104u8, 163u8, 94u8, 73u8, 222u8, 168u8, - 193u8, 227u8, + 210u8, 234u8, 7u8, 29u8, 231u8, 80u8, 17u8, 36u8, 189u8, 34u8, 175u8, + 147u8, 56u8, 92u8, 201u8, 104u8, 207u8, 150u8, 58u8, 110u8, 90u8, 28u8, + 198u8, 79u8, 236u8, 245u8, 19u8, 38u8, 68u8, 59u8, 215u8, 74u8, ], ) } - #[doc = " Items to be executed, indexed by the block number that they should be executed on."] - pub fn agenda( + #[doc = " Actual proposal for a given hash, if it's current."] + pub fn proposal_of( &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::option::Option< - runtime_types::pallet_scheduler::Scheduled< - [::core::primitive::u8; 32usize], - runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::da_runtime::RuntimeCall, - >, - ::core::primitive::u32, - runtime_types::da_runtime::OriginCaller, - ::subxt::utils::AccountId32, - >, - >, - >, - >, - ::subxt::storage::address::Yes, + _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::da_runtime::RuntimeCall, ::subxt::storage::address::Yes, + (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Scheduler", - "Agenda", - vec![::subxt::storage::address::StorageMapKey::new( + ::subxt::storage::address::Address::new_static( + "Council", + "ProposalOf", + vec![::subxt::storage::address::make_static_storage_map_key( _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ - 163u8, 47u8, 252u8, 114u8, 172u8, 82u8, 192u8, 112u8, 117u8, 22u8, - 194u8, 118u8, 191u8, 128u8, 166u8, 23u8, 39u8, 8u8, 17u8, 19u8, 168u8, - 169u8, 4u8, 247u8, 107u8, 32u8, 156u8, 52u8, 119u8, 45u8, 12u8, 16u8, + 127u8, 4u8, 120u8, 186u8, 68u8, 244u8, 146u8, 244u8, 186u8, 173u8, + 89u8, 90u8, 123u8, 111u8, 16u8, 57u8, 111u8, 169u8, 30u8, 194u8, 202u8, + 183u8, 251u8, 182u8, 29u8, 117u8, 48u8, 63u8, 67u8, 132u8, 119u8, + 238u8, ], ) } - #[doc = " Items to be executed, indexed by the block number that they should be executed on."] - pub fn agenda_root( + #[doc = " Actual proposal for a given hash, if it's current."] + pub fn proposal_of_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::option::Option< - runtime_types::pallet_scheduler::Scheduled< - [::core::primitive::u8; 32usize], - runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::da_runtime::RuntimeCall, - >, - ::core::primitive::u32, - runtime_types::da_runtime::OriginCaller, - ::subxt::utils::AccountId32, - >, - >, - >, - >, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::da_runtime::RuntimeCall, + (), (), - ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Scheduler", - "Agenda", + ::subxt::storage::address::Address::new_static( + "Council", + "ProposalOf", Vec::new(), [ - 163u8, 47u8, 252u8, 114u8, 172u8, 82u8, 192u8, 112u8, 117u8, 22u8, - 194u8, 118u8, 191u8, 128u8, 166u8, 23u8, 39u8, 8u8, 17u8, 19u8, 168u8, - 169u8, 4u8, 247u8, 107u8, 32u8, 156u8, 52u8, 119u8, 45u8, 12u8, 16u8, + 127u8, 4u8, 120u8, 186u8, 68u8, 244u8, 146u8, 244u8, 186u8, 173u8, + 89u8, 90u8, 123u8, 111u8, 16u8, 57u8, 111u8, 169u8, 30u8, 194u8, 202u8, + 183u8, 251u8, 182u8, 29u8, 117u8, 48u8, 63u8, 67u8, 132u8, 119u8, + 238u8, ], ) } - #[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( + #[doc = " Votes on a given proposal, if it is ongoing."] + pub fn voting( &self, - _0: impl ::std::borrow::Borrow<[::core::primitive::u8; 32usize]>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<( - ::core::primitive::u32, + _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_collective::Votes< + ::subxt::utils::AccountId32, ::core::primitive::u32, - )>, + >, ::subxt::storage::address::Yes, (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Scheduler", - "Lookup", - vec![::subxt::storage::address::StorageMapKey::new( + ::subxt::storage::address::Address::new_static( + "Council", + "Voting", + vec![::subxt::storage::address::make_static_storage_map_key( _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ - 82u8, 20u8, 178u8, 101u8, 108u8, 198u8, 71u8, 99u8, 16u8, 175u8, 15u8, - 187u8, 229u8, 243u8, 140u8, 200u8, 99u8, 77u8, 248u8, 178u8, 45u8, - 121u8, 193u8, 67u8, 165u8, 43u8, 234u8, 211u8, 158u8, 250u8, 103u8, - 243u8, + 56u8, 192u8, 111u8, 180u8, 253u8, 5u8, 232u8, 126u8, 177u8, 48u8, + 135u8, 39u8, 89u8, 71u8, 62u8, 239u8, 216u8, 17u8, 64u8, 82u8, 130u8, + 236u8, 96u8, 89u8, 167u8, 2u8, 118u8, 113u8, 63u8, 176u8, 124u8, 73u8, ], ) } - #[doc = " Lookup from a name to the block number and index of the task."] - #[doc = ""] - #[doc = " For v3 -> v4 the previously unbounded identities are Blake2-256 hashed to form the v4"] - #[doc = " identities."] - pub fn lookup_root( + #[doc = " Votes on a given proposal, if it is ongoing."] + pub fn voting_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<( - ::core::primitive::u32, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_collective::Votes< + ::subxt::utils::AccountId32, ::core::primitive::u32, - )>, + >, (), (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Scheduler", - "Lookup", + ::subxt::storage::address::Address::new_static( + "Council", + "Voting", Vec::new(), [ - 82u8, 20u8, 178u8, 101u8, 108u8, 198u8, 71u8, 99u8, 16u8, 175u8, 15u8, - 187u8, 229u8, 243u8, 140u8, 200u8, 99u8, 77u8, 248u8, 178u8, 45u8, - 121u8, 193u8, 67u8, 165u8, 43u8, 234u8, 211u8, 158u8, 250u8, 103u8, - 243u8, + 56u8, 192u8, 111u8, 180u8, 253u8, 5u8, 232u8, 126u8, 177u8, 48u8, + 135u8, 39u8, 89u8, 71u8, 62u8, 239u8, 216u8, 17u8, 64u8, 82u8, 130u8, + 236u8, 96u8, 89u8, 167u8, 2u8, 118u8, 113u8, 63u8, 176u8, 124u8, 73u8, ], ) } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " The maximum weight that may be scheduled per block for any dispatchables."] - pub fn maximum_weight( + + #[doc = " Proposals so far."] + pub fn proposal_count( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_weights::weight_v2::Weight, - >, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "Council", + "ProposalCount", + vec![], + [ + 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 = " The current members of the collective. This is stored sorted (just by value)."] + pub fn members( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec<::subxt::utils::AccountId32>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), > { - ::subxt::constants::StaticConstantAddress::new("Scheduler", "MaximumWeight", [ - 206u8, 61u8, 253u8, 247u8, 163u8, 40u8, 161u8, 52u8, 134u8, 140u8, 206u8, - 83u8, 44u8, 166u8, 226u8, 115u8, 181u8, 14u8, 227u8, 130u8, 210u8, 32u8, - 85u8, 29u8, 230u8, 97u8, 130u8, 165u8, 147u8, 134u8, 106u8, 76u8, + ::subxt::storage::address::Address::new_static("Council", "Members", vec![], [ + 16u8, 29u8, 32u8, 222u8, 175u8, 136u8, 111u8, 101u8, 43u8, 74u8, 209u8, + 81u8, 47u8, 97u8, 129u8, 39u8, 225u8, 243u8, 110u8, 229u8, 237u8, 21u8, + 90u8, 127u8, 80u8, 239u8, 156u8, 32u8, 90u8, 109u8, 179u8, 0u8, ]) } - #[doc = " The maximum number of scheduled calls in the queue for a single block."] - pub fn max_scheduled_per_block( + #[doc = " The prime member that helps determine the default vote behavior in case of absentations."] + pub fn prime( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::subxt::utils::AccountId32, + ::subxt::storage::address::Yes, + (), + (), > { - ::subxt::constants::StaticConstantAddress::new( - "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, - ], - ) + ::subxt::storage::address::Address::new_static("Council", "Prime", vec![], [ + 72u8, 128u8, 214u8, 72u8, 78u8, 80u8, 100u8, 198u8, 114u8, 215u8, 59u8, + 3u8, 103u8, 14u8, 152u8, 202u8, 12u8, 165u8, 224u8, 10u8, 41u8, 154u8, + 77u8, 95u8, 116u8, 143u8, 250u8, 250u8, 176u8, 92u8, 238u8, 154u8, + ]) } } } } - pub mod bounties { + pub mod technical_committee { use super::{root_mod, runtime_types}; + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub type Error = runtime_types::pallet_collective::pallet::Error2; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub type Call = runtime_types::pallet_collective::pallet::Call2; pub mod calls { use super::{root_mod, runtime_types}; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct ProposeBounty { - #[codec(compact)] - pub value: ::core::primitive::u128, - pub description: ::std::vec::Vec<::core::primitive::u8>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct ApproveBounty { - #[codec(compact)] - pub bounty_id: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct ProposeCurator { - #[codec(compact)] - pub bounty_id: ::core::primitive::u32, - pub curator: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - #[codec(compact)] - pub fee: ::core::primitive::u128, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct UnassignCurator { - #[codec(compact)] - pub bounty_id: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct AcceptCurator { - #[codec(compact)] - pub bounty_id: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct AwardBounty { - #[codec(compact)] - pub bounty_id: ::core::primitive::u32, - pub beneficiary: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct ClaimBounty { - #[codec(compact)] - pub bounty_id: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct CloseBounty { - #[codec(compact)] - pub bounty_id: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct ExtendBountyExpiry { - #[codec(compact)] - pub bounty_id: ::core::primitive::u32, - pub remark: ::std::vec::Vec<::core::primitive::u8>, + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetMembers { + pub new_members: ::std::vec::Vec<::subxt::utils::AccountId32>, + pub prime: ::core::option::Option<::subxt::utils::AccountId32>, + pub old_count: ::core::primitive::u32, + } + impl ::subxt::blocks::StaticExtrinsic for SetMembers { + const CALL: &'static str = "set_members"; + const PALLET: &'static str = "TechnicalCommittee"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Execute { + pub proposal: ::std::boxed::Box, + #[codec(compact)] + pub length_bound: ::core::primitive::u32, + } + impl ::subxt::blocks::StaticExtrinsic for Execute { + const CALL: &'static str = "execute"; + const PALLET: &'static str = "TechnicalCommittee"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Propose { + #[codec(compact)] + pub threshold: ::core::primitive::u32, + pub proposal: ::std::boxed::Box, + #[codec(compact)] + pub length_bound: ::core::primitive::u32, + } + impl ::subxt::blocks::StaticExtrinsic for Propose { + const CALL: &'static str = "propose"; + const PALLET: &'static str = "TechnicalCommittee"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Vote { + pub proposal: ::subxt::utils::H256, + #[codec(compact)] + pub index: ::core::primitive::u32, + pub approve: ::core::primitive::bool, + } + impl ::subxt::blocks::StaticExtrinsic for Vote { + const CALL: &'static str = "vote"; + const PALLET: &'static str = "TechnicalCommittee"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct CloseOldWeight { + pub proposal_hash: ::subxt::utils::H256, + #[codec(compact)] + pub index: ::core::primitive::u32, + #[codec(compact)] + pub proposal_weight_bound: runtime_types::sp_weights::OldWeight, + #[codec(compact)] + pub length_bound: ::core::primitive::u32, + } + impl ::subxt::blocks::StaticExtrinsic for CloseOldWeight { + const CALL: &'static str = "close_old_weight"; + const PALLET: &'static str = "TechnicalCommittee"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct DisapproveProposal { + pub proposal_hash: ::subxt::utils::H256, + } + impl ::subxt::blocks::StaticExtrinsic for DisapproveProposal { + const CALL: &'static str = "disapprove_proposal"; + const PALLET: &'static str = "TechnicalCommittee"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Close { + pub proposal_hash: ::subxt::utils::H256, + #[codec(compact)] + pub index: ::core::primitive::u32, + pub proposal_weight_bound: runtime_types::sp_weights::weight_v2::Weight, + #[codec(compact)] + pub length_bound: ::core::primitive::u32, + } + impl ::subxt::blocks::StaticExtrinsic for Close { + const CALL: &'static str = "close"; + const PALLET: &'static str = "TechnicalCommittee"; + } } pub struct TransactionApi; impl TransactionApi { - #[doc = "Propose a new bounty."] + #[doc = "Set the collective's membership."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = "- `new_members`: The new member list. Be nice to the chain and provide it sorted."] + #[doc = "- `prime`: The prime member whose vote sets the default."] + #[doc = "- `old_count`: The upper bound for the previous number of members in storage. Used for"] + #[doc = " weight estimation."] #[doc = ""] - #[doc = "Payment: `TipReportDepositBase` will be reserved from the origin account, as well as"] - #[doc = "`DataDepositPerByte` for each byte in `reason`. It will be unreserved upon approval,"] - #[doc = "or slashed when rejected."] + #[doc = "Requires root origin."] #[doc = ""] - #[doc = "- `curator`: The curator account whom will manage this bounty."] - #[doc = "- `fee`: The curator fee."] - #[doc = "- `value`: The total payment amount of this bounty, curator fee included."] - #[doc = "- `description`: The description of this bounty."] - pub fn propose_bounty( + #[doc = "NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but"] + #[doc = " the weight estimations rely on it to estimate dispatchable weight."] + #[doc = ""] + #[doc = "# WARNING:"] + #[doc = ""] + #[doc = "The `pallet-collective` can also be managed by logic outside of the pallet through the"] + #[doc = "implementation of the trait [`ChangeMembers`]."] + #[doc = "Any call to `set_members` must be careful that the member set doesn't get out of sync"] + #[doc = "with other logic managing the member set."] + #[doc = ""] + #[doc = "# "] + #[doc = "## Weight"] + #[doc = "- `O(MP + N)` where:"] + #[doc = " - `M` old-members-count (code- and governance-bounded)"] + #[doc = " - `N` new-members-count (code- and governance-bounded)"] + #[doc = " - `P` proposals-count (code-bounded)"] + #[doc = "- DB:"] + #[doc = " - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the"] + #[doc = " members"] + #[doc = " - 1 storage read (codec `O(P)`) for reading the proposals"] + #[doc = " - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal"] + #[doc = " - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one"] + #[doc = "# "] + pub fn set_members( &self, - value: ::core::primitive::u128, - description: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Bounties", - "propose_bounty", - ProposeBounty { value, description }, + new_members: ::std::vec::Vec<::subxt::utils::AccountId32>, + prime: ::core::option::Option<::subxt::utils::AccountId32>, + old_count: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "TechnicalCommittee", + "set_members", + types::SetMembers { + new_members, + prime, + old_count, + }, [ - 99u8, 160u8, 94u8, 74u8, 105u8, 161u8, 123u8, 239u8, 241u8, 117u8, - 97u8, 99u8, 84u8, 101u8, 87u8, 3u8, 88u8, 175u8, 75u8, 59u8, 114u8, - 87u8, 18u8, 113u8, 126u8, 26u8, 42u8, 104u8, 201u8, 128u8, 102u8, - 219u8, + 141u8, 113u8, 137u8, 46u8, 75u8, 22u8, 143u8, 204u8, 50u8, 24u8, 137u8, + 25u8, 226u8, 166u8, 121u8, 161u8, 54u8, 144u8, 12u8, 145u8, 157u8, + 153u8, 47u8, 144u8, 94u8, 34u8, 217u8, 115u8, 125u8, 152u8, 110u8, + 28u8, ], ) } - #[doc = "Approve a bounty proposal. At a later time, the bounty will be funded and become active"] - #[doc = "and the original deposit will be returned."] + #[doc = "Dispatch a proposal from a member using the `Member` origin."] #[doc = ""] - #[doc = "May only be called from `T::SpendOrigin`."] + #[doc = "Origin must be a member of the collective."] #[doc = ""] #[doc = "# "] - #[doc = "- O(1)."] + #[doc = "## Weight"] + #[doc = "- `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching"] + #[doc = " `proposal`"] + #[doc = "- DB: 1 read (codec `O(M)`) + DB access of `proposal`"] + #[doc = "- 1 event"] #[doc = "# "] - pub fn approve_bounty( + pub fn execute( &self, - bounty_id: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Bounties", - "approve_bounty", - ApproveBounty { bounty_id }, + proposal: runtime_types::da_runtime::RuntimeCall, + length_bound: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "TechnicalCommittee", + "execute", + types::Execute { + proposal: ::std::boxed::Box::new(proposal), + length_bound, + }, [ - 82u8, 228u8, 232u8, 103u8, 198u8, 173u8, 190u8, 148u8, 159u8, 86u8, - 48u8, 4u8, 32u8, 169u8, 1u8, 129u8, 96u8, 145u8, 235u8, 68u8, 48u8, - 34u8, 5u8, 1u8, 76u8, 26u8, 100u8, 228u8, 92u8, 198u8, 183u8, 173u8, + 180u8, 228u8, 233u8, 49u8, 240u8, 234u8, 96u8, 169u8, 141u8, 56u8, + 150u8, 18u8, 253u8, 95u8, 224u8, 217u8, 135u8, 77u8, 242u8, 54u8, 4u8, + 36u8, 135u8, 127u8, 85u8, 211u8, 121u8, 82u8, 147u8, 236u8, 106u8, + 189u8, ], ) } - #[doc = "Assign a curator to a funded bounty."] + #[doc = "Add a new proposal to either be voted on or executed directly."] #[doc = ""] - #[doc = "May only be called from `T::SpendOrigin`."] + #[doc = "Requires the sender to be member."] + #[doc = ""] + #[doc = "`threshold` determines whether `proposal` is executed directly (`threshold < 2`)"] + #[doc = "or put up for voting."] #[doc = ""] #[doc = "# "] - #[doc = "- O(1)."] + #[doc = "## Weight"] + #[doc = "- `O(B + M + P1)` or `O(B + M + P2)` where:"] + #[doc = " - `B` is `proposal` size in bytes (length-fee-bounded)"] + #[doc = " - `M` is members-count (code- and governance-bounded)"] + #[doc = " - branching is influenced by `threshold` where:"] + #[doc = " - `P1` is proposal execution complexity (`threshold < 2`)"] + #[doc = " - `P2` is proposals-count (code-bounded) (`threshold >= 2`)"] + #[doc = "- DB:"] + #[doc = " - 1 storage read `is_member` (codec `O(M)`)"] + #[doc = " - 1 storage read `ProposalOf::contains_key` (codec `O(1)`)"] + #[doc = " - DB accesses influenced by `threshold`:"] + #[doc = " - EITHER storage accesses done by `proposal` (`threshold < 2`)"] + #[doc = " - OR proposal insertion (`threshold <= 2`)"] + #[doc = " - 1 storage mutation `Proposals` (codec `O(P2)`)"] + #[doc = " - 1 storage mutation `ProposalCount` (codec `O(1)`)"] + #[doc = " - 1 storage write `ProposalOf` (codec `O(B)`)"] + #[doc = " - 1 storage write `Voting` (codec `O(M)`)"] + #[doc = " - 1 event"] #[doc = "# "] - pub fn propose_curator( + pub fn propose( &self, - bounty_id: ::core::primitive::u32, - curator: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - fee: ::core::primitive::u128, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Bounties", - "propose_curator", - ProposeCurator { - bounty_id, - curator, - fee, + threshold: ::core::primitive::u32, + proposal: runtime_types::da_runtime::RuntimeCall, + length_bound: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "TechnicalCommittee", + "propose", + types::Propose { + threshold, + proposal: ::std::boxed::Box::new(proposal), + length_bound, }, [ - 85u8, 186u8, 206u8, 137u8, 98u8, 87u8, 202u8, 71u8, 89u8, 241u8, 56u8, - 212u8, 89u8, 215u8, 65u8, 97u8, 202u8, 139u8, 78u8, 66u8, 92u8, 177u8, - 163u8, 111u8, 212u8, 244u8, 41u8, 153u8, 104u8, 129u8, 112u8, 237u8, + 7u8, 221u8, 166u8, 248u8, 161u8, 0u8, 133u8, 14u8, 88u8, 208u8, 28u8, + 72u8, 21u8, 143u8, 23u8, 30u8, 182u8, 67u8, 22u8, 67u8, 151u8, 114u8, + 107u8, 183u8, 160u8, 51u8, 14u8, 219u8, 69u8, 119u8, 93u8, 10u8, ], ) } - #[doc = "Unassign curator from a bounty."] - #[doc = ""] - #[doc = "This function can only be called by the `RejectOrigin` a signed origin."] - #[doc = ""] - #[doc = "If this function is called by the `RejectOrigin`, we assume that the curator is"] - #[doc = "malicious or inactive. As a result, we will slash the curator when possible."] + #[doc = "Add an aye or nay vote for the sender to the given proposal."] #[doc = ""] - #[doc = "If the origin is the curator, we take this as a sign they are unable to do their job and"] - #[doc = "they willingly give up. We could slash them, but for now we allow them to recover their"] - #[doc = "deposit and exit without issue. (We may want to change this if it is abused.)"] - #[doc = ""] - #[doc = "Finally, the origin can be anyone if and only if the curator is \"inactive\". This allows"] - #[doc = "anyone in the community to call out that a curator is not doing their due diligence, and"] - #[doc = "we should pick a new curator. In this case the curator should also be slashed."] + #[doc = "Requires the sender to be a member."] #[doc = ""] + #[doc = "Transaction fees will be waived if the member is voting on any particular proposal"] + #[doc = "for the first time and the call is successful. Subsequent vote changes will charge a"] + #[doc = "fee."] #[doc = "# "] - #[doc = "- O(1)."] + #[doc = "## Weight"] + #[doc = "- `O(M)` where `M` is members-count (code- and governance-bounded)"] + #[doc = "- DB:"] + #[doc = " - 1 storage read `Members` (codec `O(M)`)"] + #[doc = " - 1 storage mutation `Voting` (codec `O(M)`)"] + #[doc = "- 1 event"] #[doc = "# "] - pub fn unassign_curator( + pub fn vote( &self, - bounty_id: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Bounties", - "unassign_curator", - UnassignCurator { bounty_id }, + proposal: ::subxt::utils::H256, + index: ::core::primitive::u32, + approve: ::core::primitive::bool, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "TechnicalCommittee", + "vote", + types::Vote { + proposal, + index, + approve, + }, [ - 218u8, 241u8, 247u8, 89u8, 95u8, 120u8, 93u8, 18u8, 85u8, 114u8, 158u8, - 254u8, 68u8, 77u8, 230u8, 186u8, 230u8, 201u8, 63u8, 223u8, 28u8, - 173u8, 244u8, 82u8, 113u8, 177u8, 99u8, 27u8, 207u8, 247u8, 207u8, - 213u8, + 110u8, 141u8, 24u8, 33u8, 91u8, 7u8, 89u8, 198u8, 54u8, 10u8, 76u8, + 129u8, 45u8, 20u8, 216u8, 104u8, 231u8, 246u8, 174u8, 205u8, 190u8, + 176u8, 171u8, 113u8, 33u8, 37u8, 155u8, 203u8, 251u8, 34u8, 25u8, + 120u8, ], ) } - #[doc = "Accept the curator role for a bounty."] - #[doc = "A deposit will be reserved from curator and refund upon successful payout."] + #[doc = "Close a vote that is either approved, disapproved or whose voting period has ended."] #[doc = ""] - #[doc = "May only be called from the curator."] + #[doc = "May be called by any signed account in order to finish voting and close the proposal."] #[doc = ""] - #[doc = "# "] - #[doc = "- O(1)."] - #[doc = "# "] - pub fn accept_curator( - &self, - bounty_id: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Bounties", - "accept_curator", - AcceptCurator { bounty_id }, - [ - 106u8, 96u8, 22u8, 67u8, 52u8, 109u8, 180u8, 225u8, 122u8, 253u8, - 209u8, 214u8, 132u8, 131u8, 247u8, 131u8, 162u8, 51u8, 144u8, 30u8, - 12u8, 126u8, 50u8, 152u8, 229u8, 119u8, 54u8, 116u8, 112u8, 235u8, - 34u8, 166u8, - ], - ) - } - - #[doc = "Award bounty to a beneficiary account. The beneficiary will be able to claim the funds"] - #[doc = "after a delay."] + #[doc = "If called before the end of the voting period it will only close the vote if it is"] + #[doc = "has enough votes to be approved or disapproved."] #[doc = ""] - #[doc = "The dispatch origin for this call must be the curator of this bounty."] + #[doc = "If called after the end of the voting period abstentions are counted as rejections"] + #[doc = "unless there is a prime member set and the prime member cast an approval."] #[doc = ""] - #[doc = "- `bounty_id`: Bounty ID to award."] - #[doc = "- `beneficiary`: The beneficiary account whom will receive the payout."] + #[doc = "If the close operation completes successfully with disapproval, the transaction fee will"] + #[doc = "be waived. Otherwise execution of the approved operation will be charged to the caller."] + #[doc = ""] + #[doc = "+ `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed"] + #[doc = "proposal."] + #[doc = "+ `length_bound`: The upper bound for the length of the proposal in storage. Checked via"] + #[doc = "`storage::read` so it is `size_of::() == 4` larger than the pure length."] #[doc = ""] #[doc = "# "] - #[doc = "- O(1)."] + #[doc = "## Weight"] + #[doc = "- `O(B + M + P1 + P2)` where:"] + #[doc = " - `B` is `proposal` size in bytes (length-fee-bounded)"] + #[doc = " - `M` is members-count (code- and governance-bounded)"] + #[doc = " - `P1` is the complexity of `proposal` preimage."] + #[doc = " - `P2` is proposal-count (code-bounded)"] + #[doc = "- DB:"] + #[doc = " - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`)"] + #[doc = " - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec"] + #[doc = " `O(P2)`)"] + #[doc = " - any mutations done while executing `proposal` (`P1`)"] + #[doc = "- up to 3 events"] #[doc = "# "] - pub fn award_bounty( + pub fn close_old_weight( &self, - bounty_id: ::core::primitive::u32, - beneficiary: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Bounties", - "award_bounty", - AwardBounty { - bounty_id, - beneficiary, + proposal_hash: ::subxt::utils::H256, + index: ::core::primitive::u32, + proposal_weight_bound: runtime_types::sp_weights::OldWeight, + length_bound: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "TechnicalCommittee", + "close_old_weight", + types::CloseOldWeight { + proposal_hash, + index, + proposal_weight_bound, + length_bound, }, [ - 7u8, 205u8, 73u8, 45u8, 57u8, 8u8, 24u8, 135u8, 89u8, 157u8, 35u8, - 176u8, 224u8, 106u8, 167u8, 232u8, 230u8, 153u8, 239u8, 45u8, 210u8, - 61u8, 17u8, 106u8, 220u8, 131u8, 105u8, 136u8, 232u8, 194u8, 243u8, - 48u8, + 206u8, 13u8, 195u8, 139u8, 64u8, 214u8, 244u8, 76u8, 241u8, 64u8, 67u8, + 43u8, 50u8, 76u8, 75u8, 247u8, 214u8, 58u8, 125u8, 72u8, 170u8, 104u8, + 67u8, 78u8, 230u8, 119u8, 78u8, 63u8, 161u8, 159u8, 176u8, 106u8, ], ) } - #[doc = "Claim the payout from an awarded bounty after payout delay."] + #[doc = "Disapprove a proposal, close, and remove it from the system, regardless of its current"] + #[doc = "state."] #[doc = ""] - #[doc = "The dispatch origin for this call must be the beneficiary of this bounty."] + #[doc = "Must be called by the Root origin."] #[doc = ""] - #[doc = "- `bounty_id`: Bounty ID to claim."] + #[doc = "Parameters:"] + #[doc = "* `proposal_hash`: The hash of the proposal that should be disapproved."] #[doc = ""] #[doc = "# "] - #[doc = "- O(1)."] + #[doc = "Complexity: O(P) where P is the number of max proposals"] + #[doc = "DB Weight:"] + #[doc = "* Reads: Proposals"] + #[doc = "* Writes: Voting, Proposals, ProposalOf"] #[doc = "# "] - pub fn claim_bounty( + pub fn disapprove_proposal( &self, - bounty_id: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Bounties", - "claim_bounty", - ClaimBounty { bounty_id }, + proposal_hash: ::subxt::utils::H256, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "TechnicalCommittee", + "disapprove_proposal", + types::DisapproveProposal { proposal_hash }, [ - 102u8, 95u8, 8u8, 89u8, 4u8, 126u8, 189u8, 28u8, 241u8, 16u8, 125u8, - 218u8, 42u8, 92u8, 177u8, 91u8, 8u8, 235u8, 33u8, 48u8, 64u8, 115u8, - 177u8, 95u8, 242u8, 97u8, 181u8, 50u8, 68u8, 37u8, 59u8, 85u8, + 26u8, 140u8, 111u8, 193u8, 229u8, 59u8, 53u8, 196u8, 230u8, 60u8, 7u8, + 155u8, 168u8, 7u8, 201u8, 177u8, 70u8, 103u8, 190u8, 57u8, 244u8, + 156u8, 67u8, 101u8, 228u8, 6u8, 213u8, 83u8, 225u8, 95u8, 148u8, 96u8, ], ) } - #[doc = "Cancel a proposed or active bounty. All the funds will be sent to treasury and"] - #[doc = "the curator deposit will be unreserved if possible."] + #[doc = "Close a vote that is either approved, disapproved or whose voting period has ended."] #[doc = ""] - #[doc = "Only `T::RejectOrigin` is able to cancel a bounty."] + #[doc = "May be called by any signed account in order to finish voting and close the proposal."] #[doc = ""] - #[doc = "- `bounty_id`: Bounty ID to cancel."] + #[doc = "If called before the end of the voting period it will only close the vote if it is"] + #[doc = "has enough votes to be approved or disapproved."] #[doc = ""] - #[doc = "# "] - #[doc = "- O(1)."] - #[doc = "# "] - pub fn close_bounty( - &self, - bounty_id: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Bounties", - "close_bounty", - CloseBounty { bounty_id }, - [ - 64u8, 113u8, 151u8, 228u8, 90u8, 55u8, 251u8, 63u8, 27u8, 211u8, 119u8, - 229u8, 137u8, 137u8, 183u8, 240u8, 241u8, 146u8, 69u8, 169u8, 124u8, - 220u8, 236u8, 111u8, 98u8, 188u8, 100u8, 52u8, 127u8, 245u8, 244u8, - 92u8, - ], - ) - } - - #[doc = "Extend the expiry time of an active bounty."] + #[doc = "If called after the end of the voting period abstentions are counted as rejections"] + #[doc = "unless there is a prime member set and the prime member cast an approval."] #[doc = ""] - #[doc = "The dispatch origin for this call must be the curator of this bounty."] + #[doc = "If the close operation completes successfully with disapproval, the transaction fee will"] + #[doc = "be waived. Otherwise execution of the approved operation will be charged to the caller."] #[doc = ""] - #[doc = "- `bounty_id`: Bounty ID to extend."] - #[doc = "- `remark`: additional information."] + #[doc = "+ `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed"] + #[doc = "proposal."] + #[doc = "+ `length_bound`: The upper bound for the length of the proposal in storage. Checked via"] + #[doc = "`storage::read` so it is `size_of::() == 4` larger than the pure length."] #[doc = ""] #[doc = "# "] - #[doc = "- O(1)."] + #[doc = "## Weight"] + #[doc = "- `O(B + M + P1 + P2)` where:"] + #[doc = " - `B` is `proposal` size in bytes (length-fee-bounded)"] + #[doc = " - `M` is members-count (code- and governance-bounded)"] + #[doc = " - `P1` is the complexity of `proposal` preimage."] + #[doc = " - `P2` is proposal-count (code-bounded)"] + #[doc = "- DB:"] + #[doc = " - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`)"] + #[doc = " - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec"] + #[doc = " `O(P2)`)"] + #[doc = " - any mutations done while executing `proposal` (`P1`)"] + #[doc = "- up to 3 events"] #[doc = "# "] - pub fn extend_bounty_expiry( + pub fn close( &self, - bounty_id: ::core::primitive::u32, - remark: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Bounties", - "extend_bounty_expiry", - ExtendBountyExpiry { bounty_id, remark }, + proposal_hash: ::subxt::utils::H256, + index: ::core::primitive::u32, + proposal_weight_bound: runtime_types::sp_weights::weight_v2::Weight, + length_bound: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "TechnicalCommittee", + "close", + types::Close { + proposal_hash, + index, + proposal_weight_bound, + length_bound, + }, [ - 97u8, 69u8, 157u8, 39u8, 59u8, 72u8, 79u8, 88u8, 104u8, 119u8, 91u8, - 26u8, 73u8, 216u8, 174u8, 95u8, 254u8, 214u8, 63u8, 138u8, 100u8, - 112u8, 185u8, 81u8, 159u8, 247u8, 221u8, 60u8, 87u8, 40u8, 80u8, 202u8, + 189u8, 149u8, 125u8, 63u8, 39u8, 201u8, 247u8, 4u8, 220u8, 74u8, 78u8, + 14u8, 113u8, 163u8, 1u8, 159u8, 81u8, 248u8, 141u8, 111u8, 34u8, 243u8, + 67u8, 70u8, 60u8, 92u8, 47u8, 70u8, 66u8, 246u8, 236u8, 153u8, ], ) } } } #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::pallet_bounties::pallet::Event; + pub type Event = runtime_types::pallet_collective::pallet::Event2; pub mod events { use super::runtime_types; #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "New bounty proposal."] - pub struct BountyProposed { - pub index: ::core::primitive::u32, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A motion (given hash) has been proposed (by given account) with a threshold (given"] + #[doc = "`MemberCount`)."] + pub struct Proposed { + pub account: ::subxt::utils::AccountId32, + pub proposal_index: ::core::primitive::u32, + pub proposal_hash: ::subxt::utils::H256, + pub threshold: ::core::primitive::u32, } - impl ::subxt::events::StaticEvent for BountyProposed { - const EVENT: &'static str = "BountyProposed"; - const PALLET: &'static str = "Bounties"; + impl ::subxt::events::StaticEvent for Proposed { + const EVENT: &'static str = "Proposed"; + const PALLET: &'static str = "TechnicalCommittee"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "A bounty proposal was rejected; funds were slashed."] - pub struct BountyRejected { - pub index: ::core::primitive::u32, - pub bond: ::core::primitive::u128, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A motion (given hash) has been voted on by given account, leaving"] + #[doc = "a tally (yes votes and no votes given respectively as `MemberCount`)."] + pub struct Voted { + pub account: ::subxt::utils::AccountId32, + pub proposal_hash: ::subxt::utils::H256, + pub voted: ::core::primitive::bool, + pub yes: ::core::primitive::u32, + pub no: ::core::primitive::u32, } - impl ::subxt::events::StaticEvent for BountyRejected { - const EVENT: &'static str = "BountyRejected"; - const PALLET: &'static str = "Bounties"; + impl ::subxt::events::StaticEvent for Voted { + const EVENT: &'static str = "Voted"; + const PALLET: &'static str = "TechnicalCommittee"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "A bounty proposal is funded and became active."] - pub struct BountyBecameActive { - pub index: ::core::primitive::u32, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A motion was approved by the required threshold."] + pub struct Approved { + pub proposal_hash: ::subxt::utils::H256, } - impl ::subxt::events::StaticEvent for BountyBecameActive { - const EVENT: &'static str = "BountyBecameActive"; - const PALLET: &'static str = "Bounties"; + impl ::subxt::events::StaticEvent for Approved { + const EVENT: &'static str = "Approved"; + const PALLET: &'static str = "TechnicalCommittee"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "A bounty is awarded to a beneficiary."] - pub struct BountyAwarded { - pub index: ::core::primitive::u32, - pub beneficiary: ::subxt::utils::AccountId32, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A motion was not approved by the required threshold."] + pub struct Disapproved { + pub proposal_hash: ::subxt::utils::H256, } - impl ::subxt::events::StaticEvent for BountyAwarded { - const EVENT: &'static str = "BountyAwarded"; - const PALLET: &'static str = "Bounties"; + impl ::subxt::events::StaticEvent for Disapproved { + const EVENT: &'static str = "Disapproved"; + const PALLET: &'static str = "TechnicalCommittee"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "A bounty is claimed by beneficiary."] - pub struct BountyClaimed { - pub index: ::core::primitive::u32, - pub payout: ::core::primitive::u128, - pub beneficiary: ::subxt::utils::AccountId32, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A motion was executed; result will be `Ok` if it returned without error."] + pub struct Executed { + pub proposal_hash: ::subxt::utils::H256, + pub result: ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, } - impl ::subxt::events::StaticEvent for BountyClaimed { - const EVENT: &'static str = "BountyClaimed"; - const PALLET: &'static str = "Bounties"; + impl ::subxt::events::StaticEvent for Executed { + const EVENT: &'static str = "Executed"; + const PALLET: &'static str = "TechnicalCommittee"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "A bounty is cancelled."] - pub struct BountyCanceled { - pub index: ::core::primitive::u32, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A single member did some action; result will be `Ok` if it returned without error."] + pub struct MemberExecuted { + pub proposal_hash: ::subxt::utils::H256, + pub result: ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, } - impl ::subxt::events::StaticEvent for BountyCanceled { - const EVENT: &'static str = "BountyCanceled"; - const PALLET: &'static str = "Bounties"; + impl ::subxt::events::StaticEvent for MemberExecuted { + const EVENT: &'static str = "MemberExecuted"; + const PALLET: &'static str = "TechnicalCommittee"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "A bounty expiry is extended."] - pub struct BountyExtended { - pub index: ::core::primitive::u32, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A proposal was closed because its threshold was reached or after its duration was up."] + pub struct Closed { + pub proposal_hash: ::subxt::utils::H256, + pub yes: ::core::primitive::u32, + pub no: ::core::primitive::u32, } - impl ::subxt::events::StaticEvent for BountyExtended { - const EVENT: &'static str = "BountyExtended"; - const PALLET: &'static str = "Bounties"; + impl ::subxt::events::StaticEvent for Closed { + const EVENT: &'static str = "Closed"; + const PALLET: &'static str = "TechnicalCommittee"; } } pub mod storage { use super::runtime_types; pub struct StorageApi; impl StorageApi { - #[doc = " Number of bounty proposals that have been made."] - pub fn bounty_count( + #[doc = " The hashes of the active proposals."] + pub fn proposals( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::sp_core::bounded::bounded_vec::BoundedVec<::subxt::utils::H256>, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), > { - ::subxt::storage::address::StaticStorageAddress::new( - "Bounties", - "BountyCount", + ::subxt::storage::address::Address::new_static( + "TechnicalCommittee", + "Proposals", vec![], [ - 5u8, 188u8, 134u8, 220u8, 64u8, 49u8, 188u8, 98u8, 185u8, 186u8, 230u8, - 65u8, 247u8, 199u8, 28u8, 178u8, 202u8, 193u8, 41u8, 83u8, 115u8, - 253u8, 182u8, 123u8, 92u8, 138u8, 12u8, 31u8, 31u8, 213u8, 23u8, 118u8, + 210u8, 234u8, 7u8, 29u8, 231u8, 80u8, 17u8, 36u8, 189u8, 34u8, 175u8, + 147u8, 56u8, 92u8, 201u8, 104u8, 207u8, 150u8, 58u8, 110u8, 90u8, 28u8, + 198u8, 79u8, 236u8, 245u8, 19u8, 38u8, 68u8, 59u8, 215u8, 74u8, ], ) } - #[doc = " Bounties that have been made."] - pub fn bounties( + #[doc = " Actual proposal for a given hash, if it's current."] + pub fn proposal_of( &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_bounties::Bounty< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - ::core::primitive::u32, - >, - >, + _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::da_runtime::RuntimeCall, ::subxt::storage::address::Yes, (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Bounties", - "Bounties", - vec![::subxt::storage::address::StorageMapKey::new( + ::subxt::storage::address::Address::new_static( + "TechnicalCommittee", + "ProposalOf", + vec![::subxt::storage::address::make_static_storage_map_key( _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ - 111u8, 149u8, 33u8, 54u8, 172u8, 143u8, 41u8, 231u8, 184u8, 255u8, - 238u8, 206u8, 87u8, 142u8, 84u8, 10u8, 236u8, 141u8, 190u8, 193u8, - 72u8, 170u8, 19u8, 110u8, 135u8, 136u8, 220u8, 11u8, 99u8, 126u8, - 225u8, 208u8, + 127u8, 4u8, 120u8, 186u8, 68u8, 244u8, 146u8, 244u8, 186u8, 173u8, + 89u8, 90u8, 123u8, 111u8, 16u8, 57u8, 111u8, 169u8, 30u8, 194u8, 202u8, + 183u8, 251u8, 182u8, 29u8, 117u8, 48u8, 63u8, 67u8, 132u8, 119u8, + 238u8, ], ) } - #[doc = " Bounties that have been made."] - pub fn bounties_root( + #[doc = " Actual proposal for a given hash, if it's current."] + pub fn proposal_of_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_bounties::Bounty< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - ::core::primitive::u32, - >, - >, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::da_runtime::RuntimeCall, (), (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Bounties", - "Bounties", + ::subxt::storage::address::Address::new_static( + "TechnicalCommittee", + "ProposalOf", Vec::new(), [ - 111u8, 149u8, 33u8, 54u8, 172u8, 143u8, 41u8, 231u8, 184u8, 255u8, - 238u8, 206u8, 87u8, 142u8, 84u8, 10u8, 236u8, 141u8, 190u8, 193u8, - 72u8, 170u8, 19u8, 110u8, 135u8, 136u8, 220u8, 11u8, 99u8, 126u8, - 225u8, 208u8, + 127u8, 4u8, 120u8, 186u8, 68u8, 244u8, 146u8, 244u8, 186u8, 173u8, + 89u8, 90u8, 123u8, 111u8, 16u8, 57u8, 111u8, 169u8, 30u8, 194u8, 202u8, + 183u8, 251u8, 182u8, 29u8, 117u8, 48u8, 63u8, 67u8, 132u8, 119u8, + 238u8, ], ) } - #[doc = " The description of each bounty."] - pub fn bounty_descriptions( + #[doc = " Votes on a given proposal, if it is ongoing."] + pub fn voting( &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, + _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_collective::Votes< + ::subxt::utils::AccountId32, + ::core::primitive::u32, >, ::subxt::storage::address::Yes, (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Bounties", - "BountyDescriptions", - vec![::subxt::storage::address::StorageMapKey::new( + ::subxt::storage::address::Address::new_static( + "TechnicalCommittee", + "Voting", + vec![::subxt::storage::address::make_static_storage_map_key( _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ - 252u8, 0u8, 9u8, 225u8, 13u8, 135u8, 7u8, 121u8, 154u8, 155u8, 116u8, - 83u8, 160u8, 37u8, 72u8, 11u8, 72u8, 0u8, 248u8, 73u8, 158u8, 84u8, - 125u8, 221u8, 176u8, 231u8, 100u8, 239u8, 111u8, 22u8, 29u8, 13u8, + 56u8, 192u8, 111u8, 180u8, 253u8, 5u8, 232u8, 126u8, 177u8, 48u8, + 135u8, 39u8, 89u8, 71u8, 62u8, 239u8, 216u8, 17u8, 64u8, 82u8, 130u8, + 236u8, 96u8, 89u8, 167u8, 2u8, 118u8, 113u8, 63u8, 176u8, 124u8, 73u8, ], ) } - #[doc = " The description of each bounty."] - pub fn bounty_descriptions_root( + #[doc = " Votes on a given proposal, if it is ongoing."] + pub fn voting_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_collective::Votes< + ::subxt::utils::AccountId32, + ::core::primitive::u32, >, (), (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Bounties", - "BountyDescriptions", + ::subxt::storage::address::Address::new_static( + "TechnicalCommittee", + "Voting", Vec::new(), [ - 252u8, 0u8, 9u8, 225u8, 13u8, 135u8, 7u8, 121u8, 154u8, 155u8, 116u8, - 83u8, 160u8, 37u8, 72u8, 11u8, 72u8, 0u8, 248u8, 73u8, 158u8, 84u8, - 125u8, 221u8, 176u8, 231u8, 100u8, 239u8, 111u8, 22u8, 29u8, 13u8, + 56u8, 192u8, 111u8, 180u8, 253u8, 5u8, 232u8, 126u8, 177u8, 48u8, + 135u8, 39u8, 89u8, 71u8, 62u8, 239u8, 216u8, 17u8, 64u8, 82u8, 130u8, + 236u8, 96u8, 89u8, 167u8, 2u8, 118u8, 113u8, 63u8, 176u8, 124u8, 73u8, ], ) } - #[doc = " Bounty indices that have been approved but not yet funded."] - pub fn bounty_approvals( + #[doc = " Proposals so far."] + pub fn proposal_count( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u32, - >, - >, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), > { - ::subxt::storage::address::StaticStorageAddress::new( - "Bounties", - "BountyApprovals", + ::subxt::storage::address::Address::new_static( + "TechnicalCommittee", + "ProposalCount", vec![], [ - 64u8, 93u8, 54u8, 94u8, 122u8, 9u8, 246u8, 86u8, 234u8, 30u8, 125u8, - 132u8, 49u8, 128u8, 1u8, 219u8, 241u8, 13u8, 217u8, 186u8, 48u8, 21u8, - 5u8, 227u8, 71u8, 157u8, 128u8, 226u8, 214u8, 49u8, 249u8, 183u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " The amount held on deposit for placing a bounty proposal."] - pub fn bounty_deposit_base( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, - > { - ::subxt::constants::StaticConstantAddress::new( - "Bounties", - "BountyDepositBase", - [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, - 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, - 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, - ], - ) - } - - #[doc = " The delay period for which a bounty beneficiary need to wait before claim the payout."] - pub fn bounty_deposit_payout_delay( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { - ::subxt::constants::StaticConstantAddress::new( - "Bounties", - "BountyDepositPayoutDelay", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, - ], - ) - } - - #[doc = " Bounty duration in blocks."] - pub fn bounty_update_period( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { - ::subxt::constants::StaticConstantAddress::new( - "Bounties", - "BountyUpdatePeriod", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, - ], - ) - } - - #[doc = " The curator deposit is calculated as a percentage of the curator fee."] - #[doc = ""] - #[doc = " This deposit has optional upper and lower bounds with `CuratorDepositMax` and"] - #[doc = " `CuratorDepositMin`."] - pub fn curator_deposit_multiplier( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_arithmetic::per_things::Permill, - >, - > { - ::subxt::constants::StaticConstantAddress::new( - "Bounties", - "CuratorDepositMultiplier", - [ - 225u8, 236u8, 95u8, 157u8, 90u8, 94u8, 106u8, 192u8, 254u8, 19u8, 87u8, - 80u8, 16u8, 62u8, 42u8, 204u8, 136u8, 106u8, 225u8, 53u8, 212u8, 52u8, - 177u8, 79u8, 4u8, 116u8, 201u8, 104u8, 222u8, 75u8, 86u8, 227u8, - ], - ) - } - - #[doc = " Maximum amount of funds that should be placed in a deposit for making a proposal."] - pub fn curator_deposit_max( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType< - ::core::option::Option<::core::primitive::u128>, - >, - > { - ::subxt::constants::StaticConstantAddress::new( - "Bounties", - "CuratorDepositMax", - [ - 84u8, 154u8, 218u8, 83u8, 84u8, 189u8, 32u8, 20u8, 120u8, 194u8, 88u8, - 205u8, 109u8, 216u8, 114u8, 193u8, 120u8, 198u8, 154u8, 237u8, 134u8, - 204u8, 102u8, 247u8, 52u8, 103u8, 231u8, 43u8, 243u8, 122u8, 60u8, - 216u8, - ], - ) - } - - #[doc = " Minimum amount of funds that should be placed in a deposit for making a proposal."] - pub fn curator_deposit_min( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType< - ::core::option::Option<::core::primitive::u128>, - >, - > { - ::subxt::constants::StaticConstantAddress::new( - "Bounties", - "CuratorDepositMin", - [ - 84u8, 154u8, 218u8, 83u8, 84u8, 189u8, 32u8, 20u8, 120u8, 194u8, 88u8, - 205u8, 109u8, 216u8, 114u8, 193u8, 120u8, 198u8, 154u8, 237u8, 134u8, - 204u8, 102u8, 247u8, 52u8, 103u8, 231u8, 43u8, 243u8, 122u8, 60u8, - 216u8, - ], - ) - } - - #[doc = " Minimum value for a bounty."] - pub fn bounty_value_minimum( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, - > { - ::subxt::constants::StaticConstantAddress::new( - "Bounties", - "BountyValueMinimum", - [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, - 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, - 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, + 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 = " The amount held on deposit per byte within the tip report reason or bounty description."] - pub fn data_deposit_per_byte( + #[doc = " The current members of the collective. This is stored sorted (just by value)."] + pub fn members( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec<::subxt::utils::AccountId32>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), > { - ::subxt::constants::StaticConstantAddress::new( - "Bounties", - "DataDepositPerByte", + ::subxt::storage::address::Address::new_static( + "TechnicalCommittee", + "Members", + vec![], [ - 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, + 16u8, 29u8, 32u8, 222u8, 175u8, 136u8, 111u8, 101u8, 43u8, 74u8, 209u8, + 81u8, 47u8, 97u8, 129u8, 39u8, 225u8, 243u8, 110u8, 229u8, 237u8, 21u8, + 90u8, 127u8, 80u8, 239u8, 156u8, 32u8, 90u8, 109u8, 179u8, 0u8, ], ) } - #[doc = " Maximum acceptable reason length."] - #[doc = ""] - #[doc = " Benchmarks depend on this value, be sure to update weights file when changing this value"] - pub fn maximum_reason_length( + #[doc = " The prime member that helps determine the default vote behavior in case of absentations."] + pub fn prime( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::subxt::utils::AccountId32, + ::subxt::storage::address::Yes, + (), + (), > { - ::subxt::constants::StaticConstantAddress::new( - "Bounties", - "MaximumReasonLength", + ::subxt::storage::address::Address::new_static( + "TechnicalCommittee", + "Prime", + vec![], [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, + 72u8, 128u8, 214u8, 72u8, 78u8, 80u8, 100u8, 198u8, 114u8, 215u8, 59u8, + 3u8, 103u8, 14u8, 152u8, 202u8, 12u8, 165u8, 224u8, 10u8, 41u8, 154u8, + 77u8, 95u8, 116u8, 143u8, 250u8, 250u8, 176u8, 92u8, 238u8, 154u8, ], ) } } } } - pub mod tips { + pub mod elections { use super::{root_mod, runtime_types}; + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub type Error = runtime_types::pallet_elections_phragmen::pallet::Error; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub type Call = runtime_types::pallet_elections_phragmen::pallet::Call; pub mod calls { use super::{root_mod, runtime_types}; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct ReportAwesome { - pub reason: ::std::vec::Vec<::core::primitive::u8>, - pub who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct RetractTip { - pub hash: ::subxt::utils::H256, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct TipNew { - pub reason: ::std::vec::Vec<::core::primitive::u8>, - pub who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - #[codec(compact)] - pub tip_value: ::core::primitive::u128, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Tip { - pub hash: ::subxt::utils::H256, - #[codec(compact)] - pub tip_value: ::core::primitive::u128, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct CloseTip { - pub hash: ::subxt::utils::H256, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct SlashTip { - pub hash: ::subxt::utils::H256, + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Vote { + pub votes: ::std::vec::Vec<::subxt::utils::AccountId32>, + #[codec(compact)] + pub value: ::core::primitive::u128, + } + impl ::subxt::blocks::StaticExtrinsic for Vote { + const CALL: &'static str = "vote"; + const PALLET: &'static str = "Elections"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct RemoveVoter; + impl ::subxt::blocks::StaticExtrinsic for RemoveVoter { + const CALL: &'static str = "remove_voter"; + const PALLET: &'static str = "Elections"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SubmitCandidacy { + #[codec(compact)] + pub candidate_count: ::core::primitive::u32, + } + impl ::subxt::blocks::StaticExtrinsic for SubmitCandidacy { + const CALL: &'static str = "submit_candidacy"; + const PALLET: &'static str = "Elections"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct RenounceCandidacy { + pub renouncing: runtime_types::pallet_elections_phragmen::Renouncing, + } + impl ::subxt::blocks::StaticExtrinsic for RenounceCandidacy { + const CALL: &'static str = "renounce_candidacy"; + const PALLET: &'static str = "Elections"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct RemoveMember { + pub who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + pub slash_bond: ::core::primitive::bool, + pub rerun_election: ::core::primitive::bool, + } + impl ::subxt::blocks::StaticExtrinsic for RemoveMember { + const CALL: &'static str = "remove_member"; + const PALLET: &'static str = "Elections"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct CleanDefunctVoters { + pub num_voters: ::core::primitive::u32, + pub num_defunct: ::core::primitive::u32, + } + impl ::subxt::blocks::StaticExtrinsic for CleanDefunctVoters { + const CALL: &'static str = "clean_defunct_voters"; + const PALLET: &'static str = "Elections"; + } } pub struct TransactionApi; impl TransactionApi { - #[doc = "Report something `reason` that deserves a tip and claim any eventual the finder's fee."] + #[doc = "Vote for a set of candidates for the upcoming round of election. This can be called to"] + #[doc = "set the initial votes, or update already existing votes."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = "Upon initial voting, `value` units of `who`'s balance is locked and a deposit amount is"] + #[doc = "reserved. The deposit is based on the number of votes and can be updated over time."] #[doc = ""] - #[doc = "Payment: `TipReportDepositBase` will be reserved from the origin account, as well as"] - #[doc = "`DataDepositPerByte` for each byte in `reason`."] + #[doc = "The `votes` should:"] + #[doc = " - not be empty."] + #[doc = " - be less than the number of possible candidates. Note that all current members and"] + #[doc = " runners-up are also automatically candidates for the next round."] #[doc = ""] - #[doc = "- `reason`: The reason for, or the thing that deserves, the tip; generally this will be"] - #[doc = " a UTF-8-encoded URL."] - #[doc = "- `who`: The account which should be credited for the tip."] + #[doc = "If `value` is more than `who`'s free balance, then the maximum of the two is used."] #[doc = ""] - #[doc = "Emits `NewTip` if successful."] + #[doc = "The dispatch origin of this call must be signed."] + #[doc = ""] + #[doc = "### Warning"] + #[doc = ""] + #[doc = "It is the responsibility of the caller to **NOT** place all of their balance into the"] + #[doc = "lock and keep some for further operations."] #[doc = ""] #[doc = "# "] - #[doc = "- Complexity: `O(R)` where `R` length of `reason`."] - #[doc = " - encoding and hashing of 'reason'"] - #[doc = "- DbReads: `Reasons`, `Tips`"] - #[doc = "- DbWrites: `Reasons`, `Tips`"] + #[doc = "We assume the maximum weight among all 3 cases: vote_equal, vote_more and vote_less."] #[doc = "# "] - pub fn report_awesome( + pub fn vote( &self, - reason: ::std::vec::Vec<::core::primitive::u8>, - who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Tips", - "report_awesome", - ReportAwesome { reason, who }, + votes: ::std::vec::Vec<::subxt::utils::AccountId32>, + value: ::core::primitive::u128, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Elections", + "vote", + types::Vote { votes, value }, [ - 234u8, 199u8, 253u8, 109u8, 105u8, 252u8, 249u8, 138u8, 197u8, 187u8, - 226u8, 67u8, 195u8, 51u8, 197u8, 85u8, 110u8, 173u8, 85u8, 176u8, 27u8, - 147u8, 221u8, 85u8, 177u8, 55u8, 2u8, 218u8, 4u8, 115u8, 67u8, 121u8, + 229u8, 163u8, 1u8, 49u8, 26u8, 130u8, 7u8, 228u8, 34u8, 80u8, 17u8, + 125u8, 32u8, 180u8, 174u8, 69u8, 17u8, 171u8, 163u8, 54u8, 42u8, 139u8, + 201u8, 205u8, 196u8, 18u8, 16u8, 211u8, 252u8, 64u8, 73u8, 5u8, ], ) } - #[doc = "Retract a prior tip-report from `report_awesome`, and cancel the process of tipping."] + #[doc = "Remove `origin` as a voter."] #[doc = ""] - #[doc = "If successful, the original deposit will be unreserved."] + #[doc = "This removes the lock and returns the deposit."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and the tip identified by `hash`"] - #[doc = "must have been reported by the signing account through `report_awesome` (and not"] - #[doc = "through `tip_new`)."] + #[doc = "The dispatch origin of this call must be signed and be a voter."] + pub fn remove_voter(&self) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Elections", + "remove_voter", + types::RemoveVoter {}, + [ + 89u8, 43u8, 70u8, 117u8, 76u8, 84u8, 230u8, 114u8, 229u8, 91u8, 75u8, + 213u8, 47u8, 143u8, 233u8, 47u8, 108u8, 120u8, 171u8, 167u8, 14u8, + 62u8, 52u8, 20u8, 227u8, 106u8, 249u8, 239u8, 33u8, 115u8, 155u8, + 106u8, + ], + ) + } + + #[doc = "Submit oneself for candidacy. A fixed amount of deposit is recorded."] #[doc = ""] - #[doc = "- `hash`: The identity of the open tip for which a tip value is declared. This is formed"] - #[doc = " as the hash of the tuple of the original tip `reason` and the beneficiary account ID."] + #[doc = "All candidates are wiped at the end of the term. They either become a member/runner-up,"] + #[doc = "or leave the system while their deposit is slashed."] #[doc = ""] - #[doc = "Emits `TipRetracted` if successful."] + #[doc = "The dispatch origin of this call must be signed."] + #[doc = ""] + #[doc = "### Warning"] + #[doc = ""] + #[doc = "Even if a candidate ends up being a member, they must call [`Call::renounce_candidacy`]"] + #[doc = "to get their deposit back. Losing the spot in an election will always lead to a slash."] #[doc = ""] #[doc = "# "] - #[doc = "- Complexity: `O(1)`"] - #[doc = " - Depends on the length of `T::Hash` which is fixed."] - #[doc = "- DbReads: `Tips`, `origin account`"] - #[doc = "- DbWrites: `Reasons`, `Tips`, `origin account`"] + #[doc = "The number of current candidates must be provided as witness data."] #[doc = "# "] - pub fn retract_tip( + pub fn submit_candidacy( &self, - hash: ::subxt::utils::H256, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new("Tips", "retract_tip", RetractTip { hash }, [ - 137u8, 42u8, 229u8, 188u8, 157u8, 195u8, 184u8, 176u8, 64u8, 142u8, 67u8, - 175u8, 185u8, 207u8, 214u8, 71u8, 165u8, 29u8, 137u8, 227u8, 132u8, 195u8, - 255u8, 66u8, 186u8, 57u8, 34u8, 184u8, 187u8, 65u8, 129u8, 131u8, - ]) + candidate_count: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Elections", + "submit_candidacy", + types::SubmitCandidacy { candidate_count }, + [ + 229u8, 169u8, 247u8, 102u8, 33u8, 7u8, 9u8, 125u8, 190u8, 179u8, 241u8, + 220u8, 205u8, 242u8, 168u8, 112u8, 197u8, 169u8, 135u8, 133u8, 102u8, + 173u8, 168u8, 203u8, 17u8, 135u8, 224u8, 145u8, 101u8, 204u8, 253u8, + 4u8, + ], + ) } - #[doc = "Give a tip for something new; no finder's fee will be taken."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and the signing account must be a"] - #[doc = "member of the `Tippers` set."] + #[doc = "Renounce one's intention to be a candidate for the next election round. 3 potential"] + #[doc = "outcomes exist:"] #[doc = ""] - #[doc = "- `reason`: The reason for, or the thing that deserves, the tip; generally this will be"] - #[doc = " a UTF-8-encoded URL."] - #[doc = "- `who`: The account which should be credited for the tip."] - #[doc = "- `tip_value`: The amount of tip that the sender would like to give. The median tip"] - #[doc = " value of active tippers will be given to the `who`."] + #[doc = "- `origin` is a candidate and not elected in any set. In this case, the deposit is"] + #[doc = " unreserved, returned and origin is removed as a candidate."] + #[doc = "- `origin` is a current runner-up. In this case, the deposit is unreserved, returned and"] + #[doc = " origin is removed as a runner-up."] + #[doc = "- `origin` is a current member. In this case, the deposit is unreserved and origin is"] + #[doc = " removed as a member, consequently not being a candidate for the next round anymore."] + #[doc = " Similar to [`remove_member`](Self::remove_member), if replacement runners exists, they"] + #[doc = " are immediately used. If the prime is renouncing, then no prime will exist until the"] + #[doc = " next round."] #[doc = ""] - #[doc = "Emits `NewTip` if successful."] + #[doc = "The dispatch origin of this call must be signed, and have one of the above roles."] #[doc = ""] #[doc = "# "] - #[doc = "- Complexity: `O(R + T)` where `R` length of `reason`, `T` is the number of tippers."] - #[doc = " - `O(T)`: decoding `Tipper` vec of length `T`. `T` is charged as upper bound given by"] - #[doc = " `ContainsLengthBound`. The actual cost depends on the implementation of"] - #[doc = " `T::Tippers`."] - #[doc = " - `O(R)`: hashing and encoding of reason of length `R`"] - #[doc = "- DbReads: `Tippers`, `Reasons`"] - #[doc = "- DbWrites: `Reasons`, `Tips`"] + #[doc = "The type of renouncing must be provided as witness data."] #[doc = "# "] - pub fn tip_new( + pub fn renounce_candidacy( &self, - reason: ::std::vec::Vec<::core::primitive::u8>, - who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - tip_value: ::core::primitive::u128, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Tips", - "tip_new", - TipNew { - reason, - who, - tip_value, - }, + renouncing: runtime_types::pallet_elections_phragmen::Renouncing, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Elections", + "renounce_candidacy", + types::RenounceCandidacy { renouncing }, [ - 166u8, 19u8, 234u8, 170u8, 180u8, 74u8, 235u8, 156u8, 58u8, 125u8, - 199u8, 215u8, 15u8, 96u8, 240u8, 71u8, 205u8, 61u8, 60u8, 204u8, 12u8, - 35u8, 252u8, 233u8, 31u8, 86u8, 204u8, 230u8, 40u8, 247u8, 47u8, 135u8, + 230u8, 140u8, 205u8, 240u8, 110u8, 247u8, 242u8, 185u8, 228u8, 135u8, + 243u8, 73u8, 71u8, 200u8, 88u8, 134u8, 132u8, 174u8, 190u8, 251u8, + 81u8, 85u8, 174u8, 230u8, 94u8, 97u8, 96u8, 230u8, 15u8, 204u8, 247u8, + 214u8, ], ) } - #[doc = "Declare a tip value for an already-open tip."] + #[doc = "Remove a particular member from the set. This is effective immediately and the bond of"] + #[doc = "the outgoing member is slashed."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and the signing account must be a"] - #[doc = "member of the `Tippers` set."] + #[doc = "If a runner-up is available, then the best runner-up will be removed and replaces the"] + #[doc = "outgoing member. Otherwise, if `rerun_election` is `true`, a new phragmen election is"] + #[doc = "started, else, nothing happens."] #[doc = ""] - #[doc = "- `hash`: The identity of the open tip for which a tip value is declared. This is formed"] - #[doc = " as the hash of the tuple of the hash of the original tip `reason` and the beneficiary"] - #[doc = " account ID."] - #[doc = "- `tip_value`: The amount of tip that the sender would like to give. The median tip"] - #[doc = " value of active tippers will be given to the `who`."] - #[doc = ""] - #[doc = "Emits `TipClosing` if the threshold of tippers has been reached and the countdown period"] - #[doc = "has started."] - #[doc = ""] - #[doc = "# "] - #[doc = "- Complexity: `O(T)` where `T` is the number of tippers. decoding `Tipper` vec of length"] - #[doc = " `T`, insert tip and check closing, `T` is charged as upper bound given by"] - #[doc = " `ContainsLengthBound`. The actual cost depends on the implementation of `T::Tippers`."] - #[doc = ""] - #[doc = " Actually weight could be lower as it depends on how many tips are in `OpenTip` but it"] - #[doc = " is weighted as if almost full i.e of length `T-1`."] - #[doc = "- DbReads: `Tippers`, `Tips`"] - #[doc = "- DbWrites: `Tips`"] - #[doc = "# "] - pub fn tip( - &self, - hash: ::subxt::utils::H256, - tip_value: ::core::primitive::u128, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new("Tips", "tip", Tip { hash, tip_value }, [ - 133u8, 52u8, 131u8, 14u8, 71u8, 232u8, 254u8, 31u8, 33u8, 206u8, 50u8, - 76u8, 56u8, 167u8, 228u8, 202u8, 195u8, 0u8, 164u8, 107u8, 170u8, 98u8, - 192u8, 37u8, 209u8, 199u8, 130u8, 15u8, 168u8, 63u8, 181u8, 134u8, - ]) - } - - #[doc = "Close and payout a tip."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = "If `slash_bond` is set to true, the bond of the member being removed is slashed. Else,"] + #[doc = "it is returned."] #[doc = ""] - #[doc = "The tip identified by `hash` must have finished its countdown period."] + #[doc = "The dispatch origin of this call must be root."] #[doc = ""] - #[doc = "- `hash`: The identity of the open tip for which a tip value is declared. This is formed"] - #[doc = " as the hash of the tuple of the original tip `reason` and the beneficiary account ID."] + #[doc = "Note that this does not affect the designated block number of the next election."] #[doc = ""] #[doc = "# "] - #[doc = "- Complexity: `O(T)` where `T` is the number of tippers. decoding `Tipper` vec of length"] - #[doc = " `T`. `T` is charged as upper bound given by `ContainsLengthBound`. The actual cost"] - #[doc = " depends on the implementation of `T::Tippers`."] - #[doc = "- DbReads: `Tips`, `Tippers`, `tip finder`"] - #[doc = "- DbWrites: `Reasons`, `Tips`, `Tippers`, `tip finder`"] + #[doc = "If we have a replacement, we use a small weight. Else, since this is a root call and"] + #[doc = "will go into phragmen, we assume full block for now."] #[doc = "# "] - pub fn close_tip( + pub fn remove_member( &self, - hash: ::subxt::utils::H256, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new("Tips", "close_tip", CloseTip { hash }, [ - 32u8, 53u8, 0u8, 222u8, 45u8, 157u8, 107u8, 174u8, 203u8, 50u8, 81u8, - 230u8, 6u8, 111u8, 79u8, 55u8, 49u8, 151u8, 107u8, 114u8, 81u8, 200u8, - 144u8, 175u8, 29u8, 142u8, 115u8, 184u8, 102u8, 116u8, 156u8, 173u8, - ]) + who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + slash_bond: ::core::primitive::bool, + rerun_election: ::core::primitive::bool, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Elections", + "remove_member", + types::RemoveMember { + who, + slash_bond, + rerun_election, + }, + [ + 121u8, 189u8, 213u8, 154u8, 126u8, 196u8, 140u8, 208u8, 152u8, 191u8, + 224u8, 160u8, 42u8, 2u8, 243u8, 37u8, 120u8, 73u8, 160u8, 5u8, 243u8, + 110u8, 167u8, 242u8, 22u8, 100u8, 93u8, 197u8, 209u8, 85u8, 201u8, + 153u8, + ], + ) } - #[doc = "Remove and slash an already-open tip."] - #[doc = ""] - #[doc = "May only be called from `T::RejectOrigin`."] + #[doc = "Clean all voters who are defunct (i.e. they do not serve any purpose at all). The"] + #[doc = "deposit of the removed voters are returned."] #[doc = ""] - #[doc = "As a result, the finder is slashed and the deposits are lost."] + #[doc = "This is an root function to be used only for cleaning the state."] #[doc = ""] - #[doc = "Emits `TipSlashed` if successful."] + #[doc = "The dispatch origin of this call must be root."] #[doc = ""] #[doc = "# "] - #[doc = " `T` is charged as upper bound given by `ContainsLengthBound`."] - #[doc = " The actual cost depends on the implementation of `T::Tippers`."] + #[doc = "The total number of voters and those that are defunct must be provided as witness data."] #[doc = "# "] - pub fn slash_tip( + pub fn clean_defunct_voters( &self, - hash: ::subxt::utils::H256, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new("Tips", "slash_tip", SlashTip { hash }, [ - 222u8, 209u8, 22u8, 47u8, 114u8, 230u8, 81u8, 200u8, 131u8, 0u8, 209u8, - 54u8, 17u8, 200u8, 175u8, 125u8, 100u8, 254u8, 41u8, 178u8, 20u8, 27u8, - 9u8, 184u8, 79u8, 93u8, 208u8, 148u8, 27u8, 190u8, 176u8, 169u8, - ]) + num_voters: ::core::primitive::u32, + num_defunct: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Elections", + "clean_defunct_voters", + types::CleanDefunctVoters { + num_voters, + num_defunct, + }, + [ + 103u8, 241u8, 66u8, 156u8, 118u8, 36u8, 101u8, 148u8, 76u8, 162u8, + 240u8, 31u8, 114u8, 10u8, 247u8, 68u8, 163u8, 187u8, 117u8, 47u8, 14u8, + 16u8, 103u8, 211u8, 243u8, 44u8, 235u8, 200u8, 127u8, 113u8, 98u8, + 83u8, + ], + ) } } } #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::pallet_tips::pallet::Event; + pub type Event = runtime_types::pallet_elections_phragmen::pallet::Event; pub mod events { use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "A new tip suggestion has been opened."] - pub struct NewTip { - pub tip_hash: ::subxt::utils::H256, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A new term with new_members. This indicates that enough candidates existed to run"] + #[doc = "the election, not that enough have has been elected. The inner value must be examined"] + #[doc = "for this purpose. A `NewTerm(\\[\\])` indicates that some candidates got their bond"] + #[doc = "slashed and none were elected, whilst `EmptyTerm` means that no candidates existed to"] + #[doc = "begin with."] + pub struct NewTerm { + pub new_members: + ::std::vec::Vec<(::subxt::utils::AccountId32, ::core::primitive::u128)>, } - impl ::subxt::events::StaticEvent for NewTip { - const EVENT: &'static str = "NewTip"; - const PALLET: &'static str = "Tips"; + impl ::subxt::events::StaticEvent for NewTerm { + const EVENT: &'static str = "NewTerm"; + const PALLET: &'static str = "Elections"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "A tip suggestion has reached threshold and is closing."] - pub struct TipClosing { - pub tip_hash: ::subxt::utils::H256, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "No (or not enough) candidates existed for this round. This is different from"] + #[doc = "`NewTerm(\\[\\])`. See the description of `NewTerm`."] + pub struct EmptyTerm; + impl ::subxt::events::StaticEvent for EmptyTerm { + const EVENT: &'static str = "EmptyTerm"; + const PALLET: &'static str = "Elections"; } - impl ::subxt::events::StaticEvent for TipClosing { - const EVENT: &'static str = "TipClosing"; - const PALLET: &'static str = "Tips"; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Internal error happened while trying to perform election."] + pub struct ElectionError; + impl ::subxt::events::StaticEvent for ElectionError { + const EVENT: &'static str = "ElectionError"; + const PALLET: &'static str = "Elections"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "A tip suggestion has been closed."] - pub struct TipClosed { - pub tip_hash: ::subxt::utils::H256, - pub who: ::subxt::utils::AccountId32, - pub payout: ::core::primitive::u128, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A member has been removed. This should always be followed by either `NewTerm` or"] + #[doc = "`EmptyTerm`."] + pub struct MemberKicked { + pub member: ::subxt::utils::AccountId32, } - impl ::subxt::events::StaticEvent for TipClosed { - const EVENT: &'static str = "TipClosed"; - const PALLET: &'static str = "Tips"; + impl ::subxt::events::StaticEvent for MemberKicked { + const EVENT: &'static str = "MemberKicked"; + const PALLET: &'static str = "Elections"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "A tip suggestion has been retracted."] - pub struct TipRetracted { - pub tip_hash: ::subxt::utils::H256, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Someone has renounced their candidacy."] + pub struct Renounced { + pub candidate: ::subxt::utils::AccountId32, } - impl ::subxt::events::StaticEvent for TipRetracted { - const EVENT: &'static str = "TipRetracted"; - const PALLET: &'static str = "Tips"; + impl ::subxt::events::StaticEvent for Renounced { + const EVENT: &'static str = "Renounced"; + const PALLET: &'static str = "Elections"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "A tip suggestion has been slashed."] - pub struct TipSlashed { - pub tip_hash: ::subxt::utils::H256, - pub finder: ::subxt::utils::AccountId32, - pub deposit: ::core::primitive::u128, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A candidate was slashed by amount due to failing to obtain a seat as member or"] + #[doc = "runner-up."] + #[doc = ""] + #[doc = "Note that old members and runners-up are also candidates."] + pub struct CandidateSlashed { + pub candidate: ::subxt::utils::AccountId32, + pub amount: ::core::primitive::u128, } - impl ::subxt::events::StaticEvent for TipSlashed { - const EVENT: &'static str = "TipSlashed"; - const PALLET: &'static str = "Tips"; + impl ::subxt::events::StaticEvent for CandidateSlashed { + const EVENT: &'static str = "CandidateSlashed"; + const PALLET: &'static str = "Elections"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A seat holder was slashed by amount by being forcefully removed from the set."] + pub struct SeatHolderSlashed { + pub seat_holder: ::subxt::utils::AccountId32, + pub amount: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for SeatHolderSlashed { + const EVENT: &'static str = "SeatHolderSlashed"; + const PALLET: &'static str = "Elections"; } } pub mod storage { use super::runtime_types; pub struct StorageApi; impl StorageApi { - #[doc = " TipsMap that are not yet completed. Keyed by the hash of `(reason, who)` from the value."] - #[doc = " This has the insecure enumerable hash function since the key itself is already"] - #[doc = " guaranteed to be a secure hash."] - pub fn tips( + #[doc = " The current elected members."] + #[doc = ""] + #[doc = " Invariant: Always sorted based on account id."] + pub fn members( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_tips::OpenTip< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec< + runtime_types::pallet_elections_phragmen::SeatHolder< ::subxt::utils::AccountId32, ::core::primitive::u128, - ::core::primitive::u32, - ::subxt::utils::H256, >, >, ::subxt::storage::address::Yes, - (), ::subxt::storage::address::Yes, + (), > { - ::subxt::storage::address::StaticStorageAddress::new( - "Tips", - "Tips", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], + ::subxt::storage::address::Address::new_static( + "Elections", + "Members", + vec![], [ - 241u8, 196u8, 105u8, 248u8, 29u8, 66u8, 86u8, 98u8, 6u8, 159u8, 191u8, - 0u8, 227u8, 232u8, 147u8, 248u8, 173u8, 20u8, 225u8, 12u8, 232u8, 5u8, - 93u8, 78u8, 18u8, 154u8, 130u8, 38u8, 142u8, 36u8, 66u8, 0u8, + 210u8, 86u8, 209u8, 114u8, 170u8, 238u8, 106u8, 102u8, 0u8, 140u8, + 113u8, 238u8, 36u8, 115u8, 162u8, 167u8, 194u8, 3u8, 57u8, 171u8, 41u8, + 219u8, 39u8, 120u8, 192u8, 208u8, 155u8, 163u8, 26u8, 209u8, 42u8, + 73u8, ], ) } - #[doc = " TipsMap that are not yet completed. Keyed by the hash of `(reason, who)` from the value."] - #[doc = " This has the insecure enumerable hash function since the key itself is already"] - #[doc = " guaranteed to be a secure hash."] - pub fn tips_root( + #[doc = " The current reserved runners-up."] + #[doc = ""] + #[doc = " Invariant: Always sorted based on rank (worse to best). Upon removal of a member, the"] + #[doc = " last (i.e. _best_) runner-up will be replaced."] + pub fn runners_up( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_tips::OpenTip< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec< + runtime_types::pallet_elections_phragmen::SeatHolder< ::subxt::utils::AccountId32, ::core::primitive::u128, - ::core::primitive::u32, - ::subxt::utils::H256, >, >, - (), - (), ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), > { - ::subxt::storage::address::StaticStorageAddress::new( - "Tips", - "Tips", - Vec::new(), + ::subxt::storage::address::Address::new_static( + "Elections", + "RunnersUp", + vec![], [ - 241u8, 196u8, 105u8, 248u8, 29u8, 66u8, 86u8, 98u8, 6u8, 159u8, 191u8, - 0u8, 227u8, 232u8, 147u8, 248u8, 173u8, 20u8, 225u8, 12u8, 232u8, 5u8, - 93u8, 78u8, 18u8, 154u8, 130u8, 38u8, 142u8, 36u8, 66u8, 0u8, + 102u8, 255u8, 105u8, 141u8, 24u8, 140u8, 180u8, 249u8, 19u8, 52u8, + 144u8, 157u8, 139u8, 156u8, 5u8, 30u8, 148u8, 36u8, 67u8, 25u8, 238u8, + 196u8, 163u8, 165u8, 11u8, 1u8, 162u8, 131u8, 65u8, 207u8, 140u8, + 171u8, ], ) } - #[doc = " Simple preimage lookup from the reason's hash to the original data. Again, has an"] - #[doc = " insecure enumerable hash since the key is guaranteed to be the result of a secure hash."] - pub fn reasons( + #[doc = " The present candidate list. A current member or runner-up can never enter this vector"] + #[doc = " and is always implicitly assumed to be a candidate."] + #[doc = ""] + #[doc = " Second element is the deposit."] + #[doc = ""] + #[doc = " Invariant: Always sorted based on account id."] + pub fn candidates( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::std::vec::Vec<::core::primitive::u8>>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec<(::subxt::utils::AccountId32, ::core::primitive::u128)>, ::subxt::storage::address::Yes, - (), ::subxt::storage::address::Yes, + (), > { - ::subxt::storage::address::StaticStorageAddress::new( - "Tips", - "Reasons", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Identity, - )], + ::subxt::storage::address::Address::new_static( + "Elections", + "Candidates", + vec![], [ - 202u8, 191u8, 36u8, 162u8, 156u8, 102u8, 115u8, 10u8, 203u8, 35u8, - 201u8, 70u8, 195u8, 151u8, 89u8, 82u8, 202u8, 35u8, 210u8, 176u8, 82u8, - 1u8, 77u8, 94u8, 31u8, 70u8, 252u8, 194u8, 166u8, 91u8, 189u8, 134u8, + 220u8, 219u8, 115u8, 204u8, 15u8, 0u8, 135u8, 72u8, 241u8, 89u8, 10u8, + 105u8, 106u8, 93u8, 18u8, 63u8, 43u8, 117u8, 120u8, 73u8, 8u8, 143u8, + 244u8, 144u8, 223u8, 155u8, 217u8, 132u8, 246u8, 228u8, 210u8, 53u8, ], ) } - #[doc = " Simple preimage lookup from the reason's hash to the original data. Again, has an"] - #[doc = " insecure enumerable hash since the key is guaranteed to be the result of a secure hash."] - pub fn reasons_root( + #[doc = " The total number of vote rounds that have happened, excluding the upcoming one."] + pub fn election_rounds( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::std::vec::Vec<::core::primitive::u8>>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), + > { + ::subxt::storage::address::Address::new_static( + "Elections", + "ElectionRounds", + vec![], + [ + 97u8, 151u8, 159u8, 133u8, 59u8, 215u8, 12u8, 178u8, 203u8, 24u8, + 138u8, 36u8, 108u8, 134u8, 217u8, 137u8, 24u8, 6u8, 126u8, 87u8, 49u8, + 90u8, 198u8, 16u8, 36u8, 109u8, 223u8, 190u8, 81u8, 7u8, 239u8, 243u8, + ], + ) + } + + #[doc = " Votes and locked stake of a particular voter."] + #[doc = ""] + #[doc = " TWOX-NOTE: SAFE as `AccountId` is a crypto hash."] + pub fn voting( + &self, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_elections_phragmen::Voter< + ::subxt::utils::AccountId32, + ::core::primitive::u128, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Elections", + "Voting", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], + [ + 18u8, 65u8, 68u8, 10u8, 123u8, 174u8, 185u8, 95u8, 75u8, 37u8, 201u8, + 31u8, 93u8, 189u8, 184u8, 76u8, 199u8, 168u8, 74u8, 199u8, 75u8, 78u8, + 55u8, 222u8, 234u8, 48u8, 81u8, 52u8, 187u8, 64u8, 41u8, 93u8, + ], + ) + } + + #[doc = " Votes and locked stake of a particular voter."] + #[doc = ""] + #[doc = " TWOX-NOTE: SAFE as `AccountId` is a crypto hash."] + pub fn voting_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_elections_phragmen::Voter< + ::subxt::utils::AccountId32, + ::core::primitive::u128, + >, (), ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Tips", - "Reasons", + ::subxt::storage::address::Address::new_static( + "Elections", + "Voting", Vec::new(), [ - 202u8, 191u8, 36u8, 162u8, 156u8, 102u8, 115u8, 10u8, 203u8, 35u8, - 201u8, 70u8, 195u8, 151u8, 89u8, 82u8, 202u8, 35u8, 210u8, 176u8, 82u8, - 1u8, 77u8, 94u8, 31u8, 70u8, 252u8, 194u8, 166u8, 91u8, 189u8, 134u8, + 18u8, 65u8, 68u8, 10u8, 123u8, 174u8, 185u8, 95u8, 75u8, 37u8, 201u8, + 31u8, 93u8, 189u8, 184u8, 76u8, 199u8, 168u8, 74u8, 199u8, 75u8, 78u8, + 55u8, 222u8, 234u8, 48u8, 81u8, 52u8, 187u8, 64u8, 41u8, 93u8, ], ) } @@ -16116,1015 +14001,1020 @@ pub mod api { use super::runtime_types; pub struct ConstantsApi; impl ConstantsApi { - #[doc = " Maximum acceptable reason length."] - #[doc = ""] - #[doc = " Benchmarks depend on this value, be sure to update weights file when changing this value"] - pub fn maximum_reason_length( + #[doc = " Identifier for the elections-phragmen pallet's lock"] + pub fn pallet_id( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { - ::subxt::constants::StaticConstantAddress::new("Tips", "MaximumReasonLength", [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, 125u8, - 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, 178u8, 197u8, - 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, 145u8, + ) -> ::subxt::constants::Address<[::core::primitive::u8; 8usize]> { + ::subxt::constants::Address::new_static("Elections", "PalletId", [ + 157u8, 118u8, 79u8, 88u8, 241u8, 22u8, 185u8, 37u8, 42u8, 20u8, 133u8, + 240u8, 11u8, 25u8, 66u8, 154u8, 84u8, 163u8, 78u8, 92u8, 171u8, 82u8, + 248u8, 76u8, 189u8, 70u8, 142u8, 249u8, 153u8, 84u8, 180u8, 60u8, ]) } - #[doc = " The amount held on deposit per byte within the tip report reason or bounty description."] - pub fn data_deposit_per_byte( + #[doc = " How much should be locked up in order to submit one's candidacy."] + pub fn candidacy_bond( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, - > { - ::subxt::constants::StaticConstantAddress::new("Tips", "DataDepositPerByte", [ + ) -> ::subxt::constants::Address<::core::primitive::u128> { + ::subxt::constants::Address::new_static("Elections", "CandidacyBond", [ 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, ]) } - #[doc = " The period for which a tip remains open after is has achieved threshold tippers."] - pub fn tip_countdown( + #[doc = " Base deposit associated with voting."] + #[doc = ""] + #[doc = " This should be sensibly high to economically ensure the pallet cannot be attacked by"] + #[doc = " creating a gigantic number of votes."] + pub fn voting_bond_base( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { - ::subxt::constants::StaticConstantAddress::new("Tips", "TipCountdown", [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, 125u8, - 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, 178u8, 197u8, - 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, 145u8, + ) -> ::subxt::constants::Address<::core::primitive::u128> { + ::subxt::constants::Address::new_static("Elections", "VotingBondBase", [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, 136u8, + 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, ]) } - #[doc = " The percent of the final tip which goes to the original reporter of the tip."] - pub fn tip_finders_fee( + #[doc = " The amount of bond that need to be locked for each vote (32 bytes)."] + pub fn voting_bond_factor( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_arithmetic::per_things::Percent, - >, - > { - ::subxt::constants::StaticConstantAddress::new("Tips", "TipFindersFee", [ - 99u8, 121u8, 176u8, 172u8, 235u8, 159u8, 116u8, 114u8, 179u8, 91u8, 129u8, - 117u8, 204u8, 135u8, 53u8, 7u8, 151u8, 26u8, 124u8, 151u8, 202u8, 171u8, - 171u8, 207u8, 183u8, 177u8, 24u8, 53u8, 109u8, 185u8, 71u8, 183u8, + ) -> ::subxt::constants::Address<::core::primitive::u128> { + ::subxt::constants::Address::new_static("Elections", "VotingBondFactor", [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, 136u8, + 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, ]) } - #[doc = " The amount held on deposit for placing a tip report."] - pub fn tip_report_deposit_base( + #[doc = " Number of members to elect."] + pub fn desired_members( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, - > { - ::subxt::constants::StaticConstantAddress::new( - "Tips", - "TipReportDepositBase", - [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, - 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, - 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, - ], - ) + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static("Elections", "DesiredMembers", [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, 125u8, + 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, 178u8, 197u8, + 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, 145u8, + ]) } - } - } - } - pub mod mmr { - use super::{root_mod, runtime_types}; - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " Latest MMR Root hash."] - pub fn root_hash( + + #[doc = " Number of runners_up to keep."] + pub fn desired_runners_up( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::subxt::utils::H256>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Mmr", - "RootHash", - vec![], - [ - 182u8, 163u8, 37u8, 44u8, 2u8, 163u8, 57u8, 184u8, 97u8, 55u8, 1u8, - 116u8, 55u8, 169u8, 23u8, 221u8, 182u8, 5u8, 174u8, 217u8, 111u8, 55u8, - 180u8, 161u8, 69u8, 120u8, 212u8, 73u8, 2u8, 1u8, 39u8, 224u8, - ], - ) + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static("Elections", "DesiredRunnersUp", [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, 125u8, + 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, 178u8, 197u8, + 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, 145u8, + ]) } - #[doc = " Current size of the MMR (number of leaves)."] - pub fn number_of_leaves( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u64>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Mmr", - "NumberOfLeaves", - vec![], - [ - 138u8, 124u8, 23u8, 186u8, 255u8, 231u8, 187u8, 122u8, 213u8, 160u8, - 29u8, 24u8, 88u8, 98u8, 171u8, 36u8, 195u8, 216u8, 27u8, 190u8, 192u8, - 152u8, 8u8, 13u8, 210u8, 232u8, 45u8, 184u8, 240u8, 255u8, 156u8, - 204u8, - ], - ) + #[doc = " How long each seat is kept. This defines the next block number at which an election"] + #[doc = " round will happen. If set to zero, no elections are ever triggered and the module will"] + #[doc = " be in passive mode."] + pub fn term_duration(&self) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static("Elections", "TermDuration", [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, 125u8, + 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, 178u8, 197u8, + 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, 145u8, + ]) } - #[doc = " Hashes of the nodes in the MMR."] + #[doc = " The maximum number of candidates in a phragmen election."] #[doc = ""] - #[doc = " Note this collection only contains MMR peaks, the inner nodes (and leaves)"] - #[doc = " are pruned and only stored in the Offchain DB."] - pub fn nodes( + #[doc = " Warning: The election happens onchain, and this value will determine"] + #[doc = " the size of the election. When this limit is reached no more"] + #[doc = " candidates are accepted in the election."] + pub fn max_candidates( &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u64>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::subxt::utils::H256>, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Mmr", - "Nodes", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Identity, - )], - [ - 188u8, 148u8, 126u8, 226u8, 142u8, 91u8, 61u8, 52u8, 213u8, 36u8, - 120u8, 232u8, 20u8, 11u8, 61u8, 1u8, 130u8, 155u8, 81u8, 34u8, 153u8, - 149u8, 210u8, 232u8, 113u8, 242u8, 249u8, 8u8, 61u8, 51u8, 148u8, 98u8, - ], - ) + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static("Elections", "MaxCandidates", [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, 125u8, + 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, 178u8, 197u8, + 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, 145u8, + ]) } - #[doc = " Hashes of the nodes in the MMR."] + #[doc = " The maximum number of voters to allow in a phragmen election."] #[doc = ""] - #[doc = " Note this collection only contains MMR peaks, the inner nodes (and leaves)"] - #[doc = " are pruned and only stored in the Offchain DB."] - pub fn nodes_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::subxt::utils::H256>, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Mmr", - "Nodes", - Vec::new(), - [ - 188u8, 148u8, 126u8, 226u8, 142u8, 91u8, 61u8, 52u8, 213u8, 36u8, - 120u8, 232u8, 20u8, 11u8, 61u8, 1u8, 130u8, 155u8, 81u8, 34u8, 153u8, - 149u8, 210u8, 232u8, 113u8, 242u8, 249u8, 8u8, 61u8, 51u8, 148u8, 98u8, - ], - ) + #[doc = " Warning: This impacts the size of the election which is run onchain."] + #[doc = " When the limit is reached the new voters are ignored."] + pub fn max_voters(&self) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static("Elections", "MaxVoters", [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, 125u8, + 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, 178u8, 197u8, + 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, 145u8, + ]) } } } } - pub mod data_availability { + pub mod technical_membership { use super::{root_mod, runtime_types}; + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub type Error = runtime_types::pallet_membership::pallet::Error; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub type Call = runtime_types::pallet_membership::pallet::Call; pub mod calls { use super::{root_mod, runtime_types}; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct CreateApplicationKey { - pub key: - runtime_types::sp_core::bounded::bounded_vec::BoundedVec<::core::primitive::u8>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct SubmitData { - pub data: - runtime_types::sp_core::bounded::bounded_vec::BoundedVec<::core::primitive::u8>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct SubmitBlockLengthProposal { - pub rows: ::core::primitive::u32, - pub cols: ::core::primitive::u32, - } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Creates an application key if `key` does not exist yet."] - pub fn create_application_key( - &self, - key: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct AddMember { + pub who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "DataAvailability", - "create_application_key", - CreateApplicationKey { key }, - [ - 72u8, 173u8, 240u8, 89u8, 218u8, 104u8, 43u8, 227u8, 167u8, 173u8, - 58u8, 254u8, 243u8, 117u8, 221u8, 121u8, 163u8, 205u8, 31u8, 35u8, - 239u8, 53u8, 148u8, 250u8, 48u8, 81u8, 46u8, 121u8, 72u8, 23u8, 236u8, - 6u8, - ], - ) + } + impl ::subxt::blocks::StaticExtrinsic for AddMember { + const CALL: &'static str = "add_member"; + const PALLET: &'static str = "TechnicalMembership"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct RemoveMember { + pub who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + } + impl ::subxt::blocks::StaticExtrinsic for RemoveMember { + const CALL: &'static str = "remove_member"; + const PALLET: &'static str = "TechnicalMembership"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SwapMember { + pub remove: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + pub add: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + } + impl ::subxt::blocks::StaticExtrinsic for SwapMember { + const CALL: &'static str = "swap_member"; + const PALLET: &'static str = "TechnicalMembership"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ResetMembers { + pub members: ::std::vec::Vec<::subxt::utils::AccountId32>, + } + impl ::subxt::blocks::StaticExtrinsic for ResetMembers { + const CALL: &'static str = "reset_members"; + const PALLET: &'static str = "TechnicalMembership"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ChangeKey { + pub new: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + } + impl ::subxt::blocks::StaticExtrinsic for ChangeKey { + const CALL: &'static str = "change_key"; + const PALLET: &'static str = "TechnicalMembership"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetPrime { + pub who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + } + impl ::subxt::blocks::StaticExtrinsic for SetPrime { + const CALL: &'static str = "set_prime"; + const PALLET: &'static str = "TechnicalMembership"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ClearPrime; + impl ::subxt::blocks::StaticExtrinsic for ClearPrime { + const CALL: &'static str = "clear_prime"; + const PALLET: &'static str = "TechnicalMembership"; + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Add a member `who` to the set."] + #[doc = ""] + #[doc = "May only be called from `T::AddOrigin`."] + pub fn add_member( + &self, + who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "TechnicalMembership", + "add_member", + types::AddMember { who }, + [ + 138u8, 255u8, 102u8, 159u8, 20u8, 50u8, 254u8, 231u8, 96u8, 129u8, + 60u8, 16u8, 10u8, 245u8, 109u8, 255u8, 240u8, 120u8, 87u8, 88u8, 97u8, + 175u8, 3u8, 113u8, 237u8, 212u8, 69u8, 21u8, 112u8, 215u8, 89u8, 69u8, + ], + ) } - pub fn submit_data( + #[doc = "Remove a member `who` from the set."] + #[doc = ""] + #[doc = "May only be called from `T::RemoveOrigin`."] + pub fn remove_member( &self, - data: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, + who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "DataAvailability", - "submit_data", - SubmitData { data }, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "TechnicalMembership", + "remove_member", + types::RemoveMember { who }, [ - 154u8, 109u8, 83u8, 128u8, 67u8, 33u8, 87u8, 165u8, 135u8, 119u8, - 223u8, 220u8, 107u8, 18u8, 81u8, 65u8, 241u8, 213u8, 198u8, 110u8, - 175u8, 25u8, 6u8, 188u8, 157u8, 85u8, 213u8, 133u8, 235u8, 240u8, 32u8, - 76u8, + 121u8, 104u8, 219u8, 37u8, 141u8, 96u8, 126u8, 220u8, 13u8, 241u8, + 206u8, 223u8, 111u8, 67u8, 117u8, 243u8, 74u8, 16u8, 209u8, 230u8, + 84u8, 15u8, 66u8, 106u8, 150u8, 113u8, 27u8, 26u8, 23u8, 152u8, 32u8, + 167u8, ], ) } - pub fn submit_block_length_proposal( + #[doc = "Swap out one member `remove` for another `add`."] + #[doc = ""] + #[doc = "May only be called from `T::SwapOrigin`."] + #[doc = ""] + #[doc = "Prime membership is *not* passed from `remove` to `add`, if extant."] + pub fn swap_member( &self, - rows: ::core::primitive::u32, - cols: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "DataAvailability", - "submit_block_length_proposal", - SubmitBlockLengthProposal { rows, cols }, + remove: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + add: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "TechnicalMembership", + "swap_member", + types::SwapMember { remove, add }, [ - 97u8, 1u8, 244u8, 28u8, 180u8, 49u8, 28u8, 9u8, 9u8, 215u8, 184u8, - 200u8, 14u8, 77u8, 21u8, 190u8, 176u8, 8u8, 12u8, 83u8, 176u8, 95u8, - 149u8, 84u8, 129u8, 111u8, 181u8, 236u8, 77u8, 62u8, 115u8, 153u8, + 59u8, 246u8, 217u8, 53u8, 173u8, 139u8, 220u8, 69u8, 94u8, 125u8, + 173u8, 93u8, 215u8, 1u8, 44u8, 208u8, 193u8, 18u8, 238u8, 34u8, 132u8, + 161u8, 174u8, 34u8, 135u8, 166u8, 130u8, 19u8, 108u8, 219u8, 211u8, + 202u8, + ], + ) + } + + #[doc = "Change the membership to a new set, disregarding the existing membership. Be nice and"] + #[doc = "pass `members` pre-sorted."] + #[doc = ""] + #[doc = "May only be called from `T::ResetOrigin`."] + pub fn reset_members( + &self, + members: ::std::vec::Vec<::subxt::utils::AccountId32>, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "TechnicalMembership", + "reset_members", + types::ResetMembers { members }, + [ + 212u8, 144u8, 99u8, 156u8, 70u8, 4u8, 219u8, 227u8, 150u8, 25u8, 86u8, + 8u8, 215u8, 128u8, 193u8, 206u8, 33u8, 193u8, 71u8, 15u8, 20u8, 92u8, + 99u8, 89u8, 174u8, 236u8, 102u8, 82u8, 164u8, 234u8, 12u8, 45u8, + ], + ) + } + + #[doc = "Swap out the sending member for some other key `new`."] + #[doc = ""] + #[doc = "May only be called from `Signed` origin of a current member."] + #[doc = ""] + #[doc = "Prime membership is passed from the origin account to `new`, if extant."] + pub fn change_key( + &self, + new: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "TechnicalMembership", + "change_key", + types::ChangeKey { new }, + [ + 134u8, 113u8, 38u8, 177u8, 161u8, 80u8, 99u8, 236u8, 80u8, 200u8, 17u8, + 137u8, 246u8, 98u8, 143u8, 136u8, 177u8, 23u8, 177u8, 195u8, 36u8, + 57u8, 243u8, 197u8, 160u8, 225u8, 171u8, 114u8, 146u8, 233u8, 81u8, + 232u8, + ], + ) + } + + #[doc = "Set the prime member. Must be a current member."] + #[doc = ""] + #[doc = "May only be called from `T::PrimeOrigin`."] + pub fn set_prime( + &self, + who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "TechnicalMembership", + "set_prime", + types::SetPrime { who }, + [ + 209u8, 16u8, 241u8, 104u8, 226u8, 31u8, 133u8, 167u8, 151u8, 175u8, + 79u8, 192u8, 160u8, 21u8, 94u8, 171u8, 226u8, 187u8, 197u8, 102u8, + 156u8, 116u8, 36u8, 125u8, 139u8, 196u8, 175u8, 31u8, 22u8, 119u8, + 150u8, 53u8, + ], + ) + } + + #[doc = "Remove the prime member if it exists."] + #[doc = ""] + #[doc = "May only be called from `T::PrimeOrigin`."] + pub fn clear_prime(&self) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "TechnicalMembership", + "clear_prime", + types::ClearPrime {}, + [ + 71u8, 213u8, 34u8, 23u8, 186u8, 63u8, 240u8, 216u8, 190u8, 251u8, 84u8, + 109u8, 140u8, 137u8, 210u8, 211u8, 242u8, 231u8, 212u8, 133u8, 151u8, + 125u8, 25u8, 46u8, 210u8, 53u8, 133u8, 222u8, 21u8, 107u8, 120u8, 52u8, ], ) } } } - #[doc = "Event for the pallet."] - pub type Event = runtime_types::da_control::pallet::Event; + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub type Event = runtime_types::pallet_membership::pallet::Event; pub mod events { use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "A new application key was created."] - pub struct ApplicationKeyCreated { - pub key: - runtime_types::sp_core::bounded::bounded_vec::BoundedVec<::core::primitive::u8>, - pub owner: ::subxt::utils::AccountId32, - pub id: runtime_types::da_primitives::asdr::AppId, - } - impl ::subxt::events::StaticEvent for ApplicationKeyCreated { - const EVENT: &'static str = "ApplicationKeyCreated"; - const PALLET: &'static str = "DataAvailability"; + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "The given member was added; see the transaction for who."] + pub struct MemberAdded; + impl ::subxt::events::StaticEvent for MemberAdded { + const EVENT: &'static str = "MemberAdded"; + const PALLET: &'static str = "TechnicalMembership"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - pub struct DataSubmitted { - pub who: ::subxt::utils::AccountId32, - pub data: - runtime_types::sp_core::bounded::bounded_vec::BoundedVec<::core::primitive::u8>, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "The given member was removed; see the transaction for who."] + pub struct MemberRemoved; + impl ::subxt::events::StaticEvent for MemberRemoved { + const EVENT: &'static str = "MemberRemoved"; + const PALLET: &'static str = "TechnicalMembership"; } - impl ::subxt::events::StaticEvent for DataSubmitted { - const EVENT: &'static str = "DataSubmitted"; - const PALLET: &'static str = "DataAvailability"; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Two members were swapped; see the transaction for who."] + pub struct MembersSwapped; + impl ::subxt::events::StaticEvent for MembersSwapped { + const EVENT: &'static str = "MembersSwapped"; + const PALLET: &'static str = "TechnicalMembership"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - pub struct BlockLengthProposalSubmitted { - pub rows: runtime_types::da_primitives::BlockLengthRows, - pub cols: runtime_types::da_primitives::BlockLengthColumns, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "The membership was reset; see the transaction for who the new set is."] + pub struct MembersReset; + impl ::subxt::events::StaticEvent for MembersReset { + const EVENT: &'static str = "MembersReset"; + const PALLET: &'static str = "TechnicalMembership"; } - impl ::subxt::events::StaticEvent for BlockLengthProposalSubmitted { - const EVENT: &'static str = "BlockLengthProposalSubmitted"; - const PALLET: &'static str = "DataAvailability"; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "One of the members' keys changed."] + pub struct KeyChanged; + impl ::subxt::events::StaticEvent for KeyChanged { + const EVENT: &'static str = "KeyChanged"; + const PALLET: &'static str = "TechnicalMembership"; } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " Last application ID"] - pub fn next_app_id( + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Phantom member, never used."] + pub struct Dummy; + impl ::subxt::events::StaticEvent for Dummy { + const EVENT: &'static str = "Dummy"; + const PALLET: &'static str = "TechnicalMembership"; + } + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " The current membership, stored as an ordered Vec."] + pub fn members( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::subxt::utils::AccountId32, + >, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), > { - ::subxt::storage::address::StaticStorageAddress::new( - "DataAvailability", - "NextAppId", + ::subxt::storage::address::Address::new_static( + "TechnicalMembership", + "Members", vec![], [ - 21u8, 88u8, 250u8, 59u8, 123u8, 113u8, 217u8, 137u8, 130u8, 207u8, - 168u8, 182u8, 200u8, 84u8, 110u8, 250u8, 109u8, 163u8, 72u8, 199u8, - 88u8, 145u8, 217u8, 67u8, 49u8, 107u8, 26u8, 52u8, 76u8, 69u8, 4u8, - 63u8, + 109u8, 100u8, 14u8, 195u8, 213u8, 67u8, 44u8, 218u8, 84u8, 254u8, 76u8, + 80u8, 210u8, 155u8, 155u8, 30u8, 18u8, 169u8, 195u8, 92u8, 208u8, + 223u8, 242u8, 97u8, 147u8, 20u8, 168u8, 145u8, 254u8, 115u8, 225u8, + 193u8, ], ) } - #[doc = " Store all application keys."] - pub fn app_keys( + #[doc = " The current prime member, if one exists."] + pub fn prime( &self, - _0: impl ::std::borrow::Borrow< - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - >, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::da_control::pallet::AppKeyInfo<::subxt::utils::AccountId32>, - >, - ::subxt::storage::address::Yes, - (), + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::subxt::utils::AccountId32, ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "DataAvailability", - "AppKeys", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Blake2_128Concat, - )], - [ - 167u8, 153u8, 205u8, 126u8, 104u8, 82u8, 243u8, 1u8, 106u8, 10u8, 85u8, - 118u8, 236u8, 46u8, 81u8, 144u8, 229u8, 68u8, 89u8, 82u8, 98u8, 91u8, - 0u8, 66u8, 102u8, 96u8, 163u8, 244u8, 47u8, 169u8, 237u8, 250u8, - ], - ) - } - - #[doc = " Store all application keys."] - pub fn app_keys_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::da_control::pallet::AppKeyInfo<::subxt::utils::AccountId32>, - >, (), (), - ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "DataAvailability", - "AppKeys", - Vec::new(), + ::subxt::storage::address::Address::new_static( + "TechnicalMembership", + "Prime", + vec![], [ - 167u8, 153u8, 205u8, 126u8, 104u8, 82u8, 243u8, 1u8, 106u8, 10u8, 85u8, - 118u8, 236u8, 46u8, 81u8, 144u8, 229u8, 68u8, 89u8, 82u8, 98u8, 91u8, - 0u8, 66u8, 102u8, 96u8, 163u8, 244u8, 47u8, 169u8, 237u8, 250u8, + 72u8, 128u8, 214u8, 72u8, 78u8, 80u8, 100u8, 198u8, 114u8, 215u8, 59u8, + 3u8, 103u8, 14u8, 152u8, 202u8, 12u8, 165u8, 224u8, 10u8, 41u8, 154u8, + 77u8, 95u8, 116u8, 143u8, 250u8, 250u8, 176u8, 92u8, 238u8, 154u8, ], ) } } } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " The max length of application key."] - pub fn max_app_key_length( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { - ::subxt::constants::StaticConstantAddress::new( - "DataAvailability", - "MaxAppKeyLength", - [ - 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 grandpa { + use super::{root_mod, runtime_types}; + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub type Error = runtime_types::pallet_grandpa::pallet::Error; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub type Call = runtime_types::pallet_grandpa::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 :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ReportEquivocation { + pub equivocation_proof: ::std::boxed::Box< + runtime_types::sp_finality_grandpa::EquivocationProof< + ::subxt::utils::H256, + ::core::primitive::u32, + >, + >, + pub key_owner_proof: runtime_types::sp_session::MembershipProof, } - - #[doc = " The max length of app data."] - pub fn max_app_data_length( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { - ::subxt::constants::StaticConstantAddress::new( - "DataAvailability", - "MaxAppDataLength", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, - ], - ) + impl ::subxt::blocks::StaticExtrinsic for ReportEquivocation { + const CALL: &'static str = "report_equivocation"; + const PALLET: &'static str = "Grandpa"; } - - #[doc = " Minimum number of rows in a block."] - pub fn min_block_rows( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::da_primitives::BlockLengthRows, + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ReportEquivocationUnsigned { + pub equivocation_proof: ::std::boxed::Box< + runtime_types::sp_finality_grandpa::EquivocationProof< + ::subxt::utils::H256, + ::core::primitive::u32, + >, >, - > { - ::subxt::constants::StaticConstantAddress::new( - "DataAvailability", - "MinBlockRows", - [ - 240u8, 185u8, 129u8, 113u8, 97u8, 167u8, 124u8, 171u8, 245u8, 13u8, - 246u8, 129u8, 19u8, 85u8, 91u8, 215u8, 57u8, 41u8, 249u8, 219u8, 130u8, - 113u8, 255u8, 83u8, 254u8, 106u8, 212u8, 187u8, 160u8, 46u8, 32u8, - 61u8, - ], - ) + pub key_owner_proof: runtime_types::sp_session::MembershipProof, } - - #[doc = " Maximum number of rows in a block."] - pub fn max_block_rows( + impl ::subxt::blocks::StaticExtrinsic for ReportEquivocationUnsigned { + const CALL: &'static str = "report_equivocation_unsigned"; + const PALLET: &'static str = "Grandpa"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct NoteStalled { + pub delay: ::core::primitive::u32, + pub best_finalized_block_number: ::core::primitive::u32, + } + impl ::subxt::blocks::StaticExtrinsic for NoteStalled { + const CALL: &'static str = "note_stalled"; + const PALLET: &'static str = "Grandpa"; + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Report voter equivocation/misbehavior. This method will verify the"] + #[doc = "equivocation proof and validate the given key ownership proof"] + #[doc = "against the extracted offender. If both are valid, the offence"] + #[doc = "will be reported."] + pub fn report_equivocation( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::da_primitives::BlockLengthRows, + equivocation_proof: runtime_types::sp_finality_grandpa::EquivocationProof< + ::subxt::utils::H256, + ::core::primitive::u32, >, - > { - ::subxt::constants::StaticConstantAddress::new( - "DataAvailability", - "MaxBlockRows", + key_owner_proof: runtime_types::sp_session::MembershipProof, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Grandpa", + "report_equivocation", + types::ReportEquivocation { + equivocation_proof: ::std::boxed::Box::new(equivocation_proof), + key_owner_proof, + }, [ - 240u8, 185u8, 129u8, 113u8, 97u8, 167u8, 124u8, 171u8, 245u8, 13u8, - 246u8, 129u8, 19u8, 85u8, 91u8, 215u8, 57u8, 41u8, 249u8, 219u8, 130u8, - 113u8, 255u8, 83u8, 254u8, 106u8, 212u8, 187u8, 160u8, 46u8, 32u8, - 61u8, + 239u8, 120u8, 210u8, 103u8, 106u8, 180u8, 41u8, 20u8, 164u8, 142u8, + 156u8, 209u8, 183u8, 254u8, 192u8, 178u8, 22u8, 64u8, 91u8, 4u8, 222u8, + 103u8, 37u8, 184u8, 252u8, 181u8, 65u8, 136u8, 103u8, 199u8, 250u8, + 66u8, ], ) } - #[doc = " Minimum number of cols in a block."] - pub fn min_block_cols( + #[doc = "Report voter equivocation/misbehavior. This method will verify the"] + #[doc = "equivocation proof and validate the given key ownership proof"] + #[doc = "against the extracted offender. If both are valid, the offence"] + #[doc = "will be reported."] + #[doc = ""] + #[doc = "This extrinsic must be called unsigned and it is expected that only"] + #[doc = "block authors will call it (validated in `ValidateUnsigned`), as such"] + #[doc = "if the block author is defined it will be defined as the equivocation"] + #[doc = "reporter."] + pub fn report_equivocation_unsigned( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::da_primitives::BlockLengthColumns, + equivocation_proof: runtime_types::sp_finality_grandpa::EquivocationProof< + ::subxt::utils::H256, + ::core::primitive::u32, >, - > { - ::subxt::constants::StaticConstantAddress::new( - "DataAvailability", - "MinBlockCols", + key_owner_proof: runtime_types::sp_session::MembershipProof, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Grandpa", + "report_equivocation_unsigned", + types::ReportEquivocationUnsigned { + equivocation_proof: ::std::boxed::Box::new(equivocation_proof), + key_owner_proof, + }, [ - 240u8, 185u8, 129u8, 113u8, 97u8, 167u8, 124u8, 171u8, 245u8, 13u8, - 246u8, 129u8, 19u8, 85u8, 91u8, 215u8, 57u8, 41u8, 249u8, 219u8, 130u8, - 113u8, 255u8, 83u8, 254u8, 106u8, 212u8, 187u8, 160u8, 46u8, 32u8, - 61u8, + 238u8, 22u8, 92u8, 27u8, 26u8, 218u8, 114u8, 129u8, 133u8, 211u8, 34u8, + 239u8, 8u8, 11u8, 62u8, 201u8, 29u8, 38u8, 231u8, 63u8, 204u8, 13u8, + 82u8, 164u8, 83u8, 149u8, 0u8, 0u8, 102u8, 113u8, 106u8, 156u8, ], ) } - #[doc = " Maximum number of cols in a block."] - pub fn max_block_cols( + #[doc = "Note that the current authority set of the GRANDPA finality gadget has stalled."] + #[doc = ""] + #[doc = "This will trigger a forced authority set change at the beginning of the next session, to"] + #[doc = "be enacted `delay` blocks after that. The `delay` should be high enough to safely assume"] + #[doc = "that the block signalling the forced change will not be re-orged e.g. 1000 blocks."] + #[doc = "The block production rate (which may be slowed down because of finality lagging) should"] + #[doc = "be taken into account when choosing the `delay`. The GRANDPA voters based on the new"] + #[doc = "authority will start voting on top of `best_finalized_block_number` for new finalized"] + #[doc = "blocks. `best_finalized_block_number` should be the highest of the latest finalized"] + #[doc = "block of all validators of the new authority set."] + #[doc = ""] + #[doc = "Only callable by root."] + pub fn note_stalled( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::da_primitives::BlockLengthColumns, - >, - > { - ::subxt::constants::StaticConstantAddress::new( - "DataAvailability", - "MaxBlockCols", + delay: ::core::primitive::u32, + best_finalized_block_number: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Grandpa", + "note_stalled", + types::NoteStalled { + delay, + best_finalized_block_number, + }, [ - 240u8, 185u8, 129u8, 113u8, 97u8, 167u8, 124u8, 171u8, 245u8, 13u8, - 246u8, 129u8, 19u8, 85u8, 91u8, 215u8, 57u8, 41u8, 249u8, 219u8, 130u8, - 113u8, 255u8, 83u8, 254u8, 106u8, 212u8, 187u8, 160u8, 46u8, 32u8, - 61u8, + 232u8, 162u8, 42u8, 199u8, 101u8, 116u8, 38u8, 27u8, 147u8, 15u8, + 224u8, 76u8, 229u8, 244u8, 13u8, 49u8, 218u8, 232u8, 253u8, 37u8, 7u8, + 222u8, 97u8, 158u8, 201u8, 199u8, 169u8, 218u8, 201u8, 136u8, 192u8, + 128u8, ], ) } } } - } - pub mod nomad_updater_manager { - use super::{root_mod, runtime_types}; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::{root_mod, runtime_types}; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub struct TransactionApi; - impl TransactionApi {} - } #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::nomad_updater_manager::pallet::Event; + pub type Event = runtime_types::pallet_grandpa::pallet::Event; pub mod events { use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - pub struct NewUpdater { - pub old_updater: ::subxt::utils::H160, - pub new_updater: ::subxt::utils::H160, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "New authority set has been applied."] + pub struct NewAuthorities { + pub authority_set: ::std::vec::Vec<( + runtime_types::sp_finality_grandpa::app::Public, + ::core::primitive::u64, + )>, } - impl ::subxt::events::StaticEvent for NewUpdater { - const EVENT: &'static str = "NewUpdater"; - const PALLET: &'static str = "NomadUpdaterManager"; + impl ::subxt::events::StaticEvent for NewAuthorities { + const EVENT: &'static str = "NewAuthorities"; + const PALLET: &'static str = "Grandpa"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - pub struct FakeSlashed { - pub reporter: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for FakeSlashed { - const EVENT: &'static str = "FakeSlashed"; - const PALLET: &'static str = "NomadUpdaterManager"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - pub fn updater( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::subxt::utils::H160>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "NomadUpdaterManager", - "Updater", - vec![], - [ - 133u8, 141u8, 193u8, 158u8, 124u8, 101u8, 100u8, 156u8, 48u8, 193u8, - 106u8, 83u8, 240u8, 237u8, 242u8, 44u8, 26u8, 206u8, 213u8, 106u8, - 159u8, 239u8, 185u8, 213u8, 142u8, 26u8, 244u8, 234u8, 130u8, 187u8, - 104u8, 154u8, - ], - ) - } - } - } - } - pub mod nomad_home { - use super::{root_mod, runtime_types}; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::{root_mod, runtime_types}; - type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Dispatch { - #[codec(compact)] - pub destination_domain: ::core::primitive::u32, - pub recipient_address: ::subxt::utils::H256, - pub message_body: - runtime_types::sp_core::bounded::bounded_vec::BoundedVec<::core::primitive::u8>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Update { - pub signed_update: runtime_types::nomad_core::update::SignedUpdate, - #[codec(compact)] - pub max_index: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct ImproperUpdate { - pub signed_update: runtime_types::nomad_core::update::SignedUpdate, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct SetUpdater { - pub new_updater: ::subxt::utils::H160, - } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Dispatch a message to the destination domain and recipient address."] - pub fn dispatch( - &self, - destination_domain: ::core::primitive::u32, - recipient_address: ::subxt::utils::H256, - message_body: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "NomadHome", - "dispatch", - Dispatch { - destination_domain, - recipient_address, - message_body, - }, - [ - 254u8, 10u8, 145u8, 46u8, 242u8, 218u8, 11u8, 43u8, 209u8, 67u8, 34u8, - 219u8, 211u8, 119u8, 183u8, 61u8, 181u8, 163u8, 136u8, 92u8, 23u8, - 24u8, 247u8, 142u8, 146u8, 138u8, 115u8, 150u8, 55u8, 121u8, 55u8, - 75u8, - ], - ) - } - - #[doc = "Verify/submit signed update."] - pub fn update( - &self, - signed_update: runtime_types::nomad_core::update::SignedUpdate, - max_index: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "NomadHome", - "update", - Update { - signed_update, - max_index, - }, - [ - 114u8, 14u8, 19u8, 186u8, 185u8, 155u8, 190u8, 199u8, 108u8, 207u8, - 138u8, 45u8, 149u8, 190u8, 241u8, 86u8, 73u8, 152u8, 118u8, 97u8, 45u8, - 68u8, 190u8, 141u8, 191u8, 24u8, 86u8, 147u8, 133u8, 160u8, 129u8, - 175u8, - ], - ) - } - - #[doc = "Verify/slash updater for improper update."] - pub fn improper_update( - &self, - signed_update: runtime_types::nomad_core::update::SignedUpdate, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "NomadHome", - "improper_update", - ImproperUpdate { signed_update }, - [ - 235u8, 105u8, 81u8, 68u8, 152u8, 117u8, 164u8, 91u8, 92u8, 240u8, - 134u8, 122u8, 79u8, 100u8, 163u8, 221u8, 80u8, 144u8, 193u8, 112u8, - 141u8, 202u8, 228u8, 227u8, 136u8, 4u8, 233u8, 100u8, 181u8, 22u8, - 154u8, 54u8, - ], - ) - } - - #[doc = "Set new updater on self as well as updater manager."] - #[doc = "Note: Not exposed as pallet call, will only be callable by the"] - #[doc = "GovernanceRouter pallet when implemented."] - pub fn set_updater( - &self, - new_updater: ::subxt::utils::H160, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "NomadHome", - "set_updater", - SetUpdater { new_updater }, - [ - 242u8, 210u8, 5u8, 118u8, 160u8, 203u8, 74u8, 59u8, 187u8, 198u8, - 240u8, 40u8, 91u8, 106u8, 103u8, 54u8, 223u8, 138u8, 29u8, 231u8, 91u8, - 179u8, 187u8, 183u8, 247u8, 249u8, 27u8, 15u8, 138u8, 245u8, 153u8, - 22u8, - ], - ) - } - } - } - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::nomad_home::pallet::Event; - pub mod events { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Dispatch { - pub message_hash: ::subxt::utils::H256, - pub leaf_index: ::core::primitive::u32, - pub destination_and_nonce: ::core::primitive::u64, - pub committed_root: ::subxt::utils::H256, - pub message: ::std::vec::Vec<::core::primitive::u8>, - } - impl ::subxt::events::StaticEvent for Dispatch { - const EVENT: &'static str = "Dispatch"; - const PALLET: &'static str = "NomadHome"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Update { - pub home_domain: ::core::primitive::u32, - pub previous_root: ::subxt::utils::H256, - pub new_root: ::subxt::utils::H256, - pub signature: ::std::vec::Vec<::core::primitive::u8>, - } - impl ::subxt::events::StaticEvent for Update { - const EVENT: &'static str = "Update"; - const PALLET: &'static str = "NomadHome"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct ImproperUpdate { - pub previous_root: ::subxt::utils::H256, - pub new_root: ::subxt::utils::H256, - pub signature: ::std::vec::Vec<::core::primitive::u8>, - } - impl ::subxt::events::StaticEvent for ImproperUpdate { - const EVENT: &'static str = "ImproperUpdate"; - const PALLET: &'static str = "NomadHome"; + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Current authority set has been paused."] + pub struct Paused; + impl ::subxt::events::StaticEvent for Paused { + const EVENT: &'static str = "Paused"; + const PALLET: &'static str = "Grandpa"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - pub struct UpdaterSlashed { - pub updater: ::subxt::utils::H160, - pub reporter: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for UpdaterSlashed { - const EVENT: &'static str = "UpdaterSlashed"; - const PALLET: &'static str = "NomadHome"; + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Current authority set has been resumed."] + pub struct Resumed; + impl ::subxt::events::StaticEvent for Resumed { + const EVENT: &'static str = "Resumed"; + const PALLET: &'static str = "Grandpa"; } } pub mod storage { use super::runtime_types; pub struct StorageApi; impl StorageApi { - pub fn base( + #[doc = " State of the current authority set."] + pub fn state( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_grandpa::StoredState<::core::primitive::u32>, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), > { - ::subxt::storage::address::StaticStorageAddress::new( - "NomadHome", - "Base", - vec![], - [ - 205u8, 101u8, 115u8, 25u8, 58u8, 208u8, 131u8, 248u8, 249u8, 168u8, - 248u8, 25u8, 217u8, 233u8, 102u8, 189u8, 222u8, 72u8, 63u8, 92u8, - 134u8, 136u8, 22u8, 12u8, 184u8, 242u8, 183u8, 52u8, 154u8, 87u8, 15u8, - 52u8, - ], - ) + ::subxt::storage::address::Address::new_static("Grandpa", "State", vec![], [ + 254u8, 81u8, 54u8, 203u8, 26u8, 74u8, 162u8, 215u8, 165u8, 247u8, 143u8, + 139u8, 242u8, 164u8, 67u8, 27u8, 97u8, 172u8, 66u8, 98u8, 28u8, 151u8, + 32u8, 38u8, 209u8, 82u8, 41u8, 209u8, 72u8, 3u8, 167u8, 42u8, + ]) } - pub fn tree( + #[doc = " Pending change: (signaled at, scheduled change)."] + pub fn pending_change( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::nomad_merkle::light::LightMerkle, - >, - ::subxt::storage::address::Yes, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_grandpa::StoredPendingChange<::core::primitive::u32>, ::subxt::storage::address::Yes, (), + (), > { - ::subxt::storage::address::StaticStorageAddress::new( - "NomadHome", - "Tree", + ::subxt::storage::address::Address::new_static( + "Grandpa", + "PendingChange", vec![], [ - 22u8, 207u8, 157u8, 183u8, 36u8, 47u8, 192u8, 247u8, 85u8, 143u8, 23u8, - 21u8, 189u8, 221u8, 230u8, 215u8, 141u8, 38u8, 233u8, 65u8, 165u8, - 57u8, 14u8, 252u8, 185u8, 140u8, 204u8, 186u8, 205u8, 195u8, 214u8, - 235u8, + 207u8, 134u8, 15u8, 77u8, 9u8, 253u8, 20u8, 132u8, 226u8, 115u8, 150u8, + 184u8, 18u8, 15u8, 143u8, 172u8, 71u8, 114u8, 221u8, 162u8, 174u8, + 205u8, 46u8, 144u8, 70u8, 116u8, 18u8, 105u8, 250u8, 44u8, 75u8, 27u8, ], ) } - pub fn nonces( + #[doc = " next block number where we can force a change."] + pub fn next_forced( &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, ::subxt::storage::address::Yes, + (), + (), > { - ::subxt::storage::address::StaticStorageAddress::new( - "NomadHome", - "Nonces", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], + ::subxt::storage::address::Address::new_static( + "Grandpa", + "NextForced", + vec![], [ - 225u8, 196u8, 0u8, 213u8, 118u8, 3u8, 219u8, 130u8, 21u8, 64u8, 253u8, - 206u8, 79u8, 103u8, 199u8, 75u8, 182u8, 43u8, 13u8, 130u8, 169u8, 67u8, - 174u8, 208u8, 72u8, 111u8, 50u8, 68u8, 110u8, 138u8, 5u8, 67u8, + 3u8, 231u8, 56u8, 18u8, 87u8, 112u8, 227u8, 126u8, 180u8, 131u8, 255u8, + 141u8, 82u8, 34u8, 61u8, 47u8, 234u8, 37u8, 95u8, 62u8, 33u8, 235u8, + 231u8, 122u8, 125u8, 8u8, 223u8, 95u8, 255u8, 204u8, 40u8, 97u8, ], ) } - pub fn nonces_root( + #[doc = " `true` if we are currently stalled."] + pub fn stalled( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - (), - ::subxt::storage::address::Yes, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + (::core::primitive::u32, ::core::primitive::u32), ::subxt::storage::address::Yes, + (), + (), > { - ::subxt::storage::address::StaticStorageAddress::new( - "NomadHome", - "Nonces", - Vec::new(), - [ - 225u8, 196u8, 0u8, 213u8, 118u8, 3u8, 219u8, 130u8, 21u8, 64u8, 253u8, - 206u8, 79u8, 103u8, 199u8, 75u8, 182u8, 43u8, 13u8, 130u8, 169u8, 67u8, - 174u8, 208u8, 72u8, 111u8, 50u8, 68u8, 110u8, 138u8, 5u8, 67u8, - ], - ) + ::subxt::storage::address::Address::new_static("Grandpa", "Stalled", vec![], [ + 146u8, 18u8, 59u8, 59u8, 21u8, 246u8, 5u8, 167u8, 221u8, 8u8, 230u8, 74u8, + 81u8, 217u8, 67u8, 158u8, 136u8, 36u8, 23u8, 106u8, 136u8, 89u8, 110u8, + 217u8, 31u8, 138u8, 107u8, 251u8, 164u8, 10u8, 119u8, 18u8, + ]) } - pub fn index_to_root( + #[doc = " The number of changes (both in terms of keys and underlying economic responsibilities)"] + #[doc = " in the \"set\" of Grandpa validators from genesis."] + pub fn current_set_id( &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::subxt::utils::H256>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u64, ::subxt::storage::address::Yes, - (), ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "NomadHome", - "IndexToRoot", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], - [ - 55u8, 53u8, 87u8, 227u8, 177u8, 25u8, 61u8, 107u8, 134u8, 232u8, 131u8, - 188u8, 144u8, 138u8, 45u8, 113u8, 17u8, 164u8, 100u8, 233u8, 226u8, - 9u8, 186u8, 184u8, 147u8, 164u8, 34u8, 80u8, 28u8, 212u8, 253u8, 16u8, - ], - ) - } - - pub fn index_to_root_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::subxt::utils::H256>, - (), (), - ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "NomadHome", - "IndexToRoot", - Vec::new(), + ::subxt::storage::address::Address::new_static( + "Grandpa", + "CurrentSetId", + vec![], [ - 55u8, 53u8, 87u8, 227u8, 177u8, 25u8, 61u8, 107u8, 134u8, 232u8, 131u8, - 188u8, 144u8, 138u8, 45u8, 113u8, 17u8, 164u8, 100u8, 233u8, 226u8, - 9u8, 186u8, 184u8, 147u8, 164u8, 34u8, 80u8, 28u8, 212u8, 253u8, 16u8, + 234u8, 215u8, 218u8, 42u8, 30u8, 76u8, 129u8, 40u8, 125u8, 137u8, + 207u8, 47u8, 46u8, 213u8, 159u8, 50u8, 175u8, 81u8, 155u8, 123u8, + 246u8, 175u8, 156u8, 68u8, 22u8, 113u8, 135u8, 137u8, 163u8, 18u8, + 115u8, 73u8, ], ) } - pub fn root_to_index( + #[doc = " A mapping from grandpa set ID to the index of the *most recent* session for which its"] + #[doc = " members were responsible."] + #[doc = ""] + #[doc = " TWOX-NOTE: `SetId` is not under user control."] + pub fn set_id_session( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + _0: impl ::std::borrow::Borrow<::core::primitive::u64>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, ::subxt::storage::address::Yes, (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "NomadHome", - "RootToIndex", - vec![::subxt::storage::address::StorageMapKey::new( + ::subxt::storage::address::Address::new_static( + "Grandpa", + "SetIdSession", + vec![::subxt::storage::address::make_static_storage_map_key( _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ - 72u8, 228u8, 165u8, 136u8, 129u8, 151u8, 17u8, 28u8, 141u8, 139u8, 7u8, - 133u8, 237u8, 63u8, 219u8, 86u8, 163u8, 26u8, 194u8, 28u8, 112u8, - 111u8, 195u8, 50u8, 122u8, 33u8, 32u8, 193u8, 192u8, 210u8, 233u8, - 91u8, + 47u8, 0u8, 239u8, 121u8, 187u8, 213u8, 254u8, 50u8, 238u8, 10u8, 162u8, + 65u8, 189u8, 166u8, 37u8, 74u8, 82u8, 81u8, 160u8, 20u8, 180u8, 253u8, + 238u8, 18u8, 209u8, 203u8, 38u8, 148u8, 16u8, 105u8, 72u8, 169u8, ], ) } - pub fn root_to_index_root( + #[doc = " A mapping from grandpa set ID to the index of the *most recent* session for which its"] + #[doc = " members were responsible."] + #[doc = ""] + #[doc = " TWOX-NOTE: `SetId` is not under user control."] + pub fn set_id_session_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, (), (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "NomadHome", - "RootToIndex", + ::subxt::storage::address::Address::new_static( + "Grandpa", + "SetIdSession", Vec::new(), [ - 72u8, 228u8, 165u8, 136u8, 129u8, 151u8, 17u8, 28u8, 141u8, 139u8, 7u8, - 133u8, 237u8, 63u8, 219u8, 86u8, 163u8, 26u8, 194u8, 28u8, 112u8, - 111u8, 195u8, 50u8, 122u8, 33u8, 32u8, 193u8, 192u8, 210u8, 233u8, - 91u8, + 47u8, 0u8, 239u8, 121u8, 187u8, 213u8, 254u8, 50u8, 238u8, 10u8, 162u8, + 65u8, 189u8, 166u8, 37u8, 74u8, 82u8, 81u8, 160u8, 20u8, 180u8, 253u8, + 238u8, 18u8, 209u8, 203u8, 38u8, 148u8, 16u8, 105u8, 72u8, 169u8, ], ) } @@ -17134,867 +15024,618 @@ pub mod api { use super::runtime_types; pub struct ConstantsApi; impl ConstantsApi { - #[doc = " Max allowed message body size"] - pub fn max_message_body_bytes( + #[doc = " Max Authorities in use"] + pub fn max_authorities( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { - ::subxt::constants::StaticConstantAddress::new( - "NomadHome", - "MaxMessageBodyBytes", - [ - 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, - ], - ) + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static("Grandpa", "MaxAuthorities", [ + 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 nomad_da_bridge { + pub mod treasury { use super::{root_mod, runtime_types}; + #[doc = "Error for the treasury pallet."] + pub type Error = runtime_types::pallet_treasury::pallet::Error; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + 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; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct TryDispatchDataRoot { - #[codec(compact)] - pub destination_domain: ::core::primitive::u32, - pub recipient_address: ::subxt::utils::H256, - pub header: ::std::boxed::Box< - runtime_types::da_primitives::header::Header< + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ProposeSpend { + #[codec(compact)] + pub value: ::core::primitive::u128, + pub beneficiary: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, ::core::primitive::u32, - runtime_types::sp_runtime::traits::BlakeTwo256, >, - >, + } + impl ::subxt::blocks::StaticExtrinsic for ProposeSpend { + const CALL: &'static str = "propose_spend"; + const PALLET: &'static str = "Treasury"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct RejectProposal { + #[codec(compact)] + pub proposal_id: ::core::primitive::u32, + } + impl ::subxt::blocks::StaticExtrinsic for RejectProposal { + const CALL: &'static str = "reject_proposal"; + const PALLET: &'static str = "Treasury"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ApproveProposal { + #[codec(compact)] + pub proposal_id: ::core::primitive::u32, + } + impl ::subxt::blocks::StaticExtrinsic for ApproveProposal { + const CALL: &'static str = "approve_proposal"; + const PALLET: &'static str = "Treasury"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Spend { + #[codec(compact)] + pub amount: ::core::primitive::u128, + pub beneficiary: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + } + impl ::subxt::blocks::StaticExtrinsic for Spend { + const CALL: &'static str = "spend"; + const PALLET: &'static str = "Treasury"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct RemoveApproval { + #[codec(compact)] + pub proposal_id: ::core::primitive::u32, + } + impl ::subxt::blocks::StaticExtrinsic for RemoveApproval { + const CALL: &'static str = "remove_approval"; + const PALLET: &'static str = "Treasury"; + } } pub struct TransactionApi; impl TransactionApi { - #[doc = "Dispatch a data root message to the home if the header is valid."] - pub fn try_dispatch_data_root( + #[doc = "Put forward a suggestion for spending. A deposit proportional to the value"] + #[doc = "is reserved and slashed if the proposal is rejected. It is returned once the"] + #[doc = "proposal is awarded."] + #[doc = ""] + #[doc = "# "] + #[doc = "- Complexity: O(1)"] + #[doc = "- DbReads: `ProposalCount`, `origin account`"] + #[doc = "- DbWrites: `ProposalCount`, `Proposals`, `origin account`"] + #[doc = "# "] + pub fn propose_spend( &self, - destination_domain: ::core::primitive::u32, - recipient_address: ::subxt::utils::H256, - header: runtime_types::da_primitives::header::Header< + value: ::core::primitive::u128, + beneficiary: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, ::core::primitive::u32, - runtime_types::sp_runtime::traits::BlakeTwo256, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "NomadDABridge", - "try_dispatch_data_root", - TryDispatchDataRoot { - destination_domain, - recipient_address, - header: ::std::boxed::Box::new(header), - }, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Treasury", + "propose_spend", + types::ProposeSpend { value, beneficiary }, [ - 190u8, 51u8, 167u8, 216u8, 67u8, 207u8, 45u8, 202u8, 198u8, 90u8, - 165u8, 128u8, 60u8, 206u8, 218u8, 51u8, 148u8, 10u8, 230u8, 102u8, - 168u8, 91u8, 178u8, 242u8, 66u8, 246u8, 214u8, 92u8, 91u8, 152u8, - 210u8, 67u8, + 122u8, 208u8, 182u8, 218u8, 237u8, 127u8, 67u8, 90u8, 119u8, 187u8, + 190u8, 131u8, 226u8, 30u8, 123u8, 176u8, 71u8, 150u8, 85u8, 170u8, + 123u8, 65u8, 91u8, 229u8, 75u8, 53u8, 144u8, 105u8, 1u8, 167u8, 232u8, + 156u8, ], ) } - } - } - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::nomad_da_bridge::pallet::Event; - pub mod events { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct DataRootDispatched { - pub destination_domain: ::core::primitive::u32, - pub recipient_address: ::subxt::utils::H256, - pub block_number: ::core::primitive::u32, - pub data_root: ::subxt::utils::H256, - } - impl ::subxt::events::StaticEvent for DataRootDispatched { - const EVENT: &'static str = "DataRootDispatched"; - const PALLET: &'static str = "NomadDABridge"; - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - pub fn da_bridge_pallet_id( + + #[doc = "Reject a proposed spend. The original deposit will be slashed."] + #[doc = ""] + #[doc = "May only be called from `T::RejectOrigin`."] + #[doc = ""] + #[doc = "# "] + #[doc = "- Complexity: O(1)"] + #[doc = "- DbReads: `Proposals`, `rejected proposer account`"] + #[doc = "- DbWrites: `Proposals`, `rejected proposer account`"] + #[doc = "# "] + pub fn reject_proposal( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::subxt::utils::H256>, - > { - ::subxt::constants::StaticConstantAddress::new( - "NomadDABridge", - "DABridgePalletId", + proposal_id: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Treasury", + "reject_proposal", + types::RejectProposal { proposal_id }, [ - 167u8, 71u8, 0u8, 47u8, 217u8, 107u8, 29u8, 163u8, 157u8, 187u8, 110u8, - 219u8, 88u8, 213u8, 82u8, 107u8, 46u8, 199u8, 41u8, 110u8, 102u8, - 187u8, 45u8, 201u8, 247u8, 66u8, 33u8, 228u8, 33u8, 99u8, 242u8, 80u8, - ], - ) - } - } - } - } - pub mod preimage { - use super::{root_mod, runtime_types}; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::{root_mod, runtime_types}; - type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct NotePreimage { - pub bytes: ::std::vec::Vec<::core::primitive::u8>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct UnnotePreimage { - pub hash: ::subxt::utils::H256, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct RequestPreimage { - pub hash: ::subxt::utils::H256, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct UnrequestPreimage { - pub hash: ::subxt::utils::H256, - } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Register a preimage on-chain."] - #[doc = ""] - #[doc = "If the preimage was previously requested, no fees or deposits are taken for providing"] - #[doc = "the preimage. Otherwise, a deposit is taken proportional to the size of the preimage."] - pub fn note_preimage( - &self, - bytes: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Preimage", - "note_preimage", - NotePreimage { bytes }, - [ - 77u8, 48u8, 104u8, 3u8, 254u8, 65u8, 106u8, 95u8, 204u8, 89u8, 149u8, - 29u8, 144u8, 188u8, 99u8, 23u8, 146u8, 142u8, 35u8, 17u8, 125u8, 130u8, - 31u8, 206u8, 106u8, 83u8, 163u8, 192u8, 81u8, 23u8, 232u8, 230u8, + 18u8, 166u8, 80u8, 141u8, 222u8, 230u8, 4u8, 36u8, 7u8, 76u8, 12u8, + 40u8, 145u8, 114u8, 12u8, 43u8, 223u8, 78u8, 189u8, 222u8, 120u8, 80u8, + 225u8, 215u8, 119u8, 68u8, 200u8, 15u8, 25u8, 172u8, 192u8, 173u8, ], ) } - #[doc = "Clear an unrequested preimage from the runtime storage."] + #[doc = "Approve a proposal. At a later time, the proposal will be allocated to the beneficiary"] + #[doc = "and the original deposit will be returned."] #[doc = ""] - #[doc = "If `len` is provided, then it will be a much cheaper operation."] + #[doc = "May only be called from `T::ApproveOrigin`."] #[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( + #[doc = "# "] + #[doc = "- Complexity: O(1)."] + #[doc = "- DbReads: `Proposals`, `Approvals`"] + #[doc = "- DbWrite: `Approvals`"] + #[doc = "# "] + pub fn approve_proposal( &self, - hash: ::subxt::utils::H256, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Preimage", - "unnote_preimage", - UnnotePreimage { hash }, + proposal_id: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Treasury", + "approve_proposal", + types::ApproveProposal { proposal_id }, [ - 211u8, 204u8, 205u8, 58u8, 33u8, 179u8, 68u8, 74u8, 149u8, 138u8, - 213u8, 45u8, 140u8, 27u8, 106u8, 81u8, 68u8, 212u8, 147u8, 116u8, 27u8, - 130u8, 84u8, 34u8, 231u8, 197u8, 135u8, 8u8, 19u8, 242u8, 207u8, 17u8, + 154u8, 176u8, 152u8, 97u8, 167u8, 177u8, 78u8, 9u8, 235u8, 229u8, + 199u8, 193u8, 214u8, 3u8, 16u8, 30u8, 4u8, 104u8, 27u8, 184u8, 100u8, + 65u8, 179u8, 13u8, 91u8, 62u8, 115u8, 5u8, 219u8, 211u8, 251u8, 153u8, ], ) } - #[doc = "Request a preimage be uploaded to the chain without paying any fees or deposits."] + #[doc = "Propose and approve a spend of treasury funds."] #[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( + #[doc = "- `origin`: Must be `SpendOrigin` with the `Success` value being at least `amount`."] + #[doc = "- `amount`: The amount to be transferred from the treasury to the `beneficiary`."] + #[doc = "- `beneficiary`: The destination account for the transfer."] + #[doc = ""] + #[doc = "NOTE: For record-keeping purposes, the proposer is deemed to be equivalent to the"] + #[doc = "beneficiary."] + pub fn spend( &self, - hash: ::subxt::utils::H256, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Preimage", - "request_preimage", - RequestPreimage { hash }, + amount: ::core::primitive::u128, + beneficiary: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Treasury", + "spend", + types::Spend { + amount, + beneficiary, + }, [ - 195u8, 26u8, 146u8, 255u8, 79u8, 43u8, 73u8, 60u8, 115u8, 78u8, 99u8, - 197u8, 137u8, 95u8, 139u8, 141u8, 79u8, 213u8, 170u8, 169u8, 127u8, - 30u8, 236u8, 65u8, 38u8, 16u8, 118u8, 228u8, 141u8, 83u8, 162u8, 233u8, + 84u8, 118u8, 232u8, 82u8, 17u8, 184u8, 100u8, 78u8, 38u8, 158u8, 78u8, + 200u8, 60u8, 9u8, 47u8, 72u8, 52u8, 70u8, 208u8, 208u8, 169u8, 217u8, + 191u8, 76u8, 215u8, 202u8, 72u8, 95u8, 221u8, 78u8, 106u8, 71u8, ], ) } - #[doc = "Clear a previously made request for a preimage."] + #[doc = "Force a previously approved proposal to be removed from the approval queue."] + #[doc = "The original deposit will no longer be returned."] #[doc = ""] - #[doc = "NOTE: THIS MUST NOT BE CALLED ON `hash` MORE TIMES THAN `request_preimage`."] - pub fn unrequest_preimage( + #[doc = "May only be called from `T::RejectOrigin`."] + #[doc = "- `proposal_id`: The index of a proposal"] + #[doc = ""] + #[doc = "# "] + #[doc = "- Complexity: O(A) where `A` is the number of approvals"] + #[doc = "- Db reads and writes: `Approvals`"] + #[doc = "# "] + #[doc = ""] + #[doc = "Errors:"] + #[doc = "- `ProposalNotApproved`: The `proposal_id` supplied was not found in the approval queue,"] + #[doc = "i.e., the proposal has not been approved. This could also mean the proposal does not"] + #[doc = "exist altogether, thus there is no way it would have been approved in the first place."] + pub fn remove_approval( &self, - hash: ::subxt::utils::H256, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Preimage", - "unrequest_preimage", - UnrequestPreimage { hash }, + proposal_id: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Treasury", + "remove_approval", + types::RemoveApproval { proposal_id }, [ - 143u8, 225u8, 239u8, 44u8, 237u8, 83u8, 18u8, 105u8, 101u8, 68u8, - 111u8, 116u8, 66u8, 212u8, 63u8, 190u8, 38u8, 32u8, 105u8, 152u8, 69u8, - 177u8, 193u8, 15u8, 60u8, 26u8, 95u8, 130u8, 11u8, 113u8, 187u8, 108u8, + 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 = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::pallet_preimage::pallet::Event; + pub type Event = runtime_types::pallet_treasury::pallet::Event; pub mod events { use super::runtime_types; #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "A preimage has been noted."] - pub struct Noted { - pub hash: ::subxt::utils::H256, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "New proposal."] + pub struct Proposed { + pub proposal_index: ::core::primitive::u32, } - impl ::subxt::events::StaticEvent for Noted { - const EVENT: &'static str = "Noted"; - const PALLET: &'static str = "Preimage"; + impl ::subxt::events::StaticEvent for Proposed { + const EVENT: &'static str = "Proposed"; + const PALLET: &'static str = "Treasury"; } #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "A preimage has been requested."] - pub struct Requested { - pub hash: ::subxt::utils::H256, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "We have ended a spend period and will now allocate funds."] + pub struct Spending { + pub budget_remaining: ::core::primitive::u128, } - impl ::subxt::events::StaticEvent for Requested { - const EVENT: &'static str = "Requested"; - const PALLET: &'static str = "Preimage"; + impl ::subxt::events::StaticEvent for Spending { + const EVENT: &'static str = "Spending"; + const PALLET: &'static str = "Treasury"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "A preimage has ben cleared."] - pub struct Cleared { - pub hash: ::subxt::utils::H256, - } - impl ::subxt::events::StaticEvent for Cleared { - const EVENT: &'static str = "Cleared"; - const PALLET: &'static str = "Preimage"; + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Some funds have been allocated."] + pub struct Awarded { + pub proposal_index: ::core::primitive::u32, + pub award: ::core::primitive::u128, + pub account: ::subxt::utils::AccountId32, } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " The request status of a given hash."] - pub fn status_for( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_preimage::RequestStatus< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - >, - >, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Preimage", - "StatusFor", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Identity, - )], - [ - 103u8, 208u8, 88u8, 167u8, 244u8, 198u8, 129u8, 134u8, 182u8, 80u8, - 71u8, 192u8, 73u8, 92u8, 190u8, 15u8, 20u8, 132u8, 37u8, 108u8, 88u8, - 233u8, 18u8, 145u8, 9u8, 235u8, 5u8, 132u8, 42u8, 17u8, 227u8, 56u8, - ], - ) - } - - #[doc = " The request status of a given hash."] - pub fn status_for_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_preimage::RequestStatus< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - >, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Preimage", - "StatusFor", - Vec::new(), - [ - 103u8, 208u8, 88u8, 167u8, 244u8, 198u8, 129u8, 134u8, 182u8, 80u8, - 71u8, 192u8, 73u8, 92u8, 190u8, 15u8, 20u8, 132u8, 37u8, 108u8, 88u8, - 233u8, 18u8, 145u8, 9u8, 235u8, 5u8, 132u8, 42u8, 17u8, 227u8, 56u8, - ], - ) - } - - pub fn preimage_for( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, - _1: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - >, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Preimage", - "PreimageFor", - vec![::subxt::storage::address::StorageMapKey::new( - &(_0.borrow(), _1.borrow()), - ::subxt::storage::address::StorageHasher::Identity, - )], - [ - 96u8, 74u8, 30u8, 112u8, 120u8, 41u8, 52u8, 187u8, 252u8, 68u8, 42u8, - 5u8, 61u8, 228u8, 250u8, 192u8, 224u8, 61u8, 53u8, 222u8, 95u8, 148u8, - 6u8, 53u8, 43u8, 152u8, 88u8, 58u8, 185u8, 234u8, 131u8, 124u8, - ], - ) - } - - pub fn preimage_for_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Preimage", - "PreimageFor", - Vec::new(), - [ - 96u8, 74u8, 30u8, 112u8, 120u8, 41u8, 52u8, 187u8, 252u8, 68u8, 42u8, - 5u8, 61u8, 228u8, 250u8, 192u8, 224u8, 61u8, 53u8, 222u8, 95u8, 148u8, - 6u8, 53u8, 43u8, 152u8, 88u8, 58u8, 185u8, 234u8, 131u8, 124u8, - ], - ) - } + impl ::subxt::events::StaticEvent for Awarded { + const EVENT: &'static str = "Awarded"; + const PALLET: &'static str = "Treasury"; } - } - } - pub mod multisig { - use super::{root_mod, runtime_types}; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::{root_mod, runtime_types}; - type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - pub struct AsMultiThreshold1 { - pub other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, - pub call: ::std::boxed::Box, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A proposal was rejected; funds were slashed."] + pub struct Rejected { + pub proposal_index: ::core::primitive::u32, + pub slashed: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for Rejected { + const EVENT: &'static str = "Rejected"; + const PALLET: &'static str = "Treasury"; } #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - pub struct AsMulti { - pub threshold: ::core::primitive::u16, - pub other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, - pub maybe_timepoint: ::core::option::Option< - runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, - >, - pub call: ::std::boxed::Box, - pub max_weight: runtime_types::sp_weights::weight_v2::Weight, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Some of our funds have been burnt."] + pub struct Burnt { + pub burnt_funds: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for Burnt { + const EVENT: &'static str = "Burnt"; + const PALLET: &'static str = "Treasury"; } #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - pub struct ApproveAsMulti { - pub threshold: ::core::primitive::u16, - pub other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, - pub maybe_timepoint: ::core::option::Option< - runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, - >, - pub call_hash: [::core::primitive::u8; 32usize], - pub max_weight: runtime_types::sp_weights::weight_v2::Weight, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Spending has finished; this is the amount that rolls over until next spend."] + pub struct Rollover { + pub rollover_balance: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for Rollover { + const EVENT: &'static str = "Rollover"; + const PALLET: &'static str = "Treasury"; } #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - pub struct CancelAsMulti { - pub threshold: ::core::primitive::u16, - pub other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, - pub timepoint: runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, - pub call_hash: [::core::primitive::u8; 32usize], - } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Immediately dispatch a multi-signature call using a single approval from the caller."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - #[doc = ""] - #[doc = "- `other_signatories`: The accounts (other than the sender) who are part of the"] - #[doc = "multi-signature, but do not participate in the approval process."] - #[doc = "- `call`: The call to be executed."] - #[doc = ""] - #[doc = "Result is equivalent to the dispatched result."] - #[doc = ""] - #[doc = "# "] - #[doc = "O(Z + C) where Z is the length of the call and C its execution weight."] - #[doc = "-------------------------------"] - #[doc = "- DB Weight: None"] - #[doc = "- Plus Call Weight"] - #[doc = "# "] - pub fn as_multi_threshold_1( - &self, - other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, - call: runtime_types::da_runtime::RuntimeCall, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Multisig", - "as_multi_threshold_1", - AsMultiThreshold1 { - other_signatories, - call: ::std::boxed::Box::new(call), - }, - [ - 145u8, 138u8, 220u8, 23u8, 56u8, 52u8, 192u8, 218u8, 163u8, 101u8, - 31u8, 54u8, 237u8, 219u8, 11u8, 84u8, 75u8, 77u8, 87u8, 190u8, 186u8, - 121u8, 200u8, 216u8, 195u8, 154u8, 208u8, 154u8, 91u8, 8u8, 217u8, - 181u8, - ], - ) - } - - #[doc = "Register approval for a dispatch to be made from a deterministic composite account if"] - #[doc = "approved by a total of `threshold - 1` of `other_signatories`."] - #[doc = ""] - #[doc = "If there are enough, then dispatch the call."] - #[doc = ""] - #[doc = "Payment: `DepositBase` will be reserved if this is the first approval, plus"] - #[doc = "`threshold` times `DepositFactor`. It is returned once this dispatch happens or"] - #[doc = "is cancelled."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - #[doc = ""] - #[doc = "- `threshold`: The total number of approvals for this dispatch before it is executed."] - #[doc = "- `other_signatories`: The accounts (other than the sender) who can approve this"] - #[doc = "dispatch. May not be empty."] - #[doc = "- `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is"] - #[doc = "not the first approval, then it must be `Some`, with the timepoint (block number and"] - #[doc = "transaction index) of the first approval transaction."] - #[doc = "- `call`: The call to be executed."] - #[doc = ""] - #[doc = "NOTE: Unless this is the final approval, you will generally want to use"] - #[doc = "`approve_as_multi` instead, since it only requires a hash of the call."] - #[doc = ""] - #[doc = "Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise"] - #[doc = "on success, result is `Ok` and the result from the interior call, if it was executed,"] - #[doc = "may be found in the deposited `MultisigExecuted` event."] - #[doc = ""] - #[doc = "# "] - #[doc = "- `O(S + Z + Call)`."] - #[doc = "- Up to one balance-reserve or unreserve operation."] - #[doc = "- One passthrough operation, one insert, both `O(S)` where `S` is the number of"] - #[doc = " signatories. `S` is capped by `MaxSignatories`, with weight being proportional."] - #[doc = "- One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len."] - #[doc = "- One encode & hash, both of complexity `O(S)`."] - #[doc = "- Up to one binary search and insert (`O(logS + S)`)."] - #[doc = "- I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove."] - #[doc = "- One event."] - #[doc = "- The weight of the `call`."] - #[doc = "- Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit"] - #[doc = " taken for its lifetime of `DepositBase + threshold * DepositFactor`."] - #[doc = "-------------------------------"] - #[doc = "- DB Weight:"] - #[doc = " - Reads: Multisig Storage, [Caller Account]"] - #[doc = " - Writes: Multisig Storage, [Caller Account]"] - #[doc = "- Plus Call Weight"] - #[doc = "# "] - pub fn as_multi( - &self, - threshold: ::core::primitive::u16, - other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, - maybe_timepoint: ::core::option::Option< - runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, - >, - call: runtime_types::da_runtime::RuntimeCall, - max_weight: runtime_types::sp_weights::weight_v2::Weight, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Multisig", - "as_multi", - AsMulti { - threshold, - other_signatories, - maybe_timepoint, - call: ::std::boxed::Box::new(call), - max_weight, - }, - [ - 54u8, 95u8, 170u8, 210u8, 104u8, 119u8, 189u8, 188u8, 66u8, 8u8, 195u8, - 75u8, 5u8, 184u8, 137u8, 25u8, 144u8, 140u8, 111u8, 169u8, 16u8, 103u8, - 173u8, 98u8, 37u8, 73u8, 248u8, 15u8, 147u8, 133u8, 119u8, 255u8, - ], - ) - } - - #[doc = "Register approval for a dispatch to be made from a deterministic composite account if"] - #[doc = "approved by a total of `threshold - 1` of `other_signatories`."] - #[doc = ""] - #[doc = "Payment: `DepositBase` will be reserved if this is the first approval, plus"] - #[doc = "`threshold` times `DepositFactor`. It is returned once this dispatch happens or"] - #[doc = "is cancelled."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - #[doc = ""] - #[doc = "- `threshold`: The total number of approvals for this dispatch before it is executed."] - #[doc = "- `other_signatories`: The accounts (other than the sender) who can approve this"] - #[doc = "dispatch. May not be empty."] - #[doc = "- `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is"] - #[doc = "not the first approval, then it must be `Some`, with the timepoint (block number and"] - #[doc = "transaction index) of the first approval transaction."] - #[doc = "- `call_hash`: The hash of the call to be executed."] - #[doc = ""] - #[doc = "NOTE: If this is the final approval, you will want to use `as_multi` instead."] - #[doc = ""] - #[doc = "# "] - #[doc = "- `O(S)`."] - #[doc = "- Up to one balance-reserve or unreserve operation."] - #[doc = "- One passthrough operation, one insert, both `O(S)` where `S` is the number of"] - #[doc = " signatories. `S` is capped by `MaxSignatories`, with weight being proportional."] - #[doc = "- One encode & hash, both of complexity `O(S)`."] - #[doc = "- Up to one binary search and insert (`O(logS + S)`)."] - #[doc = "- I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove."] - #[doc = "- One event."] - #[doc = "- Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit"] - #[doc = " taken for its lifetime of `DepositBase + threshold * DepositFactor`."] - #[doc = "----------------------------------"] - #[doc = "- DB Weight:"] - #[doc = " - Read: Multisig Storage, [Caller Account]"] - #[doc = " - Write: Multisig Storage, [Caller Account]"] - #[doc = "# "] - pub fn approve_as_multi( - &self, - threshold: ::core::primitive::u16, - other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, - maybe_timepoint: ::core::option::Option< - runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, - >, - call_hash: [::core::primitive::u8; 32usize], - max_weight: runtime_types::sp_weights::weight_v2::Weight, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Multisig", - "approve_as_multi", - ApproveAsMulti { - threshold, - other_signatories, - maybe_timepoint, - call_hash, - max_weight, - }, - [ - 133u8, 113u8, 121u8, 66u8, 218u8, 219u8, 48u8, 64u8, 211u8, 114u8, - 163u8, 193u8, 164u8, 21u8, 140u8, 218u8, 253u8, 237u8, 240u8, 126u8, - 200u8, 213u8, 184u8, 50u8, 187u8, 182u8, 30u8, 52u8, 142u8, 72u8, - 210u8, 101u8, - ], - ) - } - - #[doc = "Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously"] - #[doc = "for this operation will be unreserved on success."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - #[doc = ""] - #[doc = "- `threshold`: The total number of approvals for this dispatch before it is executed."] - #[doc = "- `other_signatories`: The accounts (other than the sender) who can approve this"] - #[doc = "dispatch. May not be empty."] - #[doc = "- `timepoint`: The timepoint (block number and transaction index) of the first approval"] - #[doc = "transaction for this dispatch."] - #[doc = "- `call_hash`: The hash of the call to be executed."] - #[doc = ""] - #[doc = "# "] - #[doc = "- `O(S)`."] - #[doc = "- Up to one balance-reserve or unreserve operation."] - #[doc = "- One passthrough operation, one insert, both `O(S)` where `S` is the number of"] - #[doc = " signatories. `S` is capped by `MaxSignatories`, with weight being proportional."] - #[doc = "- One encode & hash, both of complexity `O(S)`."] - #[doc = "- One event."] - #[doc = "- I/O: 1 read `O(S)`, one remove."] - #[doc = "- Storage: removes one item."] - #[doc = "----------------------------------"] - #[doc = "- DB Weight:"] - #[doc = " - Read: Multisig Storage, [Caller Account], Refund Account"] - #[doc = " - Write: Multisig Storage, [Caller Account], Refund Account"] - #[doc = "# "] - pub fn cancel_as_multi( - &self, - threshold: ::core::primitive::u16, - other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, - timepoint: runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, - call_hash: [::core::primitive::u8; 32usize], - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Multisig", - "cancel_as_multi", - CancelAsMulti { - threshold, - other_signatories, - timepoint, - call_hash, - }, - [ - 30u8, 25u8, 186u8, 142u8, 168u8, 81u8, 235u8, 164u8, 82u8, 209u8, 66u8, - 129u8, 209u8, 78u8, 172u8, 9u8, 163u8, 222u8, 125u8, 57u8, 2u8, 43u8, - 169u8, 174u8, 159u8, 167u8, 25u8, 226u8, 254u8, 110u8, 80u8, 216u8, - ], - ) - } - } - } - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::pallet_multisig::pallet::Event; - pub mod events { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "A new multisig operation has begun."] - pub struct NewMultisig { - pub approving: ::subxt::utils::AccountId32, - pub multisig: ::subxt::utils::AccountId32, - pub call_hash: [::core::primitive::u8; 32usize], + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Some funds have been deposited."] + pub struct Deposit { + pub value: ::core::primitive::u128, } - impl ::subxt::events::StaticEvent for NewMultisig { - const EVENT: &'static str = "NewMultisig"; - const PALLET: &'static str = "Multisig"; + impl ::subxt::events::StaticEvent for Deposit { + const EVENT: &'static str = "Deposit"; + const PALLET: &'static str = "Treasury"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "A multisig operation has been approved by someone."] - pub struct MultisigApproval { - pub approving: ::subxt::utils::AccountId32, - pub timepoint: runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, - pub multisig: ::subxt::utils::AccountId32, - pub call_hash: [::core::primitive::u8; 32usize], + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A new spend proposal has been approved."] + pub struct SpendApproved { + pub proposal_index: ::core::primitive::u32, + pub amount: ::core::primitive::u128, + pub beneficiary: ::subxt::utils::AccountId32, } - impl ::subxt::events::StaticEvent for MultisigApproval { - const EVENT: &'static str = "MultisigApproval"; - const PALLET: &'static str = "Multisig"; + impl ::subxt::events::StaticEvent for SpendApproved { + const EVENT: &'static str = "SpendApproved"; + const PALLET: &'static str = "Treasury"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "A multisig operation has been executed."] - pub struct MultisigExecuted { - pub approving: ::subxt::utils::AccountId32, - pub timepoint: runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, - pub multisig: ::subxt::utils::AccountId32, - pub call_hash: [::core::primitive::u8; 32usize], - pub result: ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "The inactive funds of the pallet have been updated."] + pub struct UpdatedInactive { + pub reactivated: ::core::primitive::u128, + pub deactivated: ::core::primitive::u128, } - impl ::subxt::events::StaticEvent for MultisigExecuted { - const EVENT: &'static str = "MultisigExecuted"; - const PALLET: &'static str = "Multisig"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "A multisig operation has been cancelled."] - pub struct MultisigCancelled { - pub cancelling: ::subxt::utils::AccountId32, - pub timepoint: runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, - pub multisig: ::subxt::utils::AccountId32, - pub call_hash: [::core::primitive::u8; 32usize], - } - impl ::subxt::events::StaticEvent for MultisigCancelled { - const EVENT: &'static str = "MultisigCancelled"; - const PALLET: &'static str = "Multisig"; + impl ::subxt::events::StaticEvent for UpdatedInactive { + const EVENT: &'static str = "UpdatedInactive"; + const PALLET: &'static str = "Treasury"; } } pub mod storage { use super::runtime_types; pub struct StorageApi; impl StorageApi { - #[doc = " The set of open multisig operations."] - pub fn multisigs( + #[doc = " Number of proposals that have been made."] + pub fn proposal_count( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - _1: impl ::std::borrow::Borrow<[::core::primitive::u8; 32usize]>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_multisig::Multisig< - ::core::primitive::u32, - ::core::primitive::u128, - ::subxt::utils::AccountId32, - >, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "Treasury", + "ProposalCount", + vec![], + [ + 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 = " Proposals that have been made."] + pub fn proposals( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_treasury::Proposal< + ::subxt::utils::AccountId32, + ::core::primitive::u128, >, ::subxt::storage::address::Yes, (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Multisig", - "Multisigs", - vec![ - ::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - ), - ::subxt::storage::address::StorageMapKey::new( - _1.borrow(), - ::subxt::storage::address::StorageHasher::Blake2_128Concat, - ), - ], + ::subxt::storage::address::Address::new_static( + "Treasury", + "Proposals", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], [ - 69u8, 153u8, 186u8, 204u8, 117u8, 95u8, 119u8, 182u8, 220u8, 87u8, 8u8, - 15u8, 123u8, 83u8, 5u8, 188u8, 115u8, 121u8, 163u8, 96u8, 218u8, 3u8, - 106u8, 44u8, 44u8, 187u8, 46u8, 238u8, 80u8, 203u8, 175u8, 155u8, + 182u8, 12u8, 98u8, 64u8, 117u8, 17u8, 90u8, 245u8, 80u8, 99u8, 161u8, + 17u8, 59u8, 80u8, 64u8, 139u8, 89u8, 179u8, 254u8, 239u8, 143u8, 114u8, + 77u8, 79u8, 75u8, 126u8, 52u8, 227u8, 1u8, 138u8, 35u8, 62u8, ], ) } - #[doc = " The set of open multisig operations."] - pub fn multisigs_root( + #[doc = " Proposals that have been made."] + pub fn proposals_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_multisig::Multisig< - ::core::primitive::u32, - ::core::primitive::u128, - ::subxt::utils::AccountId32, - >, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_treasury::Proposal< + ::subxt::utils::AccountId32, + ::core::primitive::u128, >, (), (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Multisig", - "Multisigs", + ::subxt::storage::address::Address::new_static( + "Treasury", + "Proposals", Vec::new(), [ - 69u8, 153u8, 186u8, 204u8, 117u8, 95u8, 119u8, 182u8, 220u8, 87u8, 8u8, - 15u8, 123u8, 83u8, 5u8, 188u8, 115u8, 121u8, 163u8, 96u8, 218u8, 3u8, - 106u8, 44u8, 44u8, 187u8, 46u8, 238u8, 80u8, 203u8, 175u8, 155u8, + 182u8, 12u8, 98u8, 64u8, 117u8, 17u8, 90u8, 245u8, 80u8, 99u8, 161u8, + 17u8, 59u8, 80u8, 64u8, 139u8, 89u8, 179u8, 254u8, 239u8, 143u8, 114u8, + 77u8, 79u8, 75u8, 126u8, 52u8, 227u8, 1u8, 138u8, 35u8, 62u8, + ], + ) + } + + #[doc = " The amount which has been reported as inactive to Currency."] + pub fn deactivated( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u128, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "Treasury", + "Deactivated", + vec![], + [ + 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 = " Proposal indices that have been approved but not yet awarded."] + pub fn approvals( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u32, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "Treasury", + "Approvals", + vec![], + [ + 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, ], ) } @@ -18004,46 +15645,78 @@ pub mod api { use super::runtime_types; pub struct ConstantsApi; impl ConstantsApi { - #[doc = " The base amount of currency needed to reserve for creating a multisig execution or to"] - #[doc = " store a dispatch call for later."] - #[doc = ""] - #[doc = " This is held for an additional storage item whose value size is"] - #[doc = " `4 + sizeof((BlockNumber, Balance, AccountId))` bytes and whose key size is"] - #[doc = " `32 + sizeof(AccountId)` bytes."] - pub fn deposit_base( + #[doc = " Fraction of a proposal's value that should be bonded in order to place the proposal."] + #[doc = " An accepted proposal gets these back. A rejected proposal does not."] + pub fn proposal_bond( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, - > { - ::subxt::constants::StaticConstantAddress::new("Multisig", "DepositBase", [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, - 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, 136u8, - 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, + ) -> ::subxt::constants::Address + { + ::subxt::constants::Address::new_static("Treasury", "ProposalBond", [ + 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 amount of currency needed per unit threshold when creating a multisig execution."] - #[doc = ""] - #[doc = " This is held for adding 32 bytes more into a pre-existing storage value."] - pub fn deposit_factor( + #[doc = " Minimum amount of funds that should be placed in a deposit for making a proposal."] + pub fn proposal_bond_minimum( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, - > { - ::subxt::constants::StaticConstantAddress::new("Multisig", "DepositFactor", [ + ) -> ::subxt::constants::Address<::core::primitive::u128> { + ::subxt::constants::Address::new_static("Treasury", "ProposalBondMinimum", [ 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, ]) } - #[doc = " The maximum amount of signatories allowed in the multisig."] - pub fn max_signatories( + #[doc = " Maximum amount of funds that should be placed in a deposit for making a proposal."] + pub fn proposal_bond_maximum( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { - ::subxt::constants::StaticConstantAddress::new("Multisig", "MaxSignatories", [ + ) -> ::subxt::constants::Address<::core::option::Option<::core::primitive::u128>> { + ::subxt::constants::Address::new_static("Treasury", "ProposalBondMaximum", [ + 198u8, 51u8, 89u8, 159u8, 124u8, 251u8, 51u8, 80u8, 167u8, 193u8, 44u8, + 199u8, 80u8, 36u8, 41u8, 130u8, 137u8, 229u8, 178u8, 208u8, 37u8, 215u8, + 169u8, 183u8, 180u8, 191u8, 140u8, 240u8, 250u8, 61u8, 42u8, 147u8, + ]) + } + + #[doc = " Period between successive spends."] + pub fn spend_period(&self) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static("Treasury", "SpendPeriod", [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, 125u8, + 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, 178u8, 197u8, + 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, 145u8, + ]) + } + + #[doc = " Percentage of spare funds (if any) that are burnt per spend period."] + pub fn burn( + &self, + ) -> ::subxt::constants::Address + { + ::subxt::constants::Address::new_static("Treasury", "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::constants::Address { + ::subxt::constants::Address::new_static("Treasury", "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 = " 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::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static("Treasury", "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, @@ -18052,11164 +15725,17931 @@ pub mod api { } } } - pub mod voter_list { + 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 one variant per dispatchable that can be called by an extrinsic."] + 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; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Rebag { - pub dislocated: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct PutInFrontOf { - pub lighter: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Declare that some `dislocated` account has, through rewards or penalties, sufficiently"] - #[doc = "changed its score that it should properly fall into a different bag than its current"] - #[doc = "one."] - #[doc = ""] - #[doc = "Anyone can call this function about any potentially dislocated account."] - #[doc = ""] - #[doc = "Will always update the stored score of `dislocated` to the correct score, based on"] - #[doc = "`ScoreProvider`."] - #[doc = ""] - #[doc = "If `dislocated` does not exists, it returns an error."] - pub fn rebag( - &self, - dislocated: ::subxt::utils::MultiAddress< + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Sudo { + pub call: ::std::boxed::Box, + } + impl ::subxt::blocks::StaticExtrinsic for Sudo { + const CALL: &'static str = "sudo"; + const PALLET: &'static str = "Sudo"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SudoUncheckedWeight { + pub call: ::std::boxed::Box, + pub weight: runtime_types::sp_weights::weight_v2::Weight, + } + impl ::subxt::blocks::StaticExtrinsic for SudoUncheckedWeight { + const CALL: &'static str = "sudo_unchecked_weight"; + const PALLET: &'static str = "Sudo"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetKey { + pub new: ::subxt::utils::MultiAddress< ::subxt::utils::AccountId32, ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new("VoterList", "rebag", Rebag { dislocated }, [ - 0u8, 168u8, 218u8, 188u8, 236u8, 124u8, 250u8, 201u8, 237u8, 20u8, 97u8, - 150u8, 117u8, 232u8, 116u8, 237u8, 55u8, 151u8, 71u8, 119u8, 42u8, 48u8, - 10u8, 66u8, 167u8, 208u8, 184u8, 228u8, 146u8, 181u8, 84u8, 70u8, - ]) } - - #[doc = "Move the caller's Id directly in front of `lighter`."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and can only be called by the Id of"] - #[doc = "the account going in front of `lighter`."] - #[doc = ""] - #[doc = "Only works if"] - #[doc = "- both nodes are within the same bag,"] - #[doc = "- and `origin` has a greater `Score` than `lighter`."] - pub fn put_in_front_of( - &self, - lighter: ::subxt::utils::MultiAddress< + impl ::subxt::blocks::StaticExtrinsic for SetKey { + const CALL: &'static str = "set_key"; + const PALLET: &'static str = "Sudo"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SudoAs { + pub who: ::subxt::utils::MultiAddress< ::subxt::utils::AccountId32, ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "VoterList", - "put_in_front_of", - PutInFrontOf { lighter }, + pub call: ::std::boxed::Box, + } + impl ::subxt::blocks::StaticExtrinsic for SudoAs { + const CALL: &'static str = "sudo_as"; + const PALLET: &'static str = "Sudo"; + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Authenticates the sudo key and dispatches a function call with `Root` origin."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "# "] + #[doc = "- O(1)."] + #[doc = "- Limited storage reads."] + #[doc = "- One DB write (event)."] + #[doc = "- Weight of derivative `call` execution + 10,000."] + #[doc = "# "] + pub fn sudo( + &self, + call: runtime_types::da_runtime::RuntimeCall, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Sudo", + "sudo", + types::Sudo { + call: ::std::boxed::Box::new(call), + }, + [ + 24u8, 203u8, 33u8, 250u8, 172u8, 170u8, 123u8, 90u8, 66u8, 35u8, 189u8, + 141u8, 207u8, 26u8, 124u8, 96u8, 123u8, 48u8, 84u8, 161u8, 197u8, 51u8, + 146u8, 136u8, 110u8, 12u8, 173u8, 150u8, 20u8, 53u8, 240u8, 118u8, + ], + ) + } + + #[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_."] + #[doc = ""] + #[doc = "# "] + #[doc = "- O(1)."] + #[doc = "- The weight of this call is defined by the caller."] + #[doc = "# "] + pub fn sudo_unchecked_weight( + &self, + call: runtime_types::da_runtime::RuntimeCall, + weight: runtime_types::sp_weights::weight_v2::Weight, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Sudo", + "sudo_unchecked_weight", + types::SudoUncheckedWeight { + call: ::std::boxed::Box::new(call), + weight, + }, + [ + 52u8, 99u8, 164u8, 13u8, 68u8, 77u8, 89u8, 221u8, 3u8, 99u8, 252u8, + 179u8, 100u8, 149u8, 9u8, 115u8, 84u8, 185u8, 6u8, 189u8, 109u8, 127u8, + 116u8, 10u8, 229u8, 111u8, 196u8, 251u8, 14u8, 112u8, 197u8, 230u8, + ], + ) + } + + #[doc = "Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo"] + #[doc = "key."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "# "] + #[doc = "- O(1)."] + #[doc = "- Limited storage reads."] + #[doc = "- One DB change."] + #[doc = "# "] + pub fn set_key( + &self, + new: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static("Sudo", "set_key", types::SetKey { new }, [ + 46u8, 208u8, 84u8, 223u8, 141u8, 188u8, 184u8, 156u8, 101u8, 97u8, 255u8, + 166u8, 168u8, 102u8, 75u8, 3u8, 149u8, 105u8, 202u8, 220u8, 187u8, 117u8, + 156u8, 83u8, 159u8, 115u8, 231u8, 201u8, 171u8, 47u8, 170u8, 36u8, + ]) + } + + #[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_."] + #[doc = ""] + #[doc = "# "] + #[doc = "- O(1)."] + #[doc = "- Limited storage reads."] + #[doc = "- One DB write (event)."] + #[doc = "- Weight of derivative `call` execution + 10,000."] + #[doc = "# "] + pub fn sudo_as( + &self, + who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + call: runtime_types::da_runtime::RuntimeCall, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Sudo", + "sudo_as", + types::SudoAs { + who, + call: ::std::boxed::Box::new(call), + }, [ - 104u8, 36u8, 96u8, 80u8, 236u8, 75u8, 203u8, 232u8, 136u8, 167u8, - 205u8, 143u8, 200u8, 53u8, 124u8, 148u8, 76u8, 246u8, 71u8, 246u8, - 205u8, 82u8, 32u8, 186u8, 33u8, 5u8, 183u8, 127u8, 153u8, 232u8, 80u8, - 164u8, + 148u8, 194u8, 25u8, 45u8, 65u8, 242u8, 211u8, 234u8, 185u8, 119u8, + 44u8, 119u8, 55u8, 61u8, 86u8, 212u8, 85u8, 62u8, 213u8, 184u8, 159u8, + 45u8, 181u8, 109u8, 71u8, 34u8, 239u8, 181u8, 163u8, 173u8, 66u8, + 174u8, ], ) } } } #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::pallet_bags_list::pallet::Event; + pub type Event = runtime_types::pallet_sudo::pallet::Event; pub mod events { use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "Moved an account from one bag to another."] - pub struct Rebagged { - pub who: ::subxt::utils::AccountId32, - pub from: ::core::primitive::u64, - pub to: ::core::primitive::u64, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A sudo just took place. \\[result\\]"] + pub struct Sudid { + pub sudo_result: + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, } - impl ::subxt::events::StaticEvent for Rebagged { - const EVENT: &'static str = "Rebagged"; - const PALLET: &'static str = "VoterList"; + impl ::subxt::events::StaticEvent for Sudid { + const EVENT: &'static str = "Sudid"; + const PALLET: &'static str = "Sudo"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "Updated the score of some account to the given amount."] - pub struct ScoreUpdated { - pub who: ::subxt::utils::AccountId32, - pub new_score: ::core::primitive::u64, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "The \\[sudoer\\] just switched identity; the old key is supplied if one existed."] + pub struct KeyChanged { + pub old_sudoer: ::core::option::Option<::subxt::utils::AccountId32>, } - impl ::subxt::events::StaticEvent for ScoreUpdated { - const EVENT: &'static str = "ScoreUpdated"; - const PALLET: &'static str = "VoterList"; + impl ::subxt::events::StaticEvent for KeyChanged { + const EVENT: &'static str = "KeyChanged"; + const PALLET: &'static str = "Sudo"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A sudo just took place. \\[result\\]"] + pub struct SudoAsDone { + pub sudo_result: + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + } + impl ::subxt::events::StaticEvent for SudoAsDone { + const EVENT: &'static str = "SudoAsDone"; + const PALLET: &'static str = "Sudo"; } } pub mod storage { use super::runtime_types; pub struct StorageApi; impl StorageApi { - #[doc = " A single node, within some bag."] - #[doc = ""] - #[doc = " Nodes store links forward and back within their respective bags."] - pub fn list_nodes( + #[doc = " The `AccountId` of the sudo key."] + pub fn key( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_bags_list::list::Node, - >, - ::subxt::storage::address::Yes, - (), + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::subxt::utils::AccountId32, ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "VoterList", - "ListNodes", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], - [ - 176u8, 186u8, 93u8, 51u8, 100u8, 184u8, 240u8, 29u8, 70u8, 3u8, 117u8, - 47u8, 23u8, 66u8, 231u8, 234u8, 53u8, 8u8, 234u8, 175u8, 181u8, 8u8, - 161u8, 154u8, 48u8, 178u8, 147u8, 227u8, 122u8, 115u8, 57u8, 97u8, - ], - ) - } - - #[doc = " A single node, within some bag."] - #[doc = ""] - #[doc = " Nodes store links forward and back within their respective bags."] - pub fn list_nodes_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_bags_list::list::Node, - >, (), (), - ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "VoterList", - "ListNodes", - Vec::new(), - [ - 176u8, 186u8, 93u8, 51u8, 100u8, 184u8, 240u8, 29u8, 70u8, 3u8, 117u8, - 47u8, 23u8, 66u8, 231u8, 234u8, 53u8, 8u8, 234u8, 175u8, 181u8, 8u8, - 161u8, 154u8, 48u8, 178u8, 147u8, 227u8, 122u8, 115u8, 57u8, 97u8, - ], - ) + ::subxt::storage::address::Address::new_static("Sudo", "Key", vec![], [ + 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, + ]) } - - #[doc = "Counter for the related counted storage map"] - pub fn counter_for_list_nodes( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "VoterList", - "CounterForListNodes", - vec![], - [ - 156u8, 168u8, 97u8, 33u8, 84u8, 117u8, 220u8, 89u8, 62u8, 182u8, 24u8, - 88u8, 231u8, 244u8, 41u8, 19u8, 210u8, 131u8, 87u8, 0u8, 241u8, 230u8, - 160u8, 142u8, 128u8, 153u8, 83u8, 36u8, 88u8, 247u8, 70u8, 130u8, - ], - ) + } + } + } + pub mod im_online { + use super::{root_mod, runtime_types}; + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub type Error = runtime_types::pallet_im_online::pallet::Error; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub type Call = runtime_types::pallet_im_online::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 :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Heartbeat { + pub heartbeat: + runtime_types::pallet_im_online::Heartbeat<::core::primitive::u32>, + pub signature: runtime_types::pallet_im_online::sr25519::app_sr25519::Signature, } - - #[doc = " A bag stored in storage."] - #[doc = ""] - #[doc = " Stores a `Bag` struct, which stores head and tail pointers to itself."] - pub fn list_bags( + impl ::subxt::blocks::StaticExtrinsic for Heartbeat { + const CALL: &'static str = "heartbeat"; + const PALLET: &'static str = "ImOnline"; + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "# "] + #[doc = "- Complexity: `O(K + E)` where K is length of `Keys` (heartbeat.validators_len) and E is"] + #[doc = " length of `heartbeat.network_state.external_address`"] + #[doc = " - `O(K)`: decoding of length `K`"] + #[doc = " - `O(E)`: decoding/encoding of length `E`"] + #[doc = "- DbReads: pallet_session `Validators`, pallet_session `CurrentIndex`, `Keys`,"] + #[doc = " `ReceivedHeartbeats`"] + #[doc = "- DbWrites: `ReceivedHeartbeats`"] + #[doc = "# "] + pub fn heartbeat( &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u64>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "VoterList", - "ListBags", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], + heartbeat: runtime_types::pallet_im_online::Heartbeat<::core::primitive::u32>, + signature: runtime_types::pallet_im_online::sr25519::app_sr25519::Signature, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "ImOnline", + "heartbeat", + types::Heartbeat { + heartbeat, + signature, + }, [ - 38u8, 86u8, 63u8, 92u8, 85u8, 59u8, 225u8, 244u8, 14u8, 155u8, 76u8, - 249u8, 153u8, 140u8, 179u8, 7u8, 96u8, 170u8, 236u8, 179u8, 4u8, 18u8, - 232u8, 146u8, 216u8, 51u8, 135u8, 116u8, 196u8, 117u8, 143u8, 153u8, - ], - ) - } - - #[doc = " A bag stored in storage."] - #[doc = ""] - #[doc = " Stores a `Bag` struct, which stores head and tail pointers to itself."] - pub fn list_bags_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "VoterList", - "ListBags", - Vec::new(), - [ - 38u8, 86u8, 63u8, 92u8, 85u8, 59u8, 225u8, 244u8, 14u8, 155u8, 76u8, - 249u8, 153u8, 140u8, 179u8, 7u8, 96u8, 170u8, 236u8, 179u8, 4u8, 18u8, - 232u8, 146u8, 216u8, 51u8, 135u8, 116u8, 196u8, 117u8, 143u8, 153u8, + 191u8, 155u8, 217u8, 65u8, 8u8, 34u8, 41u8, 185u8, 187u8, 199u8, 164u8, + 48u8, 76u8, 123u8, 235u8, 182u8, 85u8, 107u8, 48u8, 158u8, 110u8, + 206u8, 145u8, 119u8, 165u8, 253u8, 27u8, 59u8, 0u8, 112u8, 241u8, + 242u8, ], ) } } } - pub mod constants { + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub type Event = runtime_types::pallet_im_online::pallet::Event; + pub mod events { use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " The list of thresholds separating the various bags."] - #[doc = ""] - #[doc = " Ids are separated into unsorted bags according to their score. This specifies the"] - #[doc = " thresholds separating the bags. An id's bag is the largest bag for which the id's score"] - #[doc = " is less than or equal to its upper threshold."] - #[doc = ""] - #[doc = " When ids are iterated, higher bags are iterated completely before lower bags. This means"] - #[doc = " that iteration is _semi-sorted_: ids of higher score tend to come before ids of lower"] - #[doc = " score, but peer ids within a particular bag are sorted in insertion order."] - #[doc = ""] - #[doc = " # Expressing the constant"] - #[doc = ""] - #[doc = " This constant must be sorted in strictly increasing order. Duplicate items are not"] - #[doc = " permitted."] - #[doc = ""] - #[doc = " There is an implied upper limit of `Score::MAX`; that value does not need to be"] - #[doc = " specified within the bag. For any two threshold lists, if one ends with"] - #[doc = " `Score::MAX`, the other one does not, and they are otherwise equal, the two"] - #[doc = " lists will behave identically."] - #[doc = ""] - #[doc = " # Calculation"] - #[doc = ""] - #[doc = " It is recommended to generate the set of thresholds in a geometric series, such that"] - #[doc = " there exists some constant ratio such that `threshold[k + 1] == (threshold[k] *"] - #[doc = " constant_ratio).max(threshold[k] + 1)` for all `k`."] - #[doc = ""] - #[doc = " The helpers in the `/utils/frame/generate-bags` module can simplify this calculation."] - #[doc = ""] - #[doc = " # Examples"] - #[doc = ""] - #[doc = " - If `BagThresholds::get().is_empty()`, then all ids are put into the same bag, and"] - #[doc = " iteration is strictly in insertion order."] - #[doc = " - If `BagThresholds::get().len() == 64`, and the thresholds are determined according to"] - #[doc = " the procedure given above, then the constant ratio is equal to 2."] - #[doc = " - If `BagThresholds::get().len() == 200`, and the thresholds are determined according to"] - #[doc = " the procedure given above, then the constant ratio is approximately equal to 1.248."] - #[doc = " - If the threshold list begins `[1, 2, 3, ...]`, then an id with score 0 or 1 will fall"] - #[doc = " into bag 0, an id with score 2 will fall into bag 1, etc."] - #[doc = ""] - #[doc = " # Migration"] - #[doc = ""] - #[doc = " In the event that this list ever changes, a copy of the old bags list must be retained."] - #[doc = " With that `List::migrate` can be called, which will perform the appropriate migration."] - pub fn bag_thresholds( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::std::vec::Vec<::core::primitive::u64>>, - > { - ::subxt::constants::StaticConstantAddress::new("VoterList", "BagThresholds", [ - 103u8, 102u8, 255u8, 165u8, 124u8, 54u8, 5u8, 172u8, 112u8, 234u8, 25u8, - 175u8, 178u8, 19u8, 251u8, 73u8, 91u8, 192u8, 227u8, 81u8, 249u8, 45u8, - 126u8, 116u8, 7u8, 37u8, 9u8, 200u8, 167u8, 182u8, 12u8, 131u8, - ]) - } - } - } - } - pub mod nomination_pools { - use super::{root_mod, runtime_types}; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::{root_mod, runtime_types}; - type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Join { - #[codec(compact)] - pub amount: ::core::primitive::u128, - pub pool_id: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct BondExtra { - pub extra: - runtime_types::pallet_nomination_pools::BondExtra<::core::primitive::u128>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct ClaimPayout; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Unbond { - pub member_account: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - #[codec(compact)] - pub unbonding_points: ::core::primitive::u128, - } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - pub struct PoolWithdrawUnbonded { - pub pool_id: ::core::primitive::u32, - pub num_slashing_spans: ::core::primitive::u32, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A new heartbeat was received from `AuthorityId`."] + pub struct HeartbeatReceived { + pub authority_id: runtime_types::pallet_im_online::sr25519::app_sr25519::Public, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct WithdrawUnbonded { - pub member_account: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pub num_slashing_spans: ::core::primitive::u32, + impl ::subxt::events::StaticEvent for HeartbeatReceived { + const EVENT: &'static str = "HeartbeatReceived"; + const PALLET: &'static str = "ImOnline"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - pub struct Create { - #[codec(compact)] - pub amount: ::core::primitive::u128, - pub root: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pub nominator: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pub state_toggler: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "At the end of the session, no offence was committed."] + pub struct AllGood; + impl ::subxt::events::StaticEvent for AllGood { + const EVENT: &'static str = "AllGood"; + const PALLET: &'static str = "ImOnline"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - pub struct CreateWithPoolId { - #[codec(compact)] - pub amount: ::core::primitive::u128, - pub root: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pub nominator: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pub state_toggler: ::subxt::utils::MultiAddress< + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "At the end of the session, at least one validator was found to be offline."] + pub struct SomeOffline { + pub offline: ::std::vec::Vec<( ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pub pool_id: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Nominate { - pub pool_id: ::core::primitive::u32, - pub validators: ::std::vec::Vec<::subxt::utils::AccountId32>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct SetState { - pub pool_id: ::core::primitive::u32, - pub state: runtime_types::pallet_nomination_pools::PoolState, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct SetMetadata { - pub pool_id: ::core::primitive::u32, - pub metadata: ::std::vec::Vec<::core::primitive::u8>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct SetConfigs { - pub min_join_bond: - runtime_types::pallet_nomination_pools::ConfigOp<::core::primitive::u128>, - pub min_create_bond: - runtime_types::pallet_nomination_pools::ConfigOp<::core::primitive::u128>, - pub max_pools: - runtime_types::pallet_nomination_pools::ConfigOp<::core::primitive::u32>, - pub max_members: - runtime_types::pallet_nomination_pools::ConfigOp<::core::primitive::u32>, - pub max_members_per_pool: - runtime_types::pallet_nomination_pools::ConfigOp<::core::primitive::u32>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct UpdateRoles { - pub pool_id: ::core::primitive::u32, - pub new_root: - runtime_types::pallet_nomination_pools::ConfigOp<::subxt::utils::AccountId32>, - pub new_nominator: - runtime_types::pallet_nomination_pools::ConfigOp<::subxt::utils::AccountId32>, - pub new_state_toggler: - runtime_types::pallet_nomination_pools::ConfigOp<::subxt::utils::AccountId32>, + runtime_types::pallet_staking::Exposure< + ::subxt::utils::AccountId32, + ::core::primitive::u128, + >, + )>, } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Chill { - pub pool_id: ::core::primitive::u32, + impl ::subxt::events::StaticEvent for SomeOffline { + const EVENT: &'static str = "SomeOffline"; + const PALLET: &'static str = "ImOnline"; } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Stake funds with a pool. The amount to bond is transferred from the member to the"] - #[doc = "pools account and immediately increases the pools bond."] + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " The block number after which it's ok to send heartbeats in the current"] + #[doc = " session."] #[doc = ""] - #[doc = "# Note"] + #[doc = " At the beginning of each session we set this to a value that should fall"] + #[doc = " roughly in the middle of the session duration. The idea is to first wait for"] + #[doc = " the validators to produce a block in the current session, so that the"] + #[doc = " heartbeat later on will not be necessary."] #[doc = ""] - #[doc = "* An account can only be a member of a single pool."] - #[doc = "* An account cannot join the same pool multiple times."] - #[doc = "* This call will *not* dust the member account, so the member must have at least"] - #[doc = " `existential deposit + amount` in their account."] - #[doc = "* Only a pool with [`PoolState::Open`] can be joined"] - pub fn join( + #[doc = " This value will only be used as a fallback if we fail to get a proper session"] + #[doc = " progress estimate from `NextSessionRotation`, as those estimates should be"] + #[doc = " more accurate then the value we calculate for `HeartbeatAfter`."] + pub fn heartbeat_after( &self, - amount: ::core::primitive::u128, - pool_id: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "NominationPools", - "join", - Join { amount, pool_id }, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "ImOnline", + "HeartbeatAfter", + vec![], [ - 205u8, 66u8, 42u8, 72u8, 146u8, 148u8, 119u8, 162u8, 101u8, 183u8, - 46u8, 176u8, 221u8, 204u8, 197u8, 20u8, 75u8, 226u8, 29u8, 118u8, - 208u8, 60u8, 192u8, 247u8, 222u8, 100u8, 69u8, 80u8, 172u8, 13u8, 69u8, - 250u8, + 36u8, 179u8, 76u8, 254u8, 3u8, 184u8, 154u8, 142u8, 70u8, 104u8, 44u8, + 244u8, 39u8, 97u8, 31u8, 31u8, 93u8, 228u8, 185u8, 224u8, 13u8, 160u8, + 231u8, 210u8, 110u8, 143u8, 116u8, 29u8, 0u8, 215u8, 217u8, 137u8, ], ) } - #[doc = "Bond `extra` more funds from `origin` into the pool to which they already belong."] - #[doc = ""] - #[doc = "Additional funds can come from either the free balance of the account, of from the"] - #[doc = "accumulated rewards, see [`BondExtra`]."] - #[doc = ""] - #[doc = "Bonding extra funds implies an automatic payout of all pending rewards as well."] - pub fn bond_extra( + #[doc = " The current set of keys that may issue a heartbeat."] + pub fn keys( &self, - extra: runtime_types::pallet_nomination_pools::BondExtra< - ::core::primitive::u128, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec< + runtime_types::pallet_im_online::sr25519::app_sr25519::Public, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "NominationPools", - "bond_extra", - BondExtra { extra }, - [ - 50u8, 72u8, 181u8, 216u8, 249u8, 27u8, 250u8, 177u8, 253u8, 22u8, - 240u8, 100u8, 184u8, 202u8, 197u8, 34u8, 21u8, 188u8, 248u8, 191u8, - 11u8, 10u8, 236u8, 161u8, 168u8, 37u8, 38u8, 238u8, 61u8, 183u8, 86u8, - 55u8, - ], - ) + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static("ImOnline", "Keys", vec![], [ + 111u8, 104u8, 188u8, 46u8, 152u8, 140u8, 137u8, 244u8, 52u8, 214u8, 115u8, + 156u8, 39u8, 239u8, 15u8, 168u8, 193u8, 125u8, 57u8, 195u8, 250u8, 156u8, + 234u8, 222u8, 222u8, 253u8, 135u8, 232u8, 196u8, 163u8, 29u8, 218u8, + ]) } - #[doc = "A bonded member can use this to claim their payout based on the rewards that the pool"] - #[doc = "has accumulated since their last claimed payout (OR since joining if this is there first"] - #[doc = "time claiming rewards). The payout will be transferred to the member's account."] - #[doc = ""] - #[doc = "The member will earn rewards pro rata based on the members stake vs the sum of the"] - #[doc = "members in the pools stake. Rewards do not \"expire\"."] - pub fn claim_payout(&self) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "NominationPools", - "claim_payout", - ClaimPayout {}, + #[doc = " For each session index, we keep a mapping of `SessionIndex` and `AuthIndex` to"] + #[doc = " `WrapperOpaque`."] + pub fn received_heartbeats( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + _1: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::frame_support::traits::misc::WrapperOpaque< + runtime_types::pallet_im_online::BoundedOpaqueNetworkState, + >, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "ImOnline", + "ReceivedHeartbeats", + vec![ + ::subxt::storage::address::make_static_storage_map_key(_0.borrow()), + ::subxt::storage::address::make_static_storage_map_key(_1.borrow()), + ], [ - 128u8, 58u8, 138u8, 55u8, 64u8, 16u8, 129u8, 25u8, 211u8, 229u8, 193u8, - 115u8, 47u8, 45u8, 155u8, 221u8, 218u8, 1u8, 222u8, 5u8, 236u8, 32u8, - 88u8, 0u8, 198u8, 72u8, 196u8, 181u8, 104u8, 16u8, 212u8, 29u8, + 244u8, 195u8, 226u8, 146u8, 31u8, 109u8, 70u8, 31u8, 198u8, 97u8, + 116u8, 249u8, 115u8, 191u8, 13u8, 96u8, 12u8, 200u8, 235u8, 254u8, 3u8, + 36u8, 51u8, 43u8, 224u8, 251u8, 76u8, 197u8, 157u8, 173u8, 125u8, + 161u8, ], ) } - #[doc = "Unbond up to `unbonding_points` of the `member_account`'s funds from the pool. It"] - #[doc = "implicitly collects the rewards one last time, since not doing so would mean some"] - #[doc = "rewards would be forfeited."] - #[doc = ""] - #[doc = "Under certain conditions, this call can be dispatched permissionlessly (i.e. by any"] - #[doc = "account)."] - #[doc = ""] - #[doc = "# Conditions for a permissionless dispatch."] - #[doc = ""] - #[doc = "* The pool is blocked and the caller is either the root or state-toggler. This is"] - #[doc = " refereed to as a kick."] - #[doc = "* The pool is destroying and the member is not the depositor."] - #[doc = "* The pool is destroying, the member is the depositor and no other members are in the"] - #[doc = " pool."] - #[doc = ""] - #[doc = "## Conditions for permissioned dispatch (i.e. the caller is also the"] - #[doc = "`member_account`):"] - #[doc = ""] - #[doc = "* The caller is not the depositor."] - #[doc = "* The caller is the depositor, the pool is destroying and no other members are in the"] - #[doc = " pool."] - #[doc = ""] - #[doc = "# Note"] - #[doc = ""] - #[doc = "If there are too many unlocking chunks to unbond with the pool account,"] - #[doc = "[`Call::pool_withdraw_unbonded`] can be called to try and minimize unlocking chunks."] - #[doc = "The [`StakingInterface::unbond`] will implicitly call [`Call::pool_withdraw_unbonded`]"] - #[doc = "to try to free chunks if necessary (ie. if unbound was called and no unlocking chunks"] - #[doc = "are available). However, it may not be possible to release the current unlocking chunks,"] - #[doc = "in which case, the result of this call will likely be the `NoMoreChunks` error from the"] - #[doc = "staking system."] - pub fn unbond( + #[doc = " For each session index, we keep a mapping of `SessionIndex` and `AuthIndex` to"] + #[doc = " `WrapperOpaque`."] + pub fn received_heartbeats_root( &self, - member_account: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::frame_support::traits::misc::WrapperOpaque< + runtime_types::pallet_im_online::BoundedOpaqueNetworkState, >, - unbonding_points: ::core::primitive::u128, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "NominationPools", - "unbond", - Unbond { - member_account, - unbonding_points, - }, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "ImOnline", + "ReceivedHeartbeats", + Vec::new(), [ - 139u8, 71u8, 78u8, 184u8, 141u8, 89u8, 179u8, 123u8, 153u8, 30u8, - 116u8, 186u8, 148u8, 49u8, 48u8, 98u8, 33u8, 21u8, 29u8, 106u8, 180u8, - 212u8, 37u8, 251u8, 237u8, 21u8, 255u8, 13u8, 236u8, 73u8, 250u8, 57u8, + 244u8, 195u8, 226u8, 146u8, 31u8, 109u8, 70u8, 31u8, 198u8, 97u8, + 116u8, 249u8, 115u8, 191u8, 13u8, 96u8, 12u8, 200u8, 235u8, 254u8, 3u8, + 36u8, 51u8, 43u8, 224u8, 251u8, 76u8, 197u8, 157u8, 173u8, 125u8, + 161u8, ], ) } - #[doc = "Call `withdraw_unbonded` for the pools account. This call can be made by any account."] - #[doc = ""] - #[doc = "This is useful if their are too many unlocking chunks to call `unbond`, and some"] - #[doc = "can be cleared by withdrawing. In the case there are too many unlocking chunks, the user"] - #[doc = "would probably see an error like `NoMoreChunks` emitted from the staking system when"] - #[doc = "they attempt to unbond."] - pub fn pool_withdraw_unbonded( + #[doc = " For each session index, we keep a mapping of `ValidatorId` to the"] + #[doc = " number of blocks authored by the given authority."] + pub fn authored_blocks( &self, - pool_id: ::core::primitive::u32, - num_slashing_spans: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "NominationPools", - "pool_withdraw_unbonded", - PoolWithdrawUnbonded { - pool_id, - num_slashing_spans, - }, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + _1: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "ImOnline", + "AuthoredBlocks", + vec![ + ::subxt::storage::address::make_static_storage_map_key(_0.borrow()), + ::subxt::storage::address::make_static_storage_map_key(_1.borrow()), + ], [ - 152u8, 245u8, 131u8, 247u8, 106u8, 214u8, 154u8, 8u8, 7u8, 210u8, - 149u8, 218u8, 118u8, 46u8, 242u8, 182u8, 191u8, 119u8, 28u8, 199u8, - 36u8, 49u8, 219u8, 123u8, 58u8, 203u8, 211u8, 226u8, 217u8, 36u8, 56u8, - 0u8, + 121u8, 246u8, 100u8, 191u8, 5u8, 211u8, 190u8, 244u8, 61u8, 73u8, + 169u8, 127u8, 116u8, 80u8, 118u8, 139u8, 115u8, 58u8, 125u8, 81u8, + 75u8, 20u8, 194u8, 74u8, 97u8, 188u8, 55u8, 160u8, 33u8, 155u8, 186u8, + 74u8, ], ) } - #[doc = "Withdraw unbonded funds from `member_account`. If no bonded funds can be unbonded, an"] - #[doc = "error is returned."] - #[doc = ""] - #[doc = "Under certain conditions, this call can be dispatched permissionlessly (i.e. by any"] - #[doc = "account)."] - #[doc = ""] - #[doc = "# Conditions for a permissionless dispatch"] - #[doc = ""] - #[doc = "* The pool is in destroy mode and the target is not the depositor."] - #[doc = "* The target is the depositor and they are the only member in the sub pools."] - #[doc = "* The pool is blocked and the caller is either the root or state-toggler."] - #[doc = ""] - #[doc = "# Conditions for permissioned dispatch"] - #[doc = ""] - #[doc = "* The caller is the target and they are not the depositor."] - #[doc = ""] - #[doc = "# Note"] - #[doc = ""] - #[doc = "If the target is the depositor, the pool will be destroyed."] - pub fn withdraw_unbonded( + #[doc = " For each session index, we keep a mapping of `ValidatorId` to the"] + #[doc = " number of blocks authored by the given authority."] + pub fn authored_blocks_root( &self, - member_account: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - num_slashing_spans: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "NominationPools", - "withdraw_unbonded", - WithdrawUnbonded { - member_account, - num_slashing_spans, - }, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "ImOnline", + "AuthoredBlocks", + Vec::new(), [ - 192u8, 183u8, 121u8, 87u8, 176u8, 70u8, 91u8, 226u8, 156u8, 79u8, 87u8, - 34u8, 227u8, 84u8, 22u8, 235u8, 3u8, 181u8, 166u8, 194u8, 147u8, 72u8, - 27u8, 221u8, 57u8, 14u8, 44u8, 70u8, 253u8, 236u8, 44u8, 84u8, + 121u8, 246u8, 100u8, 191u8, 5u8, 211u8, 190u8, 244u8, 61u8, 73u8, + 169u8, 127u8, 116u8, 80u8, 118u8, 139u8, 115u8, 58u8, 125u8, 81u8, + 75u8, 20u8, 194u8, 74u8, 97u8, 188u8, 55u8, 160u8, 33u8, 155u8, 186u8, + 74u8, ], ) } - - #[doc = "Create a new delegation pool."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `amount` - The amount of funds to delegate to the pool. This also acts of a sort of"] - #[doc = " deposit since the pools creator cannot fully unbond funds until the pool is being"] - #[doc = " destroyed."] - #[doc = "* `index` - A disambiguation index for creating the account. Likely only useful when"] - #[doc = " creating multiple pools in the same extrinsic."] - #[doc = "* `root` - The account to set as [`PoolRoles::root`]."] - #[doc = "* `nominator` - The account to set as the [`PoolRoles::nominator`]."] - #[doc = "* `state_toggler` - The account to set as the [`PoolRoles::state_toggler`]."] - #[doc = ""] - #[doc = "# Note"] + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " A configuration for base priority of unsigned transactions."] #[doc = ""] - #[doc = "In addition to `amount`, the caller will transfer the existential deposit; so the caller"] - #[doc = "needs at have at least `amount + existential_deposit` transferrable."] - pub fn create( + #[doc = " This is exposed so that it can be tuned for particular runtime, when"] + #[doc = " multiple pallets send unsigned transactions."] + pub fn unsigned_priority( &self, - amount: ::core::primitive::u128, - root: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - nominator: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - state_toggler: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, + ) -> ::subxt::constants::Address<::core::primitive::u64> { + ::subxt::constants::Address::new_static("ImOnline", "UnsignedPriority", [ + 128u8, 214u8, 205u8, 242u8, 181u8, 142u8, 124u8, 231u8, 190u8, 146u8, 59u8, + 226u8, 157u8, 101u8, 103u8, 117u8, 249u8, 65u8, 18u8, 191u8, 103u8, 119u8, + 53u8, 85u8, 81u8, 96u8, 220u8, 42u8, 184u8, 239u8, 42u8, 246u8, + ]) + } + } + } + } + pub mod authority_discovery { + use super::{root_mod, runtime_types}; + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " Keys of the current authority set."] + pub fn keys( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec< + runtime_types::sp_authority_discovery::app::Public, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "NominationPools", - "create", - Create { - amount, - root, - nominator, - state_toggler, - }, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "AuthorityDiscovery", + "Keys", + vec![], [ - 73u8, 99u8, 205u8, 59u8, 21u8, 182u8, 163u8, 158u8, 99u8, 182u8, 182u8, - 63u8, 212u8, 84u8, 48u8, 244u8, 95u8, 153u8, 86u8, 104u8, 92u8, 93u8, - 191u8, 79u8, 163u8, 123u8, 20u8, 121u8, 241u8, 194u8, 79u8, 112u8, + 111u8, 104u8, 188u8, 46u8, 152u8, 140u8, 137u8, 244u8, 52u8, 214u8, + 115u8, 156u8, 39u8, 239u8, 15u8, 168u8, 193u8, 125u8, 57u8, 195u8, + 250u8, 156u8, 234u8, 222u8, 222u8, 253u8, 135u8, 232u8, 196u8, 163u8, + 29u8, 218u8, ], ) } - #[doc = "Create a new delegation pool with a previously used pool id"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "same as `create` with the inclusion of"] - #[doc = "* `pool_id` - `A valid PoolId."] - pub fn create_with_pool_id( + #[doc = " Keys of the next authority set."] + pub fn next_keys( &self, - amount: ::core::primitive::u128, - root: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - nominator: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec< + runtime_types::sp_authority_discovery::app::Public, >, - state_toggler: ::subxt::utils::MultiAddress< + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "AuthorityDiscovery", + "NextKeys", + vec![], + [ + 171u8, 107u8, 15u8, 108u8, 125u8, 102u8, 193u8, 240u8, 127u8, 160u8, + 53u8, 1u8, 208u8, 36u8, 134u8, 4u8, 216u8, 26u8, 156u8, 143u8, 154u8, + 194u8, 153u8, 199u8, 46u8, 211u8, 153u8, 222u8, 244u8, 4u8, 165u8, 2u8, + ], + ) + } + } + } + } + pub mod offences { + use super::{root_mod, runtime_types}; + #[doc = "Events type."] + pub type Event = runtime_types::pallet_offences::pallet::Event; + pub mod events { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "There is an offence reported of the given `kind` happened at the `session_index` and"] + #[doc = "(kind-specific) time slot. This event is not deposited for duplicate slashes."] + #[doc = "\\[kind, timeslot\\]."] + pub struct Offence { + pub kind: [::core::primitive::u8; 16usize], + pub timeslot: ::std::vec::Vec<::core::primitive::u8>, + } + impl ::subxt::events::StaticEvent for Offence { + const EVENT: &'static str = "Offence"; + const PALLET: &'static str = "Offences"; + } + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " The primary structure that holds all offence records keyed by report identifiers."] + pub fn reports( + &self, + _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::sp_staking::offence::OffenceDetails< ::subxt::utils::AccountId32, - ::core::primitive::u32, + ( + ::subxt::utils::AccountId32, + runtime_types::pallet_staking::Exposure< + ::subxt::utils::AccountId32, + ::core::primitive::u128, + >, + ), >, - pool_id: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "NominationPools", - "create_with_pool_id", - CreateWithPoolId { - amount, - root, - nominator, - state_toggler, - pool_id, - }, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Offences", + "Reports", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], [ - 113u8, 67u8, 242u8, 175u8, 174u8, 4u8, 116u8, 44u8, 157u8, 35u8, 13u8, - 23u8, 55u8, 80u8, 255u8, 103u8, 196u8, 247u8, 105u8, 152u8, 108u8, - 145u8, 180u8, 169u8, 252u8, 159u8, 175u8, 241u8, 122u8, 136u8, 252u8, - 95u8, + 242u8, 69u8, 20u8, 130u8, 250u8, 223u8, 68u8, 121u8, 187u8, 215u8, + 62u8, 204u8, 100u8, 51u8, 76u8, 164u8, 188u8, 182u8, 215u8, 93u8, + 161u8, 100u8, 187u8, 205u8, 73u8, 158u8, 57u8, 198u8, 239u8, 66u8, + 42u8, 65u8, ], ) } - #[doc = "Nominate on behalf of the pool."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be signed by the pool nominator or the pool"] - #[doc = "root role."] - #[doc = ""] - #[doc = "This directly forward the call to the staking pallet, on behalf of the pool bonded"] - #[doc = "account."] - pub fn nominate( + #[doc = " The primary structure that holds all offence records keyed by report identifiers."] + pub fn reports_root( &self, - pool_id: ::core::primitive::u32, - validators: ::std::vec::Vec<::subxt::utils::AccountId32>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "NominationPools", - "nominate", - Nominate { - pool_id, - validators, - }, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::sp_staking::offence::OffenceDetails< + ::subxt::utils::AccountId32, + ( + ::subxt::utils::AccountId32, + runtime_types::pallet_staking::Exposure< + ::subxt::utils::AccountId32, + ::core::primitive::u128, + >, + ), + >, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Offences", + "Reports", + Vec::new(), [ - 10u8, 235u8, 64u8, 157u8, 36u8, 249u8, 186u8, 27u8, 79u8, 172u8, 25u8, - 3u8, 203u8, 19u8, 192u8, 182u8, 36u8, 103u8, 13u8, 20u8, 89u8, 140u8, - 159u8, 4u8, 132u8, 242u8, 192u8, 146u8, 55u8, 251u8, 216u8, 255u8, + 242u8, 69u8, 20u8, 130u8, 250u8, 223u8, 68u8, 121u8, 187u8, 215u8, + 62u8, 204u8, 100u8, 51u8, 76u8, 164u8, 188u8, 182u8, 215u8, 93u8, + 161u8, 100u8, 187u8, 205u8, 73u8, 158u8, 57u8, 198u8, 239u8, 66u8, + 42u8, 65u8, ], ) } - #[doc = "Set a new state for the pool."] - #[doc = ""] - #[doc = "If a pool is already in the `Destroying` state, then under no condition can its state"] - #[doc = "change again."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be either:"] - #[doc = ""] - #[doc = "1. signed by the state toggler, or the root role of the pool,"] - #[doc = "2. if the pool conditions to be open are NOT met (as described by `ok_to_be_open`), and"] - #[doc = " then the state of the pool can be permissionlessly changed to `Destroying`."] - pub fn set_state( + #[doc = " A vector of reports of the same kind that happened at the same time slot."] + pub fn concurrent_reports_index( &self, - pool_id: ::core::primitive::u32, - state: runtime_types::pallet_nomination_pools::PoolState, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "NominationPools", - "set_state", - SetState { pool_id, state }, + _0: impl ::std::borrow::Borrow<[::core::primitive::u8; 16usize]>, + _1: impl ::std::borrow::Borrow<[::core::primitive::u8]>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec<::subxt::utils::H256>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Offences", + "ConcurrentReportsIndex", + vec![ + ::subxt::storage::address::make_static_storage_map_key(_0.borrow()), + ::subxt::storage::address::make_static_storage_map_key(_1.borrow()), + ], [ - 104u8, 40u8, 213u8, 88u8, 159u8, 115u8, 35u8, 249u8, 78u8, 180u8, 99u8, - 1u8, 225u8, 218u8, 192u8, 151u8, 25u8, 194u8, 192u8, 187u8, 39u8, - 170u8, 212u8, 125u8, 75u8, 250u8, 248u8, 175u8, 159u8, 161u8, 151u8, - 162u8, + 125u8, 222u8, 9u8, 162u8, 38u8, 89u8, 77u8, 187u8, 129u8, 103u8, 21u8, + 31u8, 117u8, 101u8, 43u8, 115u8, 170u8, 205u8, 142u8, 26u8, 27u8, + 184u8, 152u8, 133u8, 76u8, 203u8, 78u8, 113u8, 51u8, 141u8, 118u8, + 171u8, ], ) } - #[doc = "Set a new metadata for the pool."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be signed by the state toggler, or the root role"] - #[doc = "of the pool."] - pub fn set_metadata( + #[doc = " A vector of reports of the same kind that happened at the same time slot."] + pub fn concurrent_reports_index_root( &self, - pool_id: ::core::primitive::u32, - metadata: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "NominationPools", - "set_metadata", - SetMetadata { pool_id, metadata }, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec<::subxt::utils::H256>, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Offences", + "ConcurrentReportsIndex", + Vec::new(), [ - 156u8, 81u8, 170u8, 161u8, 34u8, 100u8, 183u8, 174u8, 5u8, 81u8, 31u8, - 76u8, 12u8, 42u8, 77u8, 1u8, 6u8, 26u8, 168u8, 7u8, 8u8, 115u8, 158u8, - 151u8, 30u8, 211u8, 52u8, 177u8, 234u8, 87u8, 125u8, 127u8, + 125u8, 222u8, 9u8, 162u8, 38u8, 89u8, 77u8, 187u8, 129u8, 103u8, 21u8, + 31u8, 117u8, 101u8, 43u8, 115u8, 170u8, 205u8, 142u8, 26u8, 27u8, + 184u8, 152u8, 133u8, 76u8, 203u8, 78u8, 113u8, 51u8, 141u8, 118u8, + 171u8, ], ) } - #[doc = "Update configurations for the nomination pools. The origin for this call must be"] - #[doc = "Root."] + #[doc = " Enumerates all reports of a kind along with the time they happened."] #[doc = ""] - #[doc = "# Arguments"] + #[doc = " All reports are sorted by the time of offence."] #[doc = ""] - #[doc = "* `min_join_bond` - Set [`MinJoinBond`]."] - #[doc = "* `min_create_bond` - Set [`MinCreateBond`]."] - #[doc = "* `max_pools` - Set [`MaxPools`]."] - #[doc = "* `max_members` - Set [`MaxPoolMembers`]."] - #[doc = "* `max_members_per_pool` - Set [`MaxPoolMembersPerPool`]."] - pub fn set_configs( + #[doc = " Note that the actual type of this mapping is `Vec`, this is because values of"] + #[doc = " different types are not supported at the moment so we are doing the manual serialization."] + pub fn reports_by_kind_index( &self, - min_join_bond: runtime_types::pallet_nomination_pools::ConfigOp< - ::core::primitive::u128, - >, - min_create_bond: runtime_types::pallet_nomination_pools::ConfigOp< - ::core::primitive::u128, - >, - max_pools: runtime_types::pallet_nomination_pools::ConfigOp< - ::core::primitive::u32, - >, - max_members: runtime_types::pallet_nomination_pools::ConfigOp< - ::core::primitive::u32, - >, - max_members_per_pool: runtime_types::pallet_nomination_pools::ConfigOp< - ::core::primitive::u32, - >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "NominationPools", - "set_configs", - SetConfigs { - min_join_bond, - min_create_bond, - max_pools, - max_members, - max_members_per_pool, - }, + _0: impl ::std::borrow::Borrow<[::core::primitive::u8; 16usize]>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec<::core::primitive::u8>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Offences", + "ReportsByKindIndex", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], [ - 143u8, 196u8, 211u8, 30u8, 71u8, 15u8, 150u8, 243u8, 7u8, 178u8, 179u8, - 168u8, 40u8, 116u8, 220u8, 140u8, 18u8, 206u8, 6u8, 189u8, 190u8, 37u8, - 68u8, 41u8, 45u8, 233u8, 247u8, 172u8, 185u8, 34u8, 243u8, 187u8, + 203u8, 135u8, 157u8, 163u8, 119u8, 91u8, 139u8, 122u8, 203u8, 203u8, + 165u8, 111u8, 226u8, 245u8, 126u8, 42u8, 106u8, 229u8, 223u8, 183u8, + 139u8, 234u8, 210u8, 211u8, 64u8, 31u8, 196u8, 5u8, 172u8, 81u8, 137u8, + 227u8, ], ) } - #[doc = "Update the roles of the pool."] + #[doc = " Enumerates all reports of a kind along with the time they happened."] #[doc = ""] - #[doc = "The root is the only entity that can change any of the roles, including itself,"] - #[doc = "excluding the depositor, who can never change."] + #[doc = " All reports are sorted by the time of offence."] #[doc = ""] - #[doc = "It emits an event, notifying UIs of the role change. This event is quite relevant to"] - #[doc = "most pool members and they should be informed of changes to pool roles."] - pub fn update_roles( + #[doc = " Note that the actual type of this mapping is `Vec`, this is because values of"] + #[doc = " different types are not supported at the moment so we are doing the manual serialization."] + pub fn reports_by_kind_index_root( &self, - pool_id: ::core::primitive::u32, - new_root: runtime_types::pallet_nomination_pools::ConfigOp< - ::subxt::utils::AccountId32, - >, - new_nominator: runtime_types::pallet_nomination_pools::ConfigOp< - ::subxt::utils::AccountId32, - >, - new_state_toggler: runtime_types::pallet_nomination_pools::ConfigOp< - ::subxt::utils::AccountId32, - >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "NominationPools", - "update_roles", - UpdateRoles { - pool_id, - new_root, - new_nominator, - new_state_toggler, - }, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec<::core::primitive::u8>, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Offences", + "ReportsByKindIndex", + Vec::new(), [ - 247u8, 95u8, 234u8, 56u8, 181u8, 229u8, 158u8, 97u8, 69u8, 165u8, 38u8, - 17u8, 27u8, 209u8, 204u8, 250u8, 91u8, 193u8, 35u8, 93u8, 215u8, 131u8, - 148u8, 73u8, 67u8, 188u8, 92u8, 32u8, 34u8, 37u8, 113u8, 93u8, + 203u8, 135u8, 157u8, 163u8, 119u8, 91u8, 139u8, 122u8, 203u8, 203u8, + 165u8, 111u8, 226u8, 245u8, 126u8, 42u8, 106u8, 229u8, 223u8, 183u8, + 139u8, 234u8, 210u8, 211u8, 64u8, 31u8, 196u8, 5u8, 172u8, 81u8, 137u8, + 227u8, ], ) } - - #[doc = "Chill on behalf of the pool."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be signed by the pool nominator or the pool"] - #[doc = "root role, same as [`Pallet::nominate`]."] - #[doc = ""] - #[doc = "This directly forward the call to the staking pallet, on behalf of the pool bonded"] - #[doc = "account."] - pub fn chill( - &self, - pool_id: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "NominationPools", - "chill", - Chill { pool_id }, - [ - 41u8, 114u8, 128u8, 121u8, 244u8, 15u8, 15u8, 52u8, 129u8, 88u8, 239u8, - 167u8, 216u8, 38u8, 123u8, 240u8, 172u8, 229u8, 132u8, 64u8, 175u8, - 87u8, 217u8, 27u8, 11u8, 124u8, 1u8, 140u8, 40u8, 191u8, 187u8, 36u8, - ], - ) - } - } - } - #[doc = "Events of this pallet."] - pub type Event = runtime_types::pallet_nomination_pools::pallet::Event; - pub mod events { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "A pool has been created."] - pub struct Created { - pub depositor: ::subxt::utils::AccountId32, - pub pool_id: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for Created { - const EVENT: &'static str = "Created"; - const PALLET: &'static str = "NominationPools"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "A member has became bonded in a pool."] - pub struct Bonded { - pub member: ::subxt::utils::AccountId32, - pub pool_id: ::core::primitive::u32, - pub bonded: ::core::primitive::u128, - pub joined: ::core::primitive::bool, - } - impl ::subxt::events::StaticEvent for Bonded { - const EVENT: &'static str = "Bonded"; - const PALLET: &'static str = "NominationPools"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "A payout has been made to a member."] - pub struct PaidOut { - pub member: ::subxt::utils::AccountId32, - pub pool_id: ::core::primitive::u32, - pub payout: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for PaidOut { - const EVENT: &'static str = "PaidOut"; - const PALLET: &'static str = "NominationPools"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "A member has unbonded from their pool."] - #[doc = ""] - #[doc = "- `balance` is the corresponding balance of the number of points that has been"] - #[doc = " requested to be unbonded (the argument of the `unbond` transaction) from the bonded"] - #[doc = " pool."] - #[doc = "- `points` is the number of points that are issued as a result of `balance` being"] - #[doc = "dissolved into the corresponding unbonding pool."] - #[doc = "- `era` is the era in which the balance will be unbonded."] - #[doc = "In the absence of slashing, these values will match. In the presence of slashing, the"] - #[doc = "number of points that are issued in the unbonding pool will be less than the amount"] - #[doc = "requested to be unbonded."] - pub struct Unbonded { - pub member: ::subxt::utils::AccountId32, - pub pool_id: ::core::primitive::u32, - pub balance: ::core::primitive::u128, - pub points: ::core::primitive::u128, - pub era: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for Unbonded { - const EVENT: &'static str = "Unbonded"; - const PALLET: &'static str = "NominationPools"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "A member has withdrawn from their pool."] - #[doc = ""] - #[doc = "The given number of `points` have been dissolved in return of `balance`."] - #[doc = ""] - #[doc = "Similar to `Unbonded` event, in the absence of slashing, the ratio of point to balance"] - #[doc = "will be 1."] - pub struct Withdrawn { - pub member: ::subxt::utils::AccountId32, - pub pool_id: ::core::primitive::u32, - pub balance: ::core::primitive::u128, - pub points: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for Withdrawn { - const EVENT: &'static str = "Withdrawn"; - const PALLET: &'static str = "NominationPools"; - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "A pool has been destroyed."] - pub struct Destroyed { - pub pool_id: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for Destroyed { - const EVENT: &'static str = "Destroyed"; - const PALLET: &'static str = "NominationPools"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "The state of a pool has changed"] - pub struct StateChanged { - pub pool_id: ::core::primitive::u32, - pub new_state: runtime_types::pallet_nomination_pools::PoolState, - } - impl ::subxt::events::StaticEvent for StateChanged { - const EVENT: &'static str = "StateChanged"; - const PALLET: &'static str = "NominationPools"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "A member has been removed from a pool."] - #[doc = ""] - #[doc = "The removal can be voluntary (withdrawn all unbonded funds) or involuntary (kicked)."] - pub struct MemberRemoved { - pub pool_id: ::core::primitive::u32, - pub member: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for MemberRemoved { - const EVENT: &'static str = "MemberRemoved"; - const PALLET: &'static str = "NominationPools"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "The roles of a pool have been updated to the given new roles. Note that the depositor"] - #[doc = "can never change."] - pub struct RolesUpdated { - pub root: ::core::option::Option<::subxt::utils::AccountId32>, - pub state_toggler: ::core::option::Option<::subxt::utils::AccountId32>, - pub nominator: ::core::option::Option<::subxt::utils::AccountId32>, - } - impl ::subxt::events::StaticEvent for RolesUpdated { - const EVENT: &'static str = "RolesUpdated"; - const PALLET: &'static str = "NominationPools"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "The active balance of pool `pool_id` has been slashed to `balance`."] - pub struct PoolSlashed { - pub pool_id: ::core::primitive::u32, - pub balance: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for PoolSlashed { - const EVENT: &'static str = "PoolSlashed"; - const PALLET: &'static str = "NominationPools"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "The unbond pool at `era` of pool `pool_id` has been slashed to `balance`."] - pub struct UnbondingPoolSlashed { - pub pool_id: ::core::primitive::u32, - pub era: ::core::primitive::u32, - pub balance: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for UnbondingPoolSlashed { - const EVENT: &'static str = "UnbondingPoolSlashed"; - const PALLET: &'static str = "NominationPools"; } } + } + pub mod historical { + use super::{root_mod, runtime_types}; pub mod storage { use super::runtime_types; pub struct StorageApi; impl StorageApi { - #[doc = " Minimum amount to bond to join a pool."] - pub fn min_join_bond( + #[doc = " Mapping from historical session indices to session-data root hash and validator count."] + pub fn historical_sessions( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, - ::subxt::storage::address::Yes, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + (::subxt::utils::H256, ::core::primitive::u32), ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "NominationPools", - "MinJoinBond", - vec![], + ::subxt::storage::address::Address::new_static( + "Historical", + "HistoricalSessions", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], [ - 125u8, 239u8, 45u8, 225u8, 74u8, 129u8, 247u8, 184u8, 205u8, 58u8, - 45u8, 186u8, 126u8, 170u8, 112u8, 120u8, 23u8, 190u8, 247u8, 97u8, - 131u8, 126u8, 215u8, 44u8, 147u8, 122u8, 132u8, 212u8, 217u8, 84u8, - 240u8, 91u8, + 219u8, 105u8, 245u8, 54u8, 143u8, 81u8, 56u8, 104u8, 60u8, 207u8, + 165u8, 92u8, 123u8, 2u8, 64u8, 117u8, 154u8, 135u8, 252u8, 234u8, + 129u8, 159u8, 77u8, 38u8, 238u8, 220u8, 9u8, 88u8, 70u8, 200u8, 132u8, + 152u8, ], ) } - #[doc = " Minimum bond required to create a pool."] - #[doc = ""] - #[doc = " This is the amount that the depositor must put as their initial stake in the pool, as an"] - #[doc = " indication of \"skin in the game\"."] - #[doc = ""] - #[doc = " This is the value that will always exist in the staking ledger of the pool bonded account"] - #[doc = " while all other accounts leave."] - pub fn min_create_bond( + #[doc = " Mapping from historical session indices to session-data root hash and validator count."] + pub fn historical_sessions_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + (::subxt::utils::H256, ::core::primitive::u32), + (), (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "NominationPools", - "MinCreateBond", - vec![], + ::subxt::storage::address::Address::new_static( + "Historical", + "HistoricalSessions", + Vec::new(), [ - 31u8, 208u8, 240u8, 158u8, 23u8, 218u8, 212u8, 138u8, 92u8, 210u8, - 207u8, 170u8, 32u8, 60u8, 5u8, 21u8, 84u8, 162u8, 1u8, 111u8, 181u8, - 243u8, 24u8, 148u8, 193u8, 253u8, 248u8, 190u8, 16u8, 222u8, 219u8, - 67u8, + 219u8, 105u8, 245u8, 54u8, 143u8, 81u8, 56u8, 104u8, 60u8, 207u8, + 165u8, 92u8, 123u8, 2u8, 64u8, 117u8, 154u8, 135u8, 252u8, 234u8, + 129u8, 159u8, 77u8, 38u8, 238u8, 220u8, 9u8, 88u8, 70u8, 200u8, 132u8, + 152u8, ], ) } - #[doc = " Maximum number of nomination pools that can exist. If `None`, then an unbounded number of"] - #[doc = " pools can exist."] - pub fn max_pools( + #[doc = " The range of historical sessions we store. [first, last)"] + pub fn stored_range( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + (::core::primitive::u32, ::core::primitive::u32), ::subxt::storage::address::Yes, (), (), > { - ::subxt::storage::address::StaticStorageAddress::new( - "NominationPools", - "MaxPools", + ::subxt::storage::address::Address::new_static( + "Historical", + "StoredRange", vec![], [ - 216u8, 111u8, 68u8, 103u8, 33u8, 50u8, 109u8, 3u8, 176u8, 195u8, 23u8, - 73u8, 112u8, 138u8, 9u8, 194u8, 233u8, 73u8, 68u8, 215u8, 162u8, 255u8, - 217u8, 173u8, 141u8, 27u8, 72u8, 199u8, 7u8, 240u8, 25u8, 34u8, + 165u8, 141u8, 148u8, 255u8, 90u8, 168u8, 77u8, 150u8, 198u8, 127u8, + 227u8, 146u8, 107u8, 141u8, 43u8, 50u8, 190u8, 186u8, 45u8, 232u8, + 46u8, 95u8, 64u8, 155u8, 57u8, 82u8, 45u8, 255u8, 91u8, 109u8, 244u8, + 216u8, ], ) } - - #[doc = " Maximum number of members that can exist in the system. If `None`, then the count"] - #[doc = " members are not bound on a system wide basis."] - pub fn max_pool_members( + } + } + } + pub mod scheduler { + use super::{root_mod, runtime_types}; + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub type Error = runtime_types::pallet_scheduler::pallet::Error; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + 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 types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Schedule { + pub when: ::core::primitive::u32, + pub maybe_periodic: + ::core::option::Option<(::core::primitive::u32, ::core::primitive::u32)>, + pub priority: ::core::primitive::u8, + pub call: ::std::boxed::Box, + } + impl ::subxt::blocks::StaticExtrinsic for Schedule { + const CALL: &'static str = "schedule"; + const PALLET: &'static str = "Scheduler"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Cancel { + pub when: ::core::primitive::u32, + pub index: ::core::primitive::u32, + } + impl ::subxt::blocks::StaticExtrinsic for Cancel { + const CALL: &'static str = "cancel"; + const PALLET: &'static str = "Scheduler"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ScheduleNamed { + pub id: [::core::primitive::u8; 32usize], + pub when: ::core::primitive::u32, + pub maybe_periodic: + ::core::option::Option<(::core::primitive::u32, ::core::primitive::u32)>, + pub priority: ::core::primitive::u8, + pub call: ::std::boxed::Box, + } + impl ::subxt::blocks::StaticExtrinsic for ScheduleNamed { + const CALL: &'static str = "schedule_named"; + const PALLET: &'static str = "Scheduler"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct CancelNamed { + pub id: [::core::primitive::u8; 32usize], + } + impl ::subxt::blocks::StaticExtrinsic for CancelNamed { + const CALL: &'static str = "cancel_named"; + const PALLET: &'static str = "Scheduler"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ScheduleAfter { + pub after: ::core::primitive::u32, + pub maybe_periodic: + ::core::option::Option<(::core::primitive::u32, ::core::primitive::u32)>, + pub priority: ::core::primitive::u8, + pub call: ::std::boxed::Box, + } + impl ::subxt::blocks::StaticExtrinsic for ScheduleAfter { + const CALL: &'static str = "schedule_after"; + const PALLET: &'static str = "Scheduler"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ScheduleNamedAfter { + pub id: [::core::primitive::u8; 32usize], + pub after: ::core::primitive::u32, + pub maybe_periodic: + ::core::option::Option<(::core::primitive::u32, ::core::primitive::u32)>, + pub priority: ::core::primitive::u8, + pub call: ::std::boxed::Box, + } + impl ::subxt::blocks::StaticExtrinsic for ScheduleNamedAfter { + const CALL: &'static str = "schedule_named_after"; + const PALLET: &'static str = "Scheduler"; + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Anonymously schedule a task."] + pub fn schedule( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "NominationPools", - "MaxPoolMembers", - vec![], + when: ::core::primitive::u32, + maybe_periodic: ::core::option::Option<( + ::core::primitive::u32, + ::core::primitive::u32, + )>, + priority: ::core::primitive::u8, + call: runtime_types::da_runtime::RuntimeCall, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Scheduler", + "schedule", + types::Schedule { + when, + maybe_periodic, + priority, + call: ::std::boxed::Box::new(call), + }, [ - 82u8, 217u8, 26u8, 234u8, 223u8, 241u8, 66u8, 182u8, 43u8, 233u8, 59u8, - 242u8, 202u8, 254u8, 69u8, 50u8, 254u8, 196u8, 166u8, 89u8, 120u8, - 87u8, 76u8, 148u8, 31u8, 197u8, 49u8, 88u8, 206u8, 41u8, 242u8, 62u8, + 82u8, 177u8, 11u8, 16u8, 120u8, 185u8, 189u8, 223u8, 233u8, 65u8, + 249u8, 40u8, 213u8, 144u8, 243u8, 248u8, 81u8, 105u8, 250u8, 62u8, + 113u8, 21u8, 33u8, 161u8, 95u8, 117u8, 88u8, 66u8, 97u8, 14u8, 151u8, + 105u8, ], ) } - #[doc = " Maximum number of members that may belong to pool. If `None`, then the count of"] - #[doc = " members is not bound on a per pool basis."] - pub fn max_pool_members_per_pool( + #[doc = "Cancel an anonymously scheduled task."] + pub fn cancel( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "NominationPools", - "MaxPoolMembersPerPool", - vec![], + when: ::core::primitive::u32, + index: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Scheduler", + "cancel", + types::Cancel { when, index }, [ - 93u8, 241u8, 16u8, 169u8, 138u8, 199u8, 128u8, 149u8, 65u8, 30u8, 55u8, - 11u8, 41u8, 252u8, 83u8, 250u8, 9u8, 33u8, 152u8, 239u8, 195u8, 147u8, - 16u8, 248u8, 180u8, 153u8, 88u8, 231u8, 248u8, 169u8, 186u8, 48u8, + 32u8, 107u8, 14u8, 102u8, 56u8, 200u8, 68u8, 186u8, 192u8, 100u8, + 152u8, 124u8, 171u8, 154u8, 230u8, 115u8, 62u8, 140u8, 88u8, 178u8, + 119u8, 210u8, 222u8, 31u8, 134u8, 225u8, 133u8, 241u8, 42u8, 110u8, + 147u8, 47u8, ], ) } - #[doc = " Active members."] - #[doc = ""] - #[doc = " TWOX-NOTE: SAFE since `AccountId` is a secure hash."] - pub fn pool_members( + #[doc = "Schedule a named task."] + pub fn schedule_named( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_nomination_pools::PoolMember, - >, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "NominationPools", - "PoolMembers", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], + id: [::core::primitive::u8; 32usize], + when: ::core::primitive::u32, + maybe_periodic: ::core::option::Option<( + ::core::primitive::u32, + ::core::primitive::u32, + )>, + priority: ::core::primitive::u8, + call: runtime_types::da_runtime::RuntimeCall, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Scheduler", + "schedule_named", + types::ScheduleNamed { + id, + when, + maybe_periodic, + priority, + call: ::std::boxed::Box::new(call), + }, [ - 252u8, 236u8, 201u8, 127u8, 219u8, 1u8, 19u8, 144u8, 5u8, 108u8, 70u8, - 30u8, 177u8, 232u8, 253u8, 237u8, 211u8, 91u8, 63u8, 62u8, 155u8, - 151u8, 153u8, 165u8, 206u8, 53u8, 111u8, 31u8, 60u8, 120u8, 100u8, - 249u8, + 48u8, 84u8, 123u8, 185u8, 88u8, 202u8, 51u8, 158u8, 198u8, 151u8, + 111u8, 75u8, 48u8, 90u8, 226u8, 35u8, 195u8, 34u8, 39u8, 240u8, 74u8, + 15u8, 214u8, 238u8, 139u8, 28u8, 12u8, 24u8, 63u8, 119u8, 89u8, 85u8, ], ) } - #[doc = " Active members."] - #[doc = ""] - #[doc = " TWOX-NOTE: SAFE since `AccountId` is a secure hash."] - pub fn pool_members_root( + #[doc = "Cancel a named scheduled task."] + pub fn cancel_named( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_nomination_pools::PoolMember, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "NominationPools", - "PoolMembers", - Vec::new(), + id: [::core::primitive::u8; 32usize], + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Scheduler", + "cancel_named", + types::CancelNamed { id }, [ - 252u8, 236u8, 201u8, 127u8, 219u8, 1u8, 19u8, 144u8, 5u8, 108u8, 70u8, - 30u8, 177u8, 232u8, 253u8, 237u8, 211u8, 91u8, 63u8, 62u8, 155u8, - 151u8, 153u8, 165u8, 206u8, 53u8, 111u8, 31u8, 60u8, 120u8, 100u8, - 249u8, + 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 = "Counter for the related counted storage map"] - pub fn counter_for_pool_members( + #[doc = "Anonymously schedule a task after a delay."] + #[doc = ""] + #[doc = "# "] + #[doc = "Same as [`schedule`]."] + #[doc = "# "] + pub fn schedule_after( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "NominationPools", - "CounterForPoolMembers", - vec![], + after: ::core::primitive::u32, + maybe_periodic: ::core::option::Option<( + ::core::primitive::u32, + ::core::primitive::u32, + )>, + priority: ::core::primitive::u8, + call: runtime_types::da_runtime::RuntimeCall, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Scheduler", + "schedule_after", + types::ScheduleAfter { + after, + maybe_periodic, + priority, + call: ::std::boxed::Box::new(call), + }, [ - 114u8, 126u8, 27u8, 138u8, 119u8, 44u8, 45u8, 129u8, 84u8, 107u8, - 171u8, 206u8, 117u8, 141u8, 20u8, 75u8, 229u8, 237u8, 31u8, 229u8, - 124u8, 190u8, 27u8, 124u8, 63u8, 59u8, 167u8, 42u8, 62u8, 212u8, 160u8, - 2u8, + 45u8, 0u8, 103u8, 106u8, 172u8, 201u8, 173u8, 125u8, 73u8, 111u8, + 104u8, 186u8, 225u8, 13u8, 184u8, 22u8, 224u8, 175u8, 243u8, 26u8, 6u8, + 202u8, 168u8, 176u8, 214u8, 146u8, 168u8, 12u8, 254u8, 0u8, 70u8, 92u8, ], ) } - #[doc = " Storage for bonded pools."] - pub fn bonded_pools( + #[doc = "Schedule a named task after a delay."] + #[doc = ""] + #[doc = "# "] + #[doc = "Same as [`schedule_named`](Self::schedule_named)."] + #[doc = "# "] + pub fn schedule_named_after( &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_nomination_pools::BondedPoolInner, - >, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "NominationPools", - "BondedPools", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], + id: [::core::primitive::u8; 32usize], + after: ::core::primitive::u32, + maybe_periodic: ::core::option::Option<( + ::core::primitive::u32, + ::core::primitive::u32, + )>, + priority: ::core::primitive::u8, + call: runtime_types::da_runtime::RuntimeCall, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Scheduler", + "schedule_named_after", + types::ScheduleNamedAfter { + id, + after, + maybe_periodic, + priority, + call: ::std::boxed::Box::new(call), + }, [ - 34u8, 51u8, 86u8, 95u8, 237u8, 118u8, 40u8, 212u8, 128u8, 227u8, 113u8, - 6u8, 116u8, 28u8, 96u8, 223u8, 63u8, 249u8, 33u8, 152u8, 61u8, 7u8, - 205u8, 220u8, 221u8, 174u8, 207u8, 39u8, 53u8, 176u8, 13u8, 74u8, + 13u8, 150u8, 180u8, 1u8, 189u8, 230u8, 251u8, 242u8, 100u8, 148u8, + 38u8, 177u8, 200u8, 90u8, 97u8, 4u8, 213u8, 35u8, 23u8, 165u8, 229u8, + 248u8, 95u8, 132u8, 162u8, 173u8, 137u8, 67u8, 109u8, 75u8, 242u8, + 94u8, ], ) } - - #[doc = " Storage for bonded pools."] - pub fn bonded_pools_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_nomination_pools::BondedPoolInner, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "NominationPools", - "BondedPools", - Vec::new(), - [ - 34u8, 51u8, 86u8, 95u8, 237u8, 118u8, 40u8, 212u8, 128u8, 227u8, 113u8, - 6u8, 116u8, 28u8, 96u8, 223u8, 63u8, 249u8, 33u8, 152u8, 61u8, 7u8, - 205u8, 220u8, 221u8, 174u8, 207u8, 39u8, 53u8, 176u8, 13u8, 74u8, - ], - ) - } - - #[doc = "Counter for the related counted storage map"] - pub fn counter_for_bonded_pools( + } + } + #[doc = "Events type."] + pub type Event = runtime_types::pallet_scheduler::pallet::Event; + pub mod events { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Scheduled some task."] + pub struct Scheduled { + pub when: ::core::primitive::u32, + pub index: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for Scheduled { + const EVENT: &'static str = "Scheduled"; + const PALLET: &'static str = "Scheduler"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Canceled some task."] + pub struct Canceled { + pub when: ::core::primitive::u32, + pub index: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for Canceled { + const EVENT: &'static str = "Canceled"; + const PALLET: &'static str = "Scheduler"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Dispatched some task."] + pub struct Dispatched { + pub task: (::core::primitive::u32, ::core::primitive::u32), + pub id: ::core::option::Option<[::core::primitive::u8; 32usize]>, + pub result: ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + } + impl ::subxt::events::StaticEvent for Dispatched { + const EVENT: &'static str = "Dispatched"; + const PALLET: &'static str = "Scheduler"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "The call for the provided hash was not found so the task has been aborted."] + pub struct CallUnavailable { + pub task: (::core::primitive::u32, ::core::primitive::u32), + pub id: ::core::option::Option<[::core::primitive::u8; 32usize]>, + } + impl ::subxt::events::StaticEvent for CallUnavailable { + const EVENT: &'static str = "CallUnavailable"; + const PALLET: &'static str = "Scheduler"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "The given task was unable to be renewed since the agenda is full at that block."] + pub struct PeriodicFailed { + pub task: (::core::primitive::u32, ::core::primitive::u32), + pub id: ::core::option::Option<[::core::primitive::u8; 32usize]>, + } + impl ::subxt::events::StaticEvent for PeriodicFailed { + const EVENT: &'static str = "PeriodicFailed"; + const PALLET: &'static str = "Scheduler"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "The given task can never be executed since it is overweight."] + pub struct PermanentlyOverweight { + pub task: (::core::primitive::u32, ::core::primitive::u32), + pub id: ::core::option::Option<[::core::primitive::u8; 32usize]>, + } + impl ::subxt::events::StaticEvent for PermanentlyOverweight { + const EVENT: &'static str = "PermanentlyOverweight"; + const PALLET: &'static str = "Scheduler"; + } + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + pub fn incomplete_since( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, ::subxt::storage::address::Yes, (), + (), > { - ::subxt::storage::address::StaticStorageAddress::new( - "NominationPools", - "CounterForBondedPools", + ::subxt::storage::address::Address::new_static( + "Scheduler", + "IncompleteSince", vec![], [ - 134u8, 94u8, 199u8, 73u8, 174u8, 253u8, 66u8, 242u8, 233u8, 244u8, - 140u8, 170u8, 242u8, 40u8, 41u8, 185u8, 183u8, 151u8, 58u8, 111u8, - 221u8, 225u8, 81u8, 71u8, 169u8, 219u8, 223u8, 135u8, 8u8, 171u8, - 180u8, 236u8, + 250u8, 83u8, 64u8, 167u8, 205u8, 59u8, 225u8, 97u8, 205u8, 12u8, 76u8, + 130u8, 197u8, 4u8, 111u8, 208u8, 92u8, 217u8, 145u8, 119u8, 38u8, + 135u8, 1u8, 242u8, 228u8, 143u8, 56u8, 25u8, 115u8, 233u8, 227u8, 66u8, ], ) } - #[doc = " Reward pools. This is where there rewards for each pool accumulate. When a members payout"] - #[doc = " is claimed, the balance comes out fo the reward pool. Keyed by the bonded pools account."] - pub fn reward_pools( + #[doc = " Items to be executed, indexed by the block number that they should be executed on."] + pub fn agenda( &self, _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_nomination_pools::RewardPool, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::option::Option< + runtime_types::pallet_scheduler::Scheduled< + [::core::primitive::u8; 32usize], + runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::da_runtime::RuntimeCall, + >, + ::core::primitive::u32, + runtime_types::da_runtime::OriginCaller, + ::subxt::utils::AccountId32, + >, + >, >, ::subxt::storage::address::Yes, - (), + ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "NominationPools", - "RewardPools", - vec![::subxt::storage::address::StorageMapKey::new( + ::subxt::storage::address::Address::new_static( + "Scheduler", + "Agenda", + vec![::subxt::storage::address::make_static_storage_map_key( _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ - 139u8, 123u8, 46u8, 107u8, 9u8, 83u8, 141u8, 12u8, 188u8, 225u8, 170u8, - 215u8, 154u8, 21u8, 100u8, 95u8, 237u8, 245u8, 46u8, 216u8, 199u8, - 184u8, 187u8, 155u8, 8u8, 16u8, 34u8, 177u8, 153u8, 65u8, 109u8, 198u8, + 197u8, 7u8, 91u8, 13u8, 123u8, 168u8, 206u8, 127u8, 112u8, 147u8, + 206u8, 4u8, 237u8, 18u8, 133u8, 209u8, 100u8, 73u8, 1u8, 11u8, 57u8, + 57u8, 204u8, 79u8, 236u8, 125u8, 89u8, 44u8, 177u8, 153u8, 196u8, + 138u8, ], ) } - #[doc = " Reward pools. This is where there rewards for each pool accumulate. When a members payout"] - #[doc = " is claimed, the balance comes out fo the reward pool. Keyed by the bonded pools account."] - pub fn reward_pools_root( + #[doc = " Items to be executed, indexed by the block number that they should be executed on."] + pub fn agenda_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_nomination_pools::RewardPool, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::option::Option< + runtime_types::pallet_scheduler::Scheduled< + [::core::primitive::u8; 32usize], + runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::da_runtime::RuntimeCall, + >, + ::core::primitive::u32, + runtime_types::da_runtime::OriginCaller, + ::subxt::utils::AccountId32, + >, + >, >, (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "NominationPools", - "RewardPools", - Vec::new(), - [ - 139u8, 123u8, 46u8, 107u8, 9u8, 83u8, 141u8, 12u8, 188u8, 225u8, 170u8, - 215u8, 154u8, 21u8, 100u8, 95u8, 237u8, 245u8, 46u8, 216u8, 199u8, - 184u8, 187u8, 155u8, 8u8, 16u8, 34u8, 177u8, 153u8, 65u8, 109u8, 198u8, - ], - ) - } - - #[doc = "Counter for the related counted storage map"] - pub fn counter_for_reward_pools( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, - (), > { - ::subxt::storage::address::StaticStorageAddress::new( - "NominationPools", - "CounterForRewardPools", - vec![], + ::subxt::storage::address::Address::new_static( + "Scheduler", + "Agenda", + Vec::new(), [ - 209u8, 139u8, 212u8, 116u8, 210u8, 178u8, 213u8, 38u8, 75u8, 23u8, - 188u8, 57u8, 253u8, 213u8, 95u8, 118u8, 182u8, 250u8, 45u8, 205u8, - 17u8, 175u8, 17u8, 201u8, 234u8, 14u8, 98u8, 49u8, 143u8, 135u8, 201u8, - 81u8, + 197u8, 7u8, 91u8, 13u8, 123u8, 168u8, 206u8, 127u8, 112u8, 147u8, + 206u8, 4u8, 237u8, 18u8, 133u8, 209u8, 100u8, 73u8, 1u8, 11u8, 57u8, + 57u8, 204u8, 79u8, 236u8, 125u8, 89u8, 44u8, 177u8, 153u8, 196u8, + 138u8, ], ) } - #[doc = " Groups of unbonding pools. Each group of unbonding pools belongs to a bonded pool,"] - #[doc = " hence the name sub-pools. Keyed by the bonded pools account."] - pub fn sub_pools_storage( + #[doc = " Lookup from a name to the block number and index of the task."] + #[doc = ""] + #[doc = " For v3 -> v4 the previously unbounded identities are Blake2-256 hashed to form the v4"] + #[doc = " identities."] + pub fn lookup( &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_nomination_pools::SubPools, - >, + _0: impl ::std::borrow::Borrow<[::core::primitive::u8; 32usize]>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + (::core::primitive::u32, ::core::primitive::u32), ::subxt::storage::address::Yes, (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "NominationPools", - "SubPoolsStorage", - vec![::subxt::storage::address::StorageMapKey::new( + ::subxt::storage::address::Address::new_static( + "Scheduler", + "Lookup", + vec![::subxt::storage::address::make_static_storage_map_key( _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ - 231u8, 13u8, 111u8, 248u8, 1u8, 208u8, 179u8, 134u8, 224u8, 196u8, - 94u8, 201u8, 229u8, 29u8, 155u8, 211u8, 163u8, 150u8, 157u8, 34u8, - 68u8, 238u8, 55u8, 4u8, 222u8, 96u8, 186u8, 29u8, 205u8, 237u8, 80u8, - 42u8, + 157u8, 102u8, 210u8, 65u8, 190u8, 48u8, 168u8, 20u8, 197u8, 184u8, + 74u8, 119u8, 176u8, 22u8, 244u8, 186u8, 231u8, 239u8, 97u8, 175u8, + 34u8, 133u8, 165u8, 73u8, 223u8, 113u8, 78u8, 150u8, 83u8, 127u8, + 126u8, 204u8, ], ) } - #[doc = " Groups of unbonding pools. Each group of unbonding pools belongs to a bonded pool,"] - #[doc = " hence the name sub-pools. Keyed by the bonded pools account."] - pub fn sub_pools_storage_root( + #[doc = " Lookup from a name to the block number and index of the task."] + #[doc = ""] + #[doc = " For v3 -> v4 the previously unbounded identities are Blake2-256 hashed to form the v4"] + #[doc = " identities."] + pub fn lookup_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_nomination_pools::SubPools, - >, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + (::core::primitive::u32, ::core::primitive::u32), (), (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "NominationPools", - "SubPoolsStorage", + ::subxt::storage::address::Address::new_static( + "Scheduler", + "Lookup", Vec::new(), [ - 231u8, 13u8, 111u8, 248u8, 1u8, 208u8, 179u8, 134u8, 224u8, 196u8, - 94u8, 201u8, 229u8, 29u8, 155u8, 211u8, 163u8, 150u8, 157u8, 34u8, - 68u8, 238u8, 55u8, 4u8, 222u8, 96u8, 186u8, 29u8, 205u8, 237u8, 80u8, - 42u8, + 157u8, 102u8, 210u8, 65u8, 190u8, 48u8, 168u8, 20u8, 197u8, 184u8, + 74u8, 119u8, 176u8, 22u8, 244u8, 186u8, 231u8, 239u8, 97u8, 175u8, + 34u8, 133u8, 165u8, 73u8, 223u8, 113u8, 78u8, 150u8, 83u8, 127u8, + 126u8, 204u8, ], ) } - - #[doc = "Counter for the related counted storage map"] - pub fn counter_for_sub_pools_storage( + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The maximum weight that may be scheduled per block for any dispatchables."] + pub fn maximum_weight( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "NominationPools", - "CounterForSubPoolsStorage", - vec![], - [ - 212u8, 145u8, 212u8, 226u8, 234u8, 31u8, 26u8, 240u8, 107u8, 91u8, - 171u8, 120u8, 41u8, 195u8, 16u8, 86u8, 55u8, 127u8, 103u8, 93u8, 128u8, - 48u8, 69u8, 104u8, 168u8, 236u8, 81u8, 54u8, 2u8, 184u8, 215u8, 51u8, - ], - ) + ) -> ::subxt::constants::Address { + ::subxt::constants::Address::new_static("Scheduler", "MaximumWeight", [ + 222u8, 183u8, 203u8, 169u8, 31u8, 134u8, 28u8, 12u8, 47u8, 140u8, 71u8, + 74u8, 61u8, 55u8, 71u8, 236u8, 215u8, 83u8, 28u8, 70u8, 45u8, 128u8, 184u8, + 57u8, 101u8, 83u8, 42u8, 165u8, 34u8, 155u8, 64u8, 145u8, + ]) } - #[doc = " Metadata for the pool."] - pub fn metadata( + #[doc = " The maximum number of scheduled calls in the queue for a single block."] + pub fn max_scheduled_per_block( &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "NominationPools", - "Metadata", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], - [ - 108u8, 250u8, 163u8, 54u8, 192u8, 143u8, 239u8, 62u8, 97u8, 163u8, - 161u8, 215u8, 171u8, 225u8, 49u8, 18u8, 37u8, 200u8, 143u8, 254u8, - 136u8, 26u8, 54u8, 187u8, 39u8, 3u8, 216u8, 24u8, 188u8, 25u8, 243u8, - 251u8, - ], - ) - } - - #[doc = " Metadata for the pool."] - pub fn metadata_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - >, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "NominationPools", - "Metadata", - Vec::new(), - [ - 108u8, 250u8, 163u8, 54u8, 192u8, 143u8, 239u8, 62u8, 97u8, 163u8, - 161u8, 215u8, 171u8, 225u8, 49u8, 18u8, 37u8, 200u8, 143u8, 254u8, - 136u8, 26u8, 54u8, 187u8, 39u8, 3u8, 216u8, 24u8, 188u8, 25u8, 243u8, - 251u8, - ], - ) - } - - #[doc = "Counter for the related counted storage map"] - pub fn counter_for_metadata( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "NominationPools", - "CounterForMetadata", - vec![], - [ - 190u8, 232u8, 77u8, 134u8, 245u8, 89u8, 160u8, 187u8, 163u8, 68u8, - 188u8, 204u8, 31u8, 145u8, 219u8, 165u8, 213u8, 1u8, 167u8, 90u8, - 175u8, 218u8, 147u8, 144u8, 158u8, 226u8, 23u8, 233u8, 55u8, 168u8, - 161u8, 237u8, - ], - ) - } - - #[doc = " Ever increasing number of all pools created so far."] - pub fn last_pool_id( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "NominationPools", - "LastPoolId", - vec![], - [ - 50u8, 254u8, 218u8, 41u8, 213u8, 184u8, 170u8, 166u8, 31u8, 29u8, - 196u8, 57u8, 215u8, 20u8, 40u8, 40u8, 19u8, 22u8, 9u8, 184u8, 11u8, - 21u8, 21u8, 125u8, 97u8, 38u8, 219u8, 209u8, 2u8, 238u8, 247u8, 51u8, - ], - ) - } - - #[doc = " A reverse lookup from the pool's account id to its id."] - #[doc = ""] - #[doc = " This is only used for slashing. In all other instances, the pool id is used, and the"] - #[doc = " accounts are deterministically derived from it."] - pub fn reverse_pool_id_lookup( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "NominationPools", - "ReversePoolIdLookup", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], - [ - 178u8, 161u8, 51u8, 220u8, 128u8, 1u8, 135u8, 83u8, 236u8, 159u8, 36u8, - 237u8, 120u8, 128u8, 6u8, 191u8, 41u8, 159u8, 94u8, 178u8, 174u8, - 235u8, 221u8, 173u8, 44u8, 81u8, 211u8, 255u8, 231u8, 81u8, 16u8, 87u8, - ], - ) - } - - #[doc = " A reverse lookup from the pool's account id to its id."] - #[doc = ""] - #[doc = " This is only used for slashing. In all other instances, the pool id is used, and the"] - #[doc = " accounts are deterministically derived from it."] - pub fn reverse_pool_id_lookup_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "NominationPools", - "ReversePoolIdLookup", - Vec::new(), - [ - 178u8, 161u8, 51u8, 220u8, 128u8, 1u8, 135u8, 83u8, 236u8, 159u8, 36u8, - 237u8, 120u8, 128u8, 6u8, 191u8, 41u8, 159u8, 94u8, 178u8, 174u8, - 235u8, 221u8, 173u8, 44u8, 81u8, 211u8, 255u8, 231u8, 81u8, 16u8, 87u8, - ], - ) - } - - #[doc = "Counter for the related counted storage map"] - pub fn counter_for_reverse_pool_id_lookup( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "NominationPools", - "CounterForReversePoolIdLookup", - vec![], - [ - 148u8, 83u8, 81u8, 33u8, 188u8, 72u8, 148u8, 208u8, 245u8, 178u8, 52u8, - 245u8, 229u8, 140u8, 100u8, 152u8, 8u8, 217u8, 161u8, 80u8, 226u8, - 42u8, 15u8, 252u8, 90u8, 197u8, 120u8, 114u8, 144u8, 90u8, 199u8, - 123u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " The nomination pool's pallet id."] - pub fn pallet_id( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType, - > { - ::subxt::constants::StaticConstantAddress::new("NominationPools", "PalletId", [ - 139u8, 109u8, 228u8, 151u8, 252u8, 32u8, 130u8, 69u8, 112u8, 154u8, 174u8, - 45u8, 83u8, 245u8, 51u8, 132u8, 173u8, 5u8, 186u8, 24u8, 243u8, 9u8, 12u8, - 214u8, 80u8, 74u8, 69u8, 189u8, 30u8, 94u8, 22u8, 39u8, + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static("Scheduler", "MaxScheduledPerBlock", [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, 125u8, + 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, 178u8, 197u8, + 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, 145u8, ]) } - - #[doc = " The maximum pool points-to-balance ratio that an `open` pool can have."] - #[doc = ""] - #[doc = " This is important in the event slashing takes place and the pool's points-to-balance"] - #[doc = " ratio becomes disproportional."] - #[doc = ""] - #[doc = " Moreover, this relates to the `RewardCounter` type as well, as the arithmetic operations"] - #[doc = " are a function of number of points, and by setting this value to e.g. 10, you ensure"] - #[doc = " that the total number of points in the system are at most 10 times the total_issuance of"] - #[doc = " the chain, in the absolute worse case."] - #[doc = ""] - #[doc = " For a value of 10, the threshold would be a pool points-to-balance ratio of 10:1."] - #[doc = " Such a scenario would also be the equivalent of the pool being 90% slashed."] - pub fn max_points_to_balance( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u8>, - > { - ::subxt::constants::StaticConstantAddress::new( - "NominationPools", - "MaxPointsToBalance", - [ - 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 runtime_types { - use super::runtime_types; - pub mod da_control { - use super::runtime_types; - pub mod extensions { - use super::runtime_types; - pub mod check_app_id { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct CheckAppId(pub runtime_types::da_primitives::asdr::AppId); - } - } - pub mod pallet { + pub mod bounties { + use super::{root_mod, runtime_types}; + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub type Error = runtime_types::pallet_bounties::pallet::Error; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub type Call = runtime_types::pallet_bounties::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 :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - pub struct AppKeyInfo<_0> { - pub owner: _0, - pub id: runtime_types::da_primitives::asdr::AppId, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ProposeBounty { + #[codec(compact)] + pub value: ::core::primitive::u128, + pub description: ::std::vec::Vec<::core::primitive::u8>, + } + impl ::subxt::blocks::StaticExtrinsic for ProposeBounty { + const CALL: &'static str = "propose_bounty"; + const PALLET: &'static str = "Bounties"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "Creates an application key if `key` does not exist yet."] - create_application_key { - key: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - }, - #[codec(index = 1)] - submit_data { - data: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - }, - #[codec(index = 2)] - submit_block_length_proposal { - rows: ::core::primitive::u32, - cols: ::core::primitive::u32, - }, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ApproveBounty { + #[codec(compact)] + pub bounty_id: ::core::primitive::u32, + } + impl ::subxt::blocks::StaticExtrinsic for ApproveBounty { + const CALL: &'static str = "approve_bounty"; + const PALLET: &'static str = "Bounties"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "Error for the System pallet"] - pub enum Error { - #[codec(index = 0)] - #[doc = "The application key already exists."] - AppKeyAlreadyExists, - #[codec(index = 1)] - #[doc = "The application key is an empty string."] - AppKeyCannotBeEmpty, - #[codec(index = 2)] - #[doc = "The last application ID overflowed."] - LastAppIdOverflowed, - #[codec(index = 3)] - #[doc = "The submitted data is empty."] - DataCannotBeEmpty, - #[codec(index = 4)] - #[doc = "The last block length proposal Id overflowed."] - LastBlockLenProposalIdOverflowed, - #[codec(index = 5)] - #[doc = "The proposed block dimensions are out of bounds."] - BlockDimensionsOutOfBounds, - #[codec(index = 6)] - #[doc = "The proposed block dimensions are too small."] - BlockDimensionsTooSmall, - #[codec(index = 7)] - #[doc = "The request to reduce block dimensions was made in a non-empty block"] - InvalidBlockWeightReduction, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ProposeCurator { + #[codec(compact)] + pub bounty_id: ::core::primitive::u32, + pub curator: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + #[codec(compact)] + pub fee: ::core::primitive::u128, + } + impl ::subxt::blocks::StaticExtrinsic for ProposeCurator { + const CALL: &'static str = "propose_curator"; + const PALLET: &'static str = "Bounties"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "Event for the pallet."] - pub enum Event { - #[codec(index = 0)] - #[doc = "A new application key was created."] - ApplicationKeyCreated { - key: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - owner: ::subxt::utils::AccountId32, - id: runtime_types::da_primitives::asdr::AppId, - }, - #[codec(index = 1)] - DataSubmitted { - who: ::subxt::utils::AccountId32, - data: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - }, - #[codec(index = 2)] - BlockLengthProposalSubmitted { - rows: runtime_types::da_primitives::BlockLengthRows, - cols: runtime_types::da_primitives::BlockLengthColumns, - }, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct UnassignCurator { + #[codec(compact)] + pub bounty_id: ::core::primitive::u32, } - } - } - pub mod da_primitives { - use super::runtime_types; - pub mod asdr { - use super::runtime_types; - pub mod app_unchecked_extrinsic { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct AppUncheckedExtrinsic<_0, _1, _2, _3>( - pub ::std::vec::Vec<::core::primitive::u8>, - #[codec(skip)] pub ::core::marker::PhantomData<(_1, _0, _2, _3)>, - ); + impl ::subxt::blocks::StaticExtrinsic for UnassignCurator { + const CALL: &'static str = "unassign_curator"; + const PALLET: &'static str = "Bounties"; } - pub mod data_lookup { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Default, - Eq, - PartialEq, - serde :: Deserialize, - serde :: Serialize, - )] - pub struct DataLookup { - #[codec(compact)] - pub size: ::core::primitive::u32, - pub index: ::std::vec::Vec< - runtime_types::da_primitives::asdr::data_lookup::DataLookupIndexItem, - >, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - serde :: Deserialize, - serde :: Serialize, - )] - pub struct DataLookupIndexItem { - pub app_id: runtime_types::da_primitives::asdr::AppId, - #[codec(compact)] - pub start: ::core::primitive::u32, - } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct AcceptCurator { + #[codec(compact)] + pub bounty_id: ::core::primitive::u32, + } + impl ::subxt::blocks::StaticExtrinsic for AcceptCurator { + const CALL: &'static str = "accept_curator"; + const PALLET: &'static str = "Bounties"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, - Copy, Debug, - Default, Eq, PartialEq, - derive_more :: From, - serde :: Deserialize, - serde :: Serialize, )] - pub struct AppId(#[codec(compact)] pub ::core::primitive::u32); - } - pub mod header { - use super::runtime_types; - pub mod extension { - use super::runtime_types; - pub mod v1 { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Default, - Eq, - PartialEq, - serde :: Deserialize, - serde :: Serialize, - )] - pub struct HeaderExtension { - pub commitment: - runtime_types::da_primitives::kate_commitment::v1::KateCommitment, - pub app_lookup: - runtime_types::da_primitives::asdr::data_lookup::DataLookup, - } - } - pub mod v2 { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Default, - Eq, - PartialEq, - serde :: Deserialize, - serde :: Serialize, - )] - pub struct HeaderExtension { - pub commitment: - runtime_types::da_primitives::kate_commitment::v2::KateCommitment, - pub app_lookup: - runtime_types::da_primitives::asdr::data_lookup::DataLookup, - } - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - serde :: Deserialize, - serde :: Serialize, - )] - pub enum HeaderExtension { - #[codec(index = 0)] - V1(runtime_types::da_primitives::header::extension::v1::HeaderExtension), - #[codec(index = 1)] - V2(runtime_types::da_primitives::header::extension::v2::HeaderExtension), - } + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct AwardBounty { + #[codec(compact)] + pub bounty_id: ::core::primitive::u32, + pub beneficiary: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + } + impl ::subxt::blocks::StaticExtrinsic for AwardBounty { + const CALL: &'static str = "award_bounty"; + const PALLET: &'static str = "Bounties"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - pub struct Header<_0, _1> { - pub parent_hash: ::subxt::utils::H256, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ClaimBounty { #[codec(compact)] - pub number: _0, - pub state_root: ::subxt::utils::H256, - pub extrinsics_root: ::subxt::utils::H256, - pub digest: runtime_types::sp_runtime::generic::digest::Digest, - pub extension: runtime_types::da_primitives::header::extension::HeaderExtension, - #[codec(skip)] - pub __subxt_unused_type_params: ::core::marker::PhantomData<_1>, + pub bounty_id: ::core::primitive::u32, } - } - pub mod kate_commitment { - use super::runtime_types; - pub mod v1 { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Default, - Eq, - PartialEq, - serde :: Deserialize, - serde :: Serialize, - )] - #[serde(rename_all = "camelCase")] - pub struct KateCommitment { - #[codec(compact)] - pub rows: ::core::primitive::u16, - #[codec(compact)] - pub cols: ::core::primitive::u16, - pub data_root: ::subxt::utils::H256, - pub commitment: ::std::vec::Vec<::core::primitive::u8>, - } + impl ::subxt::blocks::StaticExtrinsic for ClaimBounty { + const CALL: &'static str = "claim_bounty"; + const PALLET: &'static str = "Bounties"; } - pub mod v2 { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Default, - Eq, - PartialEq, - serde :: Deserialize, - serde :: Serialize, - )] - pub struct KateCommitment { - #[codec(compact)] - pub rows: ::core::primitive::u16, - #[codec(compact)] - pub cols: ::core::primitive::u16, - pub data_root: ::core::option::Option<::subxt::utils::H256>, - pub commitment: ::std::vec::Vec<::core::primitive::u8>, - } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct CloseBounty { + #[codec(compact)] + pub bounty_id: ::core::primitive::u32, + } + impl ::subxt::blocks::StaticExtrinsic for CloseBounty { + const CALL: &'static str = "close_bounty"; + const PALLET: &'static str = "Bounties"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ExtendBountyExpiry { + #[codec(compact)] + pub bounty_id: ::core::primitive::u32, + pub remark: ::std::vec::Vec<::core::primitive::u8>, + } + impl ::subxt::blocks::StaticExtrinsic for ExtendBountyExpiry { + const CALL: &'static str = "extend_bounty_expiry"; + const PALLET: &'static str = "Bounties"; } } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct BlockLengthColumns(#[codec(compact)] pub ::core::primitive::u32); - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct BlockLengthRows(#[codec(compact)] pub ::core::primitive::u32); - } - pub mod da_runtime { - use super::runtime_types; - pub mod constants { - use super::runtime_types; - pub mod staking { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct NposSolution16 { - pub votes1: ::std::vec::Vec<( - ::subxt::ext::codec::Compact<::core::primitive::u32>, - ::subxt::ext::codec::Compact<::core::primitive::u16>, - )>, - pub votes2: ::std::vec::Vec<( - ::subxt::ext::codec::Compact<::core::primitive::u32>, - ( - ::subxt::ext::codec::Compact<::core::primitive::u16>, - ::subxt::ext::codec::Compact< - runtime_types::sp_arithmetic::per_things::PerU16, - >, - ), - ::subxt::ext::codec::Compact<::core::primitive::u16>, - )>, - pub votes3: ::std::vec::Vec<( - ::subxt::ext::codec::Compact<::core::primitive::u32>, - [( - ::subxt::ext::codec::Compact<::core::primitive::u16>, - ::subxt::ext::codec::Compact< - runtime_types::sp_arithmetic::per_things::PerU16, - >, - ); 2usize], - ::subxt::ext::codec::Compact<::core::primitive::u16>, - )>, - pub votes4: ::std::vec::Vec<( - ::subxt::ext::codec::Compact<::core::primitive::u32>, - [( - ::subxt::ext::codec::Compact<::core::primitive::u16>, - ::subxt::ext::codec::Compact< - runtime_types::sp_arithmetic::per_things::PerU16, - >, - ); 3usize], - ::subxt::ext::codec::Compact<::core::primitive::u16>, - )>, - pub votes5: ::std::vec::Vec<( - ::subxt::ext::codec::Compact<::core::primitive::u32>, - [( - ::subxt::ext::codec::Compact<::core::primitive::u16>, - ::subxt::ext::codec::Compact< - runtime_types::sp_arithmetic::per_things::PerU16, - >, - ); 4usize], - ::subxt::ext::codec::Compact<::core::primitive::u16>, - )>, - pub votes6: ::std::vec::Vec<( - ::subxt::ext::codec::Compact<::core::primitive::u32>, - [( - ::subxt::ext::codec::Compact<::core::primitive::u16>, - ::subxt::ext::codec::Compact< - runtime_types::sp_arithmetic::per_things::PerU16, - >, - ); 5usize], - ::subxt::ext::codec::Compact<::core::primitive::u16>, - )>, - pub votes7: ::std::vec::Vec<( - ::subxt::ext::codec::Compact<::core::primitive::u32>, - [( - ::subxt::ext::codec::Compact<::core::primitive::u16>, - ::subxt::ext::codec::Compact< - runtime_types::sp_arithmetic::per_things::PerU16, - >, - ); 6usize], - ::subxt::ext::codec::Compact<::core::primitive::u16>, - )>, - pub votes8: ::std::vec::Vec<( - ::subxt::ext::codec::Compact<::core::primitive::u32>, - [( - ::subxt::ext::codec::Compact<::core::primitive::u16>, - ::subxt::ext::codec::Compact< - runtime_types::sp_arithmetic::per_things::PerU16, - >, - ); 7usize], - ::subxt::ext::codec::Compact<::core::primitive::u16>, - )>, - pub votes9: ::std::vec::Vec<( - ::subxt::ext::codec::Compact<::core::primitive::u32>, - [( - ::subxt::ext::codec::Compact<::core::primitive::u16>, - ::subxt::ext::codec::Compact< - runtime_types::sp_arithmetic::per_things::PerU16, - >, - ); 8usize], - ::subxt::ext::codec::Compact<::core::primitive::u16>, - )>, - pub votes10: ::std::vec::Vec<( - ::subxt::ext::codec::Compact<::core::primitive::u32>, - [( - ::subxt::ext::codec::Compact<::core::primitive::u16>, - ::subxt::ext::codec::Compact< - runtime_types::sp_arithmetic::per_things::PerU16, - >, - ); 9usize], - ::subxt::ext::codec::Compact<::core::primitive::u16>, - )>, - pub votes11: ::std::vec::Vec<( - ::subxt::ext::codec::Compact<::core::primitive::u32>, - [( - ::subxt::ext::codec::Compact<::core::primitive::u16>, - ::subxt::ext::codec::Compact< - runtime_types::sp_arithmetic::per_things::PerU16, - >, - ); 10usize], - ::subxt::ext::codec::Compact<::core::primitive::u16>, - )>, - pub votes12: ::std::vec::Vec<( - ::subxt::ext::codec::Compact<::core::primitive::u32>, - [( - ::subxt::ext::codec::Compact<::core::primitive::u16>, - ::subxt::ext::codec::Compact< - runtime_types::sp_arithmetic::per_things::PerU16, - >, - ); 11usize], - ::subxt::ext::codec::Compact<::core::primitive::u16>, - )>, - pub votes13: ::std::vec::Vec<( - ::subxt::ext::codec::Compact<::core::primitive::u32>, - [( - ::subxt::ext::codec::Compact<::core::primitive::u16>, - ::subxt::ext::codec::Compact< - runtime_types::sp_arithmetic::per_things::PerU16, - >, - ); 12usize], - ::subxt::ext::codec::Compact<::core::primitive::u16>, - )>, - pub votes14: ::std::vec::Vec<( - ::subxt::ext::codec::Compact<::core::primitive::u32>, - [( - ::subxt::ext::codec::Compact<::core::primitive::u16>, - ::subxt::ext::codec::Compact< - runtime_types::sp_arithmetic::per_things::PerU16, - >, - ); 13usize], - ::subxt::ext::codec::Compact<::core::primitive::u16>, - )>, - pub votes15: ::std::vec::Vec<( - ::subxt::ext::codec::Compact<::core::primitive::u32>, - [( - ::subxt::ext::codec::Compact<::core::primitive::u16>, - ::subxt::ext::codec::Compact< - runtime_types::sp_arithmetic::per_things::PerU16, - >, - ); 14usize], - ::subxt::ext::codec::Compact<::core::primitive::u16>, - )>, - pub votes16: ::std::vec::Vec<( - ::subxt::ext::codec::Compact<::core::primitive::u32>, - [( - ::subxt::ext::codec::Compact<::core::primitive::u16>, - ::subxt::ext::codec::Compact< - runtime_types::sp_arithmetic::per_things::PerU16, - >, - ); 15usize], - ::subxt::ext::codec::Compact<::core::primitive::u16>, - )>, - } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Propose a new bounty."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "Payment: `TipReportDepositBase` will be reserved from the origin account, as well as"] + #[doc = "`DataDepositPerByte` for each byte in `reason`. It will be unreserved upon approval,"] + #[doc = "or slashed when rejected."] + #[doc = ""] + #[doc = "- `curator`: The curator account whom will manage this bounty."] + #[doc = "- `fee`: The curator fee."] + #[doc = "- `value`: The total payment amount of this bounty, curator fee included."] + #[doc = "- `description`: The description of this bounty."] + pub fn propose_bounty( + &self, + value: ::core::primitive::u128, + description: ::std::vec::Vec<::core::primitive::u8>, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Bounties", + "propose_bounty", + types::ProposeBounty { value, description }, + [ + 131u8, 169u8, 55u8, 102u8, 212u8, 139u8, 9u8, 65u8, 75u8, 112u8, 6u8, + 180u8, 92u8, 124u8, 43u8, 42u8, 38u8, 40u8, 226u8, 24u8, 28u8, 34u8, + 169u8, 220u8, 184u8, 206u8, 109u8, 227u8, 53u8, 228u8, 88u8, 25u8, + ], + ) } - } - pub mod primitives { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct SessionKeys { - pub babe: runtime_types::sp_consensus_babe::app::Public, - pub grandpa: runtime_types::sp_finality_grandpa::app::Public, - pub im_online: runtime_types::pallet_im_online::sr25519::app_sr25519::Public, - pub authority_discovery: runtime_types::sp_authority_discovery::app::Public, + + #[doc = "Approve a bounty proposal. At a later time, the bounty will be funded and become active"] + #[doc = "and the original deposit will be returned."] + #[doc = ""] + #[doc = "May only be called from `T::SpendOrigin`."] + #[doc = ""] + #[doc = "# "] + #[doc = "- O(1)."] + #[doc = "# "] + pub fn approve_bounty( + &self, + bounty_id: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Bounties", + "approve_bounty", + types::ApproveBounty { bounty_id }, + [ + 85u8, 12u8, 177u8, 91u8, 183u8, 124u8, 175u8, 148u8, 188u8, 200u8, + 237u8, 144u8, 6u8, 67u8, 159u8, 48u8, 177u8, 222u8, 183u8, 137u8, + 173u8, 131u8, 128u8, 219u8, 255u8, 243u8, 80u8, 224u8, 126u8, 136u8, + 90u8, 47u8, + ], + ) + } + + #[doc = "Assign a curator to a funded bounty."] + #[doc = ""] + #[doc = "May only be called from `T::SpendOrigin`."] + #[doc = ""] + #[doc = "# "] + #[doc = "- O(1)."] + #[doc = "# "] + pub fn propose_curator( + &self, + bounty_id: ::core::primitive::u32, + curator: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + fee: ::core::primitive::u128, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Bounties", + "propose_curator", + types::ProposeCurator { + bounty_id, + curator, + fee, + }, + [ + 71u8, 194u8, 107u8, 158u8, 153u8, 106u8, 130u8, 173u8, 57u8, 240u8, + 43u8, 213u8, 143u8, 48u8, 179u8, 254u8, 63u8, 190u8, 105u8, 52u8, + 127u8, 238u8, 84u8, 105u8, 41u8, 180u8, 25u8, 98u8, 215u8, 197u8, 61u8, + 72u8, + ], + ) + } + + #[doc = "Unassign curator from a bounty."] + #[doc = ""] + #[doc = "This function can only be called by the `RejectOrigin` a signed origin."] + #[doc = ""] + #[doc = "If this function is called by the `RejectOrigin`, we assume that the curator is"] + #[doc = "malicious or inactive. As a result, we will slash the curator when possible."] + #[doc = ""] + #[doc = "If the origin is the curator, we take this as a sign they are unable to do their job and"] + #[doc = "they willingly give up. We could slash them, but for now we allow them to recover their"] + #[doc = "deposit and exit without issue. (We may want to change this if it is abused.)"] + #[doc = ""] + #[doc = "Finally, the origin can be anyone if and only if the curator is \"inactive\". This allows"] + #[doc = "anyone in the community to call out that a curator is not doing their due diligence, and"] + #[doc = "we should pick a new curator. In this case the curator should also be slashed."] + #[doc = ""] + #[doc = "# "] + #[doc = "- O(1)."] + #[doc = "# "] + pub fn unassign_curator( + &self, + bounty_id: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Bounties", + "unassign_curator", + types::UnassignCurator { bounty_id }, + [ + 98u8, 94u8, 107u8, 111u8, 151u8, 182u8, 71u8, 239u8, 214u8, 88u8, + 108u8, 11u8, 51u8, 163u8, 102u8, 162u8, 245u8, 247u8, 244u8, 159u8, + 197u8, 23u8, 171u8, 6u8, 60u8, 146u8, 144u8, 101u8, 68u8, 133u8, 245u8, + 74u8, + ], + ) + } + + #[doc = "Accept the curator role for a bounty."] + #[doc = "A deposit will be reserved from curator and refund upon successful payout."] + #[doc = ""] + #[doc = "May only be called from the curator."] + #[doc = ""] + #[doc = "# "] + #[doc = "- O(1)."] + #[doc = "# "] + pub fn accept_curator( + &self, + bounty_id: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Bounties", + "accept_curator", + types::AcceptCurator { bounty_id }, + [ + 178u8, 142u8, 138u8, 15u8, 243u8, 10u8, 222u8, 169u8, 150u8, 200u8, + 85u8, 185u8, 39u8, 167u8, 134u8, 3u8, 186u8, 84u8, 43u8, 140u8, 11u8, + 70u8, 56u8, 197u8, 39u8, 84u8, 138u8, 139u8, 198u8, 104u8, 41u8, 238u8, + ], + ) + } + + #[doc = "Award bounty to a beneficiary account. The beneficiary will be able to claim the funds"] + #[doc = "after a delay."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be the curator of this bounty."] + #[doc = ""] + #[doc = "- `bounty_id`: Bounty ID to award."] + #[doc = "- `beneficiary`: The beneficiary account whom will receive the payout."] + #[doc = ""] + #[doc = "# "] + #[doc = "- O(1)."] + #[doc = "# "] + pub fn award_bounty( + &self, + bounty_id: ::core::primitive::u32, + beneficiary: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Bounties", + "award_bounty", + types::AwardBounty { + bounty_id, + beneficiary, + }, + [ + 69u8, 87u8, 233u8, 113u8, 45u8, 84u8, 104u8, 158u8, 128u8, 111u8, + 231u8, 80u8, 175u8, 226u8, 231u8, 61u8, 106u8, 6u8, 192u8, 208u8, + 128u8, 160u8, 75u8, 27u8, 190u8, 9u8, 191u8, 90u8, 219u8, 25u8, 129u8, + 244u8, + ], + ) + } + + #[doc = "Claim the payout from an awarded bounty after payout delay."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be the beneficiary of this bounty."] + #[doc = ""] + #[doc = "- `bounty_id`: Bounty ID to claim."] + #[doc = ""] + #[doc = "# "] + #[doc = "- O(1)."] + #[doc = "# "] + pub fn claim_bounty( + &self, + bounty_id: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Bounties", + "claim_bounty", + types::ClaimBounty { bounty_id }, + [ + 211u8, 143u8, 123u8, 205u8, 140u8, 43u8, 176u8, 103u8, 110u8, 125u8, + 158u8, 131u8, 103u8, 62u8, 69u8, 215u8, 220u8, 110u8, 11u8, 3u8, 30u8, + 193u8, 235u8, 177u8, 96u8, 241u8, 140u8, 53u8, 62u8, 133u8, 170u8, + 25u8, + ], + ) + } + + #[doc = "Cancel a proposed or active bounty. All the funds will be sent to treasury and"] + #[doc = "the curator deposit will be unreserved if possible."] + #[doc = ""] + #[doc = "Only `T::RejectOrigin` is able to cancel a bounty."] + #[doc = ""] + #[doc = "- `bounty_id`: Bounty ID to cancel."] + #[doc = ""] + #[doc = "# "] + #[doc = "- O(1)."] + #[doc = "# "] + pub fn close_bounty( + &self, + bounty_id: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Bounties", + "close_bounty", + types::CloseBounty { bounty_id }, + [ + 144u8, 234u8, 109u8, 39u8, 227u8, 231u8, 104u8, 48u8, 45u8, 196u8, + 217u8, 220u8, 241u8, 197u8, 157u8, 227u8, 154u8, 156u8, 181u8, 69u8, + 146u8, 77u8, 203u8, 167u8, 79u8, 102u8, 15u8, 253u8, 135u8, 53u8, 96u8, + 60u8, + ], + ) + } + + #[doc = "Extend the expiry time of an active bounty."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be the curator of this bounty."] + #[doc = ""] + #[doc = "- `bounty_id`: Bounty ID to extend."] + #[doc = "- `remark`: additional information."] + #[doc = ""] + #[doc = "# "] + #[doc = "- O(1)."] + #[doc = "# "] + pub fn extend_bounty_expiry( + &self, + bounty_id: ::core::primitive::u32, + remark: ::std::vec::Vec<::core::primitive::u8>, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Bounties", + "extend_bounty_expiry", + types::ExtendBountyExpiry { bounty_id, remark }, + [ + 102u8, 118u8, 89u8, 189u8, 138u8, 157u8, 216u8, 10u8, 239u8, 3u8, + 200u8, 217u8, 219u8, 19u8, 195u8, 182u8, 105u8, 220u8, 11u8, 146u8, + 222u8, 79u8, 95u8, 136u8, 188u8, 230u8, 248u8, 119u8, 30u8, 6u8, 242u8, + 194u8, + ], + ) } } + } + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub type Event = runtime_types::pallet_bounties::pallet::Event; + pub mod events { + use super::runtime_types; #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - pub enum OriginCaller { - #[codec(index = 0)] - system( - runtime_types::frame_support::dispatch::RawOrigin<::subxt::utils::AccountId32>, - ), - #[codec(index = 13)] - Council(runtime_types::pallet_collective::RawOrigin<::subxt::utils::AccountId32>), - #[codec(index = 14)] - TechnicalCommittee( - runtime_types::pallet_collective::RawOrigin<::subxt::utils::AccountId32>, - ), - #[codec(index = 3)] - Void(runtime_types::sp_core::Void), - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Runtime; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub enum RuntimeCall { - #[codec(index = 0)] - System(runtime_types::frame_system::pallet::Call), - #[codec(index = 1)] - Utility(runtime_types::pallet_utility::pallet::Call), - #[codec(index = 2)] - Babe(runtime_types::pallet_babe::pallet::Call), - #[codec(index = 3)] - Timestamp(runtime_types::pallet_timestamp::pallet::Call), - #[codec(index = 4)] - Authorship(runtime_types::pallet_authorship::pallet::Call), - #[codec(index = 5)] - Indices(runtime_types::pallet_indices::pallet::Call), - #[codec(index = 6)] - Balances(runtime_types::pallet_balances::pallet::Call), - #[codec(index = 9)] - ElectionProviderMultiPhase( - runtime_types::pallet_election_provider_multi_phase::pallet::Call, - ), - #[codec(index = 10)] - Staking(runtime_types::pallet_staking::pallet::pallet::Call), - #[codec(index = 11)] - Session(runtime_types::pallet_session::pallet::Call), - #[codec(index = 12)] - Democracy(runtime_types::pallet_democracy::pallet::Call), - #[codec(index = 13)] - Council(runtime_types::pallet_collective::pallet::Call), - #[codec(index = 14)] - TechnicalCommittee(runtime_types::pallet_collective::pallet::Call), - #[codec(index = 15)] - Elections(runtime_types::pallet_elections_phragmen::pallet::Call), - #[codec(index = 16)] - TechnicalMembership(runtime_types::pallet_membership::pallet::Call), - #[codec(index = 17)] - Grandpa(runtime_types::pallet_grandpa::pallet::Call), - #[codec(index = 18)] - Treasury(runtime_types::pallet_treasury::pallet::Call), - #[codec(index = 19)] - Sudo(runtime_types::pallet_sudo::pallet::Call), - #[codec(index = 20)] - ImOnline(runtime_types::pallet_im_online::pallet::Call), - #[codec(index = 24)] - Scheduler(runtime_types::pallet_scheduler::pallet::Call), - #[codec(index = 25)] - Bounties(runtime_types::pallet_bounties::pallet::Call), - #[codec(index = 26)] - Tips(runtime_types::pallet_tips::pallet::Call), - #[codec(index = 29)] - DataAvailability(runtime_types::da_control::pallet::Call), - #[codec(index = 30)] - NomadUpdaterManager(runtime_types::nomad_updater_manager::pallet::Call), - #[codec(index = 31)] - NomadHome(runtime_types::nomad_home::pallet::Call), - #[codec(index = 32)] - NomadDABridge(runtime_types::nomad_da_bridge::pallet::Call), - #[codec(index = 33)] - Preimage(runtime_types::pallet_preimage::pallet::Call), - #[codec(index = 34)] - Multisig(runtime_types::pallet_multisig::pallet::Call), - #[codec(index = 35)] - VoterList(runtime_types::pallet_bags_list::pallet::Call), - #[codec(index = 36)] - NominationPools(runtime_types::pallet_nomination_pools::pallet::Call), - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub enum RuntimeEvent { - #[codec(index = 0)] - System(runtime_types::frame_system::pallet::Event), - #[codec(index = 1)] - Utility(runtime_types::pallet_utility::pallet::Event), - #[codec(index = 5)] - Indices(runtime_types::pallet_indices::pallet::Event), - #[codec(index = 6)] - Balances(runtime_types::pallet_balances::pallet::Event), - #[codec(index = 7)] - TransactionPayment(runtime_types::pallet_transaction_payment::pallet::Event), - #[codec(index = 9)] - ElectionProviderMultiPhase( - runtime_types::pallet_election_provider_multi_phase::pallet::Event, - ), - #[codec(index = 10)] - Staking(runtime_types::pallet_staking::pallet::pallet::Event), - #[codec(index = 11)] - Session(runtime_types::pallet_session::pallet::Event), - #[codec(index = 12)] - Democracy(runtime_types::pallet_democracy::pallet::Event), - #[codec(index = 13)] - Council(runtime_types::pallet_collective::pallet::Event), - #[codec(index = 14)] - TechnicalCommittee(runtime_types::pallet_collective::pallet::Event), - #[codec(index = 15)] - Elections(runtime_types::pallet_elections_phragmen::pallet::Event), - #[codec(index = 16)] - TechnicalMembership(runtime_types::pallet_membership::pallet::Event), - #[codec(index = 17)] - Grandpa(runtime_types::pallet_grandpa::pallet::Event), - #[codec(index = 18)] - Treasury(runtime_types::pallet_treasury::pallet::Event), - #[codec(index = 19)] - Sudo(runtime_types::pallet_sudo::pallet::Event), - #[codec(index = 20)] - ImOnline(runtime_types::pallet_im_online::pallet::Event), - #[codec(index = 22)] - Offences(runtime_types::pallet_offences::pallet::Event), - #[codec(index = 24)] - Scheduler(runtime_types::pallet_scheduler::pallet::Event), - #[codec(index = 25)] - Bounties(runtime_types::pallet_bounties::pallet::Event), - #[codec(index = 26)] - Tips(runtime_types::pallet_tips::pallet::Event), - #[codec(index = 29)] - DataAvailability(runtime_types::da_control::pallet::Event), - #[codec(index = 30)] - NomadUpdaterManager(runtime_types::nomad_updater_manager::pallet::Event), - #[codec(index = 31)] - NomadHome(runtime_types::nomad_home::pallet::Event), - #[codec(index = 32)] - NomadDABridge(runtime_types::nomad_da_bridge::pallet::Event), - #[codec(index = 33)] - Preimage(runtime_types::pallet_preimage::pallet::Event), - #[codec(index = 34)] - Multisig(runtime_types::pallet_multisig::pallet::Event), - #[codec(index = 35)] - VoterList(runtime_types::pallet_bags_list::pallet::Event), - #[codec(index = 36)] - NominationPools(runtime_types::pallet_nomination_pools::pallet::Event), + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "New bounty proposal."] + pub struct BountyProposed { + pub index: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for BountyProposed { + const EVENT: &'static str = "BountyProposed"; + const PALLET: &'static str = "Bounties"; } - } - pub mod finality_grandpa { - use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - pub struct Equivocation<_0, _1, _2> { - pub round_number: ::core::primitive::u64, - pub identity: _0, - pub first: (_1, _2), - pub second: (_1, _2), + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A bounty proposal was rejected; funds were slashed."] + pub struct BountyRejected { + pub index: ::core::primitive::u32, + pub bond: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for BountyRejected { + const EVENT: &'static str = "BountyRejected"; + const PALLET: &'static str = "Bounties"; } #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - pub struct Precommit<_0, _1> { - pub target_hash: _0, - pub target_number: _1, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A bounty proposal is funded and became active."] + pub struct BountyBecameActive { + pub index: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for BountyBecameActive { + const EVENT: &'static str = "BountyBecameActive"; + const PALLET: &'static str = "Bounties"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - pub struct Prevote<_0, _1> { - pub target_hash: _0, - pub target_number: _1, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A bounty is awarded to a beneficiary."] + pub struct BountyAwarded { + pub index: ::core::primitive::u32, + pub beneficiary: ::subxt::utils::AccountId32, } - } - pub mod frame_support { - use super::runtime_types; - pub mod dispatch { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub enum DispatchClass { - #[codec(index = 0)] - Normal, - #[codec(index = 1)] - Operational, - #[codec(index = 2)] - Mandatory, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct DispatchInfo { - 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 :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub enum Pays { - #[codec(index = 0)] - Yes, - #[codec(index = 1)] - No, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct PerDispatchClass<_0> { - pub normal: _0, - pub operational: _0, - pub mandatory: _0, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub enum RawOrigin<_0> { - #[codec(index = 0)] - Root, - #[codec(index = 1)] - Signed(_0), - #[codec(index = 2)] - None, - } + impl ::subxt::events::StaticEvent for BountyAwarded { + const EVENT: &'static str = "BountyAwarded"; + const PALLET: &'static str = "Bounties"; } - pub mod traits { - use super::runtime_types; - pub mod misc { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct WrapperOpaque<_0>( - #[codec(compact)] pub ::core::primitive::u32, - pub _0, - ); - } - pub mod preimages { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub enum Bounded<_0> { - #[codec(index = 0)] - Legacy { - hash: ::subxt::utils::H256, - }, - #[codec(index = 1)] - Inline( - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - ), - #[codec(index = 2)] - Lookup { - hash: ::subxt::utils::H256, - len: ::core::primitive::u32, - }, - __Ignore(::core::marker::PhantomData<_0>), - } - } - pub mod tokens { - use super::runtime_types; - pub mod misc { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub enum BalanceStatus { - #[codec(index = 0)] - Free, - #[codec(index = 1)] - Reserved, - } - } - } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A bounty is claimed by beneficiary."] + pub struct BountyClaimed { + pub index: ::core::primitive::u32, + pub payout: ::core::primitive::u128, + pub beneficiary: ::subxt::utils::AccountId32, + } + impl ::subxt::events::StaticEvent for BountyClaimed { + const EVENT: &'static str = "BountyClaimed"; + const PALLET: &'static str = "Bounties"; } #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - pub struct PalletId(pub [::core::primitive::u8; 8usize]); + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A bounty is cancelled."] + pub struct BountyCanceled { + pub index: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for BountyCanceled { + const EVENT: &'static str = "BountyCanceled"; + const PALLET: &'static str = "Bounties"; + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A bounty expiry is extended."] + pub struct BountyExtended { + pub index: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for BountyExtended { + const EVENT: &'static str = "BountyExtended"; + const PALLET: &'static str = "Bounties"; + } } - pub mod frame_system { + pub mod storage { use super::runtime_types; - pub mod extensions { - use super::runtime_types; - pub mod check_genesis { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct CheckGenesis; + pub struct StorageApi; + impl StorageApi { + #[doc = " Number of bounty proposals that have been made."] + pub fn bounty_count( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "Bounties", + "BountyCount", + vec![], + [ + 120u8, 204u8, 26u8, 150u8, 37u8, 81u8, 43u8, 223u8, 180u8, 252u8, + 142u8, 144u8, 109u8, 5u8, 184u8, 72u8, 223u8, 230u8, 66u8, 196u8, 14u8, + 14u8, 164u8, 190u8, 246u8, 168u8, 190u8, 56u8, 212u8, 73u8, 175u8, + 26u8, + ], + ) } - pub mod check_mortality { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct CheckMortality(pub runtime_types::sp_runtime::generic::era::Era); + + #[doc = " Bounties that have been made."] + pub fn bounties( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_bounties::Bounty< + ::subxt::utils::AccountId32, + ::core::primitive::u128, + ::core::primitive::u32, + >, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Bounties", + "Bounties", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], + [ + 197u8, 26u8, 141u8, 98u8, 53u8, 123u8, 87u8, 219u8, 248u8, 200u8, + 207u8, 196u8, 211u8, 159u8, 124u8, 173u8, 143u8, 144u8, 85u8, 180u8, + 227u8, 24u8, 7u8, 52u8, 130u8, 98u8, 107u8, 145u8, 162u8, 55u8, 64u8, + 199u8, + ], + ) } - pub mod check_non_zero_sender { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct CheckNonZeroSender; + + #[doc = " Bounties that have been made."] + pub fn bounties_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_bounties::Bounty< + ::subxt::utils::AccountId32, + ::core::primitive::u128, + ::core::primitive::u32, + >, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Bounties", + "Bounties", + Vec::new(), + [ + 197u8, 26u8, 141u8, 98u8, 53u8, 123u8, 87u8, 219u8, 248u8, 200u8, + 207u8, 196u8, 211u8, 159u8, 124u8, 173u8, 143u8, 144u8, 85u8, 180u8, + 227u8, 24u8, 7u8, 52u8, 130u8, 98u8, 107u8, 145u8, 162u8, 55u8, 64u8, + 199u8, + ], + ) } - pub mod check_nonce { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct CheckNonce(#[codec(compact)] pub ::core::primitive::u32); + + #[doc = " The description of each bounty."] + pub fn bounty_descriptions( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::sp_core::bounded::bounded_vec::BoundedVec<::core::primitive::u8>, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Bounties", + "BountyDescriptions", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], + [ + 71u8, 40u8, 133u8, 84u8, 55u8, 207u8, 169u8, 189u8, 160u8, 51u8, 202u8, + 144u8, 15u8, 226u8, 97u8, 114u8, 54u8, 247u8, 53u8, 26u8, 36u8, 54u8, + 186u8, 163u8, 198u8, 100u8, 191u8, 121u8, 186u8, 160u8, 85u8, 97u8, + ], + ) } - pub mod check_spec_version { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct CheckSpecVersion; + + #[doc = " The description of each bounty."] + pub fn bounty_descriptions_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::sp_core::bounded::bounded_vec::BoundedVec<::core::primitive::u8>, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Bounties", + "BountyDescriptions", + Vec::new(), + [ + 71u8, 40u8, 133u8, 84u8, 55u8, 207u8, 169u8, 189u8, 160u8, 51u8, 202u8, + 144u8, 15u8, 226u8, 97u8, 114u8, 54u8, 247u8, 53u8, 26u8, 36u8, 54u8, + 186u8, 163u8, 198u8, 100u8, 191u8, 121u8, 186u8, 160u8, 85u8, 97u8, + ], + ) } - pub mod check_tx_version { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct CheckTxVersion; + + #[doc = " Bounty indices that have been approved but not yet funded."] + pub fn bounty_approvals( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u32, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "Bounties", + "BountyApprovals", + vec![], + [ + 182u8, 228u8, 0u8, 46u8, 176u8, 25u8, 222u8, 180u8, 51u8, 57u8, 14u8, + 0u8, 69u8, 160u8, 64u8, 27u8, 88u8, 29u8, 227u8, 146u8, 2u8, 121u8, + 27u8, 85u8, 45u8, 110u8, 244u8, 62u8, 134u8, 77u8, 175u8, 188u8, + ], + ) } - pub mod check_weight { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct CheckWeight; + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The amount held on deposit for placing a bounty proposal."] + pub fn bounty_deposit_base( + &self, + ) -> ::subxt::constants::Address<::core::primitive::u128> { + ::subxt::constants::Address::new_static("Bounties", "BountyDepositBase", [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, 136u8, + 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, + ]) + } + + #[doc = " The delay period for which a bounty beneficiary need to wait before claim the payout."] + pub fn bounty_deposit_payout_delay( + &self, + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "Bounties", + "BountyDepositPayoutDelay", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + + #[doc = " Bounty duration in blocks."] + pub fn bounty_update_period( + &self, + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static("Bounties", "BountyUpdatePeriod", [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, 125u8, + 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, 178u8, 197u8, + 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, 145u8, + ]) + } + + #[doc = " The curator deposit is calculated as a percentage of the curator fee."] + #[doc = ""] + #[doc = " This deposit has optional upper and lower bounds with `CuratorDepositMax` and"] + #[doc = " `CuratorDepositMin`."] + pub fn curator_deposit_multiplier( + &self, + ) -> ::subxt::constants::Address + { + ::subxt::constants::Address::new_static( + "Bounties", + "CuratorDepositMultiplier", + [ + 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 = " Maximum amount of funds that should be placed in a deposit for making a proposal."] + pub fn curator_deposit_max( + &self, + ) -> ::subxt::constants::Address<::core::option::Option<::core::primitive::u128>> { + ::subxt::constants::Address::new_static("Bounties", "CuratorDepositMax", [ + 198u8, 51u8, 89u8, 159u8, 124u8, 251u8, 51u8, 80u8, 167u8, 193u8, 44u8, + 199u8, 80u8, 36u8, 41u8, 130u8, 137u8, 229u8, 178u8, 208u8, 37u8, 215u8, + 169u8, 183u8, 180u8, 191u8, 140u8, 240u8, 250u8, 61u8, 42u8, 147u8, + ]) + } + + #[doc = " Minimum amount of funds that should be placed in a deposit for making a proposal."] + pub fn curator_deposit_min( + &self, + ) -> ::subxt::constants::Address<::core::option::Option<::core::primitive::u128>> { + ::subxt::constants::Address::new_static("Bounties", "CuratorDepositMin", [ + 198u8, 51u8, 89u8, 159u8, 124u8, 251u8, 51u8, 80u8, 167u8, 193u8, 44u8, + 199u8, 80u8, 36u8, 41u8, 130u8, 137u8, 229u8, 178u8, 208u8, 37u8, 215u8, + 169u8, 183u8, 180u8, 191u8, 140u8, 240u8, 250u8, 61u8, 42u8, 147u8, + ]) + } + + #[doc = " Minimum value for a bounty."] + pub fn bounty_value_minimum( + &self, + ) -> ::subxt::constants::Address<::core::primitive::u128> { + ::subxt::constants::Address::new_static("Bounties", "BountyValueMinimum", [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, 136u8, + 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, + ]) + } + + #[doc = " The amount held on deposit per byte within the tip report reason or bounty description."] + pub fn data_deposit_per_byte( + &self, + ) -> ::subxt::constants::Address<::core::primitive::u128> { + ::subxt::constants::Address::new_static("Bounties", "DataDepositPerByte", [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, 136u8, + 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, + ]) + } + + #[doc = " Maximum acceptable reason length."] + #[doc = ""] + #[doc = " Benchmarks depend on this value, be sure to update weights file when changing this value"] + pub fn maximum_reason_length( + &self, + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static("Bounties", "MaximumReasonLength", [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, 125u8, + 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, 178u8, 197u8, + 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, 145u8, + ]) } } - pub mod limits { + } + } + pub mod tips { + use super::{root_mod, runtime_types}; + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub type Error = runtime_types::pallet_tips::pallet::Error; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub type Call = runtime_types::pallet_tips::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 :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - pub struct BlockLength { - pub max: runtime_types::frame_support::dispatch::PerDispatchClass< + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ReportAwesome { + pub reason: ::std::vec::Vec<::core::primitive::u8>, + pub who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, ::core::primitive::u32, >, - pub cols: runtime_types::da_primitives::BlockLengthColumns, - pub rows: runtime_types::da_primitives::BlockLengthRows, - #[codec(compact)] - pub chunk_size: ::core::primitive::u32, + } + impl ::subxt::blocks::StaticExtrinsic for ReportAwesome { + const CALL: &'static str = "report_awesome"; + const PALLET: &'static str = "Tips"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - 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, - >, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct RetractTip { + pub hash: ::subxt::utils::H256, + } + impl ::subxt::blocks::StaticExtrinsic for RetractTip { + const CALL: &'static str = "retract_tip"; + const PALLET: &'static str = "Tips"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - 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, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct TipNew { + pub reason: ::std::vec::Vec<::core::primitive::u8>, + pub who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + #[codec(compact)] + pub tip_value: ::core::primitive::u128, + } + impl ::subxt::blocks::StaticExtrinsic for TipNew { + const CALL: &'static str = "tip_new"; + const PALLET: &'static str = "Tips"; } - } - pub mod pallet { - use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "Make some on-chain remark."] - #[doc = ""] - #[doc = "# "] - #[doc = "- `O(1)`"] - #[doc = "# "] - remark { - remark: ::std::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."] - #[doc = ""] - #[doc = "# "] - #[doc = "- `O(C + S)` where `C` length of `code` and `S` complexity of `can_set_code`"] - #[doc = "- 1 call to `can_set_code`: `O(S)` (calls `sp_io::misc::runtime_version` which is"] - #[doc = " expensive)."] - #[doc = "- 1 storage write (codec `O(C)`)."] - #[doc = "- 1 digest item."] - #[doc = "- 1 event."] - #[doc = "The weight of this function is dependent on the runtime, but generally this is very"] - #[doc = "expensive. We will treat this as a full block."] - #[doc = "# "] - set_code { - code: ::std::vec::Vec<::core::primitive::u8>, - }, - #[codec(index = 3)] - #[doc = "Set the new runtime code without doing any checks of the given `code`."] - #[doc = ""] - #[doc = "# "] - #[doc = "- `O(C)` where `C` length of `code`"] - #[doc = "- 1 storage write (codec `O(C)`)."] - #[doc = "- 1 digest item."] - #[doc = "- 1 event."] - #[doc = "The weight of this function is dependent on the runtime. We will treat this as a full"] - #[doc = "block. # "] - set_code_without_checks { - code: ::std::vec::Vec<::core::primitive::u8>, - }, - #[codec(index = 4)] - #[doc = "Set some items of storage."] - set_storage { - items: ::std::vec::Vec<( - ::std::vec::Vec<::core::primitive::u8>, - ::std::vec::Vec<::core::primitive::u8>, - )>, - }, - #[codec(index = 5)] - #[doc = "Kill some items from storage."] - kill_storage { - keys: ::std::vec::Vec<::std::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: ::std::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: ::std::vec::Vec<::core::primitive::u8>, - }, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Tip { + pub hash: ::subxt::utils::H256, + #[codec(compact)] + pub tip_value: ::core::primitive::u128, + } + impl ::subxt::blocks::StaticExtrinsic for Tip { + const CALL: &'static str = "tip"; + const PALLET: &'static str = "Tips"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[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 (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct CloseTip { + pub hash: ::subxt::utils::H256, + } + impl ::subxt::blocks::StaticExtrinsic for CloseTip { + const CALL: &'static str = "close_tip"; + const PALLET: &'static str = "Tips"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "Event for the System pallet."] - pub enum Event { - #[codec(index = 0)] - #[doc = "An extrinsic completed successfully."] - ExtrinsicSuccess { - dispatch_info: runtime_types::frame_support::dispatch::DispatchInfo, - }, - #[codec(index = 1)] - #[doc = "An extrinsic failed."] - ExtrinsicFailed { - dispatch_error: runtime_types::sp_runtime::DispatchError, - dispatch_info: runtime_types::frame_support::dispatch::DispatchInfo, - }, - #[codec(index = 2)] - #[doc = "`:code` was updated."] - CodeUpdated, - #[codec(index = 3)] - #[doc = "A new account was created."] - NewAccount { - account: ::subxt::utils::AccountId32, - }, - #[codec(index = 4)] - #[doc = "An account was reaped."] - KilledAccount { - account: ::subxt::utils::AccountId32, - }, - #[codec(index = 5)] - #[doc = "On on-chain remark happened."] - Remarked { - sender: ::subxt::utils::AccountId32, - hash: ::subxt::utils::H256, - }, - #[codec(index = 6)] - #[doc = "On on-chain remark happend called by Root."] - RemarkedByRoot { hash: ::subxt::utils::H256 }, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SlashTip { + pub hash: ::subxt::utils::H256, + } + impl ::subxt::blocks::StaticExtrinsic for SlashTip { + const CALL: &'static str = "slash_tip"; + const PALLET: &'static str = "Tips"; } } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct AccountInfo<_0, _1> { - pub nonce: _0, - pub consumers: _0, - pub providers: _0, - pub sufficients: _0, - pub data: _1, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct EventRecord<_0, _1> { - pub phase: runtime_types::frame_system::Phase, - pub event: _0, - pub topics: ::std::vec::Vec<_1>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct ExtrinsicLen { - pub raw: ::core::primitive::u32, - pub padded: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct LastRuntimeUpgradeInfo { - #[codec(compact)] - pub spec_version: ::core::primitive::u32, - pub spec_name: ::std::string::String, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub enum Phase { - #[codec(index = 0)] - ApplyExtrinsic(::core::primitive::u32), - #[codec(index = 1)] - Finalization, - #[codec(index = 2)] - Initialization, - } - } - pub mod nomad_base { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct NomadBase { - pub state: runtime_types::nomad_core::state::NomadState, - pub local_domain: ::core::primitive::u32, - pub committed_root: ::subxt::utils::H256, - pub updater: ::subxt::utils::H160, - } - } - pub mod nomad_core { - use super::runtime_types; - pub mod state { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub enum NomadState { - #[codec(index = 0)] - Active, - #[codec(index = 1)] - Failed, + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Report something `reason` that deserves a tip and claim any eventual the finder's fee."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "Payment: `TipReportDepositBase` will be reserved from the origin account, as well as"] + #[doc = "`DataDepositPerByte` for each byte in `reason`."] + #[doc = ""] + #[doc = "- `reason`: The reason for, or the thing that deserves, the tip; generally this will be"] + #[doc = " a UTF-8-encoded URL."] + #[doc = "- `who`: The account which should be credited for the tip."] + #[doc = ""] + #[doc = "Emits `NewTip` if successful."] + #[doc = ""] + #[doc = "# "] + #[doc = "- Complexity: `O(R)` where `R` length of `reason`."] + #[doc = " - encoding and hashing of 'reason'"] + #[doc = "- DbReads: `Reasons`, `Tips`"] + #[doc = "- DbWrites: `Reasons`, `Tips`"] + #[doc = "# "] + pub fn report_awesome( + &self, + reason: ::std::vec::Vec<::core::primitive::u8>, + who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Tips", + "report_awesome", + types::ReportAwesome { reason, who }, + [ + 162u8, 130u8, 216u8, 166u8, 87u8, 77u8, 47u8, 168u8, 146u8, 90u8, 39u8, + 41u8, 160u8, 144u8, 176u8, 42u8, 68u8, 112u8, 240u8, 144u8, 119u8, + 24u8, 69u8, 101u8, 240u8, 212u8, 170u8, 174u8, 155u8, 234u8, 184u8, + 232u8, + ], + ) } - } - pub mod update { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct SignedUpdate { - pub update: runtime_types::nomad_core::update::Update, - pub signature: runtime_types::nomad_signature::signature::Signature, + + #[doc = "Retract a prior tip-report from `report_awesome`, and cancel the process of tipping."] + #[doc = ""] + #[doc = "If successful, the original deposit will be unreserved."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the tip identified by `hash`"] + #[doc = "must have been reported by the signing account through `report_awesome` (and not"] + #[doc = "through `tip_new`)."] + #[doc = ""] + #[doc = "- `hash`: The identity of the open tip for which a tip value is declared. This is formed"] + #[doc = " as the hash of the tuple of the original tip `reason` and the beneficiary account ID."] + #[doc = ""] + #[doc = "Emits `TipRetracted` if successful."] + #[doc = ""] + #[doc = "# "] + #[doc = "- Complexity: `O(1)`"] + #[doc = " - Depends on the length of `T::Hash` which is fixed."] + #[doc = "- DbReads: `Tips`, `origin account`"] + #[doc = "- DbWrites: `Reasons`, `Tips`, `origin account`"] + #[doc = "# "] + pub fn retract_tip( + &self, + hash: ::subxt::utils::H256, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Tips", + "retract_tip", + types::RetractTip { hash }, + [ + 127u8, 232u8, 112u8, 136u8, 48u8, 227u8, 202u8, 51u8, 78u8, 191u8, + 248u8, 44u8, 159u8, 76u8, 101u8, 107u8, 212u8, 55u8, 85u8, 250u8, + 222u8, 181u8, 58u8, 130u8, 53u8, 103u8, 190u8, 31u8, 113u8, 195u8, + 186u8, 44u8, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Update { - pub home_domain: ::core::primitive::u32, - pub previous_root: ::subxt::utils::H256, - pub new_root: ::subxt::utils::H256, + + #[doc = "Give a tip for something new; no finder's fee will be taken."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the signing account must be a"] + #[doc = "member of the `Tippers` set."] + #[doc = ""] + #[doc = "- `reason`: The reason for, or the thing that deserves, the tip; generally this will be"] + #[doc = " a UTF-8-encoded URL."] + #[doc = "- `who`: The account which should be credited for the tip."] + #[doc = "- `tip_value`: The amount of tip that the sender would like to give. The median tip"] + #[doc = " value of active tippers will be given to the `who`."] + #[doc = ""] + #[doc = "Emits `NewTip` if successful."] + #[doc = ""] + #[doc = "# "] + #[doc = "- Complexity: `O(R + T)` where `R` length of `reason`, `T` is the number of tippers."] + #[doc = " - `O(T)`: decoding `Tipper` vec of length `T`. `T` is charged as upper bound given by"] + #[doc = " `ContainsLengthBound`. The actual cost depends on the implementation of"] + #[doc = " `T::Tippers`."] + #[doc = " - `O(R)`: hashing and encoding of reason of length `R`"] + #[doc = "- DbReads: `Tippers`, `Reasons`"] + #[doc = "- DbWrites: `Reasons`, `Tips`"] + #[doc = "# "] + pub fn tip_new( + &self, + reason: ::std::vec::Vec<::core::primitive::u8>, + who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + tip_value: ::core::primitive::u128, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Tips", + "tip_new", + types::TipNew { + reason, + who, + tip_value, + }, + [ + 236u8, 82u8, 15u8, 103u8, 143u8, 84u8, 161u8, 90u8, 120u8, 185u8, + 251u8, 212u8, 168u8, 2u8, 227u8, 63u8, 222u8, 171u8, 187u8, 137u8, + 177u8, 0u8, 119u8, 97u8, 72u8, 244u8, 31u8, 252u8, 29u8, 19u8, 225u8, + 5u8, + ], + ) + } + + #[doc = "Declare a tip value for an already-open tip."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the signing account must be a"] + #[doc = "member of the `Tippers` set."] + #[doc = ""] + #[doc = "- `hash`: The identity of the open tip for which a tip value is declared. This is formed"] + #[doc = " as the hash of the tuple of the hash of the original tip `reason` and the beneficiary"] + #[doc = " account ID."] + #[doc = "- `tip_value`: The amount of tip that the sender would like to give. The median tip"] + #[doc = " value of active tippers will be given to the `who`."] + #[doc = ""] + #[doc = "Emits `TipClosing` if the threshold of tippers has been reached and the countdown period"] + #[doc = "has started."] + #[doc = ""] + #[doc = "# "] + #[doc = "- Complexity: `O(T)` where `T` is the number of tippers. decoding `Tipper` vec of length"] + #[doc = " `T`, insert tip and check closing, `T` is charged as upper bound given by"] + #[doc = " `ContainsLengthBound`. The actual cost depends on the implementation of `T::Tippers`."] + #[doc = ""] + #[doc = " Actually weight could be lower as it depends on how many tips are in `OpenTip` but it"] + #[doc = " is weighted as if almost full i.e of length `T-1`."] + #[doc = "- DbReads: `Tippers`, `Tips`"] + #[doc = "- DbWrites: `Tips`"] + #[doc = "# "] + pub fn tip( + &self, + hash: ::subxt::utils::H256, + tip_value: ::core::primitive::u128, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Tips", + "tip", + types::Tip { hash, tip_value }, + [ + 241u8, 5u8, 164u8, 248u8, 140u8, 60u8, 29u8, 9u8, 63u8, 208u8, 249u8, + 210u8, 221u8, 173u8, 70u8, 240u8, 50u8, 131u8, 80u8, 236u8, 131u8, + 101u8, 191u8, 49u8, 94u8, 216u8, 74u8, 234u8, 184u8, 167u8, 159u8, + 176u8, + ], + ) + } + + #[doc = "Close and payout a tip."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "The tip identified by `hash` must have finished its countdown period."] + #[doc = ""] + #[doc = "- `hash`: The identity of the open tip for which a tip value is declared. This is formed"] + #[doc = " as the hash of the tuple of the original tip `reason` and the beneficiary account ID."] + #[doc = ""] + #[doc = "# "] + #[doc = "- Complexity: `O(T)` where `T` is the number of tippers. decoding `Tipper` vec of length"] + #[doc = " `T`. `T` is charged as upper bound given by `ContainsLengthBound`. The actual cost"] + #[doc = " depends on the implementation of `T::Tippers`."] + #[doc = "- DbReads: `Tips`, `Tippers`, `tip finder`"] + #[doc = "- DbWrites: `Reasons`, `Tips`, `Tippers`, `tip finder`"] + #[doc = "# "] + pub fn close_tip( + &self, + hash: ::subxt::utils::H256, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Tips", + "close_tip", + types::CloseTip { hash }, + [ + 85u8, 213u8, 248u8, 146u8, 90u8, 110u8, 217u8, 109u8, 78u8, 6u8, 104u8, + 71u8, 184u8, 209u8, 148u8, 81u8, 145u8, 71u8, 151u8, 174u8, 25u8, + 238u8, 48u8, 0u8, 51u8, 102u8, 155u8, 143u8, 130u8, 157u8, 100u8, + 246u8, + ], + ) + } + + #[doc = "Remove and slash an already-open tip."] + #[doc = ""] + #[doc = "May only be called from `T::RejectOrigin`."] + #[doc = ""] + #[doc = "As a result, the finder is slashed and the deposits are lost."] + #[doc = ""] + #[doc = "Emits `TipSlashed` if successful."] + #[doc = ""] + #[doc = "# "] + #[doc = " `T` is charged as upper bound given by `ContainsLengthBound`."] + #[doc = " The actual cost depends on the implementation of `T::Tippers`."] + #[doc = "# "] + pub fn slash_tip( + &self, + hash: ::subxt::utils::H256, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Tips", + "slash_tip", + types::SlashTip { hash }, + [ + 127u8, 21u8, 252u8, 189u8, 121u8, 103u8, 54u8, 155u8, 71u8, 81u8, + 109u8, 0u8, 159u8, 151u8, 62u8, 81u8, 104u8, 31u8, 2u8, 83u8, 248u8, + 141u8, 252u8, 162u8, 173u8, 189u8, 252u8, 249u8, 54u8, 142u8, 108u8, + 19u8, + ], + ) } } } - pub mod nomad_da_bridge { + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub type Event = runtime_types::pallet_tips::pallet::Event; + pub mod events { use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "Dispatch a data root message to the home if the header is valid."] - try_dispatch_data_root { - #[codec(compact)] - destination_domain: ::core::primitive::u32, - recipient_address: ::subxt::utils::H256, - header: ::std::boxed::Box< - runtime_types::da_primitives::header::Header< - ::core::primitive::u32, - runtime_types::sp_runtime::traits::BlakeTwo256, - >, - >, - }, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - InitializationError, - #[codec(index = 1)] - HashOfBlockNotMatchBlockNumber, - #[codec(index = 2)] - DABridgeMessageExceedsMaxMessageSize, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub enum Event { - #[codec(index = 0)] - DataRootDispatched { - destination_domain: ::core::primitive::u32, - recipient_address: ::subxt::utils::H256, - block_number: ::core::primitive::u32, - data_root: ::subxt::utils::H256, - }, - } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A new tip suggestion has been opened."] + pub struct NewTip { + pub tip_hash: ::subxt::utils::H256, } - } - pub mod nomad_home { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "Dispatch a message to the destination domain and recipient address."] - dispatch { - #[codec(compact)] - destination_domain: ::core::primitive::u32, - recipient_address: ::subxt::utils::H256, - message_body: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - }, - #[codec(index = 1)] - #[doc = "Verify/submit signed update."] - update { - signed_update: runtime_types::nomad_core::update::SignedUpdate, - #[codec(compact)] - max_index: ::core::primitive::u32, - }, - #[codec(index = 2)] - #[doc = "Verify/slash updater for improper update."] - improper_update { - signed_update: runtime_types::nomad_core::update::SignedUpdate, - }, - #[codec(index = 3)] - #[doc = "Set new updater on self as well as updater manager."] - #[doc = "Note: Not exposed as pallet call, will only be callable by the"] - #[doc = "GovernanceRouter pallet when implemented."] - set_updater { new_updater: ::subxt::utils::H160 }, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - InitializationError, - #[codec(index = 1)] - IngestionError, - #[codec(index = 2)] - SignatureRecoveryError, - #[codec(index = 3)] - MessageTooLarge, - #[codec(index = 4)] - InvalidUpdaterSignature, - #[codec(index = 5)] - CommittedRootNotMatchUpdatePrevious, - #[codec(index = 6)] - RootForIndexNotFound, - #[codec(index = 7)] - IndexForRootNotFound, - #[codec(index = 8)] - FailedState, - #[codec(index = 9)] - MaxIndexWitnessExhausted, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub enum Event { - #[codec(index = 0)] - Dispatch { - message_hash: ::subxt::utils::H256, - leaf_index: ::core::primitive::u32, - destination_and_nonce: ::core::primitive::u64, - committed_root: ::subxt::utils::H256, - message: ::std::vec::Vec<::core::primitive::u8>, - }, - #[codec(index = 1)] - Update { - home_domain: ::core::primitive::u32, - previous_root: ::subxt::utils::H256, - new_root: ::subxt::utils::H256, - signature: ::std::vec::Vec<::core::primitive::u8>, - }, - #[codec(index = 2)] - ImproperUpdate { - previous_root: ::subxt::utils::H256, - new_root: ::subxt::utils::H256, - signature: ::std::vec::Vec<::core::primitive::u8>, - }, - #[codec(index = 3)] - UpdaterSlashed { - updater: ::subxt::utils::H160, - reporter: ::subxt::utils::AccountId32, - }, - } + impl ::subxt::events::StaticEvent for NewTip { + const EVENT: &'static str = "NewTip"; + const PALLET: &'static str = "Tips"; } - } - pub mod nomad_merkle { - use super::runtime_types; - pub mod light { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct LightMerkle { - pub branch: [::subxt::utils::H256; 32usize], - pub count: ::core::primitive::u32, - } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A tip suggestion has reached threshold and is closing."] + pub struct TipClosing { + pub tip_hash: ::subxt::utils::H256, } - } - pub mod nomad_signature { - use super::runtime_types; - pub mod signature { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Signature { - pub r: runtime_types::primitive_types::U256, - pub s: runtime_types::primitive_types::U256, - pub v: ::core::primitive::u64, - } + impl ::subxt::events::StaticEvent for TipClosing { + const EVENT: &'static str = "TipClosing"; + const PALLET: &'static str = "Tips"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A tip suggestion has been closed."] + pub struct TipClosed { + pub tip_hash: ::subxt::utils::H256, + pub who: ::subxt::utils::AccountId32, + pub payout: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for TipClosed { + const EVENT: &'static str = "TipClosed"; + const PALLET: &'static str = "Tips"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A tip suggestion has been retracted."] + pub struct TipRetracted { + pub tip_hash: ::subxt::utils::H256, + } + impl ::subxt::events::StaticEvent for TipRetracted { + const EVENT: &'static str = "TipRetracted"; + const PALLET: &'static str = "Tips"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A tip suggestion has been slashed."] + pub struct TipSlashed { + pub tip_hash: ::subxt::utils::H256, + pub finder: ::subxt::utils::AccountId32, + pub deposit: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for TipSlashed { + const EVENT: &'static str = "TipSlashed"; + const PALLET: &'static str = "Tips"; } } - pub mod nomad_updater_manager { + pub mod storage { use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call {} - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - InitializationError, + pub struct StorageApi; + impl StorageApi { + #[doc = " TipsMap that are not yet completed. Keyed by the hash of `(reason, who)` from the value."] + #[doc = " This has the insecure enumerable hash function since the key itself is already"] + #[doc = " guaranteed to be a secure hash."] + pub fn tips( + &self, + _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_tips::OpenTip< + ::subxt::utils::AccountId32, + ::core::primitive::u128, + ::core::primitive::u32, + ::subxt::utils::H256, + >, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Tips", + "Tips", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], + [ + 173u8, 172u8, 116u8, 247u8, 202u8, 228u8, 47u8, 222u8, 67u8, 146u8, + 225u8, 0u8, 74u8, 189u8, 226u8, 206u8, 245u8, 209u8, 26u8, 49u8, 189u8, + 73u8, 20u8, 117u8, 30u8, 41u8, 129u8, 170u8, 5u8, 226u8, 92u8, 140u8, + ], + ) + } + + #[doc = " TipsMap that are not yet completed. Keyed by the hash of `(reason, who)` from the value."] + #[doc = " This has the insecure enumerable hash function since the key itself is already"] + #[doc = " guaranteed to be a secure hash."] + pub fn tips_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_tips::OpenTip< + ::subxt::utils::AccountId32, + ::core::primitive::u128, + ::core::primitive::u32, + ::subxt::utils::H256, + >, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static("Tips", "Tips", Vec::new(), [ + 173u8, 172u8, 116u8, 247u8, 202u8, 228u8, 47u8, 222u8, 67u8, 146u8, 225u8, + 0u8, 74u8, 189u8, 226u8, 206u8, 245u8, 209u8, 26u8, 49u8, 189u8, 73u8, + 20u8, 117u8, 30u8, 41u8, 129u8, 170u8, 5u8, 226u8, 92u8, 140u8, + ]) + } + + #[doc = " Simple preimage lookup from the reason's hash to the original data. Again, has an"] + #[doc = " insecure enumerable hash since the key is guaranteed to be the result of a secure hash."] + pub fn reasons( + &self, + _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec<::core::primitive::u8>, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Tips", + "Reasons", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], + [ + 212u8, 224u8, 153u8, 133u8, 234u8, 213u8, 134u8, 255u8, 59u8, 61u8, + 200u8, 47u8, 186u8, 177u8, 35u8, 108u8, 85u8, 144u8, 185u8, 69u8, + 159u8, 38u8, 83u8, 166u8, 200u8, 20u8, 220u8, 234u8, 59u8, 61u8, 223u8, + 167u8, + ], + ) + } + + #[doc = " Simple preimage lookup from the reason's hash to the original data. Again, has an"] + #[doc = " insecure enumerable hash since the key is guaranteed to be the result of a secure hash."] + pub fn reasons_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec<::core::primitive::u8>, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static("Tips", "Reasons", Vec::new(), [ + 212u8, 224u8, 153u8, 133u8, 234u8, 213u8, 134u8, 255u8, 59u8, 61u8, 200u8, + 47u8, 186u8, 177u8, 35u8, 108u8, 85u8, 144u8, 185u8, 69u8, 159u8, 38u8, + 83u8, 166u8, 200u8, 20u8, 220u8, 234u8, 59u8, 61u8, 223u8, 167u8, + ]) + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " Maximum acceptable reason length."] + #[doc = ""] + #[doc = " Benchmarks depend on this value, be sure to update weights file when changing this value"] + pub fn maximum_reason_length( + &self, + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static("Tips", "MaximumReasonLength", [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, 125u8, + 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, 178u8, 197u8, + 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, 145u8, + ]) + } + + #[doc = " The amount held on deposit per byte within the tip report reason or bounty description."] + pub fn data_deposit_per_byte( + &self, + ) -> ::subxt::constants::Address<::core::primitive::u128> { + ::subxt::constants::Address::new_static("Tips", "DataDepositPerByte", [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, 136u8, + 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, + ]) + } + + #[doc = " The period for which a tip remains open after is has achieved threshold tippers."] + pub fn tip_countdown(&self) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static("Tips", "TipCountdown", [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, 125u8, + 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, 178u8, 197u8, + 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, 145u8, + ]) + } + + #[doc = " The percent of the final tip which goes to the original reporter of the tip."] + pub fn tip_finders_fee( + &self, + ) -> ::subxt::constants::Address + { + ::subxt::constants::Address::new_static("Tips", "TipFindersFee", [ + 40u8, 171u8, 69u8, 196u8, 34u8, 184u8, 50u8, 128u8, 139u8, 192u8, 63u8, + 231u8, 249u8, 200u8, 252u8, 73u8, 244u8, 170u8, 51u8, 177u8, 106u8, 47u8, + 114u8, 234u8, 84u8, 104u8, 62u8, 118u8, 227u8, 50u8, 225u8, 122u8, + ]) + } + + #[doc = " The amount held on deposit for placing a tip report."] + pub fn tip_report_deposit_base( + &self, + ) -> ::subxt::constants::Address<::core::primitive::u128> { + ::subxt::constants::Address::new_static("Tips", "TipReportDepositBase", [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, 136u8, + 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, + ]) + } + } + } + } + pub mod mmr { + use super::{root_mod, runtime_types}; + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " Latest MMR Root hash."] + pub fn root_hash( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::subxt::utils::H256, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static("Mmr", "RootHash", vec![], [ + 111u8, 206u8, 173u8, 92u8, 67u8, 49u8, 150u8, 113u8, 90u8, 245u8, 38u8, + 254u8, 76u8, 250u8, 167u8, 66u8, 130u8, 129u8, 251u8, 220u8, 172u8, 229u8, + 162u8, 251u8, 36u8, 227u8, 43u8, 189u8, 7u8, 106u8, 23u8, 13u8, + ]) + } + + #[doc = " Current size of the MMR (number of leaves)."] + pub fn number_of_leaves( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u64, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "Mmr", + "NumberOfLeaves", + vec![], + [ + 123u8, 58u8, 149u8, 174u8, 85u8, 45u8, 20u8, 115u8, 241u8, 0u8, 51u8, + 174u8, 234u8, 60u8, 230u8, 59u8, 237u8, 144u8, 170u8, 32u8, 4u8, 0u8, + 34u8, 163u8, 238u8, 205u8, 93u8, 208u8, 53u8, 38u8, 141u8, 195u8, + ], + ) + } + + #[doc = " Hashes of the nodes in the MMR."] + #[doc = ""] + #[doc = " Note this collection only contains MMR peaks, the inner nodes (and leaves)"] + #[doc = " are pruned and only stored in the Offchain DB."] + pub fn nodes( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u64>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::subxt::utils::H256, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Mmr", + "Nodes", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], + [ + 27u8, 84u8, 41u8, 195u8, 146u8, 81u8, 211u8, 189u8, 63u8, 125u8, 173u8, + 206u8, 69u8, 198u8, 202u8, 213u8, 89u8, 31u8, 89u8, 177u8, 76u8, 154u8, + 249u8, 197u8, 133u8, 78u8, 142u8, 71u8, 183u8, 3u8, 132u8, 25u8, + ], + ) + } + + #[doc = " Hashes of the nodes in the MMR."] + #[doc = ""] + #[doc = " Note this collection only contains MMR peaks, the inner nodes (and leaves)"] + #[doc = " are pruned and only stored in the Offchain DB."] + pub fn nodes_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::subxt::utils::H256, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static("Mmr", "Nodes", Vec::new(), [ + 27u8, 84u8, 41u8, 195u8, 146u8, 81u8, 211u8, 189u8, 63u8, 125u8, 173u8, + 206u8, 69u8, 198u8, 202u8, 213u8, 89u8, 31u8, 89u8, 177u8, 76u8, 154u8, + 249u8, 197u8, 133u8, 78u8, 142u8, 71u8, 183u8, 3u8, 132u8, 25u8, + ]) } + } + } + } + pub mod data_availability { + use super::{root_mod, runtime_types}; + #[doc = "Error for the System pallet"] + pub type Error = runtime_types::da_control::pallet::Error; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub type Call = runtime_types::da_control::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 :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub enum Event { - #[codec(index = 0)] - NewUpdater { - old_updater: ::subxt::utils::H160, - new_updater: ::subxt::utils::H160, - }, - #[codec(index = 1)] - FakeSlashed { - reporter: ::subxt::utils::AccountId32, - }, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct CreateApplicationKey { + pub key: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + } + impl ::subxt::blocks::StaticExtrinsic for CreateApplicationKey { + const CALL: &'static str = "create_application_key"; + const PALLET: &'static str = "DataAvailability"; } - } - } - pub mod pallet_authorship { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "Provide a set of uncles."] - set_uncles { - new_uncles: ::std::vec::Vec< - runtime_types::da_primitives::header::Header< - ::core::primitive::u32, - runtime_types::sp_runtime::traits::BlakeTwo256, - >, - >, - }, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SubmitData { + pub data: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + } + impl ::subxt::blocks::StaticExtrinsic for SubmitData { + const CALL: &'static str = "submit_data"; + const PALLET: &'static str = "DataAvailability"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - #[doc = "The uncle parent not in the chain."] - InvalidUncleParent, - #[codec(index = 1)] - #[doc = "Uncles already set in the block."] - UnclesAlreadySet, - #[codec(index = 2)] - #[doc = "Too many uncles."] - TooManyUncles, - #[codec(index = 3)] - #[doc = "The uncle is genesis."] - GenesisUncle, - #[codec(index = 4)] - #[doc = "The uncle is too high in chain."] - TooHighUncle, - #[codec(index = 5)] - #[doc = "The uncle is already included."] - UncleAlreadyIncluded, - #[codec(index = 6)] - #[doc = "The uncle isn't recent enough to be included."] - OldUncle, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SubmitBlockLengthProposal { + pub rows: ::core::primitive::u32, + pub cols: ::core::primitive::u32, + } + impl ::subxt::blocks::StaticExtrinsic for SubmitBlockLengthProposal { + const CALL: &'static str = "submit_block_length_proposal"; + const PALLET: &'static str = "DataAvailability"; + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Creates an application key if `key` does not exist yet."] + pub fn create_application_key( + &self, + key: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "DataAvailability", + "create_application_key", + types::CreateApplicationKey { key }, + [ + 132u8, 36u8, 80u8, 95u8, 23u8, 239u8, 223u8, 190u8, 246u8, 23u8, 106u8, + 80u8, 3u8, 253u8, 211u8, 177u8, 188u8, 199u8, 230u8, 186u8, 200u8, + 127u8, 233u8, 250u8, 15u8, 179u8, 253u8, 110u8, 155u8, 159u8, 171u8, + 147u8, + ], + ) + } + + pub fn submit_data( + &self, + data: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "DataAvailability", + "submit_data", + types::SubmitData { data }, + [ + 34u8, 211u8, 42u8, 117u8, 145u8, 154u8, 101u8, 75u8, 90u8, 156u8, + 139u8, 245u8, 69u8, 219u8, 231u8, 206u8, 10u8, 66u8, 187u8, 60u8, + 167u8, 77u8, 182u8, 87u8, 237u8, 160u8, 128u8, 205u8, 250u8, 174u8, + 117u8, 123u8, + ], + ) + } + + pub fn submit_block_length_proposal( + &self, + rows: ::core::primitive::u32, + cols: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "DataAvailability", + "submit_block_length_proposal", + types::SubmitBlockLengthProposal { rows, cols }, + [ + 181u8, 219u8, 86u8, 153u8, 213u8, 170u8, 136u8, 226u8, 30u8, 205u8, + 69u8, 165u8, 9u8, 70u8, 242u8, 102u8, 150u8, 213u8, 158u8, 33u8, 201u8, + 108u8, 15u8, 88u8, 33u8, 113u8, 168u8, 0u8, 213u8, 196u8, 10u8, 81u8, + ], + ) } } + } + #[doc = "Event for the pallet."] + pub type Event = runtime_types::da_control::pallet::Event; + pub mod events { + use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - pub enum UncleEntryItem<_0, _1, _2> { - #[codec(index = 0)] - InclusionHeight(_0), - #[codec(index = 1)] - Uncle(_1, ::core::option::Option<_2>), + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A new application key was created."] + pub struct ApplicationKeyCreated { + pub key: + runtime_types::sp_core::bounded::bounded_vec::BoundedVec<::core::primitive::u8>, + pub owner: ::subxt::utils::AccountId32, + pub id: runtime_types::avail_core::AppId, + } + impl ::subxt::events::StaticEvent for ApplicationKeyCreated { + const EVENT: &'static str = "ApplicationKeyCreated"; + const PALLET: &'static str = "DataAvailability"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct DataSubmitted { + pub who: ::subxt::utils::AccountId32, + pub data: + runtime_types::sp_core::bounded::bounded_vec::BoundedVec<::core::primitive::u8>, + } + impl ::subxt::events::StaticEvent for DataSubmitted { + const EVENT: &'static str = "DataSubmitted"; + const PALLET: &'static str = "DataAvailability"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct BlockLengthProposalSubmitted { + pub rows: runtime_types::avail_core::BlockLengthRows, + pub cols: runtime_types::avail_core::BlockLengthColumns, + } + impl ::subxt::events::StaticEvent for BlockLengthProposalSubmitted { + const EVENT: &'static str = "BlockLengthProposalSubmitted"; + const PALLET: &'static str = "DataAvailability"; } } - pub mod pallet_babe { + pub mod storage { use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "Report authority equivocation/misbehavior. This method will verify"] - #[doc = "the equivocation proof and validate the given key ownership proof"] - #[doc = "against the extracted offender. If both are valid, the offence will"] - #[doc = "be reported."] - report_equivocation { - equivocation_proof: ::std::boxed::Box< - runtime_types::sp_consensus_slots::EquivocationProof< - runtime_types::da_primitives::header::Header< - ::core::primitive::u32, - runtime_types::sp_runtime::traits::BlakeTwo256, - >, - runtime_types::sp_consensus_babe::app::Public, - >, - >, - key_owner_proof: runtime_types::sp_session::MembershipProof, - }, - #[codec(index = 1)] - #[doc = "Report authority equivocation/misbehavior. This method will verify"] - #[doc = "the equivocation proof and validate the given key ownership proof"] - #[doc = "against the extracted offender. If both are valid, the offence will"] - #[doc = "be reported."] - #[doc = "This extrinsic must be called unsigned and it is expected that only"] - #[doc = "block authors will call it (validated in `ValidateUnsigned`), as such"] - #[doc = "if the block author is defined it will be defined as the equivocation"] - #[doc = "reporter."] - report_equivocation_unsigned { - equivocation_proof: ::std::boxed::Box< - runtime_types::sp_consensus_slots::EquivocationProof< - runtime_types::da_primitives::header::Header< - ::core::primitive::u32, - runtime_types::sp_runtime::traits::BlakeTwo256, - >, - runtime_types::sp_consensus_babe::app::Public, - >, + pub struct StorageApi; + impl StorageApi { + #[doc = " Last application ID"] + pub fn next_app_id( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::avail_core::AppId, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "DataAvailability", + "NextAppId", + vec![], + [ + 219u8, 175u8, 57u8, 18u8, 143u8, 3u8, 104u8, 185u8, 16u8, 203u8, 242u8, + 96u8, 101u8, 13u8, 78u8, 55u8, 86u8, 82u8, 206u8, 62u8, 9u8, 190u8, + 79u8, 84u8, 88u8, 232u8, 148u8, 190u8, 9u8, 124u8, 176u8, 164u8, + ], + ) + } + + #[doc = " Store all application keys."] + pub fn app_keys( + &self, + _0: impl ::std::borrow::Borrow< + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, >, - key_owner_proof: runtime_types::sp_session::MembershipProof, - }, - #[codec(index = 2)] - #[doc = "Plan an epoch config change. The epoch config change is recorded and will be enacted on"] - #[doc = "the next call to `enact_epoch_change`. The config will be activated one epoch after."] - #[doc = "Multiple calls to this method will replace any existing planned config change that had"] - #[doc = "not been enacted yet."] - plan_config_change { - config: runtime_types::sp_consensus_babe::digests::NextConfigDescriptor, - }, + >, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::da_control::pallet::AppKeyInfo<::subxt::utils::AccountId32>, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "DataAvailability", + "AppKeys", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], + [ + 225u8, 43u8, 37u8, 100u8, 192u8, 189u8, 228u8, 197u8, 252u8, 31u8, + 67u8, 94u8, 250u8, 213u8, 122u8, 209u8, 171u8, 193u8, 66u8, 243u8, + 212u8, 181u8, 203u8, 254u8, 221u8, 126u8, 189u8, 139u8, 66u8, 232u8, + 181u8, 108u8, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - #[doc = "An equivocation proof provided as part of an equivocation report is invalid."] - InvalidEquivocationProof, - #[codec(index = 1)] - #[doc = "A key ownership proof provided as part of an equivocation report is invalid."] - InvalidKeyOwnershipProof, - #[codec(index = 2)] - #[doc = "A given equivocation report is valid but already previously reported."] - DuplicateOffenceReport, - #[codec(index = 3)] - #[doc = "Submitted configuration is invalid."] - InvalidConfiguration, + + #[doc = " Store all application keys."] + pub fn app_keys_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::da_control::pallet::AppKeyInfo<::subxt::utils::AccountId32>, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "DataAvailability", + "AppKeys", + Vec::new(), + [ + 225u8, 43u8, 37u8, 100u8, 192u8, 189u8, 228u8, 197u8, 252u8, 31u8, + 67u8, 94u8, 250u8, 213u8, 122u8, 209u8, 171u8, 193u8, 66u8, 243u8, + 212u8, 181u8, 203u8, 254u8, 221u8, 126u8, 189u8, 139u8, 66u8, 232u8, + 181u8, 108u8, + ], + ) } } } - pub mod pallet_bags_list { + pub mod constants { use super::runtime_types; - pub mod list { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Bag { - pub head: ::core::option::Option<::subxt::utils::AccountId32>, - pub tail: ::core::option::Option<::subxt::utils::AccountId32>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub enum ListError { - #[codec(index = 0)] - Duplicate, - #[codec(index = 1)] - NotHeavier, - #[codec(index = 2)] - NotInSameBag, - #[codec(index = 3)] - NodeNotFound, + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The max length of application key."] + pub fn max_app_key_length( + &self, + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "DataAvailability", + "MaxAppKeyLength", + [ + 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 :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Node { - pub id: ::subxt::utils::AccountId32, - pub prev: ::core::option::Option<::subxt::utils::AccountId32>, - pub next: ::core::option::Option<::subxt::utils::AccountId32>, - pub bag_upper: ::core::primitive::u64, - pub score: ::core::primitive::u64, + + #[doc = " The max length of app data."] + pub fn max_app_data_length( + &self, + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( + "DataAvailability", + "MaxAppDataLength", + [ + 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 = " Minimum number of rows in a block."] + pub fn min_block_rows( + &self, + ) -> ::subxt::constants::Address { + ::subxt::constants::Address::new_static("DataAvailability", "MinBlockRows", [ + 65u8, 68u8, 180u8, 146u8, 16u8, 133u8, 230u8, 51u8, 17u8, 170u8, 88u8, + 49u8, 171u8, 96u8, 82u8, 152u8, 101u8, 63u8, 46u8, 141u8, 161u8, 104u8, + 204u8, 24u8, 1u8, 20u8, 116u8, 46u8, 232u8, 62u8, 223u8, 15u8, + ]) + } + + #[doc = " Maximum number of rows in a block."] + pub fn max_block_rows( + &self, + ) -> ::subxt::constants::Address { + ::subxt::constants::Address::new_static("DataAvailability", "MaxBlockRows", [ + 65u8, 68u8, 180u8, 146u8, 16u8, 133u8, 230u8, 51u8, 17u8, 170u8, 88u8, + 49u8, 171u8, 96u8, 82u8, 152u8, 101u8, 63u8, 46u8, 141u8, 161u8, 104u8, + 204u8, 24u8, 1u8, 20u8, 116u8, 46u8, 232u8, 62u8, 223u8, 15u8, + ]) + } + + #[doc = " Minimum number of cols in a block."] + pub fn min_block_cols( + &self, + ) -> ::subxt::constants::Address { + ::subxt::constants::Address::new_static("DataAvailability", "MinBlockCols", [ + 65u8, 68u8, 180u8, 146u8, 16u8, 133u8, 230u8, 51u8, 17u8, 170u8, 88u8, + 49u8, 171u8, 96u8, 82u8, 152u8, 101u8, 63u8, 46u8, 141u8, 161u8, 104u8, + 204u8, 24u8, 1u8, 20u8, 116u8, 46u8, 232u8, 62u8, 223u8, 15u8, + ]) + } + + #[doc = " Maximum number of cols in a block."] + pub fn max_block_cols( + &self, + ) -> ::subxt::constants::Address { + ::subxt::constants::Address::new_static("DataAvailability", "MaxBlockCols", [ + 65u8, 68u8, 180u8, 146u8, 16u8, 133u8, 230u8, 51u8, 17u8, 170u8, 88u8, + 49u8, 171u8, 96u8, 82u8, 152u8, 101u8, 63u8, 46u8, 141u8, 161u8, 104u8, + 204u8, 24u8, 1u8, 20u8, 116u8, 46u8, 232u8, 62u8, 223u8, 15u8, + ]) } } - pub mod pallet { + } + } + pub mod nomad_updater_manager { + use super::{root_mod, runtime_types}; + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub type Error = runtime_types::nomad_updater_manager::pallet::Error; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub type Call = runtime_types::nomad_updater_manager::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 struct TransactionApi; + impl TransactionApi {} + } + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub type Event = runtime_types::nomad_updater_manager::pallet::Event; + pub mod events { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct NewUpdater { + pub old_updater: ::subxt::utils::H160, + pub new_updater: ::subxt::utils::H160, + } + impl ::subxt::events::StaticEvent for NewUpdater { + const EVENT: &'static str = "NewUpdater"; + const PALLET: &'static str = "NomadUpdaterManager"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct FakeSlashed { + pub reporter: ::subxt::utils::AccountId32, + } + impl ::subxt::events::StaticEvent for FakeSlashed { + const EVENT: &'static str = "FakeSlashed"; + const PALLET: &'static str = "NomadUpdaterManager"; + } + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + pub fn updater( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::subxt::utils::H160, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "NomadUpdaterManager", + "Updater", + vec![], + [ + 97u8, 46u8, 26u8, 40u8, 198u8, 108u8, 164u8, 28u8, 138u8, 86u8, 248u8, + 90u8, 34u8, 68u8, 122u8, 144u8, 154u8, 236u8, 244u8, 219u8, 57u8, + 136u8, 163u8, 184u8, 201u8, 5u8, 132u8, 141u8, 114u8, 190u8, 138u8, + 204u8, + ], + ) + } + } + } + } + pub mod nomad_home { + use super::{root_mod, runtime_types}; + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub type Error = runtime_types::nomad_home::pallet::Error; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub type Call = runtime_types::nomad_home::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 :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "Declare that some `dislocated` account has, through rewards or penalties, sufficiently"] - #[doc = "changed its score that it should properly fall into a different bag than its current"] - #[doc = "one."] - #[doc = ""] - #[doc = "Anyone can call this function about any potentially dislocated account."] - #[doc = ""] - #[doc = "Will always update the stored score of `dislocated` to the correct score, based on"] - #[doc = "`ScoreProvider`."] - #[doc = ""] - #[doc = "If `dislocated` does not exists, it returns an error."] - rebag { - dislocated: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - }, - #[codec(index = 1)] - #[doc = "Move the caller's Id directly in front of `lighter`."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and can only be called by the Id of"] - #[doc = "the account going in front of `lighter`."] - #[doc = ""] - #[doc = "Only works if"] - #[doc = "- both nodes are within the same bag,"] - #[doc = "- and `origin` has a greater `Score` than `lighter`."] - put_in_front_of { - lighter: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - }, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Dispatch { + #[codec(compact)] + pub destination_domain: ::core::primitive::u32, + pub recipient_address: ::subxt::utils::H256, + pub message_body: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + } + impl ::subxt::blocks::StaticExtrinsic for Dispatch { + const CALL: &'static str = "dispatch"; + const PALLET: &'static str = "NomadHome"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - #[doc = "A error in the list interface implementation."] - List(runtime_types::pallet_bags_list::list::ListError), + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Update { + pub signed_update: runtime_types::nomad_core::update::SignedUpdate, + #[codec(compact)] + pub max_index: ::core::primitive::u32, + } + impl ::subxt::blocks::StaticExtrinsic for Update { + const CALL: &'static str = "update"; + const PALLET: &'static str = "NomadHome"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub enum Event { - #[codec(index = 0)] - #[doc = "Moved an account from one bag to another."] - Rebagged { - who: ::subxt::utils::AccountId32, - from: ::core::primitive::u64, - to: ::core::primitive::u64, - }, - #[codec(index = 1)] - #[doc = "Updated the score of some account to the given amount."] - ScoreUpdated { - who: ::subxt::utils::AccountId32, - new_score: ::core::primitive::u64, - }, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ImproperUpdate { + pub signed_update: runtime_types::nomad_core::update::SignedUpdate, + } + impl ::subxt::blocks::StaticExtrinsic for ImproperUpdate { + const CALL: &'static str = "improper_update"; + const PALLET: &'static str = "NomadHome"; } - } - } - pub mod pallet_balances { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "Transfer some liquid free balance to another account."] - #[doc = ""] - #[doc = "`transfer` will set the `FreeBalance` of the sender and receiver."] - #[doc = "If the sender's account is below the existential deposit as a result"] - #[doc = "of the transfer, the account will be reaped."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be `Signed` by the transactor."] - #[doc = ""] - #[doc = "# "] - #[doc = "- Dependent on arguments but not critical, given proper implementations for input config"] - #[doc = " types. See related functions below."] - #[doc = "- It contains a limited number of reads and writes internally and no complex"] - #[doc = " computation."] - #[doc = ""] - #[doc = "Related functions:"] - #[doc = ""] - #[doc = " - `ensure_can_withdraw` is always called internally but has a bounded complexity."] - #[doc = " - Transferring balances to accounts that did not exist before will cause"] - #[doc = " `T::OnNewAccount::on_new_account` to be called."] - #[doc = " - Removing enough funds from an account will trigger `T::DustRemoval::on_unbalanced`."] - #[doc = " - `transfer_keep_alive` works the same way as `transfer`, but has an additional check"] - #[doc = " that the transfer will not kill the origin account."] - #[doc = "---------------------------------"] - #[doc = "- Origin account is already in memory, so no DB operations for them."] - #[doc = "# "] - transfer { - dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - #[codec(compact)] - value: ::core::primitive::u128, - }, - #[codec(index = 1)] - #[doc = "Set the balances of a given account."] - #[doc = ""] - #[doc = "This will alter `FreeBalance` and `ReservedBalance` in storage. it will"] - #[doc = "also alter the total issuance of the system (`TotalIssuance`) appropriately."] - #[doc = "If the new free or reserved balance is below the existential deposit,"] - #[doc = "it will reset the account nonce (`frame_system::AccountNonce`)."] - #[doc = ""] - #[doc = "The dispatch origin for this call is `root`."] - set_balance { - who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - #[codec(compact)] - new_free: ::core::primitive::u128, - #[codec(compact)] - new_reserved: ::core::primitive::u128, - }, - #[codec(index = 2)] - #[doc = "Exactly as `transfer`, except the origin must be root and the source account may be"] - #[doc = "specified."] - #[doc = "# "] - #[doc = "- Same as transfer, but additional read and write because the source account is not"] - #[doc = " assumed to be in the overlay."] - #[doc = "# "] - force_transfer { - source: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - #[codec(compact)] - value: ::core::primitive::u128, - }, - #[codec(index = 3)] - #[doc = "Same as the [`transfer`] call, but with a check that the transfer will not kill the"] - #[doc = "origin account."] - #[doc = ""] - #[doc = "99% of the time you want [`transfer`] instead."] - #[doc = ""] - #[doc = "[`transfer`]: struct.Pallet.html#method.transfer"] - transfer_keep_alive { - dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - #[codec(compact)] - value: ::core::primitive::u128, - }, - #[codec(index = 4)] - #[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). # "] - #[doc = "- O(1). Just like transfer, but reading the user's transferable balance first."] - #[doc = " #"] - transfer_all { - dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - keep_alive: ::core::primitive::bool, - }, - #[codec(index = 5)] - #[doc = "Unreserve some balance from a user by force."] - #[doc = ""] - #[doc = "Can only be called by ROOT."] - force_unreserve { - who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - amount: ::core::primitive::u128, - }, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - #[doc = "Vesting balance too high to send value"] - VestingBalance, - #[codec(index = 1)] - #[doc = "Account liquidity restrictions prevent withdrawal"] - LiquidityRestrictions, - #[codec(index = 2)] - #[doc = "Balance too low to send value."] - InsufficientBalance, - #[codec(index = 3)] - #[doc = "Value too low to create account due to existential deposit"] - ExistentialDeposit, - #[codec(index = 4)] - #[doc = "Transfer/payment would kill account"] - KeepAlive, - #[codec(index = 5)] - #[doc = "A vesting schedule already exists for this account"] - ExistingVestingSchedule, - #[codec(index = 6)] - #[doc = "Beneficiary account must pre-exist"] - DeadAccount, - #[codec(index = 7)] - #[doc = "Number of named reserves exceed MaxReserves"] - TooManyReserves, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetUpdater { + pub new_updater: ::subxt::utils::H160, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub enum Event { - #[codec(index = 0)] - #[doc = "An account was created with some free balance."] - Endowed { - account: ::subxt::utils::AccountId32, - free_balance: ::core::primitive::u128, - }, - #[codec(index = 1)] - #[doc = "An account was removed whose balance was non-zero but below ExistentialDeposit,"] - #[doc = "resulting in an outright loss."] - DustLost { - account: ::subxt::utils::AccountId32, - amount: ::core::primitive::u128, - }, - #[codec(index = 2)] - #[doc = "Transfer succeeded."] - Transfer { - from: ::subxt::utils::AccountId32, - to: ::subxt::utils::AccountId32, - amount: ::core::primitive::u128, - }, - #[codec(index = 3)] - #[doc = "A balance was set by root."] - BalanceSet { - who: ::subxt::utils::AccountId32, - free: ::core::primitive::u128, - reserved: ::core::primitive::u128, - }, - #[codec(index = 4)] - #[doc = "Some balance was reserved (moved from free to reserved)."] - Reserved { - who: ::subxt::utils::AccountId32, - amount: ::core::primitive::u128, - }, - #[codec(index = 5)] - #[doc = "Some balance was unreserved (moved from reserved to free)."] - Unreserved { - who: ::subxt::utils::AccountId32, - amount: ::core::primitive::u128, - }, - #[codec(index = 6)] - #[doc = "Some balance was moved from the reserve of the first account to the second account."] - #[doc = "Final argument indicates the destination balance type."] - ReserveRepatriated { - from: ::subxt::utils::AccountId32, - to: ::subxt::utils::AccountId32, - amount: ::core::primitive::u128, - destination_status: - runtime_types::frame_support::traits::tokens::misc::BalanceStatus, - }, - #[codec(index = 7)] - #[doc = "Some amount was deposited (e.g. for transaction fees)."] - Deposit { - who: ::subxt::utils::AccountId32, - amount: ::core::primitive::u128, - }, - #[codec(index = 8)] - #[doc = "Some amount was withdrawn from the account (e.g. for transaction fees)."] - Withdraw { - who: ::subxt::utils::AccountId32, - amount: ::core::primitive::u128, - }, - #[codec(index = 9)] - #[doc = "Some amount was removed from the account (e.g. for misbehavior)."] - Slashed { - who: ::subxt::utils::AccountId32, - amount: ::core::primitive::u128, - }, + impl ::subxt::blocks::StaticExtrinsic for SetUpdater { + const CALL: &'static str = "set_updater"; + const PALLET: &'static str = "NomadHome"; } } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct AccountData<_0> { - pub free: _0, - pub reserved: _0, - pub misc_frozen: _0, - pub fee_frozen: _0, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct BalanceLock<_0> { - pub id: [::core::primitive::u8; 8usize], - pub amount: _0, - pub reasons: runtime_types::pallet_balances::Reasons, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub enum Reasons { - #[codec(index = 0)] - Fee, - #[codec(index = 1)] - Misc, - #[codec(index = 2)] - All, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct ReserveData<_0, _1> { - pub id: _0, - pub amount: _1, - } - } - pub mod pallet_bounties { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "Propose a new bounty."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - #[doc = ""] - #[doc = "Payment: `TipReportDepositBase` will be reserved from the origin account, as well as"] - #[doc = "`DataDepositPerByte` for each byte in `reason`. It will be unreserved upon approval,"] - #[doc = "or slashed when rejected."] - #[doc = ""] - #[doc = "- `curator`: The curator account whom will manage this bounty."] - #[doc = "- `fee`: The curator fee."] - #[doc = "- `value`: The total payment amount of this bounty, curator fee included."] - #[doc = "- `description`: The description of this bounty."] - propose_bounty { - #[codec(compact)] - value: ::core::primitive::u128, - description: ::std::vec::Vec<::core::primitive::u8>, - }, - #[codec(index = 1)] - #[doc = "Approve a bounty proposal. At a later time, the bounty will be funded and become active"] - #[doc = "and the original deposit will be returned."] - #[doc = ""] - #[doc = "May only be called from `T::SpendOrigin`."] - #[doc = ""] - #[doc = "# "] - #[doc = "- O(1)."] - #[doc = "# "] - approve_bounty { - #[codec(compact)] - bounty_id: ::core::primitive::u32, - }, - #[codec(index = 2)] - #[doc = "Assign a curator to a funded bounty."] - #[doc = ""] - #[doc = "May only be called from `T::SpendOrigin`."] - #[doc = ""] - #[doc = "# "] - #[doc = "- O(1)."] - #[doc = "# "] - propose_curator { - #[codec(compact)] - bounty_id: ::core::primitive::u32, - curator: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - #[codec(compact)] - fee: ::core::primitive::u128, - }, - #[codec(index = 3)] - #[doc = "Unassign curator from a bounty."] - #[doc = ""] - #[doc = "This function can only be called by the `RejectOrigin` a signed origin."] - #[doc = ""] - #[doc = "If this function is called by the `RejectOrigin`, we assume that the curator is"] - #[doc = "malicious or inactive. As a result, we will slash the curator when possible."] - #[doc = ""] - #[doc = "If the origin is the curator, we take this as a sign they are unable to do their job and"] - #[doc = "they willingly give up. We could slash them, but for now we allow them to recover their"] - #[doc = "deposit and exit without issue. (We may want to change this if it is abused.)"] - #[doc = ""] - #[doc = "Finally, the origin can be anyone if and only if the curator is \"inactive\". This allows"] - #[doc = "anyone in the community to call out that a curator is not doing their due diligence, and"] - #[doc = "we should pick a new curator. In this case the curator should also be slashed."] - #[doc = ""] - #[doc = "# "] - #[doc = "- O(1)."] - #[doc = "# "] - unassign_curator { - #[codec(compact)] - bounty_id: ::core::primitive::u32, - }, - #[codec(index = 4)] - #[doc = "Accept the curator role for a bounty."] - #[doc = "A deposit will be reserved from curator and refund upon successful payout."] - #[doc = ""] - #[doc = "May only be called from the curator."] - #[doc = ""] - #[doc = "# "] - #[doc = "- O(1)."] - #[doc = "# "] - accept_curator { - #[codec(compact)] - bounty_id: ::core::primitive::u32, - }, - #[codec(index = 5)] - #[doc = "Award bounty to a beneficiary account. The beneficiary will be able to claim the funds"] - #[doc = "after a delay."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be the curator of this bounty."] - #[doc = ""] - #[doc = "- `bounty_id`: Bounty ID to award."] - #[doc = "- `beneficiary`: The beneficiary account whom will receive the payout."] - #[doc = ""] - #[doc = "# "] - #[doc = "- O(1)."] - #[doc = "# "] - award_bounty { - #[codec(compact)] - bounty_id: ::core::primitive::u32, - beneficiary: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - }, - #[codec(index = 6)] - #[doc = "Claim the payout from an awarded bounty after payout delay."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be the beneficiary of this bounty."] - #[doc = ""] - #[doc = "- `bounty_id`: Bounty ID to claim."] - #[doc = ""] - #[doc = "# "] - #[doc = "- O(1)."] - #[doc = "# "] - claim_bounty { - #[codec(compact)] - bounty_id: ::core::primitive::u32, - }, - #[codec(index = 7)] - #[doc = "Cancel a proposed or active bounty. All the funds will be sent to treasury and"] - #[doc = "the curator deposit will be unreserved if possible."] - #[doc = ""] - #[doc = "Only `T::RejectOrigin` is able to cancel a bounty."] - #[doc = ""] - #[doc = "- `bounty_id`: Bounty ID to cancel."] - #[doc = ""] - #[doc = "# "] - #[doc = "- O(1)."] - #[doc = "# "] - close_bounty { - #[codec(compact)] - bounty_id: ::core::primitive::u32, - }, - #[codec(index = 8)] - #[doc = "Extend the expiry time of an active bounty."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be the curator of this bounty."] - #[doc = ""] - #[doc = "- `bounty_id`: Bounty ID to extend."] - #[doc = "- `remark`: additional information."] - #[doc = ""] - #[doc = "# "] - #[doc = "- O(1)."] - #[doc = "# "] - extend_bounty_expiry { - #[codec(compact)] - bounty_id: ::core::primitive::u32, - remark: ::std::vec::Vec<::core::primitive::u8>, - }, + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Dispatch a message to the destination domain and recipient address."] + pub fn dispatch( + &self, + destination_domain: ::core::primitive::u32, + recipient_address: ::subxt::utils::H256, + message_body: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "NomadHome", + "dispatch", + types::Dispatch { + destination_domain, + recipient_address, + message_body, + }, + [ + 7u8, 224u8, 49u8, 89u8, 228u8, 226u8, 26u8, 35u8, 45u8, 124u8, 124u8, + 55u8, 26u8, 234u8, 151u8, 239u8, 140u8, 176u8, 228u8, 35u8, 207u8, + 235u8, 97u8, 237u8, 59u8, 91u8, 231u8, 208u8, 89u8, 116u8, 166u8, 67u8, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - #[doc = "Proposer's balance is too low."] - InsufficientProposersBalance, - #[codec(index = 1)] - #[doc = "No proposal or bounty at that index."] - InvalidIndex, - #[codec(index = 2)] - #[doc = "The reason given is just too big."] - ReasonTooBig, - #[codec(index = 3)] - #[doc = "The bounty status is unexpected."] - UnexpectedStatus, - #[codec(index = 4)] - #[doc = "Require bounty curator."] - RequireCurator, - #[codec(index = 5)] - #[doc = "Invalid bounty value."] - InvalidValue, - #[codec(index = 6)] - #[doc = "Invalid bounty fee."] - InvalidFee, - #[codec(index = 7)] - #[doc = "A bounty payout is pending."] - #[doc = "To cancel the bounty, you must unassign and slash the curator."] - PendingPayout, - #[codec(index = 8)] - #[doc = "The bounties cannot be claimed/closed because it's still in the countdown period."] - Premature, - #[codec(index = 9)] - #[doc = "The bounty cannot be closed because it has active child bounties."] - HasActiveChildBounty, - #[codec(index = 10)] - #[doc = "Too many approvals are already queued."] - TooManyQueued, + + #[doc = "Verify/submit signed update."] + pub fn update( + &self, + signed_update: runtime_types::nomad_core::update::SignedUpdate, + max_index: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "NomadHome", + "update", + types::Update { + signed_update, + max_index, + }, + [ + 41u8, 107u8, 21u8, 50u8, 78u8, 61u8, 173u8, 159u8, 208u8, 99u8, 27u8, + 164u8, 166u8, 136u8, 83u8, 219u8, 146u8, 122u8, 148u8, 41u8, 45u8, + 106u8, 13u8, 251u8, 241u8, 74u8, 100u8, 7u8, 59u8, 30u8, 162u8, 174u8, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub enum Event { - #[codec(index = 0)] - #[doc = "New bounty proposal."] - BountyProposed { index: ::core::primitive::u32 }, - #[codec(index = 1)] - #[doc = "A bounty proposal was rejected; funds were slashed."] - BountyRejected { - index: ::core::primitive::u32, - bond: ::core::primitive::u128, - }, - #[codec(index = 2)] - #[doc = "A bounty proposal is funded and became active."] - BountyBecameActive { index: ::core::primitive::u32 }, - #[codec(index = 3)] - #[doc = "A bounty is awarded to a beneficiary."] - BountyAwarded { - index: ::core::primitive::u32, - beneficiary: ::subxt::utils::AccountId32, - }, - #[codec(index = 4)] - #[doc = "A bounty is claimed by beneficiary."] - BountyClaimed { - index: ::core::primitive::u32, - payout: ::core::primitive::u128, - beneficiary: ::subxt::utils::AccountId32, - }, - #[codec(index = 5)] - #[doc = "A bounty is cancelled."] - BountyCanceled { index: ::core::primitive::u32 }, - #[codec(index = 6)] - #[doc = "A bounty expiry is extended."] - BountyExtended { index: ::core::primitive::u32 }, + + #[doc = "Verify/slash updater for improper update."] + pub fn improper_update( + &self, + signed_update: runtime_types::nomad_core::update::SignedUpdate, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "NomadHome", + "improper_update", + types::ImproperUpdate { signed_update }, + [ + 246u8, 11u8, 33u8, 100u8, 156u8, 239u8, 209u8, 122u8, 10u8, 188u8, + 86u8, 17u8, 145u8, 60u8, 64u8, 102u8, 145u8, 76u8, 82u8, 186u8, 140u8, + 188u8, 173u8, 207u8, 122u8, 119u8, 141u8, 6u8, 82u8, 42u8, 103u8, 87u8, + ], + ) + } + + #[doc = "Set new updater on self as well as updater manager."] + #[doc = "Note: Not exposed as pallet call, will only be callable by the"] + #[doc = "GovernanceRouter pallet when implemented."] + pub fn set_updater( + &self, + new_updater: ::subxt::utils::H160, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "NomadHome", + "set_updater", + types::SetUpdater { new_updater }, + [ + 127u8, 126u8, 8u8, 188u8, 162u8, 36u8, 215u8, 205u8, 243u8, 213u8, + 108u8, 196u8, 151u8, 61u8, 27u8, 146u8, 162u8, 77u8, 158u8, 85u8, + 165u8, 89u8, 197u8, 244u8, 214u8, 21u8, 109u8, 167u8, 2u8, 139u8, + 191u8, 154u8, + ], + ) } } + } + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub type Event = runtime_types::nomad_home::pallet::Event; + pub mod events { + use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - pub struct Bounty<_0, _1, _2> { - pub proposer: _0, - pub value: _1, - pub fee: _1, - pub curator_deposit: _1, - pub bond: _1, - pub status: runtime_types::pallet_bounties::BountyStatus<_0, _2>, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Dispatch { + pub message_hash: ::subxt::utils::H256, + pub leaf_index: ::core::primitive::u32, + pub destination_and_nonce: ::core::primitive::u64, + pub committed_root: ::subxt::utils::H256, + pub message: ::std::vec::Vec<::core::primitive::u8>, + } + impl ::subxt::events::StaticEvent for Dispatch { + const EVENT: &'static str = "Dispatch"; + const PALLET: &'static str = "NomadHome"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - pub enum BountyStatus<_0, _1> { - #[codec(index = 0)] - Proposed, - #[codec(index = 1)] - Approved, - #[codec(index = 2)] - Funded, - #[codec(index = 3)] - CuratorProposed { curator: _0 }, - #[codec(index = 4)] - Active { curator: _0, update_due: _1 }, - #[codec(index = 5)] - PendingPayout { - curator: _0, - beneficiary: _0, - unlock_at: _1, - }, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Update { + pub home_domain: ::core::primitive::u32, + pub previous_root: ::subxt::utils::H256, + pub new_root: ::subxt::utils::H256, + pub signature: ::std::vec::Vec<::core::primitive::u8>, + } + impl ::subxt::events::StaticEvent for Update { + const EVENT: &'static str = "Update"; + const PALLET: &'static str = "NomadHome"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ImproperUpdate { + pub previous_root: ::subxt::utils::H256, + pub new_root: ::subxt::utils::H256, + pub signature: ::std::vec::Vec<::core::primitive::u8>, + } + impl ::subxt::events::StaticEvent for ImproperUpdate { + const EVENT: &'static str = "ImproperUpdate"; + const PALLET: &'static str = "NomadHome"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct UpdaterSlashed { + pub updater: ::subxt::utils::H160, + pub reporter: ::subxt::utils::AccountId32, + } + impl ::subxt::events::StaticEvent for UpdaterSlashed { + const EVENT: &'static str = "UpdaterSlashed"; + const PALLET: &'static str = "NomadHome"; } } - pub mod pallet_collective { + pub mod storage { use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "Set the collective's membership."] - #[doc = ""] - #[doc = "- `new_members`: The new member list. Be nice to the chain and provide it sorted."] - #[doc = "- `prime`: The prime member whose vote sets the default."] - #[doc = "- `old_count`: The upper bound for the previous number of members in storage. Used for"] - #[doc = " weight estimation."] - #[doc = ""] - #[doc = "Requires root origin."] - #[doc = ""] - #[doc = "NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but"] - #[doc = " the weight estimations rely on it to estimate dispatchable weight."] - #[doc = ""] - #[doc = "# WARNING:"] - #[doc = ""] - #[doc = "The `pallet-collective` can also be managed by logic outside of the pallet through the"] - #[doc = "implementation of the trait [`ChangeMembers`]."] - #[doc = "Any call to `set_members` must be careful that the member set doesn't get out of sync"] - #[doc = "with other logic managing the member set."] - #[doc = ""] - #[doc = "# "] - #[doc = "## Weight"] - #[doc = "- `O(MP + N)` where:"] - #[doc = " - `M` old-members-count (code- and governance-bounded)"] - #[doc = " - `N` new-members-count (code- and governance-bounded)"] - #[doc = " - `P` proposals-count (code-bounded)"] - #[doc = "- DB:"] - #[doc = " - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the"] - #[doc = " members"] - #[doc = " - 1 storage read (codec `O(P)`) for reading the proposals"] - #[doc = " - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal"] - #[doc = " - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one"] - #[doc = "# "] - set_members { - new_members: ::std::vec::Vec<::subxt::utils::AccountId32>, - prime: ::core::option::Option<::subxt::utils::AccountId32>, - old_count: ::core::primitive::u32, - }, - #[codec(index = 1)] - #[doc = "Dispatch a proposal from a member using the `Member` origin."] - #[doc = ""] - #[doc = "Origin must be a member of the collective."] - #[doc = ""] - #[doc = "# "] - #[doc = "## Weight"] - #[doc = "- `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching"] - #[doc = " `proposal`"] - #[doc = "- DB: 1 read (codec `O(M)`) + DB access of `proposal`"] - #[doc = "- 1 event"] - #[doc = "# "] - execute { - proposal: ::std::boxed::Box, - #[codec(compact)] - length_bound: ::core::primitive::u32, - }, - #[codec(index = 2)] - #[doc = "Add a new proposal to either be voted on or executed directly."] - #[doc = ""] - #[doc = "Requires the sender to be member."] - #[doc = ""] - #[doc = "`threshold` determines whether `proposal` is executed directly (`threshold < 2`)"] - #[doc = "or put up for voting."] - #[doc = ""] - #[doc = "# "] - #[doc = "## Weight"] - #[doc = "- `O(B + M + P1)` or `O(B + M + P2)` where:"] - #[doc = " - `B` is `proposal` size in bytes (length-fee-bounded)"] - #[doc = " - `M` is members-count (code- and governance-bounded)"] - #[doc = " - branching is influenced by `threshold` where:"] - #[doc = " - `P1` is proposal execution complexity (`threshold < 2`)"] - #[doc = " - `P2` is proposals-count (code-bounded) (`threshold >= 2`)"] - #[doc = "- DB:"] - #[doc = " - 1 storage read `is_member` (codec `O(M)`)"] - #[doc = " - 1 storage read `ProposalOf::contains_key` (codec `O(1)`)"] - #[doc = " - DB accesses influenced by `threshold`:"] - #[doc = " - EITHER storage accesses done by `proposal` (`threshold < 2`)"] - #[doc = " - OR proposal insertion (`threshold <= 2`)"] - #[doc = " - 1 storage mutation `Proposals` (codec `O(P2)`)"] - #[doc = " - 1 storage mutation `ProposalCount` (codec `O(1)`)"] - #[doc = " - 1 storage write `ProposalOf` (codec `O(B)`)"] - #[doc = " - 1 storage write `Voting` (codec `O(M)`)"] - #[doc = " - 1 event"] - #[doc = "# "] - propose { - #[codec(compact)] - threshold: ::core::primitive::u32, - proposal: ::std::boxed::Box, - #[codec(compact)] - length_bound: ::core::primitive::u32, - }, - #[codec(index = 3)] - #[doc = "Add an aye or nay vote for the sender to the given proposal."] - #[doc = ""] - #[doc = "Requires the sender to be a member."] - #[doc = ""] - #[doc = "Transaction fees will be waived if the member is voting on any particular proposal"] - #[doc = "for the first time and the call is successful. Subsequent vote changes will charge a"] - #[doc = "fee."] - #[doc = "# "] - #[doc = "## Weight"] - #[doc = "- `O(M)` where `M` is members-count (code- and governance-bounded)"] - #[doc = "- DB:"] - #[doc = " - 1 storage read `Members` (codec `O(M)`)"] - #[doc = " - 1 storage mutation `Voting` (codec `O(M)`)"] - #[doc = "- 1 event"] - #[doc = "# "] - vote { - proposal: ::subxt::utils::H256, - #[codec(compact)] - index: ::core::primitive::u32, - approve: ::core::primitive::bool, - }, - #[codec(index = 4)] - #[doc = "Close a vote that is either approved, disapproved or whose voting period has ended."] - #[doc = ""] - #[doc = "May be called by any signed account in order to finish voting and close the proposal."] - #[doc = ""] - #[doc = "If called before the end of the voting period it will only close the vote if it is"] - #[doc = "has enough votes to be approved or disapproved."] - #[doc = ""] - #[doc = "If called after the end of the voting period abstentions are counted as rejections"] - #[doc = "unless there is a prime member set and the prime member cast an approval."] - #[doc = ""] - #[doc = "If the close operation completes successfully with disapproval, the transaction fee will"] - #[doc = "be waived. Otherwise execution of the approved operation will be charged to the caller."] - #[doc = ""] - #[doc = "+ `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed"] - #[doc = "proposal."] - #[doc = "+ `length_bound`: The upper bound for the length of the proposal in storage. Checked via"] - #[doc = "`storage::read` so it is `size_of::() == 4` larger than the pure length."] - #[doc = ""] - #[doc = "# "] - #[doc = "## Weight"] - #[doc = "- `O(B + M + P1 + P2)` where:"] - #[doc = " - `B` is `proposal` size in bytes (length-fee-bounded)"] - #[doc = " - `M` is members-count (code- and governance-bounded)"] - #[doc = " - `P1` is the complexity of `proposal` preimage."] - #[doc = " - `P2` is proposal-count (code-bounded)"] - #[doc = "- DB:"] - #[doc = " - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`)"] - #[doc = " - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec"] - #[doc = " `O(P2)`)"] - #[doc = " - any mutations done while executing `proposal` (`P1`)"] - #[doc = "- up to 3 events"] - #[doc = "# "] - close_old_weight { - proposal_hash: ::subxt::utils::H256, - #[codec(compact)] - index: ::core::primitive::u32, - #[codec(compact)] - proposal_weight_bound: runtime_types::sp_weights::OldWeight, - #[codec(compact)] - length_bound: ::core::primitive::u32, - }, - #[codec(index = 5)] - #[doc = "Disapprove a proposal, close, and remove it from the system, regardless of its current"] - #[doc = "state."] - #[doc = ""] - #[doc = "Must be called by the Root origin."] - #[doc = ""] - #[doc = "Parameters:"] - #[doc = "* `proposal_hash`: The hash of the proposal that should be disapproved."] - #[doc = ""] - #[doc = "# "] - #[doc = "Complexity: O(P) where P is the number of max proposals"] - #[doc = "DB Weight:"] - #[doc = "* Reads: Proposals"] - #[doc = "* Writes: Voting, Proposals, ProposalOf"] - #[doc = "# "] - disapprove_proposal { proposal_hash: ::subxt::utils::H256 }, - #[codec(index = 6)] - #[doc = "Close a vote that is either approved, disapproved or whose voting period has ended."] - #[doc = ""] - #[doc = "May be called by any signed account in order to finish voting and close the proposal."] - #[doc = ""] - #[doc = "If called before the end of the voting period it will only close the vote if it is"] - #[doc = "has enough votes to be approved or disapproved."] - #[doc = ""] - #[doc = "If called after the end of the voting period abstentions are counted as rejections"] - #[doc = "unless there is a prime member set and the prime member cast an approval."] - #[doc = ""] - #[doc = "If the close operation completes successfully with disapproval, the transaction fee will"] - #[doc = "be waived. Otherwise execution of the approved operation will be charged to the caller."] - #[doc = ""] - #[doc = "+ `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed"] - #[doc = "proposal."] - #[doc = "+ `length_bound`: The upper bound for the length of the proposal in storage. Checked via"] - #[doc = "`storage::read` so it is `size_of::() == 4` larger than the pure length."] - #[doc = ""] - #[doc = "# "] - #[doc = "## Weight"] - #[doc = "- `O(B + M + P1 + P2)` where:"] - #[doc = " - `B` is `proposal` size in bytes (length-fee-bounded)"] - #[doc = " - `M` is members-count (code- and governance-bounded)"] - #[doc = " - `P1` is the complexity of `proposal` preimage."] - #[doc = " - `P2` is proposal-count (code-bounded)"] - #[doc = "- DB:"] - #[doc = " - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`)"] - #[doc = " - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec"] - #[doc = " `O(P2)`)"] - #[doc = " - any mutations done while executing `proposal` (`P1`)"] - #[doc = "- up to 3 events"] - #[doc = "# "] - close { - proposal_hash: ::subxt::utils::H256, - #[codec(compact)] - index: ::core::primitive::u32, - proposal_weight_bound: runtime_types::sp_weights::weight_v2::Weight, - #[codec(compact)] - length_bound: ::core::primitive::u32, - }, + pub struct StorageApi; + impl StorageApi { + pub fn base( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::nomad_base::NomadBase, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static("NomadHome", "Base", vec![], [ + 254u8, 56u8, 220u8, 109u8, 51u8, 237u8, 70u8, 31u8, 134u8, 49u8, 145u8, + 104u8, 204u8, 243u8, 216u8, 242u8, 57u8, 113u8, 132u8, 190u8, 170u8, 80u8, + 232u8, 190u8, 37u8, 91u8, 20u8, 188u8, 41u8, 41u8, 187u8, 107u8, + ]) + } + + pub fn tree( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::nomad_merkle::light::LightMerkle, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static("NomadHome", "Tree", vec![], [ + 22u8, 211u8, 114u8, 109u8, 20u8, 79u8, 40u8, 238u8, 244u8, 223u8, 95u8, + 97u8, 85u8, 113u8, 201u8, 242u8, 23u8, 140u8, 106u8, 222u8, 130u8, 29u8, + 218u8, 108u8, 210u8, 13u8, 115u8, 231u8, 22u8, 137u8, 227u8, 175u8, + ]) + } + + pub fn nonces( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "NomadHome", + "Nonces", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], + [ + 155u8, 100u8, 216u8, 144u8, 68u8, 188u8, 75u8, 83u8, 99u8, 245u8, 27u8, + 196u8, 64u8, 193u8, 166u8, 33u8, 47u8, 87u8, 188u8, 46u8, 101u8, 144u8, + 166u8, 231u8, 168u8, 236u8, 81u8, 141u8, 57u8, 185u8, 41u8, 124u8, + ], + ) + } + + pub fn nonces_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "NomadHome", + "Nonces", + Vec::new(), + [ + 155u8, 100u8, 216u8, 144u8, 68u8, 188u8, 75u8, 83u8, 99u8, 245u8, 27u8, + 196u8, 64u8, 193u8, 166u8, 33u8, 47u8, 87u8, 188u8, 46u8, 101u8, 144u8, + 166u8, 231u8, 168u8, 236u8, 81u8, 141u8, 57u8, 185u8, 41u8, 124u8, + ], + ) + } + + pub fn index_to_root( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::subxt::utils::H256, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "NomadHome", + "IndexToRoot", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], + [ + 101u8, 71u8, 233u8, 178u8, 28u8, 89u8, 252u8, 186u8, 13u8, 210u8, 44u8, + 76u8, 161u8, 238u8, 35u8, 40u8, 182u8, 168u8, 39u8, 114u8, 91u8, 125u8, + 240u8, 115u8, 4u8, 121u8, 72u8, 90u8, 134u8, 119u8, 47u8, 116u8, + ], + ) + } + + pub fn index_to_root_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::subxt::utils::H256, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "NomadHome", + "IndexToRoot", + Vec::new(), + [ + 101u8, 71u8, 233u8, 178u8, 28u8, 89u8, 252u8, 186u8, 13u8, 210u8, 44u8, + 76u8, 161u8, 238u8, 35u8, 40u8, 182u8, 168u8, 39u8, 114u8, 91u8, 125u8, + 240u8, 115u8, 4u8, 121u8, 72u8, 90u8, 134u8, 119u8, 47u8, 116u8, + ], + ) + } + + pub fn root_to_index( + &self, + _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "NomadHome", + "RootToIndex", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], + [ + 82u8, 113u8, 217u8, 4u8, 206u8, 200u8, 21u8, 79u8, 246u8, 211u8, 8u8, + 37u8, 160u8, 89u8, 10u8, 228u8, 211u8, 167u8, 119u8, 98u8, 50u8, 158u8, + 13u8, 130u8, 26u8, 12u8, 132u8, 22u8, 47u8, 54u8, 213u8, 39u8, + ], + ) + } + + pub fn root_to_index_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "NomadHome", + "RootToIndex", + Vec::new(), + [ + 82u8, 113u8, 217u8, 4u8, 206u8, 200u8, 21u8, 79u8, 246u8, 211u8, 8u8, + 37u8, 160u8, 89u8, 10u8, 228u8, 211u8, 167u8, 119u8, 98u8, 50u8, 158u8, + 13u8, 130u8, 26u8, 12u8, 132u8, 22u8, 47u8, 54u8, 213u8, 39u8, + ], + ) + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " Max allowed message body size"] + pub fn max_message_body_bytes( + &self, + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static("NomadHome", "MaxMessageBodyBytes", [ + 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 nomad_da_bridge { + use super::{root_mod, runtime_types}; + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub type Error = runtime_types::nomad_da_bridge::pallet::Error; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub type Call = runtime_types::nomad_da_bridge::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 :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - #[doc = "Account is not a member"] - NotMember, - #[codec(index = 1)] - #[doc = "Duplicate proposals not allowed"] - DuplicateProposal, - #[codec(index = 2)] - #[doc = "Proposal must exist"] - ProposalMissing, - #[codec(index = 3)] - #[doc = "Mismatched index"] - WrongIndex, - #[codec(index = 4)] - #[doc = "Duplicate vote ignored"] - DuplicateVote, - #[codec(index = 5)] - #[doc = "Members are already initialized!"] - AlreadyInitialized, - #[codec(index = 6)] - #[doc = "The close call was made too early, before the end of the voting."] - TooEarly, - #[codec(index = 7)] - #[doc = "There can only be a maximum of `MaxProposals` active proposals."] - TooManyProposals, - #[codec(index = 8)] - #[doc = "The given weight bound for the proposal was too low."] - WrongProposalWeight, - #[codec(index = 9)] - #[doc = "The given length bound for the proposal was too low."] - WrongProposalLength, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct TryDispatchDataRoot { + #[codec(compact)] + pub destination_domain: ::core::primitive::u32, + pub recipient_address: ::subxt::utils::H256, + pub header: ::std::boxed::Box< + runtime_types::avail_core::header::Header< + ::core::primitive::u32, + runtime_types::sp_runtime::traits::BlakeTwo256, + >, + >, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub enum Event { - #[codec(index = 0)] - #[doc = "A motion (given hash) has been proposed (by given account) with a threshold (given"] - #[doc = "`MemberCount`)."] - Proposed { - account: ::subxt::utils::AccountId32, - proposal_index: ::core::primitive::u32, - proposal_hash: ::subxt::utils::H256, - threshold: ::core::primitive::u32, - }, - #[codec(index = 1)] - #[doc = "A motion (given hash) has been voted on by given account, leaving"] - #[doc = "a tally (yes votes and no votes given respectively as `MemberCount`)."] - Voted { - account: ::subxt::utils::AccountId32, - proposal_hash: ::subxt::utils::H256, - voted: ::core::primitive::bool, - yes: ::core::primitive::u32, - no: ::core::primitive::u32, - }, - #[codec(index = 2)] - #[doc = "A motion was approved by the required threshold."] - Approved { proposal_hash: ::subxt::utils::H256 }, - #[codec(index = 3)] - #[doc = "A motion was not approved by the required threshold."] - Disapproved { proposal_hash: ::subxt::utils::H256 }, - #[codec(index = 4)] - #[doc = "A motion was executed; result will be `Ok` if it returned without error."] - Executed { - proposal_hash: ::subxt::utils::H256, - result: - ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - }, - #[codec(index = 5)] - #[doc = "A single member did some action; result will be `Ok` if it returned without error."] - MemberExecuted { - proposal_hash: ::subxt::utils::H256, - result: - ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - }, - #[codec(index = 6)] - #[doc = "A proposal was closed because its threshold was reached or after its duration was up."] - Closed { - proposal_hash: ::subxt::utils::H256, - yes: ::core::primitive::u32, - no: ::core::primitive::u32, - }, + impl ::subxt::blocks::StaticExtrinsic for TryDispatchDataRoot { + const CALL: &'static str = "try_dispatch_data_root"; + const PALLET: &'static str = "NomadDABridge"; } } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub enum RawOrigin<_0> { - #[codec(index = 0)] - Members(::core::primitive::u32, ::core::primitive::u32), - #[codec(index = 1)] - Member(_0), - #[codec(index = 2)] - _Phantom, + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Dispatch a data root message to the home if the header is valid."] + pub fn try_dispatch_data_root( + &self, + destination_domain: ::core::primitive::u32, + recipient_address: ::subxt::utils::H256, + header: runtime_types::avail_core::header::Header< + ::core::primitive::u32, + runtime_types::sp_runtime::traits::BlakeTwo256, + >, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "NomadDABridge", + "try_dispatch_data_root", + types::TryDispatchDataRoot { + destination_domain, + recipient_address, + header: ::std::boxed::Box::new(header), + }, + [ + 197u8, 2u8, 92u8, 148u8, 225u8, 214u8, 117u8, 20u8, 80u8, 121u8, 114u8, + 34u8, 128u8, 101u8, 13u8, 214u8, 95u8, 192u8, 51u8, 127u8, 48u8, 138u8, + 155u8, 71u8, 149u8, 179u8, 155u8, 239u8, 247u8, 41u8, 141u8, 250u8, + ], + ) + } } + } + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub type Event = runtime_types::nomad_da_bridge::pallet::Event; + pub mod events { + use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - pub struct Votes<_0, _1> { - pub index: _1, - pub threshold: _1, - pub ayes: ::std::vec::Vec<_0>, - pub nays: ::std::vec::Vec<_0>, - pub end: _1, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct DataRootDispatched { + pub destination_domain: ::core::primitive::u32, + pub recipient_address: ::subxt::utils::H256, + pub block_number: ::core::primitive::u32, + pub data_root: ::subxt::utils::H256, + } + impl ::subxt::events::StaticEvent for DataRootDispatched { + const EVENT: &'static str = "DataRootDispatched"; + const PALLET: &'static str = "NomadDABridge"; } } - pub mod pallet_democracy { + pub mod constants { use super::runtime_types; - pub mod conviction { + pub struct ConstantsApi; + impl ConstantsApi { + pub fn da_bridge_pallet_id( + &self, + ) -> ::subxt::constants::Address<::subxt::utils::H256> { + ::subxt::constants::Address::new_static("NomadDABridge", "DABridgePalletId", [ + 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 preimage { + use super::{root_mod, runtime_types}; + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub type Error = runtime_types::pallet_preimage::pallet::Error; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + 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 :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - pub enum Conviction { - #[codec(index = 0)] - None, - #[codec(index = 1)] - Locked1x, - #[codec(index = 2)] - Locked2x, - #[codec(index = 3)] - Locked3x, - #[codec(index = 4)] - Locked4x, - #[codec(index = 5)] - Locked5x, - #[codec(index = 6)] - Locked6x, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct NotePreimage { + pub bytes: ::std::vec::Vec<::core::primitive::u8>, + } + impl ::subxt::blocks::StaticExtrinsic for NotePreimage { + const CALL: &'static str = "note_preimage"; + const PALLET: &'static str = "Preimage"; } - } - pub mod pallet { - use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "Propose a sensitive action to be taken."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be _Signed_ and the sender must"] - #[doc = "have funds to cover the deposit."] - #[doc = ""] - #[doc = "- `proposal_hash`: The hash of the proposal preimage."] - #[doc = "- `value`: The amount of deposit (must be at least `MinimumDeposit`)."] - #[doc = ""] - #[doc = "Emits `Proposed`."] - propose { - proposal: runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::da_runtime::RuntimeCall, - >, - #[codec(compact)] - value: ::core::primitive::u128, - }, - #[codec(index = 1)] - #[doc = "Signals agreement with a particular proposal."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be _Signed_ and the sender"] - #[doc = "must have funds to cover the deposit, equal to the original deposit."] - #[doc = ""] - #[doc = "- `proposal`: The index of the proposal to second."] - second { - #[codec(compact)] - proposal: ::core::primitive::u32, - }, - #[codec(index = 2)] - #[doc = "Vote in a referendum. If `vote.is_aye()`, the vote is to enact the proposal;"] - #[doc = "otherwise it is a vote to keep the status quo."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be _Signed_."] - #[doc = ""] - #[doc = "- `ref_index`: The index of the referendum to vote for."] - #[doc = "- `vote`: The vote configuration."] - vote { - #[codec(compact)] - ref_index: ::core::primitive::u32, - vote: runtime_types::pallet_democracy::vote::AccountVote< - ::core::primitive::u128, - >, - }, - #[codec(index = 3)] - #[doc = "Schedule an emergency cancellation of a referendum. Cannot happen twice to the same"] - #[doc = "referendum."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be `CancellationOrigin`."] - #[doc = ""] - #[doc = "-`ref_index`: The index of the referendum to cancel."] - #[doc = ""] - #[doc = "Weight: `O(1)`."] - emergency_cancel { ref_index: ::core::primitive::u32 }, - #[codec(index = 4)] - #[doc = "Schedule a referendum to be tabled once it is legal to schedule an external"] - #[doc = "referendum."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be `ExternalOrigin`."] - #[doc = ""] - #[doc = "- `proposal_hash`: The preimage hash of the proposal."] - external_propose { - proposal: runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::da_runtime::RuntimeCall, - >, - }, - #[codec(index = 5)] - #[doc = "Schedule a majority-carries referendum to be tabled next once it is legal to schedule"] - #[doc = "an external referendum."] - #[doc = ""] - #[doc = "The dispatch of this call must be `ExternalMajorityOrigin`."] - #[doc = ""] - #[doc = "- `proposal_hash`: The preimage hash of the proposal."] - #[doc = ""] - #[doc = "Unlike `external_propose`, blacklisting has no effect on this and it may replace a"] - #[doc = "pre-scheduled `external_propose` call."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - external_propose_majority { - proposal: runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::da_runtime::RuntimeCall, - >, - }, - #[codec(index = 6)] - #[doc = "Schedule a negative-turnout-bias referendum to be tabled next once it is legal to"] - #[doc = "schedule an external referendum."] - #[doc = ""] - #[doc = "The dispatch of this call must be `ExternalDefaultOrigin`."] - #[doc = ""] - #[doc = "- `proposal_hash`: The preimage hash of the proposal."] - #[doc = ""] - #[doc = "Unlike `external_propose`, blacklisting has no effect on this and it may replace a"] - #[doc = "pre-scheduled `external_propose` call."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - external_propose_default { - proposal: runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::da_runtime::RuntimeCall, - >, - }, - #[codec(index = 7)] - #[doc = "Schedule the currently externally-proposed majority-carries referendum to be tabled"] - #[doc = "immediately. If there is no externally-proposed referendum currently, or if there is one"] - #[doc = "but it is not a majority-carries referendum then it fails."] - #[doc = ""] - #[doc = "The dispatch of this call must be `FastTrackOrigin`."] - #[doc = ""] - #[doc = "- `proposal_hash`: The hash of the current external proposal."] - #[doc = "- `voting_period`: The period that is allowed for voting on this proposal. Increased to"] - #[doc = "\tMust be always greater than zero."] - #[doc = "\tFor `FastTrackOrigin` must be equal or greater than `FastTrackVotingPeriod`."] - #[doc = "- `delay`: The number of block after voting has ended in approval and this should be"] - #[doc = " enacted. This doesn't have a minimum amount."] - #[doc = ""] - #[doc = "Emits `Started`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - fast_track { - proposal_hash: ::subxt::utils::H256, - voting_period: ::core::primitive::u32, - delay: ::core::primitive::u32, - }, - #[codec(index = 8)] - #[doc = "Veto and blacklist the external proposal hash."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be `VetoOrigin`."] - #[doc = ""] - #[doc = "- `proposal_hash`: The preimage hash of the proposal to veto and blacklist."] - #[doc = ""] - #[doc = "Emits `Vetoed`."] - #[doc = ""] - #[doc = "Weight: `O(V + log(V))` where V is number of `existing vetoers`"] - veto_external { proposal_hash: ::subxt::utils::H256 }, - #[codec(index = 9)] - #[doc = "Remove a referendum."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be _Root_."] - #[doc = ""] - #[doc = "- `ref_index`: The index of the referendum to cancel."] - #[doc = ""] - #[doc = "# Weight: `O(1)`."] - cancel_referendum { - #[codec(compact)] - ref_index: ::core::primitive::u32, - }, - #[codec(index = 10)] - #[doc = "Delegate the voting power (with some given conviction) of the sending account."] - #[doc = ""] - #[doc = "The balance delegated is locked for as long as it's delegated, and thereafter for the"] - #[doc = "time appropriate for the conviction's lock period."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be _Signed_, and the signing account must either:"] - #[doc = " - be delegating already; or"] - #[doc = " - have no voting activity (if there is, then it will need to be removed/consolidated"] - #[doc = " through `reap_vote` or `unvote`)."] - #[doc = ""] - #[doc = "- `to`: The account whose voting the `target` account's voting power will follow."] - #[doc = "- `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 referendums the voter delegating to has"] - #[doc = " voted on. Weight is charged as if maximum votes."] - delegate { - to: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - conviction: runtime_types::pallet_democracy::conviction::Conviction, - balance: ::core::primitive::u128, - }, - #[codec(index = 11)] - #[doc = "Undelegate the voting power of the sending account."] - #[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."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be _Signed_ and the signing account must be"] - #[doc = "currently delegating."] - #[doc = ""] - #[doc = "Emits `Undelegated`."] - #[doc = ""] - #[doc = "Weight: `O(R)` where R is the number of referendums the voter delegating to has"] - #[doc = " voted on. Weight is charged as if maximum votes."] - undelegate, - #[codec(index = 12)] - #[doc = "Clears all public proposals."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be _Root_."] - #[doc = ""] - #[doc = "Weight: `O(1)`."] - clear_public_proposals, - #[codec(index = 13)] - #[doc = "Unlock tokens that have an expired lock."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be _Signed_."] - #[doc = ""] - #[doc = "- `target`: The account to remove the lock on."] - #[doc = ""] - #[doc = "Weight: `O(R)` with R number of vote of target."] - unlock { - target: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - }, - #[codec(index = 14)] - #[doc = "Remove a vote for a referendum."] - #[doc = ""] - #[doc = "If:"] - #[doc = "- the referendum was cancelled, or"] - #[doc = "- the referendum is ongoing, or"] - #[doc = "- the referendum 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 referendum 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 referendum `index`."] - #[doc = ""] - #[doc = "- `index`: The index of referendum of the vote to be removed."] - #[doc = ""] - #[doc = "Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on."] - #[doc = " Weight is calculated for the maximum number of vote."] - remove_vote { index: ::core::primitive::u32 }, - #[codec(index = 15)] - #[doc = "Remove a vote for a referendum."] - #[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 referendum was cancelled, because the voter lost the referendum 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"] - #[doc = " referendum `index`."] - #[doc = "- `index`: The index of referendum of the vote to be removed."] - #[doc = ""] - #[doc = "Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on."] - #[doc = " Weight is calculated for the maximum number of vote."] - remove_other_vote { - target: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - index: ::core::primitive::u32, - }, - #[codec(index = 16)] - #[doc = "Permanently place a proposal into the blacklist. This prevents it from ever being"] - #[doc = "proposed again."] - #[doc = ""] - #[doc = "If called on a queued public or external proposal, then this will result in it being"] - #[doc = "removed. If the `ref_index` supplied is an active referendum with the proposal hash,"] - #[doc = "then it will be cancelled."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be `BlacklistOrigin`."] - #[doc = ""] - #[doc = "- `proposal_hash`: The proposal hash to blacklist permanently."] - #[doc = "- `ref_index`: An ongoing referendum whose hash is `proposal_hash`, which will be"] - #[doc = "cancelled."] - #[doc = ""] - #[doc = "Weight: `O(p)` (though as this is an high-privilege dispatch, we assume it has a"] - #[doc = " reasonable value)."] - blacklist { - proposal_hash: ::subxt::utils::H256, - maybe_ref_index: ::core::option::Option<::core::primitive::u32>, - }, - #[codec(index = 17)] - #[doc = "Remove a proposal."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be `CancelProposalOrigin`."] - #[doc = ""] - #[doc = "- `prop_index`: The index of the proposal to cancel."] - #[doc = ""] - #[doc = "Weight: `O(p)` where `p = PublicProps::::decode_len()`"] - cancel_proposal { - #[codec(compact)] - prop_index: ::core::primitive::u32, - }, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct UnnotePreimage { + pub hash: ::subxt::utils::H256, + } + impl ::subxt::blocks::StaticExtrinsic for UnnotePreimage { + const CALL: &'static str = "unnote_preimage"; + const PALLET: &'static str = "Preimage"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - #[doc = "Value too low"] - ValueLow, - #[codec(index = 1)] - #[doc = "Proposal does not exist"] - ProposalMissing, - #[codec(index = 2)] - #[doc = "Cannot cancel the same proposal twice"] - AlreadyCanceled, - #[codec(index = 3)] - #[doc = "Proposal already made"] - DuplicateProposal, - #[codec(index = 4)] - #[doc = "Proposal still blacklisted"] - ProposalBlacklisted, - #[codec(index = 5)] - #[doc = "Next external proposal not simple majority"] - NotSimpleMajority, - #[codec(index = 6)] - #[doc = "Invalid hash"] - InvalidHash, - #[codec(index = 7)] - #[doc = "No external proposal"] - NoProposal, - #[codec(index = 8)] - #[doc = "Identity may not veto a proposal twice"] - AlreadyVetoed, - #[codec(index = 9)] - #[doc = "Vote given for invalid referendum"] - ReferendumInvalid, - #[codec(index = 10)] - #[doc = "No proposals waiting"] - NoneWaiting, - #[codec(index = 11)] - #[doc = "The given account did not vote on the referendum."] - NotVoter, - #[codec(index = 12)] - #[doc = "The actor has no permission to conduct the action."] - NoPermission, - #[codec(index = 13)] - #[doc = "The account is already delegating."] - AlreadyDelegating, - #[codec(index = 14)] - #[doc = "Too high a balance was provided that the account cannot afford."] - InsufficientFunds, - #[codec(index = 15)] - #[doc = "The account is not currently delegating."] - NotDelegating, - #[codec(index = 16)] - #[doc = "The account currently has votes attached to it and the operation cannot succeed until"] - #[doc = "these are removed, either through `unvote` or `reap_vote`."] - VotesExist, - #[codec(index = 17)] - #[doc = "The instant referendum origin is currently disallowed."] - InstantNotAllowed, - #[codec(index = 18)] - #[doc = "Delegation to oneself makes no sense."] - Nonsense, - #[codec(index = 19)] - #[doc = "Invalid upper bound."] - WrongUpperBound, - #[codec(index = 20)] - #[doc = "Maximum number of votes reached."] - MaxVotesReached, - #[codec(index = 21)] - #[doc = "Maximum number of items reached."] - TooMany, - #[codec(index = 22)] - #[doc = "Voting period too low"] - VotingPeriodLow, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct RequestPreimage { + pub hash: ::subxt::utils::H256, + } + impl ::subxt::blocks::StaticExtrinsic for RequestPreimage { + const CALL: &'static str = "request_preimage"; + const PALLET: &'static str = "Preimage"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub enum Event { - #[codec(index = 0)] - #[doc = "A motion has been proposed by a public account."] - Proposed { - proposal_index: ::core::primitive::u32, - deposit: ::core::primitive::u128, - }, - #[codec(index = 1)] - #[doc = "A public proposal has been tabled for referendum vote."] - Tabled { - proposal_index: ::core::primitive::u32, - deposit: ::core::primitive::u128, - }, - #[codec(index = 2)] - #[doc = "An external proposal has been tabled."] - ExternalTabled, - #[codec(index = 3)] - #[doc = "A referendum has begun."] - Started { - ref_index: ::core::primitive::u32, - threshold: runtime_types::pallet_democracy::vote_threshold::VoteThreshold, - }, - #[codec(index = 4)] - #[doc = "A proposal has been approved by referendum."] - Passed { ref_index: ::core::primitive::u32 }, - #[codec(index = 5)] - #[doc = "A proposal has been rejected by referendum."] - NotPassed { ref_index: ::core::primitive::u32 }, - #[codec(index = 6)] - #[doc = "A referendum has been cancelled."] - Cancelled { ref_index: ::core::primitive::u32 }, - #[codec(index = 7)] - #[doc = "An account has delegated their vote to another account."] - Delegated { - who: ::subxt::utils::AccountId32, - target: ::subxt::utils::AccountId32, - }, - #[codec(index = 8)] - #[doc = "An account has cancelled a previous delegation operation."] - Undelegated { - account: ::subxt::utils::AccountId32, - }, - #[codec(index = 9)] - #[doc = "An external proposal has been vetoed."] - Vetoed { - who: ::subxt::utils::AccountId32, - proposal_hash: ::subxt::utils::H256, - until: ::core::primitive::u32, - }, - #[codec(index = 10)] - #[doc = "A proposal_hash has been blacklisted permanently."] - Blacklisted { proposal_hash: ::subxt::utils::H256 }, - #[codec(index = 11)] - #[doc = "An account has voted in a referendum"] - Voted { - voter: ::subxt::utils::AccountId32, - ref_index: ::core::primitive::u32, - vote: runtime_types::pallet_democracy::vote::AccountVote< - ::core::primitive::u128, - >, - }, - #[codec(index = 12)] - #[doc = "An account has secconded a proposal"] - Seconded { - seconder: ::subxt::utils::AccountId32, - prop_index: ::core::primitive::u32, - }, - #[codec(index = 13)] - #[doc = "A proposal got canceled."] - ProposalCanceled { prop_index: ::core::primitive::u32 }, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct UnrequestPreimage { + pub hash: ::subxt::utils::H256, + } + impl ::subxt::blocks::StaticExtrinsic for UnrequestPreimage { + const CALL: &'static str = "unrequest_preimage"; + const PALLET: &'static str = "Preimage"; } } - pub mod types { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Delegations<_0> { - pub votes: _0, - pub capital: _0, + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Register a preimage on-chain."] + #[doc = ""] + #[doc = "If the preimage was previously requested, no fees or deposits are taken for providing"] + #[doc = "the preimage. Otherwise, a deposit is taken proportional to the size of the preimage."] + pub fn note_preimage( + &self, + bytes: ::std::vec::Vec<::core::primitive::u8>, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Preimage", + "note_preimage", + 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, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub enum ReferendumInfo<_0, _1, _2> { - #[codec(index = 0)] - Ongoing(runtime_types::pallet_democracy::types::ReferendumStatus<_0, _1, _2>), - #[codec(index = 1)] - Finished { - approved: ::core::primitive::bool, - end: _0, - }, + + #[doc = "Clear an unrequested preimage from the runtime storage."] + #[doc = ""] + #[doc = "If `len` is provided, then it will be a much cheaper operation."] + #[doc = ""] + #[doc = "- `hash`: The hash of the preimage to be removed from the store."] + #[doc = "- `len`: The length of the preimage of `hash`."] + pub fn unnote_preimage( + &self, + hash: ::subxt::utils::H256, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Preimage", + "unnote_preimage", + 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, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct ReferendumStatus<_0, _1, _2> { - pub end: _0, - pub proposal: _1, - pub threshold: runtime_types::pallet_democracy::vote_threshold::VoteThreshold, - pub delay: _0, - pub tally: runtime_types::pallet_democracy::types::Tally<_2>, + + #[doc = "Request a preimage be uploaded to the chain without paying any fees or deposits."] + #[doc = ""] + #[doc = "If the preimage requests has already been provided on-chain, we unreserve any deposit"] + #[doc = "a user may have paid, and take the control of the preimage out of their hands."] + pub fn request_preimage( + &self, + hash: ::subxt::utils::H256, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Preimage", + "request_preimage", + 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, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Tally<_0> { - pub ayes: _0, - pub nays: _0, - pub turnout: _0, + + #[doc = "Clear a previously made request for a preimage."] + #[doc = ""] + #[doc = "NOTE: THIS MUST NOT BE CALLED ON `hash` MORE TIMES THAN `request_preimage`."] + pub fn unrequest_preimage( + &self, + hash: ::subxt::utils::H256, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Preimage", + "unrequest_preimage", + 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, + ], + ) } } - pub mod vote { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub enum AccountVote<_0> { - #[codec(index = 0)] - Standard { - vote: runtime_types::pallet_democracy::vote::Vote, - balance: _0, - }, - #[codec(index = 1)] - Split { aye: _0, nay: _0 }, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct PriorLock<_0, _1>(pub _0, pub _1); - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Vote(pub ::core::primitive::u8); - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub enum Voting<_0, _1, _2> { - #[codec(index = 0)] - Direct { - votes: runtime_types::sp_core::bounded::bounded_vec::BoundedVec<( - _2, - runtime_types::pallet_democracy::vote::AccountVote<_0>, - )>, - delegations: runtime_types::pallet_democracy::types::Delegations<_0>, - prior: runtime_types::pallet_democracy::vote::PriorLock<_2, _0>, - }, - #[codec(index = 1)] - Delegating { - balance: _0, - target: _1, - conviction: runtime_types::pallet_democracy::conviction::Conviction, - delegations: runtime_types::pallet_democracy::types::Delegations<_0>, - prior: runtime_types::pallet_democracy::vote::PriorLock<_2, _0>, - }, + } + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub type Event = runtime_types::pallet_preimage::pallet::Event; + pub mod events { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A preimage has been noted."] + pub struct Noted { + pub hash: ::subxt::utils::H256, + } + impl ::subxt::events::StaticEvent for Noted { + const EVENT: &'static str = "Noted"; + const PALLET: &'static str = "Preimage"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A preimage has been requested."] + pub struct Requested { + pub hash: ::subxt::utils::H256, + } + impl ::subxt::events::StaticEvent for Requested { + const EVENT: &'static str = "Requested"; + const PALLET: &'static str = "Preimage"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A preimage has ben cleared."] + pub struct Cleared { + pub hash: ::subxt::utils::H256, + } + impl ::subxt::events::StaticEvent for Cleared { + const EVENT: &'static str = "Cleared"; + const PALLET: &'static str = "Preimage"; + } + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " The request status of a given hash."] + pub fn status_for( + &self, + _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_preimage::RequestStatus< + ::subxt::utils::AccountId32, + ::core::primitive::u128, + >, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Preimage", + "StatusFor", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], + [ + 176u8, 174u8, 255u8, 131u8, 156u8, 64u8, 181u8, 119u8, 81u8, 243u8, + 144u8, 55u8, 19u8, 140u8, 119u8, 30u8, 210u8, 112u8, 201u8, 247u8, + 13u8, 19u8, 120u8, 190u8, 253u8, 89u8, 4u8, 109u8, 122u8, 62u8, 87u8, + 186u8, + ], + ) + } + + #[doc = " The request status of a given hash."] + pub fn status_for_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_preimage::RequestStatus< + ::subxt::utils::AccountId32, + ::core::primitive::u128, + >, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Preimage", + "StatusFor", + Vec::new(), + [ + 176u8, 174u8, 255u8, 131u8, 156u8, 64u8, 181u8, 119u8, 81u8, 243u8, + 144u8, 55u8, 19u8, 140u8, 119u8, 30u8, 210u8, 112u8, 201u8, 247u8, + 13u8, 19u8, 120u8, 190u8, 253u8, 89u8, 4u8, 109u8, 122u8, 62u8, 87u8, + 186u8, + ], + ) + } + + pub fn preimage_for( + &self, + _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, + _1: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::sp_core::bounded::bounded_vec::BoundedVec<::core::primitive::u8>, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Preimage", + "PreimageFor", + vec![ + ::subxt::storage::address::make_static_storage_map_key(_0.borrow()), + ::subxt::storage::address::make_static_storage_map_key(_1.borrow()), + ], + [ + 20u8, 5u8, 33u8, 71u8, 153u8, 129u8, 98u8, 23u8, 214u8, 138u8, 96u8, + 113u8, 245u8, 128u8, 51u8, 55u8, 123u8, 218u8, 165u8, 247u8, 14u8, + 104u8, 119u8, 87u8, 71u8, 222u8, 200u8, 103u8, 58u8, 10u8, 97u8, 134u8, + ], + ) + } + + pub fn preimage_for_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::sp_core::bounded::bounded_vec::BoundedVec<::core::primitive::u8>, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Preimage", + "PreimageFor", + Vec::new(), + [ + 20u8, 5u8, 33u8, 71u8, 153u8, 129u8, 98u8, 23u8, 214u8, 138u8, 96u8, + 113u8, 245u8, 128u8, 51u8, 55u8, 123u8, 218u8, 165u8, 247u8, 14u8, + 104u8, 119u8, 87u8, 71u8, 222u8, 200u8, 103u8, 58u8, 10u8, 97u8, 134u8, + ], + ) } } - pub mod vote_threshold { + } + } + pub mod multisig { + use super::{root_mod, runtime_types}; + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub type Error = runtime_types::pallet_multisig::pallet::Error; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub type Call = runtime_types::pallet_multisig::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 :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - pub enum VoteThreshold { - #[codec(index = 0)] - SuperMajorityApprove, - #[codec(index = 1)] - SuperMajorityAgainst, - #[codec(index = 2)] - SimpleMajority, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct AsMultiThreshold1 { + pub other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, + pub call: ::std::boxed::Box, + } + impl ::subxt::blocks::StaticExtrinsic for AsMultiThreshold1 { + const CALL: &'static str = "as_multi_threshold_1"; + const PALLET: &'static str = "Multisig"; } - } - } - pub mod pallet_election_provider_multi_phase { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - # [codec (index = 0)] # [doc = "Submit a solution for the unsigned phase."] # [doc = ""] # [doc = "The dispatch origin fo this call must be __none__."] # [doc = ""] # [doc = "This submission is checked on the fly. Moreover, this unsigned solution is only"] # [doc = "validated when submitted to the pool from the **local** node. Effectively, this means"] # [doc = "that only active validators can submit this transaction when authoring a block (similar"] # [doc = "to an inherent)."] # [doc = ""] # [doc = "To prevent any incorrect solution (and thus wasted time/weight), this transaction will"] # [doc = "panic if the solution submitted by the validator is invalid in any way, effectively"] # [doc = "putting their authoring reward at risk."] # [doc = ""] # [doc = "No deposit or reward is associated with this submission."] submit_unsigned { raw_solution : :: std :: boxed :: Box < runtime_types :: pallet_election_provider_multi_phase :: RawSolution < runtime_types :: da_runtime :: constants :: staking :: NposSolution16 > > , witness : runtime_types :: pallet_election_provider_multi_phase :: SolutionOrSnapshotSize , } , # [codec (index = 1)] # [doc = "Set a new value for `MinimumUntrustedScore`."] # [doc = ""] # [doc = "Dispatch origin must be aligned with `T::ForceOrigin`."] # [doc = ""] # [doc = "This check can be turned off by setting the value to `None`."] set_minimum_untrusted_score { maybe_next_score : :: core :: option :: Option < runtime_types :: sp_npos_elections :: ElectionScore > , } , # [codec (index = 2)] # [doc = "Set a solution in the queue, to be handed out to the client of this pallet in the next"] # [doc = "call to `ElectionProvider::elect`."] # [doc = ""] # [doc = "This can only be set by `T::ForceOrigin`, and only when the phase is `Emergency`."] # [doc = ""] # [doc = "The solution is not checked for any feasibility and is assumed to be trustworthy, as any"] # [doc = "feasibility check itself can in principle cause the election process to fail (due to"] # [doc = "memory/weight constrains)."] set_emergency_election_result { supports : :: std :: vec :: Vec < (:: subxt :: utils :: AccountId32 , runtime_types :: sp_npos_elections :: Support < :: subxt :: utils :: AccountId32 > ,) > , } , # [codec (index = 3)] # [doc = "Submit a solution for the signed phase."] # [doc = ""] # [doc = "The dispatch origin fo this call must be __signed__."] # [doc = ""] # [doc = "The solution is potentially queued, based on the claimed score and processed at the end"] # [doc = "of the signed phase."] # [doc = ""] # [doc = "A deposit is reserved and recorded for the solution. Based on the outcome, the solution"] # [doc = "might be rewarded, slashed, or get all or a part of the deposit back."] submit { raw_solution : :: std :: boxed :: Box < runtime_types :: pallet_election_provider_multi_phase :: RawSolution < runtime_types :: da_runtime :: constants :: staking :: NposSolution16 > > , } , # [codec (index = 4)] # [doc = "Trigger the governance fallback."] # [doc = ""] # [doc = "This can only be called when [`Phase::Emergency`] is enabled, as an alternative to"] # [doc = "calling [`Call::set_emergency_election_result`]."] governance_fallback { maybe_max_voters : :: core :: option :: Option < :: core :: primitive :: u32 > , maybe_max_targets : :: core :: option :: Option < :: core :: primitive :: u32 > , } , } + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct AsMulti { + pub threshold: ::core::primitive::u16, + pub other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, + pub maybe_timepoint: ::core::option::Option< + runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, + >, + pub call: ::std::boxed::Box, + pub max_weight: runtime_types::sp_weights::weight_v2::Weight, + } + impl ::subxt::blocks::StaticExtrinsic for AsMulti { + const CALL: &'static str = "as_multi"; + const PALLET: &'static str = "Multisig"; + } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "Error of the pallet that can be returned in response to dispatches."] - pub enum Error { - #[codec(index = 0)] - #[doc = "Submission was too early."] - PreDispatchEarlySubmission, - #[codec(index = 1)] - #[doc = "Wrong number of winners presented."] - PreDispatchWrongWinnerCount, - #[codec(index = 2)] - #[doc = "Submission was too weak, score-wise."] - PreDispatchWeakSubmission, - #[codec(index = 3)] - #[doc = "The queue was full, and the solution was not better than any of the existing ones."] - SignedQueueFull, - #[codec(index = 4)] - #[doc = "The origin failed to pay the deposit."] - SignedCannotPayDeposit, - #[codec(index = 5)] - #[doc = "Witness data to dispatchable is invalid."] - SignedInvalidWitness, - #[codec(index = 6)] - #[doc = "The signed submission consumes too much weight"] - SignedTooMuchWeight, - #[codec(index = 7)] - #[doc = "OCW submitted solution for wrong round"] - OcwCallWrongEra, - #[codec(index = 8)] - #[doc = "Snapshot metadata should exist but didn't."] - MissingSnapshotMetadata, - #[codec(index = 9)] - #[doc = "`Self::insert_submission` returned an invalid index."] - InvalidSubmissionIndex, - #[codec(index = 10)] - #[doc = "The call is not allowed at this point."] - CallNotAllowed, - #[codec(index = 11)] - #[doc = "The fallback failed"] - FallbackFailed, - #[codec(index = 12)] - #[doc = "Some bound not met"] - BoundNotMet, - #[codec(index = 13)] - #[doc = "Submitted solution has too many winners"] - TooManyWinners, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ApproveAsMulti { + pub threshold: ::core::primitive::u16, + pub other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, + pub maybe_timepoint: ::core::option::Option< + runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, + >, + pub call_hash: [::core::primitive::u8; 32usize], + pub max_weight: runtime_types::sp_weights::weight_v2::Weight, + } + impl ::subxt::blocks::StaticExtrinsic for ApproveAsMulti { + const CALL: &'static str = "approve_as_multi"; + const PALLET: &'static str = "Multisig"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub enum Event { - #[codec(index = 0)] - #[doc = "A solution was stored with the given compute."] - #[doc = ""] - #[doc = "The `origin` indicates the origin of the solution. If `origin` is `Some(AccountId)`,"] - #[doc = "the stored solution was submited in the signed phase by a miner with the `AccountId`."] - #[doc = "Otherwise, the solution was stored either during the unsigned phase or by"] - #[doc = "`T::ForceOrigin`. The `bool` is `true` when a previous solution was ejected to make"] - #[doc = "room for this one."] - SolutionStored { - compute: - runtime_types::pallet_election_provider_multi_phase::ElectionCompute, - origin: ::core::option::Option<::subxt::utils::AccountId32>, - prev_ejected: ::core::primitive::bool, - }, - #[codec(index = 1)] - #[doc = "The election has been finalized, with the given computation and score."] - ElectionFinalized { - compute: - runtime_types::pallet_election_provider_multi_phase::ElectionCompute, - score: runtime_types::sp_npos_elections::ElectionScore, - }, - #[codec(index = 2)] - #[doc = "An election failed."] - #[doc = ""] - #[doc = "Not much can be said about which computes failed in the process."] - ElectionFailed, - #[codec(index = 3)] - #[doc = "An account has been rewarded for their signed submission being finalized."] - Rewarded { - account: ::subxt::utils::AccountId32, - value: ::core::primitive::u128, - }, - #[codec(index = 4)] - #[doc = "An account has been slashed for submitting an invalid signed submission."] - Slashed { - account: ::subxt::utils::AccountId32, - value: ::core::primitive::u128, - }, - #[codec(index = 5)] - #[doc = "There was a phase transition in a given round."] - PhaseTransitioned { - from: runtime_types::pallet_election_provider_multi_phase::Phase< - ::core::primitive::u32, - >, - to: runtime_types::pallet_election_provider_multi_phase::Phase< - ::core::primitive::u32, - >, - round: ::core::primitive::u32, - }, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct CancelAsMulti { + pub threshold: ::core::primitive::u16, + pub other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, + pub timepoint: + runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, + pub call_hash: [::core::primitive::u8; 32usize], + } + impl ::subxt::blocks::StaticExtrinsic for CancelAsMulti { + const CALL: &'static str = "cancel_as_multi"; + const PALLET: &'static str = "Multisig"; } } - pub mod signed { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct SignedSubmission<_0, _1, _2> { - pub who: _0, - pub deposit: _1, - pub raw_solution: - runtime_types::pallet_election_provider_multi_phase::RawSolution<_2>, - pub call_fee: _1, + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Immediately dispatch a multi-signature call using a single approval from the caller."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "- `other_signatories`: The accounts (other than the sender) who are part of the"] + #[doc = "multi-signature, but do not participate in the approval process."] + #[doc = "- `call`: The call to be executed."] + #[doc = ""] + #[doc = "Result is equivalent to the dispatched result."] + #[doc = ""] + #[doc = "# "] + #[doc = "O(Z + C) where Z is the length of the call and C its execution weight."] + #[doc = "-------------------------------"] + #[doc = "- DB Weight: None"] + #[doc = "- Plus Call Weight"] + #[doc = "# "] + pub fn as_multi_threshold_1( + &self, + other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, + call: runtime_types::da_runtime::RuntimeCall, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Multisig", + "as_multi_threshold_1", + types::AsMultiThreshold1 { + other_signatories, + call: ::std::boxed::Box::new(call), + }, + [ + 189u8, 61u8, 73u8, 79u8, 70u8, 121u8, 135u8, 53u8, 85u8, 127u8, 163u8, + 107u8, 214u8, 113u8, 21u8, 180u8, 238u8, 137u8, 82u8, 24u8, 220u8, + 69u8, 164u8, 87u8, 86u8, 190u8, 92u8, 237u8, 161u8, 250u8, 101u8, 34u8, + ], + ) + } + + #[doc = "Register approval for a dispatch to be made from a deterministic composite account if"] + #[doc = "approved by a total of `threshold - 1` of `other_signatories`."] + #[doc = ""] + #[doc = "If there are enough, then dispatch the call."] + #[doc = ""] + #[doc = "Payment: `DepositBase` will be reserved if this is the first approval, plus"] + #[doc = "`threshold` times `DepositFactor`. It is returned once this dispatch happens or"] + #[doc = "is cancelled."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "- `threshold`: The total number of approvals for this dispatch before it is executed."] + #[doc = "- `other_signatories`: The accounts (other than the sender) who can approve this"] + #[doc = "dispatch. May not be empty."] + #[doc = "- `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is"] + #[doc = "not the first approval, then it must be `Some`, with the timepoint (block number and"] + #[doc = "transaction index) of the first approval transaction."] + #[doc = "- `call`: The call to be executed."] + #[doc = ""] + #[doc = "NOTE: Unless this is the final approval, you will generally want to use"] + #[doc = "`approve_as_multi` instead, since it only requires a hash of the call."] + #[doc = ""] + #[doc = "Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise"] + #[doc = "on success, result is `Ok` and the result from the interior call, if it was executed,"] + #[doc = "may be found in the deposited `MultisigExecuted` event."] + #[doc = ""] + #[doc = "# "] + #[doc = "- `O(S + Z + Call)`."] + #[doc = "- Up to one balance-reserve or unreserve operation."] + #[doc = "- One passthrough operation, one insert, both `O(S)` where `S` is the number of"] + #[doc = " signatories. `S` is capped by `MaxSignatories`, with weight being proportional."] + #[doc = "- One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len."] + #[doc = "- One encode & hash, both of complexity `O(S)`."] + #[doc = "- Up to one binary search and insert (`O(logS + S)`)."] + #[doc = "- I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove."] + #[doc = "- One event."] + #[doc = "- The weight of the `call`."] + #[doc = "- Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit"] + #[doc = " taken for its lifetime of `DepositBase + threshold * DepositFactor`."] + #[doc = "-------------------------------"] + #[doc = "- DB Weight:"] + #[doc = " - Reads: Multisig Storage, [Caller Account]"] + #[doc = " - Writes: Multisig Storage, [Caller Account]"] + #[doc = "- Plus Call Weight"] + #[doc = "# "] + pub fn as_multi( + &self, + threshold: ::core::primitive::u16, + other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, + maybe_timepoint: ::core::option::Option< + runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, + >, + call: runtime_types::da_runtime::RuntimeCall, + max_weight: runtime_types::sp_weights::weight_v2::Weight, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Multisig", + "as_multi", + types::AsMulti { + threshold, + other_signatories, + maybe_timepoint, + call: ::std::boxed::Box::new(call), + max_weight, + }, + [ + 251u8, 27u8, 18u8, 198u8, 130u8, 201u8, 173u8, 22u8, 211u8, 57u8, 60u8, + 79u8, 183u8, 213u8, 38u8, 10u8, 72u8, 215u8, 155u8, 7u8, 232u8, 136u8, + 255u8, 49u8, 41u8, 214u8, 79u8, 104u8, 110u8, 174u8, 41u8, 79u8, + ], + ) + } + + #[doc = "Register approval for a dispatch to be made from a deterministic composite account if"] + #[doc = "approved by a total of `threshold - 1` of `other_signatories`."] + #[doc = ""] + #[doc = "Payment: `DepositBase` will be reserved if this is the first approval, plus"] + #[doc = "`threshold` times `DepositFactor`. It is returned once this dispatch happens or"] + #[doc = "is cancelled."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "- `threshold`: The total number of approvals for this dispatch before it is executed."] + #[doc = "- `other_signatories`: The accounts (other than the sender) who can approve this"] + #[doc = "dispatch. May not be empty."] + #[doc = "- `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is"] + #[doc = "not the first approval, then it must be `Some`, with the timepoint (block number and"] + #[doc = "transaction index) of the first approval transaction."] + #[doc = "- `call_hash`: The hash of the call to be executed."] + #[doc = ""] + #[doc = "NOTE: If this is the final approval, you will want to use `as_multi` instead."] + #[doc = ""] + #[doc = "# "] + #[doc = "- `O(S)`."] + #[doc = "- Up to one balance-reserve or unreserve operation."] + #[doc = "- One passthrough operation, one insert, both `O(S)` where `S` is the number of"] + #[doc = " signatories. `S` is capped by `MaxSignatories`, with weight being proportional."] + #[doc = "- One encode & hash, both of complexity `O(S)`."] + #[doc = "- Up to one binary search and insert (`O(logS + S)`)."] + #[doc = "- I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove."] + #[doc = "- One event."] + #[doc = "- Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit"] + #[doc = " taken for its lifetime of `DepositBase + threshold * DepositFactor`."] + #[doc = "----------------------------------"] + #[doc = "- DB Weight:"] + #[doc = " - Read: Multisig Storage, [Caller Account]"] + #[doc = " - Write: Multisig Storage, [Caller Account]"] + #[doc = "# "] + pub fn approve_as_multi( + &self, + threshold: ::core::primitive::u16, + other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, + maybe_timepoint: ::core::option::Option< + runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, + >, + call_hash: [::core::primitive::u8; 32usize], + max_weight: runtime_types::sp_weights::weight_v2::Weight, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Multisig", + "approve_as_multi", + types::ApproveAsMulti { + threshold, + other_signatories, + maybe_timepoint, + call_hash, + max_weight, + }, + [ + 240u8, 17u8, 138u8, 10u8, 165u8, 3u8, 88u8, 240u8, 11u8, 208u8, 9u8, + 123u8, 95u8, 53u8, 142u8, 8u8, 30u8, 5u8, 130u8, 205u8, 102u8, 95u8, + 71u8, 92u8, 184u8, 92u8, 218u8, 224u8, 146u8, 87u8, 93u8, 224u8, + ], + ) + } + + #[doc = "Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously"] + #[doc = "for this operation will be unreserved on success."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "- `threshold`: The total number of approvals for this dispatch before it is executed."] + #[doc = "- `other_signatories`: The accounts (other than the sender) who can approve this"] + #[doc = "dispatch. May not be empty."] + #[doc = "- `timepoint`: The timepoint (block number and transaction index) of the first approval"] + #[doc = "transaction for this dispatch."] + #[doc = "- `call_hash`: The hash of the call to be executed."] + #[doc = ""] + #[doc = "# "] + #[doc = "- `O(S)`."] + #[doc = "- Up to one balance-reserve or unreserve operation."] + #[doc = "- One passthrough operation, one insert, both `O(S)` where `S` is the number of"] + #[doc = " signatories. `S` is capped by `MaxSignatories`, with weight being proportional."] + #[doc = "- One encode & hash, both of complexity `O(S)`."] + #[doc = "- One event."] + #[doc = "- I/O: 1 read `O(S)`, one remove."] + #[doc = "- Storage: removes one item."] + #[doc = "----------------------------------"] + #[doc = "- DB Weight:"] + #[doc = " - Read: Multisig Storage, [Caller Account], Refund Account"] + #[doc = " - Write: Multisig Storage, [Caller Account], Refund Account"] + #[doc = "# "] + pub fn cancel_as_multi( + &self, + threshold: ::core::primitive::u16, + other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, + timepoint: runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, + call_hash: [::core::primitive::u8; 32usize], + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Multisig", + "cancel_as_multi", + types::CancelAsMulti { + threshold, + other_signatories, + timepoint, + call_hash, + }, + [ + 14u8, 123u8, 126u8, 239u8, 174u8, 101u8, 28u8, 221u8, 117u8, 75u8, + 82u8, 249u8, 151u8, 59u8, 224u8, 239u8, 54u8, 196u8, 244u8, 46u8, 31u8, + 218u8, 224u8, 58u8, 146u8, 165u8, 135u8, 101u8, 189u8, 93u8, 149u8, + 130u8, + ], + ) } } + } + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub type Event = runtime_types::pallet_multisig::pallet::Event; + pub mod events { + use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - pub enum ElectionCompute { - #[codec(index = 0)] - OnChain, - #[codec(index = 1)] - Signed, - #[codec(index = 2)] - Unsigned, - #[codec(index = 3)] - Fallback, - #[codec(index = 4)] - Emergency, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A new multisig operation has begun."] + pub struct NewMultisig { + pub approving: ::subxt::utils::AccountId32, + pub multisig: ::subxt::utils::AccountId32, + pub call_hash: [::core::primitive::u8; 32usize], + } + impl ::subxt::events::StaticEvent for NewMultisig { + const EVENT: &'static str = "NewMultisig"; + const PALLET: &'static str = "Multisig"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - pub enum Phase<_0> { - #[codec(index = 0)] - Off, - #[codec(index = 1)] - Signed, - #[codec(index = 2)] - Unsigned((::core::primitive::bool, _0)), - #[codec(index = 3)] - Emergency, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A multisig operation has been approved by someone."] + pub struct MultisigApproval { + pub approving: ::subxt::utils::AccountId32, + pub timepoint: runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, + pub multisig: ::subxt::utils::AccountId32, + pub call_hash: [::core::primitive::u8; 32usize], + } + impl ::subxt::events::StaticEvent for MultisigApproval { + const EVENT: &'static str = "MultisigApproval"; + const PALLET: &'static str = "Multisig"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - pub struct RawSolution<_0> { - pub solution: _0, - pub score: runtime_types::sp_npos_elections::ElectionScore, - pub round: ::core::primitive::u32, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A multisig operation has been executed."] + pub struct MultisigExecuted { + pub approving: ::subxt::utils::AccountId32, + pub timepoint: runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, + pub multisig: ::subxt::utils::AccountId32, + pub call_hash: [::core::primitive::u8; 32usize], + pub result: ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + } + impl ::subxt::events::StaticEvent for MultisigExecuted { + const EVENT: &'static str = "MultisigExecuted"; + const PALLET: &'static str = "Multisig"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - pub struct ReadySolution { - pub supports: runtime_types::sp_core::bounded::bounded_vec::BoundedVec<( - ::subxt::utils::AccountId32, - runtime_types::sp_npos_elections::Support<::subxt::utils::AccountId32>, - )>, - pub score: runtime_types::sp_npos_elections::ElectionScore, - pub compute: runtime_types::pallet_election_provider_multi_phase::ElectionCompute, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A multisig operation has been cancelled."] + pub struct MultisigCancelled { + pub cancelling: ::subxt::utils::AccountId32, + pub timepoint: runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, + pub multisig: ::subxt::utils::AccountId32, + pub call_hash: [::core::primitive::u8; 32usize], + } + impl ::subxt::events::StaticEvent for MultisigCancelled { + const EVENT: &'static str = "MultisigCancelled"; + const PALLET: &'static str = "Multisig"; + } + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " The set of open multisig operations."] + pub fn multisigs( + &self, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + _1: impl ::std::borrow::Borrow<[::core::primitive::u8; 32usize]>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_multisig::Multisig< + ::core::primitive::u32, + ::core::primitive::u128, + ::subxt::utils::AccountId32, + >, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Multisig", + "Multisigs", + vec![ + ::subxt::storage::address::make_static_storage_map_key(_0.borrow()), + ::subxt::storage::address::make_static_storage_map_key(_1.borrow()), + ], + [ + 22u8, 46u8, 92u8, 90u8, 193u8, 51u8, 12u8, 187u8, 247u8, 141u8, 101u8, + 133u8, 220u8, 5u8, 124u8, 197u8, 149u8, 81u8, 51u8, 194u8, 194u8, 72u8, + 63u8, 249u8, 227u8, 208u8, 58u8, 253u8, 33u8, 107u8, 10u8, 44u8, + ], + ) + } + + #[doc = " The set of open multisig operations."] + pub fn multisigs_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_multisig::Multisig< + ::core::primitive::u32, + ::core::primitive::u128, + ::subxt::utils::AccountId32, + >, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Multisig", + "Multisigs", + Vec::new(), + [ + 22u8, 46u8, 92u8, 90u8, 193u8, 51u8, 12u8, 187u8, 247u8, 141u8, 101u8, + 133u8, 220u8, 5u8, 124u8, 197u8, 149u8, 81u8, 51u8, 194u8, 194u8, 72u8, + 63u8, 249u8, 227u8, 208u8, 58u8, 253u8, 33u8, 107u8, 10u8, 44u8, + ], + ) + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The base amount of currency needed to reserve for creating a multisig execution or to"] + #[doc = " store a dispatch call for later."] + #[doc = ""] + #[doc = " This is held for an additional storage item whose value size is"] + #[doc = " `4 + sizeof((BlockNumber, Balance, AccountId))` bytes and whose key size is"] + #[doc = " `32 + sizeof(AccountId)` bytes."] + pub fn deposit_base(&self) -> ::subxt::constants::Address<::core::primitive::u128> { + ::subxt::constants::Address::new_static("Multisig", "DepositBase", [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, 136u8, + 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, + ]) + } + + #[doc = " The amount of currency needed per unit threshold when creating a multisig execution."] + #[doc = ""] + #[doc = " This is held for adding 32 bytes more into a pre-existing storage value."] + pub fn deposit_factor( + &self, + ) -> ::subxt::constants::Address<::core::primitive::u128> { + ::subxt::constants::Address::new_static("Multisig", "DepositFactor", [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, 136u8, + 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, + ]) + } + + #[doc = " The maximum amount of signatories allowed in the multisig."] + pub fn max_signatories( + &self, + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static("Multisig", "MaxSignatories", [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, 125u8, + 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, 178u8, 197u8, + 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, 145u8, + ]) + } + } + } + } + pub mod voter_list { + use super::{root_mod, runtime_types}; + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub type Error = runtime_types::pallet_bags_list::pallet::Error; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub type Call = runtime_types::pallet_bags_list::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 :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Rebag { + pub dislocated: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + } + impl ::subxt::blocks::StaticExtrinsic for Rebag { + const CALL: &'static str = "rebag"; + const PALLET: &'static str = "VoterList"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct PutInFrontOf { + pub lighter: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + } + impl ::subxt::blocks::StaticExtrinsic for PutInFrontOf { + const CALL: &'static str = "put_in_front_of"; + const PALLET: &'static str = "VoterList"; + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Declare that some `dislocated` account has, through rewards or penalties, sufficiently"] + #[doc = "changed its score that it should properly fall into a different bag than its current"] + #[doc = "one."] + #[doc = ""] + #[doc = "Anyone can call this function about any potentially dislocated account."] + #[doc = ""] + #[doc = "Will always update the stored score of `dislocated` to the correct score, based on"] + #[doc = "`ScoreProvider`."] + #[doc = ""] + #[doc = "If `dislocated` does not exists, it returns an error."] + pub fn rebag( + &self, + dislocated: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "VoterList", + "rebag", + types::Rebag { dislocated }, + [ + 136u8, 83u8, 36u8, 186u8, 29u8, 197u8, 194u8, 38u8, 185u8, 103u8, + 132u8, 73u8, 180u8, 246u8, 141u8, 58u8, 14u8, 74u8, 77u8, 127u8, 235u8, + 179u8, 99u8, 149u8, 243u8, 171u8, 40u8, 97u8, 134u8, 179u8, 2u8, 117u8, + ], + ) + } + + #[doc = "Move the caller's Id directly in front of `lighter`."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and can only be called by the Id of"] + #[doc = "the account going in front of `lighter`."] + #[doc = ""] + #[doc = "Only works if"] + #[doc = "- both nodes are within the same bag,"] + #[doc = "- and `origin` has a greater `Score` than `lighter`."] + pub fn put_in_front_of( + &self, + lighter: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "VoterList", + "put_in_front_of", + types::PutInFrontOf { lighter }, + [ + 61u8, 66u8, 150u8, 46u8, 249u8, 168u8, 25u8, 138u8, 201u8, 233u8, + 191u8, 216u8, 170u8, 197u8, 3u8, 123u8, 116u8, 140u8, 49u8, 226u8, + 65u8, 222u8, 235u8, 27u8, 123u8, 195u8, 169u8, 247u8, 50u8, 125u8, + 245u8, 111u8, + ], + ) + } } + } + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub type Event = runtime_types::pallet_bags_list::pallet::Event; + pub mod events { + use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - pub struct RoundSnapshot { - pub voters: ::std::vec::Vec<( - ::subxt::utils::AccountId32, - ::core::primitive::u64, - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::subxt::utils::AccountId32, - >, - )>, - pub targets: ::std::vec::Vec<::subxt::utils::AccountId32>, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Moved an account from one bag to another."] + pub struct Rebagged { + pub who: ::subxt::utils::AccountId32, + pub from: ::core::primitive::u64, + pub to: ::core::primitive::u64, + } + impl ::subxt::events::StaticEvent for Rebagged { + const EVENT: &'static str = "Rebagged"; + const PALLET: &'static str = "VoterList"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - pub struct SolutionOrSnapshotSize { - #[codec(compact)] - pub voters: ::core::primitive::u32, - #[codec(compact)] - pub targets: ::core::primitive::u32, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Updated the score of some account to the given amount."] + pub struct ScoreUpdated { + pub who: ::subxt::utils::AccountId32, + pub new_score: ::core::primitive::u64, + } + impl ::subxt::events::StaticEvent for ScoreUpdated { + const EVENT: &'static str = "ScoreUpdated"; + const PALLET: &'static str = "VoterList"; } } - pub mod pallet_elections_phragmen { + pub mod storage { use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, + pub struct StorageApi; + impl StorageApi { + #[doc = " A single node, within some bag."] + #[doc = ""] + #[doc = " Nodes store links forward and back within their respective bags."] + pub fn list_nodes( + &self, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_bags_list::list::Node, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "VoterList", + "ListNodes", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], + [ + 252u8, 218u8, 186u8, 230u8, 86u8, 177u8, 112u8, 218u8, 9u8, 62u8, + 217u8, 5u8, 39u8, 70u8, 15u8, 104u8, 157u8, 19u8, 175u8, 136u8, 71u8, + 237u8, 254u8, 254u8, 119u8, 107u8, 84u8, 10u8, 104u8, 142u8, 135u8, + 35u8, + ], + ) + } + + #[doc = " A single node, within some bag."] + #[doc = ""] + #[doc = " Nodes store links forward and back within their respective bags."] + pub fn list_nodes_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_bags_list::list::Node, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "VoterList", + "ListNodes", + Vec::new(), + [ + 252u8, 218u8, 186u8, 230u8, 86u8, 177u8, 112u8, 218u8, 9u8, 62u8, + 217u8, 5u8, 39u8, 70u8, 15u8, 104u8, 157u8, 19u8, 175u8, 136u8, 71u8, + 237u8, 254u8, 254u8, 119u8, 107u8, 84u8, 10u8, 104u8, 142u8, 135u8, + 35u8, + ], + ) + } + + #[doc = "Counter for the related counted storage map"] + pub fn counter_for_list_nodes( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "VoterList", + "CounterForListNodes", + vec![], + [ + 126u8, 150u8, 201u8, 81u8, 155u8, 79u8, 50u8, 48u8, 120u8, 170u8, 3u8, + 104u8, 112u8, 254u8, 106u8, 46u8, 108u8, 126u8, 158u8, 245u8, 95u8, + 88u8, 236u8, 89u8, 79u8, 172u8, 13u8, 146u8, 202u8, 151u8, 122u8, + 132u8, + ], + ) + } + + #[doc = " A bag stored in storage."] + #[doc = ""] + #[doc = " Stores a `Bag` struct, which stores head and tail pointers to itself."] + pub fn list_bags( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u64>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_bags_list::list::Bag, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "VoterList", + "ListBags", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], + [ + 157u8, 147u8, 94u8, 26u8, 37u8, 89u8, 114u8, 210u8, 158u8, 36u8, 155u8, + 0u8, 137u8, 78u8, 65u8, 165u8, 226u8, 192u8, 65u8, 13u8, 244u8, 159u8, + 245u8, 15u8, 210u8, 101u8, 61u8, 111u8, 217u8, 225u8, 197u8, 158u8, + ], + ) + } + + #[doc = " A bag stored in storage."] + #[doc = ""] + #[doc = " Stores a `Bag` struct, which stores head and tail pointers to itself."] + pub fn list_bags_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_bags_list::list::Bag, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "VoterList", + "ListBags", + Vec::new(), + [ + 157u8, 147u8, 94u8, 26u8, 37u8, 89u8, 114u8, 210u8, 158u8, 36u8, 155u8, + 0u8, 137u8, 78u8, 65u8, 165u8, 226u8, 192u8, 65u8, 13u8, 244u8, 159u8, + 245u8, 15u8, 210u8, 101u8, 61u8, 111u8, 217u8, 225u8, 197u8, 158u8, + ], + ) + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The list of thresholds separating the various bags."] + #[doc = ""] + #[doc = " Ids are separated into unsorted bags according to their score. This specifies the"] + #[doc = " thresholds separating the bags. An id's bag is the largest bag for which the id's score"] + #[doc = " is less than or equal to its upper threshold."] + #[doc = ""] + #[doc = " When ids are iterated, higher bags are iterated completely before lower bags. This means"] + #[doc = " that iteration is _semi-sorted_: ids of higher score tend to come before ids of lower"] + #[doc = " score, but peer ids within a particular bag are sorted in insertion order."] + #[doc = ""] + #[doc = " # Expressing the constant"] + #[doc = ""] + #[doc = " This constant must be sorted in strictly increasing order. Duplicate items are not"] + #[doc = " permitted."] + #[doc = ""] + #[doc = " There is an implied upper limit of `Score::MAX`; that value does not need to be"] + #[doc = " specified within the bag. For any two threshold lists, if one ends with"] + #[doc = " `Score::MAX`, the other one does not, and they are otherwise equal, the two"] + #[doc = " lists will behave identically."] + #[doc = ""] + #[doc = " # Calculation"] + #[doc = ""] + #[doc = " It is recommended to generate the set of thresholds in a geometric series, such that"] + #[doc = " there exists some constant ratio such that `threshold[k + 1] == (threshold[k] *"] + #[doc = " constant_ratio).max(threshold[k] + 1)` for all `k`."] + #[doc = ""] + #[doc = " The helpers in the `/utils/frame/generate-bags` module can simplify this calculation."] + #[doc = ""] + #[doc = " # Examples"] + #[doc = ""] + #[doc = " - If `BagThresholds::get().is_empty()`, then all ids are put into the same bag, and"] + #[doc = " iteration is strictly in insertion order."] + #[doc = " - If `BagThresholds::get().len() == 64`, and the thresholds are determined according to"] + #[doc = " the procedure given above, then the constant ratio is equal to 2."] + #[doc = " - If `BagThresholds::get().len() == 200`, and the thresholds are determined according to"] + #[doc = " the procedure given above, then the constant ratio is approximately equal to 1.248."] + #[doc = " - If the threshold list begins `[1, 2, 3, ...]`, then an id with score 0 or 1 will fall"] + #[doc = " into bag 0, an id with score 2 will fall into bag 1, etc."] + #[doc = ""] + #[doc = " # Migration"] + #[doc = ""] + #[doc = " In the event that this list ever changes, a copy of the old bags list must be retained."] + #[doc = " With that `List::migrate` can be called, which will perform the appropriate migration."] + pub fn bag_thresholds( + &self, + ) -> ::subxt::constants::Address<::std::vec::Vec<::core::primitive::u64>> { + ::subxt::constants::Address::new_static("VoterList", "BagThresholds", [ + 215u8, 118u8, 183u8, 172u8, 4u8, 42u8, 248u8, 108u8, 4u8, 110u8, 43u8, + 165u8, 228u8, 7u8, 36u8, 30u8, 135u8, 184u8, 56u8, 201u8, 107u8, 68u8, + 25u8, 164u8, 134u8, 32u8, 82u8, 107u8, 200u8, 219u8, 212u8, 198u8, + ]) + } + } + } + } + pub mod nomination_pools { + use super::{root_mod, runtime_types}; + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub type Error = runtime_types::pallet_nomination_pools::pallet::Error; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub type Call = runtime_types::pallet_nomination_pools::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 :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "Vote for a set of candidates for the upcoming round of election. This can be called to"] - #[doc = "set the initial votes, or update already existing votes."] - #[doc = ""] - #[doc = "Upon initial voting, `value` units of `who`'s balance is locked and a deposit amount is"] - #[doc = "reserved. The deposit is based on the number of votes and can be updated over time."] - #[doc = ""] - #[doc = "The `votes` should:"] - #[doc = " - not be empty."] - #[doc = " - be less than the number of possible candidates. Note that all current members and"] - #[doc = " runners-up are also automatically candidates for the next round."] - #[doc = ""] - #[doc = "If `value` is more than `who`'s free balance, then the maximum of the two is used."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be signed."] - #[doc = ""] - #[doc = "### Warning"] - #[doc = ""] - #[doc = "It is the responsibility of the caller to **NOT** place all of their balance into the"] - #[doc = "lock and keep some for further operations."] - #[doc = ""] - #[doc = "# "] - #[doc = "We assume the maximum weight among all 3 cases: vote_equal, vote_more and vote_less."] - #[doc = "# "] - vote { - votes: ::std::vec::Vec<::subxt::utils::AccountId32>, - #[codec(compact)] - value: ::core::primitive::u128, - }, - #[codec(index = 1)] - #[doc = "Remove `origin` as a voter."] - #[doc = ""] - #[doc = "This removes the lock and returns the deposit."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be signed and be a voter."] - remove_voter, - #[codec(index = 2)] - #[doc = "Submit oneself for candidacy. A fixed amount of deposit is recorded."] - #[doc = ""] - #[doc = "All candidates are wiped at the end of the term. They either become a member/runner-up,"] - #[doc = "or leave the system while their deposit is slashed."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be signed."] - #[doc = ""] - #[doc = "### Warning"] - #[doc = ""] - #[doc = "Even if a candidate ends up being a member, they must call [`Call::renounce_candidacy`]"] - #[doc = "to get their deposit back. Losing the spot in an election will always lead to a slash."] - #[doc = ""] - #[doc = "# "] - #[doc = "The number of current candidates must be provided as witness data."] - #[doc = "# "] - submit_candidacy { - #[codec(compact)] - candidate_count: ::core::primitive::u32, - }, - #[codec(index = 3)] - #[doc = "Renounce one's intention to be a candidate for the next election round. 3 potential"] - #[doc = "outcomes exist:"] - #[doc = ""] - #[doc = "- `origin` is a candidate and not elected in any set. In this case, the deposit is"] - #[doc = " unreserved, returned and origin is removed as a candidate."] - #[doc = "- `origin` is a current runner-up. In this case, the deposit is unreserved, returned and"] - #[doc = " origin is removed as a runner-up."] - #[doc = "- `origin` is a current member. In this case, the deposit is unreserved and origin is"] - #[doc = " removed as a member, consequently not being a candidate for the next round anymore."] - #[doc = " Similar to [`remove_member`](Self::remove_member), if replacement runners exists, they"] - #[doc = " are immediately used. If the prime is renouncing, then no prime will exist until the"] - #[doc = " next round."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be signed, and have one of the above roles."] - #[doc = ""] - #[doc = "# "] - #[doc = "The type of renouncing must be provided as witness data."] - #[doc = "# "] - renounce_candidacy { - renouncing: runtime_types::pallet_elections_phragmen::Renouncing, - }, - #[codec(index = 4)] - #[doc = "Remove a particular member from the set. This is effective immediately and the bond of"] - #[doc = "the outgoing member is slashed."] - #[doc = ""] - #[doc = "If a runner-up is available, then the best runner-up will be removed and replaces the"] - #[doc = "outgoing member. Otherwise, if `rerun_election` is `true`, a new phragmen election is"] - #[doc = "started, else, nothing happens."] - #[doc = ""] - #[doc = "If `slash_bond` is set to true, the bond of the member being removed is slashed. Else,"] - #[doc = "it is returned."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be root."] - #[doc = ""] - #[doc = "Note that this does not affect the designated block number of the next election."] - #[doc = ""] - #[doc = "# "] - #[doc = "If we have a replacement, we use a small weight. Else, since this is a root call and"] - #[doc = "will go into phragmen, we assume full block for now."] - #[doc = "# "] - remove_member { - who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - slash_bond: ::core::primitive::bool, - rerun_election: ::core::primitive::bool, - }, - #[codec(index = 5)] - #[doc = "Clean all voters who are defunct (i.e. they do not serve any purpose at all). The"] - #[doc = "deposit of the removed voters are returned."] - #[doc = ""] - #[doc = "This is an root function to be used only for cleaning the state."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be root."] - #[doc = ""] - #[doc = "# "] - #[doc = "The total number of voters and those that are defunct must be provided as witness data."] - #[doc = "# "] - clean_defunct_voters { - num_voters: ::core::primitive::u32, - num_defunct: ::core::primitive::u32, - }, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Join { + #[codec(compact)] + pub amount: ::core::primitive::u128, + pub pool_id: ::core::primitive::u32, + } + impl ::subxt::blocks::StaticExtrinsic for Join { + const CALL: &'static str = "join"; + const PALLET: &'static str = "NominationPools"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - #[doc = "Cannot vote when no candidates or members exist."] - UnableToVote, - #[codec(index = 1)] - #[doc = "Must vote for at least one candidate."] - NoVotes, - #[codec(index = 2)] - #[doc = "Cannot vote more than candidates."] - TooManyVotes, - #[codec(index = 3)] - #[doc = "Cannot vote more than maximum allowed."] - MaximumVotesExceeded, - #[codec(index = 4)] - #[doc = "Cannot vote with stake less than minimum balance."] - LowBalance, - #[codec(index = 5)] - #[doc = "Voter can not pay voting bond."] - UnableToPayBond, - #[codec(index = 6)] - #[doc = "Must be a voter."] - MustBeVoter, - #[codec(index = 7)] - #[doc = "Duplicated candidate submission."] - DuplicatedCandidate, - #[codec(index = 8)] - #[doc = "Too many candidates have been created."] - TooManyCandidates, - #[codec(index = 9)] - #[doc = "Member cannot re-submit candidacy."] - MemberSubmit, - #[codec(index = 10)] - #[doc = "Runner cannot re-submit candidacy."] - RunnerUpSubmit, - #[codec(index = 11)] - #[doc = "Candidate does not have enough funds."] - InsufficientCandidateFunds, - #[codec(index = 12)] - #[doc = "Not a member."] - NotMember, - #[codec(index = 13)] - #[doc = "The provided count of number of candidates is incorrect."] - InvalidWitnessData, - #[codec(index = 14)] - #[doc = "The provided count of number of votes is incorrect."] - InvalidVoteCount, - #[codec(index = 15)] - #[doc = "The renouncing origin presented a wrong `Renouncing` parameter."] - InvalidRenouncing, - #[codec(index = 16)] - #[doc = "Prediction regarding replacement after member removal is wrong."] - InvalidReplacement, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct BondExtra { + pub extra: + runtime_types::pallet_nomination_pools::BondExtra<::core::primitive::u128>, + } + impl ::subxt::blocks::StaticExtrinsic for BondExtra { + const CALL: &'static str = "bond_extra"; + const PALLET: &'static str = "NominationPools"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub enum Event { - #[codec(index = 0)] - #[doc = "A new term with new_members. This indicates that enough candidates existed to run"] - #[doc = "the election, not that enough have has been elected. The inner value must be examined"] - #[doc = "for this purpose. A `NewTerm(\\[\\])` indicates that some candidates got their bond"] - #[doc = "slashed and none were elected, whilst `EmptyTerm` means that no candidates existed to"] - #[doc = "begin with."] - NewTerm { - new_members: - ::std::vec::Vec<(::subxt::utils::AccountId32, ::core::primitive::u128)>, - }, - #[codec(index = 1)] - #[doc = "No (or not enough) candidates existed for this round. This is different from"] - #[doc = "`NewTerm(\\[\\])`. See the description of `NewTerm`."] - EmptyTerm, - #[codec(index = 2)] - #[doc = "Internal error happened while trying to perform election."] - ElectionError, - #[codec(index = 3)] - #[doc = "A member has been removed. This should always be followed by either `NewTerm` or"] - #[doc = "`EmptyTerm`."] - MemberKicked { member: ::subxt::utils::AccountId32 }, - #[codec(index = 4)] - #[doc = "Someone has renounced their candidacy."] - Renounced { - candidate: ::subxt::utils::AccountId32, - }, - #[codec(index = 5)] - #[doc = "A candidate was slashed by amount due to failing to obtain a seat as member or"] - #[doc = "runner-up."] - #[doc = ""] - #[doc = "Note that old members and runners-up are also candidates."] - CandidateSlashed { - candidate: ::subxt::utils::AccountId32, - amount: ::core::primitive::u128, - }, - #[codec(index = 6)] - #[doc = "A seat holder was slashed by amount by being forcefully removed from the set."] - SeatHolderSlashed { - seat_holder: ::subxt::utils::AccountId32, - amount: ::core::primitive::u128, - }, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ClaimPayout; + impl ::subxt::blocks::StaticExtrinsic for ClaimPayout { + const CALL: &'static str = "claim_payout"; + const PALLET: &'static str = "NominationPools"; } - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub enum Renouncing { - #[codec(index = 0)] - Member, - #[codec(index = 1)] - RunnerUp, - #[codec(index = 2)] - Candidate(#[codec(compact)] ::core::primitive::u32), - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct SeatHolder<_0, _1> { - pub who: _0, - pub stake: _1, - pub deposit: _1, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Voter<_0, _1> { - pub votes: ::std::vec::Vec<_0>, - pub stake: _1, - pub deposit: _1, - } - } - pub mod pallet_grandpa { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "Report voter equivocation/misbehavior. This method will verify the"] - #[doc = "equivocation proof and validate the given key ownership proof"] - #[doc = "against the extracted offender. If both are valid, the offence"] - #[doc = "will be reported."] - report_equivocation { - equivocation_proof: ::std::boxed::Box< - runtime_types::sp_finality_grandpa::EquivocationProof< - ::subxt::utils::H256, - ::core::primitive::u32, - >, - >, - key_owner_proof: runtime_types::sp_session::MembershipProof, - }, - #[codec(index = 1)] - #[doc = "Report voter equivocation/misbehavior. This method will verify the"] - #[doc = "equivocation proof and validate the given key ownership proof"] - #[doc = "against the extracted offender. If both are valid, the offence"] - #[doc = "will be reported."] - #[doc = ""] - #[doc = "This extrinsic must be called unsigned and it is expected that only"] - #[doc = "block authors will call it (validated in `ValidateUnsigned`), as such"] - #[doc = "if the block author is defined it will be defined as the equivocation"] - #[doc = "reporter."] - report_equivocation_unsigned { - equivocation_proof: ::std::boxed::Box< - runtime_types::sp_finality_grandpa::EquivocationProof< - ::subxt::utils::H256, - ::core::primitive::u32, - >, - >, - key_owner_proof: runtime_types::sp_session::MembershipProof, - }, - #[codec(index = 2)] - #[doc = "Note that the current authority set of the GRANDPA finality gadget has stalled."] - #[doc = ""] - #[doc = "This will trigger a forced authority set change at the beginning of the next session, to"] - #[doc = "be enacted `delay` blocks after that. The `delay` should be high enough to safely assume"] - #[doc = "that the block signalling the forced change will not be re-orged e.g. 1000 blocks."] - #[doc = "The block production rate (which may be slowed down because of finality lagging) should"] - #[doc = "be taken into account when choosing the `delay`. The GRANDPA voters based on the new"] - #[doc = "authority will start voting on top of `best_finalized_block_number` for new finalized"] - #[doc = "blocks. `best_finalized_block_number` should be the highest of the latest finalized"] - #[doc = "block of all validators of the new authority set."] - #[doc = ""] - #[doc = "Only callable by root."] - note_stalled { - delay: ::core::primitive::u32, - best_finalized_block_number: ::core::primitive::u32, - }, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Unbond { + pub member_account: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + #[codec(compact)] + pub unbonding_points: ::core::primitive::u128, + } + impl ::subxt::blocks::StaticExtrinsic for Unbond { + const CALL: &'static str = "unbond"; + const PALLET: &'static str = "NominationPools"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - #[doc = "Attempt to signal GRANDPA pause when the authority set isn't live"] - #[doc = "(either paused or already pending pause)."] - PauseFailed, - #[codec(index = 1)] - #[doc = "Attempt to signal GRANDPA resume when the authority set isn't paused"] - #[doc = "(either live or already pending resume)."] - ResumeFailed, - #[codec(index = 2)] - #[doc = "Attempt to signal GRANDPA change with one already pending."] - ChangePending, - #[codec(index = 3)] - #[doc = "Cannot signal forced change so soon after last."] - TooSoon, - #[codec(index = 4)] - #[doc = "A key ownership proof provided as part of an equivocation report is invalid."] - InvalidKeyOwnershipProof, - #[codec(index = 5)] - #[doc = "An equivocation proof provided as part of an equivocation report is invalid."] - InvalidEquivocationProof, - #[codec(index = 6)] - #[doc = "A given equivocation report is valid but already previously reported."] - DuplicateOffenceReport, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct PoolWithdrawUnbonded { + pub pool_id: ::core::primitive::u32, + pub num_slashing_spans: ::core::primitive::u32, + } + impl ::subxt::blocks::StaticExtrinsic for PoolWithdrawUnbonded { + const CALL: &'static str = "pool_withdraw_unbonded"; + const PALLET: &'static str = "NominationPools"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub enum Event { - #[codec(index = 0)] - #[doc = "New authority set has been applied."] - NewAuthorities { - authority_set: ::std::vec::Vec<( - runtime_types::sp_finality_grandpa::app::Public, - ::core::primitive::u64, - )>, - }, - #[codec(index = 1)] - #[doc = "Current authority set has been paused."] - Paused, - #[codec(index = 2)] - #[doc = "Current authority set has been resumed."] - Resumed, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct WithdrawUnbonded { + pub member_account: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + pub num_slashing_spans: ::core::primitive::u32, + } + impl ::subxt::blocks::StaticExtrinsic for WithdrawUnbonded { + const CALL: &'static str = "withdraw_unbonded"; + const PALLET: &'static str = "NominationPools"; } - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct StoredPendingChange<_0> { - pub scheduled_at: _0, - pub delay: _0, - pub next_authorities: - runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec<( - runtime_types::sp_finality_grandpa::app::Public, - ::core::primitive::u64, - )>, - pub forced: ::core::option::Option<_0>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub enum StoredState<_0> { - #[codec(index = 0)] - Live, - #[codec(index = 1)] - PendingPause { scheduled_at: _0, delay: _0 }, - #[codec(index = 2)] - Paused, - #[codec(index = 3)] - PendingResume { scheduled_at: _0, delay: _0 }, - } - } - pub mod pallet_im_online { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "# "] - #[doc = "- Complexity: `O(K + E)` where K is length of `Keys` (heartbeat.validators_len) and E is"] - #[doc = " length of `heartbeat.network_state.external_address`"] - #[doc = " - `O(K)`: decoding of length `K`"] - #[doc = " - `O(E)`: decoding/encoding of length `E`"] - #[doc = "- DbReads: pallet_session `Validators`, pallet_session `CurrentIndex`, `Keys`,"] - #[doc = " `ReceivedHeartbeats`"] - #[doc = "- DbWrites: `ReceivedHeartbeats`"] - #[doc = "# "] - heartbeat { - heartbeat: - runtime_types::pallet_im_online::Heartbeat<::core::primitive::u32>, - signature: runtime_types::pallet_im_online::sr25519::app_sr25519::Signature, - }, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Create { + #[codec(compact)] + pub amount: ::core::primitive::u128, + pub root: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + pub nominator: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + pub state_toggler: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + } + impl ::subxt::blocks::StaticExtrinsic for Create { + const CALL: &'static str = "create"; + const PALLET: &'static str = "NominationPools"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - #[doc = "Non existent public key."] - InvalidKey, - #[codec(index = 1)] - #[doc = "Duplicated heartbeat."] - DuplicatedHeartbeat, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct CreateWithPoolId { + #[codec(compact)] + pub amount: ::core::primitive::u128, + pub root: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + pub nominator: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + pub state_toggler: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + pub pool_id: ::core::primitive::u32, + } + impl ::subxt::blocks::StaticExtrinsic for CreateWithPoolId { + const CALL: &'static str = "create_with_pool_id"; + const PALLET: &'static str = "NominationPools"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub enum Event { - #[codec(index = 0)] - #[doc = "A new heartbeat was received from `AuthorityId`."] - HeartbeatReceived { - authority_id: runtime_types::pallet_im_online::sr25519::app_sr25519::Public, - }, - #[codec(index = 1)] - #[doc = "At the end of the session, no offence was committed."] - AllGood, - #[codec(index = 2)] - #[doc = "At the end of the session, at least one validator was found to be offline."] - SomeOffline { - offline: ::std::vec::Vec<( - ::subxt::utils::AccountId32, - runtime_types::pallet_staking::Exposure< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - >, - )>, - }, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Nominate { + pub pool_id: ::core::primitive::u32, + pub validators: ::std::vec::Vec<::subxt::utils::AccountId32>, } - } - pub mod sr25519 { - use super::runtime_types; - pub mod app_sr25519 { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Public(pub runtime_types::sp_core::sr25519::Public); - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Signature(pub runtime_types::sp_core::sr25519::Signature); + impl ::subxt::blocks::StaticExtrinsic for Nominate { + const CALL: &'static str = "nominate"; + const PALLET: &'static str = "NominationPools"; } - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct BoundedOpaqueNetworkState { - pub peer_id: runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec< - ::core::primitive::u8, - >, - pub external_addresses: - runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec< - runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec< - ::core::primitive::u8, - >, + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetState { + pub pool_id: ::core::primitive::u32, + pub state: runtime_types::pallet_nomination_pools::PoolState, + } + impl ::subxt::blocks::StaticExtrinsic for SetState { + const CALL: &'static str = "set_state"; + const PALLET: &'static str = "NominationPools"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetMetadata { + pub pool_id: ::core::primitive::u32, + pub metadata: ::std::vec::Vec<::core::primitive::u8>, + } + impl ::subxt::blocks::StaticExtrinsic for SetMetadata { + const CALL: &'static str = "set_metadata"; + const PALLET: &'static str = "NominationPools"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetConfigs { + pub min_join_bond: + runtime_types::pallet_nomination_pools::ConfigOp<::core::primitive::u128>, + pub min_create_bond: + runtime_types::pallet_nomination_pools::ConfigOp<::core::primitive::u128>, + pub max_pools: + runtime_types::pallet_nomination_pools::ConfigOp<::core::primitive::u32>, + pub max_members: + runtime_types::pallet_nomination_pools::ConfigOp<::core::primitive::u32>, + pub max_members_per_pool: + runtime_types::pallet_nomination_pools::ConfigOp<::core::primitive::u32>, + } + impl ::subxt::blocks::StaticExtrinsic for SetConfigs { + const CALL: &'static str = "set_configs"; + const PALLET: &'static str = "NominationPools"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct UpdateRoles { + pub pool_id: ::core::primitive::u32, + pub new_root: runtime_types::pallet_nomination_pools::ConfigOp< + ::subxt::utils::AccountId32, >, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Heartbeat<_0> { - pub block_number: _0, - pub network_state: runtime_types::sp_core::offchain::OpaqueNetworkState, - pub session_index: _0, - pub authority_index: _0, - pub validators_len: _0, - } - } - pub mod pallet_indices { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; + pub new_nominator: runtime_types::pallet_nomination_pools::ConfigOp< + ::subxt::utils::AccountId32, + >, + pub new_state_toggler: runtime_types::pallet_nomination_pools::ConfigOp< + ::subxt::utils::AccountId32, + >, + } + impl ::subxt::blocks::StaticExtrinsic for UpdateRoles { + const CALL: &'static str = "update_roles"; + const PALLET: &'static str = "NominationPools"; + } #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "Assign an previously unassigned index."] - #[doc = ""] - #[doc = "Payment: `Deposit` is reserved from the sender account."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - #[doc = ""] - #[doc = "- `index`: the index to be claimed. This must not be in use."] - #[doc = ""] - #[doc = "Emits `IndexAssigned` if successful."] - #[doc = ""] - #[doc = "# "] - #[doc = "- `O(1)`."] - #[doc = "- One storage mutation (codec `O(1)`)."] - #[doc = "- One reserve operation."] - #[doc = "- One event."] - #[doc = "-------------------"] - #[doc = "- DB Weight: 1 Read/Write (Accounts)"] - #[doc = "# "] - claim { index: ::core::primitive::u32 }, - #[codec(index = 1)] - #[doc = "Assign an index already owned by the sender to another account. The balance reservation"] - #[doc = "is effectively transferred to the new account."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - #[doc = ""] - #[doc = "- `index`: the index to be re-assigned. This must be owned by the sender."] - #[doc = "- `new`: the new owner of the index. This function is a no-op if it is equal to sender."] - #[doc = ""] - #[doc = "Emits `IndexAssigned` if successful."] - #[doc = ""] - #[doc = "# "] - #[doc = "- `O(1)`."] - #[doc = "- One storage mutation (codec `O(1)`)."] - #[doc = "- One transfer operation."] - #[doc = "- One event."] - #[doc = "-------------------"] - #[doc = "- DB Weight:"] - #[doc = " - Reads: Indices Accounts, System Account (recipient)"] - #[doc = " - Writes: Indices Accounts, System Account (recipient)"] - #[doc = "# "] - transfer { - new: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - index: ::core::primitive::u32, - }, - #[codec(index = 2)] - #[doc = "Free up an index owned by the sender."] - #[doc = ""] - #[doc = "Payment: Any previous deposit placed for the index is unreserved in the sender account."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and the sender must own the index."] - #[doc = ""] - #[doc = "- `index`: the index to be freed. This must be owned by the sender."] - #[doc = ""] - #[doc = "Emits `IndexFreed` if successful."] - #[doc = ""] - #[doc = "# "] - #[doc = "- `O(1)`."] - #[doc = "- One storage mutation (codec `O(1)`)."] - #[doc = "- One reserve operation."] - #[doc = "- One event."] - #[doc = "-------------------"] - #[doc = "- DB Weight: 1 Read/Write (Accounts)"] - #[doc = "# "] - free { index: ::core::primitive::u32 }, - #[codec(index = 3)] - #[doc = "Force an index to an account. This doesn't require a deposit. If the index is already"] - #[doc = "held, then any deposit is reimbursed to its current owner."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Root_."] - #[doc = ""] - #[doc = "- `index`: the index to be (re-)assigned."] - #[doc = "- `new`: the new owner of the index. This function is a no-op if it is equal to sender."] - #[doc = "- `freeze`: if set to `true`, will freeze the index so it cannot be transferred."] - #[doc = ""] - #[doc = "Emits `IndexAssigned` if successful."] - #[doc = ""] - #[doc = "# "] - #[doc = "- `O(1)`."] - #[doc = "- One storage mutation (codec `O(1)`)."] - #[doc = "- Up to one reserve operation."] - #[doc = "- One event."] - #[doc = "-------------------"] - #[doc = "- DB Weight:"] - #[doc = " - Reads: Indices Accounts, System Account (original owner)"] - #[doc = " - Writes: Indices Accounts, System Account (original owner)"] - #[doc = "# "] - force_transfer { - new: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - index: ::core::primitive::u32, - freeze: ::core::primitive::bool, - }, - #[codec(index = 4)] - #[doc = "Freeze an index so it will always point to the sender account. This consumes the"] - #[doc = "deposit."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and the signing account must have a"] - #[doc = "non-frozen account `index`."] - #[doc = ""] - #[doc = "- `index`: the index to be frozen in place."] - #[doc = ""] - #[doc = "Emits `IndexFrozen` if successful."] - #[doc = ""] - #[doc = "# "] - #[doc = "- `O(1)`."] - #[doc = "- One storage mutation (codec `O(1)`)."] - #[doc = "- Up to one slash operation."] - #[doc = "- One event."] - #[doc = "-------------------"] - #[doc = "- DB Weight: 1 Read/Write (Accounts)"] - #[doc = "# "] - freeze { index: ::core::primitive::u32 }, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - #[doc = "The index was not already assigned."] - NotAssigned, - #[codec(index = 1)] - #[doc = "The index is assigned to another account."] - NotOwner, - #[codec(index = 2)] - #[doc = "The index was not available."] - InUse, - #[codec(index = 3)] - #[doc = "The source and destination accounts are identical."] - NotTransfer, - #[codec(index = 4)] - #[doc = "The index is permanent and may not be freed/changed."] - Permanent, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Chill { + pub pool_id: ::core::primitive::u32, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub enum Event { - #[codec(index = 0)] - #[doc = "A account index was assigned."] - IndexAssigned { - who: ::subxt::utils::AccountId32, - index: ::core::primitive::u32, - }, - #[codec(index = 1)] - #[doc = "A account index has been freed up (unassigned)."] - IndexFreed { index: ::core::primitive::u32 }, - #[codec(index = 2)] - #[doc = "A account index has been frozen to its current account ID."] - IndexFrozen { - index: ::core::primitive::u32, - who: ::subxt::utils::AccountId32, - }, + impl ::subxt::blocks::StaticExtrinsic for Chill { + const CALL: &'static str = "chill"; + const PALLET: &'static str = "NominationPools"; } } - } - pub mod pallet_membership { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "Add a member `who` to the set."] - #[doc = ""] - #[doc = "May only be called from `T::AddOrigin`."] - add_member { - who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - }, - #[codec(index = 1)] - #[doc = "Remove a member `who` from the set."] - #[doc = ""] - #[doc = "May only be called from `T::RemoveOrigin`."] - remove_member { - who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - }, - #[codec(index = 2)] - #[doc = "Swap out one member `remove` for another `add`."] - #[doc = ""] - #[doc = "May only be called from `T::SwapOrigin`."] - #[doc = ""] - #[doc = "Prime membership is *not* passed from `remove` to `add`, if extant."] - swap_member { - remove: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - add: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - }, - #[codec(index = 3)] - #[doc = "Change the membership to a new set, disregarding the existing membership. Be nice and"] - #[doc = "pass `members` pre-sorted."] - #[doc = ""] - #[doc = "May only be called from `T::ResetOrigin`."] - reset_members { - members: ::std::vec::Vec<::subxt::utils::AccountId32>, - }, - #[codec(index = 4)] - #[doc = "Swap out the sending member for some other key `new`."] - #[doc = ""] - #[doc = "May only be called from `Signed` origin of a current member."] - #[doc = ""] - #[doc = "Prime membership is passed from the origin account to `new`, if extant."] - change_key { - new: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - }, - #[codec(index = 5)] - #[doc = "Set the prime member. Must be a current member."] - #[doc = ""] - #[doc = "May only be called from `T::PrimeOrigin`."] - set_prime { - who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - }, - #[codec(index = 6)] - #[doc = "Remove the prime member if it exists."] - #[doc = ""] - #[doc = "May only be called from `T::PrimeOrigin`."] - clear_prime, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - #[doc = "Already a member."] - AlreadyMember, - #[codec(index = 1)] - #[doc = "Not a member."] - NotMember, - #[codec(index = 2)] - #[doc = "Too many members."] - TooManyMembers, + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Stake funds with a pool. The amount to bond is transferred from the member to the"] + #[doc = "pools account and immediately increases the pools bond."] + #[doc = ""] + #[doc = "# Note"] + #[doc = ""] + #[doc = "* An account can only be a member of a single pool."] + #[doc = "* An account cannot join the same pool multiple times."] + #[doc = "* This call will *not* dust the member account, so the member must have at least"] + #[doc = " `existential deposit + amount` in their account."] + #[doc = "* Only a pool with [`PoolState::Open`] can be joined"] + pub fn join( + &self, + amount: ::core::primitive::u128, + pool_id: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "NominationPools", + "join", + types::Join { amount, pool_id }, + [ + 9u8, 24u8, 209u8, 117u8, 242u8, 76u8, 192u8, 40u8, 196u8, 136u8, 158u8, + 182u8, 117u8, 140u8, 164u8, 64u8, 184u8, 160u8, 146u8, 143u8, 173u8, + 180u8, 6u8, 242u8, 203u8, 130u8, 41u8, 176u8, 158u8, 96u8, 94u8, 175u8, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub enum Event { - #[codec(index = 0)] - #[doc = "The given member was added; see the transaction for who."] - MemberAdded, - #[codec(index = 1)] - #[doc = "The given member was removed; see the transaction for who."] - MemberRemoved, - #[codec(index = 2)] - #[doc = "Two members were swapped; see the transaction for who."] - MembersSwapped, - #[codec(index = 3)] - #[doc = "The membership was reset; see the transaction for who the new set is."] - MembersReset, - #[codec(index = 4)] - #[doc = "One of the members' keys changed."] - KeyChanged, - #[codec(index = 5)] - #[doc = "Phantom member, never used."] - Dummy, + + #[doc = "Bond `extra` more funds from `origin` into the pool to which they already belong."] + #[doc = ""] + #[doc = "Additional funds can come from either the free balance of the account, of from the"] + #[doc = "accumulated rewards, see [`BondExtra`]."] + #[doc = ""] + #[doc = "Bonding extra funds implies an automatic payout of all pending rewards as well."] + pub fn bond_extra( + &self, + extra: runtime_types::pallet_nomination_pools::BondExtra< + ::core::primitive::u128, + >, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "NominationPools", + "bond_extra", + types::BondExtra { extra }, + [ + 149u8, 176u8, 102u8, 52u8, 76u8, 227u8, 61u8, 60u8, 109u8, 187u8, 40u8, + 176u8, 163u8, 37u8, 10u8, 228u8, 164u8, 77u8, 155u8, 155u8, 14u8, + 106u8, 5u8, 177u8, 176u8, 224u8, 163u8, 28u8, 66u8, 237u8, 186u8, + 188u8, + ], + ) } - } - } - pub mod pallet_multisig { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "Immediately dispatch a multi-signature call using a single approval from the caller."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - #[doc = ""] - #[doc = "- `other_signatories`: The accounts (other than the sender) who are part of the"] - #[doc = "multi-signature, but do not participate in the approval process."] - #[doc = "- `call`: The call to be executed."] - #[doc = ""] - #[doc = "Result is equivalent to the dispatched result."] - #[doc = ""] - #[doc = "# "] - #[doc = "O(Z + C) where Z is the length of the call and C its execution weight."] - #[doc = "-------------------------------"] - #[doc = "- DB Weight: None"] - #[doc = "- Plus Call Weight"] - #[doc = "# "] - as_multi_threshold_1 { - other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, - call: ::std::boxed::Box, - }, - #[codec(index = 1)] - #[doc = "Register approval for a dispatch to be made from a deterministic composite account if"] - #[doc = "approved by a total of `threshold - 1` of `other_signatories`."] - #[doc = ""] - #[doc = "If there are enough, then dispatch the call."] - #[doc = ""] - #[doc = "Payment: `DepositBase` will be reserved if this is the first approval, plus"] - #[doc = "`threshold` times `DepositFactor`. It is returned once this dispatch happens or"] - #[doc = "is cancelled."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - #[doc = ""] - #[doc = "- `threshold`: The total number of approvals for this dispatch before it is executed."] - #[doc = "- `other_signatories`: The accounts (other than the sender) who can approve this"] - #[doc = "dispatch. May not be empty."] - #[doc = "- `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is"] - #[doc = "not the first approval, then it must be `Some`, with the timepoint (block number and"] - #[doc = "transaction index) of the first approval transaction."] - #[doc = "- `call`: The call to be executed."] - #[doc = ""] - #[doc = "NOTE: Unless this is the final approval, you will generally want to use"] - #[doc = "`approve_as_multi` instead, since it only requires a hash of the call."] - #[doc = ""] - #[doc = "Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise"] - #[doc = "on success, result is `Ok` and the result from the interior call, if it was executed,"] - #[doc = "may be found in the deposited `MultisigExecuted` event."] - #[doc = ""] - #[doc = "# "] - #[doc = "- `O(S + Z + Call)`."] - #[doc = "- Up to one balance-reserve or unreserve operation."] - #[doc = "- One passthrough operation, one insert, both `O(S)` where `S` is the number of"] - #[doc = " signatories. `S` is capped by `MaxSignatories`, with weight being proportional."] - #[doc = "- One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len."] - #[doc = "- One encode & hash, both of complexity `O(S)`."] - #[doc = "- Up to one binary search and insert (`O(logS + S)`)."] - #[doc = "- I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove."] - #[doc = "- One event."] - #[doc = "- The weight of the `call`."] - #[doc = "- Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit"] - #[doc = " taken for its lifetime of `DepositBase + threshold * DepositFactor`."] - #[doc = "-------------------------------"] - #[doc = "- DB Weight:"] - #[doc = " - Reads: Multisig Storage, [Caller Account]"] - #[doc = " - Writes: Multisig Storage, [Caller Account]"] - #[doc = "- Plus Call Weight"] - #[doc = "# "] - as_multi { - threshold: ::core::primitive::u16, - other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, - maybe_timepoint: ::core::option::Option< - runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, - >, - call: ::std::boxed::Box, - max_weight: runtime_types::sp_weights::weight_v2::Weight, - }, - #[codec(index = 2)] - #[doc = "Register approval for a dispatch to be made from a deterministic composite account if"] - #[doc = "approved by a total of `threshold - 1` of `other_signatories`."] - #[doc = ""] - #[doc = "Payment: `DepositBase` will be reserved if this is the first approval, plus"] - #[doc = "`threshold` times `DepositFactor`. It is returned once this dispatch happens or"] - #[doc = "is cancelled."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - #[doc = ""] - #[doc = "- `threshold`: The total number of approvals for this dispatch before it is executed."] - #[doc = "- `other_signatories`: The accounts (other than the sender) who can approve this"] - #[doc = "dispatch. May not be empty."] - #[doc = "- `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is"] - #[doc = "not the first approval, then it must be `Some`, with the timepoint (block number and"] - #[doc = "transaction index) of the first approval transaction."] - #[doc = "- `call_hash`: The hash of the call to be executed."] - #[doc = ""] - #[doc = "NOTE: If this is the final approval, you will want to use `as_multi` instead."] - #[doc = ""] - #[doc = "# "] - #[doc = "- `O(S)`."] - #[doc = "- Up to one balance-reserve or unreserve operation."] - #[doc = "- One passthrough operation, one insert, both `O(S)` where `S` is the number of"] - #[doc = " signatories. `S` is capped by `MaxSignatories`, with weight being proportional."] - #[doc = "- One encode & hash, both of complexity `O(S)`."] - #[doc = "- Up to one binary search and insert (`O(logS + S)`)."] - #[doc = "- I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove."] - #[doc = "- One event."] - #[doc = "- Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit"] - #[doc = " taken for its lifetime of `DepositBase + threshold * DepositFactor`."] - #[doc = "----------------------------------"] - #[doc = "- DB Weight:"] - #[doc = " - Read: Multisig Storage, [Caller Account]"] - #[doc = " - Write: Multisig Storage, [Caller Account]"] - #[doc = "# "] - approve_as_multi { - threshold: ::core::primitive::u16, - other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, - maybe_timepoint: ::core::option::Option< - runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, - >, - call_hash: [::core::primitive::u8; 32usize], - max_weight: runtime_types::sp_weights::weight_v2::Weight, - }, - #[codec(index = 3)] - #[doc = "Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously"] - #[doc = "for this operation will be unreserved on success."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - #[doc = ""] - #[doc = "- `threshold`: The total number of approvals for this dispatch before it is executed."] - #[doc = "- `other_signatories`: The accounts (other than the sender) who can approve this"] - #[doc = "dispatch. May not be empty."] - #[doc = "- `timepoint`: The timepoint (block number and transaction index) of the first approval"] - #[doc = "transaction for this dispatch."] - #[doc = "- `call_hash`: The hash of the call to be executed."] - #[doc = ""] - #[doc = "# "] - #[doc = "- `O(S)`."] - #[doc = "- Up to one balance-reserve or unreserve operation."] - #[doc = "- One passthrough operation, one insert, both `O(S)` where `S` is the number of"] - #[doc = " signatories. `S` is capped by `MaxSignatories`, with weight being proportional."] - #[doc = "- One encode & hash, both of complexity `O(S)`."] - #[doc = "- One event."] - #[doc = "- I/O: 1 read `O(S)`, one remove."] - #[doc = "- Storage: removes one item."] - #[doc = "----------------------------------"] - #[doc = "- DB Weight:"] - #[doc = " - Read: Multisig Storage, [Caller Account], Refund Account"] - #[doc = " - Write: Multisig Storage, [Caller Account], Refund Account"] - #[doc = "# "] - cancel_as_multi { - threshold: ::core::primitive::u16, - other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, - timepoint: - runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, - call_hash: [::core::primitive::u8; 32usize], - }, + + #[doc = "A bonded member can use this to claim their payout based on the rewards that the pool"] + #[doc = "has accumulated since their last claimed payout (OR since joining if this is there first"] + #[doc = "time claiming rewards). The payout will be transferred to the member's account."] + #[doc = ""] + #[doc = "The member will earn rewards pro rata based on the members stake vs the sum of the"] + #[doc = "members in the pools stake. Rewards do not \"expire\"."] + pub fn claim_payout(&self) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "NominationPools", + "claim_payout", + types::ClaimPayout {}, + [ + 28u8, 87u8, 180u8, 5u8, 69u8, 49u8, 121u8, 28u8, 34u8, 63u8, 78u8, + 228u8, 223u8, 12u8, 171u8, 41u8, 181u8, 137u8, 145u8, 141u8, 198u8, + 220u8, 5u8, 101u8, 173u8, 69u8, 222u8, 59u8, 111u8, 92u8, 182u8, 8u8, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - #[doc = "Threshold must be 2 or greater."] - MinimumThreshold, - #[codec(index = 1)] - #[doc = "Call is already approved by this signatory."] - AlreadyApproved, - #[codec(index = 2)] - #[doc = "Call doesn't need any (more) approvals."] - NoApprovalsNeeded, - #[codec(index = 3)] - #[doc = "There are too few signatories in the list."] - TooFewSignatories, - #[codec(index = 4)] - #[doc = "There are too many signatories in the list."] - TooManySignatories, - #[codec(index = 5)] - #[doc = "The signatories were provided out of order; they should be ordered."] - SignatoriesOutOfOrder, - #[codec(index = 6)] - #[doc = "The sender was contained in the other signatories; it shouldn't be."] - SenderInSignatories, - #[codec(index = 7)] - #[doc = "Multisig operation not found when attempting to cancel."] - NotFound, - #[codec(index = 8)] - #[doc = "Only the account that originally created the multisig is able to cancel it."] - NotOwner, - #[codec(index = 9)] - #[doc = "No timepoint was given, yet the multisig operation is already underway."] - NoTimepoint, - #[codec(index = 10)] - #[doc = "A different timepoint was given to the multisig operation that is underway."] - WrongTimepoint, - #[codec(index = 11)] - #[doc = "A timepoint was given, yet no multisig operation is underway."] - UnexpectedTimepoint, - #[codec(index = 12)] - #[doc = "The maximum weight information provided was too low."] - MaxWeightTooLow, - #[codec(index = 13)] - #[doc = "The data to be stored is already stored."] - AlreadyStored, + + #[doc = "Unbond up to `unbonding_points` of the `member_account`'s funds from the pool. It"] + #[doc = "implicitly collects the rewards one last time, since not doing so would mean some"] + #[doc = "rewards would be forfeited."] + #[doc = ""] + #[doc = "Under certain conditions, this call can be dispatched permissionlessly (i.e. by any"] + #[doc = "account)."] + #[doc = ""] + #[doc = "# Conditions for a permissionless dispatch."] + #[doc = ""] + #[doc = "* The pool is blocked and the caller is either the root or state-toggler. This is"] + #[doc = " refereed to as a kick."] + #[doc = "* The pool is destroying and the member is not the depositor."] + #[doc = "* The pool is destroying, the member is the depositor and no other members are in the"] + #[doc = " pool."] + #[doc = ""] + #[doc = "## Conditions for permissioned dispatch (i.e. the caller is also the"] + #[doc = "`member_account`):"] + #[doc = ""] + #[doc = "* The caller is not the depositor."] + #[doc = "* The caller is the depositor, the pool is destroying and no other members are in the"] + #[doc = " pool."] + #[doc = ""] + #[doc = "# Note"] + #[doc = ""] + #[doc = "If there are too many unlocking chunks to unbond with the pool account,"] + #[doc = "[`Call::pool_withdraw_unbonded`] can be called to try and minimize unlocking chunks."] + #[doc = "The [`StakingInterface::unbond`] will implicitly call [`Call::pool_withdraw_unbonded`]"] + #[doc = "to try to free chunks if necessary (ie. if unbound was called and no unlocking chunks"] + #[doc = "are available). However, it may not be possible to release the current unlocking chunks,"] + #[doc = "in which case, the result of this call will likely be the `NoMoreChunks` error from the"] + #[doc = "staking system."] + pub fn unbond( + &self, + member_account: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + unbonding_points: ::core::primitive::u128, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "NominationPools", + "unbond", + types::Unbond { + member_account, + unbonding_points, + }, + [ + 230u8, 112u8, 85u8, 216u8, 164u8, 250u8, 5u8, 18u8, 50u8, 206u8, 194u8, + 0u8, 167u8, 149u8, 220u8, 212u8, 138u8, 33u8, 117u8, 130u8, 47u8, + 197u8, 113u8, 30u8, 84u8, 83u8, 1u8, 105u8, 58u8, 182u8, 44u8, 225u8, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub enum Event { - #[codec(index = 0)] - #[doc = "A new multisig operation has begun."] - NewMultisig { - approving: ::subxt::utils::AccountId32, - multisig: ::subxt::utils::AccountId32, - call_hash: [::core::primitive::u8; 32usize], - }, - #[codec(index = 1)] - #[doc = "A multisig operation has been approved by someone."] - MultisigApproval { - approving: ::subxt::utils::AccountId32, - timepoint: - runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, - multisig: ::subxt::utils::AccountId32, - call_hash: [::core::primitive::u8; 32usize], - }, - #[codec(index = 2)] - #[doc = "A multisig operation has been executed."] - MultisigExecuted { - approving: ::subxt::utils::AccountId32, - timepoint: - runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, - multisig: ::subxt::utils::AccountId32, - call_hash: [::core::primitive::u8; 32usize], - result: - ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - }, - #[codec(index = 3)] - #[doc = "A multisig operation has been cancelled."] - MultisigCancelled { - cancelling: ::subxt::utils::AccountId32, - timepoint: - runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, - multisig: ::subxt::utils::AccountId32, - call_hash: [::core::primitive::u8; 32usize], - }, + + #[doc = "Call `withdraw_unbonded` for the pools account. This call can be made by any account."] + #[doc = ""] + #[doc = "This is useful if their are too many unlocking chunks to call `unbond`, and some"] + #[doc = "can be cleared by withdrawing. In the case there are too many unlocking chunks, the user"] + #[doc = "would probably see an error like `NoMoreChunks` emitted from the staking system when"] + #[doc = "they attempt to unbond."] + pub fn pool_withdraw_unbonded( + &self, + pool_id: ::core::primitive::u32, + num_slashing_spans: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "NominationPools", + "pool_withdraw_unbonded", + types::PoolWithdrawUnbonded { + pool_id, + num_slashing_spans, + }, + [ + 234u8, 49u8, 43u8, 199u8, 55u8, 2u8, 252u8, 39u8, 147u8, 136u8, 34u8, + 239u8, 116u8, 155u8, 129u8, 72u8, 83u8, 161u8, 90u8, 207u8, 1u8, 193u8, + 254u8, 47u8, 40u8, 185u8, 67u8, 55u8, 238u8, 122u8, 140u8, 230u8, + ], + ) } - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Multisig<_0, _1, _2> { - pub when: runtime_types::pallet_multisig::Timepoint<_0>, - pub deposit: _1, - pub depositor: _2, - pub approvals: runtime_types::sp_core::bounded::bounded_vec::BoundedVec<_2>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Timepoint<_0> { - pub height: _0, - pub index: _0, - } - } - pub mod pallet_nomination_pools { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "Stake funds with a pool. The amount to bond is transferred from the member to the"] - #[doc = "pools account and immediately increases the pools bond."] - #[doc = ""] - #[doc = "# Note"] - #[doc = ""] - #[doc = "* An account can only be a member of a single pool."] - #[doc = "* An account cannot join the same pool multiple times."] - #[doc = "* This call will *not* dust the member account, so the member must have at least"] - #[doc = " `existential deposit + amount` in their account."] - #[doc = "* Only a pool with [`PoolState::Open`] can be joined"] - join { - #[codec(compact)] - amount: ::core::primitive::u128, - pool_id: ::core::primitive::u32, - }, - #[codec(index = 1)] - #[doc = "Bond `extra` more funds from `origin` into the pool to which they already belong."] - #[doc = ""] - #[doc = "Additional funds can come from either the free balance of the account, of from the"] - #[doc = "accumulated rewards, see [`BondExtra`]."] - #[doc = ""] - #[doc = "Bonding extra funds implies an automatic payout of all pending rewards as well."] - bond_extra { - extra: runtime_types::pallet_nomination_pools::BondExtra< - ::core::primitive::u128, - >, - }, - #[codec(index = 2)] - #[doc = "A bonded member can use this to claim their payout based on the rewards that the pool"] - #[doc = "has accumulated since their last claimed payout (OR since joining if this is there first"] - #[doc = "time claiming rewards). The payout will be transferred to the member's account."] - #[doc = ""] - #[doc = "The member will earn rewards pro rata based on the members stake vs the sum of the"] - #[doc = "members in the pools stake. Rewards do not \"expire\"."] - claim_payout, - #[codec(index = 3)] - #[doc = "Unbond up to `unbonding_points` of the `member_account`'s funds from the pool. It"] - #[doc = "implicitly collects the rewards one last time, since not doing so would mean some"] - #[doc = "rewards would be forfeited."] - #[doc = ""] - #[doc = "Under certain conditions, this call can be dispatched permissionlessly (i.e. by any"] - #[doc = "account)."] - #[doc = ""] - #[doc = "# Conditions for a permissionless dispatch."] - #[doc = ""] - #[doc = "* The pool is blocked and the caller is either the root or state-toggler. This is"] - #[doc = " refereed to as a kick."] - #[doc = "* The pool is destroying and the member is not the depositor."] - #[doc = "* The pool is destroying, the member is the depositor and no other members are in the"] - #[doc = " pool."] - #[doc = ""] - #[doc = "## Conditions for permissioned dispatch (i.e. the caller is also the"] - #[doc = "`member_account`):"] - #[doc = ""] - #[doc = "* The caller is not the depositor."] - #[doc = "* The caller is the depositor, the pool is destroying and no other members are in the"] - #[doc = " pool."] - #[doc = ""] - #[doc = "# Note"] - #[doc = ""] - #[doc = "If there are too many unlocking chunks to unbond with the pool account,"] - #[doc = "[`Call::pool_withdraw_unbonded`] can be called to try and minimize unlocking chunks."] - #[doc = "The [`StakingInterface::unbond`] will implicitly call [`Call::pool_withdraw_unbonded`]"] - #[doc = "to try to free chunks if necessary (ie. if unbound was called and no unlocking chunks"] - #[doc = "are available). However, it may not be possible to release the current unlocking chunks,"] - #[doc = "in which case, the result of this call will likely be the `NoMoreChunks` error from the"] - #[doc = "staking system."] - unbond { - member_account: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - #[codec(compact)] - unbonding_points: ::core::primitive::u128, - }, - #[codec(index = 4)] - #[doc = "Call `withdraw_unbonded` for the pools account. This call can be made by any account."] - #[doc = ""] - #[doc = "This is useful if their are too many unlocking chunks to call `unbond`, and some"] - #[doc = "can be cleared by withdrawing. In the case there are too many unlocking chunks, the user"] - #[doc = "would probably see an error like `NoMoreChunks` emitted from the staking system when"] - #[doc = "they attempt to unbond."] - pool_withdraw_unbonded { - pool_id: ::core::primitive::u32, - num_slashing_spans: ::core::primitive::u32, - }, - #[codec(index = 5)] - #[doc = "Withdraw unbonded funds from `member_account`. If no bonded funds can be unbonded, an"] - #[doc = "error is returned."] - #[doc = ""] - #[doc = "Under certain conditions, this call can be dispatched permissionlessly (i.e. by any"] - #[doc = "account)."] - #[doc = ""] - #[doc = "# Conditions for a permissionless dispatch"] - #[doc = ""] - #[doc = "* The pool is in destroy mode and the target is not the depositor."] - #[doc = "* The target is the depositor and they are the only member in the sub pools."] - #[doc = "* The pool is blocked and the caller is either the root or state-toggler."] - #[doc = ""] - #[doc = "# Conditions for permissioned dispatch"] - #[doc = ""] - #[doc = "* The caller is the target and they are not the depositor."] - #[doc = ""] - #[doc = "# Note"] - #[doc = ""] - #[doc = "If the target is the depositor, the pool will be destroyed."] - withdraw_unbonded { - member_account: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - num_slashing_spans: ::core::primitive::u32, - }, - #[codec(index = 6)] - #[doc = "Create a new delegation pool."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `amount` - The amount of funds to delegate to the pool. This also acts of a sort of"] - #[doc = " deposit since the pools creator cannot fully unbond funds until the pool is being"] - #[doc = " destroyed."] - #[doc = "* `index` - A disambiguation index for creating the account. Likely only useful when"] - #[doc = " creating multiple pools in the same extrinsic."] - #[doc = "* `root` - The account to set as [`PoolRoles::root`]."] - #[doc = "* `nominator` - The account to set as the [`PoolRoles::nominator`]."] - #[doc = "* `state_toggler` - The account to set as the [`PoolRoles::state_toggler`]."] - #[doc = ""] - #[doc = "# Note"] - #[doc = ""] - #[doc = "In addition to `amount`, the caller will transfer the existential deposit; so the caller"] - #[doc = "needs at have at least `amount + existential_deposit` transferrable."] - create { - #[codec(compact)] - amount: ::core::primitive::u128, - root: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - nominator: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - state_toggler: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - }, - #[codec(index = 7)] - #[doc = "Create a new delegation pool with a previously used pool id"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "same as `create` with the inclusion of"] - #[doc = "* `pool_id` - `A valid PoolId."] - create_with_pool_id { - #[codec(compact)] - amount: ::core::primitive::u128, - root: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - nominator: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - state_toggler: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pool_id: ::core::primitive::u32, - }, - #[codec(index = 8)] - #[doc = "Nominate on behalf of the pool."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be signed by the pool nominator or the pool"] - #[doc = "root role."] - #[doc = ""] - #[doc = "This directly forward the call to the staking pallet, on behalf of the pool bonded"] - #[doc = "account."] - nominate { - pool_id: ::core::primitive::u32, - validators: ::std::vec::Vec<::subxt::utils::AccountId32>, - }, - #[codec(index = 9)] - #[doc = "Set a new state for the pool."] - #[doc = ""] - #[doc = "If a pool is already in the `Destroying` state, then under no condition can its state"] - #[doc = "change again."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be either:"] - #[doc = ""] - #[doc = "1. signed by the state toggler, or the root role of the pool,"] - #[doc = "2. if the pool conditions to be open are NOT met (as described by `ok_to_be_open`), and"] - #[doc = " then the state of the pool can be permissionlessly changed to `Destroying`."] - set_state { - pool_id: ::core::primitive::u32, - state: runtime_types::pallet_nomination_pools::PoolState, - }, - #[codec(index = 10)] - #[doc = "Set a new metadata for the pool."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be signed by the state toggler, or the root role"] - #[doc = "of the pool."] - set_metadata { - pool_id: ::core::primitive::u32, - metadata: ::std::vec::Vec<::core::primitive::u8>, - }, - #[codec(index = 11)] - #[doc = "Update configurations for the nomination pools. The origin for this call must be"] - #[doc = "Root."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `min_join_bond` - Set [`MinJoinBond`]."] - #[doc = "* `min_create_bond` - Set [`MinCreateBond`]."] - #[doc = "* `max_pools` - Set [`MaxPools`]."] - #[doc = "* `max_members` - Set [`MaxPoolMembers`]."] - #[doc = "* `max_members_per_pool` - Set [`MaxPoolMembersPerPool`]."] - set_configs { - min_join_bond: runtime_types::pallet_nomination_pools::ConfigOp< - ::core::primitive::u128, - >, - min_create_bond: runtime_types::pallet_nomination_pools::ConfigOp< - ::core::primitive::u128, - >, - max_pools: runtime_types::pallet_nomination_pools::ConfigOp< - ::core::primitive::u32, - >, - max_members: runtime_types::pallet_nomination_pools::ConfigOp< - ::core::primitive::u32, - >, - max_members_per_pool: runtime_types::pallet_nomination_pools::ConfigOp< - ::core::primitive::u32, - >, - }, - #[codec(index = 12)] - #[doc = "Update the roles of the pool."] - #[doc = ""] - #[doc = "The root is the only entity that can change any of the roles, including itself,"] - #[doc = "excluding the depositor, who can never change."] - #[doc = ""] - #[doc = "It emits an event, notifying UIs of the role change. This event is quite relevant to"] - #[doc = "most pool members and they should be informed of changes to pool roles."] - update_roles { - pool_id: ::core::primitive::u32, - new_root: runtime_types::pallet_nomination_pools::ConfigOp< - ::subxt::utils::AccountId32, - >, - new_nominator: runtime_types::pallet_nomination_pools::ConfigOp< - ::subxt::utils::AccountId32, - >, - new_state_toggler: runtime_types::pallet_nomination_pools::ConfigOp< - ::subxt::utils::AccountId32, - >, - }, - #[codec(index = 13)] - #[doc = "Chill on behalf of the pool."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be signed by the pool nominator or the pool"] - #[doc = "root role, same as [`Pallet::nominate`]."] - #[doc = ""] - #[doc = "This directly forward the call to the staking pallet, on behalf of the pool bonded"] - #[doc = "account."] - chill { pool_id: ::core::primitive::u32 }, + + #[doc = "Withdraw unbonded funds from `member_account`. If no bonded funds can be unbonded, an"] + #[doc = "error is returned."] + #[doc = ""] + #[doc = "Under certain conditions, this call can be dispatched permissionlessly (i.e. by any"] + #[doc = "account)."] + #[doc = ""] + #[doc = "# Conditions for a permissionless dispatch"] + #[doc = ""] + #[doc = "* The pool is in destroy mode and the target is not the depositor."] + #[doc = "* The target is the depositor and they are the only member in the sub pools."] + #[doc = "* The pool is blocked and the caller is either the root or state-toggler."] + #[doc = ""] + #[doc = "# Conditions for permissioned dispatch"] + #[doc = ""] + #[doc = "* The caller is the target and they are not the depositor."] + #[doc = ""] + #[doc = "# Note"] + #[doc = ""] + #[doc = "If the target is the depositor, the pool will be destroyed."] + pub fn withdraw_unbonded( + &self, + member_account: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + num_slashing_spans: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "NominationPools", + "withdraw_unbonded", + types::WithdrawUnbonded { + member_account, + num_slashing_spans, + }, + [ + 252u8, 38u8, 22u8, 98u8, 64u8, 133u8, 118u8, 62u8, 179u8, 226u8, 212u8, + 186u8, 32u8, 227u8, 253u8, 119u8, 200u8, 53u8, 35u8, 193u8, 20u8, 64u8, + 232u8, 35u8, 221u8, 37u8, 63u8, 10u8, 7u8, 250u8, 176u8, 238u8, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub enum DefensiveError { - #[codec(index = 0)] - NotEnoughSpaceInUnbondPool, - #[codec(index = 1)] - PoolNotFound, - #[codec(index = 2)] - RewardPoolNotFound, - #[codec(index = 3)] - SubPoolsNotFound, - #[codec(index = 4)] - BondedStashKilledPrematurely, + + #[doc = "Create a new delegation pool."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `amount` - The amount of funds to delegate to the pool. This also acts of a sort of"] + #[doc = " deposit since the pools creator cannot fully unbond funds until the pool is being"] + #[doc = " destroyed."] + #[doc = "* `index` - A disambiguation index for creating the account. Likely only useful when"] + #[doc = " creating multiple pools in the same extrinsic."] + #[doc = "* `root` - The account to set as [`PoolRoles::root`]."] + #[doc = "* `nominator` - The account to set as the [`PoolRoles::nominator`]."] + #[doc = "* `state_toggler` - The account to set as the [`PoolRoles::state_toggler`]."] + #[doc = ""] + #[doc = "# Note"] + #[doc = ""] + #[doc = "In addition to `amount`, the caller will transfer the existential deposit; so the caller"] + #[doc = "needs at have at least `amount + existential_deposit` transferrable."] + pub fn create( + &self, + amount: ::core::primitive::u128, + root: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + nominator: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + state_toggler: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "NominationPools", + "create", + types::Create { + amount, + root, + nominator, + state_toggler, + }, + [ + 249u8, 135u8, 178u8, 135u8, 148u8, 28u8, 232u8, 17u8, 166u8, 105u8, + 98u8, 216u8, 201u8, 186u8, 74u8, 174u8, 216u8, 25u8, 34u8, 206u8, + 107u8, 36u8, 248u8, 52u8, 239u8, 23u8, 87u8, 27u8, 4u8, 42u8, 205u8, + 180u8, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - #[doc = "A (bonded) pool id does not exist."] - PoolNotFound, - #[codec(index = 1)] - #[doc = "An account is not a member."] - PoolMemberNotFound, - #[codec(index = 2)] - #[doc = "A reward pool does not exist. In all cases this is a system logic error."] - RewardPoolNotFound, - #[codec(index = 3)] - #[doc = "A sub pool does not exist."] - SubPoolsNotFound, - #[codec(index = 4)] - #[doc = "An account is already delegating in another pool. An account may only belong to one"] - #[doc = "pool at a time."] - AccountBelongsToOtherPool, - #[codec(index = 5)] - #[doc = "The member is fully unbonded (and thus cannot access the bonded and reward pool"] - #[doc = "anymore to, for example, collect rewards)."] - FullyUnbonding, - #[codec(index = 6)] - #[doc = "The member cannot unbond further chunks due to reaching the limit."] - MaxUnbondingLimit, - #[codec(index = 7)] - #[doc = "None of the funds can be withdrawn yet because the bonding duration has not passed."] - CannotWithdrawAny, - #[codec(index = 8)] - #[doc = "The amount does not meet the minimum bond to either join or create a pool."] - #[doc = ""] - #[doc = "The depositor can never unbond to a value less than"] - #[doc = "`Pallet::depositor_min_bond`. The caller does not have nominating"] - #[doc = "permissions for the pool. Members can never unbond to a value below `MinJoinBond`."] - MinimumBondNotMet, - #[codec(index = 9)] - #[doc = "The transaction could not be executed due to overflow risk for the pool."] - OverflowRisk, - #[codec(index = 10)] - #[doc = "A pool must be in [`PoolState::Destroying`] in order for the depositor to unbond or for"] - #[doc = "other members to be permissionlessly unbonded."] - NotDestroying, - #[codec(index = 11)] - #[doc = "The caller does not have nominating permissions for the pool."] - NotNominator, - #[codec(index = 12)] - #[doc = "Either a) the caller cannot make a valid kick or b) the pool is not destroying."] - NotKickerOrDestroying, - #[codec(index = 13)] - #[doc = "The pool is not open to join"] - NotOpen, - #[codec(index = 14)] - #[doc = "The system is maxed out on pools."] - MaxPools, - #[codec(index = 15)] - #[doc = "Too many members in the pool or system."] - MaxPoolMembers, - #[codec(index = 16)] - #[doc = "The pools state cannot be changed."] - CanNotChangeState, - #[codec(index = 17)] - #[doc = "The caller does not have adequate permissions."] - DoesNotHavePermission, - #[codec(index = 18)] - #[doc = "Metadata exceeds [`Config::MaxMetadataLen`]"] - MetadataExceedsMaxLen, - #[codec(index = 19)] - #[doc = "Some error occurred that should never happen. This should be reported to the"] - #[doc = "maintainers."] - Defensive(runtime_types::pallet_nomination_pools::pallet::DefensiveError), - #[codec(index = 20)] - #[doc = "Partial unbonding now allowed permissionlessly."] - PartialUnbondNotAllowedPermissionlessly, - #[codec(index = 21)] - #[doc = "Pool id currently in use."] - PoolIdInUse, - #[codec(index = 22)] - #[doc = "Pool id provided is not correct/usable."] - InvalidPoolId, + + #[doc = "Create a new delegation pool with a previously used pool id"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "same as `create` with the inclusion of"] + #[doc = "* `pool_id` - `A valid PoolId."] + pub fn create_with_pool_id( + &self, + amount: ::core::primitive::u128, + root: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + nominator: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + state_toggler: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + pool_id: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "NominationPools", + "create_with_pool_id", + types::CreateWithPoolId { + amount, + root, + nominator, + state_toggler, + pool_id, + }, + [ + 219u8, 136u8, 46u8, 64u8, 62u8, 176u8, 117u8, 59u8, 234u8, 215u8, + 205u8, 226u8, 39u8, 96u8, 214u8, 74u8, 209u8, 130u8, 2u8, 242u8, 105u8, + 105u8, 114u8, 7u8, 255u8, 177u8, 207u8, 189u8, 133u8, 38u8, 54u8, 14u8, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "Events of this pallet."] - pub enum Event { - #[codec(index = 0)] - #[doc = "A pool has been created."] - Created { - depositor: ::subxt::utils::AccountId32, - pool_id: ::core::primitive::u32, - }, - #[codec(index = 1)] - #[doc = "A member has became bonded in a pool."] - Bonded { - member: ::subxt::utils::AccountId32, - pool_id: ::core::primitive::u32, - bonded: ::core::primitive::u128, - joined: ::core::primitive::bool, - }, - #[codec(index = 2)] - #[doc = "A payout has been made to a member."] - PaidOut { - member: ::subxt::utils::AccountId32, - pool_id: ::core::primitive::u32, - payout: ::core::primitive::u128, - }, - #[codec(index = 3)] - #[doc = "A member has unbonded from their pool."] - #[doc = ""] - #[doc = "- `balance` is the corresponding balance of the number of points that has been"] - #[doc = " requested to be unbonded (the argument of the `unbond` transaction) from the bonded"] - #[doc = " pool."] - #[doc = "- `points` is the number of points that are issued as a result of `balance` being"] - #[doc = "dissolved into the corresponding unbonding pool."] - #[doc = "- `era` is the era in which the balance will be unbonded."] - #[doc = "In the absence of slashing, these values will match. In the presence of slashing, the"] - #[doc = "number of points that are issued in the unbonding pool will be less than the amount"] - #[doc = "requested to be unbonded."] - Unbonded { - member: ::subxt::utils::AccountId32, - pool_id: ::core::primitive::u32, - balance: ::core::primitive::u128, - points: ::core::primitive::u128, - era: ::core::primitive::u32, - }, - #[codec(index = 4)] - #[doc = "A member has withdrawn from their pool."] - #[doc = ""] - #[doc = "The given number of `points` have been dissolved in return of `balance`."] - #[doc = ""] - #[doc = "Similar to `Unbonded` event, in the absence of slashing, the ratio of point to balance"] - #[doc = "will be 1."] - Withdrawn { - member: ::subxt::utils::AccountId32, - pool_id: ::core::primitive::u32, - balance: ::core::primitive::u128, - points: ::core::primitive::u128, - }, - #[codec(index = 5)] - #[doc = "A pool has been destroyed."] - Destroyed { pool_id: ::core::primitive::u32 }, - #[codec(index = 6)] - #[doc = "The state of a pool has changed"] - StateChanged { - pool_id: ::core::primitive::u32, - new_state: runtime_types::pallet_nomination_pools::PoolState, - }, - #[codec(index = 7)] - #[doc = "A member has been removed from a pool."] - #[doc = ""] - #[doc = "The removal can be voluntary (withdrawn all unbonded funds) or involuntary (kicked)."] - MemberRemoved { - pool_id: ::core::primitive::u32, - member: ::subxt::utils::AccountId32, - }, - #[codec(index = 8)] - #[doc = "The roles of a pool have been updated to the given new roles. Note that the depositor"] - #[doc = "can never change."] - RolesUpdated { - root: ::core::option::Option<::subxt::utils::AccountId32>, - state_toggler: ::core::option::Option<::subxt::utils::AccountId32>, - nominator: ::core::option::Option<::subxt::utils::AccountId32>, - }, - #[codec(index = 9)] - #[doc = "The active balance of pool `pool_id` has been slashed to `balance`."] - PoolSlashed { - pool_id: ::core::primitive::u32, - balance: ::core::primitive::u128, - }, - #[codec(index = 10)] - #[doc = "The unbond pool at `era` of pool `pool_id` has been slashed to `balance`."] - UnbondingPoolSlashed { - pool_id: ::core::primitive::u32, - era: ::core::primitive::u32, - balance: ::core::primitive::u128, - }, + + #[doc = "Nominate on behalf of the pool."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be signed by the pool nominator or the pool"] + #[doc = "root role."] + #[doc = ""] + #[doc = "This directly forward the call to the staking pallet, on behalf of the pool bonded"] + #[doc = "account."] + pub fn nominate( + &self, + pool_id: ::core::primitive::u32, + validators: ::std::vec::Vec<::subxt::utils::AccountId32>, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "NominationPools", + "nominate", + types::Nominate { + pool_id, + validators, + }, + [ + 118u8, 80u8, 137u8, 47u8, 102u8, 9u8, 20u8, 136u8, 76u8, 164u8, 161u8, + 114u8, 33u8, 159u8, 204u8, 49u8, 233u8, 199u8, 246u8, 67u8, 144u8, + 169u8, 211u8, 67u8, 12u8, 68u8, 198u8, 149u8, 87u8, 62u8, 226u8, 72u8, + ], + ) + } + + #[doc = "Set a new state for the pool."] + #[doc = ""] + #[doc = "If a pool is already in the `Destroying` state, then under no condition can its state"] + #[doc = "change again."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be either:"] + #[doc = ""] + #[doc = "1. signed by the state toggler, or the root role of the pool,"] + #[doc = "2. if the pool conditions to be open are NOT met (as described by `ok_to_be_open`), and"] + #[doc = " then the state of the pool can be permissionlessly changed to `Destroying`."] + pub fn set_state( + &self, + pool_id: ::core::primitive::u32, + state: runtime_types::pallet_nomination_pools::PoolState, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "NominationPools", + "set_state", + types::SetState { pool_id, state }, + [ + 39u8, 221u8, 24u8, 65u8, 144u8, 230u8, 228u8, 24u8, 191u8, 53u8, 171u8, + 148u8, 131u8, 45u8, 10u8, 22u8, 222u8, 240u8, 13u8, 87u8, 123u8, 182u8, + 102u8, 26u8, 124u8, 205u8, 23u8, 31u8, 25u8, 43u8, 12u8, 140u8, + ], + ) + } + + #[doc = "Set a new metadata for the pool."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be signed by the state toggler, or the root role"] + #[doc = "of the pool."] + pub fn set_metadata( + &self, + pool_id: ::core::primitive::u32, + metadata: ::std::vec::Vec<::core::primitive::u8>, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "NominationPools", + "set_metadata", + types::SetMetadata { pool_id, metadata }, + [ + 221u8, 189u8, 15u8, 232u8, 0u8, 49u8, 187u8, 67u8, 124u8, 26u8, 114u8, + 191u8, 81u8, 14u8, 253u8, 75u8, 88u8, 182u8, 136u8, 18u8, 238u8, 119u8, + 215u8, 248u8, 133u8, 160u8, 154u8, 193u8, 177u8, 140u8, 1u8, 16u8, + ], + ) + } + + #[doc = "Update configurations for the nomination pools. The origin for this call must be"] + #[doc = "Root."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `min_join_bond` - Set [`MinJoinBond`]."] + #[doc = "* `min_create_bond` - Set [`MinCreateBond`]."] + #[doc = "* `max_pools` - Set [`MaxPools`]."] + #[doc = "* `max_members` - Set [`MaxPoolMembers`]."] + #[doc = "* `max_members_per_pool` - Set [`MaxPoolMembersPerPool`]."] + pub fn set_configs( + &self, + min_join_bond: runtime_types::pallet_nomination_pools::ConfigOp< + ::core::primitive::u128, + >, + min_create_bond: runtime_types::pallet_nomination_pools::ConfigOp< + ::core::primitive::u128, + >, + max_pools: runtime_types::pallet_nomination_pools::ConfigOp< + ::core::primitive::u32, + >, + max_members: runtime_types::pallet_nomination_pools::ConfigOp< + ::core::primitive::u32, + >, + max_members_per_pool: runtime_types::pallet_nomination_pools::ConfigOp< + ::core::primitive::u32, + >, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "NominationPools", + "set_configs", + types::SetConfigs { + min_join_bond, + min_create_bond, + max_pools, + max_members, + max_members_per_pool, + }, + [ + 159u8, 173u8, 159u8, 173u8, 71u8, 89u8, 0u8, 145u8, 157u8, 103u8, 25u8, + 84u8, 129u8, 159u8, 154u8, 60u8, 67u8, 155u8, 13u8, 162u8, 173u8, + 250u8, 168u8, 215u8, 134u8, 141u8, 58u8, 190u8, 90u8, 213u8, 239u8, + 216u8, + ], + ) + } + + #[doc = "Update the roles of the pool."] + #[doc = ""] + #[doc = "The root is the only entity that can change any of the roles, including itself,"] + #[doc = "excluding the depositor, who can never change."] + #[doc = ""] + #[doc = "It emits an event, notifying UIs of the role change. This event is quite relevant to"] + #[doc = "most pool members and they should be informed of changes to pool roles."] + pub fn update_roles( + &self, + pool_id: ::core::primitive::u32, + new_root: runtime_types::pallet_nomination_pools::ConfigOp< + ::subxt::utils::AccountId32, + >, + new_nominator: runtime_types::pallet_nomination_pools::ConfigOp< + ::subxt::utils::AccountId32, + >, + new_state_toggler: runtime_types::pallet_nomination_pools::ConfigOp< + ::subxt::utils::AccountId32, + >, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "NominationPools", + "update_roles", + types::UpdateRoles { + pool_id, + new_root, + new_nominator, + new_state_toggler, + }, + [ + 90u8, 1u8, 203u8, 203u8, 244u8, 135u8, 104u8, 176u8, 166u8, 208u8, + 125u8, 144u8, 194u8, 125u8, 225u8, 246u8, 247u8, 5u8, 140u8, 222u8, + 48u8, 111u8, 57u8, 39u8, 240u8, 96u8, 53u8, 29u8, 134u8, 198u8, 129u8, + 223u8, + ], + ) + } + + #[doc = "Chill on behalf of the pool."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be signed by the pool nominator or the pool"] + #[doc = "root role, same as [`Pallet::nominate`]."] + #[doc = ""] + #[doc = "This directly forward the call to the staking pallet, on behalf of the pool bonded"] + #[doc = "account."] + pub fn chill( + &self, + pool_id: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "NominationPools", + "chill", + types::Chill { pool_id }, + [ + 65u8, 206u8, 54u8, 53u8, 37u8, 97u8, 161u8, 104u8, 62u8, 9u8, 93u8, + 236u8, 61u8, 185u8, 204u8, 245u8, 234u8, 218u8, 213u8, 40u8, 154u8, + 29u8, 244u8, 19u8, 207u8, 172u8, 142u8, 221u8, 38u8, 70u8, 39u8, 10u8, + ], + ) } } + } + #[doc = "Events of this pallet."] + pub type Event = runtime_types::pallet_nomination_pools::pallet::Event; + pub mod events { + use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - pub enum BondExtra<_0> { - #[codec(index = 0)] - FreeBalance(_0), - #[codec(index = 1)] - Rewards, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A pool has been created."] + pub struct Created { + pub depositor: ::subxt::utils::AccountId32, + pub pool_id: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for Created { + const EVENT: &'static str = "Created"; + const PALLET: &'static str = "NominationPools"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - pub struct BondedPoolInner { - pub points: ::core::primitive::u128, - pub state: runtime_types::pallet_nomination_pools::PoolState, - pub member_counter: ::core::primitive::u32, - pub roles: - runtime_types::pallet_nomination_pools::PoolRoles<::subxt::utils::AccountId32>, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A member has became bonded in a pool."] + pub struct Bonded { + pub member: ::subxt::utils::AccountId32, + pub pool_id: ::core::primitive::u32, + pub bonded: ::core::primitive::u128, + pub joined: ::core::primitive::bool, + } + impl ::subxt::events::StaticEvent for Bonded { + const EVENT: &'static str = "Bonded"; + const PALLET: &'static str = "NominationPools"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - pub enum ConfigOp<_0> { - #[codec(index = 0)] - Noop, - #[codec(index = 1)] - Set(_0), - #[codec(index = 2)] - Remove, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A payout has been made to a member."] + pub struct PaidOut { + pub member: ::subxt::utils::AccountId32, + pub pool_id: ::core::primitive::u32, + pub payout: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for PaidOut { + const EVENT: &'static str = "PaidOut"; + const PALLET: &'static str = "NominationPools"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - pub struct PoolMember { + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A member has unbonded from their pool."] + #[doc = ""] + #[doc = "- `balance` is the corresponding balance of the number of points that has been"] + #[doc = " requested to be unbonded (the argument of the `unbond` transaction) from the bonded"] + #[doc = " pool."] + #[doc = "- `points` is the number of points that are issued as a result of `balance` being"] + #[doc = "dissolved into the corresponding unbonding pool."] + #[doc = "- `era` is the era in which the balance will be unbonded."] + #[doc = "In the absence of slashing, these values will match. In the presence of slashing, the"] + #[doc = "number of points that are issued in the unbonding pool will be less than the amount"] + #[doc = "requested to be unbonded."] + pub struct Unbonded { + pub member: ::subxt::utils::AccountId32, pub pool_id: ::core::primitive::u32, + pub balance: ::core::primitive::u128, pub points: ::core::primitive::u128, - pub last_recorded_reward_counter: - runtime_types::sp_arithmetic::fixed_point::FixedU128, - pub unbonding_eras: - runtime_types::sp_core::bounded::bounded_btree_map::BoundedBTreeMap< - ::core::primitive::u32, - ::core::primitive::u128, - >, + pub era: ::core::primitive::u32, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct PoolRoles<_0> { - pub depositor: _0, - pub root: ::core::option::Option<_0>, - pub nominator: ::core::option::Option<_0>, - pub state_toggler: ::core::option::Option<_0>, + impl ::subxt::events::StaticEvent for Unbonded { + const EVENT: &'static str = "Unbonded"; + const PALLET: &'static str = "NominationPools"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - pub enum PoolState { - #[codec(index = 0)] - Open, - #[codec(index = 1)] - Blocked, - #[codec(index = 2)] - Destroying, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A member has withdrawn from their pool."] + #[doc = ""] + #[doc = "The given number of `points` have been dissolved in return of `balance`."] + #[doc = ""] + #[doc = "Similar to `Unbonded` event, in the absence of slashing, the ratio of point to balance"] + #[doc = "will be 1."] + pub struct Withdrawn { + pub member: ::subxt::utils::AccountId32, + pub pool_id: ::core::primitive::u32, + pub balance: ::core::primitive::u128, + pub points: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for Withdrawn { + const EVENT: &'static str = "Withdrawn"; + const PALLET: &'static str = "NominationPools"; } #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - pub struct RewardPool { - pub last_recorded_reward_counter: - runtime_types::sp_arithmetic::fixed_point::FixedU128, - pub last_recorded_total_payouts: ::core::primitive::u128, - pub total_rewards_claimed: ::core::primitive::u128, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A pool has been destroyed."] + pub struct Destroyed { + pub pool_id: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for Destroyed { + const EVENT: &'static str = "Destroyed"; + const PALLET: &'static str = "NominationPools"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - pub struct SubPools { - pub no_era: runtime_types::pallet_nomination_pools::UnbondPool, - pub with_era: runtime_types::sp_core::bounded::bounded_btree_map::BoundedBTreeMap< - ::core::primitive::u32, - runtime_types::pallet_nomination_pools::UnbondPool, - >, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "The state of a pool has changed"] + pub struct StateChanged { + pub pool_id: ::core::primitive::u32, + pub new_state: runtime_types::pallet_nomination_pools::PoolState, + } + impl ::subxt::events::StaticEvent for StateChanged { + const EVENT: &'static str = "StateChanged"; + const PALLET: &'static str = "NominationPools"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - pub struct UnbondPool { - pub points: ::core::primitive::u128, - pub balance: ::core::primitive::u128, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A member has been removed from a pool."] + #[doc = ""] + #[doc = "The removal can be voluntary (withdrawn all unbonded funds) or involuntary (kicked)."] + pub struct MemberRemoved { + pub pool_id: ::core::primitive::u32, + pub member: ::subxt::utils::AccountId32, } - } - pub mod pallet_offences { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "Events type."] - pub enum Event { - #[codec(index = 0)] - #[doc = "There is an offence reported of the given `kind` happened at the `session_index` and"] - #[doc = "(kind-specific) time slot. This event is not deposited for duplicate slashes."] - #[doc = "\\[kind, timeslot\\]."] - Offence { - kind: [::core::primitive::u8; 16usize], - timeslot: ::std::vec::Vec<::core::primitive::u8>, - }, - } + impl ::subxt::events::StaticEvent for MemberRemoved { + const EVENT: &'static str = "MemberRemoved"; + const PALLET: &'static str = "NominationPools"; } - } - pub mod pallet_preimage { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[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."] - note_preimage { - bytes: ::std::vec::Vec<::core::primitive::u8>, - }, - #[codec(index = 1)] - #[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`."] - unnote_preimage { hash: ::subxt::utils::H256 }, - #[codec(index = 2)] - #[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."] - request_preimage { hash: ::subxt::utils::H256 }, - #[codec(index = 3)] - #[doc = "Clear a previously made request for a preimage."] - #[doc = ""] - #[doc = "NOTE: THIS MUST NOT BE CALLED ON `hash` MORE TIMES THAN `request_preimage`."] - unrequest_preimage { hash: ::subxt::utils::H256 }, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - #[doc = "Preimage is too large to store on-chain."] - TooBig, - #[codec(index = 1)] - #[doc = "Preimage has already been noted on-chain."] - AlreadyNoted, - #[codec(index = 2)] - #[doc = "The user is not authorized to perform this action."] - NotAuthorized, - #[codec(index = 3)] - #[doc = "The preimage cannot be removed since it has not yet been noted."] - NotNoted, - #[codec(index = 4)] - #[doc = "A preimage may not be removed when there are outstanding requests."] - Requested, - #[codec(index = 5)] - #[doc = "The preimage request cannot be removed since no outstanding requests exist."] - NotRequested, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub enum Event { - #[codec(index = 0)] - #[doc = "A preimage has been noted."] - Noted { hash: ::subxt::utils::H256 }, - #[codec(index = 1)] - #[doc = "A preimage has been requested."] - Requested { hash: ::subxt::utils::H256 }, - #[codec(index = 2)] - #[doc = "A preimage has ben cleared."] - Cleared { hash: ::subxt::utils::H256 }, - } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "The roles of a pool have been updated to the given new roles. Note that the depositor"] + #[doc = "can never change."] + pub struct RolesUpdated { + pub root: ::core::option::Option<::subxt::utils::AccountId32>, + pub state_toggler: ::core::option::Option<::subxt::utils::AccountId32>, + pub nominator: ::core::option::Option<::subxt::utils::AccountId32>, + } + impl ::subxt::events::StaticEvent for RolesUpdated { + const EVENT: &'static str = "RolesUpdated"; + const PALLET: &'static str = "NominationPools"; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - pub enum RequestStatus<_0, _1> { - #[codec(index = 0)] - Unrequested { - deposit: (_0, _1), - len: ::core::primitive::u32, - }, - #[codec(index = 1)] - Requested { - deposit: ::core::option::Option<(_0, _1)>, - count: ::core::primitive::u32, - len: ::core::option::Option<::core::primitive::u32>, - }, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "The active balance of pool `pool_id` has been slashed to `balance`."] + pub struct PoolSlashed { + pub pool_id: ::core::primitive::u32, + pub balance: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for PoolSlashed { + const EVENT: &'static str = "PoolSlashed"; + const PALLET: &'static str = "NominationPools"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "The unbond pool at `era` of pool `pool_id` has been slashed to `balance`."] + pub struct UnbondingPoolSlashed { + pub pool_id: ::core::primitive::u32, + pub era: ::core::primitive::u32, + pub balance: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for UnbondingPoolSlashed { + const EVENT: &'static str = "UnbondingPoolSlashed"; + const PALLET: &'static str = "NominationPools"; } } - pub mod pallet_scheduler { + pub mod storage { use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "Anonymously schedule a task."] - schedule { - when: ::core::primitive::u32, - maybe_periodic: ::core::option::Option<( - ::core::primitive::u32, - ::core::primitive::u32, - )>, - priority: ::core::primitive::u8, - call: ::std::boxed::Box, - }, - #[codec(index = 1)] - #[doc = "Cancel an anonymously scheduled task."] - cancel { - when: ::core::primitive::u32, - index: ::core::primitive::u32, - }, - #[codec(index = 2)] - #[doc = "Schedule a named task."] - schedule_named { - id: [::core::primitive::u8; 32usize], - when: ::core::primitive::u32, - maybe_periodic: ::core::option::Option<( - ::core::primitive::u32, - ::core::primitive::u32, - )>, - priority: ::core::primitive::u8, - call: ::std::boxed::Box, - }, - #[codec(index = 3)] - #[doc = "Cancel a named scheduled task."] - cancel_named { - id: [::core::primitive::u8; 32usize], - }, - #[codec(index = 4)] - #[doc = "Anonymously schedule a task after a delay."] - #[doc = ""] - #[doc = "# "] - #[doc = "Same as [`schedule`]."] - #[doc = "# "] - schedule_after { - after: ::core::primitive::u32, - maybe_periodic: ::core::option::Option<( - ::core::primitive::u32, - ::core::primitive::u32, - )>, - priority: ::core::primitive::u8, - call: ::std::boxed::Box, - }, - #[codec(index = 5)] - #[doc = "Schedule a named task after a delay."] - #[doc = ""] - #[doc = "# "] - #[doc = "Same as [`schedule_named`](Self::schedule_named)."] - #[doc = "# "] - schedule_named_after { - id: [::core::primitive::u8; 32usize], - after: ::core::primitive::u32, - maybe_periodic: ::core::option::Option<( - ::core::primitive::u32, - ::core::primitive::u32, - )>, - priority: ::core::primitive::u8, - call: ::std::boxed::Box, - }, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - #[doc = "Failed to schedule a call"] - FailedToSchedule, - #[codec(index = 1)] - #[doc = "Cannot find the scheduled call."] - NotFound, - #[codec(index = 2)] - #[doc = "Given target block number is in the past."] - TargetBlockNumberInPast, - #[codec(index = 3)] - #[doc = "Reschedule failed because it does not change scheduled time."] - RescheduleNoChange, - #[codec(index = 4)] - #[doc = "Attempt to use a non-named function on a named task."] - Named, + pub struct StorageApi; + impl StorageApi { + #[doc = " Minimum amount to bond to join a pool."] + pub fn min_join_bond( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u128, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "NominationPools", + "MinJoinBond", + vec![], + [ + 64u8, 180u8, 71u8, 185u8, 81u8, 46u8, 155u8, 26u8, 251u8, 84u8, 108u8, + 80u8, 128u8, 44u8, 163u8, 118u8, 107u8, 79u8, 250u8, 211u8, 194u8, + 71u8, 87u8, 16u8, 247u8, 9u8, 76u8, 95u8, 103u8, 227u8, 180u8, 231u8, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "Events type."] - pub enum Event { - #[codec(index = 0)] - #[doc = "Scheduled some task."] - Scheduled { - when: ::core::primitive::u32, - index: ::core::primitive::u32, - }, - #[codec(index = 1)] - #[doc = "Canceled some task."] - Canceled { - when: ::core::primitive::u32, - index: ::core::primitive::u32, - }, - #[codec(index = 2)] - #[doc = "Dispatched some task."] - Dispatched { - task: (::core::primitive::u32, ::core::primitive::u32), - id: ::core::option::Option<[::core::primitive::u8; 32usize]>, - result: - ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - }, - #[codec(index = 3)] - #[doc = "The call for the provided hash was not found so the task has been aborted."] - CallUnavailable { - task: (::core::primitive::u32, ::core::primitive::u32), - id: ::core::option::Option<[::core::primitive::u8; 32usize]>, - }, - #[codec(index = 4)] - #[doc = "The given task was unable to be renewed since the agenda is full at that block."] - PeriodicFailed { - task: (::core::primitive::u32, ::core::primitive::u32), - id: ::core::option::Option<[::core::primitive::u8; 32usize]>, - }, - #[codec(index = 5)] - #[doc = "The given task can never be executed since it is overweight."] - PermanentlyOverweight { - task: (::core::primitive::u32, ::core::primitive::u32), - id: ::core::option::Option<[::core::primitive::u8; 32usize]>, - }, + + #[doc = " Minimum bond required to create a pool."] + #[doc = ""] + #[doc = " This is the amount that the depositor must put as their initial stake in the pool, as an"] + #[doc = " indication of \"skin in the game\"."] + #[doc = ""] + #[doc = " This is the value that will always exist in the staking ledger of the pool bonded account"] + #[doc = " while all other accounts leave."] + pub fn min_create_bond( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u128, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "NominationPools", + "MinCreateBond", + vec![], + [ + 210u8, 67u8, 92u8, 230u8, 231u8, 105u8, 54u8, 249u8, 154u8, 192u8, + 29u8, 217u8, 233u8, 79u8, 170u8, 126u8, 133u8, 98u8, 253u8, 153u8, + 248u8, 189u8, 63u8, 107u8, 170u8, 224u8, 12u8, 42u8, 198u8, 185u8, + 85u8, 46u8, + ], + ) } - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Scheduled<_0, _1, _2, _3, _4> { - pub maybe_id: ::core::option::Option<_0>, - pub priority: ::core::primitive::u8, - pub call: _1, - pub maybe_periodic: ::core::option::Option<(_2, _2)>, - pub origin: _3, - #[codec(skip)] - pub __subxt_unused_type_params: ::core::marker::PhantomData<_4>, - } - } - pub mod pallet_session { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "Sets the session key(s) of the function caller to `keys`."] - #[doc = "Allows an account to set its session key prior to becoming a validator."] - #[doc = "This doesn't take effect until the next session."] - #[doc = ""] - #[doc = "The dispatch origin of this function must be signed."] - #[doc = ""] - #[doc = "# "] - #[doc = "- Complexity: `O(1)`. Actual cost depends on the number of length of"] - #[doc = " `T::Keys::key_ids()` which is fixed."] - #[doc = "- DbReads: `origin account`, `T::ValidatorIdOf`, `NextKeys`"] - #[doc = "- DbWrites: `origin account`, `NextKeys`"] - #[doc = "- DbReads per key id: `KeyOwner`"] - #[doc = "- DbWrites per key id: `KeyOwner`"] - #[doc = "# "] - set_keys { - keys: runtime_types::da_runtime::primitives::SessionKeys, - proof: ::std::vec::Vec<::core::primitive::u8>, - }, - #[codec(index = 1)] - #[doc = "Removes any session key(s) of the function caller."] - #[doc = ""] - #[doc = "This doesn't take effect until the next session."] - #[doc = ""] - #[doc = "The dispatch origin of this function must be Signed and the account must be either be"] - #[doc = "convertible to a validator ID using the chain's typical addressing system (this usually"] - #[doc = "means being a controller account) or directly convertible into a validator ID (which"] - #[doc = "usually means being a stash account)."] - #[doc = ""] - #[doc = "# "] - #[doc = "- Complexity: `O(1)` in number of key types. Actual cost depends on the number of length"] - #[doc = " of `T::Keys::key_ids()` which is fixed."] - #[doc = "- DbReads: `T::ValidatorIdOf`, `NextKeys`, `origin account`"] - #[doc = "- DbWrites: `NextKeys`, `origin account`"] - #[doc = "- DbWrites per key id: `KeyOwner`"] - #[doc = "# "] - purge_keys, + + #[doc = " Maximum number of nomination pools that can exist. If `None`, then an unbounded number of"] + #[doc = " pools can exist."] + pub fn max_pools( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + ::subxt::storage::address::Yes, + (), + (), + > { + ::subxt::storage::address::Address::new_static( + "NominationPools", + "MaxPools", + vec![], + [ + 230u8, 184u8, 242u8, 91u8, 118u8, 111u8, 90u8, 204u8, 136u8, 61u8, + 228u8, 50u8, 212u8, 40u8, 83u8, 49u8, 121u8, 161u8, 245u8, 80u8, 46u8, + 184u8, 105u8, 134u8, 249u8, 225u8, 39u8, 3u8, 123u8, 137u8, 156u8, + 240u8, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "Error for the session pallet."] - pub enum Error { - #[codec(index = 0)] - #[doc = "Invalid ownership proof."] - InvalidProof, - #[codec(index = 1)] - #[doc = "No associated validator ID for account."] - NoAssociatedValidatorId, - #[codec(index = 2)] - #[doc = "Registered duplicate key."] - DuplicatedKey, - #[codec(index = 3)] - #[doc = "No keys are associated with this account."] - NoKeys, - #[codec(index = 4)] - #[doc = "Key setting account is not live, so it's impossible to associate keys."] - NoAccount, + + #[doc = " Maximum number of members that can exist in the system. If `None`, then the count"] + #[doc = " members are not bound on a system wide basis."] + pub fn max_pool_members( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + ::subxt::storage::address::Yes, + (), + (), + > { + ::subxt::storage::address::Address::new_static( + "NominationPools", + "MaxPoolMembers", + vec![], + [ + 210u8, 222u8, 181u8, 146u8, 137u8, 200u8, 71u8, 196u8, 74u8, 38u8, + 36u8, 122u8, 187u8, 164u8, 218u8, 116u8, 216u8, 143u8, 182u8, 15u8, + 23u8, 124u8, 57u8, 121u8, 81u8, 151u8, 8u8, 247u8, 80u8, 136u8, 115u8, + 2u8, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub enum Event { - #[codec(index = 0)] - #[doc = "New session has happened. Note that the argument is the session index, not the"] - #[doc = "block number as the type might suggest."] - NewSession { - session_index: ::core::primitive::u32, - }, + + #[doc = " Maximum number of members that may belong to pool. If `None`, then the count of"] + #[doc = " members is not bound on a per pool basis."] + pub fn max_pool_members_per_pool( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + ::subxt::storage::address::Yes, + (), + (), + > { + ::subxt::storage::address::Address::new_static( + "NominationPools", + "MaxPoolMembersPerPool", + vec![], + [ + 250u8, 255u8, 136u8, 223u8, 61u8, 119u8, 117u8, 240u8, 68u8, 114u8, + 55u8, 1u8, 176u8, 120u8, 143u8, 48u8, 232u8, 125u8, 218u8, 105u8, 28u8, + 230u8, 253u8, 36u8, 9u8, 44u8, 129u8, 225u8, 147u8, 33u8, 181u8, 68u8, + ], + ) } - } - } - pub mod pallet_staking { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "Take the origin account as a stash and lock up `value` of its balance. `controller` will"] - #[doc = "be the account that controls it."] - #[doc = ""] - #[doc = "`value` must be more than the `minimum_balance` specified by `T::Currency`."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ by the stash account."] - #[doc = ""] - #[doc = "Emits `Bonded`."] - #[doc = "# "] - #[doc = "- Independent of the arguments. Moderate complexity."] - #[doc = "- O(1)."] - #[doc = "- Three extra DB entries."] - #[doc = ""] - #[doc = "NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned"] - #[doc = "unless the `origin` falls below _existential deposit_ and gets removed as dust."] - #[doc = "------------------"] - #[doc = "# "] - bond { - controller: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - #[codec(compact)] - value: ::core::primitive::u128, - payee: runtime_types::pallet_staking::RewardDestination< - ::subxt::utils::AccountId32, - >, - }, - #[codec(index = 1)] - #[doc = "Add some extra amount that have appeared in the stash `free_balance` into the balance up"] - #[doc = "for staking."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ by the stash, not the controller."] - #[doc = ""] - #[doc = "Use this if there are additional funds in your stash account that you wish to bond."] - #[doc = "Unlike [`bond`](Self::bond) or [`unbond`](Self::unbond) this function does not impose"] - #[doc = "any limitation on the amount that can be added."] - #[doc = ""] - #[doc = "Emits `Bonded`."] - #[doc = ""] - #[doc = "# "] - #[doc = "- Independent of the arguments. Insignificant complexity."] - #[doc = "- O(1)."] - #[doc = "# "] - bond_extra { - #[codec(compact)] - max_additional: ::core::primitive::u128, - }, - #[codec(index = 2)] - #[doc = "Schedule a portion of the stash to be unlocked ready for transfer out after the bond"] - #[doc = "period ends. If this leaves an amount actively bonded less than"] - #[doc = "T::Currency::minimum_balance(), then it is increased to the full amount."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ by the controller, not the stash."] - #[doc = ""] - #[doc = "Once the unlock period is done, you can call `withdraw_unbonded` to actually move"] - #[doc = "the funds out of management ready for transfer."] - #[doc = ""] - #[doc = "No more than a limited number of unlocking chunks (see `MaxUnlockingChunks`)"] - #[doc = "can co-exists at the same time. If there are no unlocking chunks slots available"] - #[doc = "[`Call::withdraw_unbonded`] is called to remove some of the chunks (if possible)."] - #[doc = ""] - #[doc = "If a user encounters the `InsufficientBond` error when calling this extrinsic,"] - #[doc = "they should call `chill` first in order to free up their bonded funds."] - #[doc = ""] - #[doc = "Emits `Unbonded`."] - #[doc = ""] - #[doc = "See also [`Call::withdraw_unbonded`]."] - unbond { - #[codec(compact)] - value: ::core::primitive::u128, - }, - #[codec(index = 3)] - #[doc = "Remove any unlocked chunks from the `unlocking` queue from our management."] - #[doc = ""] - #[doc = "This essentially frees up that balance to be used by the stash account to do"] - #[doc = "whatever it wants."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ by the controller."] - #[doc = ""] - #[doc = "Emits `Withdrawn`."] - #[doc = ""] - #[doc = "See also [`Call::unbond`]."] - #[doc = ""] - #[doc = "# "] - #[doc = "Complexity O(S) where S is the number of slashing spans to remove"] - #[doc = "NOTE: Weight annotation is the kill scenario, we refund otherwise."] - #[doc = "# "] - withdraw_unbonded { - num_slashing_spans: ::core::primitive::u32, - }, - #[codec(index = 4)] - #[doc = "Declare the desire to validate for the origin controller."] - #[doc = ""] - #[doc = "Effects will be felt at the beginning of the next era."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ by the controller, not the stash."] - validate { - prefs: runtime_types::pallet_staking::ValidatorPrefs, - }, - #[codec(index = 5)] - #[doc = "Declare the desire to nominate `targets` for the origin controller."] - #[doc = ""] - #[doc = "Effects will be felt at the beginning of the next era."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ by the controller, not the stash."] - #[doc = ""] - #[doc = "# "] - #[doc = "- The transaction's complexity is proportional to the size of `targets` (N)"] - #[doc = "which is capped at CompactAssignments::LIMIT (T::MaxNominations)."] - #[doc = "- Both the reads and writes follow a similar pattern."] - #[doc = "# "] - nominate { - targets: ::std::vec::Vec< - ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - >, - }, - #[codec(index = 6)] - #[doc = "Declare no desire to either validate or nominate."] - #[doc = ""] - #[doc = "Effects will be felt at the beginning of the next era."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ by the controller, not the stash."] - #[doc = ""] - #[doc = "# "] - #[doc = "- Independent of the arguments. Insignificant complexity."] - #[doc = "- Contains one read."] - #[doc = "- Writes are limited to the `origin` account key."] - #[doc = "# "] - chill, - #[codec(index = 7)] - #[doc = "(Re-)set the payment target for a controller."] - #[doc = ""] - #[doc = "Effects will be felt instantly (as soon as this function is completed successfully)."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ by the controller, not the stash."] - #[doc = ""] - #[doc = "# "] - #[doc = "- Independent of the arguments. Insignificant complexity."] - #[doc = "- Contains a limited number of reads."] - #[doc = "- Writes are limited to the `origin` account key."] - #[doc = "---------"] - #[doc = "- Weight: O(1)"] - #[doc = "- DB Weight:"] - #[doc = " - Read: Ledger"] - #[doc = " - Write: Payee"] - #[doc = "# "] - set_payee { - payee: runtime_types::pallet_staking::RewardDestination< - ::subxt::utils::AccountId32, - >, - }, - #[codec(index = 8)] - #[doc = "(Re-)set the controller of a stash."] - #[doc = ""] - #[doc = "Effects will be felt instantly (as soon as this function is completed successfully)."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ by the stash, not the controller."] - #[doc = ""] - #[doc = "# "] - #[doc = "- Independent of the arguments. Insignificant complexity."] - #[doc = "- Contains a limited number of reads."] - #[doc = "- Writes are limited to the `origin` account key."] - #[doc = "----------"] - #[doc = "Weight: O(1)"] - #[doc = "DB Weight:"] - #[doc = "- Read: Bonded, Ledger New Controller, Ledger Old Controller"] - #[doc = "- Write: Bonded, Ledger New Controller, Ledger Old Controller"] - #[doc = "# "] - set_controller { - controller: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - }, - #[codec(index = 9)] - #[doc = "Sets the ideal number of validators."] - #[doc = ""] - #[doc = "The dispatch origin must be Root."] - #[doc = ""] - #[doc = "# "] - #[doc = "Weight: O(1)"] - #[doc = "Write: Validator Count"] - #[doc = "# "] - set_validator_count { - #[codec(compact)] - new: ::core::primitive::u32, - }, - #[codec(index = 10)] - #[doc = "Increments the ideal number of validators upto maximum of"] - #[doc = "`ElectionProviderBase::MaxWinners`."] - #[doc = ""] - #[doc = "The dispatch origin must be Root."] - #[doc = ""] - #[doc = "# "] - #[doc = "Same as [`Self::set_validator_count`]."] - #[doc = "# "] - increase_validator_count { - #[codec(compact)] - additional: ::core::primitive::u32, - }, - #[codec(index = 11)] - #[doc = "Scale up the ideal number of validators by a factor upto maximum of"] - #[doc = "`ElectionProviderBase::MaxWinners`."] - #[doc = ""] - #[doc = "The dispatch origin must be Root."] - #[doc = ""] - #[doc = "# "] - #[doc = "Same as [`Self::set_validator_count`]."] - #[doc = "# "] - scale_validator_count { - factor: runtime_types::sp_arithmetic::per_things::Percent, - }, - #[codec(index = 12)] - #[doc = "Force there to be no new eras indefinitely."] - #[doc = ""] - #[doc = "The dispatch origin must be Root."] - #[doc = ""] - #[doc = "# Warning"] - #[doc = ""] - #[doc = "The election process starts multiple blocks before the end of the era."] - #[doc = "Thus the election process may be ongoing when this is called. In this case the"] - #[doc = "election will continue until the next era is triggered."] - #[doc = ""] - #[doc = "# "] - #[doc = "- No arguments."] - #[doc = "- Weight: O(1)"] - #[doc = "- Write: ForceEra"] - #[doc = "# "] - force_no_eras, - #[codec(index = 13)] - #[doc = "Force there to be a new era at the end of the next session. After this, it will be"] - #[doc = "reset to normal (non-forced) behaviour."] - #[doc = ""] - #[doc = "The dispatch origin must be Root."] - #[doc = ""] - #[doc = "# Warning"] - #[doc = ""] - #[doc = "The election process starts multiple blocks before the end of the era."] - #[doc = "If this is called just before a new era is triggered, the election process may not"] - #[doc = "have enough blocks to get a result."] - #[doc = ""] - #[doc = "# "] - #[doc = "- No arguments."] - #[doc = "- Weight: O(1)"] - #[doc = "- Write ForceEra"] - #[doc = "# "] - force_new_era, - #[codec(index = 14)] - #[doc = "Set the validators who cannot be slashed (if any)."] - #[doc = ""] - #[doc = "The dispatch origin must be Root."] - set_invulnerables { - invulnerables: ::std::vec::Vec<::subxt::utils::AccountId32>, - }, - #[codec(index = 15)] - #[doc = "Force a current staker to become completely unstaked, immediately."] - #[doc = ""] - #[doc = "The dispatch origin must be Root."] - force_unstake { - stash: ::subxt::utils::AccountId32, - num_slashing_spans: ::core::primitive::u32, - }, - #[codec(index = 16)] - #[doc = "Force there to be a new era at the end of sessions indefinitely."] - #[doc = ""] - #[doc = "The dispatch origin must be Root."] - #[doc = ""] - #[doc = "# Warning"] - #[doc = ""] - #[doc = "The election process starts multiple blocks before the end of the era."] - #[doc = "If this is called just before a new era is triggered, the election process may not"] - #[doc = "have enough blocks to get a result."] - force_new_era_always, - #[codec(index = 17)] - #[doc = "Cancel enactment of a deferred slash."] - #[doc = ""] - #[doc = "Can be called by the `T::AdminOrigin`."] - #[doc = ""] - #[doc = "Parameters: era and indices of the slashes for that era to kill."] - cancel_deferred_slash { - era: ::core::primitive::u32, - slash_indices: ::std::vec::Vec<::core::primitive::u32>, - }, - #[codec(index = 18)] - #[doc = "Pay out all the stakers behind a single validator for a single era."] - #[doc = ""] - #[doc = "- `validator_stash` is the stash account of the validator. Their nominators, up to"] - #[doc = " `T::MaxNominatorRewardedPerValidator`, will also receive their rewards."] - #[doc = "- `era` may be any era between `[current_era - history_depth; current_era]`."] - #[doc = ""] - #[doc = "The origin of this call must be _Signed_. Any account can call this function, even if"] - #[doc = "it is not one of the stakers."] - #[doc = ""] - #[doc = "# "] - #[doc = "- Time complexity: at most O(MaxNominatorRewardedPerValidator)."] - #[doc = "- Contains a limited number of reads and writes."] - #[doc = "-----------"] - #[doc = "N is the Number of payouts for the validator (including the validator)"] - #[doc = "Weight:"] - #[doc = "- Reward Destination Staked: O(N)"] - #[doc = "- Reward Destination Controller (Creating): O(N)"] - #[doc = ""] - #[doc = " NOTE: weights are assuming that payouts are made to alive stash account (Staked)."] - #[doc = " Paying even a dead controller is cheaper weight-wise. We don't do any refunds here."] - #[doc = "# "] - payout_stakers { - validator_stash: ::subxt::utils::AccountId32, - era: ::core::primitive::u32, - }, - #[codec(index = 19)] - #[doc = "Rebond a portion of the stash scheduled to be unlocked."] - #[doc = ""] - #[doc = "The dispatch origin must be signed by the controller."] - #[doc = ""] - #[doc = "# "] - #[doc = "- Time complexity: O(L), where L is unlocking chunks"] - #[doc = "- Bounded by `MaxUnlockingChunks`."] - #[doc = "- Storage changes: Can't increase storage, only decrease it."] - #[doc = "# "] - rebond { - #[codec(compact)] - value: ::core::primitive::u128, - }, - #[codec(index = 20)] - #[doc = "Remove all data structures concerning a staker/stash once it is at a state where it can"] - #[doc = "be considered `dust` in the staking system. The requirements are:"] - #[doc = ""] - #[doc = "1. the `total_balance` of the stash is below existential deposit."] - #[doc = "2. or, the `ledger.total` of the stash is below existential deposit."] - #[doc = ""] - #[doc = "The former can happen in cases like a slash; the latter when a fully unbonded account"] - #[doc = "is still receiving staking rewards in `RewardDestination::Staked`."] - #[doc = ""] - #[doc = "It can be called by anyone, as long as `stash` meets the above requirements."] - #[doc = ""] - #[doc = "Refunds the transaction fees upon successful execution."] - reap_stash { - stash: ::subxt::utils::AccountId32, - num_slashing_spans: ::core::primitive::u32, - }, - #[codec(index = 21)] - #[doc = "Remove the given nominations from the calling validator."] - #[doc = ""] - #[doc = "Effects will be felt at the beginning of the next era."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ by the controller, not the stash."] - #[doc = ""] - #[doc = "- `who`: A list of nominator stash accounts who are nominating this validator which"] - #[doc = " should no longer be nominating this validator."] - #[doc = ""] - #[doc = "Note: Making this call only makes sense if you first set the validator preferences to"] - #[doc = "block any further nominations."] - kick { - who: ::std::vec::Vec< - ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - >, - }, - #[codec(index = 22)] - #[doc = "Update the various staking configurations ."] - #[doc = ""] - #[doc = "* `min_nominator_bond`: The minimum active bond needed to be a nominator."] - #[doc = "* `min_validator_bond`: The minimum active bond needed to be a validator."] - #[doc = "* `max_nominator_count`: The max number of users who can be a nominator at once. When"] - #[doc = " set to `None`, no limit is enforced."] - #[doc = "* `max_validator_count`: The max number of users who can be a validator at once. When"] - #[doc = " set to `None`, no limit is enforced."] - #[doc = "* `chill_threshold`: The ratio of `max_nominator_count` or `max_validator_count` which"] - #[doc = " should be filled in order for the `chill_other` transaction to work."] - #[doc = "* `min_commission`: The minimum amount of commission that each validators must maintain."] - #[doc = " This is checked only upon calling `validate`. Existing validators are not affected."] - #[doc = ""] - #[doc = "RuntimeOrigin must be Root to call this function."] - #[doc = ""] - #[doc = "NOTE: Existing nominators and validators will not be affected by this update."] - #[doc = "to kick people under the new limits, `chill_other` should be called."] - set_staking_configs { - min_nominator_bond: - runtime_types::pallet_staking::pallet::pallet::ConfigOp< - ::core::primitive::u128, - >, - min_validator_bond: - runtime_types::pallet_staking::pallet::pallet::ConfigOp< - ::core::primitive::u128, - >, - max_nominator_count: - runtime_types::pallet_staking::pallet::pallet::ConfigOp< - ::core::primitive::u32, - >, - max_validator_count: - runtime_types::pallet_staking::pallet::pallet::ConfigOp< - ::core::primitive::u32, - >, - chill_threshold: - runtime_types::pallet_staking::pallet::pallet::ConfigOp< - runtime_types::sp_arithmetic::per_things::Percent, - >, - min_commission: runtime_types::pallet_staking::pallet::pallet::ConfigOp< - runtime_types::sp_arithmetic::per_things::Perbill, - >, - }, - #[codec(index = 23)] - #[doc = "Declare a `controller` to stop participating as either a validator or nominator."] - #[doc = ""] - #[doc = "Effects will be felt at the beginning of the next era."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_, but can be called by anyone."] - #[doc = ""] - #[doc = "If the caller is the same as the controller being targeted, then no further checks are"] - #[doc = "enforced, and this function behaves just like `chill`."] - #[doc = ""] - #[doc = "If the caller is different than the controller being targeted, the following conditions"] - #[doc = "must be met:"] - #[doc = ""] - #[doc = "* `controller` must belong to a nominator who has become non-decodable,"] - #[doc = ""] - #[doc = "Or:"] - #[doc = ""] - #[doc = "* A `ChillThreshold` must be set and checked which defines how close to the max"] - #[doc = " nominators or validators we must reach before users can start chilling one-another."] - #[doc = "* A `MaxNominatorCount` and `MaxValidatorCount` must be set which is used to determine"] - #[doc = " how close we are to the threshold."] - #[doc = "* A `MinNominatorBond` and `MinValidatorBond` must be set and checked, which determines"] - #[doc = " if this is a person that should be chilled because they have not met the threshold"] - #[doc = " bond required."] - #[doc = ""] - #[doc = "This can be helpful if bond requirements are updated, and we need to remove old users"] - #[doc = "who do not satisfy these requirements."] - chill_other { - controller: ::subxt::utils::AccountId32, - }, - #[codec(index = 24)] - #[doc = "Force a validator to have at least the minimum commission. This will not affect a"] - #[doc = "validator who already has a commission greater than or equal to the minimum. Any account"] - #[doc = "can call this."] - force_apply_min_commission { - validator_stash: ::subxt::utils::AccountId32, - }, - #[codec(index = 25)] - #[doc = "Sets the minimum amount of commission that each validators must maintain."] - #[doc = ""] - #[doc = "This call has lower privilege requirements than `set_staking_config` and can be called"] - #[doc = "by the `T::AdminOrigin`. Root can always call this."] - set_min_commission { - new: runtime_types::sp_arithmetic::per_things::Perbill, - }, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub enum ConfigOp<_0> { - #[codec(index = 0)] - Noop, - #[codec(index = 1)] - Set(_0), - #[codec(index = 2)] - Remove, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - #[doc = "Not a controller account."] - NotController, - #[codec(index = 1)] - #[doc = "Not a stash account."] - NotStash, - #[codec(index = 2)] - #[doc = "Stash is already bonded."] - AlreadyBonded, - #[codec(index = 3)] - #[doc = "Controller is already paired."] - AlreadyPaired, - #[codec(index = 4)] - #[doc = "Targets cannot be empty."] - EmptyTargets, - #[codec(index = 5)] - #[doc = "Duplicate index."] - DuplicateIndex, - #[codec(index = 6)] - #[doc = "Slash record index out of bounds."] - InvalidSlashIndex, - #[codec(index = 7)] - #[doc = "Cannot have a validator or nominator role, with value less than the minimum defined by"] - #[doc = "governance (see `MinValidatorBond` and `MinNominatorBond`). If unbonding is the"] - #[doc = "intention, `chill` first to remove one's role as validator/nominator."] - InsufficientBond, - #[codec(index = 8)] - #[doc = "Can not schedule more unlock chunks."] - NoMoreChunks, - #[codec(index = 9)] - #[doc = "Can not rebond without unlocking chunks."] - NoUnlockChunk, - #[codec(index = 10)] - #[doc = "Attempting to target a stash that still has funds."] - FundedTarget, - #[codec(index = 11)] - #[doc = "Invalid era to reward."] - InvalidEraToReward, - #[codec(index = 12)] - #[doc = "Invalid number of nominations."] - InvalidNumberOfNominations, - #[codec(index = 13)] - #[doc = "Items are not sorted and unique."] - NotSortedAndUnique, - #[codec(index = 14)] - #[doc = "Rewards for this era have already been claimed for this validator."] - AlreadyClaimed, - #[codec(index = 15)] - #[doc = "Incorrect previous history depth input provided."] - IncorrectHistoryDepth, - #[codec(index = 16)] - #[doc = "Incorrect number of slashing spans provided."] - IncorrectSlashingSpans, - #[codec(index = 17)] - #[doc = "Internal state has become somehow corrupted and the operation cannot continue."] - BadState, - #[codec(index = 18)] - #[doc = "Too many nomination targets supplied."] - TooManyTargets, - #[codec(index = 19)] - #[doc = "A nomination target was supplied that was blocked or otherwise not a validator."] - BadTarget, - #[codec(index = 20)] - #[doc = "The user has enough bond and thus cannot be chilled forcefully by an external person."] - CannotChillOther, - #[codec(index = 21)] - #[doc = "There are too many nominators in the system. Governance needs to adjust the staking"] - #[doc = "settings to keep things safe for the runtime."] - TooManyNominators, - #[codec(index = 22)] - #[doc = "There are too many validator candidates in the system. Governance needs to adjust the"] - #[doc = "staking settings to keep things safe for the runtime."] - TooManyValidators, - #[codec(index = 23)] - #[doc = "Commission is too low. Must be at least `MinCommission`."] - CommissionTooLow, - #[codec(index = 24)] - #[doc = "Some bound is not met."] - BoundNotMet, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub enum Event { - #[codec(index = 0)] - #[doc = "The era payout has been set; the first balance is the validator-payout; the second is"] - #[doc = "the remainder from the maximum amount of reward."] - EraPaid { - era_index: ::core::primitive::u32, - validator_payout: ::core::primitive::u128, - remainder: ::core::primitive::u128, - }, - #[codec(index = 1)] - #[doc = "The nominator has been rewarded by this amount."] - Rewarded { - stash: ::subxt::utils::AccountId32, - amount: ::core::primitive::u128, - }, - #[codec(index = 2)] - #[doc = "A staker (validator or nominator) has been slashed by the given amount."] - Slashed { - staker: ::subxt::utils::AccountId32, - amount: ::core::primitive::u128, - }, - #[codec(index = 3)] - #[doc = "A slash for the given validator, for the given percentage of their stake, at the given"] - #[doc = "era as been reported."] - SlashReported { - validator: ::subxt::utils::AccountId32, - fraction: runtime_types::sp_arithmetic::per_things::Perbill, - slash_era: ::core::primitive::u32, - }, - #[codec(index = 4)] - #[doc = "An old slashing report from a prior era was discarded because it could"] - #[doc = "not be processed."] - OldSlashingReportDiscarded { - session_index: ::core::primitive::u32, - }, - #[codec(index = 5)] - #[doc = "A new set of stakers was elected."] - StakersElected, - #[codec(index = 6)] - #[doc = "An account has bonded this amount. \\[stash, amount\\]"] - #[doc = ""] - #[doc = "NOTE: This event is only emitted when funds are bonded via a dispatchable. Notably,"] - #[doc = "it will not be emitted for staking rewards when they are added to stake."] - Bonded { - stash: ::subxt::utils::AccountId32, - amount: ::core::primitive::u128, - }, - #[codec(index = 7)] - #[doc = "An account has unbonded this amount."] - Unbonded { - stash: ::subxt::utils::AccountId32, - amount: ::core::primitive::u128, - }, - #[codec(index = 8)] - #[doc = "An account has called `withdraw_unbonded` and removed unbonding chunks worth `Balance`"] - #[doc = "from the unlocking queue."] - Withdrawn { - stash: ::subxt::utils::AccountId32, - amount: ::core::primitive::u128, - }, - #[codec(index = 9)] - #[doc = "A nominator has been kicked from a validator."] - Kicked { - nominator: ::subxt::utils::AccountId32, - stash: ::subxt::utils::AccountId32, - }, - #[codec(index = 10)] - #[doc = "The election failed. No new era is planned."] - StakingElectionFailed, - #[codec(index = 11)] - #[doc = "An account has stopped participating as either a validator or nominator."] - Chilled { stash: ::subxt::utils::AccountId32 }, - #[codec(index = 12)] - #[doc = "The stakers' rewards are getting paid."] - PayoutStarted { - era_index: ::core::primitive::u32, - validator_stash: ::subxt::utils::AccountId32, - }, - #[codec(index = 13)] - #[doc = "A validator has set their preferences."] - ValidatorPrefsSet { - stash: ::subxt::utils::AccountId32, - prefs: runtime_types::pallet_staking::ValidatorPrefs, - }, - #[codec(index = 14)] - #[doc = "A new force era mode was set."] - ForceEra { - mode: runtime_types::pallet_staking::Forcing, - }, - } - } - } - pub mod slashing { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct SlashingSpans { - pub span_index: ::core::primitive::u32, - pub last_start: ::core::primitive::u32, - pub last_nonzero_slash: ::core::primitive::u32, - pub prior: ::std::vec::Vec<::core::primitive::u32>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct SpanRecord<_0> { - pub slashed: _0, - pub paid_out: _0, - } - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct ActiveEraInfo { - pub index: ::core::primitive::u32, - pub start: ::core::option::Option<::core::primitive::u64>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct EraRewardPoints<_0> { - pub total: ::core::primitive::u32, - pub individual: ::subxt::utils::KeyedVec<_0, ::core::primitive::u32>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Exposure<_0, _1> { - #[codec(compact)] - pub total: _1, - #[codec(compact)] - pub own: _1, - pub others: - ::std::vec::Vec>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub enum Forcing { - #[codec(index = 0)] - NotForcing, - #[codec(index = 1)] - ForceNew, - #[codec(index = 2)] - ForceNone, - #[codec(index = 3)] - ForceAlways, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct IndividualExposure<_0, _1> { - pub who: _0, - #[codec(compact)] - pub value: _1, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Nominations { - pub targets: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::subxt::utils::AccountId32, - >, - pub submitted_in: ::core::primitive::u32, - pub suppressed: ::core::primitive::bool, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub enum RewardDestination<_0> { - #[codec(index = 0)] - Staked, - #[codec(index = 1)] - Stash, - #[codec(index = 2)] - Controller, - #[codec(index = 3)] - Account(_0), - #[codec(index = 4)] - None, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct StakingLedger { - pub stash: ::subxt::utils::AccountId32, - #[codec(compact)] - pub total: ::core::primitive::u128, - #[codec(compact)] - pub active: ::core::primitive::u128, - pub unlocking: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - runtime_types::pallet_staking::UnlockChunk<::core::primitive::u128>, - >, - pub claimed_rewards: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u32, - >, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct UnappliedSlash<_0, _1> { - pub validator: _0, - pub own: _1, - pub others: ::std::vec::Vec<(_0, _1)>, - pub reporters: ::std::vec::Vec<_0>, - pub payout: _1, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct UnlockChunk<_0> { - #[codec(compact)] - pub value: _0, - #[codec(compact)] - pub era: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct ValidatorPrefs { - #[codec(compact)] - pub commission: runtime_types::sp_arithmetic::per_things::Perbill, - pub blocked: ::core::primitive::bool, - } - } - pub mod pallet_sudo { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "Authenticates the sudo key and dispatches a function call with `Root` origin."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - #[doc = ""] - #[doc = "# "] - #[doc = "- O(1)."] - #[doc = "- Limited storage reads."] - #[doc = "- One DB write (event)."] - #[doc = "- Weight of derivative `call` execution + 10,000."] - #[doc = "# "] - sudo { - call: ::std::boxed::Box, - }, - #[codec(index = 1)] - #[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_."] - #[doc = ""] - #[doc = "# "] - #[doc = "- O(1)."] - #[doc = "- The weight of this call is defined by the caller."] - #[doc = "# "] - sudo_unchecked_weight { - call: ::std::boxed::Box, - weight: runtime_types::sp_weights::weight_v2::Weight, - }, - #[codec(index = 2)] - #[doc = "Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo"] - #[doc = "key."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - #[doc = ""] - #[doc = "# "] - #[doc = "- O(1)."] - #[doc = "- Limited storage reads."] - #[doc = "- One DB change."] - #[doc = "# "] - set_key { - new: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - }, - #[codec(index = 3)] - #[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_."] - #[doc = ""] - #[doc = "# "] - #[doc = "- O(1)."] - #[doc = "- Limited storage reads."] - #[doc = "- One DB write (event)."] - #[doc = "- Weight of derivative `call` execution + 10,000."] - #[doc = "# "] - sudo_as { - who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - call: ::std::boxed::Box, - }, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "Error for the Sudo pallet"] - pub enum Error { - #[codec(index = 0)] - #[doc = "Sender must be the Sudo account"] - RequireSudo, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub enum Event { - #[codec(index = 0)] - #[doc = "A sudo just took place. \\[result\\]"] - Sudid { - sudo_result: - ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - }, - #[codec(index = 1)] - #[doc = "The \\[sudoer\\] just switched identity; the old key is supplied if one existed."] - KeyChanged { - old_sudoer: ::core::option::Option<::subxt::utils::AccountId32>, - }, - #[codec(index = 2)] - #[doc = "A sudo just took place. \\[result\\]"] - SudoAsDone { - sudo_result: - ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - }, - } - } - } - pub mod pallet_timestamp { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[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 = "`MinimumPeriod`."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be `Inherent`."] - #[doc = ""] - #[doc = "# "] - #[doc = "- `O(1)` (Note that implementations of `OnTimestampSet` must also be `O(1)`)"] - #[doc = "- 1 storage read and 1 storage mutation (codec `O(1)`). (because of `DidUpdate::take` in"] - #[doc = " `on_finalize`)"] - #[doc = "- 1 event handler `on_timestamp_set`. Must be `O(1)`."] - #[doc = "# "] - set { - #[codec(compact)] - now: ::core::primitive::u64, - }, - } - } - } - pub mod pallet_tips { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "Report something `reason` that deserves a tip and claim any eventual the finder's fee."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - #[doc = ""] - #[doc = "Payment: `TipReportDepositBase` will be reserved from the origin account, as well as"] - #[doc = "`DataDepositPerByte` for each byte in `reason`."] - #[doc = ""] - #[doc = "- `reason`: The reason for, or the thing that deserves, the tip; generally this will be"] - #[doc = " a UTF-8-encoded URL."] - #[doc = "- `who`: The account which should be credited for the tip."] - #[doc = ""] - #[doc = "Emits `NewTip` if successful."] - #[doc = ""] - #[doc = "# "] - #[doc = "- Complexity: `O(R)` where `R` length of `reason`."] - #[doc = " - encoding and hashing of 'reason'"] - #[doc = "- DbReads: `Reasons`, `Tips`"] - #[doc = "- DbWrites: `Reasons`, `Tips`"] - #[doc = "# "] - report_awesome { - reason: ::std::vec::Vec<::core::primitive::u8>, - who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - }, - #[codec(index = 1)] - #[doc = "Retract a prior tip-report from `report_awesome`, and cancel the process of tipping."] - #[doc = ""] - #[doc = "If successful, the original deposit will be unreserved."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and the tip identified by `hash`"] - #[doc = "must have been reported by the signing account through `report_awesome` (and not"] - #[doc = "through `tip_new`)."] - #[doc = ""] - #[doc = "- `hash`: The identity of the open tip for which a tip value is declared. This is formed"] - #[doc = " as the hash of the tuple of the original tip `reason` and the beneficiary account ID."] - #[doc = ""] - #[doc = "Emits `TipRetracted` if successful."] - #[doc = ""] - #[doc = "# "] - #[doc = "- Complexity: `O(1)`"] - #[doc = " - Depends on the length of `T::Hash` which is fixed."] - #[doc = "- DbReads: `Tips`, `origin account`"] - #[doc = "- DbWrites: `Reasons`, `Tips`, `origin account`"] - #[doc = "# "] - retract_tip { hash: ::subxt::utils::H256 }, - #[codec(index = 2)] - #[doc = "Give a tip for something new; no finder's fee will be taken."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and the signing account must be a"] - #[doc = "member of the `Tippers` set."] - #[doc = ""] - #[doc = "- `reason`: The reason for, or the thing that deserves, the tip; generally this will be"] - #[doc = " a UTF-8-encoded URL."] - #[doc = "- `who`: The account which should be credited for the tip."] - #[doc = "- `tip_value`: The amount of tip that the sender would like to give. The median tip"] - #[doc = " value of active tippers will be given to the `who`."] - #[doc = ""] - #[doc = "Emits `NewTip` if successful."] - #[doc = ""] - #[doc = "# "] - #[doc = "- Complexity: `O(R + T)` where `R` length of `reason`, `T` is the number of tippers."] - #[doc = " - `O(T)`: decoding `Tipper` vec of length `T`. `T` is charged as upper bound given by"] - #[doc = " `ContainsLengthBound`. The actual cost depends on the implementation of"] - #[doc = " `T::Tippers`."] - #[doc = " - `O(R)`: hashing and encoding of reason of length `R`"] - #[doc = "- DbReads: `Tippers`, `Reasons`"] - #[doc = "- DbWrites: `Reasons`, `Tips`"] - #[doc = "# "] - tip_new { - reason: ::std::vec::Vec<::core::primitive::u8>, - who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - #[codec(compact)] - tip_value: ::core::primitive::u128, - }, - #[codec(index = 3)] - #[doc = "Declare a tip value for an already-open tip."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and the signing account must be a"] - #[doc = "member of the `Tippers` set."] - #[doc = ""] - #[doc = "- `hash`: The identity of the open tip for which a tip value is declared. This is formed"] - #[doc = " as the hash of the tuple of the hash of the original tip `reason` and the beneficiary"] - #[doc = " account ID."] - #[doc = "- `tip_value`: The amount of tip that the sender would like to give. The median tip"] - #[doc = " value of active tippers will be given to the `who`."] - #[doc = ""] - #[doc = "Emits `TipClosing` if the threshold of tippers has been reached and the countdown period"] - #[doc = "has started."] - #[doc = ""] - #[doc = "# "] - #[doc = "- Complexity: `O(T)` where `T` is the number of tippers. decoding `Tipper` vec of length"] - #[doc = " `T`, insert tip and check closing, `T` is charged as upper bound given by"] - #[doc = " `ContainsLengthBound`. The actual cost depends on the implementation of `T::Tippers`."] - #[doc = ""] - #[doc = " Actually weight could be lower as it depends on how many tips are in `OpenTip` but it"] - #[doc = " is weighted as if almost full i.e of length `T-1`."] - #[doc = "- DbReads: `Tippers`, `Tips`"] - #[doc = "- DbWrites: `Tips`"] - #[doc = "# "] - tip { - hash: ::subxt::utils::H256, - #[codec(compact)] - tip_value: ::core::primitive::u128, - }, - #[codec(index = 4)] - #[doc = "Close and payout a tip."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - #[doc = ""] - #[doc = "The tip identified by `hash` must have finished its countdown period."] - #[doc = ""] - #[doc = "- `hash`: The identity of the open tip for which a tip value is declared. This is formed"] - #[doc = " as the hash of the tuple of the original tip `reason` and the beneficiary account ID."] - #[doc = ""] - #[doc = "# "] - #[doc = "- Complexity: `O(T)` where `T` is the number of tippers. decoding `Tipper` vec of length"] - #[doc = " `T`. `T` is charged as upper bound given by `ContainsLengthBound`. The actual cost"] - #[doc = " depends on the implementation of `T::Tippers`."] - #[doc = "- DbReads: `Tips`, `Tippers`, `tip finder`"] - #[doc = "- DbWrites: `Reasons`, `Tips`, `Tippers`, `tip finder`"] - #[doc = "# "] - close_tip { hash: ::subxt::utils::H256 }, - #[codec(index = 5)] - #[doc = "Remove and slash an already-open tip."] - #[doc = ""] - #[doc = "May only be called from `T::RejectOrigin`."] - #[doc = ""] - #[doc = "As a result, the finder is slashed and the deposits are lost."] - #[doc = ""] - #[doc = "Emits `TipSlashed` if successful."] - #[doc = ""] - #[doc = "# "] - #[doc = " `T` is charged as upper bound given by `ContainsLengthBound`."] - #[doc = " The actual cost depends on the implementation of `T::Tippers`."] - #[doc = "# "] - slash_tip { hash: ::subxt::utils::H256 }, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - #[doc = "The reason given is just too big."] - ReasonTooBig, - #[codec(index = 1)] - #[doc = "The tip was already found/started."] - AlreadyKnown, - #[codec(index = 2)] - #[doc = "The tip hash is unknown."] - UnknownTip, - #[codec(index = 3)] - #[doc = "The account attempting to retract the tip is not the finder of the tip."] - NotFinder, - #[codec(index = 4)] - #[doc = "The tip cannot be claimed/closed because there are not enough tippers yet."] - StillOpen, - #[codec(index = 5)] - #[doc = "The tip cannot be claimed/closed because it's still in the countdown period."] - Premature, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub enum Event { - #[codec(index = 0)] - #[doc = "A new tip suggestion has been opened."] - NewTip { tip_hash: ::subxt::utils::H256 }, - #[codec(index = 1)] - #[doc = "A tip suggestion has reached threshold and is closing."] - TipClosing { tip_hash: ::subxt::utils::H256 }, - #[codec(index = 2)] - #[doc = "A tip suggestion has been closed."] - TipClosed { - tip_hash: ::subxt::utils::H256, - who: ::subxt::utils::AccountId32, - payout: ::core::primitive::u128, - }, - #[codec(index = 3)] - #[doc = "A tip suggestion has been retracted."] - TipRetracted { tip_hash: ::subxt::utils::H256 }, - #[codec(index = 4)] - #[doc = "A tip suggestion has been slashed."] - TipSlashed { - tip_hash: ::subxt::utils::H256, - finder: ::subxt::utils::AccountId32, - deposit: ::core::primitive::u128, - }, - } - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct OpenTip<_0, _1, _2, _3> { - pub reason: _3, - pub who: _0, - pub finder: _0, - pub deposit: _1, - pub closes: ::core::option::Option<_2>, - pub tips: ::std::vec::Vec<(_0, _1)>, - pub finders_fee: ::core::primitive::bool, - } - } - pub mod pallet_transaction_payment { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub enum Event { - #[codec(index = 0)] - #[doc = "A transaction fee `actual_fee`, of which `tip` was added to the minimum inclusion fee,"] - #[doc = "has been paid by `who`."] - TransactionFeePaid { - who: ::subxt::utils::AccountId32, - actual_fee: ::core::primitive::u128, - tip: ::core::primitive::u128, - }, - } - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct ChargeTransactionPayment(#[codec(compact)] pub ::core::primitive::u128); - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub enum Releases { - #[codec(index = 0)] - V1Ancient, - #[codec(index = 1)] - V2, - } - } - pub mod pallet_treasury { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "Put forward a suggestion for spending. A deposit proportional to the value"] - #[doc = "is reserved and slashed if the proposal is rejected. It is returned once the"] - #[doc = "proposal is awarded."] - #[doc = ""] - #[doc = "# "] - #[doc = "- Complexity: O(1)"] - #[doc = "- DbReads: `ProposalCount`, `origin account`"] - #[doc = "- DbWrites: `ProposalCount`, `Proposals`, `origin account`"] - #[doc = "# "] - propose_spend { - #[codec(compact)] - value: ::core::primitive::u128, - beneficiary: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - }, - #[codec(index = 1)] - #[doc = "Reject a proposed spend. The original deposit will be slashed."] - #[doc = ""] - #[doc = "May only be called from `T::RejectOrigin`."] - #[doc = ""] - #[doc = "# "] - #[doc = "- Complexity: O(1)"] - #[doc = "- DbReads: `Proposals`, `rejected proposer account`"] - #[doc = "- DbWrites: `Proposals`, `rejected proposer account`"] - #[doc = "# "] - reject_proposal { - #[codec(compact)] - proposal_id: ::core::primitive::u32, - }, - #[codec(index = 2)] - #[doc = "Approve a proposal. At a later time, the proposal will be allocated to the beneficiary"] - #[doc = "and the original deposit will be returned."] - #[doc = ""] - #[doc = "May only be called from `T::ApproveOrigin`."] - #[doc = ""] - #[doc = "# "] - #[doc = "- Complexity: O(1)."] - #[doc = "- DbReads: `Proposals`, `Approvals`"] - #[doc = "- DbWrite: `Approvals`"] - #[doc = "# "] - approve_proposal { - #[codec(compact)] - proposal_id: ::core::primitive::u32, - }, - #[codec(index = 3)] - #[doc = "Propose and approve a spend of treasury funds."] - #[doc = ""] - #[doc = "- `origin`: Must be `SpendOrigin` with the `Success` value being at least `amount`."] - #[doc = "- `amount`: The amount to be transferred from the treasury to the `beneficiary`."] - #[doc = "- `beneficiary`: The destination account for the transfer."] - #[doc = ""] - #[doc = "NOTE: For record-keeping purposes, the proposer is deemed to be equivalent to the"] - #[doc = "beneficiary."] - spend { - #[codec(compact)] - amount: ::core::primitive::u128, - beneficiary: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - }, - #[codec(index = 4)] - #[doc = "Force a previously approved proposal to be removed from the approval queue."] - #[doc = "The original deposit will no longer be returned."] - #[doc = ""] - #[doc = "May only be called from `T::RejectOrigin`."] - #[doc = "- `proposal_id`: The index of a proposal"] - #[doc = ""] - #[doc = "# "] - #[doc = "- Complexity: O(A) where `A` is the number of approvals"] - #[doc = "- Db reads and writes: `Approvals`"] - #[doc = "# "] - #[doc = ""] - #[doc = "Errors:"] - #[doc = "- `ProposalNotApproved`: The `proposal_id` supplied was not found in the approval queue,"] - #[doc = "i.e., the proposal has not been approved. This could also mean the proposal does not"] - #[doc = "exist altogether, thus there is no way it would have been approved in the first place."] - remove_approval { - #[codec(compact)] - proposal_id: ::core::primitive::u32, - }, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "Error for the treasury pallet."] - pub enum Error { - #[codec(index = 0)] - #[doc = "Proposer's balance is too low."] - InsufficientProposersBalance, - #[codec(index = 1)] - #[doc = "No proposal or bounty at that index."] - InvalidIndex, - #[codec(index = 2)] - #[doc = "Too many approvals in the queue."] - TooManyApprovals, - #[codec(index = 3)] - #[doc = "The spend origin is valid but the amount it is allowed to spend is lower than the"] - #[doc = "amount to be spent."] - InsufficientPermission, - #[codec(index = 4)] - #[doc = "Proposal has not been approved."] - ProposalNotApproved, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub enum Event { - #[codec(index = 0)] - #[doc = "New proposal."] - Proposed { - proposal_index: ::core::primitive::u32, - }, - #[codec(index = 1)] - #[doc = "We have ended a spend period and will now allocate funds."] - Spending { - budget_remaining: ::core::primitive::u128, - }, - #[codec(index = 2)] - #[doc = "Some funds have been allocated."] - Awarded { - proposal_index: ::core::primitive::u32, - award: ::core::primitive::u128, - account: ::subxt::utils::AccountId32, - }, - #[codec(index = 3)] - #[doc = "A proposal was rejected; funds were slashed."] - Rejected { - proposal_index: ::core::primitive::u32, - slashed: ::core::primitive::u128, - }, - #[codec(index = 4)] - #[doc = "Some of our funds have been burnt."] - Burnt { - burnt_funds: ::core::primitive::u128, - }, - #[codec(index = 5)] - #[doc = "Spending has finished; this is the amount that rolls over until next spend."] - Rollover { - rollover_balance: ::core::primitive::u128, - }, - #[codec(index = 6)] - #[doc = "Some funds have been deposited."] - Deposit { value: ::core::primitive::u128 }, - #[codec(index = 7)] - #[doc = "A new spend proposal has been approved."] - SpendApproved { - proposal_index: ::core::primitive::u32, - amount: ::core::primitive::u128, - beneficiary: ::subxt::utils::AccountId32, - }, - #[codec(index = 8)] - #[doc = "The inactive funds of the pallet have been updated."] - UpdatedInactive { - reactivated: ::core::primitive::u128, - deactivated: ::core::primitive::u128, - }, - } - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Proposal<_0, _1> { - pub proposer: _0, - pub value: _1, - pub beneficiary: _0, - pub bond: _1, - } - } - pub mod pallet_utility { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "Send a batch of dispatch calls."] - #[doc = ""] - #[doc = "May be called from any origin except `None`."] - #[doc = ""] - #[doc = "- `calls`: The calls to be dispatched from the same origin. The number of call must not"] - #[doc = " exceed the constant: `batched_calls_limit` (available in constant metadata)."] - #[doc = ""] - #[doc = "If origin is root then the calls are dispatched without checking origin filter. (This"] - #[doc = "includes bypassing `frame_system::Config::BaseCallFilter`)."] - #[doc = ""] - #[doc = "# "] - #[doc = "- Complexity: O(C) where C is the number of calls to be batched."] - #[doc = "# "] - #[doc = ""] - #[doc = "This will return `Ok` in all circumstances. To determine the success of the batch, an"] - #[doc = "event is deposited. If a call failed and the batch was interrupted, then the"] - #[doc = "`BatchInterrupted` event is deposited, along with the number of successful calls made"] - #[doc = "and the error of the failed call. If all were successful, then the `BatchCompleted`"] - #[doc = "event is deposited."] - batch { - calls: ::std::vec::Vec, - }, - #[codec(index = 1)] - #[doc = "Send a call through an indexed pseudonym of the sender."] - #[doc = ""] - #[doc = "Filter from origin are passed along. The call will be dispatched with an origin which"] - #[doc = "use the same filter as the origin of this call."] - #[doc = ""] - #[doc = "NOTE: If you need to ensure that any account-based filtering is not honored (i.e."] - #[doc = "because you expect `proxy` to have been used prior in the call stack and you do not want"] - #[doc = "the call restrictions to apply to any sub-accounts), then use `as_multi_threshold_1`"] - #[doc = "in the Multisig pallet instead."] - #[doc = ""] - #[doc = "NOTE: Prior to version *12, this was called `as_limited_sub`."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - as_derivative { - index: ::core::primitive::u16, - call: ::std::boxed::Box, - }, - #[codec(index = 2)] - #[doc = "Send a batch of dispatch calls and atomically execute them."] - #[doc = "The whole transaction will rollback and fail if any of the calls failed."] - #[doc = ""] - #[doc = "May be called from any origin except `None`."] - #[doc = ""] - #[doc = "- `calls`: The calls to be dispatched from the same origin. The number of call must not"] - #[doc = " exceed the constant: `batched_calls_limit` (available in constant metadata)."] - #[doc = ""] - #[doc = "If origin is root then the calls are dispatched without checking origin filter. (This"] - #[doc = "includes bypassing `frame_system::Config::BaseCallFilter`)."] - #[doc = ""] - #[doc = "# "] - #[doc = "- Complexity: O(C) where C is the number of calls to be batched."] - #[doc = "# "] - batch_all { - calls: ::std::vec::Vec, - }, - #[codec(index = 3)] - #[doc = "Dispatches a function call with a provided origin."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Root_."] - #[doc = ""] - #[doc = "# "] - #[doc = "- O(1)."] - #[doc = "- Limited storage reads."] - #[doc = "- One DB write (event)."] - #[doc = "- Weight of derivative `call` execution + T::WeightInfo::dispatch_as()."] - #[doc = "# "] - dispatch_as { - as_origin: ::std::boxed::Box, - call: ::std::boxed::Box, - }, - #[codec(index = 4)] - #[doc = "Send a batch of dispatch calls."] - #[doc = "Unlike `batch`, it allows errors and won't interrupt."] - #[doc = ""] - #[doc = "May be called from any origin except `None`."] - #[doc = ""] - #[doc = "- `calls`: The calls to be dispatched from the same origin. The number of call must not"] - #[doc = " exceed the constant: `batched_calls_limit` (available in constant metadata)."] - #[doc = ""] - #[doc = "If origin is root then the calls are dispatch without checking origin filter. (This"] - #[doc = "includes bypassing `frame_system::Config::BaseCallFilter`)."] - #[doc = ""] - #[doc = "# "] - #[doc = "- Complexity: O(C) where C is the number of calls to be batched."] - #[doc = "# "] - force_batch { - calls: ::std::vec::Vec, - }, - #[codec(index = 5)] - #[doc = "Dispatch a function call with a specified weight."] - #[doc = ""] - #[doc = "This function does not check the weight of the call, and instead allows the"] - #[doc = "Root origin to specify the weight of the call."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Root_."] - with_weight { - call: ::std::boxed::Box, - weight: runtime_types::sp_weights::weight_v2::Weight, - }, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - #[doc = "Too many calls batched."] - TooManyCalls, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub enum Event { - #[codec(index = 0)] - #[doc = "Batch of dispatches did not complete fully. Index of first failing dispatch given, as"] - #[doc = "well as the error."] - BatchInterrupted { - index: ::core::primitive::u32, - error: runtime_types::sp_runtime::DispatchError, - }, - #[codec(index = 1)] - #[doc = "Batch of dispatches completed fully with no error."] - BatchCompleted, - #[codec(index = 2)] - #[doc = "Batch of dispatches completed but has errors."] - BatchCompletedWithErrors, - #[codec(index = 3)] - #[doc = "A single item within a Batch of dispatches has completed with no error."] - ItemCompleted, - #[codec(index = 4)] - #[doc = "A single item within a Batch of dispatches has completed with error."] - ItemFailed { - error: runtime_types::sp_runtime::DispatchError, - }, - #[codec(index = 5)] - #[doc = "A call was dispatched."] - DispatchedAs { - result: - ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - }, - } - } - } - pub mod primitive_types { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct U256(pub [::core::primitive::u64; 4usize]); - } - pub mod sp_arithmetic { - use super::runtime_types; - pub mod fixed_point { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct FixedU128(pub ::core::primitive::u128); - } - pub mod per_things { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct PerU16(pub ::core::primitive::u16); - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Perbill(pub ::core::primitive::u32); - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Percent(pub ::core::primitive::u8); - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Permill(pub ::core::primitive::u32); - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub enum ArithmeticError { - #[codec(index = 0)] - Underflow, - #[codec(index = 1)] - Overflow, - #[codec(index = 2)] - DivisionByZero, - } - } - pub mod sp_authority_discovery { - use super::runtime_types; - pub mod app { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Public(pub runtime_types::sp_core::sr25519::Public); - } - } - pub mod sp_consensus_babe { - use super::runtime_types; - pub mod app { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Public(pub runtime_types::sp_core::sr25519::Public); - } - pub mod digests { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub enum NextConfigDescriptor { - #[codec(index = 1)] - V1 { - c: (::core::primitive::u64, ::core::primitive::u64), - allowed_slots: runtime_types::sp_consensus_babe::AllowedSlots, - }, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub enum PreDigest { - #[codec(index = 1)] - Primary(runtime_types::sp_consensus_babe::digests::PrimaryPreDigest), - #[codec(index = 2)] - SecondaryPlain( - runtime_types::sp_consensus_babe::digests::SecondaryPlainPreDigest, - ), - #[codec(index = 3)] - SecondaryVRF(runtime_types::sp_consensus_babe::digests::SecondaryVRFPreDigest), - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct PrimaryPreDigest { - pub authority_index: ::core::primitive::u32, - pub slot: runtime_types::sp_consensus_slots::Slot, - pub vrf_output: [::core::primitive::u8; 32usize], - pub vrf_proof: [::core::primitive::u8; 64usize], - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct SecondaryPlainPreDigest { - pub authority_index: ::core::primitive::u32, - pub slot: runtime_types::sp_consensus_slots::Slot, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct SecondaryVRFPreDigest { - pub authority_index: ::core::primitive::u32, - pub slot: runtime_types::sp_consensus_slots::Slot, - pub vrf_output: [::core::primitive::u8; 32usize], - pub vrf_proof: [::core::primitive::u8; 64usize], - } - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub enum AllowedSlots { - #[codec(index = 0)] - PrimarySlots, - #[codec(index = 1)] - PrimaryAndSecondaryPlainSlots, - #[codec(index = 2)] - PrimaryAndSecondaryVRFSlots, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct BabeEpochConfiguration { - pub c: (::core::primitive::u64, ::core::primitive::u64), - pub allowed_slots: runtime_types::sp_consensus_babe::AllowedSlots, - } - } - pub mod sp_consensus_slots { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct EquivocationProof<_0, _1> { - pub offender: _1, - pub slot: runtime_types::sp_consensus_slots::Slot, - pub first_header: _0, - pub second_header: _0, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Slot(pub ::core::primitive::u64); - } - pub mod sp_core { - use super::runtime_types; - pub mod bounded { - use super::runtime_types; - pub mod bounded_btree_map { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct BoundedBTreeMap<_0, _1>(pub ::subxt::utils::KeyedVec<_0, _1>); - } - pub mod bounded_vec { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct BoundedVec<_0>(pub ::std::vec::Vec<_0>); - } - pub mod weak_bounded_vec { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct WeakBoundedVec<_0>(pub ::std::vec::Vec<_0>); - } - } - pub mod crypto { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct KeyTypeId(pub [::core::primitive::u8; 4usize]); - } - pub mod ecdsa { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Signature(pub [::core::primitive::u8; 65usize]); - } - pub mod ed25519 { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Public(pub [::core::primitive::u8; 32usize]); - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Signature(pub [::core::primitive::u8; 64usize]); - } - pub mod offchain { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct OpaqueMultiaddr(pub ::std::vec::Vec<::core::primitive::u8>); - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct OpaqueNetworkState { - pub peer_id: runtime_types::sp_core::OpaquePeerId, - pub external_addresses: - ::std::vec::Vec, - } - } - pub mod sr25519 { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Public(pub [::core::primitive::u8; 32usize]); - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Signature(pub [::core::primitive::u8; 64usize]); - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct OpaquePeerId(pub ::std::vec::Vec<::core::primitive::u8>); - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub enum Void {} - } - pub mod sp_finality_grandpa { - use super::runtime_types; - pub mod app { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Public(pub runtime_types::sp_core::ed25519::Public); - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Signature(pub runtime_types::sp_core::ed25519::Signature); - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub enum Equivocation<_0, _1> { - #[codec(index = 0)] - Prevote( - runtime_types::finality_grandpa::Equivocation< - runtime_types::sp_finality_grandpa::app::Public, - runtime_types::finality_grandpa::Prevote<_0, _1>, - runtime_types::sp_finality_grandpa::app::Signature, - >, - ), - #[codec(index = 1)] - Precommit( - runtime_types::finality_grandpa::Equivocation< - runtime_types::sp_finality_grandpa::app::Public, - runtime_types::finality_grandpa::Precommit<_0, _1>, - runtime_types::sp_finality_grandpa::app::Signature, - >, - ), - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct EquivocationProof<_0, _1> { - pub set_id: ::core::primitive::u64, - pub equivocation: runtime_types::sp_finality_grandpa::Equivocation<_0, _1>, - } - } - pub mod sp_npos_elections { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct ElectionScore { - pub minimal_stake: ::core::primitive::u128, - pub sum_stake: ::core::primitive::u128, - pub sum_stake_squared: ::core::primitive::u128, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Support<_0> { - pub total: ::core::primitive::u128, - pub voters: ::std::vec::Vec<(_0, ::core::primitive::u128)>, - } - } - pub mod sp_runtime { - use super::runtime_types; - pub mod generic { - use super::runtime_types; - pub mod digest { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct Digest { - pub logs: - ::std::vec::Vec, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub enum DigestItem { - #[codec(index = 6)] - PreRuntime( - [::core::primitive::u8; 4usize], - ::std::vec::Vec<::core::primitive::u8>, - ), - #[codec(index = 4)] - Consensus( - [::core::primitive::u8; 4usize], - ::std::vec::Vec<::core::primitive::u8>, - ), - #[codec(index = 5)] - Seal( - [::core::primitive::u8; 4usize], - ::std::vec::Vec<::core::primitive::u8>, - ), - #[codec(index = 0)] - Other(::std::vec::Vec<::core::primitive::u8>), - #[codec(index = 8)] - RuntimeEnvironmentUpdated, - } - } - pub mod era { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub enum Era { - #[codec(index = 0)] - Immortal, - #[codec(index = 1)] - Mortal1(::core::primitive::u8), - #[codec(index = 2)] - Mortal2(::core::primitive::u8), - #[codec(index = 3)] - Mortal3(::core::primitive::u8), - #[codec(index = 4)] - Mortal4(::core::primitive::u8), - #[codec(index = 5)] - Mortal5(::core::primitive::u8), - #[codec(index = 6)] - Mortal6(::core::primitive::u8), - #[codec(index = 7)] - Mortal7(::core::primitive::u8), - #[codec(index = 8)] - Mortal8(::core::primitive::u8), - #[codec(index = 9)] - Mortal9(::core::primitive::u8), - #[codec(index = 10)] - Mortal10(::core::primitive::u8), - #[codec(index = 11)] - Mortal11(::core::primitive::u8), - #[codec(index = 12)] - Mortal12(::core::primitive::u8), - #[codec(index = 13)] - Mortal13(::core::primitive::u8), - #[codec(index = 14)] - Mortal14(::core::primitive::u8), - #[codec(index = 15)] - Mortal15(::core::primitive::u8), - #[codec(index = 16)] - Mortal16(::core::primitive::u8), - #[codec(index = 17)] - Mortal17(::core::primitive::u8), - #[codec(index = 18)] - Mortal18(::core::primitive::u8), - #[codec(index = 19)] - Mortal19(::core::primitive::u8), - #[codec(index = 20)] - Mortal20(::core::primitive::u8), - #[codec(index = 21)] - Mortal21(::core::primitive::u8), - #[codec(index = 22)] - Mortal22(::core::primitive::u8), - #[codec(index = 23)] - Mortal23(::core::primitive::u8), - #[codec(index = 24)] - Mortal24(::core::primitive::u8), - #[codec(index = 25)] - Mortal25(::core::primitive::u8), - #[codec(index = 26)] - Mortal26(::core::primitive::u8), - #[codec(index = 27)] - Mortal27(::core::primitive::u8), - #[codec(index = 28)] - Mortal28(::core::primitive::u8), - #[codec(index = 29)] - Mortal29(::core::primitive::u8), - #[codec(index = 30)] - Mortal30(::core::primitive::u8), - #[codec(index = 31)] - Mortal31(::core::primitive::u8), - #[codec(index = 32)] - Mortal32(::core::primitive::u8), - #[codec(index = 33)] - Mortal33(::core::primitive::u8), - #[codec(index = 34)] - Mortal34(::core::primitive::u8), - #[codec(index = 35)] - Mortal35(::core::primitive::u8), - #[codec(index = 36)] - Mortal36(::core::primitive::u8), - #[codec(index = 37)] - Mortal37(::core::primitive::u8), - #[codec(index = 38)] - Mortal38(::core::primitive::u8), - #[codec(index = 39)] - Mortal39(::core::primitive::u8), - #[codec(index = 40)] - Mortal40(::core::primitive::u8), - #[codec(index = 41)] - Mortal41(::core::primitive::u8), - #[codec(index = 42)] - Mortal42(::core::primitive::u8), - #[codec(index = 43)] - Mortal43(::core::primitive::u8), - #[codec(index = 44)] - Mortal44(::core::primitive::u8), - #[codec(index = 45)] - Mortal45(::core::primitive::u8), - #[codec(index = 46)] - Mortal46(::core::primitive::u8), - #[codec(index = 47)] - Mortal47(::core::primitive::u8), - #[codec(index = 48)] - Mortal48(::core::primitive::u8), - #[codec(index = 49)] - Mortal49(::core::primitive::u8), - #[codec(index = 50)] - Mortal50(::core::primitive::u8), - #[codec(index = 51)] - Mortal51(::core::primitive::u8), - #[codec(index = 52)] - Mortal52(::core::primitive::u8), - #[codec(index = 53)] - Mortal53(::core::primitive::u8), - #[codec(index = 54)] - Mortal54(::core::primitive::u8), - #[codec(index = 55)] - Mortal55(::core::primitive::u8), - #[codec(index = 56)] - Mortal56(::core::primitive::u8), - #[codec(index = 57)] - Mortal57(::core::primitive::u8), - #[codec(index = 58)] - Mortal58(::core::primitive::u8), - #[codec(index = 59)] - Mortal59(::core::primitive::u8), - #[codec(index = 60)] - Mortal60(::core::primitive::u8), - #[codec(index = 61)] - Mortal61(::core::primitive::u8), - #[codec(index = 62)] - Mortal62(::core::primitive::u8), - #[codec(index = 63)] - Mortal63(::core::primitive::u8), - #[codec(index = 64)] - Mortal64(::core::primitive::u8), - #[codec(index = 65)] - Mortal65(::core::primitive::u8), - #[codec(index = 66)] - Mortal66(::core::primitive::u8), - #[codec(index = 67)] - Mortal67(::core::primitive::u8), - #[codec(index = 68)] - Mortal68(::core::primitive::u8), - #[codec(index = 69)] - Mortal69(::core::primitive::u8), - #[codec(index = 70)] - Mortal70(::core::primitive::u8), - #[codec(index = 71)] - Mortal71(::core::primitive::u8), - #[codec(index = 72)] - Mortal72(::core::primitive::u8), - #[codec(index = 73)] - Mortal73(::core::primitive::u8), - #[codec(index = 74)] - Mortal74(::core::primitive::u8), - #[codec(index = 75)] - Mortal75(::core::primitive::u8), - #[codec(index = 76)] - Mortal76(::core::primitive::u8), - #[codec(index = 77)] - Mortal77(::core::primitive::u8), - #[codec(index = 78)] - Mortal78(::core::primitive::u8), - #[codec(index = 79)] - Mortal79(::core::primitive::u8), - #[codec(index = 80)] - Mortal80(::core::primitive::u8), - #[codec(index = 81)] - Mortal81(::core::primitive::u8), - #[codec(index = 82)] - Mortal82(::core::primitive::u8), - #[codec(index = 83)] - Mortal83(::core::primitive::u8), - #[codec(index = 84)] - Mortal84(::core::primitive::u8), - #[codec(index = 85)] - Mortal85(::core::primitive::u8), - #[codec(index = 86)] - Mortal86(::core::primitive::u8), - #[codec(index = 87)] - Mortal87(::core::primitive::u8), - #[codec(index = 88)] - Mortal88(::core::primitive::u8), - #[codec(index = 89)] - Mortal89(::core::primitive::u8), - #[codec(index = 90)] - Mortal90(::core::primitive::u8), - #[codec(index = 91)] - Mortal91(::core::primitive::u8), - #[codec(index = 92)] - Mortal92(::core::primitive::u8), - #[codec(index = 93)] - Mortal93(::core::primitive::u8), - #[codec(index = 94)] - Mortal94(::core::primitive::u8), - #[codec(index = 95)] - Mortal95(::core::primitive::u8), - #[codec(index = 96)] - Mortal96(::core::primitive::u8), - #[codec(index = 97)] - Mortal97(::core::primitive::u8), - #[codec(index = 98)] - Mortal98(::core::primitive::u8), - #[codec(index = 99)] - Mortal99(::core::primitive::u8), - #[codec(index = 100)] - Mortal100(::core::primitive::u8), - #[codec(index = 101)] - Mortal101(::core::primitive::u8), - #[codec(index = 102)] - Mortal102(::core::primitive::u8), - #[codec(index = 103)] - Mortal103(::core::primitive::u8), - #[codec(index = 104)] - Mortal104(::core::primitive::u8), - #[codec(index = 105)] - Mortal105(::core::primitive::u8), - #[codec(index = 106)] - Mortal106(::core::primitive::u8), - #[codec(index = 107)] - Mortal107(::core::primitive::u8), - #[codec(index = 108)] - Mortal108(::core::primitive::u8), - #[codec(index = 109)] - Mortal109(::core::primitive::u8), - #[codec(index = 110)] - Mortal110(::core::primitive::u8), - #[codec(index = 111)] - Mortal111(::core::primitive::u8), - #[codec(index = 112)] - Mortal112(::core::primitive::u8), - #[codec(index = 113)] - Mortal113(::core::primitive::u8), - #[codec(index = 114)] - Mortal114(::core::primitive::u8), - #[codec(index = 115)] - Mortal115(::core::primitive::u8), - #[codec(index = 116)] - Mortal116(::core::primitive::u8), - #[codec(index = 117)] - Mortal117(::core::primitive::u8), - #[codec(index = 118)] - Mortal118(::core::primitive::u8), - #[codec(index = 119)] - Mortal119(::core::primitive::u8), - #[codec(index = 120)] - Mortal120(::core::primitive::u8), - #[codec(index = 121)] - Mortal121(::core::primitive::u8), - #[codec(index = 122)] - Mortal122(::core::primitive::u8), - #[codec(index = 123)] - Mortal123(::core::primitive::u8), - #[codec(index = 124)] - Mortal124(::core::primitive::u8), - #[codec(index = 125)] - Mortal125(::core::primitive::u8), - #[codec(index = 126)] - Mortal126(::core::primitive::u8), - #[codec(index = 127)] - Mortal127(::core::primitive::u8), - #[codec(index = 128)] - Mortal128(::core::primitive::u8), - #[codec(index = 129)] - Mortal129(::core::primitive::u8), - #[codec(index = 130)] - Mortal130(::core::primitive::u8), - #[codec(index = 131)] - Mortal131(::core::primitive::u8), - #[codec(index = 132)] - Mortal132(::core::primitive::u8), - #[codec(index = 133)] - Mortal133(::core::primitive::u8), - #[codec(index = 134)] - Mortal134(::core::primitive::u8), - #[codec(index = 135)] - Mortal135(::core::primitive::u8), - #[codec(index = 136)] - Mortal136(::core::primitive::u8), - #[codec(index = 137)] - Mortal137(::core::primitive::u8), - #[codec(index = 138)] - Mortal138(::core::primitive::u8), - #[codec(index = 139)] - Mortal139(::core::primitive::u8), - #[codec(index = 140)] - Mortal140(::core::primitive::u8), - #[codec(index = 141)] - Mortal141(::core::primitive::u8), - #[codec(index = 142)] - Mortal142(::core::primitive::u8), - #[codec(index = 143)] - Mortal143(::core::primitive::u8), - #[codec(index = 144)] - Mortal144(::core::primitive::u8), - #[codec(index = 145)] - Mortal145(::core::primitive::u8), - #[codec(index = 146)] - Mortal146(::core::primitive::u8), - #[codec(index = 147)] - Mortal147(::core::primitive::u8), - #[codec(index = 148)] - Mortal148(::core::primitive::u8), - #[codec(index = 149)] - Mortal149(::core::primitive::u8), - #[codec(index = 150)] - Mortal150(::core::primitive::u8), - #[codec(index = 151)] - Mortal151(::core::primitive::u8), - #[codec(index = 152)] - Mortal152(::core::primitive::u8), - #[codec(index = 153)] - Mortal153(::core::primitive::u8), - #[codec(index = 154)] - Mortal154(::core::primitive::u8), - #[codec(index = 155)] - Mortal155(::core::primitive::u8), - #[codec(index = 156)] - Mortal156(::core::primitive::u8), - #[codec(index = 157)] - Mortal157(::core::primitive::u8), - #[codec(index = 158)] - Mortal158(::core::primitive::u8), - #[codec(index = 159)] - Mortal159(::core::primitive::u8), - #[codec(index = 160)] - Mortal160(::core::primitive::u8), - #[codec(index = 161)] - Mortal161(::core::primitive::u8), - #[codec(index = 162)] - Mortal162(::core::primitive::u8), - #[codec(index = 163)] - Mortal163(::core::primitive::u8), - #[codec(index = 164)] - Mortal164(::core::primitive::u8), - #[codec(index = 165)] - Mortal165(::core::primitive::u8), - #[codec(index = 166)] - Mortal166(::core::primitive::u8), - #[codec(index = 167)] - Mortal167(::core::primitive::u8), - #[codec(index = 168)] - Mortal168(::core::primitive::u8), - #[codec(index = 169)] - Mortal169(::core::primitive::u8), - #[codec(index = 170)] - Mortal170(::core::primitive::u8), - #[codec(index = 171)] - Mortal171(::core::primitive::u8), - #[codec(index = 172)] - Mortal172(::core::primitive::u8), - #[codec(index = 173)] - Mortal173(::core::primitive::u8), - #[codec(index = 174)] - Mortal174(::core::primitive::u8), - #[codec(index = 175)] - Mortal175(::core::primitive::u8), - #[codec(index = 176)] - Mortal176(::core::primitive::u8), - #[codec(index = 177)] - Mortal177(::core::primitive::u8), - #[codec(index = 178)] - Mortal178(::core::primitive::u8), - #[codec(index = 179)] - Mortal179(::core::primitive::u8), - #[codec(index = 180)] - Mortal180(::core::primitive::u8), - #[codec(index = 181)] - Mortal181(::core::primitive::u8), - #[codec(index = 182)] - Mortal182(::core::primitive::u8), - #[codec(index = 183)] - Mortal183(::core::primitive::u8), - #[codec(index = 184)] - Mortal184(::core::primitive::u8), - #[codec(index = 185)] - Mortal185(::core::primitive::u8), - #[codec(index = 186)] - Mortal186(::core::primitive::u8), - #[codec(index = 187)] - Mortal187(::core::primitive::u8), - #[codec(index = 188)] - Mortal188(::core::primitive::u8), - #[codec(index = 189)] - Mortal189(::core::primitive::u8), - #[codec(index = 190)] - Mortal190(::core::primitive::u8), - #[codec(index = 191)] - Mortal191(::core::primitive::u8), - #[codec(index = 192)] - Mortal192(::core::primitive::u8), - #[codec(index = 193)] - Mortal193(::core::primitive::u8), - #[codec(index = 194)] - Mortal194(::core::primitive::u8), - #[codec(index = 195)] - Mortal195(::core::primitive::u8), - #[codec(index = 196)] - Mortal196(::core::primitive::u8), - #[codec(index = 197)] - Mortal197(::core::primitive::u8), - #[codec(index = 198)] - Mortal198(::core::primitive::u8), - #[codec(index = 199)] - Mortal199(::core::primitive::u8), - #[codec(index = 200)] - Mortal200(::core::primitive::u8), - #[codec(index = 201)] - Mortal201(::core::primitive::u8), - #[codec(index = 202)] - Mortal202(::core::primitive::u8), - #[codec(index = 203)] - Mortal203(::core::primitive::u8), - #[codec(index = 204)] - Mortal204(::core::primitive::u8), - #[codec(index = 205)] - Mortal205(::core::primitive::u8), - #[codec(index = 206)] - Mortal206(::core::primitive::u8), - #[codec(index = 207)] - Mortal207(::core::primitive::u8), - #[codec(index = 208)] - Mortal208(::core::primitive::u8), - #[codec(index = 209)] - Mortal209(::core::primitive::u8), - #[codec(index = 210)] - Mortal210(::core::primitive::u8), - #[codec(index = 211)] - Mortal211(::core::primitive::u8), - #[codec(index = 212)] - Mortal212(::core::primitive::u8), - #[codec(index = 213)] - Mortal213(::core::primitive::u8), - #[codec(index = 214)] - Mortal214(::core::primitive::u8), - #[codec(index = 215)] - Mortal215(::core::primitive::u8), - #[codec(index = 216)] - Mortal216(::core::primitive::u8), - #[codec(index = 217)] - Mortal217(::core::primitive::u8), - #[codec(index = 218)] - Mortal218(::core::primitive::u8), - #[codec(index = 219)] - Mortal219(::core::primitive::u8), - #[codec(index = 220)] - Mortal220(::core::primitive::u8), - #[codec(index = 221)] - Mortal221(::core::primitive::u8), - #[codec(index = 222)] - Mortal222(::core::primitive::u8), - #[codec(index = 223)] - Mortal223(::core::primitive::u8), - #[codec(index = 224)] - Mortal224(::core::primitive::u8), - #[codec(index = 225)] - Mortal225(::core::primitive::u8), - #[codec(index = 226)] - Mortal226(::core::primitive::u8), - #[codec(index = 227)] - Mortal227(::core::primitive::u8), - #[codec(index = 228)] - Mortal228(::core::primitive::u8), - #[codec(index = 229)] - Mortal229(::core::primitive::u8), - #[codec(index = 230)] - Mortal230(::core::primitive::u8), - #[codec(index = 231)] - Mortal231(::core::primitive::u8), - #[codec(index = 232)] - Mortal232(::core::primitive::u8), - #[codec(index = 233)] - Mortal233(::core::primitive::u8), - #[codec(index = 234)] - Mortal234(::core::primitive::u8), - #[codec(index = 235)] - Mortal235(::core::primitive::u8), - #[codec(index = 236)] - Mortal236(::core::primitive::u8), - #[codec(index = 237)] - Mortal237(::core::primitive::u8), - #[codec(index = 238)] - Mortal238(::core::primitive::u8), - #[codec(index = 239)] - Mortal239(::core::primitive::u8), - #[codec(index = 240)] - Mortal240(::core::primitive::u8), - #[codec(index = 241)] - Mortal241(::core::primitive::u8), - #[codec(index = 242)] - Mortal242(::core::primitive::u8), - #[codec(index = 243)] - Mortal243(::core::primitive::u8), - #[codec(index = 244)] - Mortal244(::core::primitive::u8), - #[codec(index = 245)] - Mortal245(::core::primitive::u8), - #[codec(index = 246)] - Mortal246(::core::primitive::u8), - #[codec(index = 247)] - Mortal247(::core::primitive::u8), - #[codec(index = 248)] - Mortal248(::core::primitive::u8), - #[codec(index = 249)] - Mortal249(::core::primitive::u8), - #[codec(index = 250)] - Mortal250(::core::primitive::u8), - #[codec(index = 251)] - Mortal251(::core::primitive::u8), - #[codec(index = 252)] - Mortal252(::core::primitive::u8), - #[codec(index = 253)] - Mortal253(::core::primitive::u8), - #[codec(index = 254)] - Mortal254(::core::primitive::u8), - #[codec(index = 255)] - Mortal255(::core::primitive::u8), + + #[doc = " Active members."] + #[doc = ""] + #[doc = " TWOX-NOTE: SAFE since `AccountId` is a secure hash."] + pub fn pool_members( + &self, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_nomination_pools::PoolMember, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "NominationPools", + "PoolMembers", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], + [ + 116u8, 41u8, 89u8, 74u8, 35u8, 243u8, 213u8, 178u8, 41u8, 249u8, 62u8, + 119u8, 72u8, 34u8, 197u8, 168u8, 147u8, 178u8, 159u8, 10u8, 181u8, + 255u8, 40u8, 211u8, 206u8, 32u8, 130u8, 25u8, 201u8, 54u8, 212u8, 25u8, + ], + ) + } + + #[doc = " Active members."] + #[doc = ""] + #[doc = " TWOX-NOTE: SAFE since `AccountId` is a secure hash."] + pub fn pool_members_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_nomination_pools::PoolMember, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "NominationPools", + "PoolMembers", + Vec::new(), + [ + 116u8, 41u8, 89u8, 74u8, 35u8, 243u8, 213u8, 178u8, 41u8, 249u8, 62u8, + 119u8, 72u8, 34u8, 197u8, 168u8, 147u8, 178u8, 159u8, 10u8, 181u8, + 255u8, 40u8, 211u8, 206u8, 32u8, 130u8, 25u8, 201u8, 54u8, 212u8, 25u8, + ], + ) + } + + #[doc = "Counter for the related counted storage map"] + pub fn counter_for_pool_members( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "NominationPools", + "CounterForPoolMembers", + vec![], + [ + 165u8, 158u8, 130u8, 19u8, 106u8, 227u8, 134u8, 73u8, 36u8, 237u8, + 103u8, 146u8, 198u8, 68u8, 219u8, 186u8, 134u8, 224u8, 89u8, 251u8, + 200u8, 46u8, 87u8, 232u8, 53u8, 152u8, 13u8, 10u8, 105u8, 49u8, 150u8, + 212u8, + ], + ) + } + + #[doc = " Storage for bonded pools."] + pub fn bonded_pools( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_nomination_pools::BondedPoolInner, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "NominationPools", + "BondedPools", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], + [ + 29u8, 112u8, 96u8, 33u8, 199u8, 248u8, 75u8, 7u8, 24u8, 36u8, 87u8, + 58u8, 109u8, 128u8, 254u8, 113u8, 166u8, 153u8, 55u8, 67u8, 163u8, + 221u8, 234u8, 171u8, 134u8, 254u8, 213u8, 66u8, 21u8, 183u8, 129u8, + 24u8, + ], + ) + } + + #[doc = " Storage for bonded pools."] + pub fn bonded_pools_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_nomination_pools::BondedPoolInner, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "NominationPools", + "BondedPools", + Vec::new(), + [ + 29u8, 112u8, 96u8, 33u8, 199u8, 248u8, 75u8, 7u8, 24u8, 36u8, 87u8, + 58u8, 109u8, 128u8, 254u8, 113u8, 166u8, 153u8, 55u8, 67u8, 163u8, + 221u8, 234u8, 171u8, 134u8, 254u8, 213u8, 66u8, 21u8, 183u8, 129u8, + 24u8, + ], + ) + } + + #[doc = "Counter for the related counted storage map"] + pub fn counter_for_bonded_pools( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "NominationPools", + "CounterForBondedPools", + vec![], + [ + 198u8, 6u8, 213u8, 92u8, 4u8, 114u8, 164u8, 244u8, 51u8, 55u8, 157u8, + 20u8, 224u8, 183u8, 40u8, 236u8, 115u8, 86u8, 171u8, 207u8, 31u8, + 111u8, 0u8, 210u8, 48u8, 198u8, 243u8, 153u8, 5u8, 216u8, 107u8, 113u8, + ], + ) + } + + #[doc = " Reward pools. This is where there rewards for each pool accumulate. When a members payout"] + #[doc = " is claimed, the balance comes out fo the reward pool. Keyed by the bonded pools account."] + pub fn reward_pools( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_nomination_pools::RewardPool, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "NominationPools", + "RewardPools", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], + [ + 174u8, 33u8, 134u8, 109u8, 68u8, 246u8, 32u8, 47u8, 244u8, 141u8, + 233u8, 200u8, 126u8, 35u8, 233u8, 145u8, 194u8, 123u8, 51u8, 148u8, + 5u8, 228u8, 224u8, 32u8, 2u8, 115u8, 57u8, 10u8, 36u8, 100u8, 69u8, + 61u8, + ], + ) + } + + #[doc = " Reward pools. This is where there rewards for each pool accumulate. When a members payout"] + #[doc = " is claimed, the balance comes out fo the reward pool. Keyed by the bonded pools account."] + pub fn reward_pools_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_nomination_pools::RewardPool, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "NominationPools", + "RewardPools", + Vec::new(), + [ + 174u8, 33u8, 134u8, 109u8, 68u8, 246u8, 32u8, 47u8, 244u8, 141u8, + 233u8, 200u8, 126u8, 35u8, 233u8, 145u8, 194u8, 123u8, 51u8, 148u8, + 5u8, 228u8, 224u8, 32u8, 2u8, 115u8, 57u8, 10u8, 36u8, 100u8, 69u8, + 61u8, + ], + ) + } + + #[doc = "Counter for the related counted storage map"] + pub fn counter_for_reward_pools( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "NominationPools", + "CounterForRewardPools", + vec![], + [ + 218u8, 186u8, 28u8, 97u8, 205u8, 249u8, 187u8, 10u8, 127u8, 190u8, + 213u8, 152u8, 103u8, 20u8, 157u8, 183u8, 86u8, 104u8, 186u8, 236u8, + 84u8, 159u8, 117u8, 78u8, 5u8, 242u8, 193u8, 59u8, 112u8, 200u8, 34u8, + 166u8, + ], + ) + } + + #[doc = " Groups of unbonding pools. Each group of unbonding pools belongs to a bonded pool,"] + #[doc = " hence the name sub-pools. Keyed by the bonded pools account."] + pub fn sub_pools_storage( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_nomination_pools::SubPools, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "NominationPools", + "SubPoolsStorage", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], + [ + 248u8, 37u8, 232u8, 231u8, 14u8, 140u8, 12u8, 27u8, 61u8, 222u8, 185u8, + 128u8, 158u8, 30u8, 57u8, 121u8, 35u8, 11u8, 42u8, 242u8, 56u8, 1u8, + 61u8, 0u8, 67u8, 140u8, 55u8, 62u8, 165u8, 134u8, 136u8, 4u8, + ], + ) + } + + #[doc = " Groups of unbonding pools. Each group of unbonding pools belongs to a bonded pool,"] + #[doc = " hence the name sub-pools. Keyed by the bonded pools account."] + pub fn sub_pools_storage_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_nomination_pools::SubPools, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "NominationPools", + "SubPoolsStorage", + Vec::new(), + [ + 248u8, 37u8, 232u8, 231u8, 14u8, 140u8, 12u8, 27u8, 61u8, 222u8, 185u8, + 128u8, 158u8, 30u8, 57u8, 121u8, 35u8, 11u8, 42u8, 242u8, 56u8, 1u8, + 61u8, 0u8, 67u8, 140u8, 55u8, 62u8, 165u8, 134u8, 136u8, 4u8, + ], + ) + } + + #[doc = "Counter for the related counted storage map"] + pub fn counter_for_sub_pools_storage( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "NominationPools", + "CounterForSubPoolsStorage", + vec![], + [ + 137u8, 162u8, 32u8, 44u8, 163u8, 30u8, 54u8, 158u8, 169u8, 118u8, + 196u8, 101u8, 78u8, 28u8, 184u8, 78u8, 185u8, 225u8, 226u8, 207u8, + 14u8, 119u8, 0u8, 116u8, 140u8, 141u8, 116u8, 106u8, 71u8, 161u8, + 200u8, 228u8, + ], + ) + } + + #[doc = " Metadata for the pool."] + pub fn metadata( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::sp_core::bounded::bounded_vec::BoundedVec<::core::primitive::u8>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "NominationPools", + "Metadata", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], + [ + 10u8, 171u8, 251u8, 5u8, 72u8, 74u8, 86u8, 144u8, 59u8, 67u8, 92u8, + 111u8, 217u8, 111u8, 175u8, 107u8, 119u8, 206u8, 199u8, 78u8, 182u8, + 84u8, 12u8, 102u8, 10u8, 124u8, 103u8, 9u8, 86u8, 199u8, 233u8, 54u8, + ], + ) + } + + #[doc = " Metadata for the pool."] + pub fn metadata_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::sp_core::bounded::bounded_vec::BoundedVec<::core::primitive::u8>, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "NominationPools", + "Metadata", + Vec::new(), + [ + 10u8, 171u8, 251u8, 5u8, 72u8, 74u8, 86u8, 144u8, 59u8, 67u8, 92u8, + 111u8, 217u8, 111u8, 175u8, 107u8, 119u8, 206u8, 199u8, 78u8, 182u8, + 84u8, 12u8, 102u8, 10u8, 124u8, 103u8, 9u8, 86u8, 199u8, 233u8, 54u8, + ], + ) + } + + #[doc = "Counter for the related counted storage map"] + pub fn counter_for_metadata( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "NominationPools", + "CounterForMetadata", + vec![], + [ + 49u8, 76u8, 175u8, 236u8, 99u8, 120u8, 156u8, 116u8, 153u8, 173u8, + 10u8, 102u8, 194u8, 139u8, 25u8, 149u8, 109u8, 195u8, 150u8, 21u8, + 43u8, 24u8, 196u8, 180u8, 231u8, 101u8, 69u8, 98u8, 82u8, 159u8, 183u8, + 174u8, + ], + ) + } + + #[doc = " Ever increasing number of all pools created so far."] + pub fn last_pool_id( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "NominationPools", + "LastPoolId", + vec![], + [ + 178u8, 198u8, 245u8, 157u8, 176u8, 45u8, 214u8, 86u8, 73u8, 154u8, + 217u8, 39u8, 191u8, 53u8, 233u8, 145u8, 57u8, 100u8, 31u8, 13u8, 202u8, + 122u8, 115u8, 16u8, 205u8, 69u8, 157u8, 250u8, 216u8, 180u8, 113u8, + 30u8, + ], + ) + } + + #[doc = " A reverse lookup from the pool's account id to its id."] + #[doc = ""] + #[doc = " This is only used for slashing. In all other instances, the pool id is used, and the"] + #[doc = " accounts are deterministically derived from it."] + pub fn reverse_pool_id_lookup( + &self, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "NominationPools", + "ReversePoolIdLookup", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], + [ + 76u8, 76u8, 150u8, 33u8, 64u8, 81u8, 90u8, 75u8, 212u8, 221u8, 59u8, + 83u8, 178u8, 45u8, 86u8, 206u8, 196u8, 221u8, 117u8, 94u8, 229u8, + 160u8, 52u8, 54u8, 11u8, 64u8, 0u8, 103u8, 85u8, 86u8, 5u8, 71u8, + ], + ) + } + + #[doc = " A reverse lookup from the pool's account id to its id."] + #[doc = ""] + #[doc = " This is only used for slashing. In all other instances, the pool id is used, and the"] + #[doc = " accounts are deterministically derived from it."] + pub fn reverse_pool_id_lookup_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "NominationPools", + "ReversePoolIdLookup", + Vec::new(), + [ + 76u8, 76u8, 150u8, 33u8, 64u8, 81u8, 90u8, 75u8, 212u8, 221u8, 59u8, + 83u8, 178u8, 45u8, 86u8, 206u8, 196u8, 221u8, 117u8, 94u8, 229u8, + 160u8, 52u8, 54u8, 11u8, 64u8, 0u8, 103u8, 85u8, 86u8, 5u8, 71u8, + ], + ) + } + + #[doc = "Counter for the related counted storage map"] + pub fn counter_for_reverse_pool_id_lookup( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "NominationPools", + "CounterForReversePoolIdLookup", + vec![], + [ + 135u8, 72u8, 203u8, 197u8, 101u8, 135u8, 114u8, 202u8, 122u8, 231u8, + 128u8, 17u8, 81u8, 70u8, 22u8, 146u8, 100u8, 138u8, 16u8, 74u8, 31u8, + 250u8, 110u8, 184u8, 250u8, 75u8, 249u8, 71u8, 171u8, 77u8, 95u8, + 251u8, + ], + ) + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The nomination pool's pallet id."] + pub fn pallet_id( + &self, + ) -> ::subxt::constants::Address { + ::subxt::constants::Address::new_static("NominationPools", "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 = " The maximum pool points-to-balance ratio that an `open` pool can have."] + #[doc = ""] + #[doc = " This is important in the event slashing takes place and the pool's points-to-balance"] + #[doc = " ratio becomes disproportional."] + #[doc = ""] + #[doc = " Moreover, this relates to the `RewardCounter` type as well, as the arithmetic operations"] + #[doc = " are a function of number of points, and by setting this value to e.g. 10, you ensure"] + #[doc = " that the total number of points in the system are at most 10 times the total_issuance of"] + #[doc = " the chain, in the absolute worse case."] + #[doc = ""] + #[doc = " For a value of 10, the threshold would be a pool points-to-balance ratio of 10:1."] + #[doc = " Such a scenario would also be the equivalent of the pool being 90% slashed."] + pub fn max_points_to_balance( + &self, + ) -> ::subxt::constants::Address<::core::primitive::u8> { + ::subxt::constants::Address::new_static( + "NominationPools", + "MaxPointsToBalance", + [ + 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 runtime_types { + use super::runtime_types; + pub mod avail_core { + use super::runtime_types; + pub mod asdr { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct AppUncheckedExtrinsic<_0, _1, _2, _3>( + pub ::std::vec::Vec<::core::primitive::u8>, + #[codec(skip)] pub ::core::marker::PhantomData<(_1, _0, _2, _3)>, + ); + } + pub mod data_lookup { + use super::runtime_types; + pub mod compact { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Default, + Eq, + PartialEq, + serde :: Deserialize, + serde :: Serialize, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct CompactDataLookup { + #[codec(compact)] + pub size: ::core::primitive::u32, + pub index: ::std::vec::Vec< + runtime_types::avail_core::data_lookup::compact::DataLookupItem, + >, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + serde :: Deserialize, + serde :: Serialize, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct DataLookupItem { + pub app_id: runtime_types::avail_core::AppId, + #[codec(compact)] + pub start: ::core::primitive::u32, + } + } + } + pub mod header { + use super::runtime_types; + pub mod extension { + use super::runtime_types; + pub mod v1 { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Default, + Eq, + PartialEq, + serde :: Deserialize, + serde :: Serialize, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct HeaderExtension { + pub commitment: + runtime_types::avail_core::kate_commitment::v1::KateCommitment, + pub app_lookup: + runtime_types::avail_core::data_lookup::compact::CompactDataLookup, + } + } + pub mod v2 { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Default, + Eq, + PartialEq, + serde :: Deserialize, + serde :: Serialize, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct HeaderExtension { + pub commitment: + runtime_types::avail_core::kate_commitment::v2::KateCommitment, + pub app_lookup: + runtime_types::avail_core::data_lookup::compact::CompactDataLookup, + } + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + serde :: Deserialize, + serde :: Serialize, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum HeaderExtension { + #[codec(index = 0)] + V1(runtime_types::avail_core::header::extension::v1::HeaderExtension), + #[codec(index = 1)] + V2(runtime_types::avail_core::header::extension::v2::HeaderExtension), + } + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Header<_0, _1> { + pub parent_hash: ::subxt::utils::H256, + #[codec(compact)] + pub number: _0, + pub state_root: ::subxt::utils::H256, + pub extrinsics_root: ::subxt::utils::H256, + pub digest: runtime_types::sp_runtime::generic::digest::Digest, + pub extension: runtime_types::avail_core::header::extension::HeaderExtension, + #[codec(skip)] + pub __subxt_unused_type_params: ::core::marker::PhantomData<_1>, + } + } + pub mod kate_commitment { + use super::runtime_types; + pub mod v1 { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Default, + Eq, + PartialEq, + serde :: Deserialize, + serde :: Serialize, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[serde(rename_all = "camelCase")] + pub struct KateCommitment { + #[codec(compact)] + pub rows: ::core::primitive::u16, + #[codec(compact)] + pub cols: ::core::primitive::u16, + pub data_root: ::subxt::utils::H256, + pub commitment: ::std::vec::Vec<::core::primitive::u8>, + } + } + pub mod v2 { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Default, + Eq, + PartialEq, + serde :: Deserialize, + serde :: Serialize, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct KateCommitment { + #[codec(compact)] + pub rows: ::core::primitive::u16, + #[codec(compact)] + pub cols: ::core::primitive::u16, + pub data_root: ::core::option::Option<::subxt::utils::H256>, + pub commitment: ::std::vec::Vec<::core::primitive::u8>, + } + } + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Copy, + Debug, + Default, + Eq, + PartialEq, + derive_more :: From, + serde :: Deserialize, + serde :: Serialize, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct AppId(#[codec(compact)] pub ::core::primitive::u32); + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct BlockLengthColumns(#[codec(compact)] pub ::core::primitive::u32); + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct BlockLengthRows(#[codec(compact)] pub ::core::primitive::u32); + } + pub mod da_control { + use super::runtime_types; + pub mod extensions { + use super::runtime_types; + pub mod check_app_id { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct CheckAppId(pub runtime_types::avail_core::AppId); + } + } + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct AppKeyInfo<_0> { + pub owner: _0, + pub id: runtime_types::avail_core::AppId, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Creates an application key if `key` does not exist yet."] + create_application_key { + key: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + }, + #[codec(index = 1)] + submit_data { + data: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + }, + #[codec(index = 2)] + submit_block_length_proposal { + rows: ::core::primitive::u32, + cols: ::core::primitive::u32, + }, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Error for the System pallet"] + pub enum Error { + #[codec(index = 0)] + #[doc = "The application key already exists."] + AppKeyAlreadyExists, + #[codec(index = 1)] + #[doc = "The application key is an empty string."] + AppKeyCannotBeEmpty, + #[codec(index = 2)] + #[doc = "The last application ID overflowed."] + LastAppIdOverflowed, + #[codec(index = 3)] + #[doc = "The submitted data is empty."] + DataCannotBeEmpty, + #[codec(index = 4)] + #[doc = "The last block length proposal Id overflowed."] + LastBlockLenProposalIdOverflowed, + #[codec(index = 5)] + #[doc = "The proposed block dimensions are out of bounds."] + BlockDimensionsOutOfBounds, + #[codec(index = 6)] + #[doc = "The proposed block dimensions are too small."] + BlockDimensionsTooSmall, + #[codec(index = 7)] + #[doc = "The request to reduce block dimensions was made in a non-empty block"] + InvalidBlockWeightReduction, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Event for the pallet."] + pub enum Event { + #[codec(index = 0)] + #[doc = "A new application key was created."] + ApplicationKeyCreated { + key: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + owner: ::subxt::utils::AccountId32, + id: runtime_types::avail_core::AppId, + }, + #[codec(index = 1)] + DataSubmitted { + who: ::subxt::utils::AccountId32, + data: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + }, + #[codec(index = 2)] + BlockLengthProposalSubmitted { + rows: runtime_types::avail_core::BlockLengthRows, + cols: runtime_types::avail_core::BlockLengthColumns, + }, + } + } + } + pub mod da_runtime { + use super::runtime_types; + pub mod constants { + use super::runtime_types; + pub mod staking { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct NposSolution16 { + pub votes1: ::std::vec::Vec<( + ::subxt::ext::codec::Compact<::core::primitive::u32>, + ::subxt::ext::codec::Compact<::core::primitive::u16>, + )>, + pub votes2: ::std::vec::Vec<( + ::subxt::ext::codec::Compact<::core::primitive::u32>, + ( + ::subxt::ext::codec::Compact<::core::primitive::u16>, + ::subxt::ext::codec::Compact< + runtime_types::sp_arithmetic::per_things::PerU16, + >, + ), + ::subxt::ext::codec::Compact<::core::primitive::u16>, + )>, + pub votes3: ::std::vec::Vec<( + ::subxt::ext::codec::Compact<::core::primitive::u32>, + [( + ::subxt::ext::codec::Compact<::core::primitive::u16>, + ::subxt::ext::codec::Compact< + runtime_types::sp_arithmetic::per_things::PerU16, + >, + ); 2usize], + ::subxt::ext::codec::Compact<::core::primitive::u16>, + )>, + pub votes4: ::std::vec::Vec<( + ::subxt::ext::codec::Compact<::core::primitive::u32>, + [( + ::subxt::ext::codec::Compact<::core::primitive::u16>, + ::subxt::ext::codec::Compact< + runtime_types::sp_arithmetic::per_things::PerU16, + >, + ); 3usize], + ::subxt::ext::codec::Compact<::core::primitive::u16>, + )>, + pub votes5: ::std::vec::Vec<( + ::subxt::ext::codec::Compact<::core::primitive::u32>, + [( + ::subxt::ext::codec::Compact<::core::primitive::u16>, + ::subxt::ext::codec::Compact< + runtime_types::sp_arithmetic::per_things::PerU16, + >, + ); 4usize], + ::subxt::ext::codec::Compact<::core::primitive::u16>, + )>, + pub votes6: ::std::vec::Vec<( + ::subxt::ext::codec::Compact<::core::primitive::u32>, + [( + ::subxt::ext::codec::Compact<::core::primitive::u16>, + ::subxt::ext::codec::Compact< + runtime_types::sp_arithmetic::per_things::PerU16, + >, + ); 5usize], + ::subxt::ext::codec::Compact<::core::primitive::u16>, + )>, + pub votes7: ::std::vec::Vec<( + ::subxt::ext::codec::Compact<::core::primitive::u32>, + [( + ::subxt::ext::codec::Compact<::core::primitive::u16>, + ::subxt::ext::codec::Compact< + runtime_types::sp_arithmetic::per_things::PerU16, + >, + ); 6usize], + ::subxt::ext::codec::Compact<::core::primitive::u16>, + )>, + pub votes8: ::std::vec::Vec<( + ::subxt::ext::codec::Compact<::core::primitive::u32>, + [( + ::subxt::ext::codec::Compact<::core::primitive::u16>, + ::subxt::ext::codec::Compact< + runtime_types::sp_arithmetic::per_things::PerU16, + >, + ); 7usize], + ::subxt::ext::codec::Compact<::core::primitive::u16>, + )>, + pub votes9: ::std::vec::Vec<( + ::subxt::ext::codec::Compact<::core::primitive::u32>, + [( + ::subxt::ext::codec::Compact<::core::primitive::u16>, + ::subxt::ext::codec::Compact< + runtime_types::sp_arithmetic::per_things::PerU16, + >, + ); 8usize], + ::subxt::ext::codec::Compact<::core::primitive::u16>, + )>, + pub votes10: ::std::vec::Vec<( + ::subxt::ext::codec::Compact<::core::primitive::u32>, + [( + ::subxt::ext::codec::Compact<::core::primitive::u16>, + ::subxt::ext::codec::Compact< + runtime_types::sp_arithmetic::per_things::PerU16, + >, + ); 9usize], + ::subxt::ext::codec::Compact<::core::primitive::u16>, + )>, + pub votes11: ::std::vec::Vec<( + ::subxt::ext::codec::Compact<::core::primitive::u32>, + [( + ::subxt::ext::codec::Compact<::core::primitive::u16>, + ::subxt::ext::codec::Compact< + runtime_types::sp_arithmetic::per_things::PerU16, + >, + ); 10usize], + ::subxt::ext::codec::Compact<::core::primitive::u16>, + )>, + pub votes12: ::std::vec::Vec<( + ::subxt::ext::codec::Compact<::core::primitive::u32>, + [( + ::subxt::ext::codec::Compact<::core::primitive::u16>, + ::subxt::ext::codec::Compact< + runtime_types::sp_arithmetic::per_things::PerU16, + >, + ); 11usize], + ::subxt::ext::codec::Compact<::core::primitive::u16>, + )>, + pub votes13: ::std::vec::Vec<( + ::subxt::ext::codec::Compact<::core::primitive::u32>, + [( + ::subxt::ext::codec::Compact<::core::primitive::u16>, + ::subxt::ext::codec::Compact< + runtime_types::sp_arithmetic::per_things::PerU16, + >, + ); 12usize], + ::subxt::ext::codec::Compact<::core::primitive::u16>, + )>, + pub votes14: ::std::vec::Vec<( + ::subxt::ext::codec::Compact<::core::primitive::u32>, + [( + ::subxt::ext::codec::Compact<::core::primitive::u16>, + ::subxt::ext::codec::Compact< + runtime_types::sp_arithmetic::per_things::PerU16, + >, + ); 13usize], + ::subxt::ext::codec::Compact<::core::primitive::u16>, + )>, + pub votes15: ::std::vec::Vec<( + ::subxt::ext::codec::Compact<::core::primitive::u32>, + [( + ::subxt::ext::codec::Compact<::core::primitive::u16>, + ::subxt::ext::codec::Compact< + runtime_types::sp_arithmetic::per_things::PerU16, + >, + ); 14usize], + ::subxt::ext::codec::Compact<::core::primitive::u16>, + )>, + pub votes16: ::std::vec::Vec<( + ::subxt::ext::codec::Compact<::core::primitive::u32>, + [( + ::subxt::ext::codec::Compact<::core::primitive::u16>, + ::subxt::ext::codec::Compact< + runtime_types::sp_arithmetic::per_things::PerU16, + >, + ); 15usize], + ::subxt::ext::codec::Compact<::core::primitive::u16>, + )>, + } + } + } + pub mod primitives { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SessionKeys { + pub babe: runtime_types::sp_consensus_babe::app::Public, + pub grandpa: runtime_types::sp_finality_grandpa::app::Public, + pub im_online: runtime_types::pallet_im_online::sr25519::app_sr25519::Public, + pub authority_discovery: runtime_types::sp_authority_discovery::app::Public, + } + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum OriginCaller { + #[codec(index = 0)] + system( + runtime_types::frame_support::dispatch::RawOrigin<::subxt::utils::AccountId32>, + ), + #[codec(index = 13)] + Council(runtime_types::pallet_collective::RawOrigin<::subxt::utils::AccountId32>), + #[codec(index = 14)] + TechnicalCommittee( + runtime_types::pallet_collective::RawOrigin<::subxt::utils::AccountId32>, + ), + #[codec(index = 3)] + Void(runtime_types::sp_core::Void), + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Runtime; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum RuntimeCall { + #[codec(index = 0)] + System(runtime_types::frame_system::pallet::Call), + #[codec(index = 1)] + Utility(runtime_types::pallet_utility::pallet::Call), + #[codec(index = 2)] + Babe(runtime_types::pallet_babe::pallet::Call), + #[codec(index = 3)] + Timestamp(runtime_types::pallet_timestamp::pallet::Call), + #[codec(index = 4)] + Authorship(runtime_types::pallet_authorship::pallet::Call), + #[codec(index = 5)] + Indices(runtime_types::pallet_indices::pallet::Call), + #[codec(index = 6)] + Balances(runtime_types::pallet_balances::pallet::Call), + #[codec(index = 9)] + ElectionProviderMultiPhase( + runtime_types::pallet_election_provider_multi_phase::pallet::Call, + ), + #[codec(index = 10)] + Staking(runtime_types::pallet_staking::pallet::pallet::Call), + #[codec(index = 11)] + Session(runtime_types::pallet_session::pallet::Call), + #[codec(index = 12)] + Democracy(runtime_types::pallet_democracy::pallet::Call), + #[codec(index = 13)] + Council(runtime_types::pallet_collective::pallet::Call), + #[codec(index = 14)] + TechnicalCommittee(runtime_types::pallet_collective::pallet::Call2), + #[codec(index = 15)] + Elections(runtime_types::pallet_elections_phragmen::pallet::Call), + #[codec(index = 16)] + TechnicalMembership(runtime_types::pallet_membership::pallet::Call), + #[codec(index = 17)] + Grandpa(runtime_types::pallet_grandpa::pallet::Call), + #[codec(index = 18)] + Treasury(runtime_types::pallet_treasury::pallet::Call), + #[codec(index = 19)] + Sudo(runtime_types::pallet_sudo::pallet::Call), + #[codec(index = 20)] + ImOnline(runtime_types::pallet_im_online::pallet::Call), + #[codec(index = 24)] + Scheduler(runtime_types::pallet_scheduler::pallet::Call), + #[codec(index = 25)] + Bounties(runtime_types::pallet_bounties::pallet::Call), + #[codec(index = 26)] + Tips(runtime_types::pallet_tips::pallet::Call), + #[codec(index = 29)] + DataAvailability(runtime_types::da_control::pallet::Call), + #[codec(index = 30)] + NomadUpdaterManager(runtime_types::nomad_updater_manager::pallet::Call), + #[codec(index = 31)] + NomadHome(runtime_types::nomad_home::pallet::Call), + #[codec(index = 32)] + NomadDABridge(runtime_types::nomad_da_bridge::pallet::Call), + #[codec(index = 33)] + Preimage(runtime_types::pallet_preimage::pallet::Call), + #[codec(index = 34)] + Multisig(runtime_types::pallet_multisig::pallet::Call), + #[codec(index = 35)] + VoterList(runtime_types::pallet_bags_list::pallet::Call), + #[codec(index = 36)] + NominationPools(runtime_types::pallet_nomination_pools::pallet::Call), + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum RuntimeEvent { + #[codec(index = 0)] + System(runtime_types::frame_system::pallet::Event), + #[codec(index = 1)] + Utility(runtime_types::pallet_utility::pallet::Event), + #[codec(index = 5)] + Indices(runtime_types::pallet_indices::pallet::Event), + #[codec(index = 6)] + Balances(runtime_types::pallet_balances::pallet::Event), + #[codec(index = 7)] + TransactionPayment(runtime_types::pallet_transaction_payment::pallet::Event), + #[codec(index = 9)] + ElectionProviderMultiPhase( + runtime_types::pallet_election_provider_multi_phase::pallet::Event, + ), + #[codec(index = 10)] + Staking(runtime_types::pallet_staking::pallet::pallet::Event), + #[codec(index = 11)] + Session(runtime_types::pallet_session::pallet::Event), + #[codec(index = 12)] + Democracy(runtime_types::pallet_democracy::pallet::Event), + #[codec(index = 13)] + Council(runtime_types::pallet_collective::pallet::Event), + #[codec(index = 14)] + TechnicalCommittee(runtime_types::pallet_collective::pallet::Event2), + #[codec(index = 15)] + Elections(runtime_types::pallet_elections_phragmen::pallet::Event), + #[codec(index = 16)] + TechnicalMembership(runtime_types::pallet_membership::pallet::Event), + #[codec(index = 17)] + Grandpa(runtime_types::pallet_grandpa::pallet::Event), + #[codec(index = 18)] + Treasury(runtime_types::pallet_treasury::pallet::Event), + #[codec(index = 19)] + Sudo(runtime_types::pallet_sudo::pallet::Event), + #[codec(index = 20)] + ImOnline(runtime_types::pallet_im_online::pallet::Event), + #[codec(index = 22)] + Offences(runtime_types::pallet_offences::pallet::Event), + #[codec(index = 24)] + Scheduler(runtime_types::pallet_scheduler::pallet::Event), + #[codec(index = 25)] + Bounties(runtime_types::pallet_bounties::pallet::Event), + #[codec(index = 26)] + Tips(runtime_types::pallet_tips::pallet::Event), + #[codec(index = 29)] + DataAvailability(runtime_types::da_control::pallet::Event), + #[codec(index = 30)] + NomadUpdaterManager(runtime_types::nomad_updater_manager::pallet::Event), + #[codec(index = 31)] + NomadHome(runtime_types::nomad_home::pallet::Event), + #[codec(index = 32)] + NomadDABridge(runtime_types::nomad_da_bridge::pallet::Event), + #[codec(index = 33)] + Preimage(runtime_types::pallet_preimage::pallet::Event), + #[codec(index = 34)] + Multisig(runtime_types::pallet_multisig::pallet::Event), + #[codec(index = 35)] + VoterList(runtime_types::pallet_bags_list::pallet::Event), + #[codec(index = 36)] + NominationPools(runtime_types::pallet_nomination_pools::pallet::Event), + } + } + pub mod finality_grandpa { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Equivocation<_0, _1, _2> { + pub round_number: ::core::primitive::u64, + pub identity: _0, + pub first: (_1, _2), + pub second: (_1, _2), + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Precommit<_0, _1> { + pub target_hash: _0, + pub target_number: _1, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Prevote<_0, _1> { + pub target_hash: _0, + pub target_number: _1, + } + } + pub mod frame_support { + use super::runtime_types; + pub mod dispatch { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum DispatchClass { + #[codec(index = 0)] + Normal, + #[codec(index = 1)] + Operational, + #[codec(index = 2)] + Mandatory, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct DispatchInfo { + 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 :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum Pays { + #[codec(index = 0)] + Yes, + #[codec(index = 1)] + No, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct PerDispatchClass<_0> { + pub normal: _0, + pub operational: _0, + pub mandatory: _0, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum RawOrigin<_0> { + #[codec(index = 0)] + Root, + #[codec(index = 1)] + Signed(_0), + #[codec(index = 2)] + None, + } + } + pub mod traits { + use super::runtime_types; + pub mod misc { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct WrapperOpaque<_0>( + #[codec(compact)] pub ::core::primitive::u32, + pub _0, + ); + } + pub mod preimages { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum Bounded<_0> { + #[codec(index = 0)] + Legacy { + hash: ::subxt::utils::H256, + }, + #[codec(index = 1)] + Inline( + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + ), + #[codec(index = 2)] + Lookup { + hash: ::subxt::utils::H256, + len: ::core::primitive::u32, + }, + __Ignore(::core::marker::PhantomData<_0>), + } + } + pub mod tokens { + use super::runtime_types; + pub mod misc { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum BalanceStatus { + #[codec(index = 0)] + Free, + #[codec(index = 1)] + Reserved, + } + } + } + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct PalletId(pub [::core::primitive::u8; 8usize]); + } + 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 :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct CheckGenesis; + } + pub mod check_mortality { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct CheckMortality(pub runtime_types::sp_runtime::generic::era::Era); + } + pub mod check_non_zero_sender { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct CheckNonZeroSender; + } + pub mod check_nonce { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct CheckNonce(#[codec(compact)] pub ::core::primitive::u32); + } + pub mod check_spec_version { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct CheckSpecVersion; + } + pub mod check_tx_version { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct CheckTxVersion; + } + pub mod check_weight { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct CheckWeight; + } + } + pub mod limits { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct BlockLength { + pub max: runtime_types::frame_support::dispatch::PerDispatchClass< + ::core::primitive::u32, + >, + pub cols: runtime_types::avail_core::BlockLengthColumns, + pub rows: runtime_types::avail_core::BlockLengthRows, + #[codec(compact)] + pub chunk_size: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct BlockWeights { + 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 :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct WeightsPerClass { + 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 :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Make some on-chain remark."] + #[doc = ""] + #[doc = "# "] + #[doc = "- `O(1)`"] + #[doc = "# "] + remark { + remark: ::std::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."] + #[doc = ""] + #[doc = "# "] + #[doc = "- `O(C + S)` where `C` length of `code` and `S` complexity of `can_set_code`"] + #[doc = "- 1 call to `can_set_code`: `O(S)` (calls `sp_io::misc::runtime_version` which is"] + #[doc = " expensive)."] + #[doc = "- 1 storage write (codec `O(C)`)."] + #[doc = "- 1 digest item."] + #[doc = "- 1 event."] + #[doc = "The weight of this function is dependent on the runtime, but generally this is very"] + #[doc = "expensive. We will treat this as a full block."] + #[doc = "# "] + set_code { + code: ::std::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 3)] + #[doc = "Set the new runtime code without doing any checks of the given `code`."] + #[doc = ""] + #[doc = "# "] + #[doc = "- `O(C)` where `C` length of `code`"] + #[doc = "- 1 storage write (codec `O(C)`)."] + #[doc = "- 1 digest item."] + #[doc = "- 1 event."] + #[doc = "The weight of this function is dependent on the runtime. We will treat this as a full"] + #[doc = "block. # "] + set_code_without_checks { + code: ::std::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 4)] + #[doc = "Set some items of storage."] + set_storage { + items: ::std::vec::Vec<( + ::std::vec::Vec<::core::primitive::u8>, + ::std::vec::Vec<::core::primitive::u8>, + )>, + }, + #[codec(index = 5)] + #[doc = "Kill some items from storage."] + kill_storage { + keys: ::std::vec::Vec<::std::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: ::std::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: ::std::vec::Vec<::core::primitive::u8>, + }, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Error for the System pallet"] + 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, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Event for the System pallet."] + pub enum Event { + #[codec(index = 0)] + #[doc = "An extrinsic completed successfully."] + ExtrinsicSuccess { + dispatch_info: runtime_types::frame_support::dispatch::DispatchInfo, + }, + #[codec(index = 1)] + #[doc = "An extrinsic failed."] + ExtrinsicFailed { + dispatch_error: runtime_types::sp_runtime::DispatchError, + dispatch_info: runtime_types::frame_support::dispatch::DispatchInfo, + }, + #[codec(index = 2)] + #[doc = "`:code` was updated."] + CodeUpdated, + #[codec(index = 3)] + #[doc = "A new account was created."] + NewAccount { + account: ::subxt::utils::AccountId32, + }, + #[codec(index = 4)] + #[doc = "An account was reaped."] + KilledAccount { + account: ::subxt::utils::AccountId32, + }, + #[codec(index = 5)] + #[doc = "On on-chain remark happened."] + Remarked { + sender: ::subxt::utils::AccountId32, + hash: ::subxt::utils::H256, + }, + #[codec(index = 6)] + #[doc = "On on-chain remark happend called by Root."] + RemarkedByRoot { hash: ::subxt::utils::H256 }, + } + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct AccountInfo<_0, _1> { + pub nonce: _0, + pub consumers: _0, + pub providers: _0, + pub sufficients: _0, + pub data: _1, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct EventRecord<_0, _1> { + pub phase: runtime_types::frame_system::Phase, + pub event: _0, + pub topics: ::std::vec::Vec<_1>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ExtrinsicLen { + pub raw: ::core::primitive::u32, + pub padded: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct LastRuntimeUpgradeInfo { + #[codec(compact)] + pub spec_version: ::core::primitive::u32, + pub spec_name: ::std::string::String, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum Phase { + #[codec(index = 0)] + ApplyExtrinsic(::core::primitive::u32), + #[codec(index = 1)] + Finalization, + #[codec(index = 2)] + Initialization, + } + } + pub mod nomad_base { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct NomadBase { + pub state: runtime_types::nomad_core::state::NomadState, + pub local_domain: ::core::primitive::u32, + pub committed_root: ::subxt::utils::H256, + pub updater: ::subxt::utils::H160, + } + } + pub mod nomad_core { + use super::runtime_types; + pub mod state { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum NomadState { + #[codec(index = 0)] + Active, + #[codec(index = 1)] + Failed, + } + } + pub mod update { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SignedUpdate { + pub update: runtime_types::nomad_core::update::Update, + pub signature: runtime_types::nomad_signature::signature::Signature, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Update { + pub home_domain: ::core::primitive::u32, + pub previous_root: ::subxt::utils::H256, + pub new_root: ::subxt::utils::H256, + } + } + } + pub mod nomad_da_bridge { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Dispatch a data root message to the home if the header is valid."] + try_dispatch_data_root { + #[codec(compact)] + destination_domain: ::core::primitive::u32, + recipient_address: ::subxt::utils::H256, + header: ::std::boxed::Box< + runtime_types::avail_core::header::Header< + ::core::primitive::u32, + runtime_types::sp_runtime::traits::BlakeTwo256, + >, + >, + }, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + InitializationError, + #[codec(index = 1)] + HashOfBlockNotMatchBlockNumber, + #[codec(index = 2)] + DABridgeMessageExceedsMaxMessageSize, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub enum Event { + #[codec(index = 0)] + DataRootDispatched { + destination_domain: ::core::primitive::u32, + recipient_address: ::subxt::utils::H256, + block_number: ::core::primitive::u32, + data_root: ::subxt::utils::H256, + }, + } + } + } + pub mod nomad_home { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Dispatch a message to the destination domain and recipient address."] + dispatch { + #[codec(compact)] + destination_domain: ::core::primitive::u32, + recipient_address: ::subxt::utils::H256, + message_body: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + }, + #[codec(index = 1)] + #[doc = "Verify/submit signed update."] + update { + signed_update: runtime_types::nomad_core::update::SignedUpdate, + #[codec(compact)] + max_index: ::core::primitive::u32, + }, + #[codec(index = 2)] + #[doc = "Verify/slash updater for improper update."] + improper_update { + signed_update: runtime_types::nomad_core::update::SignedUpdate, + }, + #[codec(index = 3)] + #[doc = "Set new updater on self as well as updater manager."] + #[doc = "Note: Not exposed as pallet call, will only be callable by the"] + #[doc = "GovernanceRouter pallet when implemented."] + set_updater { new_updater: ::subxt::utils::H160 }, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + InitializationError, + #[codec(index = 1)] + IngestionError, + #[codec(index = 2)] + SignatureRecoveryError, + #[codec(index = 3)] + MessageTooLarge, + #[codec(index = 4)] + InvalidUpdaterSignature, + #[codec(index = 5)] + CommittedRootNotMatchUpdatePrevious, + #[codec(index = 6)] + RootForIndexNotFound, + #[codec(index = 7)] + IndexForRootNotFound, + #[codec(index = 8)] + FailedState, + #[codec(index = 9)] + MaxIndexWitnessExhausted, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub enum Event { + #[codec(index = 0)] + Dispatch { + message_hash: ::subxt::utils::H256, + leaf_index: ::core::primitive::u32, + destination_and_nonce: ::core::primitive::u64, + committed_root: ::subxt::utils::H256, + message: ::std::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 1)] + Update { + home_domain: ::core::primitive::u32, + previous_root: ::subxt::utils::H256, + new_root: ::subxt::utils::H256, + signature: ::std::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 2)] + ImproperUpdate { + previous_root: ::subxt::utils::H256, + new_root: ::subxt::utils::H256, + signature: ::std::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 3)] + UpdaterSlashed { + updater: ::subxt::utils::H160, + reporter: ::subxt::utils::AccountId32, + }, + } + } + } + pub mod nomad_merkle { + use super::runtime_types; + pub mod light { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct LightMerkle { + pub branch: [::subxt::utils::H256; 32usize], + pub count: ::core::primitive::u32, + } + } + } + pub mod nomad_signature { + use super::runtime_types; + pub mod signature { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Signature { + pub r: runtime_types::primitive_types::U256, + pub s: runtime_types::primitive_types::U256, + pub v: ::core::primitive::u64, + } + } + } + pub mod nomad_updater_manager { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call {} + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + InitializationError, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub enum Event { + #[codec(index = 0)] + NewUpdater { + old_updater: ::subxt::utils::H160, + new_updater: ::subxt::utils::H160, + }, + #[codec(index = 1)] + FakeSlashed { + reporter: ::subxt::utils::AccountId32, + }, + } + } + } + pub mod pallet_authorship { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Provide a set of uncles."] + set_uncles { + new_uncles: ::std::vec::Vec< + runtime_types::avail_core::header::Header< + ::core::primitive::u32, + runtime_types::sp_runtime::traits::BlakeTwo256, + >, + >, + }, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "The uncle parent not in the chain."] + InvalidUncleParent, + #[codec(index = 1)] + #[doc = "Uncles already set in the block."] + UnclesAlreadySet, + #[codec(index = 2)] + #[doc = "Too many uncles."] + TooManyUncles, + #[codec(index = 3)] + #[doc = "The uncle is genesis."] + GenesisUncle, + #[codec(index = 4)] + #[doc = "The uncle is too high in chain."] + TooHighUncle, + #[codec(index = 5)] + #[doc = "The uncle is already included."] + UncleAlreadyIncluded, + #[codec(index = 6)] + #[doc = "The uncle isn't recent enough to be included."] + OldUncle, + } + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum UncleEntryItem<_0, _1, _2> { + #[codec(index = 0)] + InclusionHeight(_0), + #[codec(index = 1)] + Uncle(_1, ::core::option::Option<_2>), + } + } + pub mod pallet_babe { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Report authority equivocation/misbehavior. This method will verify"] + #[doc = "the equivocation proof and validate the given key ownership proof"] + #[doc = "against the extracted offender. If both are valid, the offence will"] + #[doc = "be reported."] + report_equivocation { + equivocation_proof: ::std::boxed::Box< + runtime_types::sp_consensus_slots::EquivocationProof< + runtime_types::avail_core::header::Header< + ::core::primitive::u32, + runtime_types::sp_runtime::traits::BlakeTwo256, + >, + runtime_types::sp_consensus_babe::app::Public, + >, + >, + key_owner_proof: runtime_types::sp_session::MembershipProof, + }, + #[codec(index = 1)] + #[doc = "Report authority equivocation/misbehavior. This method will verify"] + #[doc = "the equivocation proof and validate the given key ownership proof"] + #[doc = "against the extracted offender. If both are valid, the offence will"] + #[doc = "be reported."] + #[doc = "This extrinsic must be called unsigned and it is expected that only"] + #[doc = "block authors will call it (validated in `ValidateUnsigned`), as such"] + #[doc = "if the block author is defined it will be defined as the equivocation"] + #[doc = "reporter."] + report_equivocation_unsigned { + equivocation_proof: ::std::boxed::Box< + runtime_types::sp_consensus_slots::EquivocationProof< + runtime_types::avail_core::header::Header< + ::core::primitive::u32, + runtime_types::sp_runtime::traits::BlakeTwo256, + >, + runtime_types::sp_consensus_babe::app::Public, + >, + >, + key_owner_proof: runtime_types::sp_session::MembershipProof, + }, + #[codec(index = 2)] + #[doc = "Plan an epoch config change. The epoch config change is recorded and will be enacted on"] + #[doc = "the next call to `enact_epoch_change`. The config will be activated one epoch after."] + #[doc = "Multiple calls to this method will replace any existing planned config change that had"] + #[doc = "not been enacted yet."] + plan_config_change { + config: runtime_types::sp_consensus_babe::digests::NextConfigDescriptor, + }, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "An equivocation proof provided as part of an equivocation report is invalid."] + InvalidEquivocationProof, + #[codec(index = 1)] + #[doc = "A key ownership proof provided as part of an equivocation report is invalid."] + InvalidKeyOwnershipProof, + #[codec(index = 2)] + #[doc = "A given equivocation report is valid but already previously reported."] + DuplicateOffenceReport, + #[codec(index = 3)] + #[doc = "Submitted configuration is invalid."] + InvalidConfiguration, + } + } + } + pub mod pallet_bags_list { + use super::runtime_types; + pub mod list { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Bag { + pub head: ::core::option::Option<::subxt::utils::AccountId32>, + pub tail: ::core::option::Option<::subxt::utils::AccountId32>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum ListError { + #[codec(index = 0)] + Duplicate, + #[codec(index = 1)] + NotHeavier, + #[codec(index = 2)] + NotInSameBag, + #[codec(index = 3)] + NodeNotFound, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Node { + pub id: ::subxt::utils::AccountId32, + pub prev: ::core::option::Option<::subxt::utils::AccountId32>, + pub next: ::core::option::Option<::subxt::utils::AccountId32>, + pub bag_upper: ::core::primitive::u64, + pub score: ::core::primitive::u64, + } + } + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Declare that some `dislocated` account has, through rewards or penalties, sufficiently"] + #[doc = "changed its score that it should properly fall into a different bag than its current"] + #[doc = "one."] + #[doc = ""] + #[doc = "Anyone can call this function about any potentially dislocated account."] + #[doc = ""] + #[doc = "Will always update the stored score of `dislocated` to the correct score, based on"] + #[doc = "`ScoreProvider`."] + #[doc = ""] + #[doc = "If `dislocated` does not exists, it returns an error."] + rebag { + dislocated: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + }, + #[codec(index = 1)] + #[doc = "Move the caller's Id directly in front of `lighter`."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and can only be called by the Id of"] + #[doc = "the account going in front of `lighter`."] + #[doc = ""] + #[doc = "Only works if"] + #[doc = "- both nodes are within the same bag,"] + #[doc = "- and `origin` has a greater `Score` than `lighter`."] + put_in_front_of { + lighter: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + }, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "A error in the list interface implementation."] + List(runtime_types::pallet_bags_list::list::ListError), + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub enum Event { + #[codec(index = 0)] + #[doc = "Moved an account from one bag to another."] + Rebagged { + who: ::subxt::utils::AccountId32, + from: ::core::primitive::u64, + to: ::core::primitive::u64, + }, + #[codec(index = 1)] + #[doc = "Updated the score of some account to the given amount."] + ScoreUpdated { + who: ::subxt::utils::AccountId32, + new_score: ::core::primitive::u64, + }, + } + } + } + pub mod pallet_balances { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Transfer some liquid free balance to another account."] + #[doc = ""] + #[doc = "`transfer` will set the `FreeBalance` of the sender and receiver."] + #[doc = "If the sender's account is below the existential deposit as a result"] + #[doc = "of the transfer, the account will be reaped."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be `Signed` by the transactor."] + #[doc = ""] + #[doc = "# "] + #[doc = "- Dependent on arguments but not critical, given proper implementations for input config"] + #[doc = " types. See related functions below."] + #[doc = "- It contains a limited number of reads and writes internally and no complex"] + #[doc = " computation."] + #[doc = ""] + #[doc = "Related functions:"] + #[doc = ""] + #[doc = " - `ensure_can_withdraw` is always called internally but has a bounded complexity."] + #[doc = " - Transferring balances to accounts that did not exist before will cause"] + #[doc = " `T::OnNewAccount::on_new_account` to be called."] + #[doc = " - Removing enough funds from an account will trigger `T::DustRemoval::on_unbalanced`."] + #[doc = " - `transfer_keep_alive` works the same way as `transfer`, but has an additional check"] + #[doc = " that the transfer will not kill the origin account."] + #[doc = "---------------------------------"] + #[doc = "- Origin account is already in memory, so no DB operations for them."] + #[doc = "# "] + transfer { + dest: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + #[codec(compact)] + value: ::core::primitive::u128, + }, + #[codec(index = 1)] + #[doc = "Set the balances of a given account."] + #[doc = ""] + #[doc = "This will alter `FreeBalance` and `ReservedBalance` in storage. it will"] + #[doc = "also alter the total issuance of the system (`TotalIssuance`) appropriately."] + #[doc = "If the new free or reserved balance is below the existential deposit,"] + #[doc = "it will reset the account nonce (`frame_system::AccountNonce`)."] + #[doc = ""] + #[doc = "The dispatch origin for this call is `root`."] + set_balance { + who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + #[codec(compact)] + new_free: ::core::primitive::u128, + #[codec(compact)] + new_reserved: ::core::primitive::u128, + }, + #[codec(index = 2)] + #[doc = "Exactly as `transfer`, except the origin must be root and the source account may be"] + #[doc = "specified."] + #[doc = "# "] + #[doc = "- Same as transfer, but additional read and write because the source account is not"] + #[doc = " assumed to be in the overlay."] + #[doc = "# "] + force_transfer { + source: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + dest: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + #[codec(compact)] + value: ::core::primitive::u128, + }, + #[codec(index = 3)] + #[doc = "Same as the [`transfer`] call, but with a check that the transfer will not kill the"] + #[doc = "origin account."] + #[doc = ""] + #[doc = "99% of the time you want [`transfer`] instead."] + #[doc = ""] + #[doc = "[`transfer`]: struct.Pallet.html#method.transfer"] + transfer_keep_alive { + dest: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + #[codec(compact)] + value: ::core::primitive::u128, + }, + #[codec(index = 4)] + #[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). # "] + #[doc = "- O(1). Just like transfer, but reading the user's transferable balance first."] + #[doc = " #"] + transfer_all { + dest: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + keep_alive: ::core::primitive::bool, + }, + #[codec(index = 5)] + #[doc = "Unreserve some balance from a user by force."] + #[doc = ""] + #[doc = "Can only be called by ROOT."] + force_unreserve { + who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + amount: ::core::primitive::u128, + }, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "Vesting balance too high to send value"] + VestingBalance, + #[codec(index = 1)] + #[doc = "Account liquidity restrictions prevent withdrawal"] + LiquidityRestrictions, + #[codec(index = 2)] + #[doc = "Balance too low to send value."] + InsufficientBalance, + #[codec(index = 3)] + #[doc = "Value too low to create account due to existential deposit"] + ExistentialDeposit, + #[codec(index = 4)] + #[doc = "Transfer/payment would kill account"] + KeepAlive, + #[codec(index = 5)] + #[doc = "A vesting schedule already exists for this account"] + ExistingVestingSchedule, + #[codec(index = 6)] + #[doc = "Beneficiary account must pre-exist"] + DeadAccount, + #[codec(index = 7)] + #[doc = "Number of named reserves exceed MaxReserves"] + TooManyReserves, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub enum Event { + #[codec(index = 0)] + #[doc = "An account was created with some free balance."] + Endowed { + account: ::subxt::utils::AccountId32, + free_balance: ::core::primitive::u128, + }, + #[codec(index = 1)] + #[doc = "An account was removed whose balance was non-zero but below ExistentialDeposit,"] + #[doc = "resulting in an outright loss."] + DustLost { + account: ::subxt::utils::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 2)] + #[doc = "Transfer succeeded."] + Transfer { + from: ::subxt::utils::AccountId32, + to: ::subxt::utils::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 3)] + #[doc = "A balance was set by root."] + BalanceSet { + who: ::subxt::utils::AccountId32, + free: ::core::primitive::u128, + reserved: ::core::primitive::u128, + }, + #[codec(index = 4)] + #[doc = "Some balance was reserved (moved from free to reserved)."] + Reserved { + who: ::subxt::utils::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 5)] + #[doc = "Some balance was unreserved (moved from reserved to free)."] + Unreserved { + who: ::subxt::utils::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 6)] + #[doc = "Some balance was moved from the reserve of the first account to the second account."] + #[doc = "Final argument indicates the destination balance type."] + ReserveRepatriated { + from: ::subxt::utils::AccountId32, + to: ::subxt::utils::AccountId32, + amount: ::core::primitive::u128, + destination_status: + runtime_types::frame_support::traits::tokens::misc::BalanceStatus, + }, + #[codec(index = 7)] + #[doc = "Some amount was deposited (e.g. for transaction fees)."] + Deposit { + who: ::subxt::utils::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 8)] + #[doc = "Some amount was withdrawn from the account (e.g. for transaction fees)."] + Withdraw { + who: ::subxt::utils::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 9)] + #[doc = "Some amount was removed from the account (e.g. for misbehavior)."] + Slashed { + who: ::subxt::utils::AccountId32, + amount: ::core::primitive::u128, + }, + } + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct AccountData<_0> { + pub free: _0, + pub reserved: _0, + pub misc_frozen: _0, + pub fee_frozen: _0, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct BalanceLock<_0> { + pub id: [::core::primitive::u8; 8usize], + pub amount: _0, + pub reasons: runtime_types::pallet_balances::Reasons, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum Reasons { + #[codec(index = 0)] + Fee, + #[codec(index = 1)] + Misc, + #[codec(index = 2)] + All, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ReserveData<_0, _1> { + pub id: _0, + pub amount: _1, + } + } + pub mod pallet_bounties { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Propose a new bounty."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "Payment: `TipReportDepositBase` will be reserved from the origin account, as well as"] + #[doc = "`DataDepositPerByte` for each byte in `reason`. It will be unreserved upon approval,"] + #[doc = "or slashed when rejected."] + #[doc = ""] + #[doc = "- `curator`: The curator account whom will manage this bounty."] + #[doc = "- `fee`: The curator fee."] + #[doc = "- `value`: The total payment amount of this bounty, curator fee included."] + #[doc = "- `description`: The description of this bounty."] + propose_bounty { + #[codec(compact)] + value: ::core::primitive::u128, + description: ::std::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 1)] + #[doc = "Approve a bounty proposal. At a later time, the bounty will be funded and become active"] + #[doc = "and the original deposit will be returned."] + #[doc = ""] + #[doc = "May only be called from `T::SpendOrigin`."] + #[doc = ""] + #[doc = "# "] + #[doc = "- O(1)."] + #[doc = "# "] + approve_bounty { + #[codec(compact)] + bounty_id: ::core::primitive::u32, + }, + #[codec(index = 2)] + #[doc = "Assign a curator to a funded bounty."] + #[doc = ""] + #[doc = "May only be called from `T::SpendOrigin`."] + #[doc = ""] + #[doc = "# "] + #[doc = "- O(1)."] + #[doc = "# "] + propose_curator { + #[codec(compact)] + bounty_id: ::core::primitive::u32, + curator: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + #[codec(compact)] + fee: ::core::primitive::u128, + }, + #[codec(index = 3)] + #[doc = "Unassign curator from a bounty."] + #[doc = ""] + #[doc = "This function can only be called by the `RejectOrigin` a signed origin."] + #[doc = ""] + #[doc = "If this function is called by the `RejectOrigin`, we assume that the curator is"] + #[doc = "malicious or inactive. As a result, we will slash the curator when possible."] + #[doc = ""] + #[doc = "If the origin is the curator, we take this as a sign they are unable to do their job and"] + #[doc = "they willingly give up. We could slash them, but for now we allow them to recover their"] + #[doc = "deposit and exit without issue. (We may want to change this if it is abused.)"] + #[doc = ""] + #[doc = "Finally, the origin can be anyone if and only if the curator is \"inactive\". This allows"] + #[doc = "anyone in the community to call out that a curator is not doing their due diligence, and"] + #[doc = "we should pick a new curator. In this case the curator should also be slashed."] + #[doc = ""] + #[doc = "# "] + #[doc = "- O(1)."] + #[doc = "# "] + unassign_curator { + #[codec(compact)] + bounty_id: ::core::primitive::u32, + }, + #[codec(index = 4)] + #[doc = "Accept the curator role for a bounty."] + #[doc = "A deposit will be reserved from curator and refund upon successful payout."] + #[doc = ""] + #[doc = "May only be called from the curator."] + #[doc = ""] + #[doc = "# "] + #[doc = "- O(1)."] + #[doc = "# "] + accept_curator { + #[codec(compact)] + bounty_id: ::core::primitive::u32, + }, + #[codec(index = 5)] + #[doc = "Award bounty to a beneficiary account. The beneficiary will be able to claim the funds"] + #[doc = "after a delay."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be the curator of this bounty."] + #[doc = ""] + #[doc = "- `bounty_id`: Bounty ID to award."] + #[doc = "- `beneficiary`: The beneficiary account whom will receive the payout."] + #[doc = ""] + #[doc = "# "] + #[doc = "- O(1)."] + #[doc = "# "] + award_bounty { + #[codec(compact)] + bounty_id: ::core::primitive::u32, + beneficiary: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + }, + #[codec(index = 6)] + #[doc = "Claim the payout from an awarded bounty after payout delay."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be the beneficiary of this bounty."] + #[doc = ""] + #[doc = "- `bounty_id`: Bounty ID to claim."] + #[doc = ""] + #[doc = "# "] + #[doc = "- O(1)."] + #[doc = "# "] + claim_bounty { + #[codec(compact)] + bounty_id: ::core::primitive::u32, + }, + #[codec(index = 7)] + #[doc = "Cancel a proposed or active bounty. All the funds will be sent to treasury and"] + #[doc = "the curator deposit will be unreserved if possible."] + #[doc = ""] + #[doc = "Only `T::RejectOrigin` is able to cancel a bounty."] + #[doc = ""] + #[doc = "- `bounty_id`: Bounty ID to cancel."] + #[doc = ""] + #[doc = "# "] + #[doc = "- O(1)."] + #[doc = "# "] + close_bounty { + #[codec(compact)] + bounty_id: ::core::primitive::u32, + }, + #[codec(index = 8)] + #[doc = "Extend the expiry time of an active bounty."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be the curator of this bounty."] + #[doc = ""] + #[doc = "- `bounty_id`: Bounty ID to extend."] + #[doc = "- `remark`: additional information."] + #[doc = ""] + #[doc = "# "] + #[doc = "- O(1)."] + #[doc = "# "] + extend_bounty_expiry { + #[codec(compact)] + bounty_id: ::core::primitive::u32, + remark: ::std::vec::Vec<::core::primitive::u8>, + }, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "Proposer's balance is too low."] + InsufficientProposersBalance, + #[codec(index = 1)] + #[doc = "No proposal or bounty at that index."] + InvalidIndex, + #[codec(index = 2)] + #[doc = "The reason given is just too big."] + ReasonTooBig, + #[codec(index = 3)] + #[doc = "The bounty status is unexpected."] + UnexpectedStatus, + #[codec(index = 4)] + #[doc = "Require bounty curator."] + RequireCurator, + #[codec(index = 5)] + #[doc = "Invalid bounty value."] + InvalidValue, + #[codec(index = 6)] + #[doc = "Invalid bounty fee."] + InvalidFee, + #[codec(index = 7)] + #[doc = "A bounty payout is pending."] + #[doc = "To cancel the bounty, you must unassign and slash the curator."] + PendingPayout, + #[codec(index = 8)] + #[doc = "The bounties cannot be claimed/closed because it's still in the countdown period."] + Premature, + #[codec(index = 9)] + #[doc = "The bounty cannot be closed because it has active child bounties."] + HasActiveChildBounty, + #[codec(index = 10)] + #[doc = "Too many approvals are already queued."] + TooManyQueued, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub enum Event { + #[codec(index = 0)] + #[doc = "New bounty proposal."] + BountyProposed { index: ::core::primitive::u32 }, + #[codec(index = 1)] + #[doc = "A bounty proposal was rejected; funds were slashed."] + BountyRejected { + index: ::core::primitive::u32, + bond: ::core::primitive::u128, + }, + #[codec(index = 2)] + #[doc = "A bounty proposal is funded and became active."] + BountyBecameActive { index: ::core::primitive::u32 }, + #[codec(index = 3)] + #[doc = "A bounty is awarded to a beneficiary."] + BountyAwarded { + index: ::core::primitive::u32, + beneficiary: ::subxt::utils::AccountId32, + }, + #[codec(index = 4)] + #[doc = "A bounty is claimed by beneficiary."] + BountyClaimed { + index: ::core::primitive::u32, + payout: ::core::primitive::u128, + beneficiary: ::subxt::utils::AccountId32, + }, + #[codec(index = 5)] + #[doc = "A bounty is cancelled."] + BountyCanceled { index: ::core::primitive::u32 }, + #[codec(index = 6)] + #[doc = "A bounty expiry is extended."] + BountyExtended { index: ::core::primitive::u32 }, + } + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Bounty<_0, _1, _2> { + pub proposer: _0, + pub value: _1, + pub fee: _1, + pub curator_deposit: _1, + pub bond: _1, + pub status: runtime_types::pallet_bounties::BountyStatus<_0, _2>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum BountyStatus<_0, _1> { + #[codec(index = 0)] + Proposed, + #[codec(index = 1)] + Approved, + #[codec(index = 2)] + Funded, + #[codec(index = 3)] + CuratorProposed { curator: _0 }, + #[codec(index = 4)] + Active { curator: _0, update_due: _1 }, + #[codec(index = 5)] + PendingPayout { + curator: _0, + beneficiary: _0, + unlock_at: _1, + }, + } + } + pub mod pallet_collective { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Set the collective's membership."] + #[doc = ""] + #[doc = "- `new_members`: The new member list. Be nice to the chain and provide it sorted."] + #[doc = "- `prime`: The prime member whose vote sets the default."] + #[doc = "- `old_count`: The upper bound for the previous number of members in storage. Used for"] + #[doc = " weight estimation."] + #[doc = ""] + #[doc = "Requires root origin."] + #[doc = ""] + #[doc = "NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but"] + #[doc = " the weight estimations rely on it to estimate dispatchable weight."] + #[doc = ""] + #[doc = "# WARNING:"] + #[doc = ""] + #[doc = "The `pallet-collective` can also be managed by logic outside of the pallet through the"] + #[doc = "implementation of the trait [`ChangeMembers`]."] + #[doc = "Any call to `set_members` must be careful that the member set doesn't get out of sync"] + #[doc = "with other logic managing the member set."] + #[doc = ""] + #[doc = "# "] + #[doc = "## Weight"] + #[doc = "- `O(MP + N)` where:"] + #[doc = " - `M` old-members-count (code- and governance-bounded)"] + #[doc = " - `N` new-members-count (code- and governance-bounded)"] + #[doc = " - `P` proposals-count (code-bounded)"] + #[doc = "- DB:"] + #[doc = " - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the"] + #[doc = " members"] + #[doc = " - 1 storage read (codec `O(P)`) for reading the proposals"] + #[doc = " - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal"] + #[doc = " - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one"] + #[doc = "# "] + set_members { + new_members: ::std::vec::Vec<::subxt::utils::AccountId32>, + prime: ::core::option::Option<::subxt::utils::AccountId32>, + old_count: ::core::primitive::u32, + }, + #[codec(index = 1)] + #[doc = "Dispatch a proposal from a member using the `Member` origin."] + #[doc = ""] + #[doc = "Origin must be a member of the collective."] + #[doc = ""] + #[doc = "# "] + #[doc = "## Weight"] + #[doc = "- `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching"] + #[doc = " `proposal`"] + #[doc = "- DB: 1 read (codec `O(M)`) + DB access of `proposal`"] + #[doc = "- 1 event"] + #[doc = "# "] + execute { + proposal: ::std::boxed::Box, + #[codec(compact)] + length_bound: ::core::primitive::u32, + }, + #[codec(index = 2)] + #[doc = "Add a new proposal to either be voted on or executed directly."] + #[doc = ""] + #[doc = "Requires the sender to be member."] + #[doc = ""] + #[doc = "`threshold` determines whether `proposal` is executed directly (`threshold < 2`)"] + #[doc = "or put up for voting."] + #[doc = ""] + #[doc = "# "] + #[doc = "## Weight"] + #[doc = "- `O(B + M + P1)` or `O(B + M + P2)` where:"] + #[doc = " - `B` is `proposal` size in bytes (length-fee-bounded)"] + #[doc = " - `M` is members-count (code- and governance-bounded)"] + #[doc = " - branching is influenced by `threshold` where:"] + #[doc = " - `P1` is proposal execution complexity (`threshold < 2`)"] + #[doc = " - `P2` is proposals-count (code-bounded) (`threshold >= 2`)"] + #[doc = "- DB:"] + #[doc = " - 1 storage read `is_member` (codec `O(M)`)"] + #[doc = " - 1 storage read `ProposalOf::contains_key` (codec `O(1)`)"] + #[doc = " - DB accesses influenced by `threshold`:"] + #[doc = " - EITHER storage accesses done by `proposal` (`threshold < 2`)"] + #[doc = " - OR proposal insertion (`threshold <= 2`)"] + #[doc = " - 1 storage mutation `Proposals` (codec `O(P2)`)"] + #[doc = " - 1 storage mutation `ProposalCount` (codec `O(1)`)"] + #[doc = " - 1 storage write `ProposalOf` (codec `O(B)`)"] + #[doc = " - 1 storage write `Voting` (codec `O(M)`)"] + #[doc = " - 1 event"] + #[doc = "# "] + propose { + #[codec(compact)] + threshold: ::core::primitive::u32, + proposal: ::std::boxed::Box, + #[codec(compact)] + length_bound: ::core::primitive::u32, + }, + #[codec(index = 3)] + #[doc = "Add an aye or nay vote for the sender to the given proposal."] + #[doc = ""] + #[doc = "Requires the sender to be a member."] + #[doc = ""] + #[doc = "Transaction fees will be waived if the member is voting on any particular proposal"] + #[doc = "for the first time and the call is successful. Subsequent vote changes will charge a"] + #[doc = "fee."] + #[doc = "# "] + #[doc = "## Weight"] + #[doc = "- `O(M)` where `M` is members-count (code- and governance-bounded)"] + #[doc = "- DB:"] + #[doc = " - 1 storage read `Members` (codec `O(M)`)"] + #[doc = " - 1 storage mutation `Voting` (codec `O(M)`)"] + #[doc = "- 1 event"] + #[doc = "# "] + vote { + proposal: ::subxt::utils::H256, + #[codec(compact)] + index: ::core::primitive::u32, + approve: ::core::primitive::bool, + }, + #[codec(index = 4)] + #[doc = "Close a vote that is either approved, disapproved or whose voting period has ended."] + #[doc = ""] + #[doc = "May be called by any signed account in order to finish voting and close the proposal."] + #[doc = ""] + #[doc = "If called before the end of the voting period it will only close the vote if it is"] + #[doc = "has enough votes to be approved or disapproved."] + #[doc = ""] + #[doc = "If called after the end of the voting period abstentions are counted as rejections"] + #[doc = "unless there is a prime member set and the prime member cast an approval."] + #[doc = ""] + #[doc = "If the close operation completes successfully with disapproval, the transaction fee will"] + #[doc = "be waived. Otherwise execution of the approved operation will be charged to the caller."] + #[doc = ""] + #[doc = "+ `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed"] + #[doc = "proposal."] + #[doc = "+ `length_bound`: The upper bound for the length of the proposal in storage. Checked via"] + #[doc = "`storage::read` so it is `size_of::() == 4` larger than the pure length."] + #[doc = ""] + #[doc = "# "] + #[doc = "## Weight"] + #[doc = "- `O(B + M + P1 + P2)` where:"] + #[doc = " - `B` is `proposal` size in bytes (length-fee-bounded)"] + #[doc = " - `M` is members-count (code- and governance-bounded)"] + #[doc = " - `P1` is the complexity of `proposal` preimage."] + #[doc = " - `P2` is proposal-count (code-bounded)"] + #[doc = "- DB:"] + #[doc = " - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`)"] + #[doc = " - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec"] + #[doc = " `O(P2)`)"] + #[doc = " - any mutations done while executing `proposal` (`P1`)"] + #[doc = "- up to 3 events"] + #[doc = "# "] + close_old_weight { + proposal_hash: ::subxt::utils::H256, + #[codec(compact)] + index: ::core::primitive::u32, + #[codec(compact)] + proposal_weight_bound: runtime_types::sp_weights::OldWeight, + #[codec(compact)] + length_bound: ::core::primitive::u32, + }, + #[codec(index = 5)] + #[doc = "Disapprove a proposal, close, and remove it from the system, regardless of its current"] + #[doc = "state."] + #[doc = ""] + #[doc = "Must be called by the Root origin."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "* `proposal_hash`: The hash of the proposal that should be disapproved."] + #[doc = ""] + #[doc = "# "] + #[doc = "Complexity: O(P) where P is the number of max proposals"] + #[doc = "DB Weight:"] + #[doc = "* Reads: Proposals"] + #[doc = "* Writes: Voting, Proposals, ProposalOf"] + #[doc = "# "] + disapprove_proposal { proposal_hash: ::subxt::utils::H256 }, + #[codec(index = 6)] + #[doc = "Close a vote that is either approved, disapproved or whose voting period has ended."] + #[doc = ""] + #[doc = "May be called by any signed account in order to finish voting and close the proposal."] + #[doc = ""] + #[doc = "If called before the end of the voting period it will only close the vote if it is"] + #[doc = "has enough votes to be approved or disapproved."] + #[doc = ""] + #[doc = "If called after the end of the voting period abstentions are counted as rejections"] + #[doc = "unless there is a prime member set and the prime member cast an approval."] + #[doc = ""] + #[doc = "If the close operation completes successfully with disapproval, the transaction fee will"] + #[doc = "be waived. Otherwise execution of the approved operation will be charged to the caller."] + #[doc = ""] + #[doc = "+ `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed"] + #[doc = "proposal."] + #[doc = "+ `length_bound`: The upper bound for the length of the proposal in storage. Checked via"] + #[doc = "`storage::read` so it is `size_of::() == 4` larger than the pure length."] + #[doc = ""] + #[doc = "# "] + #[doc = "## Weight"] + #[doc = "- `O(B + M + P1 + P2)` where:"] + #[doc = " - `B` is `proposal` size in bytes (length-fee-bounded)"] + #[doc = " - `M` is members-count (code- and governance-bounded)"] + #[doc = " - `P1` is the complexity of `proposal` preimage."] + #[doc = " - `P2` is proposal-count (code-bounded)"] + #[doc = "- DB:"] + #[doc = " - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`)"] + #[doc = " - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec"] + #[doc = " `O(P2)`)"] + #[doc = " - any mutations done while executing `proposal` (`P1`)"] + #[doc = "- up to 3 events"] + #[doc = "# "] + close { + proposal_hash: ::subxt::utils::H256, + #[codec(compact)] + index: ::core::primitive::u32, + proposal_weight_bound: runtime_types::sp_weights::weight_v2::Weight, + #[codec(compact)] + length_bound: ::core::primitive::u32, + }, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call2 { + #[codec(index = 0)] + #[doc = "Set the collective's membership."] + #[doc = ""] + #[doc = "- `new_members`: The new member list. Be nice to the chain and provide it sorted."] + #[doc = "- `prime`: The prime member whose vote sets the default."] + #[doc = "- `old_count`: The upper bound for the previous number of members in storage. Used for"] + #[doc = " weight estimation."] + #[doc = ""] + #[doc = "Requires root origin."] + #[doc = ""] + #[doc = "NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but"] + #[doc = " the weight estimations rely on it to estimate dispatchable weight."] + #[doc = ""] + #[doc = "# WARNING:"] + #[doc = ""] + #[doc = "The `pallet-collective` can also be managed by logic outside of the pallet through the"] + #[doc = "implementation of the trait [`ChangeMembers`]."] + #[doc = "Any call to `set_members` must be careful that the member set doesn't get out of sync"] + #[doc = "with other logic managing the member set."] + #[doc = ""] + #[doc = "# "] + #[doc = "## Weight"] + #[doc = "- `O(MP + N)` where:"] + #[doc = " - `M` old-members-count (code- and governance-bounded)"] + #[doc = " - `N` new-members-count (code- and governance-bounded)"] + #[doc = " - `P` proposals-count (code-bounded)"] + #[doc = "- DB:"] + #[doc = " - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the"] + #[doc = " members"] + #[doc = " - 1 storage read (codec `O(P)`) for reading the proposals"] + #[doc = " - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal"] + #[doc = " - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one"] + #[doc = "# "] + set_members { + new_members: ::std::vec::Vec<::subxt::utils::AccountId32>, + prime: ::core::option::Option<::subxt::utils::AccountId32>, + old_count: ::core::primitive::u32, + }, + #[codec(index = 1)] + #[doc = "Dispatch a proposal from a member using the `Member` origin."] + #[doc = ""] + #[doc = "Origin must be a member of the collective."] + #[doc = ""] + #[doc = "# "] + #[doc = "## Weight"] + #[doc = "- `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching"] + #[doc = " `proposal`"] + #[doc = "- DB: 1 read (codec `O(M)`) + DB access of `proposal`"] + #[doc = "- 1 event"] + #[doc = "# "] + execute { + proposal: ::std::boxed::Box, + #[codec(compact)] + length_bound: ::core::primitive::u32, + }, + #[codec(index = 2)] + #[doc = "Add a new proposal to either be voted on or executed directly."] + #[doc = ""] + #[doc = "Requires the sender to be member."] + #[doc = ""] + #[doc = "`threshold` determines whether `proposal` is executed directly (`threshold < 2`)"] + #[doc = "or put up for voting."] + #[doc = ""] + #[doc = "# "] + #[doc = "## Weight"] + #[doc = "- `O(B + M + P1)` or `O(B + M + P2)` where:"] + #[doc = " - `B` is `proposal` size in bytes (length-fee-bounded)"] + #[doc = " - `M` is members-count (code- and governance-bounded)"] + #[doc = " - branching is influenced by `threshold` where:"] + #[doc = " - `P1` is proposal execution complexity (`threshold < 2`)"] + #[doc = " - `P2` is proposals-count (code-bounded) (`threshold >= 2`)"] + #[doc = "- DB:"] + #[doc = " - 1 storage read `is_member` (codec `O(M)`)"] + #[doc = " - 1 storage read `ProposalOf::contains_key` (codec `O(1)`)"] + #[doc = " - DB accesses influenced by `threshold`:"] + #[doc = " - EITHER storage accesses done by `proposal` (`threshold < 2`)"] + #[doc = " - OR proposal insertion (`threshold <= 2`)"] + #[doc = " - 1 storage mutation `Proposals` (codec `O(P2)`)"] + #[doc = " - 1 storage mutation `ProposalCount` (codec `O(1)`)"] + #[doc = " - 1 storage write `ProposalOf` (codec `O(B)`)"] + #[doc = " - 1 storage write `Voting` (codec `O(M)`)"] + #[doc = " - 1 event"] + #[doc = "# "] + propose { + #[codec(compact)] + threshold: ::core::primitive::u32, + proposal: ::std::boxed::Box, + #[codec(compact)] + length_bound: ::core::primitive::u32, + }, + #[codec(index = 3)] + #[doc = "Add an aye or nay vote for the sender to the given proposal."] + #[doc = ""] + #[doc = "Requires the sender to be a member."] + #[doc = ""] + #[doc = "Transaction fees will be waived if the member is voting on any particular proposal"] + #[doc = "for the first time and the call is successful. Subsequent vote changes will charge a"] + #[doc = "fee."] + #[doc = "# "] + #[doc = "## Weight"] + #[doc = "- `O(M)` where `M` is members-count (code- and governance-bounded)"] + #[doc = "- DB:"] + #[doc = " - 1 storage read `Members` (codec `O(M)`)"] + #[doc = " - 1 storage mutation `Voting` (codec `O(M)`)"] + #[doc = "- 1 event"] + #[doc = "# "] + vote { + proposal: ::subxt::utils::H256, + #[codec(compact)] + index: ::core::primitive::u32, + approve: ::core::primitive::bool, + }, + #[codec(index = 4)] + #[doc = "Close a vote that is either approved, disapproved or whose voting period has ended."] + #[doc = ""] + #[doc = "May be called by any signed account in order to finish voting and close the proposal."] + #[doc = ""] + #[doc = "If called before the end of the voting period it will only close the vote if it is"] + #[doc = "has enough votes to be approved or disapproved."] + #[doc = ""] + #[doc = "If called after the end of the voting period abstentions are counted as rejections"] + #[doc = "unless there is a prime member set and the prime member cast an approval."] + #[doc = ""] + #[doc = "If the close operation completes successfully with disapproval, the transaction fee will"] + #[doc = "be waived. Otherwise execution of the approved operation will be charged to the caller."] + #[doc = ""] + #[doc = "+ `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed"] + #[doc = "proposal."] + #[doc = "+ `length_bound`: The upper bound for the length of the proposal in storage. Checked via"] + #[doc = "`storage::read` so it is `size_of::() == 4` larger than the pure length."] + #[doc = ""] + #[doc = "# "] + #[doc = "## Weight"] + #[doc = "- `O(B + M + P1 + P2)` where:"] + #[doc = " - `B` is `proposal` size in bytes (length-fee-bounded)"] + #[doc = " - `M` is members-count (code- and governance-bounded)"] + #[doc = " - `P1` is the complexity of `proposal` preimage."] + #[doc = " - `P2` is proposal-count (code-bounded)"] + #[doc = "- DB:"] + #[doc = " - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`)"] + #[doc = " - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec"] + #[doc = " `O(P2)`)"] + #[doc = " - any mutations done while executing `proposal` (`P1`)"] + #[doc = "- up to 3 events"] + #[doc = "# "] + close_old_weight { + proposal_hash: ::subxt::utils::H256, + #[codec(compact)] + index: ::core::primitive::u32, + #[codec(compact)] + proposal_weight_bound: runtime_types::sp_weights::OldWeight, + #[codec(compact)] + length_bound: ::core::primitive::u32, + }, + #[codec(index = 5)] + #[doc = "Disapprove a proposal, close, and remove it from the system, regardless of its current"] + #[doc = "state."] + #[doc = ""] + #[doc = "Must be called by the Root origin."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "* `proposal_hash`: The hash of the proposal that should be disapproved."] + #[doc = ""] + #[doc = "# "] + #[doc = "Complexity: O(P) where P is the number of max proposals"] + #[doc = "DB Weight:"] + #[doc = "* Reads: Proposals"] + #[doc = "* Writes: Voting, Proposals, ProposalOf"] + #[doc = "# "] + disapprove_proposal { proposal_hash: ::subxt::utils::H256 }, + #[codec(index = 6)] + #[doc = "Close a vote that is either approved, disapproved or whose voting period has ended."] + #[doc = ""] + #[doc = "May be called by any signed account in order to finish voting and close the proposal."] + #[doc = ""] + #[doc = "If called before the end of the voting period it will only close the vote if it is"] + #[doc = "has enough votes to be approved or disapproved."] + #[doc = ""] + #[doc = "If called after the end of the voting period abstentions are counted as rejections"] + #[doc = "unless there is a prime member set and the prime member cast an approval."] + #[doc = ""] + #[doc = "If the close operation completes successfully with disapproval, the transaction fee will"] + #[doc = "be waived. Otherwise execution of the approved operation will be charged to the caller."] + #[doc = ""] + #[doc = "+ `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed"] + #[doc = "proposal."] + #[doc = "+ `length_bound`: The upper bound for the length of the proposal in storage. Checked via"] + #[doc = "`storage::read` so it is `size_of::() == 4` larger than the pure length."] + #[doc = ""] + #[doc = "# "] + #[doc = "## Weight"] + #[doc = "- `O(B + M + P1 + P2)` where:"] + #[doc = " - `B` is `proposal` size in bytes (length-fee-bounded)"] + #[doc = " - `M` is members-count (code- and governance-bounded)"] + #[doc = " - `P1` is the complexity of `proposal` preimage."] + #[doc = " - `P2` is proposal-count (code-bounded)"] + #[doc = "- DB:"] + #[doc = " - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`)"] + #[doc = " - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec"] + #[doc = " `O(P2)`)"] + #[doc = " - any mutations done while executing `proposal` (`P1`)"] + #[doc = "- up to 3 events"] + #[doc = "# "] + close { + proposal_hash: ::subxt::utils::H256, + #[codec(compact)] + index: ::core::primitive::u32, + proposal_weight_bound: runtime_types::sp_weights::weight_v2::Weight, + #[codec(compact)] + length_bound: ::core::primitive::u32, + }, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "Account is not a member"] + NotMember, + #[codec(index = 1)] + #[doc = "Duplicate proposals not allowed"] + DuplicateProposal, + #[codec(index = 2)] + #[doc = "Proposal must exist"] + ProposalMissing, + #[codec(index = 3)] + #[doc = "Mismatched index"] + WrongIndex, + #[codec(index = 4)] + #[doc = "Duplicate vote ignored"] + DuplicateVote, + #[codec(index = 5)] + #[doc = "Members are already initialized!"] + AlreadyInitialized, + #[codec(index = 6)] + #[doc = "The close call was made too early, before the end of the voting."] + TooEarly, + #[codec(index = 7)] + #[doc = "There can only be a maximum of `MaxProposals` active proposals."] + TooManyProposals, + #[codec(index = 8)] + #[doc = "The given weight bound for the proposal was too low."] + WrongProposalWeight, + #[codec(index = 9)] + #[doc = "The given length bound for the proposal was too low."] + WrongProposalLength, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error2 { + #[codec(index = 0)] + #[doc = "Account is not a member"] + NotMember, + #[codec(index = 1)] + #[doc = "Duplicate proposals not allowed"] + DuplicateProposal, + #[codec(index = 2)] + #[doc = "Proposal must exist"] + ProposalMissing, + #[codec(index = 3)] + #[doc = "Mismatched index"] + WrongIndex, + #[codec(index = 4)] + #[doc = "Duplicate vote ignored"] + DuplicateVote, + #[codec(index = 5)] + #[doc = "Members are already initialized!"] + AlreadyInitialized, + #[codec(index = 6)] + #[doc = "The close call was made too early, before the end of the voting."] + TooEarly, + #[codec(index = 7)] + #[doc = "There can only be a maximum of `MaxProposals` active proposals."] + TooManyProposals, + #[codec(index = 8)] + #[doc = "The given weight bound for the proposal was too low."] + WrongProposalWeight, + #[codec(index = 9)] + #[doc = "The given length bound for the proposal was too low."] + WrongProposalLength, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub enum Event { + #[codec(index = 0)] + #[doc = "A motion (given hash) has been proposed (by given account) with a threshold (given"] + #[doc = "`MemberCount`)."] + Proposed { + account: ::subxt::utils::AccountId32, + proposal_index: ::core::primitive::u32, + proposal_hash: ::subxt::utils::H256, + threshold: ::core::primitive::u32, + }, + #[codec(index = 1)] + #[doc = "A motion (given hash) has been voted on by given account, leaving"] + #[doc = "a tally (yes votes and no votes given respectively as `MemberCount`)."] + Voted { + account: ::subxt::utils::AccountId32, + proposal_hash: ::subxt::utils::H256, + voted: ::core::primitive::bool, + yes: ::core::primitive::u32, + no: ::core::primitive::u32, + }, + #[codec(index = 2)] + #[doc = "A motion was approved by the required threshold."] + Approved { proposal_hash: ::subxt::utils::H256 }, + #[codec(index = 3)] + #[doc = "A motion was not approved by the required threshold."] + Disapproved { proposal_hash: ::subxt::utils::H256 }, + #[codec(index = 4)] + #[doc = "A motion was executed; result will be `Ok` if it returned without error."] + Executed { + proposal_hash: ::subxt::utils::H256, + result: + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + }, + #[codec(index = 5)] + #[doc = "A single member did some action; result will be `Ok` if it returned without error."] + MemberExecuted { + proposal_hash: ::subxt::utils::H256, + result: + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + }, + #[codec(index = 6)] + #[doc = "A proposal was closed because its threshold was reached or after its duration was up."] + Closed { + proposal_hash: ::subxt::utils::H256, + yes: ::core::primitive::u32, + no: ::core::primitive::u32, + }, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub enum Event2 { + #[codec(index = 0)] + #[doc = "A motion (given hash) has been proposed (by given account) with a threshold (given"] + #[doc = "`MemberCount`)."] + Proposed { + account: ::subxt::utils::AccountId32, + proposal_index: ::core::primitive::u32, + proposal_hash: ::subxt::utils::H256, + threshold: ::core::primitive::u32, + }, + #[codec(index = 1)] + #[doc = "A motion (given hash) has been voted on by given account, leaving"] + #[doc = "a tally (yes votes and no votes given respectively as `MemberCount`)."] + Voted { + account: ::subxt::utils::AccountId32, + proposal_hash: ::subxt::utils::H256, + voted: ::core::primitive::bool, + yes: ::core::primitive::u32, + no: ::core::primitive::u32, + }, + #[codec(index = 2)] + #[doc = "A motion was approved by the required threshold."] + Approved { proposal_hash: ::subxt::utils::H256 }, + #[codec(index = 3)] + #[doc = "A motion was not approved by the required threshold."] + Disapproved { proposal_hash: ::subxt::utils::H256 }, + #[codec(index = 4)] + #[doc = "A motion was executed; result will be `Ok` if it returned without error."] + Executed { + proposal_hash: ::subxt::utils::H256, + result: + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + }, + #[codec(index = 5)] + #[doc = "A single member did some action; result will be `Ok` if it returned without error."] + MemberExecuted { + proposal_hash: ::subxt::utils::H256, + result: + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + }, + #[codec(index = 6)] + #[doc = "A proposal was closed because its threshold was reached or after its duration was up."] + Closed { + proposal_hash: ::subxt::utils::H256, + yes: ::core::primitive::u32, + no: ::core::primitive::u32, + }, + } + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum RawOrigin<_0> { + #[codec(index = 0)] + Members(::core::primitive::u32, ::core::primitive::u32), + #[codec(index = 1)] + Member(_0), + #[codec(index = 2)] + _Phantom, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Votes<_0, _1> { + pub index: _1, + pub threshold: _1, + pub ayes: ::std::vec::Vec<_0>, + pub nays: ::std::vec::Vec<_0>, + pub end: _1, + } + } + pub mod pallet_democracy { + use super::runtime_types; + pub mod conviction { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum Conviction { + #[codec(index = 0)] + None, + #[codec(index = 1)] + Locked1x, + #[codec(index = 2)] + Locked2x, + #[codec(index = 3)] + Locked3x, + #[codec(index = 4)] + Locked4x, + #[codec(index = 5)] + Locked5x, + #[codec(index = 6)] + Locked6x, + } + } + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Propose a sensitive action to be taken."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be _Signed_ and the sender must"] + #[doc = "have funds to cover the deposit."] + #[doc = ""] + #[doc = "- `proposal_hash`: The hash of the proposal preimage."] + #[doc = "- `value`: The amount of deposit (must be at least `MinimumDeposit`)."] + #[doc = ""] + #[doc = "Emits `Proposed`."] + propose { + proposal: runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::da_runtime::RuntimeCall, + >, + #[codec(compact)] + value: ::core::primitive::u128, + }, + #[codec(index = 1)] + #[doc = "Signals agreement with a particular proposal."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be _Signed_ and the sender"] + #[doc = "must have funds to cover the deposit, equal to the original deposit."] + #[doc = ""] + #[doc = "- `proposal`: The index of the proposal to second."] + second { + #[codec(compact)] + proposal: ::core::primitive::u32, + }, + #[codec(index = 2)] + #[doc = "Vote in a referendum. If `vote.is_aye()`, the vote is to enact the proposal;"] + #[doc = "otherwise it is a vote to keep the status quo."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be _Signed_."] + #[doc = ""] + #[doc = "- `ref_index`: The index of the referendum to vote for."] + #[doc = "- `vote`: The vote configuration."] + vote { + #[codec(compact)] + ref_index: ::core::primitive::u32, + vote: runtime_types::pallet_democracy::vote::AccountVote< + ::core::primitive::u128, + >, + }, + #[codec(index = 3)] + #[doc = "Schedule an emergency cancellation of a referendum. Cannot happen twice to the same"] + #[doc = "referendum."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be `CancellationOrigin`."] + #[doc = ""] + #[doc = "-`ref_index`: The index of the referendum to cancel."] + #[doc = ""] + #[doc = "Weight: `O(1)`."] + emergency_cancel { ref_index: ::core::primitive::u32 }, + #[codec(index = 4)] + #[doc = "Schedule a referendum to be tabled once it is legal to schedule an external"] + #[doc = "referendum."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be `ExternalOrigin`."] + #[doc = ""] + #[doc = "- `proposal_hash`: The preimage hash of the proposal."] + external_propose { + proposal: runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::da_runtime::RuntimeCall, + >, + }, + #[codec(index = 5)] + #[doc = "Schedule a majority-carries referendum to be tabled next once it is legal to schedule"] + #[doc = "an external referendum."] + #[doc = ""] + #[doc = "The dispatch of this call must be `ExternalMajorityOrigin`."] + #[doc = ""] + #[doc = "- `proposal_hash`: The preimage hash of the proposal."] + #[doc = ""] + #[doc = "Unlike `external_propose`, blacklisting has no effect on this and it may replace a"] + #[doc = "pre-scheduled `external_propose` call."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + external_propose_majority { + proposal: runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::da_runtime::RuntimeCall, + >, + }, + #[codec(index = 6)] + #[doc = "Schedule a negative-turnout-bias referendum to be tabled next once it is legal to"] + #[doc = "schedule an external referendum."] + #[doc = ""] + #[doc = "The dispatch of this call must be `ExternalDefaultOrigin`."] + #[doc = ""] + #[doc = "- `proposal_hash`: The preimage hash of the proposal."] + #[doc = ""] + #[doc = "Unlike `external_propose`, blacklisting has no effect on this and it may replace a"] + #[doc = "pre-scheduled `external_propose` call."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + external_propose_default { + proposal: runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::da_runtime::RuntimeCall, + >, + }, + #[codec(index = 7)] + #[doc = "Schedule the currently externally-proposed majority-carries referendum to be tabled"] + #[doc = "immediately. If there is no externally-proposed referendum currently, or if there is one"] + #[doc = "but it is not a majority-carries referendum then it fails."] + #[doc = ""] + #[doc = "The dispatch of this call must be `FastTrackOrigin`."] + #[doc = ""] + #[doc = "- `proposal_hash`: The hash of the current external proposal."] + #[doc = "- `voting_period`: The period that is allowed for voting on this proposal. Increased to"] + #[doc = "\tMust be always greater than zero."] + #[doc = "\tFor `FastTrackOrigin` must be equal or greater than `FastTrackVotingPeriod`."] + #[doc = "- `delay`: The number of block after voting has ended in approval and this should be"] + #[doc = " enacted. This doesn't have a minimum amount."] + #[doc = ""] + #[doc = "Emits `Started`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + fast_track { + proposal_hash: ::subxt::utils::H256, + voting_period: ::core::primitive::u32, + delay: ::core::primitive::u32, + }, + #[codec(index = 8)] + #[doc = "Veto and blacklist the external proposal hash."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be `VetoOrigin`."] + #[doc = ""] + #[doc = "- `proposal_hash`: The preimage hash of the proposal to veto and blacklist."] + #[doc = ""] + #[doc = "Emits `Vetoed`."] + #[doc = ""] + #[doc = "Weight: `O(V + log(V))` where V is number of `existing vetoers`"] + veto_external { proposal_hash: ::subxt::utils::H256 }, + #[codec(index = 9)] + #[doc = "Remove a referendum."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be _Root_."] + #[doc = ""] + #[doc = "- `ref_index`: The index of the referendum to cancel."] + #[doc = ""] + #[doc = "# Weight: `O(1)`."] + cancel_referendum { + #[codec(compact)] + ref_index: ::core::primitive::u32, + }, + #[codec(index = 10)] + #[doc = "Delegate the voting power (with some given conviction) of the sending account."] + #[doc = ""] + #[doc = "The balance delegated is locked for as long as it's delegated, and thereafter for the"] + #[doc = "time appropriate for the conviction's lock period."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be _Signed_, and the signing account must either:"] + #[doc = " - be delegating already; or"] + #[doc = " - have no voting activity (if there is, then it will need to be removed/consolidated"] + #[doc = " through `reap_vote` or `unvote`)."] + #[doc = ""] + #[doc = "- `to`: The account whose voting the `target` account's voting power will follow."] + #[doc = "- `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 referendums the voter delegating to has"] + #[doc = " voted on. Weight is charged as if maximum votes."] + delegate { + to: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + conviction: runtime_types::pallet_democracy::conviction::Conviction, + balance: ::core::primitive::u128, + }, + #[codec(index = 11)] + #[doc = "Undelegate the voting power of the sending account."] + #[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."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be _Signed_ and the signing account must be"] + #[doc = "currently delegating."] + #[doc = ""] + #[doc = "Emits `Undelegated`."] + #[doc = ""] + #[doc = "Weight: `O(R)` where R is the number of referendums the voter delegating to has"] + #[doc = " voted on. Weight is charged as if maximum votes."] + undelegate, + #[codec(index = 12)] + #[doc = "Clears all public proposals."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be _Root_."] + #[doc = ""] + #[doc = "Weight: `O(1)`."] + clear_public_proposals, + #[codec(index = 13)] + #[doc = "Unlock tokens that have an expired lock."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be _Signed_."] + #[doc = ""] + #[doc = "- `target`: The account to remove the lock on."] + #[doc = ""] + #[doc = "Weight: `O(R)` with R number of vote of target."] + unlock { + target: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + }, + #[codec(index = 14)] + #[doc = "Remove a vote for a referendum."] + #[doc = ""] + #[doc = "If:"] + #[doc = "- the referendum was cancelled, or"] + #[doc = "- the referendum is ongoing, or"] + #[doc = "- the referendum 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 referendum 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 referendum `index`."] + #[doc = ""] + #[doc = "- `index`: The index of referendum of the vote to be removed."] + #[doc = ""] + #[doc = "Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on."] + #[doc = " Weight is calculated for the maximum number of vote."] + remove_vote { index: ::core::primitive::u32 }, + #[codec(index = 15)] + #[doc = "Remove a vote for a referendum."] + #[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 referendum was cancelled, because the voter lost the referendum 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"] + #[doc = " referendum `index`."] + #[doc = "- `index`: The index of referendum of the vote to be removed."] + #[doc = ""] + #[doc = "Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on."] + #[doc = " Weight is calculated for the maximum number of vote."] + remove_other_vote { + target: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + index: ::core::primitive::u32, + }, + #[codec(index = 16)] + #[doc = "Permanently place a proposal into the blacklist. This prevents it from ever being"] + #[doc = "proposed again."] + #[doc = ""] + #[doc = "If called on a queued public or external proposal, then this will result in it being"] + #[doc = "removed. If the `ref_index` supplied is an active referendum with the proposal hash,"] + #[doc = "then it will be cancelled."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be `BlacklistOrigin`."] + #[doc = ""] + #[doc = "- `proposal_hash`: The proposal hash to blacklist permanently."] + #[doc = "- `ref_index`: An ongoing referendum whose hash is `proposal_hash`, which will be"] + #[doc = "cancelled."] + #[doc = ""] + #[doc = "Weight: `O(p)` (though as this is an high-privilege dispatch, we assume it has a"] + #[doc = " reasonable value)."] + blacklist { + proposal_hash: ::subxt::utils::H256, + maybe_ref_index: ::core::option::Option<::core::primitive::u32>, + }, + #[codec(index = 17)] + #[doc = "Remove a proposal."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be `CancelProposalOrigin`."] + #[doc = ""] + #[doc = "- `prop_index`: The index of the proposal to cancel."] + #[doc = ""] + #[doc = "Weight: `O(p)` where `p = PublicProps::::decode_len()`"] + cancel_proposal { + #[codec(compact)] + prop_index: ::core::primitive::u32, + }, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "Value too low"] + ValueLow, + #[codec(index = 1)] + #[doc = "Proposal does not exist"] + ProposalMissing, + #[codec(index = 2)] + #[doc = "Cannot cancel the same proposal twice"] + AlreadyCanceled, + #[codec(index = 3)] + #[doc = "Proposal already made"] + DuplicateProposal, + #[codec(index = 4)] + #[doc = "Proposal still blacklisted"] + ProposalBlacklisted, + #[codec(index = 5)] + #[doc = "Next external proposal not simple majority"] + NotSimpleMajority, + #[codec(index = 6)] + #[doc = "Invalid hash"] + InvalidHash, + #[codec(index = 7)] + #[doc = "No external proposal"] + NoProposal, + #[codec(index = 8)] + #[doc = "Identity may not veto a proposal twice"] + AlreadyVetoed, + #[codec(index = 9)] + #[doc = "Vote given for invalid referendum"] + ReferendumInvalid, + #[codec(index = 10)] + #[doc = "No proposals waiting"] + NoneWaiting, + #[codec(index = 11)] + #[doc = "The given account did not vote on the referendum."] + NotVoter, + #[codec(index = 12)] + #[doc = "The actor has no permission to conduct the action."] + NoPermission, + #[codec(index = 13)] + #[doc = "The account is already delegating."] + AlreadyDelegating, + #[codec(index = 14)] + #[doc = "Too high a balance was provided that the account cannot afford."] + InsufficientFunds, + #[codec(index = 15)] + #[doc = "The account is not currently delegating."] + NotDelegating, + #[codec(index = 16)] + #[doc = "The account currently has votes attached to it and the operation cannot succeed until"] + #[doc = "these are removed, either through `unvote` or `reap_vote`."] + VotesExist, + #[codec(index = 17)] + #[doc = "The instant referendum origin is currently disallowed."] + InstantNotAllowed, + #[codec(index = 18)] + #[doc = "Delegation to oneself makes no sense."] + Nonsense, + #[codec(index = 19)] + #[doc = "Invalid upper bound."] + WrongUpperBound, + #[codec(index = 20)] + #[doc = "Maximum number of votes reached."] + MaxVotesReached, + #[codec(index = 21)] + #[doc = "Maximum number of items reached."] + TooMany, + #[codec(index = 22)] + #[doc = "Voting period too low"] + VotingPeriodLow, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub enum Event { + #[codec(index = 0)] + #[doc = "A motion has been proposed by a public account."] + Proposed { + proposal_index: ::core::primitive::u32, + deposit: ::core::primitive::u128, + }, + #[codec(index = 1)] + #[doc = "A public proposal has been tabled for referendum vote."] + Tabled { + proposal_index: ::core::primitive::u32, + deposit: ::core::primitive::u128, + }, + #[codec(index = 2)] + #[doc = "An external proposal has been tabled."] + ExternalTabled, + #[codec(index = 3)] + #[doc = "A referendum has begun."] + Started { + ref_index: ::core::primitive::u32, + threshold: runtime_types::pallet_democracy::vote_threshold::VoteThreshold, + }, + #[codec(index = 4)] + #[doc = "A proposal has been approved by referendum."] + Passed { ref_index: ::core::primitive::u32 }, + #[codec(index = 5)] + #[doc = "A proposal has been rejected by referendum."] + NotPassed { ref_index: ::core::primitive::u32 }, + #[codec(index = 6)] + #[doc = "A referendum has been cancelled."] + Cancelled { ref_index: ::core::primitive::u32 }, + #[codec(index = 7)] + #[doc = "An account has delegated their vote to another account."] + Delegated { + who: ::subxt::utils::AccountId32, + target: ::subxt::utils::AccountId32, + }, + #[codec(index = 8)] + #[doc = "An account has cancelled a previous delegation operation."] + Undelegated { + account: ::subxt::utils::AccountId32, + }, + #[codec(index = 9)] + #[doc = "An external proposal has been vetoed."] + Vetoed { + who: ::subxt::utils::AccountId32, + proposal_hash: ::subxt::utils::H256, + until: ::core::primitive::u32, + }, + #[codec(index = 10)] + #[doc = "A proposal_hash has been blacklisted permanently."] + Blacklisted { proposal_hash: ::subxt::utils::H256 }, + #[codec(index = 11)] + #[doc = "An account has voted in a referendum"] + Voted { + voter: ::subxt::utils::AccountId32, + ref_index: ::core::primitive::u32, + vote: runtime_types::pallet_democracy::vote::AccountVote< + ::core::primitive::u128, + >, + }, + #[codec(index = 12)] + #[doc = "An account has secconded a proposal"] + Seconded { + seconder: ::subxt::utils::AccountId32, + prop_index: ::core::primitive::u32, + }, + #[codec(index = 13)] + #[doc = "A proposal got canceled."] + ProposalCanceled { prop_index: ::core::primitive::u32 }, + } + } + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Delegations<_0> { + pub votes: _0, + pub capital: _0, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum ReferendumInfo<_0, _1, _2> { + #[codec(index = 0)] + Ongoing(runtime_types::pallet_democracy::types::ReferendumStatus<_0, _1, _2>), + #[codec(index = 1)] + Finished { + approved: ::core::primitive::bool, + end: _0, + }, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ReferendumStatus<_0, _1, _2> { + pub end: _0, + pub proposal: _1, + pub threshold: runtime_types::pallet_democracy::vote_threshold::VoteThreshold, + pub delay: _0, + pub tally: runtime_types::pallet_democracy::types::Tally<_2>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Tally<_0> { + pub ayes: _0, + pub nays: _0, + pub turnout: _0, + } + } + pub mod vote { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum AccountVote<_0> { + #[codec(index = 0)] + Standard { + vote: runtime_types::pallet_democracy::vote::Vote, + balance: _0, + }, + #[codec(index = 1)] + Split { aye: _0, nay: _0 }, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct PriorLock<_0, _1>(pub _0, pub _1); + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Vote(pub ::core::primitive::u8); + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum Voting<_0, _1, _2> { + #[codec(index = 0)] + Direct { + votes: runtime_types::sp_core::bounded::bounded_vec::BoundedVec<( + _2, + runtime_types::pallet_democracy::vote::AccountVote<_0>, + )>, + delegations: runtime_types::pallet_democracy::types::Delegations<_0>, + prior: runtime_types::pallet_democracy::vote::PriorLock<_2, _0>, + }, + #[codec(index = 1)] + Delegating { + balance: _0, + target: _1, + conviction: runtime_types::pallet_democracy::conviction::Conviction, + delegations: runtime_types::pallet_democracy::types::Delegations<_0>, + prior: runtime_types::pallet_democracy::vote::PriorLock<_2, _0>, + }, + } + } + pub mod vote_threshold { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum VoteThreshold { + #[codec(index = 0)] + SuperMajorityApprove, + #[codec(index = 1)] + SuperMajorityAgainst, + #[codec(index = 2)] + SimpleMajority, + } + } + } + pub mod pallet_election_provider_multi_phase { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + # [codec (index = 0)] # [doc = "Submit a solution for the unsigned phase."] # [doc = ""] # [doc = "The dispatch origin fo this call must be __none__."] # [doc = ""] # [doc = "This submission is checked on the fly. Moreover, this unsigned solution is only"] # [doc = "validated when submitted to the pool from the **local** node. Effectively, this means"] # [doc = "that only active validators can submit this transaction when authoring a block (similar"] # [doc = "to an inherent)."] # [doc = ""] # [doc = "To prevent any incorrect solution (and thus wasted time/weight), this transaction will"] # [doc = "panic if the solution submitted by the validator is invalid in any way, effectively"] # [doc = "putting their authoring reward at risk."] # [doc = ""] # [doc = "No deposit or reward is associated with this submission."] submit_unsigned { raw_solution : :: std :: boxed :: Box < runtime_types :: pallet_election_provider_multi_phase :: RawSolution < runtime_types :: da_runtime :: constants :: staking :: NposSolution16 > > , witness : runtime_types :: pallet_election_provider_multi_phase :: SolutionOrSnapshotSize , } , # [codec (index = 1)] # [doc = "Set a new value for `MinimumUntrustedScore`."] # [doc = ""] # [doc = "Dispatch origin must be aligned with `T::ForceOrigin`."] # [doc = ""] # [doc = "This check can be turned off by setting the value to `None`."] set_minimum_untrusted_score { maybe_next_score : :: core :: option :: Option < runtime_types :: sp_npos_elections :: ElectionScore > , } , # [codec (index = 2)] # [doc = "Set a solution in the queue, to be handed out to the client of this pallet in the next"] # [doc = "call to `ElectionProvider::elect`."] # [doc = ""] # [doc = "This can only be set by `T::ForceOrigin`, and only when the phase is `Emergency`."] # [doc = ""] # [doc = "The solution is not checked for any feasibility and is assumed to be trustworthy, as any"] # [doc = "feasibility check itself can in principle cause the election process to fail (due to"] # [doc = "memory/weight constrains)."] set_emergency_election_result { supports : :: std :: vec :: Vec < (:: subxt :: utils :: AccountId32 , runtime_types :: sp_npos_elections :: Support < :: subxt :: utils :: AccountId32 > ,) > , } , # [codec (index = 3)] # [doc = "Submit a solution for the signed phase."] # [doc = ""] # [doc = "The dispatch origin fo this call must be __signed__."] # [doc = ""] # [doc = "The solution is potentially queued, based on the claimed score and processed at the end"] # [doc = "of the signed phase."] # [doc = ""] # [doc = "A deposit is reserved and recorded for the solution. Based on the outcome, the solution"] # [doc = "might be rewarded, slashed, or get all or a part of the deposit back."] submit { raw_solution : :: std :: boxed :: Box < runtime_types :: pallet_election_provider_multi_phase :: RawSolution < runtime_types :: da_runtime :: constants :: staking :: NposSolution16 > > , } , # [codec (index = 4)] # [doc = "Trigger the governance fallback."] # [doc = ""] # [doc = "This can only be called when [`Phase::Emergency`] is enabled, as an alternative to"] # [doc = "calling [`Call::set_emergency_election_result`]."] governance_fallback { maybe_max_voters : :: core :: option :: Option < :: core :: primitive :: u32 > , maybe_max_targets : :: core :: option :: Option < :: core :: primitive :: u32 > , } , } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Error of the pallet that can be returned in response to dispatches."] + pub enum Error { + #[codec(index = 0)] + #[doc = "Submission was too early."] + PreDispatchEarlySubmission, + #[codec(index = 1)] + #[doc = "Wrong number of winners presented."] + PreDispatchWrongWinnerCount, + #[codec(index = 2)] + #[doc = "Submission was too weak, score-wise."] + PreDispatchWeakSubmission, + #[codec(index = 3)] + #[doc = "The queue was full, and the solution was not better than any of the existing ones."] + SignedQueueFull, + #[codec(index = 4)] + #[doc = "The origin failed to pay the deposit."] + SignedCannotPayDeposit, + #[codec(index = 5)] + #[doc = "Witness data to dispatchable is invalid."] + SignedInvalidWitness, + #[codec(index = 6)] + #[doc = "The signed submission consumes too much weight"] + SignedTooMuchWeight, + #[codec(index = 7)] + #[doc = "OCW submitted solution for wrong round"] + OcwCallWrongEra, + #[codec(index = 8)] + #[doc = "Snapshot metadata should exist but didn't."] + MissingSnapshotMetadata, + #[codec(index = 9)] + #[doc = "`Self::insert_submission` returned an invalid index."] + InvalidSubmissionIndex, + #[codec(index = 10)] + #[doc = "The call is not allowed at this point."] + CallNotAllowed, + #[codec(index = 11)] + #[doc = "The fallback failed"] + FallbackFailed, + #[codec(index = 12)] + #[doc = "Some bound not met"] + BoundNotMet, + #[codec(index = 13)] + #[doc = "Submitted solution has too many winners"] + TooManyWinners, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub enum Event { + #[codec(index = 0)] + #[doc = "A solution was stored with the given compute."] + #[doc = ""] + #[doc = "The `origin` indicates the origin of the solution. If `origin` is `Some(AccountId)`,"] + #[doc = "the stored solution was submited in the signed phase by a miner with the `AccountId`."] + #[doc = "Otherwise, the solution was stored either during the unsigned phase or by"] + #[doc = "`T::ForceOrigin`. The `bool` is `true` when a previous solution was ejected to make"] + #[doc = "room for this one."] + SolutionStored { + compute: + runtime_types::pallet_election_provider_multi_phase::ElectionCompute, + origin: ::core::option::Option<::subxt::utils::AccountId32>, + prev_ejected: ::core::primitive::bool, + }, + #[codec(index = 1)] + #[doc = "The election has been finalized, with the given computation and score."] + ElectionFinalized { + compute: + runtime_types::pallet_election_provider_multi_phase::ElectionCompute, + score: runtime_types::sp_npos_elections::ElectionScore, + }, + #[codec(index = 2)] + #[doc = "An election failed."] + #[doc = ""] + #[doc = "Not much can be said about which computes failed in the process."] + ElectionFailed, + #[codec(index = 3)] + #[doc = "An account has been rewarded for their signed submission being finalized."] + Rewarded { + account: ::subxt::utils::AccountId32, + value: ::core::primitive::u128, + }, + #[codec(index = 4)] + #[doc = "An account has been slashed for submitting an invalid signed submission."] + Slashed { + account: ::subxt::utils::AccountId32, + value: ::core::primitive::u128, + }, + #[codec(index = 5)] + #[doc = "There was a phase transition in a given round."] + PhaseTransitioned { + from: runtime_types::pallet_election_provider_multi_phase::Phase< + ::core::primitive::u32, + >, + to: runtime_types::pallet_election_provider_multi_phase::Phase< + ::core::primitive::u32, + >, + round: ::core::primitive::u32, + }, + } + } + pub mod signed { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SignedSubmission<_0, _1, _2> { + pub who: _0, + pub deposit: _1, + pub raw_solution: + runtime_types::pallet_election_provider_multi_phase::RawSolution<_2>, + pub call_fee: _1, + } + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum ElectionCompute { + #[codec(index = 0)] + OnChain, + #[codec(index = 1)] + Signed, + #[codec(index = 2)] + Unsigned, + #[codec(index = 3)] + Fallback, + #[codec(index = 4)] + Emergency, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum Phase<_0> { + #[codec(index = 0)] + Off, + #[codec(index = 1)] + Signed, + #[codec(index = 2)] + Unsigned((::core::primitive::bool, _0)), + #[codec(index = 3)] + Emergency, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct RawSolution<_0> { + pub solution: _0, + pub score: runtime_types::sp_npos_elections::ElectionScore, + pub round: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ReadySolution { + pub supports: runtime_types::sp_core::bounded::bounded_vec::BoundedVec<( + ::subxt::utils::AccountId32, + runtime_types::sp_npos_elections::Support<::subxt::utils::AccountId32>, + )>, + pub score: runtime_types::sp_npos_elections::ElectionScore, + pub compute: runtime_types::pallet_election_provider_multi_phase::ElectionCompute, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct RoundSnapshot { + pub voters: ::std::vec::Vec<( + ::subxt::utils::AccountId32, + ::core::primitive::u64, + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::subxt::utils::AccountId32, + >, + )>, + pub targets: ::std::vec::Vec<::subxt::utils::AccountId32>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SolutionOrSnapshotSize { + #[codec(compact)] + pub voters: ::core::primitive::u32, + #[codec(compact)] + pub targets: ::core::primitive::u32, + } + } + pub mod pallet_elections_phragmen { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Vote for a set of candidates for the upcoming round of election. This can be called to"] + #[doc = "set the initial votes, or update already existing votes."] + #[doc = ""] + #[doc = "Upon initial voting, `value` units of `who`'s balance is locked and a deposit amount is"] + #[doc = "reserved. The deposit is based on the number of votes and can be updated over time."] + #[doc = ""] + #[doc = "The `votes` should:"] + #[doc = " - not be empty."] + #[doc = " - be less than the number of possible candidates. Note that all current members and"] + #[doc = " runners-up are also automatically candidates for the next round."] + #[doc = ""] + #[doc = "If `value` is more than `who`'s free balance, then the maximum of the two is used."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be signed."] + #[doc = ""] + #[doc = "### Warning"] + #[doc = ""] + #[doc = "It is the responsibility of the caller to **NOT** place all of their balance into the"] + #[doc = "lock and keep some for further operations."] + #[doc = ""] + #[doc = "# "] + #[doc = "We assume the maximum weight among all 3 cases: vote_equal, vote_more and vote_less."] + #[doc = "# "] + vote { + votes: ::std::vec::Vec<::subxt::utils::AccountId32>, + #[codec(compact)] + value: ::core::primitive::u128, + }, + #[codec(index = 1)] + #[doc = "Remove `origin` as a voter."] + #[doc = ""] + #[doc = "This removes the lock and returns the deposit."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be signed and be a voter."] + remove_voter, + #[codec(index = 2)] + #[doc = "Submit oneself for candidacy. A fixed amount of deposit is recorded."] + #[doc = ""] + #[doc = "All candidates are wiped at the end of the term. They either become a member/runner-up,"] + #[doc = "or leave the system while their deposit is slashed."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be signed."] + #[doc = ""] + #[doc = "### Warning"] + #[doc = ""] + #[doc = "Even if a candidate ends up being a member, they must call [`Call::renounce_candidacy`]"] + #[doc = "to get their deposit back. Losing the spot in an election will always lead to a slash."] + #[doc = ""] + #[doc = "# "] + #[doc = "The number of current candidates must be provided as witness data."] + #[doc = "# "] + submit_candidacy { + #[codec(compact)] + candidate_count: ::core::primitive::u32, + }, + #[codec(index = 3)] + #[doc = "Renounce one's intention to be a candidate for the next election round. 3 potential"] + #[doc = "outcomes exist:"] + #[doc = ""] + #[doc = "- `origin` is a candidate and not elected in any set. In this case, the deposit is"] + #[doc = " unreserved, returned and origin is removed as a candidate."] + #[doc = "- `origin` is a current runner-up. In this case, the deposit is unreserved, returned and"] + #[doc = " origin is removed as a runner-up."] + #[doc = "- `origin` is a current member. In this case, the deposit is unreserved and origin is"] + #[doc = " removed as a member, consequently not being a candidate for the next round anymore."] + #[doc = " Similar to [`remove_member`](Self::remove_member), if replacement runners exists, they"] + #[doc = " are immediately used. If the prime is renouncing, then no prime will exist until the"] + #[doc = " next round."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be signed, and have one of the above roles."] + #[doc = ""] + #[doc = "# "] + #[doc = "The type of renouncing must be provided as witness data."] + #[doc = "# "] + renounce_candidacy { + renouncing: runtime_types::pallet_elections_phragmen::Renouncing, + }, + #[codec(index = 4)] + #[doc = "Remove a particular member from the set. This is effective immediately and the bond of"] + #[doc = "the outgoing member is slashed."] + #[doc = ""] + #[doc = "If a runner-up is available, then the best runner-up will be removed and replaces the"] + #[doc = "outgoing member. Otherwise, if `rerun_election` is `true`, a new phragmen election is"] + #[doc = "started, else, nothing happens."] + #[doc = ""] + #[doc = "If `slash_bond` is set to true, the bond of the member being removed is slashed. Else,"] + #[doc = "it is returned."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be root."] + #[doc = ""] + #[doc = "Note that this does not affect the designated block number of the next election."] + #[doc = ""] + #[doc = "# "] + #[doc = "If we have a replacement, we use a small weight. Else, since this is a root call and"] + #[doc = "will go into phragmen, we assume full block for now."] + #[doc = "# "] + remove_member { + who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + slash_bond: ::core::primitive::bool, + rerun_election: ::core::primitive::bool, + }, + #[codec(index = 5)] + #[doc = "Clean all voters who are defunct (i.e. they do not serve any purpose at all). The"] + #[doc = "deposit of the removed voters are returned."] + #[doc = ""] + #[doc = "This is an root function to be used only for cleaning the state."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be root."] + #[doc = ""] + #[doc = "# "] + #[doc = "The total number of voters and those that are defunct must be provided as witness data."] + #[doc = "# "] + clean_defunct_voters { + num_voters: ::core::primitive::u32, + num_defunct: ::core::primitive::u32, + }, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "Cannot vote when no candidates or members exist."] + UnableToVote, + #[codec(index = 1)] + #[doc = "Must vote for at least one candidate."] + NoVotes, + #[codec(index = 2)] + #[doc = "Cannot vote more than candidates."] + TooManyVotes, + #[codec(index = 3)] + #[doc = "Cannot vote more than maximum allowed."] + MaximumVotesExceeded, + #[codec(index = 4)] + #[doc = "Cannot vote with stake less than minimum balance."] + LowBalance, + #[codec(index = 5)] + #[doc = "Voter can not pay voting bond."] + UnableToPayBond, + #[codec(index = 6)] + #[doc = "Must be a voter."] + MustBeVoter, + #[codec(index = 7)] + #[doc = "Duplicated candidate submission."] + DuplicatedCandidate, + #[codec(index = 8)] + #[doc = "Too many candidates have been created."] + TooManyCandidates, + #[codec(index = 9)] + #[doc = "Member cannot re-submit candidacy."] + MemberSubmit, + #[codec(index = 10)] + #[doc = "Runner cannot re-submit candidacy."] + RunnerUpSubmit, + #[codec(index = 11)] + #[doc = "Candidate does not have enough funds."] + InsufficientCandidateFunds, + #[codec(index = 12)] + #[doc = "Not a member."] + NotMember, + #[codec(index = 13)] + #[doc = "The provided count of number of candidates is incorrect."] + InvalidWitnessData, + #[codec(index = 14)] + #[doc = "The provided count of number of votes is incorrect."] + InvalidVoteCount, + #[codec(index = 15)] + #[doc = "The renouncing origin presented a wrong `Renouncing` parameter."] + InvalidRenouncing, + #[codec(index = 16)] + #[doc = "Prediction regarding replacement after member removal is wrong."] + InvalidReplacement, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub enum Event { + #[codec(index = 0)] + #[doc = "A new term with new_members. This indicates that enough candidates existed to run"] + #[doc = "the election, not that enough have has been elected. The inner value must be examined"] + #[doc = "for this purpose. A `NewTerm(\\[\\])` indicates that some candidates got their bond"] + #[doc = "slashed and none were elected, whilst `EmptyTerm` means that no candidates existed to"] + #[doc = "begin with."] + NewTerm { + new_members: + ::std::vec::Vec<(::subxt::utils::AccountId32, ::core::primitive::u128)>, + }, + #[codec(index = 1)] + #[doc = "No (or not enough) candidates existed for this round. This is different from"] + #[doc = "`NewTerm(\\[\\])`. See the description of `NewTerm`."] + EmptyTerm, + #[codec(index = 2)] + #[doc = "Internal error happened while trying to perform election."] + ElectionError, + #[codec(index = 3)] + #[doc = "A member has been removed. This should always be followed by either `NewTerm` or"] + #[doc = "`EmptyTerm`."] + MemberKicked { member: ::subxt::utils::AccountId32 }, + #[codec(index = 4)] + #[doc = "Someone has renounced their candidacy."] + Renounced { + candidate: ::subxt::utils::AccountId32, + }, + #[codec(index = 5)] + #[doc = "A candidate was slashed by amount due to failing to obtain a seat as member or"] + #[doc = "runner-up."] + #[doc = ""] + #[doc = "Note that old members and runners-up are also candidates."] + CandidateSlashed { + candidate: ::subxt::utils::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 6)] + #[doc = "A seat holder was slashed by amount by being forcefully removed from the set."] + SeatHolderSlashed { + seat_holder: ::subxt::utils::AccountId32, + amount: ::core::primitive::u128, + }, + } + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum Renouncing { + #[codec(index = 0)] + Member, + #[codec(index = 1)] + RunnerUp, + #[codec(index = 2)] + Candidate(#[codec(compact)] ::core::primitive::u32), + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SeatHolder<_0, _1> { + pub who: _0, + pub stake: _1, + pub deposit: _1, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Voter<_0, _1> { + pub votes: ::std::vec::Vec<_0>, + pub stake: _1, + pub deposit: _1, + } + } + pub mod pallet_grandpa { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Report voter equivocation/misbehavior. This method will verify the"] + #[doc = "equivocation proof and validate the given key ownership proof"] + #[doc = "against the extracted offender. If both are valid, the offence"] + #[doc = "will be reported."] + report_equivocation { + equivocation_proof: ::std::boxed::Box< + runtime_types::sp_finality_grandpa::EquivocationProof< + ::subxt::utils::H256, + ::core::primitive::u32, + >, + >, + key_owner_proof: runtime_types::sp_session::MembershipProof, + }, + #[codec(index = 1)] + #[doc = "Report voter equivocation/misbehavior. This method will verify the"] + #[doc = "equivocation proof and validate the given key ownership proof"] + #[doc = "against the extracted offender. If both are valid, the offence"] + #[doc = "will be reported."] + #[doc = ""] + #[doc = "This extrinsic must be called unsigned and it is expected that only"] + #[doc = "block authors will call it (validated in `ValidateUnsigned`), as such"] + #[doc = "if the block author is defined it will be defined as the equivocation"] + #[doc = "reporter."] + report_equivocation_unsigned { + equivocation_proof: ::std::boxed::Box< + runtime_types::sp_finality_grandpa::EquivocationProof< + ::subxt::utils::H256, + ::core::primitive::u32, + >, + >, + key_owner_proof: runtime_types::sp_session::MembershipProof, + }, + #[codec(index = 2)] + #[doc = "Note that the current authority set of the GRANDPA finality gadget has stalled."] + #[doc = ""] + #[doc = "This will trigger a forced authority set change at the beginning of the next session, to"] + #[doc = "be enacted `delay` blocks after that. The `delay` should be high enough to safely assume"] + #[doc = "that the block signalling the forced change will not be re-orged e.g. 1000 blocks."] + #[doc = "The block production rate (which may be slowed down because of finality lagging) should"] + #[doc = "be taken into account when choosing the `delay`. The GRANDPA voters based on the new"] + #[doc = "authority will start voting on top of `best_finalized_block_number` for new finalized"] + #[doc = "blocks. `best_finalized_block_number` should be the highest of the latest finalized"] + #[doc = "block of all validators of the new authority set."] + #[doc = ""] + #[doc = "Only callable by root."] + note_stalled { + delay: ::core::primitive::u32, + best_finalized_block_number: ::core::primitive::u32, + }, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "Attempt to signal GRANDPA pause when the authority set isn't live"] + #[doc = "(either paused or already pending pause)."] + PauseFailed, + #[codec(index = 1)] + #[doc = "Attempt to signal GRANDPA resume when the authority set isn't paused"] + #[doc = "(either live or already pending resume)."] + ResumeFailed, + #[codec(index = 2)] + #[doc = "Attempt to signal GRANDPA change with one already pending."] + ChangePending, + #[codec(index = 3)] + #[doc = "Cannot signal forced change so soon after last."] + TooSoon, + #[codec(index = 4)] + #[doc = "A key ownership proof provided as part of an equivocation report is invalid."] + InvalidKeyOwnershipProof, + #[codec(index = 5)] + #[doc = "An equivocation proof provided as part of an equivocation report is invalid."] + InvalidEquivocationProof, + #[codec(index = 6)] + #[doc = "A given equivocation report is valid but already previously reported."] + DuplicateOffenceReport, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub enum Event { + #[codec(index = 0)] + #[doc = "New authority set has been applied."] + NewAuthorities { + authority_set: ::std::vec::Vec<( + runtime_types::sp_finality_grandpa::app::Public, + ::core::primitive::u64, + )>, + }, + #[codec(index = 1)] + #[doc = "Current authority set has been paused."] + Paused, + #[codec(index = 2)] + #[doc = "Current authority set has been resumed."] + Resumed, + } + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct StoredPendingChange<_0> { + pub scheduled_at: _0, + pub delay: _0, + pub next_authorities: + runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec<( + runtime_types::sp_finality_grandpa::app::Public, + ::core::primitive::u64, + )>, + pub forced: ::core::option::Option<_0>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum StoredState<_0> { + #[codec(index = 0)] + Live, + #[codec(index = 1)] + PendingPause { scheduled_at: _0, delay: _0 }, + #[codec(index = 2)] + Paused, + #[codec(index = 3)] + PendingResume { scheduled_at: _0, delay: _0 }, + } + } + pub mod pallet_im_online { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "# "] + #[doc = "- Complexity: `O(K + E)` where K is length of `Keys` (heartbeat.validators_len) and E is"] + #[doc = " length of `heartbeat.network_state.external_address`"] + #[doc = " - `O(K)`: decoding of length `K`"] + #[doc = " - `O(E)`: decoding/encoding of length `E`"] + #[doc = "- DbReads: pallet_session `Validators`, pallet_session `CurrentIndex`, `Keys`,"] + #[doc = " `ReceivedHeartbeats`"] + #[doc = "- DbWrites: `ReceivedHeartbeats`"] + #[doc = "# "] + heartbeat { + heartbeat: + runtime_types::pallet_im_online::Heartbeat<::core::primitive::u32>, + signature: runtime_types::pallet_im_online::sr25519::app_sr25519::Signature, + }, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "Non existent public key."] + InvalidKey, + #[codec(index = 1)] + #[doc = "Duplicated heartbeat."] + DuplicatedHeartbeat, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub enum Event { + #[codec(index = 0)] + #[doc = "A new heartbeat was received from `AuthorityId`."] + HeartbeatReceived { + authority_id: runtime_types::pallet_im_online::sr25519::app_sr25519::Public, + }, + #[codec(index = 1)] + #[doc = "At the end of the session, no offence was committed."] + AllGood, + #[codec(index = 2)] + #[doc = "At the end of the session, at least one validator was found to be offline."] + SomeOffline { + offline: ::std::vec::Vec<( + ::subxt::utils::AccountId32, + runtime_types::pallet_staking::Exposure< + ::subxt::utils::AccountId32, + ::core::primitive::u128, + >, + )>, + }, + } + } + pub mod sr25519 { + use super::runtime_types; + pub mod app_sr25519 { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Public(pub runtime_types::sp_core::sr25519::Public); + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Signature(pub runtime_types::sp_core::sr25519::Signature); + } + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct BoundedOpaqueNetworkState { + pub peer_id: runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec< + ::core::primitive::u8, + >, + pub external_addresses: + runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec< + runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec< + ::core::primitive::u8, + >, + >, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Heartbeat<_0> { + pub block_number: _0, + pub network_state: runtime_types::sp_core::offchain::OpaqueNetworkState, + pub session_index: _0, + pub authority_index: _0, + pub validators_len: _0, + } + } + pub mod pallet_indices { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Assign an previously unassigned index."] + #[doc = ""] + #[doc = "Payment: `Deposit` is reserved from the sender account."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "- `index`: the index to be claimed. This must not be in use."] + #[doc = ""] + #[doc = "Emits `IndexAssigned` if successful."] + #[doc = ""] + #[doc = "# "] + #[doc = "- `O(1)`."] + #[doc = "- One storage mutation (codec `O(1)`)."] + #[doc = "- One reserve operation."] + #[doc = "- One event."] + #[doc = "-------------------"] + #[doc = "- DB Weight: 1 Read/Write (Accounts)"] + #[doc = "# "] + claim { index: ::core::primitive::u32 }, + #[codec(index = 1)] + #[doc = "Assign an index already owned by the sender to another account. The balance reservation"] + #[doc = "is effectively transferred to the new account."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "- `index`: the index to be re-assigned. This must be owned by the sender."] + #[doc = "- `new`: the new owner of the index. This function is a no-op if it is equal to sender."] + #[doc = ""] + #[doc = "Emits `IndexAssigned` if successful."] + #[doc = ""] + #[doc = "# "] + #[doc = "- `O(1)`."] + #[doc = "- One storage mutation (codec `O(1)`)."] + #[doc = "- One transfer operation."] + #[doc = "- One event."] + #[doc = "-------------------"] + #[doc = "- DB Weight:"] + #[doc = " - Reads: Indices Accounts, System Account (recipient)"] + #[doc = " - Writes: Indices Accounts, System Account (recipient)"] + #[doc = "# "] + transfer { + new: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + index: ::core::primitive::u32, + }, + #[codec(index = 2)] + #[doc = "Free up an index owned by the sender."] + #[doc = ""] + #[doc = "Payment: Any previous deposit placed for the index is unreserved in the sender account."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must own the index."] + #[doc = ""] + #[doc = "- `index`: the index to be freed. This must be owned by the sender."] + #[doc = ""] + #[doc = "Emits `IndexFreed` if successful."] + #[doc = ""] + #[doc = "# "] + #[doc = "- `O(1)`."] + #[doc = "- One storage mutation (codec `O(1)`)."] + #[doc = "- One reserve operation."] + #[doc = "- One event."] + #[doc = "-------------------"] + #[doc = "- DB Weight: 1 Read/Write (Accounts)"] + #[doc = "# "] + free { index: ::core::primitive::u32 }, + #[codec(index = 3)] + #[doc = "Force an index to an account. This doesn't require a deposit. If the index is already"] + #[doc = "held, then any deposit is reimbursed to its current owner."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Root_."] + #[doc = ""] + #[doc = "- `index`: the index to be (re-)assigned."] + #[doc = "- `new`: the new owner of the index. This function is a no-op if it is equal to sender."] + #[doc = "- `freeze`: if set to `true`, will freeze the index so it cannot be transferred."] + #[doc = ""] + #[doc = "Emits `IndexAssigned` if successful."] + #[doc = ""] + #[doc = "# "] + #[doc = "- `O(1)`."] + #[doc = "- One storage mutation (codec `O(1)`)."] + #[doc = "- Up to one reserve operation."] + #[doc = "- One event."] + #[doc = "-------------------"] + #[doc = "- DB Weight:"] + #[doc = " - Reads: Indices Accounts, System Account (original owner)"] + #[doc = " - Writes: Indices Accounts, System Account (original owner)"] + #[doc = "# "] + force_transfer { + new: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + index: ::core::primitive::u32, + freeze: ::core::primitive::bool, + }, + #[codec(index = 4)] + #[doc = "Freeze an index so it will always point to the sender account. This consumes the"] + #[doc = "deposit."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the signing account must have a"] + #[doc = "non-frozen account `index`."] + #[doc = ""] + #[doc = "- `index`: the index to be frozen in place."] + #[doc = ""] + #[doc = "Emits `IndexFrozen` if successful."] + #[doc = ""] + #[doc = "# "] + #[doc = "- `O(1)`."] + #[doc = "- One storage mutation (codec `O(1)`)."] + #[doc = "- Up to one slash operation."] + #[doc = "- One event."] + #[doc = "-------------------"] + #[doc = "- DB Weight: 1 Read/Write (Accounts)"] + #[doc = "# "] + freeze { index: ::core::primitive::u32 }, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "The index was not already assigned."] + NotAssigned, + #[codec(index = 1)] + #[doc = "The index is assigned to another account."] + NotOwner, + #[codec(index = 2)] + #[doc = "The index was not available."] + InUse, + #[codec(index = 3)] + #[doc = "The source and destination accounts are identical."] + NotTransfer, + #[codec(index = 4)] + #[doc = "The index is permanent and may not be freed/changed."] + Permanent, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub enum Event { + #[codec(index = 0)] + #[doc = "A account index was assigned."] + IndexAssigned { + who: ::subxt::utils::AccountId32, + index: ::core::primitive::u32, + }, + #[codec(index = 1)] + #[doc = "A account index has been freed up (unassigned)."] + IndexFreed { index: ::core::primitive::u32 }, + #[codec(index = 2)] + #[doc = "A account index has been frozen to its current account ID."] + IndexFrozen { + index: ::core::primitive::u32, + who: ::subxt::utils::AccountId32, + }, + } + } + } + pub mod pallet_membership { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Add a member `who` to the set."] + #[doc = ""] + #[doc = "May only be called from `T::AddOrigin`."] + add_member { + who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + }, + #[codec(index = 1)] + #[doc = "Remove a member `who` from the set."] + #[doc = ""] + #[doc = "May only be called from `T::RemoveOrigin`."] + remove_member { + who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + }, + #[codec(index = 2)] + #[doc = "Swap out one member `remove` for another `add`."] + #[doc = ""] + #[doc = "May only be called from `T::SwapOrigin`."] + #[doc = ""] + #[doc = "Prime membership is *not* passed from `remove` to `add`, if extant."] + swap_member { + remove: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + add: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + }, + #[codec(index = 3)] + #[doc = "Change the membership to a new set, disregarding the existing membership. Be nice and"] + #[doc = "pass `members` pre-sorted."] + #[doc = ""] + #[doc = "May only be called from `T::ResetOrigin`."] + reset_members { + members: ::std::vec::Vec<::subxt::utils::AccountId32>, + }, + #[codec(index = 4)] + #[doc = "Swap out the sending member for some other key `new`."] + #[doc = ""] + #[doc = "May only be called from `Signed` origin of a current member."] + #[doc = ""] + #[doc = "Prime membership is passed from the origin account to `new`, if extant."] + change_key { + new: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + }, + #[codec(index = 5)] + #[doc = "Set the prime member. Must be a current member."] + #[doc = ""] + #[doc = "May only be called from `T::PrimeOrigin`."] + set_prime { + who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + }, + #[codec(index = 6)] + #[doc = "Remove the prime member if it exists."] + #[doc = ""] + #[doc = "May only be called from `T::PrimeOrigin`."] + clear_prime, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "Already a member."] + AlreadyMember, + #[codec(index = 1)] + #[doc = "Not a member."] + NotMember, + #[codec(index = 2)] + #[doc = "Too many members."] + TooManyMembers, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub enum Event { + #[codec(index = 0)] + #[doc = "The given member was added; see the transaction for who."] + MemberAdded, + #[codec(index = 1)] + #[doc = "The given member was removed; see the transaction for who."] + MemberRemoved, + #[codec(index = 2)] + #[doc = "Two members were swapped; see the transaction for who."] + MembersSwapped, + #[codec(index = 3)] + #[doc = "The membership was reset; see the transaction for who the new set is."] + MembersReset, + #[codec(index = 4)] + #[doc = "One of the members' keys changed."] + KeyChanged, + #[codec(index = 5)] + #[doc = "Phantom member, never used."] + Dummy, + } + } + } + pub mod pallet_multisig { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Immediately dispatch a multi-signature call using a single approval from the caller."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "- `other_signatories`: The accounts (other than the sender) who are part of the"] + #[doc = "multi-signature, but do not participate in the approval process."] + #[doc = "- `call`: The call to be executed."] + #[doc = ""] + #[doc = "Result is equivalent to the dispatched result."] + #[doc = ""] + #[doc = "# "] + #[doc = "O(Z + C) where Z is the length of the call and C its execution weight."] + #[doc = "-------------------------------"] + #[doc = "- DB Weight: None"] + #[doc = "- Plus Call Weight"] + #[doc = "# "] + as_multi_threshold_1 { + other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, + call: ::std::boxed::Box, + }, + #[codec(index = 1)] + #[doc = "Register approval for a dispatch to be made from a deterministic composite account if"] + #[doc = "approved by a total of `threshold - 1` of `other_signatories`."] + #[doc = ""] + #[doc = "If there are enough, then dispatch the call."] + #[doc = ""] + #[doc = "Payment: `DepositBase` will be reserved if this is the first approval, plus"] + #[doc = "`threshold` times `DepositFactor`. It is returned once this dispatch happens or"] + #[doc = "is cancelled."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "- `threshold`: The total number of approvals for this dispatch before it is executed."] + #[doc = "- `other_signatories`: The accounts (other than the sender) who can approve this"] + #[doc = "dispatch. May not be empty."] + #[doc = "- `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is"] + #[doc = "not the first approval, then it must be `Some`, with the timepoint (block number and"] + #[doc = "transaction index) of the first approval transaction."] + #[doc = "- `call`: The call to be executed."] + #[doc = ""] + #[doc = "NOTE: Unless this is the final approval, you will generally want to use"] + #[doc = "`approve_as_multi` instead, since it only requires a hash of the call."] + #[doc = ""] + #[doc = "Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise"] + #[doc = "on success, result is `Ok` and the result from the interior call, if it was executed,"] + #[doc = "may be found in the deposited `MultisigExecuted` event."] + #[doc = ""] + #[doc = "# "] + #[doc = "- `O(S + Z + Call)`."] + #[doc = "- Up to one balance-reserve or unreserve operation."] + #[doc = "- One passthrough operation, one insert, both `O(S)` where `S` is the number of"] + #[doc = " signatories. `S` is capped by `MaxSignatories`, with weight being proportional."] + #[doc = "- One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len."] + #[doc = "- One encode & hash, both of complexity `O(S)`."] + #[doc = "- Up to one binary search and insert (`O(logS + S)`)."] + #[doc = "- I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove."] + #[doc = "- One event."] + #[doc = "- The weight of the `call`."] + #[doc = "- Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit"] + #[doc = " taken for its lifetime of `DepositBase + threshold * DepositFactor`."] + #[doc = "-------------------------------"] + #[doc = "- DB Weight:"] + #[doc = " - Reads: Multisig Storage, [Caller Account]"] + #[doc = " - Writes: Multisig Storage, [Caller Account]"] + #[doc = "- Plus Call Weight"] + #[doc = "# "] + as_multi { + threshold: ::core::primitive::u16, + other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, + maybe_timepoint: ::core::option::Option< + runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, + >, + call: ::std::boxed::Box, + max_weight: runtime_types::sp_weights::weight_v2::Weight, + }, + #[codec(index = 2)] + #[doc = "Register approval for a dispatch to be made from a deterministic composite account if"] + #[doc = "approved by a total of `threshold - 1` of `other_signatories`."] + #[doc = ""] + #[doc = "Payment: `DepositBase` will be reserved if this is the first approval, plus"] + #[doc = "`threshold` times `DepositFactor`. It is returned once this dispatch happens or"] + #[doc = "is cancelled."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "- `threshold`: The total number of approvals for this dispatch before it is executed."] + #[doc = "- `other_signatories`: The accounts (other than the sender) who can approve this"] + #[doc = "dispatch. May not be empty."] + #[doc = "- `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is"] + #[doc = "not the first approval, then it must be `Some`, with the timepoint (block number and"] + #[doc = "transaction index) of the first approval transaction."] + #[doc = "- `call_hash`: The hash of the call to be executed."] + #[doc = ""] + #[doc = "NOTE: If this is the final approval, you will want to use `as_multi` instead."] + #[doc = ""] + #[doc = "# "] + #[doc = "- `O(S)`."] + #[doc = "- Up to one balance-reserve or unreserve operation."] + #[doc = "- One passthrough operation, one insert, both `O(S)` where `S` is the number of"] + #[doc = " signatories. `S` is capped by `MaxSignatories`, with weight being proportional."] + #[doc = "- One encode & hash, both of complexity `O(S)`."] + #[doc = "- Up to one binary search and insert (`O(logS + S)`)."] + #[doc = "- I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove."] + #[doc = "- One event."] + #[doc = "- Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit"] + #[doc = " taken for its lifetime of `DepositBase + threshold * DepositFactor`."] + #[doc = "----------------------------------"] + #[doc = "- DB Weight:"] + #[doc = " - Read: Multisig Storage, [Caller Account]"] + #[doc = " - Write: Multisig Storage, [Caller Account]"] + #[doc = "# "] + approve_as_multi { + threshold: ::core::primitive::u16, + other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, + maybe_timepoint: ::core::option::Option< + runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, + >, + call_hash: [::core::primitive::u8; 32usize], + max_weight: runtime_types::sp_weights::weight_v2::Weight, + }, + #[codec(index = 3)] + #[doc = "Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously"] + #[doc = "for this operation will be unreserved on success."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "- `threshold`: The total number of approvals for this dispatch before it is executed."] + #[doc = "- `other_signatories`: The accounts (other than the sender) who can approve this"] + #[doc = "dispatch. May not be empty."] + #[doc = "- `timepoint`: The timepoint (block number and transaction index) of the first approval"] + #[doc = "transaction for this dispatch."] + #[doc = "- `call_hash`: The hash of the call to be executed."] + #[doc = ""] + #[doc = "# "] + #[doc = "- `O(S)`."] + #[doc = "- Up to one balance-reserve or unreserve operation."] + #[doc = "- One passthrough operation, one insert, both `O(S)` where `S` is the number of"] + #[doc = " signatories. `S` is capped by `MaxSignatories`, with weight being proportional."] + #[doc = "- One encode & hash, both of complexity `O(S)`."] + #[doc = "- One event."] + #[doc = "- I/O: 1 read `O(S)`, one remove."] + #[doc = "- Storage: removes one item."] + #[doc = "----------------------------------"] + #[doc = "- DB Weight:"] + #[doc = " - Read: Multisig Storage, [Caller Account], Refund Account"] + #[doc = " - Write: Multisig Storage, [Caller Account], Refund Account"] + #[doc = "# "] + cancel_as_multi { + threshold: ::core::primitive::u16, + other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, + timepoint: + runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, + call_hash: [::core::primitive::u8; 32usize], + }, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "Threshold must be 2 or greater."] + MinimumThreshold, + #[codec(index = 1)] + #[doc = "Call is already approved by this signatory."] + AlreadyApproved, + #[codec(index = 2)] + #[doc = "Call doesn't need any (more) approvals."] + NoApprovalsNeeded, + #[codec(index = 3)] + #[doc = "There are too few signatories in the list."] + TooFewSignatories, + #[codec(index = 4)] + #[doc = "There are too many signatories in the list."] + TooManySignatories, + #[codec(index = 5)] + #[doc = "The signatories were provided out of order; they should be ordered."] + SignatoriesOutOfOrder, + #[codec(index = 6)] + #[doc = "The sender was contained in the other signatories; it shouldn't be."] + SenderInSignatories, + #[codec(index = 7)] + #[doc = "Multisig operation not found when attempting to cancel."] + NotFound, + #[codec(index = 8)] + #[doc = "Only the account that originally created the multisig is able to cancel it."] + NotOwner, + #[codec(index = 9)] + #[doc = "No timepoint was given, yet the multisig operation is already underway."] + NoTimepoint, + #[codec(index = 10)] + #[doc = "A different timepoint was given to the multisig operation that is underway."] + WrongTimepoint, + #[codec(index = 11)] + #[doc = "A timepoint was given, yet no multisig operation is underway."] + UnexpectedTimepoint, + #[codec(index = 12)] + #[doc = "The maximum weight information provided was too low."] + MaxWeightTooLow, + #[codec(index = 13)] + #[doc = "The data to be stored is already stored."] + AlreadyStored, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub enum Event { + #[codec(index = 0)] + #[doc = "A new multisig operation has begun."] + NewMultisig { + approving: ::subxt::utils::AccountId32, + multisig: ::subxt::utils::AccountId32, + call_hash: [::core::primitive::u8; 32usize], + }, + #[codec(index = 1)] + #[doc = "A multisig operation has been approved by someone."] + MultisigApproval { + approving: ::subxt::utils::AccountId32, + timepoint: + runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, + multisig: ::subxt::utils::AccountId32, + call_hash: [::core::primitive::u8; 32usize], + }, + #[codec(index = 2)] + #[doc = "A multisig operation has been executed."] + MultisigExecuted { + approving: ::subxt::utils::AccountId32, + timepoint: + runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, + multisig: ::subxt::utils::AccountId32, + call_hash: [::core::primitive::u8; 32usize], + result: + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + }, + #[codec(index = 3)] + #[doc = "A multisig operation has been cancelled."] + MultisigCancelled { + cancelling: ::subxt::utils::AccountId32, + timepoint: + runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, + multisig: ::subxt::utils::AccountId32, + call_hash: [::core::primitive::u8; 32usize], + }, + } + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Multisig<_0, _1, _2> { + pub when: runtime_types::pallet_multisig::Timepoint<_0>, + pub deposit: _1, + pub depositor: _2, + pub approvals: runtime_types::sp_core::bounded::bounded_vec::BoundedVec<_2>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Timepoint<_0> { + pub height: _0, + pub index: _0, + } + } + pub mod pallet_nomination_pools { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Stake funds with a pool. The amount to bond is transferred from the member to the"] + #[doc = "pools account and immediately increases the pools bond."] + #[doc = ""] + #[doc = "# Note"] + #[doc = ""] + #[doc = "* An account can only be a member of a single pool."] + #[doc = "* An account cannot join the same pool multiple times."] + #[doc = "* This call will *not* dust the member account, so the member must have at least"] + #[doc = " `existential deposit + amount` in their account."] + #[doc = "* Only a pool with [`PoolState::Open`] can be joined"] + join { + #[codec(compact)] + amount: ::core::primitive::u128, + pool_id: ::core::primitive::u32, + }, + #[codec(index = 1)] + #[doc = "Bond `extra` more funds from `origin` into the pool to which they already belong."] + #[doc = ""] + #[doc = "Additional funds can come from either the free balance of the account, of from the"] + #[doc = "accumulated rewards, see [`BondExtra`]."] + #[doc = ""] + #[doc = "Bonding extra funds implies an automatic payout of all pending rewards as well."] + bond_extra { + extra: runtime_types::pallet_nomination_pools::BondExtra< + ::core::primitive::u128, + >, + }, + #[codec(index = 2)] + #[doc = "A bonded member can use this to claim their payout based on the rewards that the pool"] + #[doc = "has accumulated since their last claimed payout (OR since joining if this is there first"] + #[doc = "time claiming rewards). The payout will be transferred to the member's account."] + #[doc = ""] + #[doc = "The member will earn rewards pro rata based on the members stake vs the sum of the"] + #[doc = "members in the pools stake. Rewards do not \"expire\"."] + claim_payout, + #[codec(index = 3)] + #[doc = "Unbond up to `unbonding_points` of the `member_account`'s funds from the pool. It"] + #[doc = "implicitly collects the rewards one last time, since not doing so would mean some"] + #[doc = "rewards would be forfeited."] + #[doc = ""] + #[doc = "Under certain conditions, this call can be dispatched permissionlessly (i.e. by any"] + #[doc = "account)."] + #[doc = ""] + #[doc = "# Conditions for a permissionless dispatch."] + #[doc = ""] + #[doc = "* The pool is blocked and the caller is either the root or state-toggler. This is"] + #[doc = " refereed to as a kick."] + #[doc = "* The pool is destroying and the member is not the depositor."] + #[doc = "* The pool is destroying, the member is the depositor and no other members are in the"] + #[doc = " pool."] + #[doc = ""] + #[doc = "## Conditions for permissioned dispatch (i.e. the caller is also the"] + #[doc = "`member_account`):"] + #[doc = ""] + #[doc = "* The caller is not the depositor."] + #[doc = "* The caller is the depositor, the pool is destroying and no other members are in the"] + #[doc = " pool."] + #[doc = ""] + #[doc = "# Note"] + #[doc = ""] + #[doc = "If there are too many unlocking chunks to unbond with the pool account,"] + #[doc = "[`Call::pool_withdraw_unbonded`] can be called to try and minimize unlocking chunks."] + #[doc = "The [`StakingInterface::unbond`] will implicitly call [`Call::pool_withdraw_unbonded`]"] + #[doc = "to try to free chunks if necessary (ie. if unbound was called and no unlocking chunks"] + #[doc = "are available). However, it may not be possible to release the current unlocking chunks,"] + #[doc = "in which case, the result of this call will likely be the `NoMoreChunks` error from the"] + #[doc = "staking system."] + unbond { + member_account: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + #[codec(compact)] + unbonding_points: ::core::primitive::u128, + }, + #[codec(index = 4)] + #[doc = "Call `withdraw_unbonded` for the pools account. This call can be made by any account."] + #[doc = ""] + #[doc = "This is useful if their are too many unlocking chunks to call `unbond`, and some"] + #[doc = "can be cleared by withdrawing. In the case there are too many unlocking chunks, the user"] + #[doc = "would probably see an error like `NoMoreChunks` emitted from the staking system when"] + #[doc = "they attempt to unbond."] + pool_withdraw_unbonded { + pool_id: ::core::primitive::u32, + num_slashing_spans: ::core::primitive::u32, + }, + #[codec(index = 5)] + #[doc = "Withdraw unbonded funds from `member_account`. If no bonded funds can be unbonded, an"] + #[doc = "error is returned."] + #[doc = ""] + #[doc = "Under certain conditions, this call can be dispatched permissionlessly (i.e. by any"] + #[doc = "account)."] + #[doc = ""] + #[doc = "# Conditions for a permissionless dispatch"] + #[doc = ""] + #[doc = "* The pool is in destroy mode and the target is not the depositor."] + #[doc = "* The target is the depositor and they are the only member in the sub pools."] + #[doc = "* The pool is blocked and the caller is either the root or state-toggler."] + #[doc = ""] + #[doc = "# Conditions for permissioned dispatch"] + #[doc = ""] + #[doc = "* The caller is the target and they are not the depositor."] + #[doc = ""] + #[doc = "# Note"] + #[doc = ""] + #[doc = "If the target is the depositor, the pool will be destroyed."] + withdraw_unbonded { + member_account: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + num_slashing_spans: ::core::primitive::u32, + }, + #[codec(index = 6)] + #[doc = "Create a new delegation pool."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `amount` - The amount of funds to delegate to the pool. This also acts of a sort of"] + #[doc = " deposit since the pools creator cannot fully unbond funds until the pool is being"] + #[doc = " destroyed."] + #[doc = "* `index` - A disambiguation index for creating the account. Likely only useful when"] + #[doc = " creating multiple pools in the same extrinsic."] + #[doc = "* `root` - The account to set as [`PoolRoles::root`]."] + #[doc = "* `nominator` - The account to set as the [`PoolRoles::nominator`]."] + #[doc = "* `state_toggler` - The account to set as the [`PoolRoles::state_toggler`]."] + #[doc = ""] + #[doc = "# Note"] + #[doc = ""] + #[doc = "In addition to `amount`, the caller will transfer the existential deposit; so the caller"] + #[doc = "needs at have at least `amount + existential_deposit` transferrable."] + create { + #[codec(compact)] + amount: ::core::primitive::u128, + root: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + nominator: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + state_toggler: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + }, + #[codec(index = 7)] + #[doc = "Create a new delegation pool with a previously used pool id"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "same as `create` with the inclusion of"] + #[doc = "* `pool_id` - `A valid PoolId."] + create_with_pool_id { + #[codec(compact)] + amount: ::core::primitive::u128, + root: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + nominator: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + state_toggler: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + pool_id: ::core::primitive::u32, + }, + #[codec(index = 8)] + #[doc = "Nominate on behalf of the pool."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be signed by the pool nominator or the pool"] + #[doc = "root role."] + #[doc = ""] + #[doc = "This directly forward the call to the staking pallet, on behalf of the pool bonded"] + #[doc = "account."] + nominate { + pool_id: ::core::primitive::u32, + validators: ::std::vec::Vec<::subxt::utils::AccountId32>, + }, + #[codec(index = 9)] + #[doc = "Set a new state for the pool."] + #[doc = ""] + #[doc = "If a pool is already in the `Destroying` state, then under no condition can its state"] + #[doc = "change again."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be either:"] + #[doc = ""] + #[doc = "1. signed by the state toggler, or the root role of the pool,"] + #[doc = "2. if the pool conditions to be open are NOT met (as described by `ok_to_be_open`), and"] + #[doc = " then the state of the pool can be permissionlessly changed to `Destroying`."] + set_state { + pool_id: ::core::primitive::u32, + state: runtime_types::pallet_nomination_pools::PoolState, + }, + #[codec(index = 10)] + #[doc = "Set a new metadata for the pool."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be signed by the state toggler, or the root role"] + #[doc = "of the pool."] + set_metadata { + pool_id: ::core::primitive::u32, + metadata: ::std::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 11)] + #[doc = "Update configurations for the nomination pools. The origin for this call must be"] + #[doc = "Root."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `min_join_bond` - Set [`MinJoinBond`]."] + #[doc = "* `min_create_bond` - Set [`MinCreateBond`]."] + #[doc = "* `max_pools` - Set [`MaxPools`]."] + #[doc = "* `max_members` - Set [`MaxPoolMembers`]."] + #[doc = "* `max_members_per_pool` - Set [`MaxPoolMembersPerPool`]."] + set_configs { + min_join_bond: runtime_types::pallet_nomination_pools::ConfigOp< + ::core::primitive::u128, + >, + min_create_bond: runtime_types::pallet_nomination_pools::ConfigOp< + ::core::primitive::u128, + >, + max_pools: runtime_types::pallet_nomination_pools::ConfigOp< + ::core::primitive::u32, + >, + max_members: runtime_types::pallet_nomination_pools::ConfigOp< + ::core::primitive::u32, + >, + max_members_per_pool: runtime_types::pallet_nomination_pools::ConfigOp< + ::core::primitive::u32, + >, + }, + #[codec(index = 12)] + #[doc = "Update the roles of the pool."] + #[doc = ""] + #[doc = "The root is the only entity that can change any of the roles, including itself,"] + #[doc = "excluding the depositor, who can never change."] + #[doc = ""] + #[doc = "It emits an event, notifying UIs of the role change. This event is quite relevant to"] + #[doc = "most pool members and they should be informed of changes to pool roles."] + update_roles { + pool_id: ::core::primitive::u32, + new_root: runtime_types::pallet_nomination_pools::ConfigOp< + ::subxt::utils::AccountId32, + >, + new_nominator: runtime_types::pallet_nomination_pools::ConfigOp< + ::subxt::utils::AccountId32, + >, + new_state_toggler: runtime_types::pallet_nomination_pools::ConfigOp< + ::subxt::utils::AccountId32, + >, + }, + #[codec(index = 13)] + #[doc = "Chill on behalf of the pool."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be signed by the pool nominator or the pool"] + #[doc = "root role, same as [`Pallet::nominate`]."] + #[doc = ""] + #[doc = "This directly forward the call to the staking pallet, on behalf of the pool bonded"] + #[doc = "account."] + chill { pool_id: ::core::primitive::u32 }, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum DefensiveError { + #[codec(index = 0)] + NotEnoughSpaceInUnbondPool, + #[codec(index = 1)] + PoolNotFound, + #[codec(index = 2)] + RewardPoolNotFound, + #[codec(index = 3)] + SubPoolsNotFound, + #[codec(index = 4)] + BondedStashKilledPrematurely, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "A (bonded) pool id does not exist."] + PoolNotFound, + #[codec(index = 1)] + #[doc = "An account is not a member."] + PoolMemberNotFound, + #[codec(index = 2)] + #[doc = "A reward pool does not exist. In all cases this is a system logic error."] + RewardPoolNotFound, + #[codec(index = 3)] + #[doc = "A sub pool does not exist."] + SubPoolsNotFound, + #[codec(index = 4)] + #[doc = "An account is already delegating in another pool. An account may only belong to one"] + #[doc = "pool at a time."] + AccountBelongsToOtherPool, + #[codec(index = 5)] + #[doc = "The member is fully unbonded (and thus cannot access the bonded and reward pool"] + #[doc = "anymore to, for example, collect rewards)."] + FullyUnbonding, + #[codec(index = 6)] + #[doc = "The member cannot unbond further chunks due to reaching the limit."] + MaxUnbondingLimit, + #[codec(index = 7)] + #[doc = "None of the funds can be withdrawn yet because the bonding duration has not passed."] + CannotWithdrawAny, + #[codec(index = 8)] + #[doc = "The amount does not meet the minimum bond to either join or create a pool."] + #[doc = ""] + #[doc = "The depositor can never unbond to a value less than"] + #[doc = "`Pallet::depositor_min_bond`. The caller does not have nominating"] + #[doc = "permissions for the pool. Members can never unbond to a value below `MinJoinBond`."] + MinimumBondNotMet, + #[codec(index = 9)] + #[doc = "The transaction could not be executed due to overflow risk for the pool."] + OverflowRisk, + #[codec(index = 10)] + #[doc = "A pool must be in [`PoolState::Destroying`] in order for the depositor to unbond or for"] + #[doc = "other members to be permissionlessly unbonded."] + NotDestroying, + #[codec(index = 11)] + #[doc = "The caller does not have nominating permissions for the pool."] + NotNominator, + #[codec(index = 12)] + #[doc = "Either a) the caller cannot make a valid kick or b) the pool is not destroying."] + NotKickerOrDestroying, + #[codec(index = 13)] + #[doc = "The pool is not open to join"] + NotOpen, + #[codec(index = 14)] + #[doc = "The system is maxed out on pools."] + MaxPools, + #[codec(index = 15)] + #[doc = "Too many members in the pool or system."] + MaxPoolMembers, + #[codec(index = 16)] + #[doc = "The pools state cannot be changed."] + CanNotChangeState, + #[codec(index = 17)] + #[doc = "The caller does not have adequate permissions."] + DoesNotHavePermission, + #[codec(index = 18)] + #[doc = "Metadata exceeds [`Config::MaxMetadataLen`]"] + MetadataExceedsMaxLen, + #[codec(index = 19)] + #[doc = "Some error occurred that should never happen. This should be reported to the"] + #[doc = "maintainers."] + Defensive(runtime_types::pallet_nomination_pools::pallet::DefensiveError), + #[codec(index = 20)] + #[doc = "Partial unbonding now allowed permissionlessly."] + PartialUnbondNotAllowedPermissionlessly, + #[codec(index = 21)] + #[doc = "Pool id currently in use."] + PoolIdInUse, + #[codec(index = 22)] + #[doc = "Pool id provided is not correct/usable."] + InvalidPoolId, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Events of this pallet."] + pub enum Event { + #[codec(index = 0)] + #[doc = "A pool has been created."] + Created { + depositor: ::subxt::utils::AccountId32, + pool_id: ::core::primitive::u32, + }, + #[codec(index = 1)] + #[doc = "A member has became bonded in a pool."] + Bonded { + member: ::subxt::utils::AccountId32, + pool_id: ::core::primitive::u32, + bonded: ::core::primitive::u128, + joined: ::core::primitive::bool, + }, + #[codec(index = 2)] + #[doc = "A payout has been made to a member."] + PaidOut { + member: ::subxt::utils::AccountId32, + pool_id: ::core::primitive::u32, + payout: ::core::primitive::u128, + }, + #[codec(index = 3)] + #[doc = "A member has unbonded from their pool."] + #[doc = ""] + #[doc = "- `balance` is the corresponding balance of the number of points that has been"] + #[doc = " requested to be unbonded (the argument of the `unbond` transaction) from the bonded"] + #[doc = " pool."] + #[doc = "- `points` is the number of points that are issued as a result of `balance` being"] + #[doc = "dissolved into the corresponding unbonding pool."] + #[doc = "- `era` is the era in which the balance will be unbonded."] + #[doc = "In the absence of slashing, these values will match. In the presence of slashing, the"] + #[doc = "number of points that are issued in the unbonding pool will be less than the amount"] + #[doc = "requested to be unbonded."] + Unbonded { + member: ::subxt::utils::AccountId32, + pool_id: ::core::primitive::u32, + balance: ::core::primitive::u128, + points: ::core::primitive::u128, + era: ::core::primitive::u32, + }, + #[codec(index = 4)] + #[doc = "A member has withdrawn from their pool."] + #[doc = ""] + #[doc = "The given number of `points` have been dissolved in return of `balance`."] + #[doc = ""] + #[doc = "Similar to `Unbonded` event, in the absence of slashing, the ratio of point to balance"] + #[doc = "will be 1."] + Withdrawn { + member: ::subxt::utils::AccountId32, + pool_id: ::core::primitive::u32, + balance: ::core::primitive::u128, + points: ::core::primitive::u128, + }, + #[codec(index = 5)] + #[doc = "A pool has been destroyed."] + Destroyed { pool_id: ::core::primitive::u32 }, + #[codec(index = 6)] + #[doc = "The state of a pool has changed"] + StateChanged { + pool_id: ::core::primitive::u32, + new_state: runtime_types::pallet_nomination_pools::PoolState, + }, + #[codec(index = 7)] + #[doc = "A member has been removed from a pool."] + #[doc = ""] + #[doc = "The removal can be voluntary (withdrawn all unbonded funds) or involuntary (kicked)."] + MemberRemoved { + pool_id: ::core::primitive::u32, + member: ::subxt::utils::AccountId32, + }, + #[codec(index = 8)] + #[doc = "The roles of a pool have been updated to the given new roles. Note that the depositor"] + #[doc = "can never change."] + RolesUpdated { + root: ::core::option::Option<::subxt::utils::AccountId32>, + state_toggler: ::core::option::Option<::subxt::utils::AccountId32>, + nominator: ::core::option::Option<::subxt::utils::AccountId32>, + }, + #[codec(index = 9)] + #[doc = "The active balance of pool `pool_id` has been slashed to `balance`."] + PoolSlashed { + pool_id: ::core::primitive::u32, + balance: ::core::primitive::u128, + }, + #[codec(index = 10)] + #[doc = "The unbond pool at `era` of pool `pool_id` has been slashed to `balance`."] + UnbondingPoolSlashed { + pool_id: ::core::primitive::u32, + era: ::core::primitive::u32, + balance: ::core::primitive::u128, + }, + } + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum BondExtra<_0> { + #[codec(index = 0)] + FreeBalance(_0), + #[codec(index = 1)] + Rewards, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct BondedPoolInner { + pub points: ::core::primitive::u128, + pub state: runtime_types::pallet_nomination_pools::PoolState, + pub member_counter: ::core::primitive::u32, + pub roles: + runtime_types::pallet_nomination_pools::PoolRoles<::subxt::utils::AccountId32>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum ConfigOp<_0> { + #[codec(index = 0)] + Noop, + #[codec(index = 1)] + Set(_0), + #[codec(index = 2)] + Remove, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct PoolMember { + pub pool_id: ::core::primitive::u32, + pub points: ::core::primitive::u128, + pub last_recorded_reward_counter: + runtime_types::sp_arithmetic::fixed_point::FixedU128, + pub unbonding_eras: + runtime_types::sp_core::bounded::bounded_btree_map::BoundedBTreeMap< + ::core::primitive::u32, + ::core::primitive::u128, + >, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct PoolRoles<_0> { + pub depositor: _0, + pub root: ::core::option::Option<_0>, + pub nominator: ::core::option::Option<_0>, + pub state_toggler: ::core::option::Option<_0>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum PoolState { + #[codec(index = 0)] + Open, + #[codec(index = 1)] + Blocked, + #[codec(index = 2)] + Destroying, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct RewardPool { + pub last_recorded_reward_counter: + runtime_types::sp_arithmetic::fixed_point::FixedU128, + pub last_recorded_total_payouts: ::core::primitive::u128, + pub total_rewards_claimed: ::core::primitive::u128, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SubPools { + pub no_era: runtime_types::pallet_nomination_pools::UnbondPool, + pub with_era: runtime_types::sp_core::bounded::bounded_btree_map::BoundedBTreeMap< + ::core::primitive::u32, + runtime_types::pallet_nomination_pools::UnbondPool, + >, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct UnbondPool { + pub points: ::core::primitive::u128, + pub balance: ::core::primitive::u128, + } + } + pub mod pallet_offences { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Events type."] + pub enum Event { + #[codec(index = 0)] + #[doc = "There is an offence reported of the given `kind` happened at the `session_index` and"] + #[doc = "(kind-specific) time slot. This event is not deposited for duplicate slashes."] + #[doc = "\\[kind, timeslot\\]."] + Offence { + kind: [::core::primitive::u8; 16usize], + timeslot: ::std::vec::Vec<::core::primitive::u8>, + }, + } + } + } + pub mod pallet_preimage { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "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."] + note_preimage { + bytes: ::std::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 1)] + #[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`."] + unnote_preimage { hash: ::subxt::utils::H256 }, + #[codec(index = 2)] + #[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."] + request_preimage { hash: ::subxt::utils::H256 }, + #[codec(index = 3)] + #[doc = "Clear a previously made request for a preimage."] + #[doc = ""] + #[doc = "NOTE: THIS MUST NOT BE CALLED ON `hash` MORE TIMES THAN `request_preimage`."] + unrequest_preimage { hash: ::subxt::utils::H256 }, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "Preimage is too large to store on-chain."] + TooBig, + #[codec(index = 1)] + #[doc = "Preimage has already been noted on-chain."] + AlreadyNoted, + #[codec(index = 2)] + #[doc = "The user is not authorized to perform this action."] + NotAuthorized, + #[codec(index = 3)] + #[doc = "The preimage cannot be removed since it has not yet been noted."] + NotNoted, + #[codec(index = 4)] + #[doc = "A preimage may not be removed when there are outstanding requests."] + Requested, + #[codec(index = 5)] + #[doc = "The preimage request cannot be removed since no outstanding requests exist."] + NotRequested, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub enum Event { + #[codec(index = 0)] + #[doc = "A preimage has been noted."] + Noted { hash: ::subxt::utils::H256 }, + #[codec(index = 1)] + #[doc = "A preimage has been requested."] + Requested { hash: ::subxt::utils::H256 }, + #[codec(index = 2)] + #[doc = "A preimage has ben cleared."] + Cleared { hash: ::subxt::utils::H256 }, + } + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum RequestStatus<_0, _1> { + #[codec(index = 0)] + Unrequested { + deposit: (_0, _1), + len: ::core::primitive::u32, + }, + #[codec(index = 1)] + Requested { + deposit: ::core::option::Option<(_0, _1)>, + count: ::core::primitive::u32, + len: ::core::option::Option<::core::primitive::u32>, + }, + } + } + pub mod pallet_scheduler { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Anonymously schedule a task."] + schedule { + when: ::core::primitive::u32, + maybe_periodic: ::core::option::Option<( + ::core::primitive::u32, + ::core::primitive::u32, + )>, + priority: ::core::primitive::u8, + call: ::std::boxed::Box, + }, + #[codec(index = 1)] + #[doc = "Cancel an anonymously scheduled task."] + cancel { + when: ::core::primitive::u32, + index: ::core::primitive::u32, + }, + #[codec(index = 2)] + #[doc = "Schedule a named task."] + schedule_named { + id: [::core::primitive::u8; 32usize], + when: ::core::primitive::u32, + maybe_periodic: ::core::option::Option<( + ::core::primitive::u32, + ::core::primitive::u32, + )>, + priority: ::core::primitive::u8, + call: ::std::boxed::Box, + }, + #[codec(index = 3)] + #[doc = "Cancel a named scheduled task."] + cancel_named { + id: [::core::primitive::u8; 32usize], + }, + #[codec(index = 4)] + #[doc = "Anonymously schedule a task after a delay."] + #[doc = ""] + #[doc = "# "] + #[doc = "Same as [`schedule`]."] + #[doc = "# "] + schedule_after { + after: ::core::primitive::u32, + maybe_periodic: ::core::option::Option<( + ::core::primitive::u32, + ::core::primitive::u32, + )>, + priority: ::core::primitive::u8, + call: ::std::boxed::Box, + }, + #[codec(index = 5)] + #[doc = "Schedule a named task after a delay."] + #[doc = ""] + #[doc = "# "] + #[doc = "Same as [`schedule_named`](Self::schedule_named)."] + #[doc = "# "] + schedule_named_after { + id: [::core::primitive::u8; 32usize], + after: ::core::primitive::u32, + maybe_periodic: ::core::option::Option<( + ::core::primitive::u32, + ::core::primitive::u32, + )>, + priority: ::core::primitive::u8, + call: ::std::boxed::Box, + }, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "Failed to schedule a call"] + FailedToSchedule, + #[codec(index = 1)] + #[doc = "Cannot find the scheduled call."] + NotFound, + #[codec(index = 2)] + #[doc = "Given target block number is in the past."] + TargetBlockNumberInPast, + #[codec(index = 3)] + #[doc = "Reschedule failed because it does not change scheduled time."] + RescheduleNoChange, + #[codec(index = 4)] + #[doc = "Attempt to use a non-named function on a named task."] + Named, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Events type."] + pub enum Event { + #[codec(index = 0)] + #[doc = "Scheduled some task."] + Scheduled { + when: ::core::primitive::u32, + index: ::core::primitive::u32, + }, + #[codec(index = 1)] + #[doc = "Canceled some task."] + Canceled { + when: ::core::primitive::u32, + index: ::core::primitive::u32, + }, + #[codec(index = 2)] + #[doc = "Dispatched some task."] + Dispatched { + task: (::core::primitive::u32, ::core::primitive::u32), + id: ::core::option::Option<[::core::primitive::u8; 32usize]>, + result: + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + }, + #[codec(index = 3)] + #[doc = "The call for the provided hash was not found so the task has been aborted."] + CallUnavailable { + task: (::core::primitive::u32, ::core::primitive::u32), + id: ::core::option::Option<[::core::primitive::u8; 32usize]>, + }, + #[codec(index = 4)] + #[doc = "The given task was unable to be renewed since the agenda is full at that block."] + PeriodicFailed { + task: (::core::primitive::u32, ::core::primitive::u32), + id: ::core::option::Option<[::core::primitive::u8; 32usize]>, + }, + #[codec(index = 5)] + #[doc = "The given task can never be executed since it is overweight."] + PermanentlyOverweight { + task: (::core::primitive::u32, ::core::primitive::u32), + id: ::core::option::Option<[::core::primitive::u8; 32usize]>, + }, + } + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Scheduled<_0, _1, _2, _3, _4> { + pub maybe_id: ::core::option::Option<_0>, + pub priority: ::core::primitive::u8, + pub call: _1, + pub maybe_periodic: ::core::option::Option<(_2, _2)>, + pub origin: _3, + #[codec(skip)] + pub __subxt_unused_type_params: ::core::marker::PhantomData<_4>, + } + } + pub mod pallet_session { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Sets the session key(s) of the function caller to `keys`."] + #[doc = "Allows an account to set its session key prior to becoming a validator."] + #[doc = "This doesn't take effect until the next session."] + #[doc = ""] + #[doc = "The dispatch origin of this function must be signed."] + #[doc = ""] + #[doc = "# "] + #[doc = "- Complexity: `O(1)`. Actual cost depends on the number of length of"] + #[doc = " `T::Keys::key_ids()` which is fixed."] + #[doc = "- DbReads: `origin account`, `T::ValidatorIdOf`, `NextKeys`"] + #[doc = "- DbWrites: `origin account`, `NextKeys`"] + #[doc = "- DbReads per key id: `KeyOwner`"] + #[doc = "- DbWrites per key id: `KeyOwner`"] + #[doc = "# "] + set_keys { + keys: runtime_types::da_runtime::primitives::SessionKeys, + proof: ::std::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 1)] + #[doc = "Removes any session key(s) of the function caller."] + #[doc = ""] + #[doc = "This doesn't take effect until the next session."] + #[doc = ""] + #[doc = "The dispatch origin of this function must be Signed and the account must be either be"] + #[doc = "convertible to a validator ID using the chain's typical addressing system (this usually"] + #[doc = "means being a controller account) or directly convertible into a validator ID (which"] + #[doc = "usually means being a stash account)."] + #[doc = ""] + #[doc = "# "] + #[doc = "- Complexity: `O(1)` in number of key types. Actual cost depends on the number of length"] + #[doc = " of `T::Keys::key_ids()` which is fixed."] + #[doc = "- DbReads: `T::ValidatorIdOf`, `NextKeys`, `origin account`"] + #[doc = "- DbWrites: `NextKeys`, `origin account`"] + #[doc = "- DbWrites per key id: `KeyOwner`"] + #[doc = "# "] + purge_keys, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Error for the session pallet."] + pub enum Error { + #[codec(index = 0)] + #[doc = "Invalid ownership proof."] + InvalidProof, + #[codec(index = 1)] + #[doc = "No associated validator ID for account."] + NoAssociatedValidatorId, + #[codec(index = 2)] + #[doc = "Registered duplicate key."] + DuplicatedKey, + #[codec(index = 3)] + #[doc = "No keys are associated with this account."] + NoKeys, + #[codec(index = 4)] + #[doc = "Key setting account is not live, so it's impossible to associate keys."] + NoAccount, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub enum Event { + #[codec(index = 0)] + #[doc = "New session has happened. Note that the argument is the session index, not the"] + #[doc = "block number as the type might suggest."] + NewSession { + session_index: ::core::primitive::u32, + }, + } + } + } + pub mod pallet_staking { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Take the origin account as a stash and lock up `value` of its balance. `controller` will"] + #[doc = "be the account that controls it."] + #[doc = ""] + #[doc = "`value` must be more than the `minimum_balance` specified by `T::Currency`."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ by the stash account."] + #[doc = ""] + #[doc = "Emits `Bonded`."] + #[doc = "# "] + #[doc = "- Independent of the arguments. Moderate complexity."] + #[doc = "- O(1)."] + #[doc = "- Three extra DB entries."] + #[doc = ""] + #[doc = "NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned"] + #[doc = "unless the `origin` falls below _existential deposit_ and gets removed as dust."] + #[doc = "------------------"] + #[doc = "# "] + bond { + controller: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + #[codec(compact)] + value: ::core::primitive::u128, + payee: runtime_types::pallet_staking::RewardDestination< + ::subxt::utils::AccountId32, + >, + }, + #[codec(index = 1)] + #[doc = "Add some extra amount that have appeared in the stash `free_balance` into the balance up"] + #[doc = "for staking."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ by the stash, not the controller."] + #[doc = ""] + #[doc = "Use this if there are additional funds in your stash account that you wish to bond."] + #[doc = "Unlike [`bond`](Self::bond) or [`unbond`](Self::unbond) this function does not impose"] + #[doc = "any limitation on the amount that can be added."] + #[doc = ""] + #[doc = "Emits `Bonded`."] + #[doc = ""] + #[doc = "# "] + #[doc = "- Independent of the arguments. Insignificant complexity."] + #[doc = "- O(1)."] + #[doc = "# "] + bond_extra { + #[codec(compact)] + max_additional: ::core::primitive::u128, + }, + #[codec(index = 2)] + #[doc = "Schedule a portion of the stash to be unlocked ready for transfer out after the bond"] + #[doc = "period ends. If this leaves an amount actively bonded less than"] + #[doc = "T::Currency::minimum_balance(), then it is increased to the full amount."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ by the controller, not the stash."] + #[doc = ""] + #[doc = "Once the unlock period is done, you can call `withdraw_unbonded` to actually move"] + #[doc = "the funds out of management ready for transfer."] + #[doc = ""] + #[doc = "No more than a limited number of unlocking chunks (see `MaxUnlockingChunks`)"] + #[doc = "can co-exists at the same time. If there are no unlocking chunks slots available"] + #[doc = "[`Call::withdraw_unbonded`] is called to remove some of the chunks (if possible)."] + #[doc = ""] + #[doc = "If a user encounters the `InsufficientBond` error when calling this extrinsic,"] + #[doc = "they should call `chill` first in order to free up their bonded funds."] + #[doc = ""] + #[doc = "Emits `Unbonded`."] + #[doc = ""] + #[doc = "See also [`Call::withdraw_unbonded`]."] + unbond { + #[codec(compact)] + value: ::core::primitive::u128, + }, + #[codec(index = 3)] + #[doc = "Remove any unlocked chunks from the `unlocking` queue from our management."] + #[doc = ""] + #[doc = "This essentially frees up that balance to be used by the stash account to do"] + #[doc = "whatever it wants."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ by the controller."] + #[doc = ""] + #[doc = "Emits `Withdrawn`."] + #[doc = ""] + #[doc = "See also [`Call::unbond`]."] + #[doc = ""] + #[doc = "# "] + #[doc = "Complexity O(S) where S is the number of slashing spans to remove"] + #[doc = "NOTE: Weight annotation is the kill scenario, we refund otherwise."] + #[doc = "# "] + withdraw_unbonded { + num_slashing_spans: ::core::primitive::u32, + }, + #[codec(index = 4)] + #[doc = "Declare the desire to validate for the origin controller."] + #[doc = ""] + #[doc = "Effects will be felt at the beginning of the next era."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ by the controller, not the stash."] + validate { + prefs: runtime_types::pallet_staking::ValidatorPrefs, + }, + #[codec(index = 5)] + #[doc = "Declare the desire to nominate `targets` for the origin controller."] + #[doc = ""] + #[doc = "Effects will be felt at the beginning of the next era."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ by the controller, not the stash."] + #[doc = ""] + #[doc = "# "] + #[doc = "- The transaction's complexity is proportional to the size of `targets` (N)"] + #[doc = "which is capped at CompactAssignments::LIMIT (T::MaxNominations)."] + #[doc = "- Both the reads and writes follow a similar pattern."] + #[doc = "# "] + nominate { + targets: ::std::vec::Vec< + ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + >, + }, + #[codec(index = 6)] + #[doc = "Declare no desire to either validate or nominate."] + #[doc = ""] + #[doc = "Effects will be felt at the beginning of the next era."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ by the controller, not the stash."] + #[doc = ""] + #[doc = "# "] + #[doc = "- Independent of the arguments. Insignificant complexity."] + #[doc = "- Contains one read."] + #[doc = "- Writes are limited to the `origin` account key."] + #[doc = "# "] + chill, + #[codec(index = 7)] + #[doc = "(Re-)set the payment target for a controller."] + #[doc = ""] + #[doc = "Effects will be felt instantly (as soon as this function is completed successfully)."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ by the controller, not the stash."] + #[doc = ""] + #[doc = "# "] + #[doc = "- Independent of the arguments. Insignificant complexity."] + #[doc = "- Contains a limited number of reads."] + #[doc = "- Writes are limited to the `origin` account key."] + #[doc = "---------"] + #[doc = "- Weight: O(1)"] + #[doc = "- DB Weight:"] + #[doc = " - Read: Ledger"] + #[doc = " - Write: Payee"] + #[doc = "# "] + set_payee { + payee: runtime_types::pallet_staking::RewardDestination< + ::subxt::utils::AccountId32, + >, + }, + #[codec(index = 8)] + #[doc = "(Re-)set the controller of a stash."] + #[doc = ""] + #[doc = "Effects will be felt instantly (as soon as this function is completed successfully)."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ by the stash, not the controller."] + #[doc = ""] + #[doc = "# "] + #[doc = "- Independent of the arguments. Insignificant complexity."] + #[doc = "- Contains a limited number of reads."] + #[doc = "- Writes are limited to the `origin` account key."] + #[doc = "----------"] + #[doc = "Weight: O(1)"] + #[doc = "DB Weight:"] + #[doc = "- Read: Bonded, Ledger New Controller, Ledger Old Controller"] + #[doc = "- Write: Bonded, Ledger New Controller, Ledger Old Controller"] + #[doc = "# "] + set_controller { + controller: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + }, + #[codec(index = 9)] + #[doc = "Sets the ideal number of validators."] + #[doc = ""] + #[doc = "The dispatch origin must be Root."] + #[doc = ""] + #[doc = "# "] + #[doc = "Weight: O(1)"] + #[doc = "Write: Validator Count"] + #[doc = "# "] + set_validator_count { + #[codec(compact)] + new: ::core::primitive::u32, + }, + #[codec(index = 10)] + #[doc = "Increments the ideal number of validators upto maximum of"] + #[doc = "`ElectionProviderBase::MaxWinners`."] + #[doc = ""] + #[doc = "The dispatch origin must be Root."] + #[doc = ""] + #[doc = "# "] + #[doc = "Same as [`Self::set_validator_count`]."] + #[doc = "# "] + increase_validator_count { + #[codec(compact)] + additional: ::core::primitive::u32, + }, + #[codec(index = 11)] + #[doc = "Scale up the ideal number of validators by a factor upto maximum of"] + #[doc = "`ElectionProviderBase::MaxWinners`."] + #[doc = ""] + #[doc = "The dispatch origin must be Root."] + #[doc = ""] + #[doc = "# "] + #[doc = "Same as [`Self::set_validator_count`]."] + #[doc = "# "] + scale_validator_count { + factor: runtime_types::sp_arithmetic::per_things::Percent, + }, + #[codec(index = 12)] + #[doc = "Force there to be no new eras indefinitely."] + #[doc = ""] + #[doc = "The dispatch origin must be Root."] + #[doc = ""] + #[doc = "# Warning"] + #[doc = ""] + #[doc = "The election process starts multiple blocks before the end of the era."] + #[doc = "Thus the election process may be ongoing when this is called. In this case the"] + #[doc = "election will continue until the next era is triggered."] + #[doc = ""] + #[doc = "# "] + #[doc = "- No arguments."] + #[doc = "- Weight: O(1)"] + #[doc = "- Write: ForceEra"] + #[doc = "# "] + force_no_eras, + #[codec(index = 13)] + #[doc = "Force there to be a new era at the end of the next session. After this, it will be"] + #[doc = "reset to normal (non-forced) behaviour."] + #[doc = ""] + #[doc = "The dispatch origin must be Root."] + #[doc = ""] + #[doc = "# Warning"] + #[doc = ""] + #[doc = "The election process starts multiple blocks before the end of the era."] + #[doc = "If this is called just before a new era is triggered, the election process may not"] + #[doc = "have enough blocks to get a result."] + #[doc = ""] + #[doc = "# "] + #[doc = "- No arguments."] + #[doc = "- Weight: O(1)"] + #[doc = "- Write ForceEra"] + #[doc = "# "] + force_new_era, + #[codec(index = 14)] + #[doc = "Set the validators who cannot be slashed (if any)."] + #[doc = ""] + #[doc = "The dispatch origin must be Root."] + set_invulnerables { + invulnerables: ::std::vec::Vec<::subxt::utils::AccountId32>, + }, + #[codec(index = 15)] + #[doc = "Force a current staker to become completely unstaked, immediately."] + #[doc = ""] + #[doc = "The dispatch origin must be Root."] + force_unstake { + stash: ::subxt::utils::AccountId32, + num_slashing_spans: ::core::primitive::u32, + }, + #[codec(index = 16)] + #[doc = "Force there to be a new era at the end of sessions indefinitely."] + #[doc = ""] + #[doc = "The dispatch origin must be Root."] + #[doc = ""] + #[doc = "# Warning"] + #[doc = ""] + #[doc = "The election process starts multiple blocks before the end of the era."] + #[doc = "If this is called just before a new era is triggered, the election process may not"] + #[doc = "have enough blocks to get a result."] + force_new_era_always, + #[codec(index = 17)] + #[doc = "Cancel enactment of a deferred slash."] + #[doc = ""] + #[doc = "Can be called by the `T::AdminOrigin`."] + #[doc = ""] + #[doc = "Parameters: era and indices of the slashes for that era to kill."] + cancel_deferred_slash { + era: ::core::primitive::u32, + slash_indices: ::std::vec::Vec<::core::primitive::u32>, + }, + #[codec(index = 18)] + #[doc = "Pay out all the stakers behind a single validator for a single era."] + #[doc = ""] + #[doc = "- `validator_stash` is the stash account of the validator. Their nominators, up to"] + #[doc = " `T::MaxNominatorRewardedPerValidator`, will also receive their rewards."] + #[doc = "- `era` may be any era between `[current_era - history_depth; current_era]`."] + #[doc = ""] + #[doc = "The origin of this call must be _Signed_. Any account can call this function, even if"] + #[doc = "it is not one of the stakers."] + #[doc = ""] + #[doc = "# "] + #[doc = "- Time complexity: at most O(MaxNominatorRewardedPerValidator)."] + #[doc = "- Contains a limited number of reads and writes."] + #[doc = "-----------"] + #[doc = "N is the Number of payouts for the validator (including the validator)"] + #[doc = "Weight:"] + #[doc = "- Reward Destination Staked: O(N)"] + #[doc = "- Reward Destination Controller (Creating): O(N)"] + #[doc = ""] + #[doc = " NOTE: weights are assuming that payouts are made to alive stash account (Staked)."] + #[doc = " Paying even a dead controller is cheaper weight-wise. We don't do any refunds here."] + #[doc = "# "] + payout_stakers { + validator_stash: ::subxt::utils::AccountId32, + era: ::core::primitive::u32, + }, + #[codec(index = 19)] + #[doc = "Rebond a portion of the stash scheduled to be unlocked."] + #[doc = ""] + #[doc = "The dispatch origin must be signed by the controller."] + #[doc = ""] + #[doc = "# "] + #[doc = "- Time complexity: O(L), where L is unlocking chunks"] + #[doc = "- Bounded by `MaxUnlockingChunks`."] + #[doc = "- Storage changes: Can't increase storage, only decrease it."] + #[doc = "# "] + rebond { + #[codec(compact)] + value: ::core::primitive::u128, + }, + #[codec(index = 20)] + #[doc = "Remove all data structures concerning a staker/stash once it is at a state where it can"] + #[doc = "be considered `dust` in the staking system. The requirements are:"] + #[doc = ""] + #[doc = "1. the `total_balance` of the stash is below existential deposit."] + #[doc = "2. or, the `ledger.total` of the stash is below existential deposit."] + #[doc = ""] + #[doc = "The former can happen in cases like a slash; the latter when a fully unbonded account"] + #[doc = "is still receiving staking rewards in `RewardDestination::Staked`."] + #[doc = ""] + #[doc = "It can be called by anyone, as long as `stash` meets the above requirements."] + #[doc = ""] + #[doc = "Refunds the transaction fees upon successful execution."] + reap_stash { + stash: ::subxt::utils::AccountId32, + num_slashing_spans: ::core::primitive::u32, + }, + #[codec(index = 21)] + #[doc = "Remove the given nominations from the calling validator."] + #[doc = ""] + #[doc = "Effects will be felt at the beginning of the next era."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ by the controller, not the stash."] + #[doc = ""] + #[doc = "- `who`: A list of nominator stash accounts who are nominating this validator which"] + #[doc = " should no longer be nominating this validator."] + #[doc = ""] + #[doc = "Note: Making this call only makes sense if you first set the validator preferences to"] + #[doc = "block any further nominations."] + kick { + who: ::std::vec::Vec< + ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + >, + }, + #[codec(index = 22)] + #[doc = "Update the various staking configurations ."] + #[doc = ""] + #[doc = "* `min_nominator_bond`: The minimum active bond needed to be a nominator."] + #[doc = "* `min_validator_bond`: The minimum active bond needed to be a validator."] + #[doc = "* `max_nominator_count`: The max number of users who can be a nominator at once. When"] + #[doc = " set to `None`, no limit is enforced."] + #[doc = "* `max_validator_count`: The max number of users who can be a validator at once. When"] + #[doc = " set to `None`, no limit is enforced."] + #[doc = "* `chill_threshold`: The ratio of `max_nominator_count` or `max_validator_count` which"] + #[doc = " should be filled in order for the `chill_other` transaction to work."] + #[doc = "* `min_commission`: The minimum amount of commission that each validators must maintain."] + #[doc = " This is checked only upon calling `validate`. Existing validators are not affected."] + #[doc = ""] + #[doc = "RuntimeOrigin must be Root to call this function."] + #[doc = ""] + #[doc = "NOTE: Existing nominators and validators will not be affected by this update."] + #[doc = "to kick people under the new limits, `chill_other` should be called."] + set_staking_configs { + min_nominator_bond: + runtime_types::pallet_staking::pallet::pallet::ConfigOp< + ::core::primitive::u128, + >, + min_validator_bond: + runtime_types::pallet_staking::pallet::pallet::ConfigOp< + ::core::primitive::u128, + >, + max_nominator_count: + runtime_types::pallet_staking::pallet::pallet::ConfigOp< + ::core::primitive::u32, + >, + max_validator_count: + runtime_types::pallet_staking::pallet::pallet::ConfigOp< + ::core::primitive::u32, + >, + chill_threshold: + runtime_types::pallet_staking::pallet::pallet::ConfigOp< + runtime_types::sp_arithmetic::per_things::Percent, + >, + min_commission: runtime_types::pallet_staking::pallet::pallet::ConfigOp< + runtime_types::sp_arithmetic::per_things::Perbill, + >, + }, + #[codec(index = 23)] + #[doc = "Declare a `controller` to stop participating as either a validator or nominator."] + #[doc = ""] + #[doc = "Effects will be felt at the beginning of the next era."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_, but can be called by anyone."] + #[doc = ""] + #[doc = "If the caller is the same as the controller being targeted, then no further checks are"] + #[doc = "enforced, and this function behaves just like `chill`."] + #[doc = ""] + #[doc = "If the caller is different than the controller being targeted, the following conditions"] + #[doc = "must be met:"] + #[doc = ""] + #[doc = "* `controller` must belong to a nominator who has become non-decodable,"] + #[doc = ""] + #[doc = "Or:"] + #[doc = ""] + #[doc = "* A `ChillThreshold` must be set and checked which defines how close to the max"] + #[doc = " nominators or validators we must reach before users can start chilling one-another."] + #[doc = "* A `MaxNominatorCount` and `MaxValidatorCount` must be set which is used to determine"] + #[doc = " how close we are to the threshold."] + #[doc = "* A `MinNominatorBond` and `MinValidatorBond` must be set and checked, which determines"] + #[doc = " if this is a person that should be chilled because they have not met the threshold"] + #[doc = " bond required."] + #[doc = ""] + #[doc = "This can be helpful if bond requirements are updated, and we need to remove old users"] + #[doc = "who do not satisfy these requirements."] + chill_other { + controller: ::subxt::utils::AccountId32, + }, + #[codec(index = 24)] + #[doc = "Force a validator to have at least the minimum commission. This will not affect a"] + #[doc = "validator who already has a commission greater than or equal to the minimum. Any account"] + #[doc = "can call this."] + force_apply_min_commission { + validator_stash: ::subxt::utils::AccountId32, + }, + #[codec(index = 25)] + #[doc = "Sets the minimum amount of commission that each validators must maintain."] + #[doc = ""] + #[doc = "This call has lower privilege requirements than `set_staking_config` and can be called"] + #[doc = "by the `T::AdminOrigin`. Root can always call this."] + set_min_commission { + new: runtime_types::sp_arithmetic::per_things::Perbill, + }, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum ConfigOp<_0> { + #[codec(index = 0)] + Noop, + #[codec(index = 1)] + Set(_0), + #[codec(index = 2)] + Remove, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "Not a controller account."] + NotController, + #[codec(index = 1)] + #[doc = "Not a stash account."] + NotStash, + #[codec(index = 2)] + #[doc = "Stash is already bonded."] + AlreadyBonded, + #[codec(index = 3)] + #[doc = "Controller is already paired."] + AlreadyPaired, + #[codec(index = 4)] + #[doc = "Targets cannot be empty."] + EmptyTargets, + #[codec(index = 5)] + #[doc = "Duplicate index."] + DuplicateIndex, + #[codec(index = 6)] + #[doc = "Slash record index out of bounds."] + InvalidSlashIndex, + #[codec(index = 7)] + #[doc = "Cannot have a validator or nominator role, with value less than the minimum defined by"] + #[doc = "governance (see `MinValidatorBond` and `MinNominatorBond`). If unbonding is the"] + #[doc = "intention, `chill` first to remove one's role as validator/nominator."] + InsufficientBond, + #[codec(index = 8)] + #[doc = "Can not schedule more unlock chunks."] + NoMoreChunks, + #[codec(index = 9)] + #[doc = "Can not rebond without unlocking chunks."] + NoUnlockChunk, + #[codec(index = 10)] + #[doc = "Attempting to target a stash that still has funds."] + FundedTarget, + #[codec(index = 11)] + #[doc = "Invalid era to reward."] + InvalidEraToReward, + #[codec(index = 12)] + #[doc = "Invalid number of nominations."] + InvalidNumberOfNominations, + #[codec(index = 13)] + #[doc = "Items are not sorted and unique."] + NotSortedAndUnique, + #[codec(index = 14)] + #[doc = "Rewards for this era have already been claimed for this validator."] + AlreadyClaimed, + #[codec(index = 15)] + #[doc = "Incorrect previous history depth input provided."] + IncorrectHistoryDepth, + #[codec(index = 16)] + #[doc = "Incorrect number of slashing spans provided."] + IncorrectSlashingSpans, + #[codec(index = 17)] + #[doc = "Internal state has become somehow corrupted and the operation cannot continue."] + BadState, + #[codec(index = 18)] + #[doc = "Too many nomination targets supplied."] + TooManyTargets, + #[codec(index = 19)] + #[doc = "A nomination target was supplied that was blocked or otherwise not a validator."] + BadTarget, + #[codec(index = 20)] + #[doc = "The user has enough bond and thus cannot be chilled forcefully by an external person."] + CannotChillOther, + #[codec(index = 21)] + #[doc = "There are too many nominators in the system. Governance needs to adjust the staking"] + #[doc = "settings to keep things safe for the runtime."] + TooManyNominators, + #[codec(index = 22)] + #[doc = "There are too many validator candidates in the system. Governance needs to adjust the"] + #[doc = "staking settings to keep things safe for the runtime."] + TooManyValidators, + #[codec(index = 23)] + #[doc = "Commission is too low. Must be at least `MinCommission`."] + CommissionTooLow, + #[codec(index = 24)] + #[doc = "Some bound is not met."] + BoundNotMet, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub enum Event { + #[codec(index = 0)] + #[doc = "The era payout has been set; the first balance is the validator-payout; the second is"] + #[doc = "the remainder from the maximum amount of reward."] + EraPaid { + era_index: ::core::primitive::u32, + validator_payout: ::core::primitive::u128, + remainder: ::core::primitive::u128, + }, + #[codec(index = 1)] + #[doc = "The nominator has been rewarded by this amount."] + Rewarded { + stash: ::subxt::utils::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 2)] + #[doc = "A staker (validator or nominator) has been slashed by the given amount."] + Slashed { + staker: ::subxt::utils::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 3)] + #[doc = "A slash for the given validator, for the given percentage of their stake, at the given"] + #[doc = "era as been reported."] + SlashReported { + validator: ::subxt::utils::AccountId32, + fraction: runtime_types::sp_arithmetic::per_things::Perbill, + slash_era: ::core::primitive::u32, + }, + #[codec(index = 4)] + #[doc = "An old slashing report from a prior era was discarded because it could"] + #[doc = "not be processed."] + OldSlashingReportDiscarded { + session_index: ::core::primitive::u32, + }, + #[codec(index = 5)] + #[doc = "A new set of stakers was elected."] + StakersElected, + #[codec(index = 6)] + #[doc = "An account has bonded this amount. \\[stash, amount\\]"] + #[doc = ""] + #[doc = "NOTE: This event is only emitted when funds are bonded via a dispatchable. Notably,"] + #[doc = "it will not be emitted for staking rewards when they are added to stake."] + Bonded { + stash: ::subxt::utils::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 7)] + #[doc = "An account has unbonded this amount."] + Unbonded { + stash: ::subxt::utils::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 8)] + #[doc = "An account has called `withdraw_unbonded` and removed unbonding chunks worth `Balance`"] + #[doc = "from the unlocking queue."] + Withdrawn { + stash: ::subxt::utils::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 9)] + #[doc = "A nominator has been kicked from a validator."] + Kicked { + nominator: ::subxt::utils::AccountId32, + stash: ::subxt::utils::AccountId32, + }, + #[codec(index = 10)] + #[doc = "The election failed. No new era is planned."] + StakingElectionFailed, + #[codec(index = 11)] + #[doc = "An account has stopped participating as either a validator or nominator."] + Chilled { stash: ::subxt::utils::AccountId32 }, + #[codec(index = 12)] + #[doc = "The stakers' rewards are getting paid."] + PayoutStarted { + era_index: ::core::primitive::u32, + validator_stash: ::subxt::utils::AccountId32, + }, + #[codec(index = 13)] + #[doc = "A validator has set their preferences."] + ValidatorPrefsSet { + stash: ::subxt::utils::AccountId32, + prefs: runtime_types::pallet_staking::ValidatorPrefs, + }, + #[codec(index = 14)] + #[doc = "A new force era mode was set."] + ForceEra { + mode: runtime_types::pallet_staking::Forcing, + }, } } } - pub mod traits { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct BlakeTwo256; + pub mod slashing { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SlashingSpans { + pub span_index: ::core::primitive::u32, + pub last_start: ::core::primitive::u32, + pub last_nonzero_slash: ::core::primitive::u32, + pub prior: ::std::vec::Vec<::core::primitive::u32>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SpanRecord<_0> { + pub slashed: _0, + pub paid_out: _0, + } + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ActiveEraInfo { + pub index: ::core::primitive::u32, + pub start: ::core::option::Option<::core::primitive::u64>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct EraRewardPoints<_0> { + pub total: ::core::primitive::u32, + pub individual: ::subxt::utils::KeyedVec<_0, ::core::primitive::u32>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Exposure<_0, _1> { + #[codec(compact)] + pub total: _1, + #[codec(compact)] + pub own: _1, + pub others: + ::std::vec::Vec>, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - pub enum DispatchError { + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum Forcing { #[codec(index = 0)] - Other, + NotForcing, #[codec(index = 1)] - CannotLookup, + ForceNew, #[codec(index = 2)] - BadOrigin, + ForceNone, #[codec(index = 3)] - Module(runtime_types::sp_runtime::ModuleError), - #[codec(index = 4)] - ConsumerRemaining, - #[codec(index = 5)] - NoProviders, - #[codec(index = 6)] - TooManyConsumers, - #[codec(index = 7)] - Token(runtime_types::sp_runtime::TokenError), - #[codec(index = 8)] - Arithmetic(runtime_types::sp_arithmetic::ArithmeticError), - #[codec(index = 9)] - Transactional(runtime_types::sp_runtime::TransactionalError), - #[codec(index = 10)] - Exhausted, - #[codec(index = 11)] - Corruption, - #[codec(index = 12)] - Unavailable, + ForceAlways, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - pub struct ModuleError { - pub index: ::core::primitive::u8, - pub error: [::core::primitive::u8; 4usize], + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct IndividualExposure<_0, _1> { + pub who: _0, + #[codec(compact)] + pub value: _1, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - pub enum MultiSignature { - #[codec(index = 0)] - Ed25519(runtime_types::sp_core::ed25519::Signature), - #[codec(index = 1)] - Sr25519(runtime_types::sp_core::sr25519::Signature), - #[codec(index = 2)] - Ecdsa(runtime_types::sp_core::ecdsa::Signature), + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Nominations { + pub targets: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::subxt::utils::AccountId32, + >, + pub submitted_in: ::core::primitive::u32, + pub suppressed: ::core::primitive::bool, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - pub enum TokenError { + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum RewardDestination<_0> { #[codec(index = 0)] - NoFunds, + Staked, #[codec(index = 1)] - WouldDie, + Stash, #[codec(index = 2)] - BelowMinimum, + Controller, #[codec(index = 3)] - CannotCreate, + Account(_0), #[codec(index = 4)] - UnknownAsset, - #[codec(index = 5)] - Frozen, - #[codec(index = 6)] - Unsupported, + None, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - pub enum TransactionalError { - #[codec(index = 0)] - LimitReached, - #[codec(index = 1)] - NoLayer, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct StakingLedger { + pub stash: ::subxt::utils::AccountId32, + #[codec(compact)] + pub total: ::core::primitive::u128, + #[codec(compact)] + pub active: ::core::primitive::u128, + pub unlocking: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + runtime_types::pallet_staking::UnlockChunk<::core::primitive::u128>, + >, + pub claimed_rewards: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u32, + >, } - } - pub mod sp_session { - use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - pub struct MembershipProof { - pub session: ::core::primitive::u32, - pub trie_nodes: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, - pub validator_count: ::core::primitive::u32, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct UnappliedSlash<_0, _1> { + pub validator: _0, + pub own: _1, + pub others: ::std::vec::Vec<(_0, _1)>, + pub reporters: ::std::vec::Vec<_0>, + pub payout: _1, } - } - pub mod sp_staking { - use super::runtime_types; - pub mod offence { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct OffenceDetails<_0, _1> { - pub offender: _1, - pub reporters: ::std::vec::Vec<_0>, - } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct UnlockChunk<_0> { + #[codec(compact)] + pub value: _0, + #[codec(compact)] + pub era: ::core::primitive::u32, } - } - pub mod sp_version { - use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - pub struct RuntimeVersion { - pub spec_name: ::std::string::String, - pub impl_name: ::std::string::String, - pub authoring_version: ::core::primitive::u32, - pub spec_version: ::core::primitive::u32, - pub impl_version: ::core::primitive::u32, - pub apis: - ::std::vec::Vec<([::core::primitive::u8; 8usize], ::core::primitive::u32)>, - pub transaction_version: ::core::primitive::u32, - pub state_version: ::core::primitive::u8, + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ValidatorPrefs { + #[codec(compact)] + pub commission: runtime_types::sp_arithmetic::per_things::Perbill, + pub blocked: ::core::primitive::bool, } } - pub mod sp_weights { + pub mod pallet_sudo { use super::runtime_types; - pub mod weight_v2 { + pub mod pallet { use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Authenticates the sudo key and dispatches a function call with `Root` origin."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "# "] + #[doc = "- O(1)."] + #[doc = "- Limited storage reads."] + #[doc = "- One DB write (event)."] + #[doc = "- Weight of derivative `call` execution + 10,000."] + #[doc = "# "] + sudo { + call: ::std::boxed::Box, + }, + #[codec(index = 1)] + #[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_."] + #[doc = ""] + #[doc = "# "] + #[doc = "- O(1)."] + #[doc = "- The weight of this call is defined by the caller."] + #[doc = "# "] + sudo_unchecked_weight { + call: ::std::boxed::Box, + weight: runtime_types::sp_weights::weight_v2::Weight, + }, + #[codec(index = 2)] + #[doc = "Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo"] + #[doc = "key."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "# "] + #[doc = "- O(1)."] + #[doc = "- Limited storage reads."] + #[doc = "- One DB change."] + #[doc = "# "] + set_key { + new: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + }, + #[codec(index = 3)] + #[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_."] + #[doc = ""] + #[doc = "# "] + #[doc = "- O(1)."] + #[doc = "- Limited storage reads."] + #[doc = "- One DB write (event)."] + #[doc = "- Weight of derivative `call` execution + 10,000."] + #[doc = "# "] + sudo_as { + who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + call: ::std::boxed::Box, + }, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Error for the Sudo pallet"] + pub enum Error { + #[codec(index = 0)] + #[doc = "Sender must be the Sudo account"] + RequireSudo, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Clone, Debug, Eq, PartialEq, )] - pub struct Weight { - #[codec(compact)] - pub ref_time: ::core::primitive::u64, - #[codec(compact)] - pub proof_size: ::core::primitive::u64, - } - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct OldWeight(pub ::core::primitive::u64); - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - Eq, - PartialEq, - )] - pub struct RuntimeDbWeight { - pub read: ::core::primitive::u64, - pub write: ::core::primitive::u64, - } - } - } - #[doc = r" The default error type returned when there is a runtime issue,"] - #[doc = r" exposed here for ease of use."] - pub type DispatchError = runtime_types::sp_runtime::DispatchError; - pub fn constants() -> ConstantsApi { ConstantsApi } - pub fn storage() -> StorageApi { StorageApi } - pub fn tx() -> TransactionApi { TransactionApi } - pub struct ConstantsApi; - impl ConstantsApi { - pub fn system(&self) -> system::constants::ConstantsApi { system::constants::ConstantsApi } - - pub fn utility(&self) -> utility::constants::ConstantsApi { - utility::constants::ConstantsApi - } - - pub fn babe(&self) -> babe::constants::ConstantsApi { babe::constants::ConstantsApi } - - pub fn timestamp(&self) -> timestamp::constants::ConstantsApi { - timestamp::constants::ConstantsApi - } - - pub fn authorship(&self) -> authorship::constants::ConstantsApi { - authorship::constants::ConstantsApi - } - - pub fn indices(&self) -> indices::constants::ConstantsApi { - indices::constants::ConstantsApi - } - - pub fn balances(&self) -> balances::constants::ConstantsApi { - balances::constants::ConstantsApi - } - - pub fn transaction_payment(&self) -> transaction_payment::constants::ConstantsApi { - transaction_payment::constants::ConstantsApi - } - - pub fn election_provider_multi_phase( - &self, - ) -> election_provider_multi_phase::constants::ConstantsApi { - election_provider_multi_phase::constants::ConstantsApi - } - - pub fn staking(&self) -> staking::constants::ConstantsApi { - staking::constants::ConstantsApi - } - - pub fn democracy(&self) -> democracy::constants::ConstantsApi { - democracy::constants::ConstantsApi - } - - pub fn elections(&self) -> elections::constants::ConstantsApi { - elections::constants::ConstantsApi - } - - pub fn grandpa(&self) -> grandpa::constants::ConstantsApi { - grandpa::constants::ConstantsApi - } - - pub fn treasury(&self) -> treasury::constants::ConstantsApi { - treasury::constants::ConstantsApi - } - - pub fn im_online(&self) -> im_online::constants::ConstantsApi { - im_online::constants::ConstantsApi - } - - pub fn scheduler(&self) -> scheduler::constants::ConstantsApi { - scheduler::constants::ConstantsApi - } - - pub fn bounties(&self) -> bounties::constants::ConstantsApi { - bounties::constants::ConstantsApi - } - - pub fn tips(&self) -> tips::constants::ConstantsApi { tips::constants::ConstantsApi } - - pub fn data_availability(&self) -> data_availability::constants::ConstantsApi { - data_availability::constants::ConstantsApi - } - - pub fn nomad_home(&self) -> nomad_home::constants::ConstantsApi { - nomad_home::constants::ConstantsApi - } - - pub fn nomad_da_bridge(&self) -> nomad_da_bridge::constants::ConstantsApi { - nomad_da_bridge::constants::ConstantsApi - } - - pub fn multisig(&self) -> multisig::constants::ConstantsApi { - multisig::constants::ConstantsApi - } - - pub fn voter_list(&self) -> voter_list::constants::ConstantsApi { - voter_list::constants::ConstantsApi - } - - pub fn nomination_pools(&self) -> nomination_pools::constants::ConstantsApi { - nomination_pools::constants::ConstantsApi - } - } - pub struct StorageApi; - impl StorageApi { - pub fn system(&self) -> system::storage::StorageApi { system::storage::StorageApi } - - pub fn babe(&self) -> babe::storage::StorageApi { babe::storage::StorageApi } - - pub fn timestamp(&self) -> timestamp::storage::StorageApi { timestamp::storage::StorageApi } - - pub fn authorship(&self) -> authorship::storage::StorageApi { - authorship::storage::StorageApi - } - - pub fn indices(&self) -> indices::storage::StorageApi { indices::storage::StorageApi } - - pub fn balances(&self) -> balances::storage::StorageApi { balances::storage::StorageApi } - - pub fn transaction_payment(&self) -> transaction_payment::storage::StorageApi { - transaction_payment::storage::StorageApi - } - - pub fn election_provider_multi_phase( - &self, - ) -> election_provider_multi_phase::storage::StorageApi { - election_provider_multi_phase::storage::StorageApi - } - - pub fn staking(&self) -> staking::storage::StorageApi { staking::storage::StorageApi } - - pub fn session(&self) -> session::storage::StorageApi { session::storage::StorageApi } - - pub fn democracy(&self) -> democracy::storage::StorageApi { democracy::storage::StorageApi } - - pub fn council(&self) -> council::storage::StorageApi { council::storage::StorageApi } - - pub fn technical_committee(&self) -> technical_committee::storage::StorageApi { - technical_committee::storage::StorageApi - } - - pub fn elections(&self) -> elections::storage::StorageApi { elections::storage::StorageApi } - - pub fn technical_membership(&self) -> technical_membership::storage::StorageApi { - technical_membership::storage::StorageApi - } - - pub fn grandpa(&self) -> grandpa::storage::StorageApi { grandpa::storage::StorageApi } - - pub fn treasury(&self) -> treasury::storage::StorageApi { treasury::storage::StorageApi } - - pub fn sudo(&self) -> sudo::storage::StorageApi { sudo::storage::StorageApi } - - pub fn im_online(&self) -> im_online::storage::StorageApi { im_online::storage::StorageApi } - - pub fn authority_discovery(&self) -> authority_discovery::storage::StorageApi { - authority_discovery::storage::StorageApi - } - - pub fn offences(&self) -> offences::storage::StorageApi { offences::storage::StorageApi } - - pub fn historical(&self) -> historical::storage::StorageApi { - historical::storage::StorageApi - } - - pub fn scheduler(&self) -> scheduler::storage::StorageApi { scheduler::storage::StorageApi } - - pub fn bounties(&self) -> bounties::storage::StorageApi { bounties::storage::StorageApi } - - pub fn tips(&self) -> tips::storage::StorageApi { tips::storage::StorageApi } - - pub fn mmr(&self) -> mmr::storage::StorageApi { mmr::storage::StorageApi } - - pub fn data_availability(&self) -> data_availability::storage::StorageApi { - data_availability::storage::StorageApi - } - - pub fn nomad_updater_manager(&self) -> nomad_updater_manager::storage::StorageApi { - nomad_updater_manager::storage::StorageApi - } - - pub fn nomad_home(&self) -> nomad_home::storage::StorageApi { - nomad_home::storage::StorageApi - } - - pub fn preimage(&self) -> preimage::storage::StorageApi { preimage::storage::StorageApi } - - pub fn multisig(&self) -> multisig::storage::StorageApi { multisig::storage::StorageApi } - - pub fn voter_list(&self) -> voter_list::storage::StorageApi { - voter_list::storage::StorageApi - } - - pub fn nomination_pools(&self) -> nomination_pools::storage::StorageApi { - nomination_pools::storage::StorageApi - } - } - pub struct TransactionApi; - impl TransactionApi { - pub fn system(&self) -> system::calls::TransactionApi { system::calls::TransactionApi } - - pub fn utility(&self) -> utility::calls::TransactionApi { utility::calls::TransactionApi } - - pub fn babe(&self) -> babe::calls::TransactionApi { babe::calls::TransactionApi } - - pub fn timestamp(&self) -> timestamp::calls::TransactionApi { - timestamp::calls::TransactionApi - } - - pub fn authorship(&self) -> authorship::calls::TransactionApi { - authorship::calls::TransactionApi - } - - pub fn indices(&self) -> indices::calls::TransactionApi { indices::calls::TransactionApi } - - pub fn balances(&self) -> balances::calls::TransactionApi { - balances::calls::TransactionApi + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub enum Event { + #[codec(index = 0)] + #[doc = "A sudo just took place. \\[result\\]"] + Sudid { + sudo_result: + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + }, + #[codec(index = 1)] + #[doc = "The \\[sudoer\\] just switched identity; the old key is supplied if one existed."] + KeyChanged { + old_sudoer: ::core::option::Option<::subxt::utils::AccountId32>, + }, + #[codec(index = 2)] + #[doc = "A sudo just took place. \\[result\\]"] + SudoAsDone { + sudo_result: + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + }, + } + } } - - pub fn election_provider_multi_phase( - &self, - ) -> election_provider_multi_phase::calls::TransactionApi { - election_provider_multi_phase::calls::TransactionApi + pub mod pallet_timestamp { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Set the 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 = "`MinimumPeriod`."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be `Inherent`."] + #[doc = ""] + #[doc = "# "] + #[doc = "- `O(1)` (Note that implementations of `OnTimestampSet` must also be `O(1)`)"] + #[doc = "- 1 storage read and 1 storage mutation (codec `O(1)`). (because of `DidUpdate::take` in"] + #[doc = " `on_finalize`)"] + #[doc = "- 1 event handler `on_timestamp_set`. Must be `O(1)`."] + #[doc = "# "] + set { + #[codec(compact)] + now: ::core::primitive::u64, + }, + } + } } - - pub fn staking(&self) -> staking::calls::TransactionApi { staking::calls::TransactionApi } - - pub fn session(&self) -> session::calls::TransactionApi { session::calls::TransactionApi } - - pub fn democracy(&self) -> democracy::calls::TransactionApi { - democracy::calls::TransactionApi + pub mod pallet_tips { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Report something `reason` that deserves a tip and claim any eventual the finder's fee."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "Payment: `TipReportDepositBase` will be reserved from the origin account, as well as"] + #[doc = "`DataDepositPerByte` for each byte in `reason`."] + #[doc = ""] + #[doc = "- `reason`: The reason for, or the thing that deserves, the tip; generally this will be"] + #[doc = " a UTF-8-encoded URL."] + #[doc = "- `who`: The account which should be credited for the tip."] + #[doc = ""] + #[doc = "Emits `NewTip` if successful."] + #[doc = ""] + #[doc = "# "] + #[doc = "- Complexity: `O(R)` where `R` length of `reason`."] + #[doc = " - encoding and hashing of 'reason'"] + #[doc = "- DbReads: `Reasons`, `Tips`"] + #[doc = "- DbWrites: `Reasons`, `Tips`"] + #[doc = "# "] + report_awesome { + reason: ::std::vec::Vec<::core::primitive::u8>, + who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + }, + #[codec(index = 1)] + #[doc = "Retract a prior tip-report from `report_awesome`, and cancel the process of tipping."] + #[doc = ""] + #[doc = "If successful, the original deposit will be unreserved."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the tip identified by `hash`"] + #[doc = "must have been reported by the signing account through `report_awesome` (and not"] + #[doc = "through `tip_new`)."] + #[doc = ""] + #[doc = "- `hash`: The identity of the open tip for which a tip value is declared. This is formed"] + #[doc = " as the hash of the tuple of the original tip `reason` and the beneficiary account ID."] + #[doc = ""] + #[doc = "Emits `TipRetracted` if successful."] + #[doc = ""] + #[doc = "# "] + #[doc = "- Complexity: `O(1)`"] + #[doc = " - Depends on the length of `T::Hash` which is fixed."] + #[doc = "- DbReads: `Tips`, `origin account`"] + #[doc = "- DbWrites: `Reasons`, `Tips`, `origin account`"] + #[doc = "# "] + retract_tip { hash: ::subxt::utils::H256 }, + #[codec(index = 2)] + #[doc = "Give a tip for something new; no finder's fee will be taken."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the signing account must be a"] + #[doc = "member of the `Tippers` set."] + #[doc = ""] + #[doc = "- `reason`: The reason for, or the thing that deserves, the tip; generally this will be"] + #[doc = " a UTF-8-encoded URL."] + #[doc = "- `who`: The account which should be credited for the tip."] + #[doc = "- `tip_value`: The amount of tip that the sender would like to give. The median tip"] + #[doc = " value of active tippers will be given to the `who`."] + #[doc = ""] + #[doc = "Emits `NewTip` if successful."] + #[doc = ""] + #[doc = "# "] + #[doc = "- Complexity: `O(R + T)` where `R` length of `reason`, `T` is the number of tippers."] + #[doc = " - `O(T)`: decoding `Tipper` vec of length `T`. `T` is charged as upper bound given by"] + #[doc = " `ContainsLengthBound`. The actual cost depends on the implementation of"] + #[doc = " `T::Tippers`."] + #[doc = " - `O(R)`: hashing and encoding of reason of length `R`"] + #[doc = "- DbReads: `Tippers`, `Reasons`"] + #[doc = "- DbWrites: `Reasons`, `Tips`"] + #[doc = "# "] + tip_new { + reason: ::std::vec::Vec<::core::primitive::u8>, + who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + #[codec(compact)] + tip_value: ::core::primitive::u128, + }, + #[codec(index = 3)] + #[doc = "Declare a tip value for an already-open tip."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the signing account must be a"] + #[doc = "member of the `Tippers` set."] + #[doc = ""] + #[doc = "- `hash`: The identity of the open tip for which a tip value is declared. This is formed"] + #[doc = " as the hash of the tuple of the hash of the original tip `reason` and the beneficiary"] + #[doc = " account ID."] + #[doc = "- `tip_value`: The amount of tip that the sender would like to give. The median tip"] + #[doc = " value of active tippers will be given to the `who`."] + #[doc = ""] + #[doc = "Emits `TipClosing` if the threshold of tippers has been reached and the countdown period"] + #[doc = "has started."] + #[doc = ""] + #[doc = "# "] + #[doc = "- Complexity: `O(T)` where `T` is the number of tippers. decoding `Tipper` vec of length"] + #[doc = " `T`, insert tip and check closing, `T` is charged as upper bound given by"] + #[doc = " `ContainsLengthBound`. The actual cost depends on the implementation of `T::Tippers`."] + #[doc = ""] + #[doc = " Actually weight could be lower as it depends on how many tips are in `OpenTip` but it"] + #[doc = " is weighted as if almost full i.e of length `T-1`."] + #[doc = "- DbReads: `Tippers`, `Tips`"] + #[doc = "- DbWrites: `Tips`"] + #[doc = "# "] + tip { + hash: ::subxt::utils::H256, + #[codec(compact)] + tip_value: ::core::primitive::u128, + }, + #[codec(index = 4)] + #[doc = "Close and payout a tip."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "The tip identified by `hash` must have finished its countdown period."] + #[doc = ""] + #[doc = "- `hash`: The identity of the open tip for which a tip value is declared. This is formed"] + #[doc = " as the hash of the tuple of the original tip `reason` and the beneficiary account ID."] + #[doc = ""] + #[doc = "# "] + #[doc = "- Complexity: `O(T)` where `T` is the number of tippers. decoding `Tipper` vec of length"] + #[doc = " `T`. `T` is charged as upper bound given by `ContainsLengthBound`. The actual cost"] + #[doc = " depends on the implementation of `T::Tippers`."] + #[doc = "- DbReads: `Tips`, `Tippers`, `tip finder`"] + #[doc = "- DbWrites: `Reasons`, `Tips`, `Tippers`, `tip finder`"] + #[doc = "# "] + close_tip { hash: ::subxt::utils::H256 }, + #[codec(index = 5)] + #[doc = "Remove and slash an already-open tip."] + #[doc = ""] + #[doc = "May only be called from `T::RejectOrigin`."] + #[doc = ""] + #[doc = "As a result, the finder is slashed and the deposits are lost."] + #[doc = ""] + #[doc = "Emits `TipSlashed` if successful."] + #[doc = ""] + #[doc = "# "] + #[doc = " `T` is charged as upper bound given by `ContainsLengthBound`."] + #[doc = " The actual cost depends on the implementation of `T::Tippers`."] + #[doc = "# "] + slash_tip { hash: ::subxt::utils::H256 }, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "The reason given is just too big."] + ReasonTooBig, + #[codec(index = 1)] + #[doc = "The tip was already found/started."] + AlreadyKnown, + #[codec(index = 2)] + #[doc = "The tip hash is unknown."] + UnknownTip, + #[codec(index = 3)] + #[doc = "The account attempting to retract the tip is not the finder of the tip."] + NotFinder, + #[codec(index = 4)] + #[doc = "The tip cannot be claimed/closed because there are not enough tippers yet."] + StillOpen, + #[codec(index = 5)] + #[doc = "The tip cannot be claimed/closed because it's still in the countdown period."] + Premature, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub enum Event { + #[codec(index = 0)] + #[doc = "A new tip suggestion has been opened."] + NewTip { tip_hash: ::subxt::utils::H256 }, + #[codec(index = 1)] + #[doc = "A tip suggestion has reached threshold and is closing."] + TipClosing { tip_hash: ::subxt::utils::H256 }, + #[codec(index = 2)] + #[doc = "A tip suggestion has been closed."] + TipClosed { + tip_hash: ::subxt::utils::H256, + who: ::subxt::utils::AccountId32, + payout: ::core::primitive::u128, + }, + #[codec(index = 3)] + #[doc = "A tip suggestion has been retracted."] + TipRetracted { tip_hash: ::subxt::utils::H256 }, + #[codec(index = 4)] + #[doc = "A tip suggestion has been slashed."] + TipSlashed { + tip_hash: ::subxt::utils::H256, + finder: ::subxt::utils::AccountId32, + deposit: ::core::primitive::u128, + }, + } + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct OpenTip<_0, _1, _2, _3> { + pub reason: _3, + pub who: _0, + pub finder: _0, + pub deposit: _1, + pub closes: ::core::option::Option<_2>, + pub tips: ::std::vec::Vec<(_0, _1)>, + pub finders_fee: ::core::primitive::bool, + } } - - pub fn council(&self) -> council::calls::TransactionApi { council::calls::TransactionApi } - - pub fn technical_committee(&self) -> technical_committee::calls::TransactionApi { - technical_committee::calls::TransactionApi + pub mod pallet_transaction_payment { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub enum Event { + #[codec(index = 0)] + #[doc = "A transaction fee `actual_fee`, of which `tip` was added to the minimum inclusion fee,"] + #[doc = "has been paid by `who`."] + TransactionFeePaid { + who: ::subxt::utils::AccountId32, + actual_fee: ::core::primitive::u128, + tip: ::core::primitive::u128, + }, + } + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ChargeTransactionPayment(#[codec(compact)] pub ::core::primitive::u128); + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum Releases { + #[codec(index = 0)] + V1Ancient, + #[codec(index = 1)] + V2, + } } - - pub fn elections(&self) -> elections::calls::TransactionApi { - elections::calls::TransactionApi + pub mod pallet_treasury { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Put forward a suggestion for spending. A deposit proportional to the value"] + #[doc = "is reserved and slashed if the proposal is rejected. It is returned once the"] + #[doc = "proposal is awarded."] + #[doc = ""] + #[doc = "# "] + #[doc = "- Complexity: O(1)"] + #[doc = "- DbReads: `ProposalCount`, `origin account`"] + #[doc = "- DbWrites: `ProposalCount`, `Proposals`, `origin account`"] + #[doc = "# "] + propose_spend { + #[codec(compact)] + value: ::core::primitive::u128, + beneficiary: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + }, + #[codec(index = 1)] + #[doc = "Reject a proposed spend. The original deposit will be slashed."] + #[doc = ""] + #[doc = "May only be called from `T::RejectOrigin`."] + #[doc = ""] + #[doc = "# "] + #[doc = "- Complexity: O(1)"] + #[doc = "- DbReads: `Proposals`, `rejected proposer account`"] + #[doc = "- DbWrites: `Proposals`, `rejected proposer account`"] + #[doc = "# "] + reject_proposal { + #[codec(compact)] + proposal_id: ::core::primitive::u32, + }, + #[codec(index = 2)] + #[doc = "Approve a proposal. At a later time, the proposal will be allocated to the beneficiary"] + #[doc = "and the original deposit will be returned."] + #[doc = ""] + #[doc = "May only be called from `T::ApproveOrigin`."] + #[doc = ""] + #[doc = "# "] + #[doc = "- Complexity: O(1)."] + #[doc = "- DbReads: `Proposals`, `Approvals`"] + #[doc = "- DbWrite: `Approvals`"] + #[doc = "# "] + approve_proposal { + #[codec(compact)] + proposal_id: ::core::primitive::u32, + }, + #[codec(index = 3)] + #[doc = "Propose and approve a spend of treasury funds."] + #[doc = ""] + #[doc = "- `origin`: Must be `SpendOrigin` with the `Success` value being at least `amount`."] + #[doc = "- `amount`: The amount to be transferred from the treasury to the `beneficiary`."] + #[doc = "- `beneficiary`: The destination account for the transfer."] + #[doc = ""] + #[doc = "NOTE: For record-keeping purposes, the proposer is deemed to be equivalent to the"] + #[doc = "beneficiary."] + spend { + #[codec(compact)] + amount: ::core::primitive::u128, + beneficiary: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + }, + #[codec(index = 4)] + #[doc = "Force a previously approved proposal to be removed from the approval queue."] + #[doc = "The original deposit will no longer be returned."] + #[doc = ""] + #[doc = "May only be called from `T::RejectOrigin`."] + #[doc = "- `proposal_id`: The index of a proposal"] + #[doc = ""] + #[doc = "# "] + #[doc = "- Complexity: O(A) where `A` is the number of approvals"] + #[doc = "- Db reads and writes: `Approvals`"] + #[doc = "# "] + #[doc = ""] + #[doc = "Errors:"] + #[doc = "- `ProposalNotApproved`: The `proposal_id` supplied was not found in the approval queue,"] + #[doc = "i.e., the proposal has not been approved. This could also mean the proposal does not"] + #[doc = "exist altogether, thus there is no way it would have been approved in the first place."] + remove_approval { + #[codec(compact)] + proposal_id: ::core::primitive::u32, + }, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Error for the treasury pallet."] + pub enum Error { + #[codec(index = 0)] + #[doc = "Proposer's balance is too low."] + InsufficientProposersBalance, + #[codec(index = 1)] + #[doc = "No proposal or bounty at that index."] + InvalidIndex, + #[codec(index = 2)] + #[doc = "Too many approvals in the queue."] + TooManyApprovals, + #[codec(index = 3)] + #[doc = "The spend origin is valid but the amount it is allowed to spend is lower than the"] + #[doc = "amount to be spent."] + InsufficientPermission, + #[codec(index = 4)] + #[doc = "Proposal has not been approved."] + ProposalNotApproved, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub enum Event { + #[codec(index = 0)] + #[doc = "New proposal."] + Proposed { + proposal_index: ::core::primitive::u32, + }, + #[codec(index = 1)] + #[doc = "We have ended a spend period and will now allocate funds."] + Spending { + budget_remaining: ::core::primitive::u128, + }, + #[codec(index = 2)] + #[doc = "Some funds have been allocated."] + Awarded { + proposal_index: ::core::primitive::u32, + award: ::core::primitive::u128, + account: ::subxt::utils::AccountId32, + }, + #[codec(index = 3)] + #[doc = "A proposal was rejected; funds were slashed."] + Rejected { + proposal_index: ::core::primitive::u32, + slashed: ::core::primitive::u128, + }, + #[codec(index = 4)] + #[doc = "Some of our funds have been burnt."] + Burnt { + burnt_funds: ::core::primitive::u128, + }, + #[codec(index = 5)] + #[doc = "Spending has finished; this is the amount that rolls over until next spend."] + Rollover { + rollover_balance: ::core::primitive::u128, + }, + #[codec(index = 6)] + #[doc = "Some funds have been deposited."] + Deposit { value: ::core::primitive::u128 }, + #[codec(index = 7)] + #[doc = "A new spend proposal has been approved."] + SpendApproved { + proposal_index: ::core::primitive::u32, + amount: ::core::primitive::u128, + beneficiary: ::subxt::utils::AccountId32, + }, + #[codec(index = 8)] + #[doc = "The inactive funds of the pallet have been updated."] + UpdatedInactive { + reactivated: ::core::primitive::u128, + deactivated: ::core::primitive::u128, + }, + } + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Proposal<_0, _1> { + pub proposer: _0, + pub value: _1, + pub beneficiary: _0, + pub bond: _1, + } } - - pub fn technical_membership(&self) -> technical_membership::calls::TransactionApi { - technical_membership::calls::TransactionApi + pub mod pallet_utility { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Send a batch of dispatch calls."] + #[doc = ""] + #[doc = "May be called from any origin except `None`."] + #[doc = ""] + #[doc = "- `calls`: The calls to be dispatched from the same origin. The number of call must not"] + #[doc = " exceed the constant: `batched_calls_limit` (available in constant metadata)."] + #[doc = ""] + #[doc = "If origin is root then the calls are dispatched without checking origin filter. (This"] + #[doc = "includes bypassing `frame_system::Config::BaseCallFilter`)."] + #[doc = ""] + #[doc = "# "] + #[doc = "- Complexity: O(C) where C is the number of calls to be batched."] + #[doc = "# "] + #[doc = ""] + #[doc = "This will return `Ok` in all circumstances. To determine the success of the batch, an"] + #[doc = "event is deposited. If a call failed and the batch was interrupted, then the"] + #[doc = "`BatchInterrupted` event is deposited, along with the number of successful calls made"] + #[doc = "and the error of the failed call. If all were successful, then the `BatchCompleted`"] + #[doc = "event is deposited."] + batch { + calls: ::std::vec::Vec, + }, + #[codec(index = 1)] + #[doc = "Send a call through an indexed pseudonym of the sender."] + #[doc = ""] + #[doc = "Filter from origin are passed along. The call will be dispatched with an origin which"] + #[doc = "use the same filter as the origin of this call."] + #[doc = ""] + #[doc = "NOTE: If you need to ensure that any account-based filtering is not honored (i.e."] + #[doc = "because you expect `proxy` to have been used prior in the call stack and you do not want"] + #[doc = "the call restrictions to apply to any sub-accounts), then use `as_multi_threshold_1`"] + #[doc = "in the Multisig pallet instead."] + #[doc = ""] + #[doc = "NOTE: Prior to version *12, this was called `as_limited_sub`."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + as_derivative { + index: ::core::primitive::u16, + call: ::std::boxed::Box, + }, + #[codec(index = 2)] + #[doc = "Send a batch of dispatch calls and atomically execute them."] + #[doc = "The whole transaction will rollback and fail if any of the calls failed."] + #[doc = ""] + #[doc = "May be called from any origin except `None`."] + #[doc = ""] + #[doc = "- `calls`: The calls to be dispatched from the same origin. The number of call must not"] + #[doc = " exceed the constant: `batched_calls_limit` (available in constant metadata)."] + #[doc = ""] + #[doc = "If origin is root then the calls are dispatched without checking origin filter. (This"] + #[doc = "includes bypassing `frame_system::Config::BaseCallFilter`)."] + #[doc = ""] + #[doc = "# "] + #[doc = "- Complexity: O(C) where C is the number of calls to be batched."] + #[doc = "# "] + batch_all { + calls: ::std::vec::Vec, + }, + #[codec(index = 3)] + #[doc = "Dispatches a function call with a provided origin."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Root_."] + #[doc = ""] + #[doc = "# "] + #[doc = "- O(1)."] + #[doc = "- Limited storage reads."] + #[doc = "- One DB write (event)."] + #[doc = "- Weight of derivative `call` execution + T::WeightInfo::dispatch_as()."] + #[doc = "# "] + dispatch_as { + as_origin: ::std::boxed::Box, + call: ::std::boxed::Box, + }, + #[codec(index = 4)] + #[doc = "Send a batch of dispatch calls."] + #[doc = "Unlike `batch`, it allows errors and won't interrupt."] + #[doc = ""] + #[doc = "May be called from any origin except `None`."] + #[doc = ""] + #[doc = "- `calls`: The calls to be dispatched from the same origin. The number of call must not"] + #[doc = " exceed the constant: `batched_calls_limit` (available in constant metadata)."] + #[doc = ""] + #[doc = "If origin is root then the calls are dispatch without checking origin filter. (This"] + #[doc = "includes bypassing `frame_system::Config::BaseCallFilter`)."] + #[doc = ""] + #[doc = "# "] + #[doc = "- Complexity: O(C) where C is the number of calls to be batched."] + #[doc = "# "] + force_batch { + calls: ::std::vec::Vec, + }, + #[codec(index = 5)] + #[doc = "Dispatch a function call with a specified weight."] + #[doc = ""] + #[doc = "This function does not check the weight of the call, and instead allows the"] + #[doc = "Root origin to specify the weight of the call."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Root_."] + with_weight { + call: ::std::boxed::Box, + weight: runtime_types::sp_weights::weight_v2::Weight, + }, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "Too many calls batched."] + TooManyCalls, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub enum Event { + #[codec(index = 0)] + #[doc = "Batch of dispatches did not complete fully. Index of first failing dispatch given, as"] + #[doc = "well as the error."] + BatchInterrupted { + index: ::core::primitive::u32, + error: runtime_types::sp_runtime::DispatchError, + }, + #[codec(index = 1)] + #[doc = "Batch of dispatches completed fully with no error."] + BatchCompleted, + #[codec(index = 2)] + #[doc = "Batch of dispatches completed but has errors."] + BatchCompletedWithErrors, + #[codec(index = 3)] + #[doc = "A single item within a Batch of dispatches has completed with no error."] + ItemCompleted, + #[codec(index = 4)] + #[doc = "A single item within a Batch of dispatches has completed with error."] + ItemFailed { + error: runtime_types::sp_runtime::DispatchError, + }, + #[codec(index = 5)] + #[doc = "A call was dispatched."] + DispatchedAs { + result: + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + }, + } + } } - - pub fn grandpa(&self) -> grandpa::calls::TransactionApi { grandpa::calls::TransactionApi } - - pub fn treasury(&self) -> treasury::calls::TransactionApi { - treasury::calls::TransactionApi + pub mod primitive_types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct U256(pub [::core::primitive::u64; 4usize]); } - - pub fn sudo(&self) -> sudo::calls::TransactionApi { sudo::calls::TransactionApi } - - pub fn im_online(&self) -> im_online::calls::TransactionApi { - im_online::calls::TransactionApi + pub mod sp_arithmetic { + use super::runtime_types; + pub mod fixed_point { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct FixedU128(pub ::core::primitive::u128); + } + pub mod per_things { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct PerU16(pub ::core::primitive::u16); + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Perbill(pub ::core::primitive::u32); + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Percent(pub ::core::primitive::u8); + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Permill(pub ::core::primitive::u32); + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum ArithmeticError { + #[codec(index = 0)] + Underflow, + #[codec(index = 1)] + Overflow, + #[codec(index = 2)] + DivisionByZero, + } } - - pub fn scheduler(&self) -> scheduler::calls::TransactionApi { - scheduler::calls::TransactionApi + pub mod sp_authority_discovery { + use super::runtime_types; + pub mod app { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Public(pub runtime_types::sp_core::sr25519::Public); + } } - - pub fn bounties(&self) -> bounties::calls::TransactionApi { - bounties::calls::TransactionApi + pub mod sp_consensus_babe { + use super::runtime_types; + pub mod app { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Public(pub runtime_types::sp_core::sr25519::Public); + } + pub mod digests { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum NextConfigDescriptor { + #[codec(index = 1)] + V1 { + c: (::core::primitive::u64, ::core::primitive::u64), + allowed_slots: runtime_types::sp_consensus_babe::AllowedSlots, + }, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum PreDigest { + #[codec(index = 1)] + Primary(runtime_types::sp_consensus_babe::digests::PrimaryPreDigest), + #[codec(index = 2)] + SecondaryPlain( + runtime_types::sp_consensus_babe::digests::SecondaryPlainPreDigest, + ), + #[codec(index = 3)] + SecondaryVRF(runtime_types::sp_consensus_babe::digests::SecondaryVRFPreDigest), + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct PrimaryPreDigest { + pub authority_index: ::core::primitive::u32, + pub slot: runtime_types::sp_consensus_slots::Slot, + pub vrf_output: [::core::primitive::u8; 32usize], + pub vrf_proof: [::core::primitive::u8; 64usize], + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SecondaryPlainPreDigest { + pub authority_index: ::core::primitive::u32, + pub slot: runtime_types::sp_consensus_slots::Slot, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SecondaryVRFPreDigest { + pub authority_index: ::core::primitive::u32, + pub slot: runtime_types::sp_consensus_slots::Slot, + pub vrf_output: [::core::primitive::u8; 32usize], + pub vrf_proof: [::core::primitive::u8; 64usize], + } + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum AllowedSlots { + #[codec(index = 0)] + PrimarySlots, + #[codec(index = 1)] + PrimaryAndSecondaryPlainSlots, + #[codec(index = 2)] + PrimaryAndSecondaryVRFSlots, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct BabeEpochConfiguration { + pub c: (::core::primitive::u64, ::core::primitive::u64), + pub allowed_slots: runtime_types::sp_consensus_babe::AllowedSlots, + } } - - pub fn tips(&self) -> tips::calls::TransactionApi { tips::calls::TransactionApi } - - pub fn data_availability(&self) -> data_availability::calls::TransactionApi { - data_availability::calls::TransactionApi + pub mod sp_consensus_slots { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct EquivocationProof<_0, _1> { + pub offender: _1, + pub slot: runtime_types::sp_consensus_slots::Slot, + pub first_header: _0, + pub second_header: _0, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Slot(pub ::core::primitive::u64); } - - pub fn nomad_updater_manager(&self) -> nomad_updater_manager::calls::TransactionApi { - nomad_updater_manager::calls::TransactionApi + pub mod sp_core { + use super::runtime_types; + pub mod bounded { + use super::runtime_types; + pub mod bounded_btree_map { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct BoundedBTreeMap<_0, _1>(pub ::subxt::utils::KeyedVec<_0, _1>); + } + pub mod bounded_vec { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct BoundedVec<_0>(pub ::std::vec::Vec<_0>); + } + pub mod weak_bounded_vec { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct WeakBoundedVec<_0>(pub ::std::vec::Vec<_0>); + } + } + pub mod crypto { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct KeyTypeId(pub [::core::primitive::u8; 4usize]); + } + pub mod ecdsa { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Signature(pub [::core::primitive::u8; 65usize]); + } + pub mod ed25519 { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Public(pub [::core::primitive::u8; 32usize]); + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Signature(pub [::core::primitive::u8; 64usize]); + } + pub mod offchain { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct OpaqueMultiaddr(pub ::std::vec::Vec<::core::primitive::u8>); + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct OpaqueNetworkState { + pub peer_id: runtime_types::sp_core::OpaquePeerId, + pub external_addresses: + ::std::vec::Vec, + } + } + pub mod sr25519 { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Public(pub [::core::primitive::u8; 32usize]); + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Signature(pub [::core::primitive::u8; 64usize]); + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct OpaquePeerId(pub ::std::vec::Vec<::core::primitive::u8>); + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum Void {} } - - pub fn nomad_home(&self) -> nomad_home::calls::TransactionApi { - nomad_home::calls::TransactionApi + pub mod sp_finality_grandpa { + use super::runtime_types; + pub mod app { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Public(pub runtime_types::sp_core::ed25519::Public); + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Signature(pub runtime_types::sp_core::ed25519::Signature); + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum Equivocation<_0, _1> { + #[codec(index = 0)] + Prevote( + runtime_types::finality_grandpa::Equivocation< + runtime_types::sp_finality_grandpa::app::Public, + runtime_types::finality_grandpa::Prevote<_0, _1>, + runtime_types::sp_finality_grandpa::app::Signature, + >, + ), + #[codec(index = 1)] + Precommit( + runtime_types::finality_grandpa::Equivocation< + runtime_types::sp_finality_grandpa::app::Public, + runtime_types::finality_grandpa::Precommit<_0, _1>, + runtime_types::sp_finality_grandpa::app::Signature, + >, + ), + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct EquivocationProof<_0, _1> { + pub set_id: ::core::primitive::u64, + pub equivocation: runtime_types::sp_finality_grandpa::Equivocation<_0, _1>, + } } - - pub fn nomad_da_bridge(&self) -> nomad_da_bridge::calls::TransactionApi { - nomad_da_bridge::calls::TransactionApi + pub mod sp_npos_elections { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ElectionScore { + pub minimal_stake: ::core::primitive::u128, + pub sum_stake: ::core::primitive::u128, + pub sum_stake_squared: ::core::primitive::u128, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Support<_0> { + pub total: ::core::primitive::u128, + pub voters: ::std::vec::Vec<(_0, ::core::primitive::u128)>, + } } - - pub fn preimage(&self) -> preimage::calls::TransactionApi { - preimage::calls::TransactionApi + pub mod sp_runtime { + use super::runtime_types; + pub mod generic { + use super::runtime_types; + pub mod digest { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Digest { + pub logs: + ::std::vec::Vec, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum DigestItem { + #[codec(index = 6)] + PreRuntime( + [::core::primitive::u8; 4usize], + ::std::vec::Vec<::core::primitive::u8>, + ), + #[codec(index = 4)] + Consensus( + [::core::primitive::u8; 4usize], + ::std::vec::Vec<::core::primitive::u8>, + ), + #[codec(index = 5)] + Seal( + [::core::primitive::u8; 4usize], + ::std::vec::Vec<::core::primitive::u8>, + ), + #[codec(index = 0)] + Other(::std::vec::Vec<::core::primitive::u8>), + #[codec(index = 8)] + RuntimeEnvironmentUpdated, + } + } + pub mod era { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum Era { + #[codec(index = 0)] + Immortal, + #[codec(index = 1)] + Mortal1(::core::primitive::u8), + #[codec(index = 2)] + Mortal2(::core::primitive::u8), + #[codec(index = 3)] + Mortal3(::core::primitive::u8), + #[codec(index = 4)] + Mortal4(::core::primitive::u8), + #[codec(index = 5)] + Mortal5(::core::primitive::u8), + #[codec(index = 6)] + Mortal6(::core::primitive::u8), + #[codec(index = 7)] + Mortal7(::core::primitive::u8), + #[codec(index = 8)] + Mortal8(::core::primitive::u8), + #[codec(index = 9)] + Mortal9(::core::primitive::u8), + #[codec(index = 10)] + Mortal10(::core::primitive::u8), + #[codec(index = 11)] + Mortal11(::core::primitive::u8), + #[codec(index = 12)] + Mortal12(::core::primitive::u8), + #[codec(index = 13)] + Mortal13(::core::primitive::u8), + #[codec(index = 14)] + Mortal14(::core::primitive::u8), + #[codec(index = 15)] + Mortal15(::core::primitive::u8), + #[codec(index = 16)] + Mortal16(::core::primitive::u8), + #[codec(index = 17)] + Mortal17(::core::primitive::u8), + #[codec(index = 18)] + Mortal18(::core::primitive::u8), + #[codec(index = 19)] + Mortal19(::core::primitive::u8), + #[codec(index = 20)] + Mortal20(::core::primitive::u8), + #[codec(index = 21)] + Mortal21(::core::primitive::u8), + #[codec(index = 22)] + Mortal22(::core::primitive::u8), + #[codec(index = 23)] + Mortal23(::core::primitive::u8), + #[codec(index = 24)] + Mortal24(::core::primitive::u8), + #[codec(index = 25)] + Mortal25(::core::primitive::u8), + #[codec(index = 26)] + Mortal26(::core::primitive::u8), + #[codec(index = 27)] + Mortal27(::core::primitive::u8), + #[codec(index = 28)] + Mortal28(::core::primitive::u8), + #[codec(index = 29)] + Mortal29(::core::primitive::u8), + #[codec(index = 30)] + Mortal30(::core::primitive::u8), + #[codec(index = 31)] + Mortal31(::core::primitive::u8), + #[codec(index = 32)] + Mortal32(::core::primitive::u8), + #[codec(index = 33)] + Mortal33(::core::primitive::u8), + #[codec(index = 34)] + Mortal34(::core::primitive::u8), + #[codec(index = 35)] + Mortal35(::core::primitive::u8), + #[codec(index = 36)] + Mortal36(::core::primitive::u8), + #[codec(index = 37)] + Mortal37(::core::primitive::u8), + #[codec(index = 38)] + Mortal38(::core::primitive::u8), + #[codec(index = 39)] + Mortal39(::core::primitive::u8), + #[codec(index = 40)] + Mortal40(::core::primitive::u8), + #[codec(index = 41)] + Mortal41(::core::primitive::u8), + #[codec(index = 42)] + Mortal42(::core::primitive::u8), + #[codec(index = 43)] + Mortal43(::core::primitive::u8), + #[codec(index = 44)] + Mortal44(::core::primitive::u8), + #[codec(index = 45)] + Mortal45(::core::primitive::u8), + #[codec(index = 46)] + Mortal46(::core::primitive::u8), + #[codec(index = 47)] + Mortal47(::core::primitive::u8), + #[codec(index = 48)] + Mortal48(::core::primitive::u8), + #[codec(index = 49)] + Mortal49(::core::primitive::u8), + #[codec(index = 50)] + Mortal50(::core::primitive::u8), + #[codec(index = 51)] + Mortal51(::core::primitive::u8), + #[codec(index = 52)] + Mortal52(::core::primitive::u8), + #[codec(index = 53)] + Mortal53(::core::primitive::u8), + #[codec(index = 54)] + Mortal54(::core::primitive::u8), + #[codec(index = 55)] + Mortal55(::core::primitive::u8), + #[codec(index = 56)] + Mortal56(::core::primitive::u8), + #[codec(index = 57)] + Mortal57(::core::primitive::u8), + #[codec(index = 58)] + Mortal58(::core::primitive::u8), + #[codec(index = 59)] + Mortal59(::core::primitive::u8), + #[codec(index = 60)] + Mortal60(::core::primitive::u8), + #[codec(index = 61)] + Mortal61(::core::primitive::u8), + #[codec(index = 62)] + Mortal62(::core::primitive::u8), + #[codec(index = 63)] + Mortal63(::core::primitive::u8), + #[codec(index = 64)] + Mortal64(::core::primitive::u8), + #[codec(index = 65)] + Mortal65(::core::primitive::u8), + #[codec(index = 66)] + Mortal66(::core::primitive::u8), + #[codec(index = 67)] + Mortal67(::core::primitive::u8), + #[codec(index = 68)] + Mortal68(::core::primitive::u8), + #[codec(index = 69)] + Mortal69(::core::primitive::u8), + #[codec(index = 70)] + Mortal70(::core::primitive::u8), + #[codec(index = 71)] + Mortal71(::core::primitive::u8), + #[codec(index = 72)] + Mortal72(::core::primitive::u8), + #[codec(index = 73)] + Mortal73(::core::primitive::u8), + #[codec(index = 74)] + Mortal74(::core::primitive::u8), + #[codec(index = 75)] + Mortal75(::core::primitive::u8), + #[codec(index = 76)] + Mortal76(::core::primitive::u8), + #[codec(index = 77)] + Mortal77(::core::primitive::u8), + #[codec(index = 78)] + Mortal78(::core::primitive::u8), + #[codec(index = 79)] + Mortal79(::core::primitive::u8), + #[codec(index = 80)] + Mortal80(::core::primitive::u8), + #[codec(index = 81)] + Mortal81(::core::primitive::u8), + #[codec(index = 82)] + Mortal82(::core::primitive::u8), + #[codec(index = 83)] + Mortal83(::core::primitive::u8), + #[codec(index = 84)] + Mortal84(::core::primitive::u8), + #[codec(index = 85)] + Mortal85(::core::primitive::u8), + #[codec(index = 86)] + Mortal86(::core::primitive::u8), + #[codec(index = 87)] + Mortal87(::core::primitive::u8), + #[codec(index = 88)] + Mortal88(::core::primitive::u8), + #[codec(index = 89)] + Mortal89(::core::primitive::u8), + #[codec(index = 90)] + Mortal90(::core::primitive::u8), + #[codec(index = 91)] + Mortal91(::core::primitive::u8), + #[codec(index = 92)] + Mortal92(::core::primitive::u8), + #[codec(index = 93)] + Mortal93(::core::primitive::u8), + #[codec(index = 94)] + Mortal94(::core::primitive::u8), + #[codec(index = 95)] + Mortal95(::core::primitive::u8), + #[codec(index = 96)] + Mortal96(::core::primitive::u8), + #[codec(index = 97)] + Mortal97(::core::primitive::u8), + #[codec(index = 98)] + Mortal98(::core::primitive::u8), + #[codec(index = 99)] + Mortal99(::core::primitive::u8), + #[codec(index = 100)] + Mortal100(::core::primitive::u8), + #[codec(index = 101)] + Mortal101(::core::primitive::u8), + #[codec(index = 102)] + Mortal102(::core::primitive::u8), + #[codec(index = 103)] + Mortal103(::core::primitive::u8), + #[codec(index = 104)] + Mortal104(::core::primitive::u8), + #[codec(index = 105)] + Mortal105(::core::primitive::u8), + #[codec(index = 106)] + Mortal106(::core::primitive::u8), + #[codec(index = 107)] + Mortal107(::core::primitive::u8), + #[codec(index = 108)] + Mortal108(::core::primitive::u8), + #[codec(index = 109)] + Mortal109(::core::primitive::u8), + #[codec(index = 110)] + Mortal110(::core::primitive::u8), + #[codec(index = 111)] + Mortal111(::core::primitive::u8), + #[codec(index = 112)] + Mortal112(::core::primitive::u8), + #[codec(index = 113)] + Mortal113(::core::primitive::u8), + #[codec(index = 114)] + Mortal114(::core::primitive::u8), + #[codec(index = 115)] + Mortal115(::core::primitive::u8), + #[codec(index = 116)] + Mortal116(::core::primitive::u8), + #[codec(index = 117)] + Mortal117(::core::primitive::u8), + #[codec(index = 118)] + Mortal118(::core::primitive::u8), + #[codec(index = 119)] + Mortal119(::core::primitive::u8), + #[codec(index = 120)] + Mortal120(::core::primitive::u8), + #[codec(index = 121)] + Mortal121(::core::primitive::u8), + #[codec(index = 122)] + Mortal122(::core::primitive::u8), + #[codec(index = 123)] + Mortal123(::core::primitive::u8), + #[codec(index = 124)] + Mortal124(::core::primitive::u8), + #[codec(index = 125)] + Mortal125(::core::primitive::u8), + #[codec(index = 126)] + Mortal126(::core::primitive::u8), + #[codec(index = 127)] + Mortal127(::core::primitive::u8), + #[codec(index = 128)] + Mortal128(::core::primitive::u8), + #[codec(index = 129)] + Mortal129(::core::primitive::u8), + #[codec(index = 130)] + Mortal130(::core::primitive::u8), + #[codec(index = 131)] + Mortal131(::core::primitive::u8), + #[codec(index = 132)] + Mortal132(::core::primitive::u8), + #[codec(index = 133)] + Mortal133(::core::primitive::u8), + #[codec(index = 134)] + Mortal134(::core::primitive::u8), + #[codec(index = 135)] + Mortal135(::core::primitive::u8), + #[codec(index = 136)] + Mortal136(::core::primitive::u8), + #[codec(index = 137)] + Mortal137(::core::primitive::u8), + #[codec(index = 138)] + Mortal138(::core::primitive::u8), + #[codec(index = 139)] + Mortal139(::core::primitive::u8), + #[codec(index = 140)] + Mortal140(::core::primitive::u8), + #[codec(index = 141)] + Mortal141(::core::primitive::u8), + #[codec(index = 142)] + Mortal142(::core::primitive::u8), + #[codec(index = 143)] + Mortal143(::core::primitive::u8), + #[codec(index = 144)] + Mortal144(::core::primitive::u8), + #[codec(index = 145)] + Mortal145(::core::primitive::u8), + #[codec(index = 146)] + Mortal146(::core::primitive::u8), + #[codec(index = 147)] + Mortal147(::core::primitive::u8), + #[codec(index = 148)] + Mortal148(::core::primitive::u8), + #[codec(index = 149)] + Mortal149(::core::primitive::u8), + #[codec(index = 150)] + Mortal150(::core::primitive::u8), + #[codec(index = 151)] + Mortal151(::core::primitive::u8), + #[codec(index = 152)] + Mortal152(::core::primitive::u8), + #[codec(index = 153)] + Mortal153(::core::primitive::u8), + #[codec(index = 154)] + Mortal154(::core::primitive::u8), + #[codec(index = 155)] + Mortal155(::core::primitive::u8), + #[codec(index = 156)] + Mortal156(::core::primitive::u8), + #[codec(index = 157)] + Mortal157(::core::primitive::u8), + #[codec(index = 158)] + Mortal158(::core::primitive::u8), + #[codec(index = 159)] + Mortal159(::core::primitive::u8), + #[codec(index = 160)] + Mortal160(::core::primitive::u8), + #[codec(index = 161)] + Mortal161(::core::primitive::u8), + #[codec(index = 162)] + Mortal162(::core::primitive::u8), + #[codec(index = 163)] + Mortal163(::core::primitive::u8), + #[codec(index = 164)] + Mortal164(::core::primitive::u8), + #[codec(index = 165)] + Mortal165(::core::primitive::u8), + #[codec(index = 166)] + Mortal166(::core::primitive::u8), + #[codec(index = 167)] + Mortal167(::core::primitive::u8), + #[codec(index = 168)] + Mortal168(::core::primitive::u8), + #[codec(index = 169)] + Mortal169(::core::primitive::u8), + #[codec(index = 170)] + Mortal170(::core::primitive::u8), + #[codec(index = 171)] + Mortal171(::core::primitive::u8), + #[codec(index = 172)] + Mortal172(::core::primitive::u8), + #[codec(index = 173)] + Mortal173(::core::primitive::u8), + #[codec(index = 174)] + Mortal174(::core::primitive::u8), + #[codec(index = 175)] + Mortal175(::core::primitive::u8), + #[codec(index = 176)] + Mortal176(::core::primitive::u8), + #[codec(index = 177)] + Mortal177(::core::primitive::u8), + #[codec(index = 178)] + Mortal178(::core::primitive::u8), + #[codec(index = 179)] + Mortal179(::core::primitive::u8), + #[codec(index = 180)] + Mortal180(::core::primitive::u8), + #[codec(index = 181)] + Mortal181(::core::primitive::u8), + #[codec(index = 182)] + Mortal182(::core::primitive::u8), + #[codec(index = 183)] + Mortal183(::core::primitive::u8), + #[codec(index = 184)] + Mortal184(::core::primitive::u8), + #[codec(index = 185)] + Mortal185(::core::primitive::u8), + #[codec(index = 186)] + Mortal186(::core::primitive::u8), + #[codec(index = 187)] + Mortal187(::core::primitive::u8), + #[codec(index = 188)] + Mortal188(::core::primitive::u8), + #[codec(index = 189)] + Mortal189(::core::primitive::u8), + #[codec(index = 190)] + Mortal190(::core::primitive::u8), + #[codec(index = 191)] + Mortal191(::core::primitive::u8), + #[codec(index = 192)] + Mortal192(::core::primitive::u8), + #[codec(index = 193)] + Mortal193(::core::primitive::u8), + #[codec(index = 194)] + Mortal194(::core::primitive::u8), + #[codec(index = 195)] + Mortal195(::core::primitive::u8), + #[codec(index = 196)] + Mortal196(::core::primitive::u8), + #[codec(index = 197)] + Mortal197(::core::primitive::u8), + #[codec(index = 198)] + Mortal198(::core::primitive::u8), + #[codec(index = 199)] + Mortal199(::core::primitive::u8), + #[codec(index = 200)] + Mortal200(::core::primitive::u8), + #[codec(index = 201)] + Mortal201(::core::primitive::u8), + #[codec(index = 202)] + Mortal202(::core::primitive::u8), + #[codec(index = 203)] + Mortal203(::core::primitive::u8), + #[codec(index = 204)] + Mortal204(::core::primitive::u8), + #[codec(index = 205)] + Mortal205(::core::primitive::u8), + #[codec(index = 206)] + Mortal206(::core::primitive::u8), + #[codec(index = 207)] + Mortal207(::core::primitive::u8), + #[codec(index = 208)] + Mortal208(::core::primitive::u8), + #[codec(index = 209)] + Mortal209(::core::primitive::u8), + #[codec(index = 210)] + Mortal210(::core::primitive::u8), + #[codec(index = 211)] + Mortal211(::core::primitive::u8), + #[codec(index = 212)] + Mortal212(::core::primitive::u8), + #[codec(index = 213)] + Mortal213(::core::primitive::u8), + #[codec(index = 214)] + Mortal214(::core::primitive::u8), + #[codec(index = 215)] + Mortal215(::core::primitive::u8), + #[codec(index = 216)] + Mortal216(::core::primitive::u8), + #[codec(index = 217)] + Mortal217(::core::primitive::u8), + #[codec(index = 218)] + Mortal218(::core::primitive::u8), + #[codec(index = 219)] + Mortal219(::core::primitive::u8), + #[codec(index = 220)] + Mortal220(::core::primitive::u8), + #[codec(index = 221)] + Mortal221(::core::primitive::u8), + #[codec(index = 222)] + Mortal222(::core::primitive::u8), + #[codec(index = 223)] + Mortal223(::core::primitive::u8), + #[codec(index = 224)] + Mortal224(::core::primitive::u8), + #[codec(index = 225)] + Mortal225(::core::primitive::u8), + #[codec(index = 226)] + Mortal226(::core::primitive::u8), + #[codec(index = 227)] + Mortal227(::core::primitive::u8), + #[codec(index = 228)] + Mortal228(::core::primitive::u8), + #[codec(index = 229)] + Mortal229(::core::primitive::u8), + #[codec(index = 230)] + Mortal230(::core::primitive::u8), + #[codec(index = 231)] + Mortal231(::core::primitive::u8), + #[codec(index = 232)] + Mortal232(::core::primitive::u8), + #[codec(index = 233)] + Mortal233(::core::primitive::u8), + #[codec(index = 234)] + Mortal234(::core::primitive::u8), + #[codec(index = 235)] + Mortal235(::core::primitive::u8), + #[codec(index = 236)] + Mortal236(::core::primitive::u8), + #[codec(index = 237)] + Mortal237(::core::primitive::u8), + #[codec(index = 238)] + Mortal238(::core::primitive::u8), + #[codec(index = 239)] + Mortal239(::core::primitive::u8), + #[codec(index = 240)] + Mortal240(::core::primitive::u8), + #[codec(index = 241)] + Mortal241(::core::primitive::u8), + #[codec(index = 242)] + Mortal242(::core::primitive::u8), + #[codec(index = 243)] + Mortal243(::core::primitive::u8), + #[codec(index = 244)] + Mortal244(::core::primitive::u8), + #[codec(index = 245)] + Mortal245(::core::primitive::u8), + #[codec(index = 246)] + Mortal246(::core::primitive::u8), + #[codec(index = 247)] + Mortal247(::core::primitive::u8), + #[codec(index = 248)] + Mortal248(::core::primitive::u8), + #[codec(index = 249)] + Mortal249(::core::primitive::u8), + #[codec(index = 250)] + Mortal250(::core::primitive::u8), + #[codec(index = 251)] + Mortal251(::core::primitive::u8), + #[codec(index = 252)] + Mortal252(::core::primitive::u8), + #[codec(index = 253)] + Mortal253(::core::primitive::u8), + #[codec(index = 254)] + Mortal254(::core::primitive::u8), + #[codec(index = 255)] + Mortal255(::core::primitive::u8), + } + } + } + pub mod traits { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct BlakeTwo256; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum DispatchError { + #[codec(index = 0)] + Other, + #[codec(index = 1)] + CannotLookup, + #[codec(index = 2)] + BadOrigin, + #[codec(index = 3)] + Module(runtime_types::sp_runtime::ModuleError), + #[codec(index = 4)] + ConsumerRemaining, + #[codec(index = 5)] + NoProviders, + #[codec(index = 6)] + TooManyConsumers, + #[codec(index = 7)] + Token(runtime_types::sp_runtime::TokenError), + #[codec(index = 8)] + Arithmetic(runtime_types::sp_arithmetic::ArithmeticError), + #[codec(index = 9)] + Transactional(runtime_types::sp_runtime::TransactionalError), + #[codec(index = 10)] + Exhausted, + #[codec(index = 11)] + Corruption, + #[codec(index = 12)] + Unavailable, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ModuleError { + pub index: ::core::primitive::u8, + pub error: [::core::primitive::u8; 4usize], + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum MultiSignature { + #[codec(index = 0)] + Ed25519(runtime_types::sp_core::ed25519::Signature), + #[codec(index = 1)] + Sr25519(runtime_types::sp_core::sr25519::Signature), + #[codec(index = 2)] + Ecdsa(runtime_types::sp_core::ecdsa::Signature), + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum TokenError { + #[codec(index = 0)] + NoFunds, + #[codec(index = 1)] + WouldDie, + #[codec(index = 2)] + BelowMinimum, + #[codec(index = 3)] + CannotCreate, + #[codec(index = 4)] + UnknownAsset, + #[codec(index = 5)] + Frozen, + #[codec(index = 6)] + Unsupported, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum TransactionalError { + #[codec(index = 0)] + LimitReached, + #[codec(index = 1)] + NoLayer, + } } - - pub fn multisig(&self) -> multisig::calls::TransactionApi { - multisig::calls::TransactionApi + pub mod sp_session { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct MembershipProof { + pub session: ::core::primitive::u32, + pub trie_nodes: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, + pub validator_count: ::core::primitive::u32, + } } - - pub fn voter_list(&self) -> voter_list::calls::TransactionApi { - voter_list::calls::TransactionApi + pub mod sp_staking { + use super::runtime_types; + pub mod offence { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct OffenceDetails<_0, _1> { + pub offender: _1, + pub reporters: ::std::vec::Vec<_0>, + } + } } - - pub fn nomination_pools(&self) -> nomination_pools::calls::TransactionApi { - nomination_pools::calls::TransactionApi + pub mod sp_version { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct RuntimeVersion { + pub spec_name: ::std::string::String, + pub impl_name: ::std::string::String, + pub authoring_version: ::core::primitive::u32, + pub spec_version: ::core::primitive::u32, + pub impl_version: ::core::primitive::u32, + pub apis: + ::std::vec::Vec<([::core::primitive::u8; 8usize], ::core::primitive::u32)>, + pub transaction_version: ::core::primitive::u32, + pub state_version: ::core::primitive::u8, + } } - } - #[doc = r" check whether the Client you are using is aligned with the statically generated codegen."] - pub fn validate_codegen>( - client: &C, - ) -> Result<(), ::subxt::error::MetadataError> { - let runtime_metadata_hash = client.metadata().metadata_hash(&PALLETS); - if runtime_metadata_hash - != [ - 94u8, 195u8, 152u8, 227u8, 231u8, 236u8, 12u8, 95u8, 173u8, 226u8, 21u8, 221u8, - 9u8, 108u8, 132u8, 202u8, 107u8, 149u8, 181u8, 128u8, 114u8, 25u8, 177u8, 93u8, - 116u8, 209u8, 127u8, 228u8, 132u8, 77u8, 130u8, 251u8, - ] { - Err(::subxt::error::MetadataError::IncompatibleMetadata) - } else { - Ok(()) + pub mod sp_weights { + use super::runtime_types; + pub mod weight_v2 { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Weight { + #[codec(compact)] + pub ref_time: ::core::primitive::u64, + #[codec(compact)] + pub proof_size: ::core::primitive::u64, + } + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct OldWeight(pub ::core::primitive::u64); + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct RuntimeDbWeight { + pub read: ::core::primitive::u64, + pub write: ::core::primitive::u64, + } } } } diff --git a/avail-subxt/src/primitives/extrinsic_params.rs b/avail-subxt/src/primitives/extrinsic_params.rs index bc493210f..0c9214e15 100644 --- a/avail-subxt/src/primitives/extrinsic_params.rs +++ b/avail-subxt/src/primitives/extrinsic_params.rs @@ -5,7 +5,7 @@ use subxt::{ utils::H256, }; -use crate::api::runtime_types::da_primitives::asdr::AppId; +use crate::api::runtime_types::avail_core::AppId; #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct AvailExtrinsicParams { diff --git a/avail-subxt/src/primitives/header.rs b/avail-subxt/src/primitives/header.rs index 963b2269d..72da1d9ae 100644 --- a/avail-subxt/src/primitives/header.rs +++ b/avail-subxt/src/primitives/header.rs @@ -11,7 +11,7 @@ use subxt::{ }; use crate::api::runtime_types::{ - da_primitives::header::{extension::HeaderExtension, Header as ApiHeader}, + avail_core::header::{extension::HeaderExtension, Header as ApiHeader}, sp_runtime::generic::digest::{Digest as ApiDigest, DigestItem as ApiDigestItem}, }; diff --git a/base/Cargo.toml b/base/Cargo.toml index 456bda8f4..6d34331f8 100644 --- a/base/Cargo.toml +++ b/base/Cargo.toml @@ -7,8 +7,8 @@ edition = "2021" [dependencies] # Our crates -da-primitives = { version = "0.4", default-features = false } -kate = { version = "0.7", default-features = false } +avail-core = { version = "0.5", default-features = false, features = ["runtime"] } +kate = { version = "0.8", default-features = false } # Substrate related substrate-prometheus-endpoint = { version = "0.10.0-dev", optional = true } @@ -25,6 +25,6 @@ std = [ "once_cell", "substrate-prometheus-endpoint", "sp-std/std", - "da-primitives/std", + "avail-core/std", "kate/std" ] diff --git a/base/src/metrics/adapter.rs b/base/src/metrics/adapter.rs index 7d3076a9b..631b6e6d9 100644 --- a/base/src/metrics/adapter.rs +++ b/base/src/metrics/adapter.rs @@ -48,11 +48,11 @@ impl Metrics for MetricAdapter { ); } - fn block_dims_and_size(&self, block_dims: &BlockDimensions, block_len: u32) { + fn block_dims_and_size(&self, block_dims: BlockDimensions, block_len: u32) { #[rustfmt::skip] may_observe!( - general, block_dims_rows, block_dims.rows.0, - general, block_dims_cols, block_dims.cols.0, + general, block_dims_rows, block_dims.rows().0, + general, block_dims_cols, block_dims.cols().0, general, block_len, block_len ); } @@ -81,11 +81,11 @@ impl Metrics for RPCMetricAdapter { ); } - fn block_dims_and_size(&self, block_dims: &BlockDimensions, block_len: u32) { + fn block_dims_and_size(&self, block_dims: BlockDimensions, block_len: u32) { #[rustfmt::skip] may_observe!( - general, block_dims_rows, block_dims.rows.0, - general, block_dims_cols, block_dims.cols.0, + general, block_dims_rows, block_dims.rows().0, + general, block_dims_cols, block_dims.cols().0, general, block_len, block_len ); } diff --git a/fuzzing/Cargo.toml b/fuzzing/Cargo.toml index 2df413a4d..ab0d710b7 100644 --- a/fuzzing/Cargo.toml +++ b/fuzzing/Cargo.toml @@ -7,9 +7,9 @@ edition = "2021" [dependencies] afl = "*" -kate-recovery = "0.8" -kate = "0.7" -da-primitives = "0.4" +kate-recovery = "0.9" +kate = "0.8" +avail-core = "0.5" hex-literal = "0.3.1" [[bin]] diff --git a/fuzzing/src/build_commitment_fuzz.rs b/fuzzing/src/build_commitment_fuzz.rs index e35125445..d36a88430 100644 --- a/fuzzing/src/build_commitment_fuzz.rs +++ b/fuzzing/src/build_commitment_fuzz.rs @@ -1,5 +1,5 @@ use afl; -use da_primitives::asdr::AppExtrinsic; +use avail_core::AppExtrinsic; use hex_literal::hex; fn main() { diff --git a/fuzzing/src/build_proof_fuzz.rs b/fuzzing/src/build_proof_fuzz.rs index 36e7e042a..d00c4e060 100644 --- a/fuzzing/src/build_proof_fuzz.rs +++ b/fuzzing/src/build_proof_fuzz.rs @@ -1,5 +1,5 @@ use afl; -use da_primitives::asdr::AppExtrinsic; +use avail_core::AppExtrinsic; use hex_literal::hex; fn main() { diff --git a/node/Cargo.toml b/node/Cargo.toml index bae16979e..8fe01b769 100644 --- a/node/Cargo.toml +++ b/node/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "data-avail" -version = "1.6.2" +version = "1.6.3" description = "Avail Node" authors = ["Anonymous"] homepage = "https://www.availproject.org/" @@ -20,8 +20,8 @@ name = "data-avail" avail-base = { path = "../base" } # Internals -da-primitives = { version = "0.4", default-features = false } -kate = { version = "0.7", default-features = false } +avail-core = { version = "0.5", default-features = false, features = ["runtime"] } +kate = { version = "0.8", default-features = false } da-runtime = { path = "../runtime" } da-control = { path = "../pallets/dactr" } kate-rpc = { path = "../rpc/kate-rpc" } @@ -121,7 +121,7 @@ clap_complete = { version = "4.0.2", optional = true } frame-benchmarking-cli = { version = "4.0.0-dev", optional = true } [dev-dependencies] -sp-tracing = "4.0.0-dev" +sp-tracing = "6.0.0" tempfile = "3.1.0" [features] @@ -142,7 +142,7 @@ runtime-benchmarks = [ try-runtime = [ "da-runtime/try-runtime", "try-runtime-cli/try-runtime", - "da-primitives/try-runtime" + "avail-core/try-runtime" ] diff --git a/node/src/benchmarking.rs b/node/src/benchmarking.rs index 0daca8760..edafca68d 100644 --- a/node/src/benchmarking.rs +++ b/node/src/benchmarking.rs @@ -22,8 +22,8 @@ use std::{sync::Arc, time::Duration}; +use avail_core::AppId; use codec::Encode; -use da_primitives::asdr::AppId; use da_runtime::{AccountId, Balance, BalancesCall}; use frame_system::Call as SystemCall; use sc_cli::Result; diff --git a/node/src/chain_spec/config.rs b/node/src/chain_spec/config.rs index 2c8813be1..69955259a 100644 --- a/node/src/chain_spec/config.rs +++ b/node/src/chain_spec/config.rs @@ -1,7 +1,7 @@ use std::collections::HashMap; +use avail_core::{AppId, BLOCK_CHUNK_SIZE}; use da_control::AppKeyInfo; -use da_primitives::asdr::AppId; use da_runtime::{ constants, constants::elections::DesiredMembers, wasm_binary_unwrap, AccountId, BabeConfig, Balance, BalancesConfig, DataAvailabilityConfig, ElectionsConfig, NominationPoolsConfig, @@ -20,10 +20,11 @@ use crate::chain_spec::AuthorityKeys; pub(crate) fn make_system_config() -> SystemConfig { let code = wasm_binary_unwrap().to_vec(); let kc_public_params = public_params(MAX_BLOCK_COLUMNS).to_raw_var_bytes(); + let block_length = BlockLength::with_normal_ratio( MAX_BLOCK_ROWS, MAX_BLOCK_COLUMNS, - 32, + BLOCK_CHUNK_SIZE, Perbill::from_percent(90), ) .expect("Valid `BlockLength` genesis definition .qed"); diff --git a/node/src/chain_spec/locals.rs b/node/src/chain_spec/locals.rs index 2b5a642a3..ac8b1149c 100644 --- a/node/src/chain_spec/locals.rs +++ b/node/src/chain_spec/locals.rs @@ -1,6 +1,6 @@ use std::collections::HashMap; -use da_primitives::currency::AVL; +use avail_core::currency::AVL; use da_runtime::{AccountId, Balance, GenesisConfig}; use sp_core::sr25519::Public; diff --git a/node/src/chain_spec/testnets.rs b/node/src/chain_spec/testnets.rs index 4afc83d88..cc1769a21 100644 --- a/node/src/chain_spec/testnets.rs +++ b/node/src/chain_spec/testnets.rs @@ -1,6 +1,6 @@ use std::collections::HashMap; -use da_primitives::currency::AVL; +use avail_core::currency::AVL; use da_runtime::{AccountId, Balance}; use crate::chain_spec::{AuthorityKeys, GenesisConfig}; diff --git a/node/src/da_block_import.rs b/node/src/da_block_import.rs index 87bcc7c05..9b1985f86 100644 --- a/node/src/da_block_import.rs +++ b/node/src/da_block_import.rs @@ -6,7 +6,7 @@ /// Root`. use std::{collections::HashMap, sync::Arc}; -use da_primitives::{BlockLengthColumns, BlockLengthRows, OpaqueExtrinsic, BLOCK_CHUNK_SIZE}; +use avail_core::{BlockLengthColumns, BlockLengthRows, OpaqueExtrinsic, BLOCK_CHUNK_SIZE}; use da_runtime::{ apis::{DataAvailApi, ExtensionBuilder}, Header as DaHeader, diff --git a/node/src/service.rs b/node/src/service.rs index 6f3ceb31d..61df6d879 100644 --- a/node/src/service.rs +++ b/node/src/service.rs @@ -21,8 +21,8 @@ use std::sync::Arc; +use avail_core::AppId; use codec::Encode; -use da_primitives::asdr::AppId; use da_runtime::{apis::RuntimeApi, NodeBlock as Block, Runtime}; use frame_system_rpc_runtime_api::AccountNonceApi; use futures::prelude::*; diff --git a/pallets/bridges/nomad/da-bridge/Cargo.toml b/pallets/bridges/nomad/da-bridge/Cargo.toml index 83d7d2323..331528095 100644 --- a/pallets/bridges/nomad/da-bridge/Cargo.toml +++ b/pallets/bridges/nomad/da-bridge/Cargo.toml @@ -13,55 +13,53 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] # Our crates -da-primitives = { version = "0.4", default-features = false } +avail-core = { version = "0.5", default-features = false, features = ["runtime"] } nomad-core = { version = "0.1", default-features = false } nomad-home = { path = "../home", default-features = false } -# 3rd-party -serde = { version = "1.0.126", optional = true, features = ["derive"] } +# Substrate codec = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"] } -scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } -sp-core = { version = "7.0.0", default-features = false } -sp-std = { version = "5.0.0", default-features = false } -sp-io = { version = "7.0.0", default-features = false } -sp-runtime = { version = "7.0.0", default-features = false } -sp-arithmetic = { version = "5", default-features = false } +scale-info = { version = "2", default-features = false, features = ["derive"] } +sp-core = { version = "7", default-features = false } +sp-std = { version = "5", default-features = false } +sp-runtime = { version = "7", default-features = false } frame-support = { version = "4.0.0-dev", default-features = false } frame-system = { version = "4.0.0-dev", default-features = false } -primitive-types = { version = "0.12", default-features = false } frame-benchmarking = { version = "4.0.0-dev", default-features = false, optional = true } -hex-literal = "0.3.4" +# 3rd party +hex-literal = { version = "0.3.4", optional = true } [dev-dependencies] -rand = "0.8.5" -hex-literal = "0.3.4" -frame-executive = "4.0.0-dev" -pallet-transaction-payment = "4.0.0-dev" -da-control = { path = "../../../dactr" } nomad-base = "0.1" nomad-merkle = "0.1" nomad-updater-manager = { path = "../updater-manager" } +sp-io = { version = "7" } + [features] default = ["std"] std = [ + "hex-literal", "codec/std", "scale-info/std", + "sp-core/std", + "sp-std/std", + "sp-runtime/std", "frame-support/std", "frame-system/std", - "frame-benchmarking/std", + "frame-benchmarking?/std", "nomad-home/std", "nomad-core/std", - "da-primitives/std", + "avail-core/std", ] runtime-benchmarks = [ "frame-benchmarking", "sp-runtime/runtime-benchmarks", "frame-support/runtime-benchmarks", + "hex-literal", ] try-runtime = [ "frame-support/try-runtime", - "da-primitives/try-runtime" ] diff --git a/pallets/bridges/nomad/da-bridge/src/benchmarking.rs b/pallets/bridges/nomad/da-bridge/src/benchmarking.rs index 494e7e2ac..e435b6103 100644 --- a/pallets/bridges/nomad/da-bridge/src/benchmarking.rs +++ b/pallets/bridges/nomad/da-bridge/src/benchmarking.rs @@ -1,4 +1,4 @@ -use da_primitives::traits::ExtendedHeader; +use avail_core::{header::HeaderExtension, traits::ExtendedHeader}; use frame_benchmarking::{benchmarks, whitelisted_caller}; use frame_system::{BlockHash, RawOrigin}; use hex_literal::hex; @@ -16,7 +16,11 @@ benchmarks! { H256: From<::Hash>, H256: Into<::Hash>, u32: From<::BlockNumber>, - T::Header: ExtendedHeader, + T::Header: ExtendedHeader< + ::BlockNumber, + ::Hash, + sp_runtime::generic::Digest, + HeaderExtension>, ::Hash: From, } @@ -31,7 +35,7 @@ benchmarks! { let extension = Default::default(); let digest = Default::default(); - let header = Box::new(::new( + let header = Box::new(>::new( block_number.clone(), extrinsics_root.into(), state_root, diff --git a/pallets/bridges/nomad/da-bridge/src/lib.rs b/pallets/bridges/nomad/da-bridge/src/lib.rs index 6acaa043f..7369e7fab 100644 --- a/pallets/bridges/nomad/da-bridge/src/lib.rs +++ b/pallets/bridges/nomad/da-bridge/src/lib.rs @@ -19,12 +19,13 @@ mod benchmarking; #[frame_support::pallet] pub mod pallet { - use da_primitives::traits::ExtendedHeader; - use frame_support::{pallet_prelude::*, sp_runtime::traits::Header}; - use frame_system::{ensure_signed, pallet_prelude::OriginFor}; + use avail_core::traits::ExtendedHeader; + use frame_support::pallet_prelude::*; + use frame_system::pallet_prelude::*; use nomad_core::TypedMessage; use nomad_home::Pallet as Home; - use primitive_types::H256; + use sp_core::{bounded::BoundedVec, Get, H256}; + use sp_runtime::traits::Header as _; use sp_std::boxed::Box; use super::weights::WeightInfo; @@ -88,7 +89,7 @@ pub mod pallet { #[pallet::compact] destination_domain: u32, recipient_address: H256, header: Box, - ) -> DispatchResult { + ) -> DispatchResultWithPostInfo { ensure_signed(origin)?; Self::ensure_valid_header(&header)?; Self::do_dispatch_data_root(destination_domain, recipient_address, &header) @@ -106,7 +107,7 @@ pub mod pallet { destination_domain: u32, recipient_address: H256, header: &T::Header, - ) -> DispatchResult { + ) -> DispatchResultWithPostInfo { let block_number = *header.number(); let data_root = header.extension().data_root(); @@ -135,12 +136,12 @@ pub mod pallet { data_root, }); - Ok(()) + Ok(().into()) } /// Ensure a given header's hash has been recorded in the block hash /// mapping. - fn ensure_valid_header(header: &T::Header) -> Result<(), DispatchError> { + fn ensure_valid_header(header: &T::Header) -> DispatchResultWithPostInfo { // Ensure header's block number is in the mapping let number = header.number(); let stored_hash = frame_system::Pallet::::block_hash(number); @@ -153,7 +154,7 @@ pub mod pallet { Error::::HashOfBlockNotMatchBlockNumber, ); - Ok(()) + Ok(().into()) } } } diff --git a/pallets/bridges/nomad/da-bridge/src/message.rs b/pallets/bridges/nomad/da-bridge/src/message.rs index 6405abf92..281beeec9 100644 --- a/pallets/bridges/nomad/da-bridge/src/message.rs +++ b/pallets/bridges/nomad/da-bridge/src/message.rs @@ -1,8 +1,7 @@ use core::convert::TryFrom; use nomad_core::{TypedMessage, TypedMessageVariant}; -use primitive_types::H256; -use sp_runtime::RuntimeDebug; +use sp_core::H256; use sp_std::vec::Vec; /// DA Bridge message 1-byte type tags. Note that the invalid 0 variant @@ -14,7 +13,7 @@ pub enum DABridgeMessageTypes { DataRootMessage = 1, } -#[derive(PartialEq, RuntimeDebug)] +#[derive(PartialEq)] /// Errors during the creation from `extrinsics`. pub enum TryFromError { /// Unknown DABridgeMessage variant diff --git a/pallets/bridges/nomad/da-bridge/src/mock.rs b/pallets/bridges/nomad/da-bridge/src/mock.rs index 10f7cd6a8..7eef3862a 100644 --- a/pallets/bridges/nomad/da-bridge/src/mock.rs +++ b/pallets/bridges/nomad/da-bridge/src/mock.rs @@ -1,8 +1,8 @@ -use da_primitives::Header; +use avail_core::header::Header; use frame_support::{traits::GenesisBuild, weights::Weight}; use frame_system::{self as system, header_builder::da, test_utils::TestRandomness}; use nomad_base::NomadBase; -use primitive_types::{H160, H256}; +use sp_core::{H160, H256}; use sp_runtime::{ traits::{BlakeTwo256, ConstU32, IdentityLookup}, AccountId32, diff --git a/pallets/bridges/nomad/da-bridge/src/tests.rs b/pallets/bridges/nomad/da-bridge/src/tests.rs index 206074bbb..5fcb54c3b 100644 --- a/pallets/bridges/nomad/da-bridge/src/tests.rs +++ b/pallets/bridges/nomad/da-bridge/src/tests.rs @@ -1,10 +1,10 @@ -use da_primitives::{Header, HeaderExtension}; +use avail_core::header::{Header, HeaderExtension}; use frame_support::assert_ok; use frame_system::Config; use hex_literal::hex; use nomad_base::testing::*; use nomad_merkle::Merkle; -use primitive_types::H256; +use sp_core::H256; use sp_runtime::{testing::Digest, traits::BlakeTwo256, AccountId32}; use crate::mock::*; diff --git a/pallets/bridges/nomad/home/Cargo.toml b/pallets/bridges/nomad/home/Cargo.toml index f2fb3dd53..f1dd3e970 100644 --- a/pallets/bridges/nomad/home/Cargo.toml +++ b/pallets/bridges/nomad/home/Cargo.toml @@ -22,24 +22,24 @@ nomad-updater-manager = { path = "../updater-manager", default-features = false # Substrate codec = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"] } -scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } -sp-core = { version = "7.0.0", default-features = false } -sp-std = { version = "5.0.0", default-features = false } -sp-io = { version = "7.0.0", default-features = false } -sp-runtime = { version = "7.0.0", default-features = false } -sp-arithmetic = { version = "5", default-features = false } +scale-info = { version = "2", default-features = false, features = ["derive"] } +sp-core = { version = "7", default-features = false } + +sp-std = { version = "5", default-features = false } frame-support = { version = "4.0.0-dev", default-features = false } frame-system = { version = "4.0.0-dev", default-features = false } -frame-benchmarking = { version = "4.0.0-dev", default-features = false } -primitive-types = { version = "0.12.0", default-features = false } +frame-benchmarking = { version = "4.0.0-dev", default-features = false, optional = true } # Others -serde = { version = "1.0.126", default-features = false, optional = true, features = ["derive"] } -hex-literal = "0.3.4" -thiserror-no-std = "2.0.2" +hex-literal = { version = "0.3.4", optional = true } [dev-dependencies] -da-primitives = "0.4" +avail-core = { version = "0.5", features = ["runtime"] } + +sp-runtime = { version = "7" } +frame-benchmarking = { version = "4.0.0-dev" } +sp-io = { version = "7" } + test-case = "1.2.3" [features] @@ -47,6 +47,8 @@ default = ["std"] std = [ "codec/std", "scale-info/std", + "sp-core/std", + "sp-std/std", "frame-support/std", "frame-system/std", "nomad-base/std", @@ -54,14 +56,15 @@ std = [ "nomad-signature/std", "nomad-merkle/std", "nomad-updater-manager/std", - "frame-benchmarking/std" + "hex-literal", + "frame-benchmarking?/std" ] runtime-benchmarks = [ - "sp-runtime/runtime-benchmarks", "frame-support/runtime-benchmarks", + "frame-benchmarking", + "hex-literal", ] try-runtime = [ "frame-support/try-runtime", - "da-primitives/try-runtime" ] diff --git a/pallets/bridges/nomad/home/src/benchmarking.rs b/pallets/bridges/nomad/home/src/benchmarking.rs index 32e9c1bac..5c06ba78a 100644 --- a/pallets/bridges/nomad/home/src/benchmarking.rs +++ b/pallets/bridges/nomad/home/src/benchmarking.rs @@ -38,7 +38,7 @@ benchmarks! { let signed_update = expected_signed_update(); }: _(origin, signed_update) verify { - assert_eq!(Base::::get().state, NomadState::Failed); + assert!(Base::::get().state == NomadState::Failed); } dispatch { diff --git a/pallets/bridges/nomad/home/src/lib.rs b/pallets/bridges/nomad/home/src/lib.rs index ad1a874a3..e007b9b7c 100644 --- a/pallets/bridges/nomad/home/src/lib.rs +++ b/pallets/bridges/nomad/home/src/lib.rs @@ -27,7 +27,7 @@ pub mod pallet { use nomad_base::NomadBase; use nomad_core::{destination_and_nonce, NomadMessage, NomadState, SignedUpdate}; use nomad_merkle::{Merkle, NomadLightMerkle}; - use primitive_types::{H160, H256}; + use sp_core::{H160, H256}; use sp_std::vec::Vec; use super::weights::WeightInfo; diff --git a/pallets/bridges/nomad/home/src/mock.rs b/pallets/bridges/nomad/home/src/mock.rs index 95d0bdd07..c5329cc0b 100644 --- a/pallets/bridges/nomad/home/src/mock.rs +++ b/pallets/bridges/nomad/home/src/mock.rs @@ -1,4 +1,4 @@ -use da_primitives::Header; +use avail_core::header::Header; use frame_support::{ parameter_types, traits::{ConstU32, GenesisBuild}, @@ -6,7 +6,7 @@ use frame_support::{ }; use frame_system::{self as system, header_builder::da, test_utils::TestRandomness}; use nomad_base::NomadBase; -use primitive_types::{H160, H256}; +use sp_core::{H160, H256}; use sp_runtime::{ traits::{BlakeTwo256, IdentityLookup}, AccountId32, diff --git a/pallets/bridges/nomad/home/src/tests.rs b/pallets/bridges/nomad/home/src/tests.rs index 485db36b1..9239e7509 100644 --- a/pallets/bridges/nomad/home/src/tests.rs +++ b/pallets/bridges/nomad/home/src/tests.rs @@ -5,7 +5,7 @@ use frame_support::{assert_err, assert_ok, BoundedVec}; use nomad_base::testing::*; use nomad_core::{destination_and_nonce, NomadMessage, NomadState}; use nomad_merkle::Merkle; -use primitive_types::H256; +use sp_core::H256; use sp_runtime::{AccountId32, DispatchResult}; use test_case::test_case; diff --git a/pallets/bridges/nomad/updater-manager/Cargo.toml b/pallets/bridges/nomad/updater-manager/Cargo.toml index 3d123de7f..b6b5f2d0f 100644 --- a/pallets/bridges/nomad/updater-manager/Cargo.toml +++ b/pallets/bridges/nomad/updater-manager/Cargo.toml @@ -13,44 +13,35 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] # Substrate -serde = { version = "1.0.126", optional = true, features = ["derive"] } codec = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"] } -scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } -sp-core = { version = "7.0.0", default-features = false } -sp-std = { version = "5.0.0", default-features = false } -sp-io = { version = "7.0.0", default-features = false } -sp-runtime = { version = "7.0.0", default-features = false } -sp-arithmetic = { version = "5", default-features = false } +scale-info = { version = "2", default-features = false, features = ["derive"] } + +sp-core = { version = "7", default-features = false } +sp-io = { version = "7", default-features = false, optional = true } +sp-runtime = { version = "7", default-features = false, optional = true } + frame-support = { version = "4.0.0-dev", default-features = false } frame-system = { version = "4.0.0-dev", default-features = false } -primitive-types = { version = "0.12.0", default-features = false } - -# Benchmarking -frame-benchmarking = { version = "4.0.0-dev", default-features = false, optional = true } [dev-dependencies] -da-primitives = "0.4" +avail-core = { version = "0.5", features = ["runtime"] } [features] default = ["std"] std = [ - "serde", "codec/std", "scale-info/std", "sp-core/std", - "sp-std/std", "sp-io/std", "sp-runtime/std", - "sp-arithmetic/std", "frame-support/std", "frame-system/std", ] runtime-benchmarks = [ - "frame-benchmarking", "sp-runtime/runtime-benchmarks", "frame-support/runtime-benchmarks", ] try-runtime = [ "frame-support/try-runtime", - "da-primitives/try-runtime" + "avail-core/try-runtime" ] diff --git a/pallets/bridges/nomad/updater-manager/src/lib.rs b/pallets/bridges/nomad/updater-manager/src/lib.rs index 3ff703db2..9a3949e20 100644 --- a/pallets/bridges/nomad/updater-manager/src/lib.rs +++ b/pallets/bridges/nomad/updater-manager/src/lib.rs @@ -17,7 +17,7 @@ mod benchmarking; #[frame_support::pallet] pub mod pallet { use frame_support::pallet_prelude::{ValueQuery, *}; - use primitive_types::H160; + use sp_core::H160; #[pallet::config] pub trait Config: frame_system::Config { diff --git a/pallets/bridges/nomad/updater-manager/src/mock.rs b/pallets/bridges/nomad/updater-manager/src/mock.rs index 0a2cb9367..707ac5628 100644 --- a/pallets/bridges/nomad/updater-manager/src/mock.rs +++ b/pallets/bridges/nomad/updater-manager/src/mock.rs @@ -1,8 +1,8 @@ -use da_primitives::Header; +use avail_core::header::Header; use frame_support::{parameter_types, weights::Weight}; use frame_system::{self as system, mocking::MockUncheckedExtrinsic, test_utils::TestRandomness}; -use primitive_types::H256; -use sp_runtime::traits::{BlakeTwo256, ConstU32, IdentityLookup}; +use sp_core::{ConstU32, H256}; +use sp_runtime::traits::{BlakeTwo256, IdentityLookup}; use crate as updater_manager; diff --git a/pallets/bridges/nomad/updater-manager/src/tests.rs b/pallets/bridges/nomad/updater-manager/src/tests.rs index 58c4e6656..b3eff107a 100644 --- a/pallets/bridges/nomad/updater-manager/src/tests.rs +++ b/pallets/bridges/nomad/updater-manager/src/tests.rs @@ -1,5 +1,5 @@ use frame_support::assert_ok; -use primitive_types::H160; +use sp_core::H160; use crate::mock::*; diff --git a/pallets/dactr/Cargo.toml b/pallets/dactr/Cargo.toml index 4771d1142..c69493346 100644 --- a/pallets/dactr/Cargo.toml +++ b/pallets/dactr/Cargo.toml @@ -12,24 +12,25 @@ description = "Data Avail Control Module" targets = ["x86_64-unknown-linux-gnu"] [dependencies] -da-primitives = { version = "0.4", default-features = false } -pallet-utility = { version = "4.0.0-dev", default-features = false } -kate = { version = "0.7", default-features = false } +avail-core = { version = "0.5", default-features = false, features = ["runtime"] } +kate = { version = "0.8", default-features = false } log = { version = "0.4.17", default-features = false } +static_assertions = "1.1.0" # Substrate serde = { version = "1.0.126", optional = true, features = ["derive"] } codec = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"] } -scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } -sp-core = { version = "7.0.0", default-features = false } -sp-std = { version = "5.0.0", default-features = false } -sp-io = { version = "7.0.0", default-features = false } -sp-runtime = { version = "7.0.0", default-features = false } -sp-arithmetic = { version = "5", default-features = false } +scale-info = { version = "2", default-features = false, features = ["derive"] } +sp-core = { version = "7", default-features = false } +sp-std = { version = "5", default-features = false } +sp-io = { version = "7", default-features = false } +sp-runtime = { version = "7", default-features = false } +sp-arithmetic = { version = "6", default-features = false } frame-support = { version = "4.0.0-dev", default-features = false } frame-system = { version = "4.0.0-dev", default-features = false } frame-benchmarking = { version = "4.0.0-dev", default-features = false, optional = true } +pallet-utility = { version = "4.0.0-dev", default-features = false } [dev-dependencies] pallet-transaction-payment = "4.0.0-dev" @@ -40,7 +41,7 @@ test-case = "1.2.3" default = ["std"] std = [ "log/std", - "da-primitives/std", + "avail-core/std", "serde", "codec/std", "scale-info/std", @@ -52,6 +53,7 @@ std = [ "frame-support/std", "frame-system/std", "kate/std", + "pallet-utility/std", ] runtime-benchmarks = [ "frame-benchmarking", @@ -60,5 +62,5 @@ runtime-benchmarks = [ ] try-runtime = [ "frame-support/try-runtime", - "da-primitives/try-runtime" + "avail-core/try-runtime" ] diff --git a/pallets/dactr/src/benchmarking.rs b/pallets/dactr/src/benchmarking.rs index 1965f5cf1..265f13dce 100644 --- a/pallets/dactr/src/benchmarking.rs +++ b/pallets/dactr/src/benchmarking.rs @@ -1,10 +1,10 @@ #![cfg(feature = "runtime-benchmarks")] -use codec::{Decode, Encode}; -use da_primitives::{ - asdr::{AppExtrinsic, AppUncheckedExtrinsic}, - BlockLengthColumns, BlockLengthRows, OpaqueExtrinsic, BLOCK_CHUNK_SIZE, NORMAL_DISPATCH_RATIO, +use avail_core::{ + asdr::AppUncheckedExtrinsic, AppExtrinsic, BlockLengthColumns, BlockLengthRows, + OpaqueExtrinsic, BLOCK_CHUNK_SIZE, NORMAL_DISPATCH_RATIO, }; +use codec::{Decode, Encode}; use frame_benchmarking::{benchmarks, vec, whitelisted_caller}; use frame_support::{log::info, traits::Get}; use frame_system::{ @@ -138,7 +138,8 @@ where let cols = BlockLengthColumns(cols); let mut nb_tx = 4; // Value set depending on MaxAppDataLength (512 kb) to reach 2 mb - let max_tx: u32 = rows.0 * cols.0 * (BLOCK_CHUNK_SIZE - 2) / data_length; + let max_tx: u32 = + rows.0 * cols.0 * (BLOCK_CHUNK_SIZE.get().checked_sub(2).unwrap()) / data_length; if nb_tx > max_tx { nb_tx = max_tx; } @@ -176,7 +177,7 @@ benchmarks! { }: create_application_key(origin, key) verify { let info = Pallet::::application_key(&key_verify); - assert_eq!( info, Some(AppKeyInfoFor:: { owner: caller, id: 3.into()})); + assert_eq!( info, Some(AppKeyInfoFor:: { owner: caller, id: AppId(3)})); } submit_block_length_proposal { diff --git a/pallets/dactr/src/extensions/check_app_id.rs b/pallets/dactr/src/extensions/check_app_id.rs index 02ef73ae4..cd468d8a5 100644 --- a/pallets/dactr/src/extensions/check_app_id.rs +++ b/pallets/dactr/src/extensions/check_app_id.rs @@ -1,8 +1,5 @@ +use avail_core::{traits::GetAppId, AppId, InvalidTransactionCustomId}; use codec::{Decode, Encode}; -use da_primitives::{ - asdr::{AppId, GetAppId}, - InvalidTransactionCustomId, -}; use frame_support::{ ensure, traits::{IsSubType, IsType}, @@ -167,7 +164,7 @@ where #[cfg(test)] mod tests { - use da_primitives::InvalidTransactionCustomId::{ForbiddenAppId, InvalidAppId}; + use avail_core::InvalidTransactionCustomId::{ForbiddenAppId, InvalidAppId}; use frame_system::pallet::Call as SysCall; use pallet_utility::pallet::Call as UtilityCall; use sp_runtime::transaction_validity::InvalidTransaction; @@ -215,7 +212,7 @@ mod tests { #[test_case(1, batch_submit_call() => Ok(ValidTransaction::default()); "utility batch filled with submit_data can be called with any valid AppId" )] #[test_case(1, batch_mixed_call() => to_invalid_tx(ForbiddenAppId); "utility batch filled with submit_data and remark cannot be called if AppId != 0" )] #[test_case(0, batch_mixed_call() => Ok(ValidTransaction::default()); "utility batch filled with submit_data and remark can be called if AppId == 0" )] - fn do_validate_test>(app_id: A, call: RuntimeCall) -> TransactionValidity { - new_test_ext().execute_with(|| CheckAppId::::from(app_id.into()).do_validate(&call)) + fn do_validate_test(id: u32, call: RuntimeCall) -> TransactionValidity { + new_test_ext().execute_with(|| CheckAppId::::from(AppId(id)).do_validate(&call)) } } diff --git a/pallets/dactr/src/lib.rs b/pallets/dactr/src/lib.rs index e0506517b..4b6d22ac1 100644 --- a/pallets/dactr/src/lib.rs +++ b/pallets/dactr/src/lib.rs @@ -2,8 +2,8 @@ // `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256. #![recursion_limit = "256"] -use da_primitives::{ - asdr::AppId, BlockLengthColumns, BlockLengthRows, BLOCK_CHUNK_SIZE, NORMAL_DISPATCH_RATIO, +use avail_core::{ + AppId, BlockLengthColumns, BlockLengthRows, BLOCK_CHUNK_SIZE, NORMAL_DISPATCH_RATIO, }; use frame_support::{dispatch::DispatchClass, weights::Weight}; use frame_system::{limits::BlockLength, pallet::DynamicBlockLength}; @@ -261,7 +261,7 @@ pub mod pallet { .unwrap_or(0u32) .checked_add(1u32) .expect("DA Control Genesis overflows the last application id"); - NextAppId::::put::(last_id.into()); + NextAppId::::put::(AppId(last_id)); } } diff --git a/pallets/dactr/src/mock.rs b/pallets/dactr/src/mock.rs index 248f693ba..f24d98a43 100644 --- a/pallets/dactr/src/mock.rs +++ b/pallets/dactr/src/mock.rs @@ -1,8 +1,9 @@ #![cfg(test)] -use da_primitives::{ +use avail_core::{ currency::{Balance, AVL}, - Header, + header::Header, + AppId, }; use frame_support::{ parameter_types, @@ -151,15 +152,15 @@ pub fn new_test_ext() -> sp_io::TestExternalities { app_keys: vec![ (b"Data Avail".to_vec(), AppKeyInfo { owner: 1, - id: 0.into(), + id: AppId(0), }), (b"Ethereum".to_vec(), AppKeyInfo { owner: 2, - id: 1.into(), + id: AppId(1), }), (b"Polygon".to_vec(), AppKeyInfo { owner: 2, - id: 2.into(), + id: AppId(2), }), ], } diff --git a/pallets/dactr/src/tests.rs b/pallets/dactr/src/tests.rs index ea2559b29..0ef4f4147 100644 --- a/pallets/dactr/src/tests.rs +++ b/pallets/dactr/src/tests.rs @@ -1,4 +1,4 @@ -use da_primitives::{BlockLengthColumns, BlockLengthRows, BLOCK_CHUNK_SIZE, NORMAL_DISPATCH_RATIO}; +use avail_core::{BlockLengthColumns, BlockLengthRows, BLOCK_CHUNK_SIZE, NORMAL_DISPATCH_RATIO}; use frame_support::{assert_noop, assert_ok, error::BadOrigin}; use frame_system::{limits::BlockLength, RawOrigin}; diff --git a/pallets/mocked_runtime/Cargo.toml b/pallets/mocked_runtime/Cargo.toml index fd87bf501..a4d354ddf 100644 --- a/pallets/mocked_runtime/Cargo.toml +++ b/pallets/mocked_runtime/Cargo.toml @@ -9,8 +9,8 @@ repository = "" description = "Mokend Runtime for Testing" [dependencies] -da-primitives = { version = "0.4", default-features = false } -kate = { version = "0.7", default-features = false } +avail-core = { version = "0.5", default-features = false, features = ["runtime"] } +kate = { version = "0.8", default-features = false } da-control = { path = "../dactr" } scale-info = { version = "2.1.1", features = ["derive"] } diff --git a/pallets/mocked_runtime/src/lib.rs b/pallets/mocked_runtime/src/lib.rs index a66e8411d..2a7344fca 100644 --- a/pallets/mocked_runtime/src/lib.rs +++ b/pallets/mocked_runtime/src/lib.rs @@ -1,4 +1,4 @@ -use da_primitives::{BlockLengthColumns, BlockLengthRows, NORMAL_DISPATCH_RATIO}; +use avail_core::{BlockLengthColumns, BlockLengthRows, NORMAL_DISPATCH_RATIO}; use frame_support::{ construct_runtime, parameter_types, traits::Randomness, @@ -25,7 +25,7 @@ pub type AccountId = u64; pub type Balance = u128; pub type BlockNumber = u32; pub type Moment = u64; -pub type Header = da_primitives::Header; +pub type Header = avail_core::header::Header; pub type Signature = sp_runtime::testing::sr25519::Signature; pub type TestXt = test_xt::TestXt; pub type UncheckedExtrinsic = TestXt; @@ -140,7 +140,7 @@ impl frame_system::Config for Runtime { type DbWeight = (); type Hash = sp_core::H256; type Hashing = BlakeTwo256; - type Header = da_primitives::Header; + type Header = avail_core::header::Header; type HeaderExtensionBuilder = frame_system::header_builder::da::HeaderExtensionBuilder; type Index = u64; type Lookup = IdentityLookup; diff --git a/pallets/mocked_runtime/src/test_xt.rs b/pallets/mocked_runtime/src/test_xt.rs index 75e314585..d80c9daf4 100644 --- a/pallets/mocked_runtime/src/test_xt.rs +++ b/pallets/mocked_runtime/src/test_xt.rs @@ -1,5 +1,5 @@ use codec::{Codec, Decode, Encode}; -use da_primitives::asdr::{AppId, GetAppId}; +use avail_core::{AppId, traits::GetAppId}; use derive_more::From; use frame_support::{dispatch, traits::ExtrinsicCall}; use scale_info::TypeInfo; diff --git a/pallets/system/Cargo.toml b/pallets/system/Cargo.toml index fedf87850..dcc03c353 100644 --- a/pallets/system/Cargo.toml +++ b/pallets/system/Cargo.toml @@ -14,8 +14,8 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] avail-base = { path = "../../base", default-features = false } -da-primitives = { version = "0.4", default-features = false } -kate = { version = "0.7", default-features = false } +avail-core = { version = "0.5", default-features = false, features = ["runtime"] } +kate = { version = "0.8", default-features = false } # Other impl-trait-for-tuples = "0.2.1" @@ -49,7 +49,7 @@ default = ["std"] std = [ "avail-base/std", "kate/std", - "da-primitives/std", + "avail-core/std", "codec/std", "frame-support/std", "log/std", @@ -70,13 +70,13 @@ runtime-benchmarks = [ ] try-runtime = [ "frame-support/try-runtime", - "da-primitives/try-runtime" + "avail-core/try-runtime" ] force-rs-merkle = [ "rs_merkle" ] # For testing backward/forward header compatibility. header-compatibility-test = [ - "da-primitives/header-backward-compatibility-test" ] + "avail-core/header-backward-compatibility-test" ] # It enables the use of header extension V2 header_extension_v2 = [] diff --git a/pallets/system/benches/bench.rs b/pallets/system/benches/bench.rs index b317d9652..3aa7f80a8 100644 --- a/pallets/system/benches/bench.rs +++ b/pallets/system/benches/bench.rs @@ -15,8 +15,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +use avail_core::header::Header as DaHeader; use criterion::{black_box, criterion_group, criterion_main, Criterion}; -use da_primitives::Header as DaHeader; use frame_support::{ traits::{ConstU32, ConstU64}, weights::Weight, diff --git a/pallets/system/benchmarking/Cargo.toml b/pallets/system/benchmarking/Cargo.toml index 98cbaa30e..1b6d9760a 100644 --- a/pallets/system/benchmarking/Cargo.toml +++ b/pallets/system/benchmarking/Cargo.toml @@ -13,7 +13,7 @@ readme = "README.md" targets = ["x86_64-unknown-linux-gnu"] [dependencies] -da-primitives = { version = "0.4", default-features = false } +avail-core = { version = "0.5", default-features = false, features = ["runtime"] } # Substrate codec = { package = "parity-scale-codec", version = "3", default-features = false } @@ -33,7 +33,7 @@ sp-externalities = "0.13" [features] default = ["std"] std = [ - "da-primitives/std", + "avail-core/std", "codec/std", "frame-benchmarking/std", "frame-support/std", diff --git a/pallets/system/benchmarking/src/mock.rs b/pallets/system/benchmarking/src/mock.rs index 730fd869d..1f4a8c260 100644 --- a/pallets/system/benchmarking/src/mock.rs +++ b/pallets/system/benchmarking/src/mock.rs @@ -19,8 +19,8 @@ #![cfg(test)] +use avail_core::header::Header as DaHeader; use codec::Encode; -use da_primitives::Header as DaHeader; use frame_system::{ header_builder::da::HeaderExtensionBuilder, mocking::MockUncheckedExtrinsic, test_utils::TestRandomness, diff --git a/pallets/system/src/data_root_builder.rs b/pallets/system/src/data_root_builder.rs index a2b4eb33c..15acb7b69 100644 --- a/pallets/system/src/data_root_builder.rs +++ b/pallets/system/src/data_root_builder.rs @@ -1,5 +1,5 @@ use codec::Decode; -use da_primitives::asdr::AppExtrinsic; +use avail_core::AppExtrinsic; use frame_support::traits::ExtrinsicCall; use sp_core::H256; use sp_runtime::traits::Extrinsic; @@ -119,7 +119,7 @@ impl DataRootBuilder for F {} #[cfg(all(test, feature = "force-rs-merkle"))] mod test { - use da_primitives::asdr::AppId; + use avail_core::AppId; use hex_literal::hex; use rs_merkle::{algorithms::Sha256, Hasher, MerkleTree}; use test_case::test_case; diff --git a/pallets/system/src/extensions/check_weight.rs b/pallets/system/src/extensions/check_weight.rs index 7be6b0811..4e2fc8df7 100644 --- a/pallets/system/src/extensions/check_weight.rs +++ b/pallets/system/src/extensions/check_weight.rs @@ -15,8 +15,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +use avail_core::InvalidTransactionCustomId::MaxPaddedLenExceeded; use codec::{Decode, Encode}; -use da_primitives::InvalidTransactionCustomId::MaxPaddedLenExceeded; use frame_support::{ dispatch::{DispatchInfo, PostDispatchInfo}, fail, @@ -104,14 +104,16 @@ where let padded_added_len = kate::padded_len(len as u32, dynamic_block_len.chunk_size()); all_extrinsics_len.padded = all_extrinsics_len.padded.saturating_add(padded_added_len); - let max_padded_len: u32 = BlockDimensions::new( + let max_padded_len = BlockDimensions::new( dynamic_block_len.rows, dynamic_block_len.cols, dynamic_block_len.chunk_size(), ) - .size() - .try_into() - .map_err(|_| InvalidTransaction::Custom(MaxPaddedLenExceeded as u8))?; + .ok_or(InvalidTransaction::Custom(MaxPaddedLenExceeded as u8))? + .size(); + + let max_padded_len = u32::try_from(max_padded_len) + .map_err(|_| InvalidTransaction::Custom(MaxPaddedLenExceeded as u8))?; if all_extrinsics_len.padded > max_padded_len { log::warn!( @@ -290,7 +292,7 @@ impl sp_std::fmt::Debug for CheckWeight { #[cfg(test)] mod tests { - use da_primitives::BLOCK_CHUNK_SIZE; + use avail_core::BLOCK_CHUNK_SIZE; use frame_support::{ assert_err, assert_ok, dispatch::{DispatchClass, Pays}, diff --git a/pallets/system/src/header_builder.rs b/pallets/system/src/header_builder.rs index 123f9ded0..e683d6b30 100644 --- a/pallets/system/src/header_builder.rs +++ b/pallets/system/src/header_builder.rs @@ -1,15 +1,15 @@ #[cfg(feature = "std")] -use da_primitives::asdr::DataLookup; -use da_primitives::{asdr::AppExtrinsic, traits::ExtendedHeader, HeaderExtension}; +use avail_core::DataLookup; +use avail_core::{header::HeaderExtension, traits::ExtendedHeader, AppExtrinsic}; use frame_support::traits::Randomness; pub use kate::{ metrics::{IgnoreMetrics, Metrics}, Seed, }; use sp_core::H256; -use sp_runtime::traits::Hash; #[cfg(feature = "std")] use sp_runtime::SaturatedConversion; +use sp_runtime::{generic::Digest, traits::Hash}; use sp_runtime_interface::runtime_interface; use sp_std::vec::Vec; @@ -18,10 +18,10 @@ use crate::{limits::BlockLength, Config, LOG_TARGET}; pub mod da { use core::marker::PhantomData; - use da_primitives::Header as DaHeader; + use avail_core::header::{Header as DaHeader, HeaderExtension}; use sp_runtime::traits::BlakeTwo256; - use super::{AppExtrinsic, BlockLength, Config, HeaderExtension, Vec, H256}; + use super::*; pub type Hash = sp_core::H256; // @todo Miguel: Link this type with `Config::BlockNumber`. @@ -55,7 +55,7 @@ pub mod da { /// Trait for header builder. pub trait HeaderExtensionBuilder { - type Header: sp_runtime::traits::Header + ExtendedHeader; + type Header: sp_runtime::traits::Header + ExtendedHeader; /// Creates the header using the given parameters. fn build( @@ -126,7 +126,7 @@ pub fn build_extension( seed: Seed, metrics: &M, ) -> HeaderExtension { - use da_primitives::header::extension::{v1, v2}; + use avail_core::header::extension::{v1, v2}; let (xts_layout, commitment, block_dims, _data_matrix) = kate::com::par_build_commitments( block_length.rows, @@ -137,14 +137,14 @@ pub fn build_extension( metrics, ) .expect("Build commitments cannot fail .qed"); - let app_lookup = - DataLookup::try_from(xts_layout.as_slice()).expect("Extrinsic size cannot overflow .qed"); - let rows = block_dims.rows.0.saturated_into::(); - let cols = block_dims.cols.0.saturated_into::(); + let app_lookup = DataLookup::from_id_and_len_iter(xts_layout.into_iter()) + .expect("Extrinsic size cannot overflow .qed"); + let rows = block_dims.rows().0.saturated_into::(); + let cols = block_dims.cols().0.saturated_into::(); // **NOTE:** Header extension V2 is not yet enable by default. if cfg!(feature = "header_extension_v2") { - use da_primitives::kate_commitment::v2::KateCommitment; + use avail_core::kate_commitment::v2::KateCommitment; #[allow(unused_mut)] let mut kate = KateCommitment::new(rows, cols, data_root, commitment); @@ -160,7 +160,7 @@ pub fn build_extension( .into() } else { #[allow(unused_mut)] - let mut kate = da_primitives::kate_commitment::v1::KateCommitment { + let mut kate = avail_core::kate_commitment::v1::KateCommitment { rows, cols, commitment, diff --git a/pallets/system/src/lib.rs b/pallets/system/src/lib.rs index 75a6a3c19..2961316ad 100644 --- a/pallets/system/src/lib.rs +++ b/pallets/system/src/lib.rs @@ -65,10 +65,11 @@ #![cfg_attr(not(feature = "std"), no_std)] #![feature(result_option_inspect)] -use codec::{Decode, Encode, EncodeLike, FullCodec, MaxEncodedLen}; -use da_primitives::{ - asdr::AppExtrinsic, traits::ExtendedHeader, OpaqueExtrinsic, BLOCK_CHUNK_SIZE, +use avail_core::{ + header::HeaderExtension, traits::ExtendedHeader, AppExtrinsic, OpaqueExtrinsic, + BLOCK_CHUNK_SIZE, }; +use codec::{Decode, Encode, EncodeLike, FullCodec, MaxEncodedLen}; #[cfg(feature = "std")] use frame_support::traits::GenesisBuild; use frame_support::{ @@ -208,7 +209,7 @@ impl Default for ExtrinsicLen { fn default() -> Self { Self { raw: <_>::default(), - padded: BLOCK_CHUNK_SIZE, + padded: BLOCK_CHUNK_SIZE.get(), } } } @@ -314,7 +315,7 @@ pub mod pallet { /// The block header. type Header: Parameter + traits::Header - + ExtendedHeader; + + ExtendedHeader; /// Header builder type HeaderExtensionBuilder: header_builder::HeaderExtensionBuilder; @@ -741,7 +742,7 @@ pub mod pallet { #[pallet::genesis_build] impl GenesisBuild for GenesisConfig { fn build(&self) { - use da_primitives::well_known_keys::KATE_PUBLIC_PARAMS; + use avail_core::well_known_keys::KATE_PUBLIC_PARAMS; use frame_support::traits::StorageVersion; >::insert::<_, T::Hash>(T::BlockNumber::zero(), hash69()); @@ -1515,7 +1516,12 @@ impl Pallet { ); let extrinsics_root = extrinsics_data_root::(extrinsics); - let header = ::new( + let header = >::new( number, extrinsics_root, storage_root, diff --git a/pallets/system/src/limits.rs b/pallets/system/src/limits.rs index 3c61294af..b08f68adb 100644 --- a/pallets/system/src/limits.rs +++ b/pallets/system/src/limits.rs @@ -24,25 +24,27 @@ //! `frame_system` tracks consumption of each of these resources separately for each //! `DispatchClass`. This module contains configuration object for both resources, //! which should be passed to `frame_system` configuration when runtime is being set up. +use core::num::NonZeroU32; -use codec::{Compact, Decode, Encode, Error, Input, MaxEncodedLen}; -use da_primitives::{BlockLengthColumns, BlockLengthRows, BLOCK_CHUNK_SIZE}; +use avail_core::{BlockLengthColumns, BlockLengthRows, BLOCK_CHUNK_SIZE}; +use codec::{Compact, Decode, Encode, EncodeLike, Error, Input, MaxEncodedLen, Output}; use frame_support::{ dispatch::{DispatchClass, OneOrMany, PerDispatchClass}, ensure, weights::{constants, Weight}, }; use kate::config::{DATA_CHUNK_SIZE, MAX_BLOCK_COLUMNS, MAX_BLOCK_ROWS}; -use scale_info::TypeInfo; +use scale_info::{build::Fields, Path, Type, TypeInfo}; #[cfg(feature = "std")] use serde::{Deserialize, Serialize}; use sp_runtime::{traits::Bounded, Perbill, RuntimeDebug}; use sp_runtime_interface::pass_by::PassByCodec; +use sp_std::vec::Vec; use static_assertions::const_assert; /// Block length limit configuration. #[cfg_attr(feature = "std", derive(Serialize, Deserialize))] -#[derive(RuntimeDebug, PartialEq, Clone, Encode, TypeInfo, PassByCodec, MaxEncodedLen)] +#[derive(RuntimeDebug, PartialEq, Clone, PassByCodec, MaxEncodedLen)] pub struct BlockLength { /// Maximal total length in bytes for each extrinsic class. /// @@ -52,9 +54,7 @@ pub struct BlockLength { pub max: PerDispatchClass, pub cols: BlockLengthColumns, pub rows: BlockLengthRows, - #[codec(compact)] - #[codec(compact)] - chunk_size: u32, + chunk_size: NonZeroU32, } #[derive(RuntimeDebug, Clone, Copy)] @@ -65,13 +65,15 @@ pub enum BlockLengthError { } #[inline] -const fn is_chunk_size_valid(new_size: u32) -> bool { new_size >= DATA_CHUNK_SIZE as u32 } +const fn is_chunk_size_valid(new_size: NonZeroU32) -> bool { + new_size.get() >= DATA_CHUNK_SIZE as u32 +} impl BlockLength { #[inline] - pub fn chunk_size(&self) -> u32 { self.chunk_size } + pub fn chunk_size(&self) -> NonZeroU32 { self.chunk_size } - pub fn set_chunk_size(&mut self, new_size: u32) -> Result<(), BlockLengthError> { + pub fn set_chunk_size(&mut self, new_size: NonZeroU32) -> Result<(), BlockLengthError> { ensure!( is_chunk_size_valid(new_size), BlockLengthError::InvalidChunkSize @@ -82,6 +84,48 @@ impl BlockLength { } } +/// Customized `TypeInfo` to support `NonZeroU32` as `Compact`. +impl TypeInfo for BlockLength { + type Identity = Self; + + fn type_info() -> Type { + Type::builder() + .path(Path::new("BlockLength", "frame_system::limits")) + .type_params(Vec::new()) + .docs(&["Block length limit configuration."]) + .composite( + Fields::named() + .field(|f| { + f.ty::>() + .name("max") + .type_name("PerDispatchClass") + }) + .field(|f| { + f.ty::() + .name("cols") + .type_name("BlockLengthColumns") + }) + .field(|f| { + f.ty::() + .name("rows") + .type_name("BlockLengthRows") + }) + .field(|f| f.compact::().name("chunk_size").type_name("u32")), + ) + } +} + +impl EncodeLike for BlockLength {} + +impl Encode for BlockLength { + fn encode_to(&self, dest: &mut T) { + self.max.encode_to(dest); + self.cols.encode_to(dest); + self.rows.encode_to(dest); + Compact(self.chunk_size.get()).encode_to(dest); + } +} + impl Decode for BlockLength { // NOTE: Decodification ensures that `chunk_size` is valid. fn decode(input: &mut I) -> Result { @@ -94,6 +138,8 @@ impl Decode for BlockLength { let chunk_size = >::decode(input) .map_err(|e| e.chain("Could not decode `BlockLength::chunk_size`"))? .0; + let chunk_size = NonZeroU32::new(chunk_size).ok_or("Zero `BlockLength::chunk_size`")?; + ensure!( is_chunk_size_valid(chunk_size), Error::from("Invalid `BlockLength::chunk_size`") @@ -165,7 +211,7 @@ impl BlockLength { pub fn with_normal_ratio( rows: BlockLengthRows, cols: BlockLengthColumns, - chunk_size: u32, + chunk_size: NonZeroU32, normal: Perbill, ) -> Result { debug_assert!(is_chunk_size_valid(chunk_size)); @@ -199,13 +245,13 @@ impl BlockLength { fn max_per_class( rows: BlockLengthRows, cols: BlockLengthColumns, - chunk_size: u32, + chunk_size: NonZeroU32, normal: Perbill, ) -> Result, BlockLengthError> { let max = cols .0 .checked_mul(rows.0) - .and_then(|acc| acc.checked_mul(chunk_size)) + .and_then(|acc| acc.checked_mul(chunk_size.get())) .ok_or(BlockLengthError::OverflowBaseMax)?; Ok(PerDispatchClass::new(|class| match class { diff --git a/pallets/system/src/mock.rs b/pallets/system/src/mock.rs index c29fe6dab..1695f28ce 100644 --- a/pallets/system/src/mock.rs +++ b/pallets/system/src/mock.rs @@ -97,7 +97,7 @@ impl Config for Test { type DbWeight = DbWeight; type Hash = H256; type Hashing = BlakeTwo256; - type Header = da_primitives::Header; + type Header = avail_core::header::Header; type HeaderExtensionBuilder = frame_system::header_builder::da::HeaderExtensionBuilder; type Index = u64; type Lookup = IdentityLookup; diff --git a/pallets/system/src/mocking.rs b/pallets/system/src/mocking.rs index 9a73638dd..4f5cd5261 100644 --- a/pallets/system/src/mocking.rs +++ b/pallets/system/src/mocking.rs @@ -17,11 +17,8 @@ //! Provide types to help defining a mock environment when testing pallets. +use avail_core::{traits::GetAppId, AppExtrinsic, OpaqueExtrinsic}; use codec::{Decode, Encode}; -use da_primitives::{ - asdr::{AppExtrinsic, GetAppId, EXTRINSIC_FORMAT_VERSION}, - OpaqueExtrinsic, -}; use scale_info::TypeInfo; use sp_runtime::{ generic, @@ -77,7 +74,7 @@ impl Extrinsic for MockUncheckedExtrinsic { impl ExtrinsicMetadata for MockUncheckedExtrinsic { type SignedExtensions = DefaultGetAppId; - const VERSION: u8 = EXTRINSIC_FORMAT_VERSION; + const VERSION: u8 = avail_core::asdr::EXTRINSIC_FORMAT_VERSION; } #[cfg(feature = "std")] diff --git a/pallets/system/src/submitted_data.rs b/pallets/system/src/submitted_data.rs index f8c81de62..c47a2051f 100644 --- a/pallets/system/src/submitted_data.rs +++ b/pallets/system/src/submitted_data.rs @@ -1,7 +1,7 @@ use core::fmt::Debug; +use avail_core::OpaqueExtrinsic; use beefy_merkle_tree::{merkle_proof, merkle_root, verify_proof, Leaf, MerkleProof}; -use da_primitives::OpaqueExtrinsic; use sp_core::H256; use sp_runtime::traits::Keccak256; use sp_std::{cell::RefCell, rc::Rc, vec::Vec}; @@ -249,7 +249,7 @@ where #[cfg(all(test, feature = "force-rs-merkle"))] mod test { - use da_primitives::asdr::AppId; + use avail_core::AppId; use hex_literal::hex; use rs_merkle::{algorithms::Sha256, Hasher, MerkleTree}; use test_case::test_case; diff --git a/rpc/kate-rpc/Cargo.toml b/rpc/kate-rpc/Cargo.toml index b1669f9c1..a81e6514b 100644 --- a/rpc/kate-rpc/Cargo.toml +++ b/rpc/kate-rpc/Cargo.toml @@ -9,12 +9,15 @@ edition = "2021" avail-base = { path = "../../base", default-features = false } da-runtime = { path = "../../runtime", default-features = false } -da-primitives = { version = "0.4", default-features = false } -kate = { version = "0.7", default-features = false } -kate-recovery = { version = "0.8", default-features = false } +avail-core = { version = "0.5", default-features = false, features = ["runtime"] } +kate = { version = "0.8", default-features = false } +kate-recovery = { version = "0.9", default-features = false } +# 3rd party jsonrpsee = { version = "0.16.2", features = ["server", "client", "macros"] } lru = "0.7.2" +nalgebra = "0.32.2" +static_assertions = "1.1.0" # Substrate sp-api = { version = "4.0.0-dev", default-features = false } @@ -31,7 +34,7 @@ default = ["std"] std = [ "avail-base/std", "da-runtime/std", - "da-primitives/std", + "avail-core/std", "kate/std", "kate-recovery/std", "frame-support/std", diff --git a/rpc/kate-rpc/src/lib.rs b/rpc/kate-rpc/src/lib.rs index 3a1f4d893..0054e7d2b 100644 --- a/rpc/kate-rpc/src/lib.rs +++ b/rpc/kate-rpc/src/lib.rs @@ -1,13 +1,13 @@ +use core::num::NonZeroU16; use std::{ marker::Sync, sync::{Arc, RwLock}, }; use avail_base::metrics::RPCMetricAdapter; -use da_primitives::{ - asdr::{AppExtrinsic, AppId, DataLookup}, - traits::ExtendedHeader, - DataProof, OpaqueExtrinsic, +use avail_core::{ + header::HeaderExtension, traits::ExtendedHeader, AppExtrinsic, AppId, BlockLengthColumns, + BlockLengthRows, DataProof, OpaqueExtrinsic, BLOCK_CHUNK_SIZE, }; use da_runtime::{apis::DataAvailApi, Runtime, UncheckedExtrinsic}; use frame_system::{limits::BlockLength, submitted_data}; @@ -15,14 +15,19 @@ use jsonrpsee::{ core::{async_trait, Error as JsonRpseeError, RpcResult}, proc_macros::rpc, }; -use kate::{com::Cell, BlockDimensions, BlsScalar, PublicParameters, Seed}; -use kate_recovery::{index::AppDataIndex, matrix::Dimensions}; +use kate::{ + com::Cell, + config::{COL_EXTENSION, ROW_EXTENSION}, + BlockDimensions, BlsScalar, PublicParameters, Seed, +}; +use kate_recovery::matrix::Dimensions; use lru::LruCache; +use nalgebra::DMatrix; use sc_client_api::BlockBackend; use sp_api::ProvideRuntimeApi; use sp_blockchain::HeaderBackend; use sp_runtime::{ - generic::BlockId, + generic::{BlockId, Digest}, traits::{Block as BlockT, Header}, }; @@ -38,7 +43,7 @@ where &self, rows: Vec, at: Option>, - ) -> RpcResult>>>; + ) -> RpcResult>>; #[method(name = "kate_queryAppData")] async fn query_app_data( @@ -64,7 +69,7 @@ where #[allow(clippy::type_complexity)] pub struct Kate { client: Arc, - block_ext_cache: RwLock, BlockDimensions)>>, + block_ext_cache: RwLock>>, } impl Kate { @@ -104,6 +109,12 @@ macro_rules! internal_err { fn get_seed(client: &C, block_id: &BlockId) -> Option where B: BlockT, + ::Header: ExtendedHeader< + <::Header as Header>::Number, + ::Hash, + Digest, + HeaderExtension, + >, C: ProvideRuntimeApi, C::Api: DataAvailApi, { @@ -117,7 +128,6 @@ where impl Kate where Block: BlockT, - Block::Header: ExtendedHeader, Client: Send + Sync + 'static, Client: HeaderBackend + ProvideRuntimeApi + BlockBackend, Client::Api: DataAvailApi, @@ -136,7 +146,12 @@ where impl KateApiServer for Kate where Block: BlockT, - Block::Header: ExtendedHeader, + ::Header: ExtendedHeader< + <::Header as Header>::Number, + ::Hash, + Digest, + HeaderExtension, + >, Client: Send + Sync + 'static, Client: HeaderBackend + ProvideRuntimeApi + BlockBackend, Client::Api: DataAvailApi, @@ -145,7 +160,7 @@ where &self, rows: Vec, at: Option>, - ) -> RpcResult>>> { + ) -> RpcResult>> { let at = self.at_or_best(at); let block_id = BlockId::Hash(at); @@ -200,18 +215,14 @@ where let data = kate::com::par_extend_data_matrix(block_dims, &block, &metrics) .map_err(|e| internal_err!("Matrix cannot be extended: {:?}", e))?; - block_ext_cache.put(block_hash, (data, block_dims)); + block_ext_cache.put(block_hash, data); } - let (ext_data, block_dims) = block_ext_cache + let ext_data = block_ext_cache .get(&block_hash) .ok_or_else(|| internal_err!("Block hash {} cannot be fetched", block_hash))?; - let dimensions: Dimensions = (*block_dims) - .try_into() - .map_err(|e| internal_err!("Invalid dimensions: {:?}", e))?; - - Ok(kate::com::scalars_to_rows(&rows, &dimensions, ext_data)) + Ok(kate::com::scalars_to_rows(&rows, ext_data)) } async fn query_app_data( @@ -273,31 +284,20 @@ where let data = kate::com::par_extend_data_matrix(block_dims, &block, &metrics) .map_err(|e| internal_err!("Matrix cannot be extended: {:?}", e))?; - block_ext_cache.put(block_hash, (data, block_dims)); + block_ext_cache.put(block_hash, data); } - let (ext_data, block_dims) = block_ext_cache + let ext_data = block_ext_cache .get(&block_hash) .ok_or_else(|| internal_err!("Block hash {} cannot be fetched", block_hash))?; - let DataLookup { index, size } = signed_block.block.header().extension().app_lookup(); - - let app_data_index = AppDataIndex { - index: index - .iter() - .map(|i| (i.app_id.0, i.start)) - .collect::>(), - size: *size, - }; - - let dimensions: Dimensions = (*block_dims) - .try_into() - .map_err(|e| internal_err!("Invalid dimensions: {:?}", e))?; + let app_data_index = signed_block.block.header().extension().app_lookup(); + let dimensions = non_extended_dimensions(ext_data)?; Ok(kate::com::scalars_to_app_rows( - app_id.0, - &app_data_index, - &dimensions, + app_id, + app_data_index, + dimensions, ext_data, )) } @@ -357,12 +357,20 @@ where let data = kate::com::par_extend_data_matrix(block_dims, &block, &metrics) .map_err(|e| internal_err!("Matrix cannot be extended: {:?}", e))?; - block_ext_cache.put(block_hash, (data, block_dims)); + block_ext_cache.put(block_hash, data); } - let (ext_data, block_dims) = block_ext_cache + let ext_data = block_ext_cache .get(&block_hash) .ok_or_else(|| internal_err!("Block hash {} cannot be fetched", block_hash))?; + let dimensions = non_extended_dimensions(ext_data)?; + let block_dims = BlockDimensions::new( + BlockLengthRows(dimensions.rows().get().into()), + BlockLengthColumns(dimensions.cols().get().into()), + BLOCK_CHUNK_SIZE, + ) + .ok_or_else(|| internal_err!("Block dimensions are invalid"))?; + let kc_public_params_raw = self.client .runtime_api() @@ -378,7 +386,7 @@ where unsafe { PublicParameters::from_slice_unchecked(&kc_public_params_raw) }; let proof = - kate::com::build_proof(&kc_public_params, *block_dims, ext_data, &cells, &metrics) + kate::com::build_proof(&kc_public_params, block_dims, ext_data, &cells, &metrics) .map_err(|e| internal_err!("Proof cannot be generated: {:?}", e))?; Ok(proof) @@ -431,3 +439,18 @@ where .map_err(|e| internal_err!("Data proof cannot be loaded from merkle root: {:?}", e)) } } + +fn non_extended_dimensions(ext_data: &DMatrix) -> RpcResult { + // Dimension of no extended matrix. + let (ext_rows, ext_cols) = ext_data.shape(); + let rows = ext_rows + .checked_div(NonZeroU16::get(ROW_EXTENSION).into()) + .ok_or_else(|| internal_err!("Invalid row extension"))?; + let cols = ext_cols + .checked_div(NonZeroU16::get(COL_EXTENSION).into()) + .ok_or_else(|| internal_err!("Invalid col extension"))?; + let dimensions = + Dimensions::new_from(rows, cols).ok_or_else(|| internal_err!("Invalid dimensions"))?; + + Ok(dimensions) +} diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index 979c99718..7690804f5 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -15,8 +15,8 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] # Internal -da-primitives = { version = "0.4", default-features = false } -kate = { version = "0.7" , default-features = false } +avail-core = { version = "0.5", default-features = false, features = ["runtime"] } +kate = { version = "0.8" , default-features = false } da-control = { path = "../pallets/dactr", default-features = false } ## Nomad @@ -146,7 +146,7 @@ std = [ "pallet-multisig/std", "pallet-nomination-pools/std", "pallet-scheduler/std", - "da-primitives/std", + "avail-core/std", "sp-offchain/std", "pallet-offences/std", "pallet-preimage/std", @@ -257,5 +257,5 @@ try-runtime = [ "pallet-nomination-pools/try-runtime", "pallet-transaction-payment/try-runtime", "pallet-tips/try-runtime", - "da-primitives/try-runtime", + "avail-core/try-runtime", ] diff --git a/runtime/src/apis.rs b/runtime/src/apis.rs index 1bdf20069..931d2b8ab 100644 --- a/runtime/src/apis.rs +++ b/runtime/src/apis.rs @@ -1,4 +1,4 @@ -use da_primitives::{well_known_keys::KATE_PUBLIC_PARAMS, HeaderExtension, OpaqueExtrinsic}; +use avail_core::{header::HeaderExtension, well_known_keys::KATE_PUBLIC_PARAMS, OpaqueExtrinsic}; use frame_support::traits::{KeyOwnerProofSystem, Randomness}; #[cfg(feature = "try-runtime")] use frame_support::weights::Weight; diff --git a/runtime/src/constants.rs b/runtime/src/constants.rs index 324886ad0..a46fb0f4a 100644 --- a/runtime/src/constants.rs +++ b/runtime/src/constants.rs @@ -18,7 +18,7 @@ //! A set of constant values used in substrate runtime. #![allow(clippy::identity_op)] -use da_primitives::currency::{Balance, AVL}; +use avail_core::currency::{Balance, AVL}; use frame_support::{ dispatch::DispatchClass, parameter_types, @@ -99,7 +99,7 @@ pub mod time { } pub mod system { - use da_primitives::NORMAL_DISPATCH_RATIO; + use avail_core::NORMAL_DISPATCH_RATIO; use frame_support::weights::constants::{ ExtrinsicBaseWeight, WEIGHT_REF_TIME_PER_MILLIS, WEIGHT_REF_TIME_PER_SECOND, }; @@ -448,7 +448,7 @@ pub mod bounty { } pub mod da { - use da_primitives::{BlockLengthColumns, BlockLengthRows}; + use avail_core::{BlockLengthColumns, BlockLengthRows}; use super::*; diff --git a/runtime/src/data_root_tests.rs b/runtime/src/data_root_tests.rs index eb44ed16b..4b7c39c5c 100644 --- a/runtime/src/data_root_tests.rs +++ b/runtime/src/data_root_tests.rs @@ -50,7 +50,7 @@ fn decode_submit_call() { CheckNonce::::from(0), CheckWeight::::new(), ChargeTransactionPayment::::from(0), - CheckAppId::::from(1.into()), + CheckAppId::::from(AppId(1)), ), )), }; diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index d233796ae..05e4a9fa8 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -63,11 +63,13 @@ use sp_version::NativeVersion; mod data_root_tests; /// Import the DA pallet. -pub use da_primitives::{ - asdr::{AppExtrinsic, AppId, AppUncheckedExtrinsic, GetAppId}, +pub use avail_core::{ + asdr::AppUncheckedExtrinsic, currency::{Balance, AVL, CENTS, MILLICENTS}, + header::Header as DaHeader, + traits::GetAppId, well_known_keys::KATE_PUBLIC_PARAMS, - DataProof, Header as DaHeader, OpaqueExtrinsic, NORMAL_DISPATCH_RATIO, + AppId, DataProof, OpaqueExtrinsic, NORMAL_DISPATCH_RATIO, }; pub use pallet_balances::Call as BalancesCall; use pallet_grandpa::AuthorityId as GrandpaId; diff --git a/runtime/src/primitives.rs b/runtime/src/primitives.rs index afd521f72..a59f44126 100644 --- a/runtime/src/primitives.rs +++ b/runtime/src/primitives.rs @@ -1,4 +1,4 @@ -use da_primitives::{asdr::AppUncheckedExtrinsic, Header as DaHeader, OpaqueExtrinsic}; +use avail_core::{asdr::AppUncheckedExtrinsic, header::Header as DaHeader, OpaqueExtrinsic}; use sp_runtime::{ generic, impl_opaque_keys, traits::{BlakeTwo256, IdentifyAccount, Verify},